From dea214131d6032262e158d8af66dfb24eeb094be Mon Sep 17 00:00:00 2001 From: cvs2svn Date: Thu, 24 May 2007 18:58:56 +0000 Subject: [PATCH] This commit was manufactured by cvs2svn to create tag 'merge_313_after'. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Sprout from master 2007-05-24 18:58:55 UTC Aleš Křenek 'after merge' Delete: org.glite.deployment.jpis/build.xml org.glite.deployment.jpis/config/scripts/glite-jpis-config.py org.glite.deployment.jpis/config/templates/glite-jpis.cfg.xml org.glite.deployment.jpis/project/build.number org.glite.deployment.jpis/project/build.properties org.glite.deployment.jpis/project/glite-jp.sdf.xml.template org.glite.deployment.jpis/project/glite-jpis.sdf.xml.template org.glite.deployment.jpis/project/lxscript-rpm.xsl org.glite.deployment.jpis/project/lxscript-tgz.xsl org.glite.deployment.jpis/project/properties.xml org.glite.deployment.jpis/project/quattor-template.xsl org.glite.deployment.jpis/project/version.properties org.glite.deployment.jpps/build.xml org.glite.deployment.jpps/config/scripts/glite-jpps-config.py org.glite.deployment.jpps/config/templates/glite-jpps.cfg.xml org.glite.deployment.jpps/project/build.number org.glite.deployment.jpps/project/build.properties org.glite.deployment.jpps/project/glite-jpps.sdf.xml.template org.glite.deployment.jpps/project/lxscript-rpm.xsl org.glite.deployment.jpps/project/lxscript-tgz.xsl org.glite.deployment.jpps/project/properties.xml org.glite.deployment.jpps/project/quattor-template.xsl org.glite.deployment.jpps/project/version.properties org.glite.deployment.lb/.cvsignore org.glite.deployment.lb/CHANGELOG org.glite.deployment.lb/LICENSE org.glite.deployment.lb/build.xml org.glite.deployment.lb/config/scripts/glite-lb-config.py org.glite.deployment.lb/config/templates/glite-lb.cfg.xml org.glite.deployment.lb/doc/release_notes/release_notes.doc org.glite.deployment.lb/doc/release_notes/release_notes.html org.glite.deployment.lb/doc/release_notes/release_notes.pdf org.glite.deployment.lb/project/.cvsignore org.glite.deployment.lb/project/build.number org.glite.deployment.lb/project/build.properties org.glite.deployment.lb/project/glite-lb.sdf.xml.template org.glite.deployment.lb/project/lxscript-rpm.xsl org.glite.deployment.lb/project/lxscript-tgz.xsl org.glite.deployment.lb/project/properties.xml org.glite.deployment.lb/project/quattor-template.xsl org.glite.deployment.lb/project/version.properties org.glite.jp.client/.cvsignore org.glite.jp.client/Makefile org.glite.jp.client/build.xml org.glite.jp.client/config/startup org.glite.jp.client/doc/README.jpimporter org.glite.jp.client/examples/glite-jp-importer.sh org.glite.jp.client/examples/jpps_upload_files.c org.glite.jp.client/interface/jp_client.h org.glite.jp.client/interface/jpcl_ctx_int.h org.glite.jp.client/interface/jpimporter.h org.glite.jp.client/project/build.number org.glite.jp.client/project/build.properties org.glite.jp.client/project/configure.properties.xml org.glite.jp.client/project/properties.xml org.glite.jp.client/project/tar_exclude org.glite.jp.client/project/version.properties org.glite.jp.client/src/jpcl_ctx.c org.glite.jp.client/src/jpimp_lib.c org.glite.jp.client/src/jpimporter.c org.glite.jp.client/src/jptype_map.h org.glite.jp.client/src/typemap.dat org.glite.jp.common/.cvsignore org.glite.jp.common/Makefile org.glite.jp.common/build.xml org.glite.jp.common/interface/attr.h org.glite.jp.common/interface/context.h org.glite.jp.common/interface/escape.h org.glite.jp.common/interface/known_attr.h org.glite.jp.common/interface/strmd5.h org.glite.jp.common/interface/trio.h org.glite.jp.common/interface/type_plugin.h org.glite.jp.common/interface/types.h org.glite.jp.common/project/build.number org.glite.jp.common/project/build.properties org.glite.jp.common/project/configure.properties.xml org.glite.jp.common/project/properties.xml org.glite.jp.common/project/tar_exclude org.glite.jp.common/project/version.properties org.glite.jp.common/src/attr.c org.glite.jp.common/src/context.c org.glite.jp.common/src/escape.c org.glite.jp.common/src/strio.c org.glite.jp.common/src/strio.h org.glite.jp.common/src/strmd5.c org.glite.jp.common/src/trio.c org.glite.jp.common/src/triop.h org.glite.jp.common/test/base64_test.cpp org.glite.jp.common/test/type_test.cpp org.glite.jp.index/.cvsignore org.glite.jp.index/Makefile org.glite.jp.index/build.xml org.glite.jp.index/config/dbsetup.sh org.glite.jp.index/config/glite-jp-index-dbsetup.sql org.glite.jp.index/config/glite-jpis-config.xml org.glite.jp.index/config/glite-jpis-test-config.xml org.glite.jp.index/config/startup org.glite.jp.index/doc/README org.glite.jp.index/doc/client_conf.xsd org.glite.jp.index/doc/glite-jp-indexd.sgml org.glite.jp.index/doc/glite-jpis-client.sgml org.glite.jp.index/doc/server_conf.xsd org.glite.jp.index/examples/jpis-client.c org.glite.jp.index/examples/jpis-db-internal.c org.glite.jp.index/examples/jpis-test.c org.glite.jp.index/examples/query-tests/authz.out org.glite.jp.index/examples/query-tests/complex_query.in org.glite.jp.index/examples/query-tests/complex_query.out org.glite.jp.index/examples/query-tests/dump1.sql org.glite.jp.index/examples/query-tests/exists_query.in org.glite.jp.index/examples/query-tests/exists_query.out org.glite.jp.index/examples/query-tests/jobid_query.in org.glite.jp.index/examples/query-tests/jobid_query.out org.glite.jp.index/examples/query-tests/origin_query.in org.glite.jp.index/examples/query-tests/origin_query.out org.glite.jp.index/examples/query-tests/run-test.sh org.glite.jp.index/examples/query-tests/simple_query.in org.glite.jp.index/examples/query-tests/simple_query.out org.glite.jp.index/examples/query-tests/within_query.in org.glite.jp.index/examples/query-tests/within_query.out org.glite.jp.index/interface/JobProvenanceISClient.xsd org.glite.jp.index/project/build.number org.glite.jp.index/project/build.properties org.glite.jp.index/project/configure.properties.xml org.glite.jp.index/project/properties.xml org.glite.jp.index/project/tar_exclude org.glite.jp.index/project/version.properties org.glite.jp.index/src/bones_server.c org.glite.jp.index/src/common.c org.glite.jp.index/src/common.h org.glite.jp.index/src/common_server.c org.glite.jp.index/src/common_server.h org.glite.jp.index/src/conf.c org.glite.jp.index/src/conf.h org.glite.jp.index/src/context.c org.glite.jp.index/src/context.h org.glite.jp.index/src/db_ops.c org.glite.jp.index/src/db_ops.h org.glite.jp.index/src/simple_server.c org.glite.jp.index/src/soap_ops.c org.glite.jp.index/src/soap_ps_calls.c org.glite.jp.index/src/soap_ps_calls.h org.glite.jp.index/src/typemap.dat org.glite.jp.index/src/ws_is_typeref.c org.glite.jp.index/src/ws_is_typeref.h org.glite.jp.index/src/ws_ps_typeref.c org.glite.jp.index/src/ws_ps_typeref.h org.glite.jp.index/src/ws_typemap.h org.glite.jp.primary/.cvsignore org.glite.jp.primary/Makefile org.glite.jp.primary/build.xml org.glite.jp.primary/config/glite-jp-primary-dbsetup.sh org.glite.jp.primary/config/glite-jp-primary-dbsetup.sql org.glite.jp.primary/config/startup org.glite.jp.primary/doc/README.install org.glite.jp.primary/examples/README.test org.glite.jp.primary/examples/dag-deps.c org.glite.jp.primary/examples/job_template org.glite.jp.primary/examples/jpps-test.c org.glite.jp.primary/examples/jpps_store_test org.glite.jp.primary/examples/sample_job_aborted org.glite.jp.primary/examples/sample_job_cleared org.glite.jp.primary/examples/sample_job_tagged_done org.glite.jp.primary/examples/sample_job_waiting org.glite.jp.primary/interface/file_plugin.h org.glite.jp.primary/project/build.number org.glite.jp.primary/project/build.properties org.glite.jp.primary/project/configure.properties.xml org.glite.jp.primary/project/properties.xml org.glite.jp.primary/project/tar_exclude org.glite.jp.primary/project/version.properties org.glite.jp.primary/src/attrs.c org.glite.jp.primary/src/attrs.h org.glite.jp.primary/src/authz.c org.glite.jp.primary/src/authz.h org.glite.jp.primary/src/backend.h org.glite.jp.primary/src/bones_server.c org.glite.jp.primary/src/builtin_plugins.h org.glite.jp.primary/src/classad_plugin.c org.glite.jp.primary/src/db.h org.glite.jp.primary/src/feed.c org.glite.jp.primary/src/feed.h org.glite.jp.primary/src/file_plugin.c org.glite.jp.primary/src/ftpd_auth.c org.glite.jp.primary/src/is_client.c org.glite.jp.primary/src/is_client.h org.glite.jp.primary/src/jptype_map.h org.glite.jp.primary/src/mk_soap_switch.pl org.glite.jp.primary/src/mysql.c org.glite.jp.primary/src/new_ftp_backend.c org.glite.jp.primary/src/sandbox_plugin.c org.glite.jp.primary/src/simple_server.c org.glite.jp.primary/src/soap_ops.c org.glite.jp.primary/src/soap_util.c org.glite.jp.primary/src/tags.c org.glite.jp.primary/src/tags.h org.glite.jp.primary/src/typemap.dat org.glite.jp.primary/src/utils.c org.glite.jp.primary/src/utils.h org.glite.jp.server-common/Makefile org.glite.jp.server-common/build.xml org.glite.jp.server-common/examples/db-test-int.c org.glite.jp.server-common/interface/db.h org.glite.jp.server-common/project/build.number org.glite.jp.server-common/project/configure.properties.xml org.glite.jp.server-common/project/properties.xml org.glite.jp.server-common/project/tar_exclude org.glite.jp.server-common/project/version.properties org.glite.jp.server-common/src/db.c org.glite.jp.ws-interface/.cvsignore org.glite.jp.ws-interface/LICENSE org.glite.jp.ws-interface/Makefile org.glite.jp.ws-interface/build.xml org.glite.jp.ws-interface/project/build.number org.glite.jp.ws-interface/project/build.properties org.glite.jp.ws-interface/project/configure.properties.xml org.glite.jp.ws-interface/project/properties.xml org.glite.jp.ws-interface/project/tar_exclude org.glite.jp.ws-interface/project/version.properties org.glite.jp.ws-interface/src/JobProvenanceIS.xml org.glite.jp.ws-interface/src/JobProvenancePS.xml org.glite.jp.ws-interface/src/JobProvenanceTypes.xml org.glite.jp.ws-interface/src/doc.xml org.glite.jp.ws-interface/src/jpdev.sh org.glite.jp.ws-interface/src/jpdev.xml.sh org.glite.jp.ws-interface/src/puke-schema.xsl org.glite.jp.ws-interface/src/puke-ug.xsl org.glite.jp.ws-interface/src/puke-wsdl.xsl org.glite.jp.ws-interface/src/ws_fault.c org.glite.jp/.cvsignore org.glite.jp/build.xml org.glite.jp/doc/EGEElogoNEW.jpg org.glite.jp/doc/copyright.tex org.glite.jp/doc/egee.cls org.glite.jp/doc/frontmatter.tex org.glite.jp/doc/install-guide/EGEElogoNEW.jpg org.glite.jp/doc/install-guide/LB-JP-interaction-details.cdr org.glite.jp/doc/install-guide/LB-JP-interaction-details.eps org.glite.jp/doc/install-guide/LB-JP-interaction-details.pdf org.glite.jp/doc/install-guide/LB-JP-interaction-guide.tex org.glite.jp/doc/install-guide/README org.glite.jp/doc/install-guide/copyright.tex org.glite.jp/doc/install-guide/egee.cls org.glite.jp/doc/install-guide/glite_installation_guide_JP.doc org.glite.jp/doc/install-guide/glite_installation_guide_LB.doc org.glite.jp/doc/install-guide/isi.png org.glite.jp/doc/install-guide/lb-jp-drawing.pdf org.glite.jp/doc/isi.png org.glite.jp/doc/testplan.tex org.glite.jp/doc/users-quide/EGEElogoNEW.jpg org.glite.jp/doc/users-quide/JP-interactions.cdr org.glite.jp/doc/users-quide/JP-interactions.eps org.glite.jp/doc/users-quide/JP-interactions.pdf org.glite.jp/doc/users-quide/JP-query.cdr org.glite.jp/doc/users-quide/JP-query.eps org.glite.jp/doc/users-quide/JP-query.pdf org.glite.jp/doc/users-quide/JP-users-guide.tex org.glite.jp/doc/users-quide/README org.glite.jp/doc/users-quide/copyright.tex org.glite.jp/doc/users-quide/egee.cls org.glite.jp/doc/users-quide/glite-jpis-client.tex org.glite.jp/doc/users-quide/isi.png org.glite.jp/doc/users-quide/jpws.tex org.glite.jp/project/build.number org.glite.jp/project/build.properties org.glite.jp/project/dependencies.properties org.glite.jp/project/glite.jp.csf.xml org.glite.jp/project/properties.xml org.glite.jp/project/run-workspace org.glite.jp/project/taskdefs.xml org.glite.jp/project/version.properties org.glite.lb-utils.context/.cvsignore org.glite.lb-utils.context/LICENSE org.glite.lb-utils.context/build.xml org.glite.lb-utils.context/project/build.number org.glite.lb-utils.context/project/build.properties org.glite.lb-utils.context/project/configure.properties.xml org.glite.lb-utils.context/project/properties.xml org.glite.lb-utils.context/project/version.properties org.glite.lb-utils.db/.cvsignore org.glite.lb-utils.db/LICENSE org.glite.lb-utils.db/Makefile org.glite.lb-utils.db/build.xml org.glite.lb-utils.db/examples/db_expire.c org.glite.lb-utils.db/examples/db_test.c org.glite.lb-utils.db/interface/db.h org.glite.lb-utils.db/project/build.number org.glite.lb-utils.db/project/build.properties org.glite.lb-utils.db/project/configure.properties.xml org.glite.lb-utils.db/project/properties.xml org.glite.lb-utils.db/project/tar_exclude org.glite.lb-utils.db/project/version.properties org.glite.lb-utils.db/src/db.c org.glite.lb-utils.jobid/.cvsignore org.glite.lb-utils.jobid/LICENSE org.glite.lb-utils.jobid/Makefile org.glite.lb-utils.jobid/build.xml org.glite.lb-utils.jobid/interface/Exception.h org.glite.lb-utils.jobid/interface/JobId.h org.glite.lb-utils.jobid/interface/JobIdExceptions.h org.glite.lb-utils.jobid/interface/cjobid.h org.glite.lb-utils.jobid/interface/strmd5.h org.glite.lb-utils.jobid/project/build.number org.glite.lb-utils.jobid/project/build.properties org.glite.lb-utils.jobid/project/configure.properties.xml org.glite.lb-utils.jobid/project/properties.xml org.glite.lb-utils.jobid/project/tar_exclude org.glite.lb-utils.jobid/project/version.properties org.glite.lb-utils.jobid/src/cjobid.c org.glite.lb-utils.jobid/src/strmd5.c org.glite.lb-utils.server-bones/.cvsignore org.glite.lb-utils.server-bones/LICENSE org.glite.lb-utils.server-bones/build.xml org.glite.lb-utils.server-bones/project/build.number org.glite.lb-utils.server-bones/project/build.properties org.glite.lb-utils.server-bones/project/configure.properties.xml org.glite.lb-utils.server-bones/project/properties.xml org.glite.lb-utils.server-bones/project/version.properties org.glite.lb-utils.trio/.cvsignore org.glite.lb-utils.trio/LICENSE org.glite.lb-utils.trio/Makefile org.glite.lb-utils.trio/build.xml org.glite.lb-utils.trio/interface/escape.h org.glite.lb-utils.trio/interface/trio.h org.glite.lb-utils.trio/project/build.number org.glite.lb-utils.trio/project/build.properties org.glite.lb-utils.trio/project/configure.properties.xml org.glite.lb-utils.trio/project/properties.xml org.glite.lb-utils.trio/project/version.properties org.glite.lb-utils.trio/src/escape.c org.glite.lb-utils.trio/src/strio.c org.glite.lb-utils.trio/src/strio.h org.glite.lb-utils.trio/src/trio.c org.glite.lb-utils.trio/src/triop.h org.glite.lb-utils.trio/test/trio_test.cpp org.glite.lb-utils/.cvsignore org.glite.lb-utils/LICENSE org.glite.lb-utils/build.xml org.glite.lb-utils/project/build.number org.glite.lb-utils/project/build.properties org.glite.lb-utils/project/dependencies.properties org.glite.lb-utils/project/glite.lb-utils.csf.xml org.glite.lb-utils/project/properties.xml org.glite.lb-utils/project/taskdefs.xml org.glite.lb-utils/project/version.properties org.glite.security.gsoap-plugin/LICENSE org.glite.security.gsoap-plugin/Makefile org.glite.security.gsoap-plugin/build.xml org.glite.security.gsoap-plugin/examples/calc.h.S org.glite.security.gsoap-plugin/examples/wscalc_clt_ex.c org.glite.security.gsoap-plugin/examples/wscalc_srv_ex.c org.glite.security.gsoap-plugin/examples/wscalc_srv_ex2.c org.glite.security.gsoap-plugin/interface/glite_gscompat.h org.glite.security.gsoap-plugin/interface/glite_gsplugin.h org.glite.security.gsoap-plugin/interface/glite_gss.h org.glite.security.gsoap-plugin/project/build.number org.glite.security.gsoap-plugin/project/build.properties org.glite.security.gsoap-plugin/project/configure.properties.xml org.glite.security.gsoap-plugin/project/properties.xml org.glite.security.gsoap-plugin/project/tar_exclude org.glite.security.gsoap-plugin/project/version.properties org.glite.security.gsoap-plugin/src/glite_gsplugin.c org.glite.security.gsoap-plugin/src/glite_gss.c org.glite.security.gsoap-plugin/src/stdsoap2_2.6.2.c org.glite.security.gsoap-plugin/src/stdsoap2_2.6.2.h org.glite.security.gsoap-plugin/src/stdsoap2_2.7.0.c org.glite.security.gsoap-plugin/src/stdsoap2_2.7.0.h org.glite.security.gsoap-plugin/src/stdsoap2_2.7.0f.c org.glite.security.gsoap-plugin/src/stdsoap2_2.7.0f.h org.glite.security.gsoap-plugin/src/stdsoap2_2.7.6b.c org.glite.security.gsoap-plugin/src/stdsoap2_2.7.6b.h org.glite.security.gsoap-plugin/src/stdsoap2_2.7.9b.c org.glite.security.gsoap-plugin/src/stdsoap2_2.7.9b.h org.glite.security.gsoap-plugin/src/stdsoap2_2.7.9d.c org.glite.security.gsoap-plugin/src/stdsoap2_2.7.9d.h org.glite.security.gsoap-plugin/test/test_gss.cpp org.glite.security.gss/LICENSE org.glite.security.gss/Makefile org.glite.security.gss/interface/glite_gss.h org.glite.security.gss/src/glite_gss.c org.glite.security.gss/test/test_gss.cpp org.glite.security.proxyrenewal/.cvsignore org.glite.security.proxyrenewal/LICENSE org.glite.security.proxyrenewal/Makefile org.glite.security.proxyrenewal/build.xml org.glite.security.proxyrenewal/config/startup org.glite.security.proxyrenewal/examples/renew_core.c org.glite.security.proxyrenewal/interface/renewal.h org.glite.security.proxyrenewal/interface/renewal_core.h org.glite.security.proxyrenewal/project/build.number org.glite.security.proxyrenewal/project/build.properties org.glite.security.proxyrenewal/project/configure.properties.xml org.glite.security.proxyrenewal/project/properties.xml org.glite.security.proxyrenewal/project/tar_exclude org.glite.security.proxyrenewal/project/taskdefs.xml org.glite.security.proxyrenewal/project/version.properties org.glite.security.proxyrenewal/src/api.c org.glite.security.proxyrenewal/src/client.c org.glite.security.proxyrenewal/src/commands.c org.glite.security.proxyrenewal/src/common.c org.glite.security.proxyrenewal/src/renew.c org.glite.security.proxyrenewal/src/renewal_core.c org.glite.security.proxyrenewal/src/renewal_locl.h org.glite.security.proxyrenewal/src/renewd.c org.glite.security.proxyrenewal/src/renewd_locl.h org.glite.security.proxyrenewal/src/voms.c org.glite.testsuites.ctb/LB/Makefile org.glite.testsuites.ctb/LB/Readme.txt org.glite.testsuites.ctb/LB/Readme2.txt org.glite.testsuites.ctb/LB/lb-l1.sh org.glite.testsuites.ctb/LB/lb-l2.sh org.glite.testsuites.ctb/LB/lb-l2ILR.sh org.glite.testsuites.ctb/LB/lb-l2Stat.sh org.glite.testsuites.ctb/LB/testSocket.c org.glite.wms-utils.exception/.cvsignore org.glite.wms-utils.exception/LICENSE org.glite.wms-utils.exception/Makefile.am org.glite.wms-utils.exception/bootstrap org.glite.wms-utils.exception/build.xml org.glite.wms-utils.exception/configure.ac org.glite.wms-utils.exception/interface/Makefile.am org.glite.wms-utils.exception/interface/glite/wmsutils/exception/Exception.h org.glite.wms-utils.exception/interface/glite/wmsutils/exception/exception_codes.h org.glite.wms-utils.exception/project/build.number org.glite.wms-utils.exception/project/build.properties org.glite.wms-utils.exception/project/configure.properties.xml org.glite.wms-utils.exception/project/properties.xml org.glite.wms-utils.exception/project/version.properties org.glite.wms-utils.exception/src/Exception.cpp org.glite.wms-utils.exception/src/Makefile.am org.glite.wms-utils.exception/test/Makefile.am org.glite.wms-utils.exception/test/exception_cu_main.cpp org.glite.wms-utils.exception/test/exception_cu_suite.cpp org.glite.wms-utils.exception/test/exception_cu_suite.h org.glite.wms-utils.jobid/.cvsignore org.glite.wms-utils.jobid/LICENSE org.glite.wms-utils.jobid/Makefile.am org.glite.wms-utils.jobid/bootstrap org.glite.wms-utils.jobid/build.xml org.glite.wms-utils.jobid/configure.ac org.glite.wms-utils.jobid/examples/Makefile.am org.glite.wms-utils.jobid/examples/testjobid.c org.glite.wms-utils.jobid/interface/Makefile.am org.glite.wms-utils.jobid/interface/glite/wmsutils/jobid/JobId.h org.glite.wms-utils.jobid/interface/glite/wmsutils/jobid/JobIdExceptions.h org.glite.wms-utils.jobid/interface/glite/wmsutils/jobid/cjobid.h org.glite.wms-utils.jobid/interface/glite/wmsutils/jobid/manipulation.h org.glite.wms-utils.jobid/project/build.number org.glite.wms-utils.jobid/project/build.properties org.glite.wms-utils.jobid/project/configure.properties.xml org.glite.wms-utils.jobid/project/properties.xml org.glite.wms-utils.jobid/project/version.properties org.glite.wms-utils.jobid/src/Makefile.am org.glite.wms-utils.jobid/src/jobid/JobId.cpp org.glite.wms-utils.jobid/src/jobid/JobIdExceptions.cpp org.glite.wms-utils.jobid/src/jobid/Makefile.am org.glite.wms-utils.jobid/src/jobid/cjobid.c org.glite.wms-utils.jobid/src/jobid/manipulation.cpp org.glite.wms-utils.jobid/src/jobid/strmd5.c org.glite.wms-utils.jobid/src/jobid/strmd5.h org.glite.wms-utils.jobid/test/Makefile.am org.glite.wms-utils.jobid/test/jobid_cu_main.cpp org.glite.wms-utils.jobid/test/jobid_cu_suite.cpp org.glite.wms-utils.jobid/test/jobid_cu_suite.h org.glite.wms-utils.jobid/test/manipulation_cu_main.cpp org.glite.wms-utils.jobid/test/manipulation_cu_suite.cpp org.glite.wms-utils.jobid/test/manipulation_cu_suite.h org.glite.yaim.lb/.cvsignore org.glite.yaim.lb/Makefile org.glite.yaim.lb/config/functions/config_glite_lb org.glite.yaim.lb/config/node-info.d/glite-lb org.glite.yaim.myproxy/.cvsignore org.glite.yaim.myproxy/Makefile org.glite.yaim.myproxy/config/functions/config_proxy_server org.glite.yaim.myproxy/config/node-info.d/glite-px org.gridsite.core/.cvsignore org.gridsite.core/CHANGES org.gridsite.core/INSTALL org.gridsite.core/LICENSE org.gridsite.core/README org.gridsite.core/VERSION org.gridsite.core/build.xml org.gridsite.core/doc/README.htcp-bin org.gridsite.core/doc/build-apache2.sh org.gridsite.core/doc/delegation-1.1.0.wsdl org.gridsite.core/doc/findproxyfile.1 org.gridsite.core/doc/fuse.spec org.gridsite.core/doc/gridsite-delegation.8 org.gridsite.core/doc/gsexec.8 org.gridsite.core/doc/gsoap-devel.spec org.gridsite.core/doc/htcp.1 org.gridsite.core/doc/htfind.1 org.gridsite.core/doc/htll.1 org.gridsite.core/doc/htls.1 org.gridsite.core/doc/htmkdir.1 org.gridsite.core/doc/htmv.1 org.gridsite.core/doc/htping.1 org.gridsite.core/doc/htproxydestroy.1 org.gridsite.core/doc/htproxyinfo.1 org.gridsite.core/doc/htproxyput.1 org.gridsite.core/doc/htproxyrenew.1 org.gridsite.core/doc/htproxytime.1 org.gridsite.core/doc/htproxyunixtime.1 org.gridsite.core/doc/htrm.1 org.gridsite.core/doc/httpd-fileserver.conf org.gridsite.core/doc/httpd-webserver.conf org.gridsite.core/doc/index.html org.gridsite.core/doc/mod_gridsite.8 org.gridsite.core/doc/slashgrid.8 org.gridsite.core/doc/urlencode.1 org.gridsite.core/interface/gridsite-gacl.h org.gridsite.core/interface/gridsite.h org.gridsite.core/project/build.number org.gridsite.core/project/build.properties org.gridsite.core/project/configure.properties.xml org.gridsite.core/project/dependencies.properties org.gridsite.core/project/gridsite.core.csf.xml org.gridsite.core/project/properties.xml org.gridsite.core/project/taskdefs.xml org.gridsite.core/project/version.properties org.gridsite.core/src/Doxyfile org.gridsite.core/src/Makefile org.gridsite.core/src/delegation.h org.gridsite.core/src/doxygen.css org.gridsite.core/src/doxyheader.html org.gridsite.core/src/findproxyfile.c org.gridsite.core/src/gaclexample.c org.gridsite.core/src/gridsite-copy.c org.gridsite.core/src/grst-delegation.c org.gridsite.core/src/grst_admin.h org.gridsite.core/src/grst_admin_file.c org.gridsite.core/src/grst_admin_gacl.c org.gridsite.core/src/grst_admin_main.c org.gridsite.core/src/grst_asn1.c org.gridsite.core/src/grst_err.c org.gridsite.core/src/grst_gacl.c org.gridsite.core/src/grst_htcp.c org.gridsite.core/src/grst_http.c org.gridsite.core/src/grst_x509.c org.gridsite.core/src/grst_xacml.c org.gridsite.core/src/gsexec.c org.gridsite.core/src/gsexec.h org.gridsite.core/src/htcp.c org.gridsite.core/src/htproxyput.c org.gridsite.core/src/make-gridsite-spec org.gridsite.core/src/mod_gridsite.c org.gridsite.core/src/mod_gridsite_example.c org.gridsite.core/src/mod_ssl-private.h org.gridsite.core/src/roffit org.gridsite.core/src/showx509exts.c org.gridsite.core/src/slashgrid.c org.gridsite.core/src/slashgrid.init org.gridsite.core/src/urlencode.c org.gridsite.core/src/xacmlexample.c --- org.glite.deployment.jpis/build.xml | 94 - .../config/scripts/glite-jpis-config.py | 492 - .../config/templates/glite-jpis.cfg.xml | 92 - org.glite.deployment.jpis/project/build.number | 2 - org.glite.deployment.jpis/project/build.properties | 0 .../project/glite-jp.sdf.xml.template | 117 - .../project/glite-jpis.sdf.xml.template | 117 - org.glite.deployment.jpis/project/lxscript-rpm.xsl | 336 - org.glite.deployment.jpis/project/lxscript-tgz.xsl | 62 - org.glite.deployment.jpis/project/properties.xml | 63 - .../project/quattor-template.xsl | 64 - .../project/version.properties | 4 - org.glite.deployment.jpps/build.xml | 94 - .../config/scripts/glite-jpps-config.py | 500 - .../config/templates/glite-jpps.cfg.xml | 93 - org.glite.deployment.jpps/project/build.number | 2 - org.glite.deployment.jpps/project/build.properties | 0 .../project/glite-jpps.sdf.xml.template | 127 - org.glite.deployment.jpps/project/lxscript-rpm.xsl | 336 - org.glite.deployment.jpps/project/lxscript-tgz.xsl | 62 - org.glite.deployment.jpps/project/properties.xml | 63 - .../project/quattor-template.xsl | 64 - .../project/version.properties | 4 - org.glite.deployment.lb/.cvsignore | 1 - org.glite.deployment.lb/CHANGELOG | 40 - org.glite.deployment.lb/LICENSE | 69 - org.glite.deployment.lb/build.xml | 110 - .../config/scripts/glite-lb-config.py | 574 - .../config/templates/glite-lb.cfg.xml | 73 - .../doc/release_notes/release_notes.doc | Bin 192512 -> 0 bytes .../doc/release_notes/release_notes.html | 2712 ---- .../doc/release_notes/release_notes.pdf | Bin 157326 -> 0 bytes org.glite.deployment.lb/project/.cvsignore | 1 - org.glite.deployment.lb/project/build.number | 2 - org.glite.deployment.lb/project/build.properties | 0 .../project/glite-lb.sdf.xml.template | 157 - org.glite.deployment.lb/project/lxscript-rpm.xsl | 336 - org.glite.deployment.lb/project/lxscript-tgz.xsl | 62 - org.glite.deployment.lb/project/properties.xml | 73 - .../project/quattor-template.xsl | 64 - org.glite.deployment.lb/project/version.properties | 4 - org.glite.jp.client/.cvsignore | 1 - org.glite.jp.client/Makefile | 175 - org.glite.jp.client/build.xml | 86 - org.glite.jp.client/config/startup | 112 - org.glite.jp.client/doc/README.jpimporter | 115 - org.glite.jp.client/examples/glite-jp-importer.sh | 92 - org.glite.jp.client/examples/jpps_upload_files.c | 81 - org.glite.jp.client/interface/jp_client.h | 31 - org.glite.jp.client/interface/jpcl_ctx_int.h | 23 - org.glite.jp.client/interface/jpimporter.h | 18 - org.glite.jp.client/project/build.number | 2 - org.glite.jp.client/project/build.properties | 0 .../project/configure.properties.xml | 44 - org.glite.jp.client/project/properties.xml | 44 - org.glite.jp.client/project/tar_exclude | 10 - org.glite.jp.client/project/version.properties | 2 - org.glite.jp.client/src/jpcl_ctx.c | 76 - org.glite.jp.client/src/jpimp_lib.c | 115 - org.glite.jp.client/src/jpimporter.c | 811 -- org.glite.jp.client/src/jptype_map.h | 18 - org.glite.jp.client/src/typemap.dat | 3 - org.glite.jp.common/.cvsignore | 1 - org.glite.jp.common/Makefile | 117 - org.glite.jp.common/build.xml | 97 - org.glite.jp.common/interface/attr.h | 32 - org.glite.jp.common/interface/context.h | 26 - org.glite.jp.common/interface/escape.h | 60 - org.glite.jp.common/interface/known_attr.h | 41 - org.glite.jp.common/interface/strmd5.h | 40 - org.glite.jp.common/interface/trio.h | 187 - org.glite.jp.common/interface/type_plugin.h | 74 - org.glite.jp.common/interface/types.h | 66 - org.glite.jp.common/project/build.number | 2 - org.glite.jp.common/project/build.properties | 0 .../project/configure.properties.xml | 62 - org.glite.jp.common/project/properties.xml | 52 - org.glite.jp.common/project/tar_exclude | 10 - org.glite.jp.common/project/version.properties | 2 - org.glite.jp.common/src/attr.c | 289 - org.glite.jp.common/src/context.c | 144 - org.glite.jp.common/src/escape.c | 225 - org.glite.jp.common/src/strio.c | 581 - org.glite.jp.common/src/strio.h | 227 - org.glite.jp.common/src/strmd5.c | 147 - org.glite.jp.common/src/trio.c | 5708 -------- org.glite.jp.common/src/triop.h | 138 - org.glite.jp.common/test/base64_test.cpp | 75 - org.glite.jp.common/test/type_test.cpp | 184 - org.glite.jp.index/.cvsignore | 1 - org.glite.jp.index/Makefile | 185 - org.glite.jp.index/build.xml | 98 - org.glite.jp.index/config/dbsetup.sh | 14 - .../config/glite-jp-index-dbsetup.sql | 69 - org.glite.jp.index/config/glite-jpis-config.xml | 49 - .../config/glite-jpis-test-config.xml | 34 - org.glite.jp.index/config/startup | 135 - org.glite.jp.index/doc/README | 116 - org.glite.jp.index/doc/client_conf.xsd | 84 - org.glite.jp.index/doc/glite-jp-indexd.sgml | 278 - org.glite.jp.index/doc/glite-jpis-client.sgml | 193 - org.glite.jp.index/doc/server_conf.xsd | 97 - org.glite.jp.index/examples/jpis-client.c | 521 - org.glite.jp.index/examples/jpis-db-internal.c | 134 - org.glite.jp.index/examples/jpis-test.c | 240 - org.glite.jp.index/examples/query-tests/authz.out | 14 - .../examples/query-tests/complex_query.in | 36 - .../examples/query-tests/complex_query.out | 36 - org.glite.jp.index/examples/query-tests/dump1.sql | 594 - .../examples/query-tests/exists_query.in | 17 - .../examples/query-tests/exists_query.out | 28 - .../examples/query-tests/jobid_query.in | 19 - .../examples/query-tests/jobid_query.out | 23 - .../examples/query-tests/origin_query.in | 20 - .../examples/query-tests/origin_query.out | 23 - .../examples/query-tests/run-test.sh | 296 - .../examples/query-tests/simple_query.in | 19 - .../examples/query-tests/simple_query.out | 23 - .../examples/query-tests/within_query.in | 19 - .../examples/query-tests/within_query.out | 28 - .../interface/JobProvenanceISClient.xsd | 28 - org.glite.jp.index/project/build.number | 2 - org.glite.jp.index/project/build.properties | 0 .../project/configure.properties.xml | 74 - org.glite.jp.index/project/properties.xml | 52 - org.glite.jp.index/project/tar_exclude | 10 - org.glite.jp.index/project/version.properties | 2 - org.glite.jp.index/src/bones_server.c | 467 - org.glite.jp.index/src/common.c | 53 - org.glite.jp.index/src/common.h | 15 - org.glite.jp.index/src/common_server.c | 75 - org.glite.jp.index/src/common_server.h | 6 - org.glite.jp.index/src/conf.c | 286 - org.glite.jp.index/src/conf.h | 62 - org.glite.jp.index/src/context.c | 37 - org.glite.jp.index/src/context.h | 32 - org.glite.jp.index/src/db_ops.c | 686 - org.glite.jp.index/src/db_ops.h | 44 - org.glite.jp.index/src/simple_server.c | 39 - org.glite.jp.index/src/soap_ops.c | 700 - org.glite.jp.index/src/soap_ps_calls.c | 148 - org.glite.jp.index/src/soap_ps_calls.h | 11 - org.glite.jp.index/src/typemap.dat | 4 - org.glite.jp.index/src/ws_is_typeref.c | 214 - org.glite.jp.index/src/ws_is_typeref.h | 13 - org.glite.jp.index/src/ws_ps_typeref.c | 144 - org.glite.jp.index/src/ws_ps_typeref.h | 10 - org.glite.jp.index/src/ws_typemap.h | 28 - org.glite.jp.primary/.cvsignore | 1 - org.glite.jp.primary/Makefile | 236 - org.glite.jp.primary/build.xml | 116 - .../config/glite-jp-primary-dbsetup.sh | 14 - .../config/glite-jp-primary-dbsetup.sql | 63 - org.glite.jp.primary/config/startup | 161 - org.glite.jp.primary/doc/README.install | 59 - org.glite.jp.primary/examples/README.test | 94 - org.glite.jp.primary/examples/dag-deps.c | 177 - org.glite.jp.primary/examples/job_template | 14 - org.glite.jp.primary/examples/jpps-test.c | 278 - org.glite.jp.primary/examples/jpps_store_test | 86 - org.glite.jp.primary/examples/sample_job_aborted | 9 - org.glite.jp.primary/examples/sample_job_cleared | 15 - .../examples/sample_job_tagged_done | 15 - org.glite.jp.primary/examples/sample_job_waiting | 8 - org.glite.jp.primary/interface/file_plugin.h | 86 - org.glite.jp.primary/project/build.number | 2 - org.glite.jp.primary/project/build.properties | 0 .../project/configure.properties.xml | 85 - org.glite.jp.primary/project/properties.xml | 51 - org.glite.jp.primary/project/tar_exclude | 10 - org.glite.jp.primary/project/version.properties | 2 - org.glite.jp.primary/src/attrs.c | 188 - org.glite.jp.primary/src/attrs.h | 2 - org.glite.jp.primary/src/authz.c | 85 - org.glite.jp.primary/src/authz.h | 18 - org.glite.jp.primary/src/backend.h | 163 - org.glite.jp.primary/src/bones_server.c | 422 - org.glite.jp.primary/src/builtin_plugins.h | 8 - org.glite.jp.primary/src/classad_plugin.c | 210 - org.glite.jp.primary/src/db.h | 83 - org.glite.jp.primary/src/feed.c | 712 - org.glite.jp.primary/src/feed.h | 37 - org.glite.jp.primary/src/file_plugin.c | 125 - org.glite.jp.primary/src/ftpd_auth.c | 196 - org.glite.jp.primary/src/is_client.c | 263 - org.glite.jp.primary/src/is_client.h | 4 - org.glite.jp.primary/src/jptype_map.h | 34 - org.glite.jp.primary/src/mk_soap_switch.pl | 63 - org.glite.jp.primary/src/mysql.c | 265 - org.glite.jp.primary/src/new_ftp_backend.c | 2427 ---- org.glite.jp.primary/src/sandbox_plugin.c | 261 - org.glite.jp.primary/src/simple_server.c | 59 - org.glite.jp.primary/src/soap_ops.c | 514 - org.glite.jp.primary/src/soap_util.c | 74 - org.glite.jp.primary/src/tags.c | 456 - org.glite.jp.primary/src/tags.h | 10 - org.glite.jp.primary/src/typemap.dat | 3 - org.glite.jp.primary/src/utils.c | 129 - org.glite.jp.primary/src/utils.h | 28 - org.glite.jp.server-common/Makefile | 115 - org.glite.jp.server-common/build.xml | 101 - org.glite.jp.server-common/examples/db-test-int.c | 112 - org.glite.jp.server-common/interface/db.h | 255 - org.glite.jp.server-common/project/build.number | 2 - .../project/configure.properties.xml | 72 - org.glite.jp.server-common/project/properties.xml | 56 - org.glite.jp.server-common/project/tar_exclude | 10 - .../project/version.properties | 2 - org.glite.jp.server-common/src/db.c | 673 - org.glite.jp.ws-interface/.cvsignore | 2 - org.glite.jp.ws-interface/LICENSE | 69 - org.glite.jp.ws-interface/Makefile | 77 - org.glite.jp.ws-interface/build.xml | 120 - org.glite.jp.ws-interface/project/build.number | 2 - org.glite.jp.ws-interface/project/build.properties | 0 .../project/configure.properties.xml | 54 - org.glite.jp.ws-interface/project/properties.xml | 73 - org.glite.jp.ws-interface/project/tar_exclude | 0 .../project/version.properties | 2 - org.glite.jp.ws-interface/src/JobProvenanceIS.xml | 104 - org.glite.jp.ws-interface/src/JobProvenancePS.xml | 105 - .../src/JobProvenanceTypes.xml | 125 - org.glite.jp.ws-interface/src/doc.xml | 2 - org.glite.jp.ws-interface/src/jpdev.sh | 20 - org.glite.jp.ws-interface/src/jpdev.xml.sh | 22 - org.glite.jp.ws-interface/src/puke-schema.xsl | 161 - org.glite.jp.ws-interface/src/puke-ug.xsl | 170 - org.glite.jp.ws-interface/src/puke-wsdl.xsl | 292 - org.glite.jp.ws-interface/src/ws_fault.c | 143 - org.glite.jp/.cvsignore | 1 - org.glite.jp/build.xml | 410 - org.glite.jp/doc/EGEElogoNEW.jpg | Bin 15787 -> 0 bytes org.glite.jp/doc/copyright.tex | 24 - org.glite.jp/doc/egee.cls | 522 - org.glite.jp/doc/frontmatter.tex | 40 - org.glite.jp/doc/install-guide/EGEElogoNEW.jpg | Bin 15787 -> 0 bytes .../install-guide/LB-JP-interaction-details.cdr | Bin 42198 -> 0 bytes .../install-guide/LB-JP-interaction-details.eps | 6931 --------- .../install-guide/LB-JP-interaction-details.pdf | Bin 72334 -> 0 bytes .../doc/install-guide/LB-JP-interaction-guide.tex | 105 - org.glite.jp/doc/install-guide/README | 6 - org.glite.jp/doc/install-guide/copyright.tex | 24 - org.glite.jp/doc/install-guide/egee.cls | 529 - .../install-guide/glite_installation_guide_JP.doc | Bin 349184 -> 0 bytes .../install-guide/glite_installation_guide_LB.doc | Bin 174080 -> 0 bytes org.glite.jp/doc/install-guide/isi.png | Bin 83835 -> 0 bytes org.glite.jp/doc/install-guide/lb-jp-drawing.pdf | Bin 167722 -> 0 bytes org.glite.jp/doc/isi.png | Bin 83835 -> 0 bytes org.glite.jp/doc/testplan.tex | 589 - org.glite.jp/doc/users-quide/EGEElogoNEW.jpg | Bin 15787 -> 0 bytes org.glite.jp/doc/users-quide/JP-interactions.cdr | Bin 49340 -> 0 bytes org.glite.jp/doc/users-quide/JP-interactions.eps | 8885 ------------ org.glite.jp/doc/users-quide/JP-interactions.pdf | Bin 86036 -> 0 bytes org.glite.jp/doc/users-quide/JP-query.cdr | Bin 37774 -> 0 bytes org.glite.jp/doc/users-quide/JP-query.eps | 4202 ------ org.glite.jp/doc/users-quide/JP-query.pdf | Bin 41756 -> 0 bytes org.glite.jp/doc/users-quide/JP-users-guide.tex | 320 - org.glite.jp/doc/users-quide/README | 6 - org.glite.jp/doc/users-quide/copyright.tex | 24 - org.glite.jp/doc/users-quide/egee.cls | 529 - org.glite.jp/doc/users-quide/glite-jpis-client.tex | 93 - org.glite.jp/doc/users-quide/isi.png | Bin 83835 -> 0 bytes org.glite.jp/doc/users-quide/jpws.tex | 587 - org.glite.jp/project/build.number | 2 - org.glite.jp/project/build.properties | 2 - org.glite.jp/project/dependencies.properties | 16 - org.glite.jp/project/glite.jp.csf.xml | 322 - org.glite.jp/project/properties.xml | 47 - org.glite.jp/project/run-workspace | 10 - org.glite.jp/project/taskdefs.xml | 24 - org.glite.jp/project/version.properties | 2 - org.glite.lb-utils.context/.cvsignore | 2 - org.glite.lb-utils.context/LICENSE | 69 - org.glite.lb-utils.context/build.xml | 122 - org.glite.lb-utils.context/project/build.number | 1 - .../project/build.properties | 0 .../project/configure.properties.xml | 37 - org.glite.lb-utils.context/project/properties.xml | 73 - .../project/version.properties | 2 - org.glite.lb-utils.db/.cvsignore | 5 - org.glite.lb-utils.db/LICENSE | 69 - org.glite.lb-utils.db/Makefile | 128 - org.glite.lb-utils.db/build.xml | 126 - org.glite.lb-utils.db/examples/db_expire.c | 115 - org.glite.lb-utils.db/examples/db_test.c | 196 - org.glite.lb-utils.db/interface/db.h | 336 - org.glite.lb-utils.db/project/build.number | 1 - org.glite.lb-utils.db/project/build.properties | 3 - .../project/configure.properties.xml | 81 - org.glite.lb-utils.db/project/properties.xml | 73 - org.glite.lb-utils.db/project/tar_exclude | 10 - org.glite.lb-utils.db/project/version.properties | 2 - org.glite.lb-utils.db/src/db.c | 1038 -- org.glite.lb-utils.jobid/.cvsignore | 2 - org.glite.lb-utils.jobid/LICENSE | 69 - org.glite.lb-utils.jobid/Makefile | 98 - org.glite.lb-utils.jobid/build.xml | 129 - org.glite.lb-utils.jobid/interface/Exception.h | 138 - org.glite.lb-utils.jobid/interface/JobId.h | 126 - .../interface/JobIdExceptions.h | 80 - org.glite.lb-utils.jobid/interface/cjobid.h | 109 - org.glite.lb-utils.jobid/interface/strmd5.h | 30 - org.glite.lb-utils.jobid/project/build.number | 1 - org.glite.lb-utils.jobid/project/build.properties | 4 - .../project/configure.properties.xml | 63 - org.glite.lb-utils.jobid/project/properties.xml | 73 - org.glite.lb-utils.jobid/project/tar_exclude | 10 - .../project/version.properties | 2 - org.glite.lb-utils.jobid/src/cjobid.c | 260 - org.glite.lb-utils.jobid/src/strmd5.c | 122 - org.glite.lb-utils.server-bones/.cvsignore | 2 - org.glite.lb-utils.server-bones/LICENSE | 69 - org.glite.lb-utils.server-bones/build.xml | 122 - .../project/build.number | 1 - .../project/build.properties | 0 .../project/configure.properties.xml | 37 - .../project/properties.xml | 73 - .../project/version.properties | 2 - org.glite.lb-utils.trio/.cvsignore | 2 - org.glite.lb-utils.trio/LICENSE | 69 - org.glite.lb-utils.trio/Makefile | 114 - org.glite.lb-utils.trio/build.xml | 126 - org.glite.lb-utils.trio/interface/escape.h | 59 - org.glite.lb-utils.trio/interface/trio.h | 187 - org.glite.lb-utils.trio/project/build.number | 1 - org.glite.lb-utils.trio/project/build.properties | 4 - .../project/configure.properties.xml | 59 - org.glite.lb-utils.trio/project/properties.xml | 73 - org.glite.lb-utils.trio/project/version.properties | 2 - org.glite.lb-utils.trio/src/escape.c | 224 - org.glite.lb-utils.trio/src/strio.c | 581 - org.glite.lb-utils.trio/src/strio.h | 227 - org.glite.lb-utils.trio/src/trio.c | 5706 -------- org.glite.lb-utils.trio/src/triop.h | 138 - org.glite.lb-utils.trio/test/trio_test.cpp | 85 - org.glite.lb-utils/.cvsignore | 1 - org.glite.lb-utils/LICENSE | 69 - org.glite.lb-utils/build.xml | 303 - org.glite.lb-utils/project/build.number | 1 - org.glite.lb-utils/project/build.properties | 0 org.glite.lb-utils/project/dependencies.properties | 13 - org.glite.lb-utils/project/glite.lb-utils.csf.xml | 218 - org.glite.lb-utils/project/properties.xml | 64 - org.glite.lb-utils/project/taskdefs.xml | 38 - org.glite.lb-utils/project/version.properties | 2 - org.glite.security.gsoap-plugin/LICENSE | 69 - org.glite.security.gsoap-plugin/Makefile | 305 - org.glite.security.gsoap-plugin/build.xml | 128 - org.glite.security.gsoap-plugin/examples/calc.h.S | 13 - .../examples/wscalc_clt_ex.c | 48 - .../examples/wscalc_srv_ex.c | 105 - .../examples/wscalc_srv_ex2.c | 131 - .../interface/glite_gscompat.h | 78 - .../interface/glite_gsplugin.h | 46 - .../interface/glite_gss.h | 117 - .../project/build.number | 1 - .../project/build.properties | 0 .../project/configure.properties.xml | 54 - .../project/properties.xml | 55 - .../project/tar_exclude | 10 - .../project/version.properties | 2 - .../src/glite_gsplugin.c | 479 - org.glite.security.gsoap-plugin/src/glite_gss.c | 1058 -- .../src/stdsoap2_2.6.2.c | 11020 -------------- .../src/stdsoap2_2.6.2.h | 1647 --- .../src/stdsoap2_2.7.0.c | 11692 --------------- .../src/stdsoap2_2.7.0.h | 1764 --- .../src/stdsoap2_2.7.0f.c | 12026 ---------------- .../src/stdsoap2_2.7.0f.h | 1885 --- .../src/stdsoap2_2.7.6b.c | 13101 ----------------- .../src/stdsoap2_2.7.6b.h | 2053 --- .../src/stdsoap2_2.7.9b.c | 14172 ------------------ .../src/stdsoap2_2.7.9b.h | 2166 --- .../src/stdsoap2_2.7.9d.c | 14414 ------------------- .../src/stdsoap2_2.7.9d.h | 2184 --- org.glite.security.gsoap-plugin/test/test_gss.cpp | 198 - org.glite.security.gss/LICENSE | 69 - org.glite.security.gss/Makefile | 153 - org.glite.security.gss/interface/glite_gss.h | 117 - org.glite.security.gss/src/glite_gss.c | 1057 -- org.glite.security.gss/test/test_gss.cpp | 198 - org.glite.security.proxyrenewal/.cvsignore | 1 - org.glite.security.proxyrenewal/LICENSE | 69 - org.glite.security.proxyrenewal/Makefile | 167 - org.glite.security.proxyrenewal/build.xml | 128 - org.glite.security.proxyrenewal/config/startup | 80 - .../examples/renew_core.c | 63 - .../interface/renewal.h | 175 - .../interface/renewal_core.h | 62 - .../project/build.number | 1 - .../project/build.properties | 0 .../project/configure.properties.xml | 60 - .../project/properties.xml | 62 - .../project/tar_exclude | 10 - .../project/taskdefs.xml | 4 - .../project/version.properties | 2 - org.glite.security.proxyrenewal/src/api.c | 550 - org.glite.security.proxyrenewal/src/client.c | 111 - org.glite.security.proxyrenewal/src/commands.c | 1256 -- org.glite.security.proxyrenewal/src/common.c | 322 - org.glite.security.proxyrenewal/src/renew.c | 256 - org.glite.security.proxyrenewal/src/renewal_core.c | 283 - org.glite.security.proxyrenewal/src/renewal_locl.h | 148 - org.glite.security.proxyrenewal/src/renewd.c | 609 - org.glite.security.proxyrenewal/src/renewd_locl.h | 82 - org.glite.security.proxyrenewal/src/voms.c | 356 - org.glite.testsuites.ctb/LB/Makefile | 14 - org.glite.testsuites.ctb/LB/Readme.txt | 53 - org.glite.testsuites.ctb/LB/Readme2.txt | 158 - org.glite.testsuites.ctb/LB/lb-l1.sh | 145 - org.glite.testsuites.ctb/LB/lb-l2.sh | 264 - org.glite.testsuites.ctb/LB/lb-l2ILR.sh | 262 - org.glite.testsuites.ctb/LB/lb-l2Stat.sh | 223 - org.glite.testsuites.ctb/LB/testSocket.c | 58 - org.glite.wms-utils.exception/.cvsignore | 1 - org.glite.wms-utils.exception/LICENSE | 69 - org.glite.wms-utils.exception/Makefile.am | 67 - org.glite.wms-utils.exception/bootstrap | 9 - org.glite.wms-utils.exception/build.xml | 104 - org.glite.wms-utils.exception/configure.ac | 127 - .../interface/Makefile.am | 14 - .../interface/glite/wmsutils/exception/Exception.h | 138 - .../glite/wmsutils/exception/exception_codes.h | 41 - org.glite.wms-utils.exception/project/build.number | 2 - .../project/build.properties | 2 - .../project/configure.properties.xml | 9 - .../project/properties.xml | 83 - .../project/version.properties | 2 - org.glite.wms-utils.exception/src/Exception.cpp | 124 - org.glite.wms-utils.exception/src/Makefile.am | 17 - org.glite.wms-utils.exception/test/Makefile.am | 33 - .../test/exception_cu_main.cpp | 33 - .../test/exception_cu_suite.cpp | 56 - .../test/exception_cu_suite.h | 29 - org.glite.wms-utils.jobid/.cvsignore | 2 - org.glite.wms-utils.jobid/LICENSE | 69 - org.glite.wms-utils.jobid/Makefile.am | 69 - org.glite.wms-utils.jobid/bootstrap | 9 - org.glite.wms-utils.jobid/build.xml | 104 - org.glite.wms-utils.jobid/configure.ac | 147 - org.glite.wms-utils.jobid/examples/Makefile.am | 28 - org.glite.wms-utils.jobid/examples/testjobid.c | 33 - org.glite.wms-utils.jobid/interface/Makefile.am | 16 - .../interface/glite/wmsutils/jobid/JobId.h | 126 - .../glite/wmsutils/jobid/JobIdExceptions.h | 80 - .../interface/glite/wmsutils/jobid/cjobid.h | 109 - .../interface/glite/wmsutils/jobid/manipulation.h | 24 - org.glite.wms-utils.jobid/project/build.number | 2 - org.glite.wms-utils.jobid/project/build.properties | 2 - .../project/configure.properties.xml | 9 - org.glite.wms-utils.jobid/project/properties.xml | 86 - .../project/version.properties | 2 - org.glite.wms-utils.jobid/src/Makefile.am | 12 - org.glite.wms-utils.jobid/src/jobid/JobId.cpp | 183 - .../src/jobid/JobIdExceptions.cpp | 58 - org.glite.wms-utils.jobid/src/jobid/Makefile.am | 30 - org.glite.wms-utils.jobid/src/jobid/cjobid.c | 258 - .../src/jobid/manipulation.cpp | 180 - org.glite.wms-utils.jobid/src/jobid/strmd5.c | 118 - org.glite.wms-utils.jobid/src/jobid/strmd5.h | 28 - org.glite.wms-utils.jobid/test/Makefile.am | 48 - org.glite.wms-utils.jobid/test/jobid_cu_main.cpp | 33 - org.glite.wms-utils.jobid/test/jobid_cu_suite.cpp | 102 - org.glite.wms-utils.jobid/test/jobid_cu_suite.h | 34 - .../test/manipulation_cu_main.cpp | 33 - .../test/manipulation_cu_suite.cpp | 34 - .../test/manipulation_cu_suite.h | 29 - org.glite.yaim.lb/.cvsignore | 1 - org.glite.yaim.lb/Makefile | 76 - org.glite.yaim.lb/config/functions/config_glite_lb | 116 - org.glite.yaim.lb/config/node-info.d/glite-lb | 14 - org.glite.yaim.myproxy/.cvsignore | 1 - org.glite.yaim.myproxy/Makefile | 76 - .../config/functions/config_proxy_server | 24 - org.glite.yaim.myproxy/config/node-info.d/glite-px | 0 org.gridsite.core/.cvsignore | 1 - org.gridsite.core/CHANGES | 366 - org.gridsite.core/INSTALL | 37 - org.gridsite.core/LICENSE | 47 - org.gridsite.core/README | 6 - org.gridsite.core/VERSION | 4 - org.gridsite.core/build.xml | 294 - org.gridsite.core/doc/README.htcp-bin | 13 - org.gridsite.core/doc/build-apache2.sh | 79 - org.gridsite.core/doc/delegation-1.1.0.wsdl | 459 - org.gridsite.core/doc/findproxyfile.1 | 63 - org.gridsite.core/doc/fuse.spec | 139 - org.gridsite.core/doc/gridsite-delegation.8 | 19 - org.gridsite.core/doc/gsexec.8 | 134 - org.gridsite.core/doc/gsoap-devel.spec | 52 - org.gridsite.core/doc/htcp.1 | 200 - org.gridsite.core/doc/htfind.1 | 1 - org.gridsite.core/doc/htll.1 | 1 - org.gridsite.core/doc/htls.1 | 1 - org.gridsite.core/doc/htmkdir.1 | 1 - org.gridsite.core/doc/htmv.1 | 1 - org.gridsite.core/doc/htping.1 | 1 - org.gridsite.core/doc/htproxydestroy.1 | 1 - org.gridsite.core/doc/htproxyinfo.1 | 1 - org.gridsite.core/doc/htproxyput.1 | 121 - org.gridsite.core/doc/htproxyrenew.1 | 1 - org.gridsite.core/doc/htproxytime.1 | 1 - org.gridsite.core/doc/htproxyunixtime.1 | 1 - org.gridsite.core/doc/htrm.1 | 1 - org.gridsite.core/doc/httpd-fileserver.conf | 155 - org.gridsite.core/doc/httpd-webserver.conf | 226 - org.gridsite.core/doc/index.html | 82 - org.gridsite.core/doc/mod_gridsite.8 | 325 - org.gridsite.core/doc/slashgrid.8 | 67 - org.gridsite.core/doc/urlencode.1 | 43 - org.gridsite.core/interface/gridsite-gacl.h | 188 - org.gridsite.core/interface/gridsite.h | 403 - org.gridsite.core/project/build.number | 2 - org.gridsite.core/project/build.properties | 0 org.gridsite.core/project/configure.properties.xml | 9 - org.gridsite.core/project/dependencies.properties | 9 - org.gridsite.core/project/gridsite.core.csf.xml | 221 - org.gridsite.core/project/properties.xml | 53 - org.gridsite.core/project/taskdefs.xml | 31 - org.gridsite.core/project/version.properties | 2 - org.gridsite.core/src/Doxyfile | 993 -- org.gridsite.core/src/Makefile | 508 - org.gridsite.core/src/delegation.h | 86 - org.gridsite.core/src/doxygen.css | 49 - org.gridsite.core/src/doxyheader.html | 1 - org.gridsite.core/src/findproxyfile.c | 122 - org.gridsite.core/src/gaclexample.c | 145 - org.gridsite.core/src/gridsite-copy.c | 168 - org.gridsite.core/src/grst-delegation.c | 347 - org.gridsite.core/src/grst_admin.h | 57 - org.gridsite.core/src/grst_admin_file.c | 1573 -- org.gridsite.core/src/grst_admin_gacl.c | 983 -- org.gridsite.core/src/grst_admin_main.c | 378 - org.gridsite.core/src/grst_asn1.c | 506 - org.gridsite.core/src/grst_err.c | 41 - org.gridsite.core/src/grst_gacl.c | 1398 -- org.gridsite.core/src/grst_htcp.c | 311 - org.gridsite.core/src/grst_http.c | 443 - org.gridsite.core/src/grst_x509.c | 2128 --- org.gridsite.core/src/grst_xacml.c | 566 - org.gridsite.core/src/gsexec.c | 1104 -- org.gridsite.core/src/gsexec.h | 126 - org.gridsite.core/src/htcp.c | 2032 --- org.gridsite.core/src/htproxyput.c | 622 - org.gridsite.core/src/make-gridsite-spec | 302 - org.gridsite.core/src/mod_gridsite.c | 3738 ----- org.gridsite.core/src/mod_gridsite_example.c | 262 - org.gridsite.core/src/mod_ssl-private.h | 106 - org.gridsite.core/src/roffit | 370 - org.gridsite.core/src/showx509exts.c | 133 - org.gridsite.core/src/slashgrid.c | 2492 ---- org.gridsite.core/src/slashgrid.init | 67 - org.gridsite.core/src/urlencode.c | 73 - org.gridsite.core/src/xacmlexample.c | 148 - 554 files changed, 200542 deletions(-) delete mode 100644 org.glite.deployment.jpis/build.xml delete mode 100755 org.glite.deployment.jpis/config/scripts/glite-jpis-config.py delete mode 100644 org.glite.deployment.jpis/config/templates/glite-jpis.cfg.xml delete mode 100644 org.glite.deployment.jpis/project/build.number delete mode 100644 org.glite.deployment.jpis/project/build.properties delete mode 100644 org.glite.deployment.jpis/project/glite-jp.sdf.xml.template delete mode 100644 org.glite.deployment.jpis/project/glite-jpis.sdf.xml.template delete mode 100644 org.glite.deployment.jpis/project/lxscript-rpm.xsl delete mode 100644 org.glite.deployment.jpis/project/lxscript-tgz.xsl delete mode 100644 org.glite.deployment.jpis/project/properties.xml delete mode 100644 org.glite.deployment.jpis/project/quattor-template.xsl delete mode 100644 org.glite.deployment.jpis/project/version.properties delete mode 100644 org.glite.deployment.jpps/build.xml delete mode 100755 org.glite.deployment.jpps/config/scripts/glite-jpps-config.py delete mode 100644 org.glite.deployment.jpps/config/templates/glite-jpps.cfg.xml delete mode 100644 org.glite.deployment.jpps/project/build.number delete mode 100644 org.glite.deployment.jpps/project/build.properties delete mode 100644 org.glite.deployment.jpps/project/glite-jpps.sdf.xml.template delete mode 100644 org.glite.deployment.jpps/project/lxscript-rpm.xsl delete mode 100644 org.glite.deployment.jpps/project/lxscript-tgz.xsl delete mode 100644 org.glite.deployment.jpps/project/properties.xml delete mode 100644 org.glite.deployment.jpps/project/quattor-template.xsl delete mode 100644 org.glite.deployment.jpps/project/version.properties delete mode 100644 org.glite.deployment.lb/.cvsignore delete mode 100644 org.glite.deployment.lb/CHANGELOG delete mode 100644 org.glite.deployment.lb/LICENSE delete mode 100644 org.glite.deployment.lb/build.xml delete mode 100644 org.glite.deployment.lb/config/scripts/glite-lb-config.py delete mode 100644 org.glite.deployment.lb/config/templates/glite-lb.cfg.xml delete mode 100644 org.glite.deployment.lb/doc/release_notes/release_notes.doc delete mode 100644 org.glite.deployment.lb/doc/release_notes/release_notes.html delete mode 100644 org.glite.deployment.lb/doc/release_notes/release_notes.pdf delete mode 100644 org.glite.deployment.lb/project/.cvsignore delete mode 100644 org.glite.deployment.lb/project/build.number delete mode 100644 org.glite.deployment.lb/project/build.properties delete mode 100644 org.glite.deployment.lb/project/glite-lb.sdf.xml.template delete mode 100644 org.glite.deployment.lb/project/lxscript-rpm.xsl delete mode 100644 org.glite.deployment.lb/project/lxscript-tgz.xsl delete mode 100644 org.glite.deployment.lb/project/properties.xml delete mode 100644 org.glite.deployment.lb/project/quattor-template.xsl delete mode 100644 org.glite.deployment.lb/project/version.properties delete mode 100644 org.glite.jp.client/.cvsignore delete mode 100644 org.glite.jp.client/Makefile delete mode 100755 org.glite.jp.client/build.xml delete mode 100755 org.glite.jp.client/config/startup delete mode 100644 org.glite.jp.client/doc/README.jpimporter delete mode 100644 org.glite.jp.client/examples/glite-jp-importer.sh delete mode 100644 org.glite.jp.client/examples/jpps_upload_files.c delete mode 100644 org.glite.jp.client/interface/jp_client.h delete mode 100644 org.glite.jp.client/interface/jpcl_ctx_int.h delete mode 100644 org.glite.jp.client/interface/jpimporter.h delete mode 100644 org.glite.jp.client/project/build.number delete mode 100644 org.glite.jp.client/project/build.properties delete mode 100644 org.glite.jp.client/project/configure.properties.xml delete mode 100755 org.glite.jp.client/project/properties.xml delete mode 100644 org.glite.jp.client/project/tar_exclude delete mode 100644 org.glite.jp.client/project/version.properties delete mode 100644 org.glite.jp.client/src/jpcl_ctx.c delete mode 100644 org.glite.jp.client/src/jpimp_lib.c delete mode 100644 org.glite.jp.client/src/jpimporter.c delete mode 100644 org.glite.jp.client/src/jptype_map.h delete mode 100644 org.glite.jp.client/src/typemap.dat delete mode 100644 org.glite.jp.common/.cvsignore delete mode 100644 org.glite.jp.common/Makefile delete mode 100755 org.glite.jp.common/build.xml delete mode 100644 org.glite.jp.common/interface/attr.h delete mode 100644 org.glite.jp.common/interface/context.h delete mode 100644 org.glite.jp.common/interface/escape.h delete mode 100644 org.glite.jp.common/interface/known_attr.h delete mode 100755 org.glite.jp.common/interface/strmd5.h delete mode 100644 org.glite.jp.common/interface/trio.h delete mode 100644 org.glite.jp.common/interface/type_plugin.h delete mode 100644 org.glite.jp.common/interface/types.h delete mode 100644 org.glite.jp.common/project/build.number delete mode 100644 org.glite.jp.common/project/build.properties delete mode 100644 org.glite.jp.common/project/configure.properties.xml delete mode 100755 org.glite.jp.common/project/properties.xml delete mode 100644 org.glite.jp.common/project/tar_exclude delete mode 100644 org.glite.jp.common/project/version.properties delete mode 100644 org.glite.jp.common/src/attr.c delete mode 100644 org.glite.jp.common/src/context.c delete mode 100644 org.glite.jp.common/src/escape.c delete mode 100644 org.glite.jp.common/src/strio.c delete mode 100644 org.glite.jp.common/src/strio.h delete mode 100755 org.glite.jp.common/src/strmd5.c delete mode 100644 org.glite.jp.common/src/trio.c delete mode 100644 org.glite.jp.common/src/triop.h delete mode 100644 org.glite.jp.common/test/base64_test.cpp delete mode 100644 org.glite.jp.common/test/type_test.cpp delete mode 100644 org.glite.jp.index/.cvsignore delete mode 100644 org.glite.jp.index/Makefile delete mode 100755 org.glite.jp.index/build.xml delete mode 100755 org.glite.jp.index/config/dbsetup.sh delete mode 100644 org.glite.jp.index/config/glite-jp-index-dbsetup.sql delete mode 100644 org.glite.jp.index/config/glite-jpis-config.xml delete mode 100644 org.glite.jp.index/config/glite-jpis-test-config.xml delete mode 100755 org.glite.jp.index/config/startup delete mode 100644 org.glite.jp.index/doc/README delete mode 100644 org.glite.jp.index/doc/client_conf.xsd delete mode 100644 org.glite.jp.index/doc/glite-jp-indexd.sgml delete mode 100644 org.glite.jp.index/doc/glite-jpis-client.sgml delete mode 100644 org.glite.jp.index/doc/server_conf.xsd delete mode 100644 org.glite.jp.index/examples/jpis-client.c delete mode 100644 org.glite.jp.index/examples/jpis-db-internal.c delete mode 100644 org.glite.jp.index/examples/jpis-test.c delete mode 100644 org.glite.jp.index/examples/query-tests/authz.out delete mode 100644 org.glite.jp.index/examples/query-tests/complex_query.in delete mode 100644 org.glite.jp.index/examples/query-tests/complex_query.out delete mode 100644 org.glite.jp.index/examples/query-tests/dump1.sql delete mode 100644 org.glite.jp.index/examples/query-tests/exists_query.in delete mode 100644 org.glite.jp.index/examples/query-tests/exists_query.out delete mode 100644 org.glite.jp.index/examples/query-tests/jobid_query.in delete mode 100644 org.glite.jp.index/examples/query-tests/jobid_query.out delete mode 100644 org.glite.jp.index/examples/query-tests/origin_query.in delete mode 100644 org.glite.jp.index/examples/query-tests/origin_query.out delete mode 100755 org.glite.jp.index/examples/query-tests/run-test.sh delete mode 100644 org.glite.jp.index/examples/query-tests/simple_query.in delete mode 100644 org.glite.jp.index/examples/query-tests/simple_query.out delete mode 100644 org.glite.jp.index/examples/query-tests/within_query.in delete mode 100644 org.glite.jp.index/examples/query-tests/within_query.out delete mode 100644 org.glite.jp.index/interface/JobProvenanceISClient.xsd delete mode 100644 org.glite.jp.index/project/build.number delete mode 100644 org.glite.jp.index/project/build.properties delete mode 100644 org.glite.jp.index/project/configure.properties.xml delete mode 100755 org.glite.jp.index/project/properties.xml delete mode 100644 org.glite.jp.index/project/tar_exclude delete mode 100644 org.glite.jp.index/project/version.properties delete mode 100644 org.glite.jp.index/src/bones_server.c delete mode 100644 org.glite.jp.index/src/common.c delete mode 100644 org.glite.jp.index/src/common.h delete mode 100644 org.glite.jp.index/src/common_server.c delete mode 100644 org.glite.jp.index/src/common_server.h delete mode 100644 org.glite.jp.index/src/conf.c delete mode 100644 org.glite.jp.index/src/conf.h delete mode 100644 org.glite.jp.index/src/context.c delete mode 100644 org.glite.jp.index/src/context.h delete mode 100644 org.glite.jp.index/src/db_ops.c delete mode 100644 org.glite.jp.index/src/db_ops.h delete mode 100644 org.glite.jp.index/src/simple_server.c delete mode 100644 org.glite.jp.index/src/soap_ops.c delete mode 100644 org.glite.jp.index/src/soap_ps_calls.c delete mode 100644 org.glite.jp.index/src/soap_ps_calls.h delete mode 100644 org.glite.jp.index/src/typemap.dat delete mode 100644 org.glite.jp.index/src/ws_is_typeref.c delete mode 100644 org.glite.jp.index/src/ws_is_typeref.h delete mode 100644 org.glite.jp.index/src/ws_ps_typeref.c delete mode 100644 org.glite.jp.index/src/ws_ps_typeref.h delete mode 100644 org.glite.jp.index/src/ws_typemap.h delete mode 100644 org.glite.jp.primary/.cvsignore delete mode 100644 org.glite.jp.primary/Makefile delete mode 100755 org.glite.jp.primary/build.xml delete mode 100644 org.glite.jp.primary/config/glite-jp-primary-dbsetup.sh delete mode 100644 org.glite.jp.primary/config/glite-jp-primary-dbsetup.sql delete mode 100644 org.glite.jp.primary/config/startup delete mode 100644 org.glite.jp.primary/doc/README.install delete mode 100644 org.glite.jp.primary/examples/README.test delete mode 100644 org.glite.jp.primary/examples/dag-deps.c delete mode 100644 org.glite.jp.primary/examples/job_template delete mode 100644 org.glite.jp.primary/examples/jpps-test.c delete mode 100755 org.glite.jp.primary/examples/jpps_store_test delete mode 100644 org.glite.jp.primary/examples/sample_job_aborted delete mode 100644 org.glite.jp.primary/examples/sample_job_cleared delete mode 100644 org.glite.jp.primary/examples/sample_job_tagged_done delete mode 100644 org.glite.jp.primary/examples/sample_job_waiting delete mode 100644 org.glite.jp.primary/interface/file_plugin.h delete mode 100644 org.glite.jp.primary/project/build.number delete mode 100644 org.glite.jp.primary/project/build.properties delete mode 100644 org.glite.jp.primary/project/configure.properties.xml delete mode 100755 org.glite.jp.primary/project/properties.xml delete mode 100644 org.glite.jp.primary/project/tar_exclude delete mode 100644 org.glite.jp.primary/project/version.properties delete mode 100644 org.glite.jp.primary/src/attrs.c delete mode 100644 org.glite.jp.primary/src/attrs.h delete mode 100644 org.glite.jp.primary/src/authz.c delete mode 100644 org.glite.jp.primary/src/authz.h delete mode 100644 org.glite.jp.primary/src/backend.h delete mode 100644 org.glite.jp.primary/src/bones_server.c delete mode 100644 org.glite.jp.primary/src/builtin_plugins.h delete mode 100644 org.glite.jp.primary/src/classad_plugin.c delete mode 100644 org.glite.jp.primary/src/db.h delete mode 100644 org.glite.jp.primary/src/feed.c delete mode 100644 org.glite.jp.primary/src/feed.h delete mode 100644 org.glite.jp.primary/src/file_plugin.c delete mode 100644 org.glite.jp.primary/src/ftpd_auth.c delete mode 100644 org.glite.jp.primary/src/is_client.c delete mode 100644 org.glite.jp.primary/src/is_client.h delete mode 100644 org.glite.jp.primary/src/jptype_map.h delete mode 100755 org.glite.jp.primary/src/mk_soap_switch.pl delete mode 100644 org.glite.jp.primary/src/mysql.c delete mode 100644 org.glite.jp.primary/src/new_ftp_backend.c delete mode 100644 org.glite.jp.primary/src/sandbox_plugin.c delete mode 100644 org.glite.jp.primary/src/simple_server.c delete mode 100644 org.glite.jp.primary/src/soap_ops.c delete mode 100644 org.glite.jp.primary/src/soap_util.c delete mode 100644 org.glite.jp.primary/src/tags.c delete mode 100644 org.glite.jp.primary/src/tags.h delete mode 100644 org.glite.jp.primary/src/typemap.dat delete mode 100644 org.glite.jp.primary/src/utils.c delete mode 100644 org.glite.jp.primary/src/utils.h delete mode 100644 org.glite.jp.server-common/Makefile delete mode 100755 org.glite.jp.server-common/build.xml delete mode 100644 org.glite.jp.server-common/examples/db-test-int.c delete mode 100644 org.glite.jp.server-common/interface/db.h delete mode 100644 org.glite.jp.server-common/project/build.number delete mode 100644 org.glite.jp.server-common/project/configure.properties.xml delete mode 100755 org.glite.jp.server-common/project/properties.xml delete mode 100644 org.glite.jp.server-common/project/tar_exclude delete mode 100644 org.glite.jp.server-common/project/version.properties delete mode 100644 org.glite.jp.server-common/src/db.c delete mode 100755 org.glite.jp.ws-interface/.cvsignore delete mode 100755 org.glite.jp.ws-interface/LICENSE delete mode 100644 org.glite.jp.ws-interface/Makefile delete mode 100644 org.glite.jp.ws-interface/build.xml delete mode 100644 org.glite.jp.ws-interface/project/build.number delete mode 100755 org.glite.jp.ws-interface/project/build.properties delete mode 100644 org.glite.jp.ws-interface/project/configure.properties.xml delete mode 100644 org.glite.jp.ws-interface/project/properties.xml delete mode 100644 org.glite.jp.ws-interface/project/tar_exclude delete mode 100755 org.glite.jp.ws-interface/project/version.properties delete mode 100644 org.glite.jp.ws-interface/src/JobProvenanceIS.xml delete mode 100644 org.glite.jp.ws-interface/src/JobProvenancePS.xml delete mode 100644 org.glite.jp.ws-interface/src/JobProvenanceTypes.xml delete mode 100644 org.glite.jp.ws-interface/src/doc.xml delete mode 100755 org.glite.jp.ws-interface/src/jpdev.sh delete mode 100644 org.glite.jp.ws-interface/src/jpdev.xml.sh delete mode 100644 org.glite.jp.ws-interface/src/puke-schema.xsl delete mode 100644 org.glite.jp.ws-interface/src/puke-ug.xsl delete mode 100644 org.glite.jp.ws-interface/src/puke-wsdl.xsl delete mode 100644 org.glite.jp.ws-interface/src/ws_fault.c delete mode 100644 org.glite.jp/.cvsignore delete mode 100644 org.glite.jp/build.xml delete mode 100644 org.glite.jp/doc/EGEElogoNEW.jpg delete mode 100644 org.glite.jp/doc/copyright.tex delete mode 100644 org.glite.jp/doc/egee.cls delete mode 100644 org.glite.jp/doc/frontmatter.tex delete mode 100644 org.glite.jp/doc/install-guide/EGEElogoNEW.jpg delete mode 100755 org.glite.jp/doc/install-guide/LB-JP-interaction-details.cdr delete mode 100755 org.glite.jp/doc/install-guide/LB-JP-interaction-details.eps delete mode 100644 org.glite.jp/doc/install-guide/LB-JP-interaction-details.pdf delete mode 100644 org.glite.jp/doc/install-guide/LB-JP-interaction-guide.tex delete mode 100644 org.glite.jp/doc/install-guide/README delete mode 100644 org.glite.jp/doc/install-guide/copyright.tex delete mode 100644 org.glite.jp/doc/install-guide/egee.cls delete mode 100755 org.glite.jp/doc/install-guide/glite_installation_guide_JP.doc delete mode 100755 org.glite.jp/doc/install-guide/glite_installation_guide_LB.doc delete mode 100644 org.glite.jp/doc/install-guide/isi.png delete mode 100755 org.glite.jp/doc/install-guide/lb-jp-drawing.pdf delete mode 100644 org.glite.jp/doc/isi.png delete mode 100644 org.glite.jp/doc/testplan.tex delete mode 100644 org.glite.jp/doc/users-quide/EGEElogoNEW.jpg delete mode 100755 org.glite.jp/doc/users-quide/JP-interactions.cdr delete mode 100755 org.glite.jp/doc/users-quide/JP-interactions.eps delete mode 100644 org.glite.jp/doc/users-quide/JP-interactions.pdf delete mode 100755 org.glite.jp/doc/users-quide/JP-query.cdr delete mode 100755 org.glite.jp/doc/users-quide/JP-query.eps delete mode 100644 org.glite.jp/doc/users-quide/JP-query.pdf delete mode 100644 org.glite.jp/doc/users-quide/JP-users-guide.tex delete mode 100644 org.glite.jp/doc/users-quide/README delete mode 100644 org.glite.jp/doc/users-quide/copyright.tex delete mode 100644 org.glite.jp/doc/users-quide/egee.cls delete mode 100644 org.glite.jp/doc/users-quide/glite-jpis-client.tex delete mode 100644 org.glite.jp/doc/users-quide/isi.png delete mode 100644 org.glite.jp/doc/users-quide/jpws.tex delete mode 100644 org.glite.jp/project/build.number delete mode 100644 org.glite.jp/project/build.properties delete mode 100644 org.glite.jp/project/dependencies.properties delete mode 100644 org.glite.jp/project/glite.jp.csf.xml delete mode 100755 org.glite.jp/project/properties.xml delete mode 100644 org.glite.jp/project/run-workspace delete mode 100755 org.glite.jp/project/taskdefs.xml delete mode 100644 org.glite.jp/project/version.properties delete mode 100755 org.glite.lb-utils.context/.cvsignore delete mode 100755 org.glite.lb-utils.context/LICENSE delete mode 100644 org.glite.lb-utils.context/build.xml delete mode 100644 org.glite.lb-utils.context/project/build.number delete mode 100755 org.glite.lb-utils.context/project/build.properties delete mode 100644 org.glite.lb-utils.context/project/configure.properties.xml delete mode 100644 org.glite.lb-utils.context/project/properties.xml delete mode 100755 org.glite.lb-utils.context/project/version.properties delete mode 100755 org.glite.lb-utils.db/.cvsignore delete mode 100755 org.glite.lb-utils.db/LICENSE delete mode 100644 org.glite.lb-utils.db/Makefile delete mode 100644 org.glite.lb-utils.db/build.xml delete mode 100644 org.glite.lb-utils.db/examples/db_expire.c delete mode 100644 org.glite.lb-utils.db/examples/db_test.c delete mode 100644 org.glite.lb-utils.db/interface/db.h delete mode 100644 org.glite.lb-utils.db/project/build.number delete mode 100755 org.glite.lb-utils.db/project/build.properties delete mode 100644 org.glite.lb-utils.db/project/configure.properties.xml delete mode 100644 org.glite.lb-utils.db/project/properties.xml delete mode 100644 org.glite.lb-utils.db/project/tar_exclude delete mode 100755 org.glite.lb-utils.db/project/version.properties delete mode 100644 org.glite.lb-utils.db/src/db.c delete mode 100755 org.glite.lb-utils.jobid/.cvsignore delete mode 100755 org.glite.lb-utils.jobid/LICENSE delete mode 100644 org.glite.lb-utils.jobid/Makefile delete mode 100644 org.glite.lb-utils.jobid/build.xml delete mode 100644 org.glite.lb-utils.jobid/interface/Exception.h delete mode 100644 org.glite.lb-utils.jobid/interface/JobId.h delete mode 100644 org.glite.lb-utils.jobid/interface/JobIdExceptions.h delete mode 100755 org.glite.lb-utils.jobid/interface/cjobid.h delete mode 100755 org.glite.lb-utils.jobid/interface/strmd5.h delete mode 100644 org.glite.lb-utils.jobid/project/build.number delete mode 100755 org.glite.lb-utils.jobid/project/build.properties delete mode 100644 org.glite.lb-utils.jobid/project/configure.properties.xml delete mode 100644 org.glite.lb-utils.jobid/project/properties.xml delete mode 100644 org.glite.lb-utils.jobid/project/tar_exclude delete mode 100755 org.glite.lb-utils.jobid/project/version.properties delete mode 100755 org.glite.lb-utils.jobid/src/cjobid.c delete mode 100755 org.glite.lb-utils.jobid/src/strmd5.c delete mode 100755 org.glite.lb-utils.server-bones/.cvsignore delete mode 100755 org.glite.lb-utils.server-bones/LICENSE delete mode 100644 org.glite.lb-utils.server-bones/build.xml delete mode 100644 org.glite.lb-utils.server-bones/project/build.number delete mode 100755 org.glite.lb-utils.server-bones/project/build.properties delete mode 100644 org.glite.lb-utils.server-bones/project/configure.properties.xml delete mode 100644 org.glite.lb-utils.server-bones/project/properties.xml delete mode 100755 org.glite.lb-utils.server-bones/project/version.properties delete mode 100755 org.glite.lb-utils.trio/.cvsignore delete mode 100755 org.glite.lb-utils.trio/LICENSE delete mode 100644 org.glite.lb-utils.trio/Makefile delete mode 100644 org.glite.lb-utils.trio/build.xml delete mode 100644 org.glite.lb-utils.trio/interface/escape.h delete mode 100644 org.glite.lb-utils.trio/interface/trio.h delete mode 100644 org.glite.lb-utils.trio/project/build.number delete mode 100755 org.glite.lb-utils.trio/project/build.properties delete mode 100644 org.glite.lb-utils.trio/project/configure.properties.xml delete mode 100644 org.glite.lb-utils.trio/project/properties.xml delete mode 100755 org.glite.lb-utils.trio/project/version.properties delete mode 100644 org.glite.lb-utils.trio/src/escape.c delete mode 100644 org.glite.lb-utils.trio/src/strio.c delete mode 100644 org.glite.lb-utils.trio/src/strio.h delete mode 100644 org.glite.lb-utils.trio/src/trio.c delete mode 100644 org.glite.lb-utils.trio/src/triop.h delete mode 100644 org.glite.lb-utils.trio/test/trio_test.cpp delete mode 100644 org.glite.lb-utils/.cvsignore delete mode 100755 org.glite.lb-utils/LICENSE delete mode 100644 org.glite.lb-utils/build.xml delete mode 100644 org.glite.lb-utils/project/build.number delete mode 100755 org.glite.lb-utils/project/build.properties delete mode 100644 org.glite.lb-utils/project/dependencies.properties delete mode 100644 org.glite.lb-utils/project/glite.lb-utils.csf.xml delete mode 100644 org.glite.lb-utils/project/properties.xml delete mode 100644 org.glite.lb-utils/project/taskdefs.xml delete mode 100755 org.glite.lb-utils/project/version.properties delete mode 100644 org.glite.security.gsoap-plugin/LICENSE delete mode 100644 org.glite.security.gsoap-plugin/Makefile delete mode 100755 org.glite.security.gsoap-plugin/build.xml delete mode 100644 org.glite.security.gsoap-plugin/examples/calc.h.S delete mode 100644 org.glite.security.gsoap-plugin/examples/wscalc_clt_ex.c delete mode 100644 org.glite.security.gsoap-plugin/examples/wscalc_srv_ex.c delete mode 100644 org.glite.security.gsoap-plugin/examples/wscalc_srv_ex2.c delete mode 100644 org.glite.security.gsoap-plugin/interface/glite_gscompat.h delete mode 100644 org.glite.security.gsoap-plugin/interface/glite_gsplugin.h delete mode 100644 org.glite.security.gsoap-plugin/interface/glite_gss.h delete mode 100644 org.glite.security.gsoap-plugin/project/build.number delete mode 100644 org.glite.security.gsoap-plugin/project/build.properties delete mode 100644 org.glite.security.gsoap-plugin/project/configure.properties.xml delete mode 100755 org.glite.security.gsoap-plugin/project/properties.xml delete mode 100644 org.glite.security.gsoap-plugin/project/tar_exclude delete mode 100644 org.glite.security.gsoap-plugin/project/version.properties delete mode 100644 org.glite.security.gsoap-plugin/src/glite_gsplugin.c delete mode 100644 org.glite.security.gsoap-plugin/src/glite_gss.c delete mode 100644 org.glite.security.gsoap-plugin/src/stdsoap2_2.6.2.c delete mode 100644 org.glite.security.gsoap-plugin/src/stdsoap2_2.6.2.h delete mode 100644 org.glite.security.gsoap-plugin/src/stdsoap2_2.7.0.c delete mode 100644 org.glite.security.gsoap-plugin/src/stdsoap2_2.7.0.h delete mode 100644 org.glite.security.gsoap-plugin/src/stdsoap2_2.7.0f.c delete mode 100644 org.glite.security.gsoap-plugin/src/stdsoap2_2.7.0f.h delete mode 100644 org.glite.security.gsoap-plugin/src/stdsoap2_2.7.6b.c delete mode 100644 org.glite.security.gsoap-plugin/src/stdsoap2_2.7.6b.h delete mode 100644 org.glite.security.gsoap-plugin/src/stdsoap2_2.7.9b.c delete mode 100644 org.glite.security.gsoap-plugin/src/stdsoap2_2.7.9b.h delete mode 100644 org.glite.security.gsoap-plugin/src/stdsoap2_2.7.9d.c delete mode 100644 org.glite.security.gsoap-plugin/src/stdsoap2_2.7.9d.h delete mode 100644 org.glite.security.gsoap-plugin/test/test_gss.cpp delete mode 100644 org.glite.security.gss/LICENSE delete mode 100644 org.glite.security.gss/Makefile delete mode 100644 org.glite.security.gss/interface/glite_gss.h delete mode 100644 org.glite.security.gss/src/glite_gss.c delete mode 100644 org.glite.security.gss/test/test_gss.cpp delete mode 100644 org.glite.security.proxyrenewal/.cvsignore delete mode 100644 org.glite.security.proxyrenewal/LICENSE delete mode 100644 org.glite.security.proxyrenewal/Makefile delete mode 100755 org.glite.security.proxyrenewal/build.xml delete mode 100755 org.glite.security.proxyrenewal/config/startup delete mode 100644 org.glite.security.proxyrenewal/examples/renew_core.c delete mode 100644 org.glite.security.proxyrenewal/interface/renewal.h delete mode 100644 org.glite.security.proxyrenewal/interface/renewal_core.h delete mode 100644 org.glite.security.proxyrenewal/project/build.number delete mode 100644 org.glite.security.proxyrenewal/project/build.properties delete mode 100644 org.glite.security.proxyrenewal/project/configure.properties.xml delete mode 100755 org.glite.security.proxyrenewal/project/properties.xml delete mode 100644 org.glite.security.proxyrenewal/project/tar_exclude delete mode 100755 org.glite.security.proxyrenewal/project/taskdefs.xml delete mode 100644 org.glite.security.proxyrenewal/project/version.properties delete mode 100644 org.glite.security.proxyrenewal/src/api.c delete mode 100644 org.glite.security.proxyrenewal/src/client.c delete mode 100644 org.glite.security.proxyrenewal/src/commands.c delete mode 100644 org.glite.security.proxyrenewal/src/common.c delete mode 100644 org.glite.security.proxyrenewal/src/renew.c delete mode 100644 org.glite.security.proxyrenewal/src/renewal_core.c delete mode 100644 org.glite.security.proxyrenewal/src/renewal_locl.h delete mode 100644 org.glite.security.proxyrenewal/src/renewd.c delete mode 100644 org.glite.security.proxyrenewal/src/renewd_locl.h delete mode 100644 org.glite.security.proxyrenewal/src/voms.c delete mode 100644 org.glite.testsuites.ctb/LB/Makefile delete mode 100644 org.glite.testsuites.ctb/LB/Readme.txt delete mode 100644 org.glite.testsuites.ctb/LB/Readme2.txt delete mode 100755 org.glite.testsuites.ctb/LB/lb-l1.sh delete mode 100755 org.glite.testsuites.ctb/LB/lb-l2.sh delete mode 100755 org.glite.testsuites.ctb/LB/lb-l2ILR.sh delete mode 100755 org.glite.testsuites.ctb/LB/lb-l2Stat.sh delete mode 100755 org.glite.testsuites.ctb/LB/testSocket.c delete mode 100644 org.glite.wms-utils.exception/.cvsignore delete mode 100755 org.glite.wms-utils.exception/LICENSE delete mode 100755 org.glite.wms-utils.exception/Makefile.am delete mode 100755 org.glite.wms-utils.exception/bootstrap delete mode 100755 org.glite.wms-utils.exception/build.xml delete mode 100755 org.glite.wms-utils.exception/configure.ac delete mode 100755 org.glite.wms-utils.exception/interface/Makefile.am delete mode 100644 org.glite.wms-utils.exception/interface/glite/wmsutils/exception/Exception.h delete mode 100755 org.glite.wms-utils.exception/interface/glite/wmsutils/exception/exception_codes.h delete mode 100644 org.glite.wms-utils.exception/project/build.number delete mode 100755 org.glite.wms-utils.exception/project/build.properties delete mode 100644 org.glite.wms-utils.exception/project/configure.properties.xml delete mode 100755 org.glite.wms-utils.exception/project/properties.xml delete mode 100755 org.glite.wms-utils.exception/project/version.properties delete mode 100644 org.glite.wms-utils.exception/src/Exception.cpp delete mode 100755 org.glite.wms-utils.exception/src/Makefile.am delete mode 100755 org.glite.wms-utils.exception/test/Makefile.am delete mode 100644 org.glite.wms-utils.exception/test/exception_cu_main.cpp delete mode 100644 org.glite.wms-utils.exception/test/exception_cu_suite.cpp delete mode 100644 org.glite.wms-utils.exception/test/exception_cu_suite.h delete mode 100755 org.glite.wms-utils.jobid/.cvsignore delete mode 100755 org.glite.wms-utils.jobid/LICENSE delete mode 100755 org.glite.wms-utils.jobid/Makefile.am delete mode 100755 org.glite.wms-utils.jobid/bootstrap delete mode 100755 org.glite.wms-utils.jobid/build.xml delete mode 100755 org.glite.wms-utils.jobid/configure.ac delete mode 100755 org.glite.wms-utils.jobid/examples/Makefile.am delete mode 100755 org.glite.wms-utils.jobid/examples/testjobid.c delete mode 100755 org.glite.wms-utils.jobid/interface/Makefile.am delete mode 100755 org.glite.wms-utils.jobid/interface/glite/wmsutils/jobid/JobId.h delete mode 100755 org.glite.wms-utils.jobid/interface/glite/wmsutils/jobid/JobIdExceptions.h delete mode 100755 org.glite.wms-utils.jobid/interface/glite/wmsutils/jobid/cjobid.h delete mode 100755 org.glite.wms-utils.jobid/interface/glite/wmsutils/jobid/manipulation.h delete mode 100644 org.glite.wms-utils.jobid/project/build.number delete mode 100755 org.glite.wms-utils.jobid/project/build.properties delete mode 100644 org.glite.wms-utils.jobid/project/configure.properties.xml delete mode 100755 org.glite.wms-utils.jobid/project/properties.xml delete mode 100755 org.glite.wms-utils.jobid/project/version.properties delete mode 100755 org.glite.wms-utils.jobid/src/Makefile.am delete mode 100755 org.glite.wms-utils.jobid/src/jobid/JobId.cpp delete mode 100755 org.glite.wms-utils.jobid/src/jobid/JobIdExceptions.cpp delete mode 100755 org.glite.wms-utils.jobid/src/jobid/Makefile.am delete mode 100755 org.glite.wms-utils.jobid/src/jobid/cjobid.c delete mode 100755 org.glite.wms-utils.jobid/src/jobid/manipulation.cpp delete mode 100755 org.glite.wms-utils.jobid/src/jobid/strmd5.c delete mode 100755 org.glite.wms-utils.jobid/src/jobid/strmd5.h delete mode 100755 org.glite.wms-utils.jobid/test/Makefile.am delete mode 100644 org.glite.wms-utils.jobid/test/jobid_cu_main.cpp delete mode 100644 org.glite.wms-utils.jobid/test/jobid_cu_suite.cpp delete mode 100644 org.glite.wms-utils.jobid/test/jobid_cu_suite.h delete mode 100644 org.glite.wms-utils.jobid/test/manipulation_cu_main.cpp delete mode 100644 org.glite.wms-utils.jobid/test/manipulation_cu_suite.cpp delete mode 100644 org.glite.wms-utils.jobid/test/manipulation_cu_suite.h delete mode 100644 org.glite.yaim.lb/.cvsignore delete mode 100644 org.glite.yaim.lb/Makefile delete mode 100644 org.glite.yaim.lb/config/functions/config_glite_lb delete mode 100644 org.glite.yaim.lb/config/node-info.d/glite-lb delete mode 100644 org.glite.yaim.myproxy/.cvsignore delete mode 100644 org.glite.yaim.myproxy/Makefile delete mode 100644 org.glite.yaim.myproxy/config/functions/config_proxy_server delete mode 100644 org.glite.yaim.myproxy/config/node-info.d/glite-px delete mode 100644 org.gridsite.core/.cvsignore delete mode 100644 org.gridsite.core/CHANGES delete mode 100644 org.gridsite.core/INSTALL delete mode 100644 org.gridsite.core/LICENSE delete mode 100644 org.gridsite.core/README delete mode 100644 org.gridsite.core/VERSION delete mode 100644 org.gridsite.core/build.xml delete mode 100644 org.gridsite.core/doc/README.htcp-bin delete mode 100644 org.gridsite.core/doc/build-apache2.sh delete mode 100644 org.gridsite.core/doc/delegation-1.1.0.wsdl delete mode 100644 org.gridsite.core/doc/findproxyfile.1 delete mode 100644 org.gridsite.core/doc/fuse.spec delete mode 100644 org.gridsite.core/doc/gridsite-delegation.8 delete mode 100644 org.gridsite.core/doc/gsexec.8 delete mode 100644 org.gridsite.core/doc/gsoap-devel.spec delete mode 100644 org.gridsite.core/doc/htcp.1 delete mode 100644 org.gridsite.core/doc/htfind.1 delete mode 100644 org.gridsite.core/doc/htll.1 delete mode 100644 org.gridsite.core/doc/htls.1 delete mode 100644 org.gridsite.core/doc/htmkdir.1 delete mode 100644 org.gridsite.core/doc/htmv.1 delete mode 100644 org.gridsite.core/doc/htping.1 delete mode 100644 org.gridsite.core/doc/htproxydestroy.1 delete mode 100644 org.gridsite.core/doc/htproxyinfo.1 delete mode 100644 org.gridsite.core/doc/htproxyput.1 delete mode 100644 org.gridsite.core/doc/htproxyrenew.1 delete mode 100644 org.gridsite.core/doc/htproxytime.1 delete mode 100644 org.gridsite.core/doc/htproxyunixtime.1 delete mode 100644 org.gridsite.core/doc/htrm.1 delete mode 100644 org.gridsite.core/doc/httpd-fileserver.conf delete mode 100644 org.gridsite.core/doc/httpd-webserver.conf delete mode 100644 org.gridsite.core/doc/index.html delete mode 100644 org.gridsite.core/doc/mod_gridsite.8 delete mode 100644 org.gridsite.core/doc/slashgrid.8 delete mode 100644 org.gridsite.core/doc/urlencode.1 delete mode 100644 org.gridsite.core/interface/gridsite-gacl.h delete mode 100644 org.gridsite.core/interface/gridsite.h delete mode 100644 org.gridsite.core/project/build.number delete mode 100644 org.gridsite.core/project/build.properties delete mode 100644 org.gridsite.core/project/configure.properties.xml delete mode 100644 org.gridsite.core/project/dependencies.properties delete mode 100644 org.gridsite.core/project/gridsite.core.csf.xml delete mode 100644 org.gridsite.core/project/properties.xml delete mode 100644 org.gridsite.core/project/taskdefs.xml delete mode 100644 org.gridsite.core/project/version.properties delete mode 100644 org.gridsite.core/src/Doxyfile delete mode 100644 org.gridsite.core/src/Makefile delete mode 100644 org.gridsite.core/src/delegation.h delete mode 100644 org.gridsite.core/src/doxygen.css delete mode 100644 org.gridsite.core/src/doxyheader.html delete mode 100644 org.gridsite.core/src/findproxyfile.c delete mode 100644 org.gridsite.core/src/gaclexample.c delete mode 100644 org.gridsite.core/src/gridsite-copy.c delete mode 100644 org.gridsite.core/src/grst-delegation.c delete mode 100644 org.gridsite.core/src/grst_admin.h delete mode 100644 org.gridsite.core/src/grst_admin_file.c delete mode 100644 org.gridsite.core/src/grst_admin_gacl.c delete mode 100644 org.gridsite.core/src/grst_admin_main.c delete mode 100644 org.gridsite.core/src/grst_asn1.c delete mode 100644 org.gridsite.core/src/grst_err.c delete mode 100644 org.gridsite.core/src/grst_gacl.c delete mode 100644 org.gridsite.core/src/grst_htcp.c delete mode 100644 org.gridsite.core/src/grst_http.c delete mode 100644 org.gridsite.core/src/grst_x509.c delete mode 100644 org.gridsite.core/src/grst_xacml.c delete mode 100644 org.gridsite.core/src/gsexec.c delete mode 100644 org.gridsite.core/src/gsexec.h delete mode 100644 org.gridsite.core/src/htcp.c delete mode 100644 org.gridsite.core/src/htproxyput.c delete mode 100755 org.gridsite.core/src/make-gridsite-spec delete mode 100644 org.gridsite.core/src/mod_gridsite.c delete mode 100644 org.gridsite.core/src/mod_gridsite_example.c delete mode 100644 org.gridsite.core/src/mod_ssl-private.h delete mode 100755 org.gridsite.core/src/roffit delete mode 100644 org.gridsite.core/src/showx509exts.c delete mode 100644 org.gridsite.core/src/slashgrid.c delete mode 100755 org.gridsite.core/src/slashgrid.init delete mode 100644 org.gridsite.core/src/urlencode.c delete mode 100644 org.gridsite.core/src/xacmlexample.c diff --git a/org.glite.deployment.jpis/build.xml b/org.glite.deployment.jpis/build.xml deleted file mode 100644 index c2bf066..0000000 --- a/org.glite.deployment.jpis/build.xml +++ /dev/null @@ -1,94 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/org.glite.deployment.jpis/config/scripts/glite-jpis-config.py b/org.glite.deployment.jpis/config/scripts/glite-jpis-config.py deleted file mode 100755 index eb75155..0000000 --- a/org.glite.deployment.jpis/config/scripts/glite-jpis-config.py +++ /dev/null @@ -1,492 +0,0 @@ -#!/usr/bin/env python -################################################################################ -# -# Copyright (c) Members of the EGEE Collaboration. 2004. -# See http://eu-egee.org/partners/ for details on the copyright holders. -# For license conditions see the license file or http://eu-egee.org/license.html -# -################################################################################ -# glite-jpis-config v. 1.0.0 -# -# Post-installation script for configuring the gLite Job Provenance Servers -# Robert Harakaly < mmulac@cern.ch > -# -# Version info: $Id$ -# -# Usage: python glite-jpis-config [-c|-v|-h|--help] -# -c, --checkconf print configuration -# -v, --version print version -# -h,--help print usage info -# --configure configure the service -# --start start the service -# --stop stop the service -# --status show service status -# -# Return codes: 0 - Ok -# 1 - Configuration failed -# -################################################################################ - -import os,string,pwd -import sys, posix, getopt,time - -sys.path.append(".") -from gLiteInstallerLib import gLib -from gLiteInstallerLib import ConfigParams -import mysql as MySQL - -# Set global variables here -global params # all config values from the XML file - -class glite_jpis: - - def __init__(self): - self.mysql = MySQL.Mysql() - self.verbose = 0 - self.version = "1.0.0" - self.name = "glite-jpis" - self.friendly_name = "gLite Job Provenance Index Server" - - #------------------------------------------------------------------------------- - # Banner - #------------------------------------------------------------------------------- - - def banner(self): - - print "\nxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" - print "Configuring the %s" % self.friendly_name - print "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\n" - - #------------------------------------------------------------------------------- - # Copyright - #------------------------------------------------------------------------------- - - def copyright(self): - - print '\nCopyright (c) Members of the EGEE Collaboration. 2004' - print 'See http://eu-egee.org/partners/ for details on the copyright holders' - print 'For license conditions see the license file or http://eu-egee.org/license.html' - - #------------------------------------------------------------------------------- - # Version - #------------------------------------------------------------------------------- - - def showVersion(self): - - print '\n%s-config v. %s\n' % (self.name,self.version) - - #------------------------------------------------------------------------------- - # Usage - #------------------------------------------------------------------------------- - - def usage(self,msg = ""): - - if msg: - print "\n%s" % (msg) - - self.copyright() - self.showVersion() - - print """Usage: \n -Edit the configuration file %s.cfg.xml in -%s/etc.config/templates\n -save it as %s/etc/config/%s.cfg.xml -and run the script as follows\n -python %s-config [OPTION...]""" % (self.name, os.environ['GLITE_LOCATION'], \ - os.environ['GLITE_LOCATION'], self.name, self.name) - - print ' -c, --checkconf print the service configuration' - print ' -v, --version print the version of the configuration script' - print ' -h, --help print this usage information' - print ' --configure configure the service' - print ' --start start the service' - print ' --stop stop the service' - print ' --status check service status' - print '\n' - - #------------------------------------------------------------------------------- - # All the configuration code goes here - #------------------------------------------------------------------------------- - - def start(self): - - self.mysql.start() - time.sleep(5) - - if not os.path.exists('/tmp/mysql.sock'): - os.symlink('/var/lib/mysql/mysql.sock', '/tmp/mysql.sock') - - #------------------------------------------------------------------- - # Start Index Server - #------------------------------------------------------------------- - - pid = glib.getPID('indexd') - if pid != 0: - print 'The gLite JP Index Server service is already running. Restarting...' - os.system('%s/etc/init.d/glite-jp-indexd stop' % os.environ['GLITE_LOCATION']) - else: - print 'Starting the gLite JP Index Server service...' - - os.system('%s/etc/init.d/glite-jp-indexd start' % os.environ['GLITE_LOCATION']) - - pid = glib.getPID('indexd') - - if (pid != 0): - print "The gLite JP Index Server service has been started ", - glib.printOkMessage() - else: - glib.printErrorMessage("Could not start the gLite JP Index Server service") - glib.printErrorMessage("Please verify and re-run the script "), - glib.printFailedMessage() - return 1 - - return 0 - - def stop(self): - - error_level = 0 - - #------------------------------------------------------------------- - # Stop Index Server - #------------------------------------------------------------------- - - pid = glib.getPID('indexd') - if (pid != 0): - os.system('%s/etc/init.d/glite-jp-indexd stop' % os.environ['GLITE_LOCATION']) - - pid = glib.getPID('indexd') - if (pid != 0): - print 'Could not stop the JP Index Server service ', - glib.printFailedMessage() - error_level = 1 - else: - print 'JP Index Server service has been stopped ', - glib.printOkMessage() - - #------------------------------------------------------------------- - # MySQL - #------------------------------------------------------------------- - - self.mysql.stop() - - return error_level - - def status(self): - - error_level = 0 - - retval = os.system('%s/etc/init.d/glite-jp-indexd status' % os.environ['GLITE_LOCATION']) - if retval != 0: - error_level = 1 - - return error_level - - def configure(self): - - #-------------------------------------------------------- - # Installs the Security Utilities - #-------------------------------------------------------- - - if os.system("python %s/glite-security-utils-config.py --subservice" % glib.getScriptPath()): - print "\nConfiguring gLite Security Utilities ", - glib.printFailedMessage() - else: - print "\nConfiguring gLite Security Utilities ", - glib.printOkMessage() - - # Create the GLITE_USER if it doesn't exists - print "\nCreating/Verifying the GLITE_USER account %s" % os.environ['GLITE_USER'] - (uid,gid) = glib.get_user_info(os.environ['GLITE_USER']) - glib.check_dir(os.environ['GLITE_LOCATION_VAR'],0755, uid, gid) - jpis_cert_path = pwd.getpwnam(os.environ['GLITE_USER'])[5] + "/" + params['user.certificate.path'] - glib.check_dir(jpis_cert_path ,0755, uid, gid) - glib.printOkMessage() - - # Create all directories needed - glib.check_dir(os.environ['GLITE_CERT_DIR']) - print "\nVerify CA certificates directory ", - glib.printOkMessage() - - # Copy certificates - print "\nCopy host certificates to GLITE_USER home directory as service certificates", - os.system("cp %s %s %s/" % (params['host.certificate.file'], params['host.key.file'], jpis_cert_path)) - os.chown("%s/hostcert.pem" % jpis_cert_path, uid,gid) - os.chmod("%s/hostcert.pem" % jpis_cert_path, 0644) - os.chown("%s/hostkey.pem" % jpis_cert_path, uid,gid) - os.chmod("%s/hostkey.pem" % jpis_cert_path, 0400) - glib.printOkMessage() - - #-------------------------------------------------------- - # Configure MySQL - #-------------------------------------------------------- - - # Set mysql parameters - #self.mysql.setConfiguration('client','max_allowed_packet',params['mysql.max_allowed_packet']) - self.mysql.setConfiguration('mysqld','max_allowed_packet',params['mysql.max_allowed_packet']) - - # start MySQL - self.mysql.stop() - time.sleep(5) - self.mysql.start() - - if not os.path.exists('/tmp/mysql.sock'): - os.symlink('/var/lib/mysql/mysql.sock', '/tmp/mysql.sock') - - # ------------------------------------------------------------ - # Check password of MySQL - # ------------------------------------------------------------ - - self.mysql_root_password = params['mysql.root.password'] - if not params.has_key('set.mysql.root.password'): - params['set.mysql.root.password'] = 'false' - setempty = params['set.mysql.root.password'] - if self.mysql.checkMySQLConfiguration(self.mysql_root_password,setempty): - return 1 - - # Create the MySQL database - print "\nCreate/Verify the %s database" % params['jpis.database.name'] - - # Check if database exists - if self.mysql.existsDB(params['jpis.database.name'],self.mysql_root_password) != 0: - # Create database - print ('\n==> Creating MySQL %s database\n' % params['jpis.database.name']) - - if os.path.exists('/bin/rm /tmp/mysql_ct'): - os.remove('/tmp/mysql_ct') - - file = open('/tmp/mysql_ct', 'w') - - self.mysql.add_user(params['jpis.database.name'],params['jpis.database.username'],"",self.mysql_root_password) - text = ['USE %s;\n' % params['jpis.database.name'], - '\. %s/etc/glite-jp-index-dbsetup.sql\n' % os.environ['GLITE_LOCATION']] - - file.writelines(text) - file.close() - os.system('/usr/bin/mysql -p%s < /tmp/mysql_ct' % self.mysql_root_password) - os.system('/bin/rm /tmp/mysql_ct') - - #Starting and stopping the database before the index creation - self.mysql.stop() - time.sleep(5) - self.mysql.start() - - else: - print "\n==> MySQL database %s already exist\n" % params['jpis.database.name'] - - self.mysql.stop() - - return 0 - -#------------------------------------------------------------------------------- -# Set all environment variables -#------------------------------------------------------------------------------- - -def loadDefaults(params): - - params['GLITE_LOCATION'] = "/opt/glite" - params['mysql.root.password'] = "" - params['mysql.max_allowed_packet'] = "17" - params['jpis.serviceName'] = 'JP IS Server service at %s' % glib.fq_hostname - params['jpis.serviceType'] = 'org.glite.jp.index' - params['jpis.statusScript'] = '%s/etc/init.d/glite-jp-indexd status' % params['GLITE_LOCATION'] - params['jpis.endpoint'] = 'not available' - -def set_env(): - - # gLite - glib.export('GLITE_LOCATION'); - glib.export('GLITE_LOCATION_VAR'); - if not os.path.exists(os.environ['GLITE_LOCATION_VAR']): - os.mkdir(os.environ['GLITE_LOCATION_VAR'],0755) - glib.export('GLITE_LOCATION_LOG'); - if not os.path.exists(os.environ['GLITE_LOCATION_LOG']): - os.mkdir(os.environ['GLITE_LOCATION_LOG'],0755) - glib.export('GLITE_LOCATION_TMP'); - if not os.path.exists(os.environ['GLITE_LOCATION_TMP']): - os.mkdir(os.environ['GLITE_LOCATION_TMP'],0755) - - if not params.has_key('glite.user.group'): - params['glite.user.group'] = '' - (uid,gid) = glib.add_user(params['glite.user.name'],params['glite.user.group']) - glib.export('GLITE_USER',params['glite.user.name']) - jpis_cert_path = pwd.getpwnam(os.environ['GLITE_USER'])[5] + "/" + params['user.certificate.path'] - glib.export('GLITE_HOST_CERT',"%s/hostcert.pem" % jpis_cert_path) - glib.export('GLITE_HOST_KEY',"%s/hostkey.pem" % jpis_cert_path) - glib.export('GLITE_CERT_DIR',params['ca.certificates.dir']) - - glib.export('GLOBUS_LOCATION',params['GLOBUS_LOCATION']) - glib.export('GPT_LOCATION',params['GPT_LOCATION']) - - glib.export('JAVA_HOME') - - # bin and lib paths - glib.addEnvPath("PATH","/usr/bin/:%s/bin:%s/bin:%s/externals/bin:%s/bin" \ - % (os.environ['JAVA_HOME'],os.environ['GLOBUS_LOCATION'],os.environ['GLITE_LOCATION'],os.environ['GLITE_LOCATION'])) - glib.addEnvPath("LD_LIBRARY_PATH","/usr/lib:%s/lib:%s/externals/lib:%s/lib" % (os.environ['GLOBUS_LOCATION'], os.environ['GLITE_LOCATION'],os.environ['GLITE_LOCATION'])) - - # Perl - glib.addEnvPath("PERL5LIB", "%s/lib/perl:%s/lib/perl5" % (os.environ['GPT_LOCATION'],os.environ['GLITE_LOCATION'])) - - # JP IS configuration - glib.export('GLITE_JPIS_PS',params['jpis.ps']) - glib.export('GLITE_JPIS_DEBUG',params['jpis.debug']) - glib.export('GLITE_JPIS_QT',params['jpis.qt']) - glib.export('GLITE_JPIS_AUTH',params['jpis.auth']) - glib.export('GLITE_JPIS_DB',"%s/@localhost:%s" % (params['jpis.database.username'], params['jpis.database.name']) ) - glib.export('GLITE_JPIS_PORT',params['jpis.port']) - glib.export('GLITE_JPIS_PIDFILE',params['jpis.pid.file']) - glib.export('GLITE_JPIS_LOGFILE',params['jpis.log.file']) - - # Set environment - glib.setUserEnv() - -#------------------------------------------------------------------------------- -# Main program begins here -#------------------------------------------------------------------------------- - -if __name__ == '__main__': - - # The script must be run as root - if not os.geteuid()==0: - print '"\nThis script must be run as root\n' - sys.exit(1) - - # Get an instance of the ConfigParams class - params = ConfigParams() - - # Get an instance of the library class - glib = gLib() - - # Load parameters - loadDefaults(params) - try: - opts, args = glib.getopt(sys.argv[1:], '', ['siteconfig=']) - for o, a in opts: - if o == "--siteconfig": - params['site.config.url'] = a - break - except getopt.GetoptError: - pass - if glib.loadConfiguration("%s/../glite-jpis.cfg.xml" % glib.getScriptPath(),params): - print "An error occurred while configuring the service" - sys.exit(1) - - verbose = 0 - if params.has_key('glite.installer.verbose'): - if params['glite.installer.verbose'] == "true": - verbose = 1 - glib.verbose = verbose - - # Set up the environment - set_env() - - - # Instantiate the service classes - service = glite_jpis() - service.verbose = verbose - - # Command line opts if any - try: - opts, args = glib.getopt(sys.argv[1:], 'chv', ['checkconf', 'help', 'version','configure','stop','start','status','siteconfig=']) - except getopt.GetoptError: - service.usage(msg = "Unknown options(s)") - sys.exit(1) - - if len(opts) == 0: - service.usage() - sys.exit(0) - - # Check cli options - for o, a in opts: - if o in ("-h", "--help"): - service.usage() - sys.exit(0) - if o in ("-v", "--version"): - service.showVersion() - sys.exit(0) - if o in ("-c", "--checkconf"): - service.copyright() - service.showVersion() - glib.print_params(params) - sys.exit(0) - - if o == "--configure": - - - # Check certificates - if params.has_key('glite.installer.checkcerts'): - if params['glite.installer.checkcerts'] == "true": - if glib.check_certs(params) != 0: - print "An error occurred while configuring the %s service" \ - % service.friendly_name - sys.exit(1) - - # Print configuration parameters - if verbose: - glib.print_params(params) - - service.copyright() - service.showVersion() - service.banner() - - # Stop all services - glib.printInfoMessage("\n\nStopping all running JP IS services...") - service.stop() - - # Configure the service - return_result = service.configure() - - if return_result == 0: - - # Stop all services - glib.printInfoMessage("\n\nStopping all running JP IS services...") - service.stop() - - print "\n\nThe %s configuration was successfully completed\n" % service.friendly_name - print "You can now start the service using the --start option of this script\n\n" - glib.registerService() - - sys.exit(0) - - elif return_result == 2: - - # Stop all services - glib.printInfoMessage("\n\nStopping all running JP IS services...") - service.stop() - - print "\n\nThe %s configuration was completed,\n" % service.friendly_name - print "but warnings were issued. Please revise them and re-run the script\n" - print "or configure JP IS manually\n" - - sys.exit(2) - - else: - print "\n\nAn unrecoverable error occurred while configuring the %s" \ - % service.friendly_name - - sys.exit(1) - - if o in ("start", "--start"): - # Start the service - if service.start() == 0: - print "\n\nThe %s was successfully started " % service.friendly_name, - glib.printOkMessage() - sys.exit(0) - else: - print "\n\nAn error occurred while starting the %s " % service.friendly_name, - glib.printFailedMessage() - sys.exit(1) - - if o in ("stop", "--stop"): - # Stop the service - if service.stop() == 0: - print "\n\nThe %s was successfully stopped " % service.friendly_name, - glib.printOkMessage() - sys.exit(0) - else: - print "\n\nAn unrecoverable error occurred while stopping the %s " % service.friendly_name, - glib.printFailedMessage() - sys.exit(1) - if o == "--status": - sys.exit(service.status()) - diff --git a/org.glite.deployment.jpis/config/templates/glite-jpis.cfg.xml b/org.glite.deployment.jpis/config/templates/glite-jpis.cfg.xml deleted file mode 100644 index cd56a80..0000000 --- a/org.glite.deployment.jpis/config/templates/glite-jpis.cfg.xml +++ /dev/null @@ -1,92 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/org.glite.deployment.jpis/project/build.number b/org.glite.deployment.jpis/project/build.number deleted file mode 100644 index 58569c4..0000000 --- a/org.glite.deployment.jpis/project/build.number +++ /dev/null @@ -1,2 +0,0 @@ -#Wed Apr 13 09:36:57 CEST 2005 -module.build=232 diff --git a/org.glite.deployment.jpis/project/build.properties b/org.glite.deployment.jpis/project/build.properties deleted file mode 100644 index e69de29..0000000 diff --git a/org.glite.deployment.jpis/project/glite-jp.sdf.xml.template b/org.glite.deployment.jpis/project/glite-jp.sdf.xml.template deleted file mode 100644 index d27cdec..0000000 --- a/org.glite.deployment.jpis/project/glite-jp.sdf.xml.template +++ /dev/null @@ -1,117 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/org.glite.deployment.jpis/project/glite-jpis.sdf.xml.template b/org.glite.deployment.jpis/project/glite-jpis.sdf.xml.template deleted file mode 100644 index d27cdec..0000000 --- a/org.glite.deployment.jpis/project/glite-jpis.sdf.xml.template +++ /dev/null @@ -1,117 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/org.glite.deployment.jpis/project/lxscript-rpm.xsl b/org.glite.deployment.jpis/project/lxscript-rpm.xsl deleted file mode 100644 index 7b6c6e3..0000000 --- a/org.glite.deployment.jpis/project/lxscript-rpm.xsl +++ /dev/null @@ -1,336 +0,0 @@ - - - - - - - - - - - - - -#!/bin/sh - -# Copyright (c) Members of the EGEE Collaboration. 2004 -# See http://eu-egee.org/partners/ for details on the copyright holders -# For license conditions see the license file or http://eu-egee.org/license.html - -# glite-jpis_installer v. -# -# The glite-jpis_installer installs the gLite Job Provenance Index Server -# -# Usage: glite-jpis_installer [-u|-v|--help] -# -u uninstall -# -v print version -# --help print script usage info -# Return codes: 0 - Ok -# 1 - if a file could not be downloaded - -############################################################################### - -#Parse the RPMLIST to strip out the RPMS that are already installed -function parseRPMList() -{ - newRPMLIST="" - localRPMLIST=`rpm -qa` - for i in $RPMLIST - do - g=`echo $i | sed -e 's/\.i386\.rpm//g'` - g=`echo $g | sed -e 's/\.noarch\.rpm//g'` - if [ -z "`echo $localRPMLIST | grep $g`" ]; then - newRPMLIST="${newRPMLIST} $i" - else - echo "$i is already installed. It will be skipped." - fi - done - - RPMLIST=$newRPMLIST -} - -#Parse the SCRIPTLIST to execute all scripts -function parseScriptList() -{ - for i in $SCRIPTLIST - do - if [ "$INSTALL" = "true" ]; then - $i - else - $i -u - fi - done -} - -#Downloads and install the module RPMS -function install() -{ - - INSTALL=true - version - echo - echo xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx - echo x Please wait, downloading the gLite Job Provenance Index Server... x - echo xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx - echo - - mkdir -p glite-jpis - cd glite-jpis - - # Download global dependencies - - - true - - - - - - # Download scripts from repository - - - true - - - - - # Download dependencies RPMS from repository - - - true - - - - # Download RPMS from repository - - - true - - - - - - # Download and install subservices - parseScriptList - - - # Install all RPMS - echo - echo xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx - echo x Please wait, installing the gLite Job Provenance Index Server... x - echo xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx - echo - parseRPMList - if [ ! -z "$RPMLIST" ]; then - rpm -Uvh $RPMLIST - rpm_return=$? - else - echo All required RPMS are already installed - rpm_return=0 - fi - if [ "$rpm_return" == "0" ]; then - echo - echo Done! - echo - echo Before using the gLite JP, please create or update the configuration - echo files /opt/glite/etc/config/glite-jpis.cfg.xml - echo and /opt/glite/etc/config/glite-global.cfg.xml - echo and run the configuration script - echo /opt/glite/etc/config/scripts/glite-jpis-config.py. - echo A template is provided in - echo /opt/glite/etc/config/templates/glite-jpis.cfg.xml - echo Alternatively site configuration files can be used - else - echo - echo An error occurred while installing the JP RPMS. - echo Most likely one or more of the RPMS to be installed require - echo additional dependencies or are older than already installed packages. - echo Please refer to the rpm error message above for more details. - fi - echo - echo For more information refer to the gLite Installation and User Guides - echo or to the gLite web site \(http:\/\/www.glite.org\) - echo Please report problems and comments to the gLite Team at - echo glite-bugs@cern.ch - - cd .. -} - -############################################################################### -function uninstall() -{ - version - - # Global dependencies - - - false - - - - - - # dependencies RPMS from repository - - - false - - - - # RPMS from repository - - - false - - - - - - # Uninstall all RPMS - echo xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx - echo x Please wait, uninstalling the gLite Job Provenance Index Server... x - echo xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx - echo - rpm -ev $RPMLIST - if [ "$?" == "0" ]; then - echo - echo Done! - else - echo - echo An error occurred while removing the JP RPMS. - echo Most likely one or more of the RPMS to be removed have - echo dependent packages. - echo Please refer to the rpm error message above for more details. - fi -} - -############################################################################### -function usage() -{ - echo - echo Copyright \(c\) Members of the EGEE Collaboration. 2004 - echo See http://eu-egee.org/partners/ for details on the copyright holders - echo For license conditions see the license file or http://eu-egee.org/license.html - echo - echo glite-jpis_installer v. - echo - echo The glite-jpis_installer installs the gLite Job Provenance Index Server - echo - echo Usage: glite-jpis_installer \[-u\|-v\|--help\] - echo -u uninstall - echo -v print version - echo --help print script usage info - echo - echo Return codes: - echo 0 - Ok - echo 1 - if a file could not be downloaded - echo -} - -############################################################################### -function version -{ - echo - echo Copyright \(c\) Members of the EGEE Collaboration. 2004 - echo See http://eu-egee.org/partners/ for details on the copyright holders - echo For license conditions see the license file or http://eu-egee.org/license.html - echo - echo glite-jpis_installer v. - echo -} - - -RPMLIST= - -############################################################################### -# Main - -while getopts uvh opt -do - case $opt in - 'u') uninstall - exit 0 - ;; - 'v') version - exit 0 - ;; - 'h') usage - exit 0 - ;; - esac -done - -install - -exit 0 - - - - - _installer.sh - - -wget -N -nv -if [ ! -f "" ] -then - echo - echo ERROR: could not be downloaded! - exit 1 -fi -chmod u+x -SCRIPTLIST="$SCRIPTLIST ./" - - -SCRIPTLISTUn="$SCRIPTLISTUn ./ -u " - - - - - - - - --..rpm - -- - - -wget -N -nv -if [ ! -f "" ] -then - echo - echo ERROR: could not be downloaded! - exit 1 -fi -RPMLIST="$RPMLIST " - - -RPMLIST="$RPMLIST " - - - - - - - --..rpm - -- - - -wget -N -nv /RPMS/ -if [ ! -f "" ] -then - echo - echo ERROR: could not be downloaded! - exit 1 -fi -RPMLIST="$RPMLIST " - - -RPMLIST="$RPMLIST " - - - - - diff --git a/org.glite.deployment.jpis/project/lxscript-tgz.xsl b/org.glite.deployment.jpis/project/lxscript-tgz.xsl deleted file mode 100644 index 8b1e0c0..0000000 --- a/org.glite.deployment.jpis/project/lxscript-tgz.xsl +++ /dev/null @@ -1,62 +0,0 @@ - - - - - - - - - - - - -#!/bin/sh -# -# glite-jpis_tgz_installer -# usage: glite-jpis_tgz_installer [-u] -# -u uninstall -# -# glite-jpis_tgz_installer installs the gLite Deployment Unit from biniary tarballs -# - -PREFIX=/opt/glite - -############################################################################### -# Download global dependencies - - - -############################################################################### - - -############################################################################### -# Download dependencies RPMS from repository - - - -############################################################################### -# Download RPMS from repository - - - -############################################################################### - - - - - - --..rpm -wget - - - - -_bin.tar.gz -wget i386/tgz/ -tar -xzf $PREFIX - - - diff --git a/org.glite.deployment.jpis/project/properties.xml b/org.glite.deployment.jpis/project/properties.xml deleted file mode 100644 index 072dd67..0000000 --- a/org.glite.deployment.jpis/project/properties.xml +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/org.glite.deployment.jpis/project/quattor-template.xsl b/org.glite.deployment.jpis/project/quattor-template.xsl deleted file mode 100644 index d960582..0000000 --- a/org.glite.deployment.jpis/project/quattor-template.xsl +++ /dev/null @@ -1,64 +0,0 @@ - - - - - - - - - - -template pro_software_glite_jpis; - -# -# Copyright (c) Members of the EGEE Collaboration. 2004 -# See http://eu-egee.org/partners/ for details on the copyright holders -# For license conditions see the license file or http://eu-egee.org/license.html -# -# glite-jpis Quattor template v. -# - -## CAs - -include pro_software_glite_CA; - - - -# Global dependencies - - - - - - -# dependencies - - - - -# RPMS - - - - - -include pro_software_; - - - - - - - -"/software/packages"=pkg_repl("","-",""); - - - -"/software/packages"=pkg_repl("","-",""); - - - diff --git a/org.glite.deployment.jpis/project/version.properties b/org.glite.deployment.jpis/project/version.properties deleted file mode 100644 index 809be8c..0000000 --- a/org.glite.deployment.jpis/project/version.properties +++ /dev/null @@ -1,4 +0,0 @@ - -module.version = 2.2.0 -module.age = 2 - diff --git a/org.glite.deployment.jpps/build.xml b/org.glite.deployment.jpps/build.xml deleted file mode 100644 index c2bf066..0000000 --- a/org.glite.deployment.jpps/build.xml +++ /dev/null @@ -1,94 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/org.glite.deployment.jpps/config/scripts/glite-jpps-config.py b/org.glite.deployment.jpps/config/scripts/glite-jpps-config.py deleted file mode 100755 index 3612d6b..0000000 --- a/org.glite.deployment.jpps/config/scripts/glite-jpps-config.py +++ /dev/null @@ -1,500 +0,0 @@ -#!/usr/bin/env python -################################################################################ -# -# Copyright (c) Members of the EGEE Collaboration. 2004. -# See http://eu-egee.org/partners/ for details on the copyright holders. -# For license conditions see the license file or http://eu-egee.org/license.html -# -################################################################################ -# glite-jpps-config v. 1.0.0 -# -# Post-installation script for configuring the gLite Job Provenance Servers -# Robert Harakaly < mmulac@cern.ch > -# -# Version info: $Id$ -# -# Usage: python glite-jpps-config [-c|-v|-h|--help] -# -c, --checkconf print configuration -# -v, --version print version -# -h,--help print usage info -# --configure configure the service -# --start start the service -# --stop stop the service -# --status show service status -# -# Return codes: 0 - Ok -# 1 - Configuration failed -# -################################################################################ - -import os,string,pwd -import sys, posix, getopt,time - -sys.path.append(".") -from gLiteInstallerLib import gLib -from gLiteInstallerLib import ConfigParams -import mysql as MySQL - -# Set global variables here -global params # all config values from the XML file - -class glite_jpps: - - def __init__(self): - self.mysql = MySQL.Mysql() - self.verbose = 0 - self.version = "1.0.0" - self.name = "glite-jpps" - self.friendly_name = "gLite Job Provenance Primary Storage" - - #------------------------------------------------------------------------------- - # Banner - #------------------------------------------------------------------------------- - - def banner(self): - - print "\nxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" - print "Configuring the %s" % self.friendly_name - print "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\n" - - #------------------------------------------------------------------------------- - # Copyright - #------------------------------------------------------------------------------- - - def copyright(self): - - print '\nCopyright (c) Members of the EGEE Collaboration. 2004' - print 'See http://eu-egee.org/partners/ for details on the copyright holders' - print 'For license conditions see the license file or http://eu-egee.org/license.html' - - #------------------------------------------------------------------------------- - # Version - #------------------------------------------------------------------------------- - - def showVersion(self): - - print '\n%s-config v. %s\n' % (self.name,self.version) - - #------------------------------------------------------------------------------- - # Usage - #------------------------------------------------------------------------------- - - def usage(self,msg = ""): - - if msg: - print "\n%s" % (msg) - - self.copyright() - self.showVersion() - - print """Usage: \n -Edit the configuration file %s.cfg.xml in -%s/etc.config/templates\n -save it as %s/etc/config/%s.cfg.xml -and run the script as follows\n -python %s-config [OPTION...]""" % (self.name, os.environ['GLITE_LOCATION'], \ - os.environ['GLITE_LOCATION'], self.name, self.name) - - print ' -c, --checkconf print the service configuration' - print ' -v, --version print the version of the configuration script' - print ' -h, --help print this usage information' - print ' --configure configure the service' - print ' --start start the service' - print ' --stop stop the service' - print ' --status check service status' - print '\n' - - #------------------------------------------------------------------------------- - # All the configuration code goes here - #------------------------------------------------------------------------------- - - def start(self): - - self.mysql.start() - time.sleep(5) - - if not os.path.exists('/tmp/mysql.sock'): - os.symlink('/var/lib/mysql/mysql.sock', '/tmp/mysql.sock') - - #------------------------------------------------------------------- - # Start Primary Storage - #------------------------------------------------------------------- - - pid = glib.getPID('primarystoraged') - if pid != 0: - print 'The gLite JP Primary Storage service is already running. Restarting...' - os.system('%s/etc/init.d/glite-jp-primary stop' % os.environ['GLITE_LOCATION']) - else: - print 'Starting the gLite JP Primary Storage service...' - - os.system('%s/etc/init.d/glite-jp-primary start' % os.environ['GLITE_LOCATION']) - - pid = glib.getPID('primarystoraged') - - if (pid != 0): - print "The gLite JP Primary Storage service has been started ", - glib.printOkMessage() - else: - glib.printErrorMessage("Could not start the gLite JP Primary Storage service") - glib.printErrorMessage("Please verify and re-run the script "), - glib.printFailedMessage() - return 1 - - return 0 - - def stop(self): - - error_level = 0 - - #------------------------------------------------------------------- - # Stop Primary Storage - #------------------------------------------------------------------- - - pid = glib.getPID('primarystoraged') - if (pid != 0): - os.system('%s/etc/init.d/glite-jp-primary stop' % os.environ['GLITE_LOCATION']) - - pid = glib.getPID('primarystoraged') - if (pid != 0): - print 'Could not stop the JP Primary Storage service ', - glib.printFailedMessage() - error_level = 1 - else: - print 'JP Primary Storage service has been stopped ', - glib.printOkMessage() - - #------------------------------------------------------------------- - # MySQL - #------------------------------------------------------------------- - - self.mysql.stop() - - return error_level - - def status(self): - - error_level = 0 - - retval = os.system('%s/etc/init.d/glite-jp-primary status' % os.environ['GLITE_LOCATION']) - if retval != 0: - error_level = 1 - - return error_level - - def configure(self): - - #-------------------------------------------------------- - # Installs the Security Utilities - #-------------------------------------------------------- - - if os.system("python %s/glite-security-utils-config.py --subservice" % glib.getScriptPath()): - print "\nConfiguring gLite Security Utilities ", - glib.printFailedMessage() - else: - print "\nConfiguring gLite Security Utilities ", - glib.printOkMessage() - - # Create the GLITE_USER if it doesn't exists - print "\nCreating/Verifying the GLITE_USER account %s" % os.environ['GLITE_USER'] - (uid,gid) = glib.get_user_info(os.environ['GLITE_USER']) - glib.check_dir(os.environ['GLITE_LOCATION_VAR'],0755, uid, gid) - jpps_cert_path = pwd.getpwnam(os.environ['GLITE_USER'])[5] + "/" + params['user.certificate.path'] - glib.check_dir(jpps_cert_path ,0755, uid, gid) - glib.printOkMessage() - - # Create all directories needed - glib.check_dir(os.environ['GLITE_CERT_DIR']) - print "\nVerify CA certificates directory ", - glib.printOkMessage() - - # Copy certificates - print "\nCopy host certificates to GLITE_USER home directory as service certificates", - os.system("cp %s %s %s/" % (params['host.certificate.file'], params['host.key.file'], jpps_cert_path)) - os.chown("%s/hostcert.pem" % jpps_cert_path, uid,gid) - os.chmod("%s/hostcert.pem" % jpps_cert_path, 0644) - os.chown("%s/hostkey.pem" % jpps_cert_path, uid,gid) - os.chmod("%s/hostkey.pem" % jpps_cert_path, 0400) - glib.printOkMessage() - - #-------------------------------------------------------- - # Configure MySQL - #-------------------------------------------------------- - - # Set mysql parameters - #self.mysql.setConfiguration('client','max_allowed_packet',params['mysql.max_allowed_packet']) - self.mysql.setConfiguration('mysqld','max_allowed_packet',params['mysql.max_allowed_packet']) - - # start MySQL - self.mysql.stop() - time.sleep(5) - self.mysql.start() - - if not os.path.exists('/tmp/mysql.sock'): - os.symlink('/var/lib/mysql/mysql.sock', '/tmp/mysql.sock') - - # ------------------------------------------------------------ - # Check password of MySQL - # ------------------------------------------------------------ - - self.mysql_root_password = params['mysql.root.password'] - if not params.has_key('set.mysql.root.password'): - params['set.mysql.root.password'] = 'false' - setempty = params['set.mysql.root.password'] - if self.mysql.checkMySQLConfiguration(self.mysql_root_password,setempty): - return 1 - - # Create the MySQL database - print "\nCreate/Verify the %s database" % params['jpps.database.name'] - - # Check if database exists - if self.mysql.existsDB(params['jpps.database.name'],self.mysql_root_password) != 0: - # Create database - print ('\n==> Creating MySQL %s database\n' % params['jpps.database.name']) - - if os.path.exists('/bin/rm /tmp/mysql_ct'): - os.remove('/tmp/mysql_ct') - - file = open('/tmp/mysql_ct', 'w') - - self.mysql.add_user(params['jpps.database.name'],params['jpps.database.username'],"",self.mysql_root_password) - text = ['USE %s;\n' % params['jpps.database.name'], - '\. %s/etc/glite-jp-primary-dbsetup.sql\n' % os.environ['GLITE_LOCATION']] - - file.writelines(text) - file.close() - os.system('/usr/bin/mysql -p%s < /tmp/mysql_ct' % self.mysql_root_password) - os.system('/bin/rm /tmp/mysql_ct') - - #Starting and stopping the database before the index creation - self.mysql.stop() - time.sleep(5) - self.mysql.start() - - else: - print "\n==> MySQL database %s already exist\n" % params['jpps.database.name'] - - self.mysql.stop() - - return 0 - -#------------------------------------------------------------------------------- -# Set all environment variables -#------------------------------------------------------------------------------- - -def loadDefaults(params): - - params['GLITE_LOCATION'] = "/opt/glite" - params['mysql.root.password'] = "" - params['mysql.max_allowed_packet'] = "17" - params['jpps.serviceName'] = 'JP PS Server service at %s' % glib.fq_hostname - params['jpps.serviceType'] = 'org.glite.jp.primary' - params['jpps.statusScript'] = '%s/etc/init.d/glite-jp-primary status' % params['GLITE_LOCATION'] - params['jpps.endpoint'] = 'not available' - -def set_env(): - - # gLite - glib.export('GLITE_LOCATION'); - glib.export('GLITE_LOCATION_VAR'); - if not os.path.exists(os.environ['GLITE_LOCATION_VAR']): - os.mkdir(os.environ['GLITE_LOCATION_VAR'],0755) - glib.export('GLITE_LOCATION_LOG'); - if not os.path.exists(os.environ['GLITE_LOCATION_LOG']): - os.mkdir(os.environ['GLITE_LOCATION_LOG'],0755) - glib.export('GLITE_LOCATION_TMP'); - if not os.path.exists(os.environ['GLITE_LOCATION_TMP']): - os.mkdir(os.environ['GLITE_LOCATION_TMP'],0755) - - if not params.has_key('glite.user.group'): - params['glite.user.group'] = '' - (uid,gid) = glib.add_user(params['glite.user.name'],params['glite.user.group']) - glib.export('GLITE_USER',params['glite.user.name']) - jpps_cert_path = pwd.getpwnam(os.environ['GLITE_USER'])[5] + "/" + params['user.certificate.path'] - glib.export('GLITE_HOST_CERT',"%s/hostcert.pem" % jpps_cert_path) - glib.export('GLITE_HOST_KEY',"%s/hostkey.pem" % jpps_cert_path) - glib.export('GLITE_CERT_DIR',params['ca.certificates.dir']) - - glib.export('GLOBUS_LOCATION',params['GLOBUS_LOCATION']) - glib.export('GPT_LOCATION',params['GPT_LOCATION']) - - glib.export('JAVA_HOME') - - # bin and lib paths - glib.addEnvPath("PATH","/usr/bin/:%s/bin:%s/bin:%s/externals/bin:%s/bin" \ - % (os.environ['JAVA_HOME'],os.environ['GLOBUS_LOCATION'],os.environ['GLITE_LOCATION'],os.environ['GLITE_LOCATION'])) - glib.addEnvPath("LD_LIBRARY_PATH","/usr/lib:%s/lib:%s/externals/lib:%s/lib" % (os.environ['GLOBUS_LOCATION'], os.environ['GLITE_LOCATION'],os.environ['GLITE_LOCATION'])) - - # Perl - glib.addEnvPath("PERL5LIB", "%s/lib/perl:%s/lib/perl5" % (os.environ['GPT_LOCATION'],os.environ['GLITE_LOCATION'])) - - # JP PS configuration - glib.export('GLITE_JP_PRIMARY_PEERS',params['jpps.peers']) - glib.export('GLITE_JP_PRIMARY_FTP_PORT',params['jpps.ftp.port']) - glib.export('GLITE_JP_PRIMARY_INTERNAL',params['jpps.internal']) - if not os.path.exists(os.environ['GLITE_JP_PRIMARY_INTERNAL']): - os.mkdir(os.environ['GLITE_JP_PRIMARY_INTERNAL'],0755) - import socket - glib.export('GLITE_JP_PRIMARY_EXTERNAL',"gsiftp://%s:%s%s" % (socket.getfqdn(socket.gethostname()), params['jpps.ftp.port'], params['jpps.internal']) ) - if not os.path.exists(params['jpps.internal']): - os.mkdir(params['jpps.internal'],0755) - #glite_setenv.sh does not like variables with spaces, - #and su don't like variables with " - #glib.export('GLITE_JP_DEBUG',params['jpps.debug']) - os.environ['GLITE_JP_DEBUG']='%s' % params['jpps.debug'] - glib.export('GLITE_JP_PRIMARY_PORT',params['jpps.port']) - glib.export('GLITE_JP_PRIMARY_DBCS',"%s/@localhost:%s" % (params['jpps.database.username'], params['jpps.database.name']) ) - glib.export('GLITE_JP_PRIMARY_PIDFILE',params['jpps.pid.file']) - - # Set environment - glib.setUserEnv() - -#------------------------------------------------------------------------------- -# Main program begins here -#------------------------------------------------------------------------------- - -if __name__ == '__main__': - - # The script must be run as root - if not os.geteuid()==0: - print '"\nThis script must be run as root\n' - sys.exit(1) - - # Get an instance of the ConfigParams class - params = ConfigParams() - - # Get an instance of the library class - glib = gLib() - - # Load parameters - loadDefaults(params) - try: - opts, args = glib.getopt(sys.argv[1:], '', ['siteconfig=']) - for o, a in opts: - if o == "--siteconfig": - params['site.config.url'] = a - break - except getopt.GetoptError: - pass - if glib.loadConfiguration("%s/../glite-jpps.cfg.xml" % glib.getScriptPath(),params): - print "An error occurred while configuring the service" - sys.exit(1) - - verbose = 0 - if params.has_key('glite.installer.verbose'): - if params['glite.installer.verbose'] == "true": - verbose = 1 - glib.verbose = verbose - - # Set up the environment - set_env() - - - # Instantiate the service classes - service = glite_jpps() - service.verbose = verbose - - # Command line opts if any - try: - opts, args = glib.getopt(sys.argv[1:], 'chv', ['checkconf', 'help', 'version','configure','stop','start','status','siteconfig=']) - except getopt.GetoptError: - service.usage(msg = "Unknown options(s)") - sys.exit(1) - - if len(opts) == 0: - service.usage() - sys.exit(0) - - # Check cli options - for o, a in opts: - if o in ("-h", "--help"): - service.usage() - sys.exit(0) - if o in ("-v", "--version"): - service.showVersion() - sys.exit(0) - if o in ("-c", "--checkconf"): - service.copyright() - service.showVersion() - glib.print_params(params) - sys.exit(0) - - if o == "--configure": - - - # Check certificates - if params.has_key('glite.installer.checkcerts'): - if params['glite.installer.checkcerts'] == "true": - if glib.check_certs(params) != 0: - print "An error occurred while configuring the %s service" \ - % service.friendly_name - sys.exit(1) - - # Print configuration parameters - if verbose: - glib.print_params(params) - - service.copyright() - service.showVersion() - service.banner() - - # Stop all services - glib.printInfoMessage("\n\nStopping all running JP PS services...") - service.stop() - - # Configure the service - return_result = service.configure() - - if return_result == 0: - - # Stop all services - glib.printInfoMessage("\n\nStopping all running JP PS services...") - service.stop() - - print "\n\nThe %s configuration was successfully completed\n" % service.friendly_name - print "You can now start the service using the --start option of this script\n\n" - glib.registerService() - - sys.exit(0) - - elif return_result == 2: - - # Stop all services - glib.printInfoMessage("\n\nStopping all running JP PS services...") - service.stop() - - print "\n\nThe %s configuration was completed,\n" % service.friendly_name - print "but warnings were issued. Please revise them and re-run the script\n" - print "or configure JP PS manually\n" - - sys.exit(2) - - else: - print "\n\nAn unrecoverable error occurred while configuring the %s" \ - % service.friendly_name - - sys.exit(1) - - if o in ("start", "--start"): - # Start the service - if service.start() == 0: - print "\n\nThe %s was successfully started " % service.friendly_name, - glib.printOkMessage() - sys.exit(0) - else: - print "\n\nAn error occurred while starting the %s " % service.friendly_name, - glib.printFailedMessage() - sys.exit(1) - - if o in ("stop", "--stop"): - # Stop the service - if service.stop() == 0: - print "\n\nThe %s was successfully stopped " % service.friendly_name, - glib.printOkMessage() - sys.exit(0) - else: - print "\n\nAn unrecoverable error occurred while stopping the %s " % service.friendly_name, - glib.printFailedMessage() - sys.exit(1) - if o == "--status": - sys.exit(service.status()) - diff --git a/org.glite.deployment.jpps/config/templates/glite-jpps.cfg.xml b/org.glite.deployment.jpps/config/templates/glite-jpps.cfg.xml deleted file mode 100644 index ef13a02..0000000 --- a/org.glite.deployment.jpps/config/templates/glite-jpps.cfg.xml +++ /dev/null @@ -1,93 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/org.glite.deployment.jpps/project/build.number b/org.glite.deployment.jpps/project/build.number deleted file mode 100644 index 58569c4..0000000 --- a/org.glite.deployment.jpps/project/build.number +++ /dev/null @@ -1,2 +0,0 @@ -#Wed Apr 13 09:36:57 CEST 2005 -module.build=232 diff --git a/org.glite.deployment.jpps/project/build.properties b/org.glite.deployment.jpps/project/build.properties deleted file mode 100644 index e69de29..0000000 diff --git a/org.glite.deployment.jpps/project/glite-jpps.sdf.xml.template b/org.glite.deployment.jpps/project/glite-jpps.sdf.xml.template deleted file mode 100644 index ec2b692..0000000 --- a/org.glite.deployment.jpps/project/glite-jpps.sdf.xml.template +++ /dev/null @@ -1,127 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/org.glite.deployment.jpps/project/lxscript-rpm.xsl b/org.glite.deployment.jpps/project/lxscript-rpm.xsl deleted file mode 100644 index c9bec9a..0000000 --- a/org.glite.deployment.jpps/project/lxscript-rpm.xsl +++ /dev/null @@ -1,336 +0,0 @@ - - - - - - - - - - - - - -#!/bin/sh - -# Copyright (c) Members of the EGEE Collaboration. 2004 -# See http://eu-egee.org/partners/ for details on the copyright holders -# For license conditions see the license file or http://eu-egee.org/license.html - -# glite-jpps_installer v. -# -# The glite-jpps_installer installs the gLite Job Provenance Primary Storage -# -# Usage: glite-jpps_installer [-u|-v|--help] -# -u uninstall -# -v print version -# --help print script usage info -# Return codes: 0 - Ok -# 1 - if a file could not be downloaded - -############################################################################### - -#Parse the RPMLIST to strip out the RPMS that are already installed -function parseRPMList() -{ - newRPMLIST="" - localRPMLIST=`rpm -qa` - for i in $RPMLIST - do - g=`echo $i | sed -e 's/\.i386\.rpm//g'` - g=`echo $g | sed -e 's/\.noarch\.rpm//g'` - if [ -z "`echo $localRPMLIST | grep $g`" ]; then - newRPMLIST="${newRPMLIST} $i" - else - echo "$i is already installed. It will be skipped." - fi - done - - RPMLIST=$newRPMLIST -} - -#Parse the SCRIPTLIST to execute all scripts -function parseScriptList() -{ - for i in $SCRIPTLIST - do - if [ "$INSTALL" = "true" ]; then - $i - else - $i -u - fi - done -} - -#Downloads and install the module RPMS -function install() -{ - - INSTALL=true - version - echo - echo xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx - echo x Please wait, downloading the gLite Job Provenance Primary Storage... x - echo xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx - echo - - mkdir -p glite-jpps - cd glite-jpps - - # Download global dependencies - - - true - - - - - - # Download scripts from repository - - - true - - - - - # Download dependencies RPMS from repository - - - true - - - - # Download RPMS from repository - - - true - - - - - - # Download and install subservices - parseScriptList - - - # Install all RPMS - echo - echo xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx - echo x Please wait, installing the gLite Job Provenance Primary Storage... x - echo xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx - echo - parseRPMList - if [ ! -z "$RPMLIST" ]; then - rpm -Uvh $RPMLIST - rpm_return=$? - else - echo All required RPMS are already installed - rpm_return=0 - fi - if [ "$rpm_return" == "0" ]; then - echo - echo Done! - echo - echo Before using the gLite JP PS, please create or update the configuration - echo files /opt/glite/etc/config/glite-jpps.cfg.xml - echo and /opt/glite/etc/config/glite-global.cfg.xml - echo and run the configuration script - echo /opt/glite/etc/config/scripts/glite-jpps-config.py. - echo A template is provided in - echo /opt/glite/etc/config/templates/glite-jpps.cfg.xml - echo Alternatively site configuration files can be used - else - echo - echo An error occurred while installing the JP PS RPMS. - echo Most likely one or more of the RPMS to be installed require - echo additional dependencies or are older than already installed packages. - echo Please refer to the rpm error message above for more details. - fi - echo - echo For more information refer to the gLite Installation and User Guides - echo or to the gLite web site \(http:\/\/www.glite.org\) - echo Please report problems and comments to the gLite Team at - echo glite-bugs@cern.ch - - cd .. -} - -############################################################################### -function uninstall() -{ - version - - # Global dependencies - - - false - - - - - - # dependencies RPMS from repository - - - false - - - - # RPMS from repository - - - false - - - - - - # Uninstall all RPMS - echo xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx - echo x Please wait, uninstalling the gLite Job Provenance Primary Storage... x - echo xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx - echo - rpm -ev $RPMLIST - if [ "$?" == "0" ]; then - echo - echo Done! - else - echo - echo An error occurred while removing the JP PS RPMS. - echo Most likely one or more of the RPMS to be removed have - echo dependent packages. - echo Please refer to the rpm error message above for more details. - fi -} - -############################################################################### -function usage() -{ - echo - echo Copyright \(c\) Members of the EGEE Collaboration. 2004 - echo See http://eu-egee.org/partners/ for details on the copyright holders - echo For license conditions see the license file or http://eu-egee.org/license.html - echo - echo glite-jpps_installer v. - echo - echo The glite-jpps_installer installs the gLite Job Provenance Primary Storage - echo - echo Usage: glite-jpps_installer \[-u\|-v\|--help\] - echo -u uninstall - echo -v print version - echo --help print script usage info - echo - echo Return codes: - echo 0 - Ok - echo 1 - if a file could not be downloaded - echo -} - -############################################################################### -function version -{ - echo - echo Copyright \(c\) Members of the EGEE Collaboration. 2004 - echo See http://eu-egee.org/partners/ for details on the copyright holders - echo For license conditions see the license file or http://eu-egee.org/license.html - echo - echo glite-jpps_installer v. - echo -} - - -RPMLIST= - -############################################################################### -# Main - -while getopts uvh opt -do - case $opt in - 'u') uninstall - exit 0 - ;; - 'v') version - exit 0 - ;; - 'h') usage - exit 0 - ;; - esac -done - -install - -exit 0 - - - - - _installer.sh - - -wget -N -nv -if [ ! -f "" ] -then - echo - echo ERROR: could not be downloaded! - exit 1 -fi -chmod u+x -SCRIPTLIST="$SCRIPTLIST ./" - - -SCRIPTLISTUn="$SCRIPTLISTUn ./ -u " - - - - - - - - --..rpm - -- - - -wget -N -nv -if [ ! -f "" ] -then - echo - echo ERROR: could not be downloaded! - exit 1 -fi -RPMLIST="$RPMLIST " - - -RPMLIST="$RPMLIST " - - - - - - - --..rpm - -- - - -wget -N -nv /RPMS/ -if [ ! -f "" ] -then - echo - echo ERROR: could not be downloaded! - exit 1 -fi -RPMLIST="$RPMLIST " - - -RPMLIST="$RPMLIST " - - - - - diff --git a/org.glite.deployment.jpps/project/lxscript-tgz.xsl b/org.glite.deployment.jpps/project/lxscript-tgz.xsl deleted file mode 100644 index 4589cf6..0000000 --- a/org.glite.deployment.jpps/project/lxscript-tgz.xsl +++ /dev/null @@ -1,62 +0,0 @@ - - - - - - - - - - - - -#!/bin/sh -# -# glite-jpps_tgz_installer -# usage: glite-jpps_tgz_installer [-u] -# -u uninstall -# -# glite-jpps_tgz_installer installs the gLite Deployment Unit from biniary tarballs -# - -PREFIX=/opt/glite - -############################################################################### -# Download global dependencies - - - -############################################################################### - - -############################################################################### -# Download dependencies RPMS from repository - - - -############################################################################### -# Download RPMS from repository - - - -############################################################################### - - - - - - --..rpm -wget - - - - -_bin.tar.gz -wget i386/tgz/ -tar -xzf $PREFIX - - - diff --git a/org.glite.deployment.jpps/project/properties.xml b/org.glite.deployment.jpps/project/properties.xml deleted file mode 100644 index 41d9f99..0000000 --- a/org.glite.deployment.jpps/project/properties.xml +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/org.glite.deployment.jpps/project/quattor-template.xsl b/org.glite.deployment.jpps/project/quattor-template.xsl deleted file mode 100644 index d4dc67b..0000000 --- a/org.glite.deployment.jpps/project/quattor-template.xsl +++ /dev/null @@ -1,64 +0,0 @@ - - - - - - - - - - -template pro_software_glite_jpps; - -# -# Copyright (c) Members of the EGEE Collaboration. 2004 -# See http://eu-egee.org/partners/ for details on the copyright holders -# For license conditions see the license file or http://eu-egee.org/license.html -# -# glite-jpps Quattor template v. -# - -## CAs - -include pro_software_glite_CA; - - - -# Global dependencies - - - - - - -# dependencies - - - - -# RPMS - - - - - -include pro_software_; - - - - - - - -"/software/packages"=pkg_repl("","-",""); - - - -"/software/packages"=pkg_repl("","-",""); - - - diff --git a/org.glite.deployment.jpps/project/version.properties b/org.glite.deployment.jpps/project/version.properties deleted file mode 100644 index 809be8c..0000000 --- a/org.glite.deployment.jpps/project/version.properties +++ /dev/null @@ -1,4 +0,0 @@ - -module.version = 2.2.0 -module.age = 2 - diff --git a/org.glite.deployment.lb/.cvsignore b/org.glite.deployment.lb/.cvsignore deleted file mode 100644 index 3a4edf6..0000000 --- a/org.glite.deployment.lb/.cvsignore +++ /dev/null @@ -1 +0,0 @@ -.project diff --git a/org.glite.deployment.lb/CHANGELOG b/org.glite.deployment.lb/CHANGELOG deleted file mode 100644 index 882b0d8..0000000 --- a/org.glite.deployment.lb/CHANGELOG +++ /dev/null @@ -1,40 +0,0 @@ -DATE: 13-03-2006 16:20 -[flammer] Increased version to 2.3.0 after branching. - -DATE: 13-03-2006 16:15 -[flammer] Merge of HEAD with branch 2.1.0 -[flammer] Increased version to 2.2.0 - -DATE: 04-12-2005 21:15 -[dimeglio] Added configuration parameter for setting mysql max_allowed_packet - -DATE: 23-11-2005 23:50 -[dimeglio] Use ConfigParams class -[dimeglio] Removed servietool instabce config params, put instance creation in script - -DATE: 08-07-2005 15:20 -[dimeglio] Merged from branch 1.2.2 - -DATE: 25-05-2005 20:00 -[dimeglio] Merged from branch 1.2.2 - -DATE: 21-03-2005 17:21 -[dimeglio] Implemented status method - -DATE: 21-03-2005 00:32 -[dimeglio] Added PERL5LIB env var - -DATE: 17-03-2005 17:33 -[gdiez] Stopping and starting the database before the index creation (just after the database is created and the user granted) - -DATE: 09-03-2005 23:05 -[dimeglio] Moved creation of indices inside database creation (if database - exists indices are not recreated) - -DATE: 02-03-2005 11:05 -[dimeglio] Started CHANGELOG -[dimeglio] Fixed formatting, improved display of message using glib.printXxxMessage functions -[dimeglio] Fixed some problems when starting/stopping services -[dimeglio] GLITE_USER parameter not exposed anymore in config file, use same user parameters - as WMS to allow installation on same node -[dimeglio] Increased module version number to 1.2.0 \ No newline at end of file diff --git a/org.glite.deployment.lb/LICENSE b/org.glite.deployment.lb/LICENSE deleted file mode 100644 index 259a91f..0000000 --- a/org.glite.deployment.lb/LICENSE +++ /dev/null @@ -1,69 +0,0 @@ -LICENSE file for EGEE Middleware -================================ - -Copyright (c) 2004 on behalf of the EU EGEE Project: -The European Organization for Nuclear Research (CERN), -Istituto Nazionale di Fisica Nucleare (INFN), Italy -Datamat Spa, Italy -Centre National de la Recherche Scientifique (CNRS), France -CS Systeme d'Information (CSSI), France -Royal Institute of Technology, Center for Parallel Computers (KTH-PDC), Sweden -Universiteit van Amsterdam (UvA), Netherlands -University of Helsinki (UH.HIP), Finlan -University of Bergen (UiB), Norway -Council for the Central Laboratory of the Research Councils (CCLRC), United Kingdom - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - -1. Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - -2. Redistributions in binary form must reproduce the above copyright -notice, this list of conditions and the following disclaimer in the -documentation and/or other materials provided with the distribution. - -3. The end-user documentation included with the redistribution, if -any, must include the following acknowledgment: "This product includes -software developed by The EU EGEE Project (http://cern.ch/eu-egee/)." -Alternatively, this acknowledgment may appear in the software itself, if -and wherever such third-party acknowledgments normally appear. - -4. The names EGEE and the EU EGEE Project must not be -used to endorse or promote products derived from this software without -prior written permission. For written permission, please contact -. - -5. You are under no obligation whatsoever to provide anyone with any -bug fixes, patches, or upgrades to the features, functionality or -performance of the Software ("Enhancements") that you may develop over -time; however, if you choose to provide your Enhancements to The EU -EGEE Project, or if you choose to otherwise publish or distribute your -Enhancements, in source code form without contemporaneously requiring -end users of The EU EGEE Proejct to enter into a separate written license -agreement for such Enhancements, then you hereby grant The EU EGEE Project -a non-exclusive, royalty-free perpetual license to install, use, copy, -modify, prepare derivative works, incorporate into the EGEE Middleware -or any other computer software, distribute, and sublicense your -Enhancements or derivative works thereof, in binary and source code -form (if any), whether developed by The EU EGEE Project or third parties. - -THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED -WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL PROJECT OR ITS CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR -BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE -OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN -IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -This software consists of voluntary contributions made by many -individuals on behalf of the EU EGEE Prject. For more information on The -EU EGEE Project, please see http://cern.ch/eu-egee/. For more information on -EGEE Middleware, please see http://egee-jra1.web.cern.ch/egee-jra1/ - - diff --git a/org.glite.deployment.lb/build.xml b/org.glite.deployment.lb/build.xml deleted file mode 100644 index 874c661..0000000 --- a/org.glite.deployment.lb/build.xml +++ /dev/null @@ -1,110 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/org.glite.deployment.lb/config/scripts/glite-lb-config.py b/org.glite.deployment.lb/config/scripts/glite-lb-config.py deleted file mode 100644 index c0158ea..0000000 --- a/org.glite.deployment.lb/config/scripts/glite-lb-config.py +++ /dev/null @@ -1,574 +0,0 @@ -#!/usr/bin/env python -################################################################################ -# -# Copyright (c) Members of the EGEE Collaboration. 2004. -# See http://eu-egee.org/partners/ for details on the copyright holders. -# For license conditions see the license file or http://eu-egee.org/license.html -# -################################################################################ -# glite-lb-config v. 2.3.0 -# -# Post-installation script for configuring the gLite Logging and Bookkeping Server -# Robert Harakaly < robert.harakaly@cern.ch > -# Diana Bosio -# Leanne Guy -# -# Version info: $Id$ -# -# Usage: python glite-lb-config [-c|-v|-h|--help] -# -c, --checkconf print configuration -# -v, --version print version -# -h,--help print usage info -# --configure configure the service -# --start start the service -# --stop stop the service -# --status show service status -# -# Return codes: 0 - Ok -# 1 - Configuration failed -# -################################################################################ - -import os,string,pwd -import sys, posix, getopt,time - -sys.path.append(".") -from gLiteInstallerLib import gLib -from gLiteInstallerLib import ConfigParams -from gliteRgmaServicetool import gliteRgmaServicetoolInstance -from gliteRgmaServicetool import gliteRgmaServicetool -import mysql as MySQL - -# Set global variables here -global params # all config values from the XML file -global rgmaServicetool - -class glite_lb: - - def __init__(self): - self.mysql = MySQL.Mysql() - self.verbose = 0 - self.version = "2.3.0" - self.name = "glite-lb" - self.friendly_name = "gLite Logging and Bookkeeping" - - #------------------------------------------------------------------------------- - # Banner - #------------------------------------------------------------------------------- - - def banner(self): - - print "\nxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" - print "Configuring the %s" % self.friendly_name - print "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\n" - - #------------------------------------------------------------------------------- - # Copyright - #------------------------------------------------------------------------------- - - def copyright(self): - - print '\nCopyright (c) Members of the EGEE Collaboration. 2004' - print 'See http://eu-egee.org/partners/ for details on the copyright holders' - print 'For license conditions see the license file or http://eu-egee.org/license.html' - - #------------------------------------------------------------------------------- - # Version - #------------------------------------------------------------------------------- - - def showVersion(self): - - print '\n%s-config v. %s\n' % (self.name,self.version) - - #------------------------------------------------------------------------------- - # Usage - #------------------------------------------------------------------------------- - - def usage(self,msg = ""): - - if msg: - print "\n%s" % (msg) - - self.copyright() - self.showVersion() - - print """Usage: \n -Edit the configuration file %s.cfg.xml in -%s/etc.config/templates\n -save it as %s/etc/config/%s.cfg.xml -and run the script as follows\n -python %s-config [OPTION...]""" % (self.name, os.environ['GLITE_LOCATION'], \ - os.environ['GLITE_LOCATION'], self.name, self.name) - - print ' -c, --checkconf print the service configuration' - print ' -v, --version print the version of the configuration script' - print ' -h, --help print this usage information' - print ' --configure configure the service' - print ' --start start the service' - print ' --stop stop the service' - print ' --status check service status' - print '\n' - - #------------------------------------------------------------------------------- - # All the configuration code goes here - #------------------------------------------------------------------------------- - - def start(self): - - self.mysql.start() - time.sleep(5) - - if not os.path.exists('/tmp/mysql.sock'): - os.symlink('/var/lib/mysql/mysql.sock', '/tmp/mysql.sock') - - pid = glib.getPID('bkserverd') - if pid != 0: - print 'The gLite LB Server service is already running. Restarting...' - os.system('%s/etc/init.d/glite-lb-bkserverd stop' % os.environ['GLITE_LOCATION']) - else: - print 'Starting the gLite LB Server service...' - - os.system('%s/etc/init.d/glite-lb-bkserverd start' % os.environ['GLITE_LOCATION']) - - pid = glib.getPID('bkserverd') - - if (pid != 0): - print "The gLite LB Server service has been started ", - glib.printOkMessage() - else: - glib.printErrorMessage("Could not start the gLite LB Server service") - glib.printErrorMessage("Please verify and re-run the script "), - glib.printFailedMessage() - return 1 - - #------------------------------------------------------------------- - # Start Servicetool - #------------------------------------------------------------------- - - if params['rgma.servicetool.activate'] == "true": - - errorcode = rgmaServicetool.start() - if (errorcode != 0): - return 1 - - return 0 - - def stop(self): - - error_level = 0 - - pid = glib.getPID('bkserverd') - if (pid != 0): - os.system('%s/etc/init.d/glite-lb-bkserverd stop' % os.environ['GLITE_LOCATION']) - - pid = glib.getPID('bkserverd') - if (pid != 0): - print 'Could not stop the LB Server service ', - glib.printFailedMessage() - error_level = 1 - else: - print 'The LB Server service has been stopped ', - glib.printOkMessage() - - #------------------------------------------------------------------- - # MySQL - #------------------------------------------------------------------- - - self.mysql.stop() - - #------------------------------------------------------------------- - # Servicetool - #------------------------------------------------------------------- - - if params['rgma.servicetool.activate'] == "true": - - if rgmaServicetool.stop(): - error_level = 1 - - return error_level - - def status(self): - - error_level = 0 - - retval = os.system('%s/etc/init.d/glite-lb-bkserverd status' % os.environ['GLITE_LOCATION']) - if retval != 0: - error_level = 1 - - #------------------------------------------------------------------- - # Servicetool - #------------------------------------------------------------------- - - if params['rgma.servicetool.activate'] == "true": - - if rgmaServicetool.status() != 0: - error_level = 1 - - return error_level - - def configure(self): - - #-------------------------------------------------------- - # Installs the Security Utilities - #-------------------------------------------------------- - - if os.system("python %s/glite-security-utils-config.py --subservice" % glib.getScriptPath()): - print "\nConfiguring gLite Security Utilities ", - glib.printFailedMessage() - else: - print "\nConfiguring gLite Security Utilities ", - glib.printOkMessage() - - # Create the GLITE_USER if it doesn't exists - print "\nCreating/Verifying the GLITE_USER account %s" % os.environ['GLITE_USER'] - (uid,gid) = glib.get_user_info(os.environ['GLITE_USER']) - glib.check_dir(os.environ['GLITE_LOCATION_VAR'],0755, uid, gid) - lb_cert_path = pwd.getpwnam(os.environ['GLITE_USER'])[5] + "/" + params['user.certificate.path'] - glib.check_dir(lb_cert_path ,0755, uid, gid) - glib.printOkMessage() - - # Create all directories needed - glib.check_dir(os.environ['GLITE_CERT_DIR']) - print "\nVerify CA certificates directory ", - glib.printOkMessage() - - # Copy certificates - print "\nCopy host certificates to GLITE_USER home directory as service certificates", - os.system("cp %s %s %s/" % (params['host.certificate.file'], params['host.key.file'], lb_cert_path)) - os.chown("%s/hostcert.pem" % lb_cert_path, uid,gid) - os.chmod("%s/hostcert.pem" % lb_cert_path, 0644) - os.chown("%s/hostkey.pem" % lb_cert_path, uid,gid) - os.chmod("%s/hostkey.pem" % lb_cert_path, 0400) - glib.printOkMessage() - - #-------------------------------------------------------- - # Configure MySQL - #-------------------------------------------------------- - - # Set mysql parameters - #self.mysql.setConfiguration('mysql','loose-max_allowed_packet',params['mysql.max_allowed_packet']) - self.mysql.setConfiguration('mysqld','max_allowed_packet',params['mysql.max_allowed_packet']) - - # start MySQL - self.mysql.stop() - time.sleep(5) - self.mysql.start() - - if not os.path.exists('/tmp/mysql.sock'): - os.symlink('/var/lib/mysql/mysql.sock', '/tmp/mysql.sock') - - # ------------------------------------------------------------ - # Check password of MySQL - # ------------------------------------------------------------ - - self.mysql_root_password = params['mysql.root.password'] - if not params.has_key('set.mysql.root.password'): - params['set.mysql.root.password'] = 'false' - setempty = params['set.mysql.root.password'] - if self.mysql.checkMySQLConfiguration(self.mysql_root_password,setempty): - return 1 - - # Create the MySQL database - print "\nCreate/Verify the %s database" % params['lb.database.name'] - - # Check if database exists - if self.mysql.existsDB(params['lb.database.name'],self.mysql_root_password) != 0: - # Create database - print ('\n==> Creating MySQL %s database\n' % params['lb.database.name']) - - if os.path.exists('/bin/rm /tmp/mysql_ct'): - os.remove('/tmp/mysql_ct') - - file = open('/tmp/mysql_ct', 'w') - - self.mysql.add_user(params['lb.database.name'],params['lb.database.username'],"",self.mysql_root_password) - text = ['USE %s;\n' % params['lb.database.name'], - '\. %s/etc/glite-lb-dbsetup.sql\n' % os.environ['GLITE_LOCATION']] - - file.writelines(text) - file.close() - os.system('/usr/bin/mysql -p%s < /tmp/mysql_ct' % self.mysql_root_password) - os.system('/bin/rm /tmp/mysql_ct') - - #Starting and stopping the database before the index creation - self.mysql.stop() - time.sleep(5) - self.mysql.start() - - #Creating the indexes - print 'Creating the index configuration file %s/etc/glite-lb-index.conf ' % os.environ['GLITE_LOCATION'], - path = "%s/etc/glite-lb-index.conf" % os.environ['GLITE_LOCATION'] - pathBak = "%s/etc/glite-lb-index.conf.bak" % os.environ['GLITE_LOCATION'] - - if os.path.exists(pathBak): - os.remove(pathBak) - if os.path.exists(path): - os.rename(path,pathBak) - file = open(path, 'w') - file.write("[\n") - file.write(" JobIndices = {\n") - for index in params['lb.index.list']: - file.write(" [ type = \"system\"; name = \"%s\" ],\n" % index) - file.write(" }\n") - file.write("]\n") - file.close() - glib.printOkMessage() - - print "Running glite-lb-bkindex ", - if os.system('%s/bin/glite-lb-bkindex -r %s/etc/glite-lb-index.conf' % (os.environ['GLITE_LOCATION'],os.environ['GLITE_LOCATION'])): - glib.printFailedMessage() - return 1 - else: - glib.printOkMessage() - - else: - print "\n==> MySQL database %s already exist\n" % params['lb.database.name'] - - self.mysql.stop() - - #------------------------------------------------------------------- - # RGMA servicetool: configure servicetool - #------------------------------------------------------------------- - - if params['rgma.servicetool.activate'] == "true": - - # Instantiate the rgma-servicetool class - rgmaServicetool = gliteRgmaServicetool() - rgmaServicetool.verbose = self.verbose - - # Create Local Logger instance - serviceId = "%s_%s" % (glib.fq_hostname, params['lbserver.serviceType']) - servicetoolInstance = gliteRgmaServicetoolInstance(glib, serviceId) - - # set params - servicetoolInstance.setServiceName(params['lbserver.serviceName']) - servicetoolInstance.setServiceType(params['lbserver.serviceType']) - servicetoolInstance.setServiceVersion(self.version) - servicetoolInstance.setStatusScript(params['lbserver.statusScript']) - servicetoolInstance.setEndpoint(params['lbserver.endpoint']) - - # add instance to the gLite configuration - if servicetoolInstance.add() == 1: - return 1 - - # Configure servicetool - if rgmaServicetool.configure(glib): - # error in configuring servicetool - return 1 - - return 0 - -#------------------------------------------------------------------------------- -# Set all environment variables -#------------------------------------------------------------------------------- - -def loadDefaults(params): - - params['GLITE_LOCATION'] = "/opt/glite" - params['mysql.root.password'] = "" - params['lb.database.name'] = "lbserver20" - params['lb.database.username'] = "lbserver" - params['mysql.max_allowed_packet'] = "17" - - params['lbserver.serviceName'] = 'LB Server service at %s' % glib.fq_hostname - params['lbserver.serviceType'] = 'org.glite.lb.server' - params['lbserver.statusScript'] = '%s/etc/init.d/glite-lb-bkserverd status' % params['GLITE_LOCATION'] - params['lbserver.endpoint'] = 'not available' - -def set_env(): - - # gLite - glib.export('GLITE_LOCATION'); - glib.export('GLITE_LOCATION_VAR'); - if not os.path.exists(os.environ['GLITE_LOCATION_VAR']): - os.mkdir(os.environ['GLITE_LOCATION_VAR'],0755) - glib.export('GLITE_LOCATION_LOG'); - if not os.path.exists(os.environ['GLITE_LOCATION_LOG']): - os.mkdir(os.environ['GLITE_LOCATION_LOG'],0755) - glib.export('GLITE_LOCATION_TMP'); - if not os.path.exists(os.environ['GLITE_LOCATION_TMP']): - os.mkdir(os.environ['GLITE_LOCATION_TMP'],0755) - - if not params.has_key('glite.user.group'): - params['glite.user.group'] = '' - (uid,gid) = glib.add_user(params['glite.user.name'],params['glite.user.group']) - glib.export('GLITE_USER',params['glite.user.name']) - lb_cert_path = pwd.getpwnam(os.environ['GLITE_USER'])[5] + "/" + params['user.certificate.path'] - glib.export('GLITE_HOST_CERT',"%s/hostcert.pem" % lb_cert_path) - glib.export('GLITE_HOST_KEY',"%s/hostkey.pem" % lb_cert_path) - glib.export('GLITE_CERT_DIR',params['ca.certificates.dir']) - - glib.export('GLOBUS_LOCATION',params['GLOBUS_LOCATION']) - glib.export('GPT_LOCATION',params['GPT_LOCATION']) - - glib.export('JAVA_HOME') - - # bin and lib paths - glib.addEnvPath("PATH","/usr/bin/:%s/bin:%s/bin:%s/externals/bin:%s/bin" \ - % (os.environ['JAVA_HOME'],os.environ['GLOBUS_LOCATION'],os.environ['GLITE_LOCATION'],os.environ['GLITE_LOCATION'])) - glib.addEnvPath("LD_LIBRARY_PATH","/usr/lib:%s/lib:%s/externals/lib:%s/lib" % (os.environ['GLOBUS_LOCATION'], os.environ['GLITE_LOCATION'],os.environ['GLITE_LOCATION'])) - - # Perl - glib.addEnvPath("PERL5LIB", "%s/lib/perl:%s/lib/perl5" % (os.environ['GPT_LOCATION'],os.environ['GLITE_LOCATION'])) - - # Set environment - glib.setUserEnv() - -#------------------------------------------------------------------------------- -# Main program begins here -#------------------------------------------------------------------------------- - -if __name__ == '__main__': - - # The script must be run as root - if not os.geteuid()==0: - print '"\nThis script must be run as root\n' - sys.exit(1) - - # Get an instance of the ConfigParams class - params = ConfigParams() - - # Get an instance of the library class - glib = gLib() - - # Load parameters - loadDefaults(params) - try: - opts, args = glib.getopt(sys.argv[1:], '', ['siteconfig=']) - for o, a in opts: - if o == "--siteconfig": - params['site.config.url'] = a - break - except getopt.GetoptError: - pass - if glib.loadConfiguration(["%s/../glite-lb.cfg.xml" % glib.getScriptPath(), \ - "%s/../glite-rgma-servicetool.cfg.xml" % glib.getScriptPath()],params): - print "An error occurred while configuring the service" - sys.exit(1) - - verbose = 0 - if params.has_key('glite.installer.verbose'): - if params['glite.installer.verbose'] == "true": - verbose = 1 - glib.verbose = verbose - - # Set up the environment - set_env() - - # Instantiate the service classes - service = glite_lb() - service.verbose = verbose - # Instantiate the rgma servicetool class - rgmaServicetool = gliteRgmaServicetool() - rgmaServicetool.verbose = verbose - - # Command line opts if any - try: - opts, args = glib.getopt(sys.argv[1:], 'chv', ['checkconf', 'help', 'version','configure','stop','start','status','siteconfig=']) - except getopt.GetoptError: - service.usage(msg = "Unknown options(s)") - sys.exit(1) - - if len(opts) == 0: - service.usage() - sys.exit(0) - - # Check cli options - for o, a in opts: - - if o in ("-h", "--help"): - service.usage() - sys.exit(0) - - if o in ("-v", "--version"): - service.showVersion() - sys.exit(0) - - if o in ("-c", "--checkconf"): - service.copyright() - service.showVersion() - glib.print_params(params) - print - rgmaServicetool.showServices() - sys.exit(0) - - if o == "--configure": - - # Check certificates - if params.has_key('glite.installer.checkcerts'): - if params['glite.installer.checkcerts'] == "true": - if glib.check_certs(params) != 0: - print "An error occurred while configuring the %s service" \ - % service.friendly_name - sys.exit(1) - - # Print configuration parameters - if verbose: - glib.print_params(params) - - service.copyright() - service.showVersion() - service.banner() - - # Stop all services - glib.printInfoMessage("\n\nStopping all running LB services...") - service.stop() - - # Configure the service - return_result = service.configure() - - if return_result == 0: - - # Stop all services - glib.printInfoMessage("\n\nStopping all running LB services...") - service.stop() - - print "\n\nThe %s configuration was successfully completed\n" % service.friendly_name - print "You can now start the service using the --start option of this script\n\n" - glib.registerService() - - sys.exit(0) - - elif return_result == 2: - - # Stop all services - glib.printInfoMessage("\n\nStopping all running LB services...") - service.stop() - - print "\n\nThe %s configuration was completed,\n" % service.friendly_name - print "but warnings were issued. Please revise them and re-run the script\n" - print "or configure LB manually\n" - - sys.exit(2) - - else: - print "\n\nAn unrecoverable error occurred while configuring the %s" \ - % service.friendly_name - - sys.exit(1) - - if o in ("start", "--start"): - # Start the service - if service.start() == 0: - print "\n\nThe %s was successfully started " % service.friendly_name, - glib.printOkMessage() - sys.exit(0) - else: - print "\n\nAn error occurred while starting the %s " % service.friendly_name, - glib.printFailedMessage() - sys.exit(1) - - if o in ("stop", "--stop"): - # Stop the service - if service.stop() == 0: - print "\n\nThe %s was successfully stopped " % service.friendly_name, - glib.printOkMessage() - sys.exit(0) - else: - print "\n\nAn unrecoverable error occurred while stopping the %s " % service.friendly_name, - glib.printFailedMessage() - sys.exit(1) - - if o == "--status": - sys.exit(service.status()) - diff --git a/org.glite.deployment.lb/config/templates/glite-lb.cfg.xml b/org.glite.deployment.lb/config/templates/glite-lb.cfg.xml deleted file mode 100644 index 4e11e33..0000000 --- a/org.glite.deployment.lb/config/templates/glite-lb.cfg.xml +++ /dev/null @@ -1,73 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - owner - location - destination - - - - - - diff --git a/org.glite.deployment.lb/doc/release_notes/release_notes.doc b/org.glite.deployment.lb/doc/release_notes/release_notes.doc deleted file mode 100644 index 2ad2d4d1bf359419707777ee266496f87aa65f73..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 192512 zcmeF42S8KT_s4HSAb=psaF0}R3$k3e5Cu_jfuk-kK!7OA1XQfMR;_hZ+uGI+t=c;3 z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id1ZTrJa4u|y^Wc2A z04{`!;J++l@l*B}!zFMj{0uIG%i#*R60U-u!`1K$xCX9;>)?900e%TL!mpqdZi1WP z*YF#-1%3;+!WOsuAeV{M& zgM8=@17IK=0fS&L90@~UC>#aDU^o5kJ zY~On*an9+ysLZBSue4@NkdjXpI<@Djvb7+`xbf7(V|rGK<$aqS$kF!B{$Kjw?}urP ziVesaavVle0&334>TdPPy>9&4S0kMYRjFPW*1Hx)qfzE4=X}kAEB*2ypl7)wiFY*s}X@ w@`mraM8VO{49iy6VA6E0Rm3UlnbvVH*S*&u^X1@s_h(*r^KEj!e>Cv_0j>YZv;Y7A diff --git a/org.glite.deployment.lb/doc/release_notes/release_notes.html b/org.glite.deployment.lb/doc/release_notes/release_notes.html deleted file mode 100644 index 01ee3f4..0000000 --- a/org.glite.deployment.lb/doc/release_notes/release_notes.html +++ /dev/null @@ -1,2712 +0,0 @@ - - - - - -gLite LB Server Release Notes - - - - - - -
- -

gLite Logging & Bookkeeping Server

- -

1. Release Description

- -

This release contains the gLite Logging & Bookkeeping -Server module v. 2.1.1. The following sections provide additional information about -the release content, the module dependencies, the know bugs and issues and a -list of bugs closed since the previous release. For information about -installing and using the gLite Logging & Bookkeeping Server, please refer -to the gLite Installation and User Guides.

- -

2. Changes in this release

- -

2.1. Changes in functionality

- -

There are no functional changes in this -release.

- -

2.2. Changes in Configuration

- -

The following new parameters have been -added to the glite-lb.cfg.xml file:

- -

 

- - - - - - - - - - - - - - - - - - - - - - -
-

Parameter name

-
-

Default value

-
-

Description

-
-

rgma.servicetool.activate

-
-

true

-
-

Turn on/off servicetool for the node.

-

[Example: true ] [Type: 'boolean']

-
-

set.mysql.root.password

-
-

false

-
-

If this parameter is true, then the root - password of the mysql database is set to the value specified in - mysql.root.password if it not yet set. This parameter has       no effect if - the database root password is already set. It can be used to ease automated installation - and configuration of the service, if mysql is not managed in some other way.

-

[Example: false][Type: boolean]

-
-

mysql.max_allowed_packet

-
-

17

-
-

This parameter allows to set the - max_allowed_packet parameter in the mysql configuration file /etc/my.cnf. The - default recommended value for the LB server is 17MB.

-

[Example: 17][Type: Integer][Unit: MB]

-
- -

 

- -

The R-GMA Service Publisher (aka R-GMA -servicetool) parameters are now automatically handled by the configuration -script and do not need to be explicitly set anymore in the configuration file. -The parameters can be set in the configuration file to override the default -values.

- -

 

- -

3. Release contents

- -

3.1. Glite sub-deployment modules

- -

The gLite Logging and Bookkeeping module requires the -following sub-modules:

- -

 

- -

-          -gLite Security Utilities

- -

-          -gLite R-GMA Servicetool

- -

 

- -

The sub-modules are automatically installed with the LB -module. For more information about these sub-modules please refer to the -specific release notes and installation instructions.

- -

3.2. Glite RPMS

- -

The gLite Logging & Bookkeeping Server v. 2.1.1 is -composed of the following gLite components:

- -

 

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-

Component name

-
-

Description

-
-

Version

-
-

File

-
-

glite-config

-
-

gLite configuration scripts

-
-

1.6.22

-
-

http://glite.web.cern.ch/glite/packages/R1.5/R20051130/bin/rhel30/noarch/RPMS/glite-config-1.6.22-1.noarch.rpm

-
-

glite-jp-common

-
-

 

-
-

1.1.0

-
-

http://glite.web.cern.ch/glite/packages/R1.5/R20051130/bin/rhel30/i386/RPMS/glite-jp-common-1.1.0-1.i386.rpm

-
-

glite-jp-primary

-
-

 

-
-

1.1.1

-
-

http://glite.web.cern.ch/glite/packages/R1.5/R20051130/bin/rhel30/i386/RPMS/glite-jp-primary-1.1.1-1.i386.rpm

-
-

glite-jp-server-common

-
-

 

-
-

1.0.0

-
-

http://glite.web.cern.ch/glite/packages/R1.5/R20051130/bin/rhel30/i386/RPMS/glite-jp-server-common-1.0.0-1.i386.rpm

-
-

glite-jp-ws-interface

-
-

 

-
-

1.1.0

-
-

http://glite.web.cern.ch/glite/packages/R1.5/R20051130/bin/rhel30/i386/RPMS/glite-jp-ws-interface-1.1.0-0.i386.rpm

-
-

glite-lb-client-interface

-
-

L&B client library header files

-
-

2.1.0

-
-

http://glite.web.cern.ch/glite/packages/R1.5/R20051130/bin/rhel30/i386/RPMS/glite-lb-client-interface-2.1.0-1.i386.rpm

-
-

glite-lb-config

-
-

gLite LB Configuration files

-
-

2.1.1

-
-

http://glite.web.cern.ch/glite/packages/R1.5/R20051130/bin/rhel30/i386/RPMS/glite-lb-config-2.1.1-1.i386.rpm

-
-

glite-lb-common

-
-

L&B common subroutines library

-
-

3.0.1

-
-

http://glite.web.cern.ch/glite/packages/R1.5/R20051130/bin/rhel30/i386/RPMS/glite-lb-common-3.0.1-1.i386.rpm

-
-

glite-lb-logger

-
-

L&B local logger

-
-

1.2.1

-
-

http://glite.web.cern.ch/glite/packages/R1.5/R20051130/bin/rhel30/i386/RPMS/glite-lb-logger-1.2.1-1.i386.rpm

-
-

glite-lb-server

-
-

L&B bookkeeping server

-
-

1.3.3

-
-

http://glite.web.cern.ch/glite/packages/R1.5/R20051130/bin/rhel30/i386/RPMS/glite-lb-server-1.3.3-1.i386.rpm

-
-

glite-lb-server-bones

-
-

L&B server bones

-
-

2.1.1

-
-

http://glite.web.cern.ch/glite/packages/R1.5/R20051130/bin/rhel30/i386/RPMS/glite-lb-server-bones-2.1.1-1.i386.rpm

-
-

glite-lb-ws-interface

-
-

 

-
-

2.1.0

-
-

http://glite.web.cern.ch/glite/packages/R1.5/R20051130/bin/rhel30/i386/RPMS/glite-lb-ws-interface-2.1.0-1.i386.rpm

-
-

glite-rgma-servicetool-config

-
-

gLite R-GMA servicetool installation

-
-

5.2.2

-
-

http://glite.web.cern.ch/glite/packages/R1.5/R20051130/bin/rhel30/noarch/RPMS/glite-rgma-servicetool-config-5.2.2-1.noarch.rpm

-
-

glite-security-gsoap-plugin

-
-

gSOAP plugin and gss libraries

-
-

1.2.1

-
-

http://glite.web.cern.ch/glite/packages/R1.5/R20051130/bin/rhel30/i386/RPMS/glite-security-gsoap-plugin-1.2.1-0.i386.rpm

-
-

glite-security-utils-config

-
-

gLite Security Utilities configuration files

-
-

1.2.1

-
-

http://glite.web.cern.ch/glite/packages/R1.5/R20051130/bin/rhel30/noarch/RPMS/glite-security-utils-config-1.2.1-1.noarch.rpm

-
-

glite-security-voms-api-c

-
-

 

-
-

1.6.10

-
-

http://glite.web.cern.ch/glite/packages/R1.5/R20051130/bin/rhel30/i386/RPMS/glite-security-voms-api-c-1.6.10-0.i386.rpm

-
-

glite-wms-utils-exception

-
-

 

-
-

1.0.3

-
-

http://glite.web.cern.ch/glite/packages/R1.5/R20051130/bin/rhel30/i386/RPMS/glite-wms-utils-exception-1.0.3-1.i386.rpm

-
-

glite-wms-utils-jobid

-
-

 

-
-

1.0.2

-
-

http://glite.web.cern.ch/glite/packages/R1.5/R20051130/bin/rhel30/i386/RPMS/glite-wms-utils-jobid-1.0.2-1.i386.rpm

-
- -

4. Dependencies

- -

The gLite Logging & Bookkeeping Server v. 2.1.1 module -has the following dependencies:

- -

 

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-

Component name

-
-

Description

-
-

Version

-
-

RPM file name

-
-

c-ares

-
-

A library that performs asynchronous DNS operations

-
-

1.3.0

-
-

http://glite.web.cern.ch/glite/packages/externals/bin/rhel30/RPMS/c-ares-1.3.0-1.slc3.i386.rpm

-
-

gpt

-
-

The Grid Packaging Toolkit (GPT)

-
-

VDT1.2.2rh9

-
-

http://glite.web.cern.ch/glite/packages/externals/bin/rhel30/RPMS/gpt-VDT1.2.2rh9-1.i386.rpm

-
-

gridsite

-
-

GridSite

-
-

1.1.15

-
-

http://glite.web.cern.ch/glite/packages/externals/bin/rhel30/RPMS/gridsite-1.1.15-1.i386.rpm

-
-

j2re

-
-

Java JRE

-
-

1.4.2

-
-

http://glite.web.cern.ch/glite/packages/externals/bin/rhel30/RPMS/j2re-1_4_2_08-linux-i586.rpm

-
-

myproxy

-
-

Credential repository for the Grid.

-
-

1.14

-
-

http://glite.web.cern.ch/glite/packages/externals/bin/rhel30/RPMS/myproxy-1.14-EGEE.i386.rpm

-
-

MySQL-client

-
-

MySQL - Client

-
-

4.1.11

-
-

http://glite.web.cern.ch/glite/packages/externals/bin/rhel30/RPMS/MySQL-client-4.1.11-0.i386.rpm

-
-

MySQL-server

-
-

MySQL

-
-

4.1.11

-
-

http://glite.web.cern.ch/glite/packages/externals/bin/rhel30/RPMS/MySQL-server-4.1.11-0.i386.rpm

-
-

perl-Expect.pm

-
-

Expect.pm module for perl (./id/A/AU/AUSCHUTZ)

-
-

1.01

-
-

http://glite.web.cern.ch/glite/packages/externals/bin/rhel30/RPMS/perl-Expect.pm-1.01-9.i386.rpm

-
-

vdt_globus_essentials

-
-

Virtual Data Toolkit

-
-

VDT1.2.2rh9

-
-

http://glite.web.cern.ch/glite/packages/externals/bin/rhel30/RPMS/vdt_globus_essentials-VDT1.2.2rh9-1.i386.rpm

-
- -

 

- -

5. Known bugs and issues

- -

This -release has the following bugs and issues. Bug numbers refer to the gLite Bug -Tracking system database hosted on the CERN Savannah system at Hhttps://savannah.cern.ch/bugs/?group=jra1mdwH .

- -

 

- -
    -
  • There is an infinite loop during - the initialization of the LB_Events data structure
  • -
  • No removal procedure is provided - with this release apart from the removal of the RPMS. Any account, group - or other resource created during the module configuration must be manually - cleaned.
  • -
- -

 

- -

Known open bugs:

- -

 

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-

Bug number

-
-

Description

-
-

 

-
-

 #7324

-
-

lb-bkserver is running with no - pid

-
-

 

-
-

 #9701

-
-

erroneous rpath in several - shared objects

-
-

 

-
-

 #9777

-
-

unable to get logging-info -2 - info for 1000 jobs

-
-

 

-
-

 #10781

-
-

Missing the timestamps of - 'Scheduled' and 'Running' status

-
-

 

-
-

 #11535

-
-

Job submission extremely slow

-
-

 

-
-

 #13418

-
-

problem in computing status (of - resubmitted jobs)

-
-

 

-
-

 #13492

-
-

Job State Information Log File

-
-

 

-
-

 #13832

-
-

Default mysql configuration - imposes unnecessary limits on LB server

-
-

 

-
-

 #13879

-
-

Some data do not propagate from - lbproxy to bkserver...

-
-

 

-
-

 #13929

-
-

The glite-lb-bkserverd has - wrong default for var directory

-
-

 

-
-

 #13951

-
-

lb proxy sends garbage response - on error

-
-

 

-
-

 #13988

-
-

Failed to start - glite-lb-locallogger on glite 1.4.1

-
-

 

-
-

 #14247

-
-

No events are found querying LB - for events satisfying jobid and source instance

-
-

 

-
-

 #14339

-
-

Wrong computing state when - proxy expires

-
-

 

-
- -

 

- -

Bugs fixed in this or previous releases, but not yet officially -tested:

- -

 

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-

Bug number

-
-

Description

-
-

 

-
-

 #7307

-
-

lb config script does _not_ fail - if mysql root password is set

-
-

 

-
-

 #7305

-
-

lb.database.username paramenter in - config file

-
-

 

-
-

 #7300

-
-

update of the lb instructions at - the end of the installer script

-
-

 

-
-

 #7053

-
-

LB configuration fails if the - mysql root pwd is set

-
-

 

-
-

 #13928

-
-

org.glite.lb.server depends on - full VOMS package instead of individual APIs packages

-
-

 

-
-

 #13048

-
-

interlogger does not handle errors - from bookkeeping server

-
-

 

-
-

 #12648

-
-

The memory usage of one LB process - keeps growing

-
-

 

-
-

 #11387

-
-

LBProxy SIGSEGV

-
-

 

-
-

 #11050

-
-

Too heavy locallogger retry - strategy

-
-

 

-
-

 #9183

-
-

Broken connections in LB contect - connection pool

-
-

 

-
-

 #9135

-
-

The interlogd has problem sending - event to the LB server

-
-

 

-
-

 #8630

-
-

EDG_WL_* variables in LB library

-
-

 

-
-

 #7910

-
-

Duplicate apostroph in MySQL calls

-
-

 

-
-

 #11509

-
-

glite-lb-config.py overwrites - HOSTNAME_org.glite.wms.workloadmanager.service with the wrong WMS version

-
-

 

-
-

 #10686

-
-

MySQL library fails on hostnames - containing dashes

-
-

 

-
- -

 

- -

6. Bugs closed since last release

- -

This -release fixes the following bugs and issues. Bug numbers refer to the gLite Bug -Tracking system database hosted on the CERN Savannah system at Hhttps://savannah.cern.ch/bugs/?group=jra1mdwH  

- -

 

- - - - - - - - - - - - - - - - - - - - - - - - - - - -
-

Bug number

-
-

Description

-
-

 

-
-

 #6722

-
-

glite-job-status -all doesn't - work

-
-

 

-
-

 #7237

-
-

Intermittent errors with job - submission

-
-

 

-
-

 #9148

-
-

Job stays 'Submitted' forever

-
-

 

-
-

 #10730

-
-

Error on glite-job-submit

-
-

 

-
- -

 

- -
- - - - diff --git a/org.glite.deployment.lb/doc/release_notes/release_notes.pdf b/org.glite.deployment.lb/doc/release_notes/release_notes.pdf deleted file mode 100644 index c512e91ddfd865b103c95e44d4642062ba7b9b67..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 157326 zcmdSB1yogE_b7UhEHmJ; zyZ4Rp-aCxVUVE;bJ=fZ6Z8A9_5n4t%7G$!;rM@9#1V&B<4nhV(8v}D59(plN4pw$T zMn-l{ZF(s)YoNZpnH$iEkda=PkdcFviGyB>kdc+0nTd^FhLD9`mXMK?k%?XjRDlyz zhnE)_Xl(>)2$}G2KV$?Kd!X^po|xE?5g2~{7}*H#Q-s#PU`$M`%>RTjfQR(Ya;$8e z|AMhIGX4|B3>wzIU~G&`|AKL{gNOkB{W%sEW_Ff;!PtKT^FQgr$iT+% zPnt3^vM~LVri`pCEdRuVk&Wr!_%bmt|D~Lxy}p?x&>k59B#nw7;RA^nGb_EEJ<$1H z${1Ma)f9lnijG!<;Cl25Ha3o+A`BpG2o>nXt&MF6nK(hi13w69@)&WlF>^8+b1<<0 z*;$Pk3_y8CtQ<^0HZ~y8kktUl%VT8B3}j_z2O1k0071+(&}U_0F=Pg^Gcz#jGZ`5e z^J;^{8o|L)-`?>-iW!g*$jF3cMUWBxA><$(0P**yB1r+QO&m=L85uYj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=by z9w2xy;|)lDfZzdw2M8V@crc>@1P>5AK=5G38<6|}!2<*j5IjKeU`7K79w2yt;K7VH zAo&4;2M8V@c!1!+j0O-qK=1&;gBfo?@&g195IjKe0KtP94Ip@c-~oaMGv0vY2M8V@ zc!1ymf(J7iK=1&;0|XCdyaCA%5IjKe0Ko$U4`wug-~oaM2p-IM1Ck#gc!1ymf(Hm5 z%xD0?0|XBcJectYBtJm#0Ko$U4-h<<(Ex%62p%AKFyjqKet_Tsf(Hm5Ab2pN0R#^a zJV5YZ#v73Q0Ko$U4-h=~{{s&Km~=N!29uXtSs7#I7Ro^3XjrPMDlfNx0G$~S!eqGc Sa^rAhUhZ}4w2gFlx&If#fv92t diff --git a/org.glite.deployment.lb/project/.cvsignore b/org.glite.deployment.lb/project/.cvsignore deleted file mode 100644 index caf4eaa..0000000 --- a/org.glite.deployment.lb/project/.cvsignore +++ /dev/null @@ -1 +0,0 @@ -glite-lb.sdf.xml diff --git a/org.glite.deployment.lb/project/build.number b/org.glite.deployment.lb/project/build.number deleted file mode 100644 index 306b97f..0000000 --- a/org.glite.deployment.lb/project/build.number +++ /dev/null @@ -1,2 +0,0 @@ -#Mon Mar 13 07:52:27 CET 2006 -module.build=0326 diff --git a/org.glite.deployment.lb/project/build.properties b/org.glite.deployment.lb/project/build.properties deleted file mode 100644 index e69de29..0000000 diff --git a/org.glite.deployment.lb/project/glite-lb.sdf.xml.template b/org.glite.deployment.lb/project/glite-lb.sdf.xml.template deleted file mode 100644 index 48d94a7..0000000 --- a/org.glite.deployment.lb/project/glite-lb.sdf.xml.template +++ /dev/null @@ -1,157 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/org.glite.deployment.lb/project/lxscript-rpm.xsl b/org.glite.deployment.lb/project/lxscript-rpm.xsl deleted file mode 100644 index c661ad7..0000000 --- a/org.glite.deployment.lb/project/lxscript-rpm.xsl +++ /dev/null @@ -1,336 +0,0 @@ - - - - - - - - - - - - - -#!/bin/sh - -# Copyright (c) Members of the EGEE Collaboration. 2004 -# See http://eu-egee.org/partners/ for details on the copyright holders -# For license conditions see the license file or http://eu-egee.org/license.html - -# glite-lb_installer v. -# -# The glite-lb_installer installs the gLite Logging and Bookkeeping Server -# -# Usage: glite-lb_installer [-u|-v|--help] -# -u uninstall -# -v print version -# --help print script usage info -# Return codes: 0 - Ok -# 1 - if a file could not be downloaded - -############################################################################### - -#Parse the RPMLIST to strip out the RPMS that are already installed -function parseRPMList() -{ - newRPMLIST="" - localRPMLIST=`rpm -qa` - for i in $RPMLIST - do - g=`echo $i | sed -e 's/\.i386\.rpm//g'` - g=`echo $g | sed -e 's/\.noarch\.rpm//g'` - if [ -z "`echo $localRPMLIST | grep $g`" ]; then - newRPMLIST="${newRPMLIST} $i" - else - echo "$i is already installed. It will be skipped." - fi - done - - RPMLIST=$newRPMLIST -} - -#Parse the SCRIPTLIST to execute all scripts -function parseScriptList() -{ - for i in $SCRIPTLIST - do - if [ "$INSTALL" = "true" ]; then - $i - else - $i -u - fi - done -} - -#Downloads and install the module RPMS -function install() -{ - - INSTALL=true - version - echo - echo xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx - echo x Please wait, downloading the gLite Logging and Bookkeeping Server... x - echo xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx - echo - - mkdir -p glite-lb - cd glite-lb - - # Download global dependencies - - - true - - - - - - # Download scripts from repository - - - true - - - - - # Download dependencies RPMS from repository - - - true - - - - # Download RPMS from repository - - - true - - - - - - # Download and install subservices - parseScriptList - - - # Install all RPMS - echo - echo xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx - echo x Please wait, installing the gLite Logging and Bookkeeping Server... x - echo xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx - echo - parseRPMList - if [ ! -z "$RPMLIST" ]; then - rpm -Uvh $RPMLIST - rpm_return=$? - else - echo All required RPMS are already installed - rpm_return=0 - fi - if [ "$rpm_return" == "0" ]; then - echo - echo Done! - echo - echo Before using the gLite LB, please create or update the configuration - echo files /opt/glite/etc/config/glite-lb.cfg.xml - echo and /opt/glite/etc/config/glite-global.cfg.xml - echo and run the configuration script - echo /opt/glite/etc/config/scripts/glite-lb-config.py. - echo A template is provided in - echo /opt/glite/etc/config/templates/glite-lb.cfg.xml - echo Alternatively site configuration files can be used - else - echo - echo An error occurred while installing the LB RPMS. - echo Most likely one or more of the RPMS to be installed require - echo additional dependencies or are older than already installed packages. - echo Please refer to the rpm error message above for more details. - fi - echo - echo For more information refer to the gLite Installation and User Guides - echo or to the gLite web site \(http:\/\/www.glite.org\) - echo Please report problems and comments to the gLite Team at - echo glite-bugs@cern.ch - - cd .. -} - -############################################################################### -function uninstall() -{ - version - - # Global dependencies - - - false - - - - - - # dependencies RPMS from repository - - - false - - - - # RPMS from repository - - - false - - - - - - # Uninstall all RPMS - echo xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx - echo x Please wait, uninstalling the gLite Logging and Bookkeeping Server... x - echo xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx - echo - rpm -ev $RPMLIST - if [ "$?" == "0" ]; then - echo - echo Done! - else - echo - echo An error occurred while removing the LB RPMS. - echo Most likely one or more of the RPMS to be removed have - echo dependent packages. - echo Please refer to the rpm error message above for more details. - fi -} - -############################################################################### -function usage() -{ - echo - echo Copyright \(c\) Members of the EGEE Collaboration. 2004 - echo See http://eu-egee.org/partners/ for details on the copyright holders - echo For license conditions see the license file or http://eu-egee.org/license.html - echo - echo glite-lb_installer v. - echo - echo The glite-lb_installer installs the gLite Logging and Bookkeeping Server - echo - echo Usage: glite-lb_installer \[-u\|-v\|--help\] - echo -u uninstall - echo -v print version - echo --help print script usage info - echo - echo Return codes: - echo 0 - Ok - echo 1 - if a file could not be downloaded - echo -} - -############################################################################### -function version -{ - echo - echo Copyright \(c\) Members of the EGEE Collaboration. 2004 - echo See http://eu-egee.org/partners/ for details on the copyright holders - echo For license conditions see the license file or http://eu-egee.org/license.html - echo - echo glite-lb_installer v. - echo -} - - -RPMLIST= - -############################################################################### -# Main - -while getopts uvh opt -do - case $opt in - 'u') uninstall - exit 0 - ;; - 'v') version - exit 0 - ;; - 'h') usage - exit 0 - ;; - esac -done - -install - -exit 0 - - - - - _installer.sh - - -wget -N -nv -if [ ! -f "" ] -then - echo - echo ERROR: could not be downloaded! - exit 1 -fi -chmod u+x -SCRIPTLIST="$SCRIPTLIST ./" - - -SCRIPTLISTUn="$SCRIPTLISTUn ./ -u " - - - - - - - - --..rpm - -- - - -wget -N -nv -if [ ! -f "" ] -then - echo - echo ERROR: could not be downloaded! - exit 1 -fi -RPMLIST="$RPMLIST " - - -RPMLIST="$RPMLIST " - - - - - - - --..rpm - -- - - -wget -N -nv /RPMS/ -if [ ! -f "" ] -then - echo - echo ERROR: could not be downloaded! - exit 1 -fi -RPMLIST="$RPMLIST " - - -RPMLIST="$RPMLIST " - - - - - diff --git a/org.glite.deployment.lb/project/lxscript-tgz.xsl b/org.glite.deployment.lb/project/lxscript-tgz.xsl deleted file mode 100644 index 5b55e40..0000000 --- a/org.glite.deployment.lb/project/lxscript-tgz.xsl +++ /dev/null @@ -1,62 +0,0 @@ - - - - - - - - - - - - -#!/bin/sh -# -# glite-lb_tgz_installer -# usage: glite-lb_tgz_installer [-u] -# -u uninstall -# -# glite-lb_tgz_installer installs the gLite Deployment Unit from biniary tarballs -# - -PREFIX=/opt/glite - -############################################################################### -# Download global dependencies - - - -############################################################################### - - -############################################################################### -# Download dependencies RPMS from repository - - - -############################################################################### -# Download RPMS from repository - - - -############################################################################### - - - - - - --..rpm -wget - - - - -_bin.tar.gz -wget i386/tgz/ -tar -xzf $PREFIX - - - diff --git a/org.glite.deployment.lb/project/properties.xml b/org.glite.deployment.lb/project/properties.xml deleted file mode 100644 index ef87369..0000000 --- a/org.glite.deployment.lb/project/properties.xml +++ /dev/null @@ -1,73 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/org.glite.deployment.lb/project/quattor-template.xsl b/org.glite.deployment.lb/project/quattor-template.xsl deleted file mode 100644 index 74f841d..0000000 --- a/org.glite.deployment.lb/project/quattor-template.xsl +++ /dev/null @@ -1,64 +0,0 @@ - - - - - - - - - - -template pro_software_glite_lb; - -# -# Copyright (c) Members of the EGEE Collaboration. 2004 -# See http://eu-egee.org/partners/ for details on the copyright holders -# For license conditions see the license file or http://eu-egee.org/license.html -# -# glite-lb Quattor template v. -# - -## CAs - -include pro_software_glite_CA; - - - -# Global dependencies - - - - - - -# dependencies - - - - -# RPMS - - - - - -include pro_software_; - - - - - - - -"/software/packages"=pkg_repl("","-",""); - - - -"/software/packages"=pkg_repl("","-",""); - - - diff --git a/org.glite.deployment.lb/project/version.properties b/org.glite.deployment.lb/project/version.properties deleted file mode 100644 index bb1d337..0000000 --- a/org.glite.deployment.lb/project/version.properties +++ /dev/null @@ -1,4 +0,0 @@ - -module.version = 2.3.0 -module.age = 0 - \ No newline at end of file diff --git a/org.glite.jp.client/.cvsignore b/org.glite.jp.client/.cvsignore deleted file mode 100644 index 3a4edf6..0000000 --- a/org.glite.jp.client/.cvsignore +++ /dev/null @@ -1 +0,0 @@ -.project diff --git a/org.glite.jp.client/Makefile b/org.glite.jp.client/Makefile deleted file mode 100644 index dfec596..0000000 --- a/org.glite.jp.client/Makefile +++ /dev/null @@ -1,175 +0,0 @@ -# defaults -top_srcdir=. -builddir=build -top_builddir=${top_srcdir}/${builddir} -stagedir=. -distdir=. -globalprefix=glite -jpprefix=jp -package=glite-jp-client -version=0.0.0 -PREFIX=/opt/glite - -glite_location=/opt/glite -globus_prefix=/opt/globus -nothrflavour=gcc32 -thrflavour=gcc32pthr -expat_prefix=/opt/expat -gsoap_prefix=/software/gsoap-2.6 - -CC=gcc - --include Makefile.inc - -STAGETO=include/${globalprefix}/${jpprefix} - -VPATH=${top_srcdir}/src:${top_srcdir}/examples:${top_srcdir}/project$:${top_srcdir}/interface:${stagedir}/interface:${top_srcdir}/build - -GLOBUS_LIBS:=-L${globus_prefix}/lib \ - -lglobus_common_${nothrflavour} \ - -lglobus_gssapi_gsi_${nothrflavour} \ - -lglobus_ftp_client_${nothrflavour} \ - -lglobus_ftp_control_${nothrflavour} - -GLOBUS_CFLAGS:=-I${globus_prefix}/include/${nothrflavour} - -DEBUG:=-g -O0 -DDEBUG - -CFLAGS:=${DEBUG} -I. -I${top_srcdir}/interface -I${top_srcdir}/src -I${gsoap_prefix}/include -I${gsoap_prefix} -I${stagedir}/include ${GLOBUS_CFLAGS} -I${libtar}/include -LDFLAGS:=-L${stagedir}/lib -L${libtar}/lib - -LINK:=libtool --mode=link ${CC} ${LDFLAGS} -LTCOMPILE:=libtool --mode=compile ${CC} ${CFLAGS} -LINKXX:=libtool --mode=link ${CXX} ${LDFLAGS} -INSTALL:=libtool --mode=install install - -STAGE_HDRS:=jpcl_ctx_int.h -HDRS:=jp_client.h jpimporter.h - -EXAMPLES:=jpps_upload_files - -LIBOBJS:=jpcl_ctx.o jpimp_lib.o -LIBTHROBJS:=${LIBOBJS:.o=.thr.o} -LIBLOBJS:=${LIBOBJS:.o=.lo} - -LIB:=libglite_jp_importer_${nothrflavour}.la -THRLIB:=libglite_jp_importer_${thrflavour}.la - -daemon:=glite-jp-importer - -wsprefix:=jpps_ - -SRCS:=jpimporter.c ${wsprefix}ClientLib.c ${wsprefix}C.c -OBJS:=${SRCS:.c=.o} - -gsoap_bin_prefix:=${shell if [ -x ${gsoap_prefix}/bin/soapcpp2 ]; then echo ${gsoap_prefix}/bin; else echo ${gsoap_prefix}; fi } -dotless_gsoap_ver:=${shell echo ${gsoap_version} | tr -d . } -GSOAPLIB:=-lglite_security_gsoap_plugin_${dotless_gsoap_ver}_${nothrflavour} - -LBMAILDIRLIB:=-lglite_lb_maildir - -offset=0 -version_info:=-version-info ${shell \ - perl -e '$$,=":"; @F=split "\\.","${version}"; print $$F[0]+$$F[1]+${offset},$$F[2],$$F[1]' } - - -default all: compile - -compile: ${daemon} ${LIB} ${EXAMPLES} - -examples: ${EXAMPLES} - -# XXX: should depend on -ltar but we have no dynamic version so far :-( -${LIB}: ${LIBOBJS} - ${LINK} ${version_info} -o $@ ${LIBLOBJS} -rpath ${glite_location}/lib ${LBMAILDIRLIB} - -${daemon}: ${OBJS} - ${LINK} -o $@ ${OBJS} ${LBMAILDIRLIB} ${GSOAPLIB} ${GLOBUS_LIBS} - -${EXAMPLES}: ${LIB} - -# XXX: -ltar should be in the library -${EXAMPLES}: %: %.o - ${LINK} -o $@ $< ${LIB} ${LBMAILDIRLIB} -ltar - - - -JobProvenancePS.xh: %.xh: %.wsdl JobProvenanceTypes.wsdl typemap.dat - cp ${stagedir}/interface/JobProvenanceTypes.wsdl . - ${gsoap_bin_prefix}/wsdl2h -t ${top_srcdir}/src/typemap.dat -c -o $@ $< - rm -f JobProvenanceTypes.wsdl - -${wsprefix}Client.c ${wsprefix}ClientLib.c \ -${wsprefix}C.c ${wsprefix}H.h: JobProvenancePS.xh - ${gsoap_bin_prefix}/soapcpp2 -n -w -c -p ${wsprefix} JobProvenancePS.xh - -env_C.c env_Server.c: - touch env.xh - cp ${jpproject}/JobProvenanceTypes.wsdl . - ${gsoap_bin_prefix}/wsdl2h -t ${top_srcdir}/src/typemap.dat -c -o env.xh JobProvenanceTypes.wsdl - rm -f JobProvenanceTypes.wsdl - ${gsoap_bin_prefix}/soapcpp2 -w -c -p env_ env.xh - -${OBJS}: ${wsprefix}H.h soap_version.h - -soap_version.h: - ${gsoap_bin_prefix}/soapcpp2 /dev/null - perl -ne '$$. == 2 && /.*([0-9])\.([0-9])\.([0-9]).*/ && printf "#define GSOAP_VERSION %d%02d%02d\n",$$1,$$2,$$3' soapH.h >$@ - -rm soapC.cpp soapH.h soapStub.h soapClient.cpp soapServer.cpp soapClientLib.cpp soapServerLib.cpp - - - - -check: - -echo nothing yet - -doc: - -stage: compile - ${MAKE} PREFIX=${stagedir} DOSTAGE=yes install - -dist: distsrc distbin - -distsrc: - mkdir -p ${top_srcdir}/${package}-${version} - cd ${top_srcdir} && GLOBIGNORE="${package}-${version}" && cp -Rf * ${package}-${version} - cd ${top_srcdir} && tar -czf ${distdir}/${package}-${version}_src.tar.gz --exclude-from=project/tar_exclude ${package}-${version} - rm -rf ${top_srcdir}/${package}-${version} - -distbin: - $(MAKE) install PREFIX=`pwd`/tmpbuilddir${stagedir} - save_dir=`pwd`; cd tmpbuilddir${stagedir} && tar -czf $$save_dir/${top_srcdir}/${distdir}/${package}-${version}_bin.tar.gz *; cd $$save_dir - rm -rf tmpbuilddir - -install: - -mkdir -p ${PREFIX}/${STAGETO} - -mkdir -p ${PREFIX}/bin - -mkdir -p ${PREFIX}/lib - -mkdir -p ${PREFIX}/examples - -mkdir -p ${PREFIX}/etc/init.d - ${INSTALL} -m 755 ${daemon} ${PREFIX}/bin - ${INSTALL} -m 644 ${LIB} ${PREFIX}/lib - ${INSTALL} -m 644 jpps_upload_files ${PREFIX}/examples/glite-jp-primary-upload_files - cd ${top_srcdir}/examples && ${INSTALL} -m 755 glite-jp-importer.sh ${PREFIX}/examples/ - ${INSTALL} -m 755 ${top_srcdir}/config/startup ${PREFIX}/etc/init.d/glite-jp-importer - cd ${top_srcdir}/interface && ${INSTALL} -m 644 ${HDRS} ${PREFIX}/${STAGETO} - if [ x${DOSTAGE} = xyes ]; then \ - cd ${top_srcdir}/interface && ${INSTALL} -m 644 ${STAGE_HDRS} ${PREFIX}/${STAGETO} ; \ - fi - - -clean: - -# we have no real config.h but have to force gSoap not to use -# linux ftime with broken (aka obsolete) DST information -stdsoap2.o: ${gsoap_prefix}/devel/stdsoap2.c - test -f config.h || touch config.h - @echo 'The following warning "time_t (de)serialization is not MT safe on this platform" is harmless' - ${CC} -o $@ -c -DWITH_NONAMESPACES -DHAVE_CONFIG_H ${CFLAGS} ${gsoap_prefix}/devel/stdsoap2.c - - -%.lo: %.c - ${LTCOMPILE} -o $@ -c $< - -%.o: %.c - ${LTCOMPILE} -o $@ -c $< diff --git a/org.glite.jp.client/build.xml b/org.glite.jp.client/build.xml deleted file mode 100755 index 8a40155..0000000 --- a/org.glite.jp.client/build.xml +++ /dev/null @@ -1,86 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/org.glite.jp.client/config/startup b/org.glite.jp.client/config/startup deleted file mode 100755 index 5d5173e..0000000 --- a/org.glite.jp.client/config/startup +++ /dev/null @@ -1,112 +0,0 @@ -#! /bin/sh - -GLITE_LOCATION=${GLITE_LOCATION:-/opt/glite} -GLITE_LOCATION_VAR=${GLITE_LOCATION_VAR:-/var/glite} - -[ -f /etc/glite.conf ] && . /etc/glite.conf -[ -f $GLITE_LOCATION/etc/glite-wms.conf ] && . $GLITE_LOCATION/etc/glite-wms.conf - -[ -f $GLITE_LOCATION/etc/lb.conf ] && . $GLITE_LOCATION/etc/lb.conf -[ -f $GLITE_LOCATION_VAR/etc/lb.conf ] && . $GLITE_LOCATION_VAR/etc/lb.conf - -[ -f $HOME/.glite.conf ] && . $HOME/.glite.conf - -[ -n "$GLITE_JP_IMPORTER_PIDFILE" ] && pidfile=$GLITE_JP_IMPORTER_PIDFILE || - pidfile=$GLITE_LOCATION_VAR/glite-jp-importer.pid - -unset creds port - -start() -{ - if test -z "$GLITE_USER" ;then - echo 'Error: GLITE_USER is not set' - echo FAILED - return 1 - fi - - [ -n "$GLITE_HOST_CERT" -a -n "$GLITE_HOST_KEY" ] && - creds="-c $GLITE_HOST_CERT -k $GLITE_HOST_KEY" - - if test -z "$creds"; then - if su - $GLITE_USER -c "test -r /etc/grid-security/hostkey.pem -a -r /etc/grid-security/hostcert.pem"; then - echo "$0: WARNING: /etc/grid-security/hostkey.pem readable by $GLITE_USER" - creds="-c /etc/grid-security/hostcert.pem -k /etc/grid-security/hostkey.pem" - fi - fi - - [ -z "$creds" ] && echo $0: WARNING: No credentials specified. Using default lookup which is dangerous. >&2 - - [ -n "$GLITE_LB_EXPORT_JPREG_MAILDIR" ] && jpreg_maildir="--reg-mdir $GLITE_LB_EXPORT_JPREG_MAILDIR " - [ -z "$GLITE_LB_EXPORT_JPDUMP_MAILDIR" ] && GLITE_LB_EXPORT_JPDUMP_MAILDIR=/tmp/jpdump - jpdump_maildir="--dump-mdir $GLITE_LB_EXPORT_JPDUMP_MAILDIR " - [ -d "$GLITE_LB_EXPORT_JPDUMP_MAILDIR" ] || mkdir "$GLITE_LB_EXPORT_JPDUMP_MAILDIR" && chown $GLITE_USER:$GLITE_GROUP "$GLITE_LB_EXPORT_JPDUMP_MAILDIR" - [ -n "$GLITE_LB_EXPORT_JPPS" ] && jpps="--jpps $GLITE_LB_EXPORT_JPPS " - - [ -n "$GLITE_LB_EXPORT_SANDBOX_MAILDIR" ] && sandbox_maildir="--sandbox-mdir $GLITE_LB_EXPORT_SANDBOX_MAILDIR " - - if [ -n "$GLITE_LB_EXPORT_JOBSDIR_KEEP" ]; then - keep_jobs="--store ${GLITE_LB_EXPORT_JOBSDIR_KEEP} " - [ -d $GLITE_LB_EXPORT_JOBSDIR_KEEP ] || mkdir -p $GLITE_LB_EXPORT_JOBSDIR_KEEP - fi - - echo -n Starting glite-jp-importer ... - -# XXX: HEAD -# -i $pidfile $jpreg_maildir $jpdump_maildir $jpps $sandbox_maildir $creds" \ - - su - $GLITE_USER -c "$GLITE_LOCATION/bin/glite-jp-importer \ - -i $pidfile $jpreg_maildir $jpdump_maildir $jpps $sandbox_maildir $keep_jobs $creds" \ - && echo " done" || echo " FAILED" -} - -stop() -{ - if [ -f $pidfile ]; then - pid=`cat $pidfile` - kill $pid - echo -n Stopping glite-jp-importer \($pid\) ... - try=0 - while ps p $pid >/dev/null 2>&1; do - sleep 1; - try=`expr $try + 1` - if [ $try = 20 ]; then - echo " giving up after $try retries" - return 1 - fi - done - echo " done" - rm -f $pidfile - else - echo $pidfile does not exist - glite-jp-importer not running? >&2 - return 1 - fi -} - -status() -{ - retval=0 - - if [ -f $pidfile ]; then - pid=`cat $pidfile` - if ps p $pid >/dev/null 2>&1; then - echo glite-jp-importer running as $pid - else - echo glite-jp-importer not running - retval=1 - fi - else - echo glite-jp-importer not running - retval=1 - fi - - return $retval -} - -case x$1 in - xstart) start;; - xstop) stop;; - xrestart) stop; start;; - xstatus) status;; - x*) echo usage: $0 start,stop,restart,status >&2 - exit 1;; -esac diff --git a/org.glite.jp.client/doc/README.jpimporter b/org.glite.jp.client/doc/README.jpimporter deleted file mode 100644 index 3e8bb2d..0000000 --- a/org.glite.jp.client/doc/README.jpimporter +++ /dev/null @@ -1,115 +0,0 @@ -jpimporter is a daemon which take care of all job registration from particular -LB server, forwarding them to the JP primary service and also file uploads, which -means sending LB dumps, sendbox files etc. to ftp server dedicated by JP PS. - -The daemon runs two proceses, one for registrations and another for file uploads. -Both processes reads the local directory which has a given structure and are -handled by glite-lb-maildir library calls. - - - -Namely for the registrations, LB server creates the message describing job, its -owner and JP primary server address and stores it into given maildir location -(i.e. /tmp/lb_server_jpreg/). The jpimporter daemon which is running on the same -host is periodicaly scanning this directory and whenever new messages appears, -attempts to register this described job to JP PS. - -For the file upload is the jpimporter behavior almost the same except the -message has different structure and a file to deliver must be placed in the -filesystem. - -For LB dumps, there is another utility, which parses common LB dump files -(created when purging the LB server), creates one file per every job and stores -message describing the location, destination etc. to local directory. This -message directory should be obviously monitored by the jpimporter again. - -lb_dump_exporter utility usage: lt-lb_dump_exporter [option] - -h, --help Shows this screen. - -d, --dump Dump file location. - File generated by the glite-lb-purge - -s, --store New dump files storage. - Directory, where to store all dump files - -j, --jpps Target JPPS. - jpps where should the file be uploaded - -m, --lbmaildir LB maildir path. - Directory, where should be stored the message - describing the file upload (read by jpimporter) - -jpimporter daemon usage: glite-jp-importer [option] - -h, --help displays this screen - -k, --key private key file - -c, --cert certificate file - -C, --CAdir trusted certificates directory - -g, --debug don't run as daemon, additional diagnostics - -p, --jpps JP primary service server - this JPPS server is used by default, when user/lb/... - does not specifies one - -r, --reg-mdir path to the 'LB maildir' subtree for registrations - This directory is scanned for the job registration - messages. - -d, --dump-mdir path to the 'LB maildir' subtree for LB dumps - This directory is scanned for the file upload msgs. - -s, --sandbox-mdir path to the 'LB maildir' subtree for input/output sandboxes - -i, --pidfile file to store master pid - -t, --poll maildir polling interval (in seconds) - Specifies the time interval for which the process - JobRegistration/FileUpload sleeps after the unsuccessful - scan (find no new messages) -Examples: - -So, for the job registration and dump upload from the LB server, you should run the -LB server like this: -./glite_lb_bkserverd -c -k -S /var/tmp/purge -D /var/tmp/dump -J /tmp/lb_server_jpreg - -(Whenever the job is registered to the LB server, the message for jpimporter -is stored in the /tmp/lb_server_jpreg directory.) - -Then you should run the jpimporter daemon on the same host: -./glite-jp-importer -c -k -p jpps.server.address:8900 -r /tmp/lb_server_jpreg -d /tmp/lb_server_jpdump - -(Every job registration anounced in /tmp/lb_server_jpreg directory will be sent -to the JP PS at the address jpps.server.address:8900.) - -According the dump files - on the same host should be periodicaly ran the -glite-lb-purge utility. (Usually started by cron) Let say, that it stores the -LB dump file /var/tmp/purge/dump_file. - -Then you should run (most likely in the same cron job) -./lb_dump_exporter -d /var/tmp/purge/dump_file -s /var/tmp/dumps_per_job -j jpps.server.address:8900 -m /tmp/lb_server_jpdump - -(Then there is created a set of LB dump file - one per job - and according to them -lb_dump_exporter will also notify the glite-jp-importer) - - - - -For the sandbox files, you should use the JP client API to create messages for -jpimporter. The function glite_jpimporter_upload_files() do the job. It takes -one ore more files and create one tarball. Then everything works like with -LB dumps. - -There is an example utility in org.glite.jp.client/examples/jpps_upload_files.c -(staged as glite-jp-primary-upload_files). - -The glite_jpimporter_upload_files funftion prototype: - -int glite_jpimporter_upload_files( - /* JP client context. - * stores the error code/description - * user can set default JP PS address there and - * LB directory for jpimporter announcements - */ - glite_jpcl_context_t ctx, - - /* JobId - */ - const char *jobid, - /* File list. Stored in the array of string. - * Last item has to be NULL - */ - const char **files, - /* Location of the user proxy file - */ - const char *proxy); - - diff --git a/org.glite.jp.client/examples/glite-jp-importer.sh b/org.glite.jp.client/examples/glite-jp-importer.sh deleted file mode 100644 index 4d2f737..0000000 --- a/org.glite.jp.client/examples/glite-jp-importer.sh +++ /dev/null @@ -1,92 +0,0 @@ -#! /bin/bash - -# -# all-in-one example script for purging LB and importing the dumps to JP -# - -GLITE_LOCATION=${GLITE_LOCATION:-/opt/glite} -GLITE_LOCATION_VAR=${GLITE_LOCATION_VAR:-${GLITE_LOCATION}/var} - -[ -f /etc/glite.conf ] && . /etc/glite.conf -[ -f $GLITE_LOCATION/etc/glite-wms.conf ] && . $GLITE_LOCATION/etc/glite-wms.conf - -[ -f $GLITE_LOCATION/etc/jp.conf ] && . $GLITE_LOCATION/etc/jp.conf -[ -f $GLITE_LOCATION_VAR/etc/jp.conf ] && . $GLITE_LOCATION_VAR/etc/jp.conf - -[ -f $HOME/.glite.conf ] && . $HOME/.glite.conf - - -# job provenance server -if [ -z "$GLITE_LB_EXPORT_JPPS" ]; then - echo "Please specify the Job Provanance Primary Storage server." - exit 1 -fi -# book keeping server -GLITE_LB_SERVER_PORT=${GLITE_LB_SERVER_PORT:-9000} -GLITE_LB_EXPORT_BKSERVER=${GLITE_LB_EXPORT_BKSERVER:-localhost:$GLITE_LB_SERVER_PORT} -# certificates -if [ -z "$X509_USER_CERT" -o -z "$X509_USER_KEY" ]; then - echo "Please set X509_USER_CERT and X509_USER_KEY." - exit 1 -fi -# dump directory of bkserver -if [ -z "$GLITE_LB_EXPORT_DUMPDIR" ]; then - GLITE_LB_EXPORT_DUMPDIR=/tmp/dump - echo "GLITE_LB_EXPORT_DUMPDIR not specified (-D arguent of the bkserver), used $GLITE_LB_EXPORT_DUMPDIR" -fi -# LB maildir for job registration -if [ -z "$GLITE_LB_EXPORT_JPREG_MAILDIR" ]; then - GLITE_LB_EXPORT_JPREG_MAILDIR=/tmp/jpreg - echo "GLITE_LB_EXPORT_JPREG_MAILDIR not specified (-J arguent of the bkserver), used $GLITE_LB_EXPORT_JPREG_MAILDIR" -fi -# pidfile -[ -n "$GLITE_JP_IMPORTER_PIDFILE" ] && pidfile="-i $GLITE_JP_IMPORTER_PIDFILE " - -CERT_ARGS="-c $X509_USER_CERT -k $X509_USER_KEY" -GLITE_LB_EXPORT_JPDUMP_MAILDIR=${GLITE_LB_EXPORT_JPDUMP_MAILDIR:-/tmp/jpdump} -GLITE_LB_EXPORT_SANDBOX_MAILDIR=${GLITE_LB_EXPORT_SANDBOX_MAILDIR:-/tmp/jpsandbox} -GLITE_LB_EXPORT_JOBSDIR=${GLITE_LB_EXPORT_JOBSDIR:-/tmp/lbexport} -PREFIX=${PREFIX:-`dirname $0`/..} -LOGDIR=$GLITE_LOCATION_VAR -GLITE_LB_EXPORT_PURGE_ARGS=${GLITE_LB_EXPORT_PURGE_ARGS:---cleared 2d --aborted 2w --cancelled 2w --other 2m} - - -[ -d $GLITE_LB_EXPORT_JPDUMP_MAILDIR ] || mkdir -p $GLITE_LB_EXPORT_JPDUMP_MAILDIR -[ -d $GLITE_LB_EXPORT_DUMPDIR ] || mkdir -p $GLITE_LB_EXPORT_DUMPDIR - -[ -d $GLITE_LB_EXPORT_SANDBOX_MAILDIR ] || mkdir -p $GLITE_LB_EXPORT_SANDBOX_MAILDIR - -[ -n "$GLITE_LB_EXPORT_DUMPDIR_KEEP" -a ! -d $GLITE_LB_EXPORT_DUMPDIR_KEEP ] && mkdir -p $GLITE_LB_EXPORT_DUMPDIR_KEEP -[ -d $GLITE_LB_EXPORT_JOBSDIR ] || mkdir -p $GLITE_LB_EXPORT_JOBSDIR -if [ -n "$GLITE_LB_EXPORT_JOBSDIR_KEEP" ]; then - keep_jobs="--store ${GLITE_LB_EXPORT_JOBSDIR_KEEP} " - [ -d $GLITE_LB_EXPORT_JOBSDIR_KEEP ] || mkdir -p $GLITE_LB_EXPORT_JOBSDIR_KEEP -fi - -[ -d $LOGDIR ] || mkdir -p $LOGDIR - -echo "Using cert args $CERT_ARGS" - -$PREFIX/bin/glite-jp-importer --reg-mdir $GLITE_LB_EXPORT_JPREG_MAILDIR --dump-mdir $GLITE_LB_EXPORT_JPDUMP_MAILDIR $CERT_ARGS --sandbox-mdir $GLITE_LB_EXPORT_SANDBOX_MAILDIR -g --jpps $GLITE_LB_EXPORT_JPPS $pidfile$keep_jobs> $LOGDIR/jp-importer.log 2>&1 & - -JP_PID=$! -trap "kill $JP_PID; exit 0" SIGINT - -while [ 1 ]; do - $PREFIX/sbin/glite-lb-purge $GLITE_LB_EXPORT_PURGE_ARGS -l -m $GLITE_LB_EXPORT_BKSERVER -s - - for file in $GLITE_LB_EXPORT_DUMPDIR/*; do - if [ -s $file ]; then - $PREFIX/sbin/glite-lb-lb_dump_exporter -d $file -s $GLITE_LB_EXPORT_JOBSDIR -m $GLITE_LB_EXPORT_JPDUMP_MAILDIR - if [ -n "$GLITE_LB_EXPORT_DUMPDIR_KEEP" ]; then - mv $file $GLITE_LB_EXPORT_DUMPDIR_KEEP - else - rm $file - fi - else - rm $file - fi - done - - sleep 30 -done diff --git a/org.glite.jp.client/examples/jpps_upload_files.c b/org.glite.jp.client/examples/jpps_upload_files.c deleted file mode 100644 index 48ff776..0000000 --- a/org.glite.jp.client/examples/jpps_upload_files.c +++ /dev/null @@ -1,81 +0,0 @@ -#include -#include -#include - -#include "jp_client.h" -#include "jpimporter.h" - -static char *myname; - -void usage(void) -{ - fprintf(stderr, - "Usage: %s [-h][-p user_proxy][-j jobid] file [file ...]\n" - " -h show this help\n" - " -p path to the proxy filename\n" - " -j jobid string\n" - " -m location of the lb maildir structure\n" - " -s JP PS server address and port\n" - , myname); -} - -int main(int argc, char **argv) -{ - glite_jpcl_context_t ctx; - char **files, - *jobid = NULL, - *proxy = NULL, - *lbmd = NULL, - *jpps = NULL; - int i, j; - - - myname = strrchr(argv[0],'/'); - if ( myname ) myname++; else myname = argv[0]; - - if ( argc < 2 ) { usage(); return 1; } - for ( i = 1; i < argc; i++ ) { - if ( argv[i][0] != '-' ) break; - if ( argv[i][1] == 'j' ) jobid = argv[++i]; - else if ( argv[i][1] == 'p' ) proxy = argv[++i]; - else if ( argv[i][1] == 'm' ) lbmd = argv[++i]; - else if ( argv[i][1] == 's' ) jpps = argv[++i]; - else if ( argv[i][1] == 'h' || argv[i][1] == '?' ) {usage();return 0;} - else {usage();return 1;} - } - - if ( i >= argc ) { usage(); return 1; } - - if ( !proxy && !(proxy = getenv("X509_USER_PROXY")) ) { - perror("-p or X509_USER_PROXY must be set!\n"); - return 1; - } - - if ( !(files = calloc(argc-i+1, sizeof(*files))) ) { - perror("calloc()"); - return 1; - } - j = 0; - while ( i < argc ) files[j++] = argv[i++]; - - if ( glite_jpcl_InitContext(&ctx) ) { - perror("glite_jpcl_InitContext()"); - return 1; - } - - if ( lbmd ) glite_jpcl_SetParam(ctx, GLITE_JPCL_PARAM_LBMAILDIR, lbmd); - if ( jpps ) glite_jpcl_SetParam(ctx, GLITE_JPCL_PARAM_JPPS, jpps); - - if ( glite_jpimporter_upload_files(ctx, jobid, (const char **)files, proxy) ) { - char *errt, *errd; - - glite_jpcl_Error(ctx, &errt, &errd); - printf("Error calling glite_jpimporter_upload_files()\n\t%s: %s\n", - errt, errd); - glite_jpcl_FreeContext(ctx); - return 1; - } - - glite_jpcl_FreeContext(ctx); - return 0; -} diff --git a/org.glite.jp.client/interface/jp_client.h b/org.glite.jp.client/interface/jp_client.h deleted file mode 100644 index 6592a24..0000000 --- a/org.glite.jp.client/interface/jp_client.h +++ /dev/null @@ -1,31 +0,0 @@ -#ifndef __GLITE_JP_CLIENT__ -#define __GLITE_JP_CLIENT__ - -#ifdef __cplusplus -extern "C" { -#endif - -typedef struct _glite_jpcl_context_t *glite_jpcl_context_t; - -typedef enum _glite_jpcl_ctx_param_t { - GLITE_JPCL_PARAM_JPPS, - GLITE_JPCL_PARAM_LBMAILDIR -} glite_jpcl_ctx_param_t; - -extern int glite_jpcl_InitContext(glite_jpcl_context_t *); -extern void glite_jpcl_FreeContext(glite_jpcl_context_t); - -extern int glite_jpcl_SetParam( - glite_jpcl_context_t ctx, - int param, ... ); - -extern int glite_jpcl_Error( - glite_jpcl_context_t ctx, - char **errt, - char **errd); - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/org.glite.jp.client/interface/jpcl_ctx_int.h b/org.glite.jp.client/interface/jpcl_ctx_int.h deleted file mode 100644 index dcf6038..0000000 --- a/org.glite.jp.client/interface/jpcl_ctx_int.h +++ /dev/null @@ -1,23 +0,0 @@ -#ifndef __GLITE_JPCLIENT_CONTEXT_INT -#define __GLITE_JPCLIENT_CONTEXT_INT - -#ifdef __cplusplus -extern "C" { -#endif - -struct _glite_jpcl_context_t { - int errCode; - char *errDesc; - - char *jpps; - char *lbmd_dir; -}; - -extern int glite_jpcl_SetError(glite_jpcl_context_t, int, const char *); -extern int glite_jpcl_ResetError(glite_jpcl_context_t); - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/org.glite.jp.client/interface/jpimporter.h b/org.glite.jp.client/interface/jpimporter.h deleted file mode 100644 index 93f7c72..0000000 --- a/org.glite.jp.client/interface/jpimporter.h +++ /dev/null @@ -1,18 +0,0 @@ -#ifndef __GLITE_JPIMPORTER__ -#define __GLITE_JPIMPORTER__ - -#ifdef __cplusplus -extern "C" { -#endif - -extern int glite_jpimporter_upload_files( - glite_jpcl_context_t ctx, - const char *jobid, - const char **files, - const char *proxy); - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/org.glite.jp.client/project/build.number b/org.glite.jp.client/project/build.number deleted file mode 100644 index 39605c5..0000000 --- a/org.glite.jp.client/project/build.number +++ /dev/null @@ -1,2 +0,0 @@ -#Thu Dec 15 09:23:26 CET 2005 -module.build=0 diff --git a/org.glite.jp.client/project/build.properties b/org.glite.jp.client/project/build.properties deleted file mode 100644 index e69de29..0000000 diff --git a/org.glite.jp.client/project/configure.properties.xml b/org.glite.jp.client/project/configure.properties.xml deleted file mode 100644 index b475ce3..0000000 --- a/org.glite.jp.client/project/configure.properties.xml +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - - - - - - -top_srcdir=.. -builddir=build -stagedir=${stage.abs.dir} -distdir=${dist.dir} -globalprefix=${global.prefix} -lbprefix=${subsystem.prefix} -package=${module.package.name} -PREFIX=${install.dir} -version=${module.version} -glite_location=${with.glite.location} -globus_prefix=${with.globus.prefix} -expat_prefix=${with.expat.prefix} -gsoap_prefix=${with.gsoap.prefix} -gsoap_version=${ext.gsoap.version} -mysql_prefix=${with.mysql.prefix} -mysql_version=${ext.mysql.version} -libtar=${with.libtar.prefix} -thrflavour=${with.globus.thr.flavor} -nothrflavour=${with.globus.nothr.flavor} -cppunit=${with.cppunit.prefix} -jpproject=${subsystem.project.dir} -project=${component.project.dir} - - - diff --git a/org.glite.jp.client/project/properties.xml b/org.glite.jp.client/project/properties.xml deleted file mode 100755 index e2a32d0..0000000 --- a/org.glite.jp.client/project/properties.xml +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/org.glite.jp.client/project/tar_exclude b/org.glite.jp.client/project/tar_exclude deleted file mode 100644 index e1fcd1a..0000000 --- a/org.glite.jp.client/project/tar_exclude +++ /dev/null @@ -1,10 +0,0 @@ -tar_exclude -CVS -build.xml -build -build.properties -properties.xml -configure.properties.xml -.cvsignore -.project -.cdtproject diff --git a/org.glite.jp.client/project/version.properties b/org.glite.jp.client/project/version.properties deleted file mode 100644 index 46eb5a1..0000000 --- a/org.glite.jp.client/project/version.properties +++ /dev/null @@ -1,2 +0,0 @@ -module.version=1.2.0 -module.age=1 diff --git a/org.glite.jp.client/src/jpcl_ctx.c b/org.glite.jp.client/src/jpcl_ctx.c deleted file mode 100644 index d6725f0..0000000 --- a/org.glite.jp.client/src/jpcl_ctx.c +++ /dev/null @@ -1,76 +0,0 @@ -#include -#include -#include -#include -#include - -#include "jp_client.h" -#include "jpcl_ctx_int.h" -#include "jpimporter.h" - - -int glite_jpcl_InitContext(glite_jpcl_context_t *ctx) -{ - glite_jpcl_context_t out = (glite_jpcl_context_t) malloc(sizeof(*out)); - if (!out) return ENOMEM; - memset(out, 0, sizeof(*out)); - assert(out->errDesc == NULL); - - *ctx = out; - return 0; -} - -void glite_jpcl_FreeContext(glite_jpcl_context_t ctx) -{ - free(ctx->jpps); - free(ctx->lbmd_dir); -} - -int glite_jpcl_SetParam(glite_jpcl_context_t ctx, int param, ...) -{ - va_list ap; - - va_start(ap, param); - switch ( param ) { - case GLITE_JPCL_PARAM_JPPS: - if ( ctx->jpps ) free(ctx->jpps); - ctx->jpps = va_arg(ap, char *); - ctx->jpps = strdup(ctx->jpps); - break; - case GLITE_JPCL_PARAM_LBMAILDIR: - if ( ctx->lbmd_dir ) free(ctx->lbmd_dir); - ctx->lbmd_dir = strdup(va_arg(ap, char *)); - break; - default: - return glite_jpcl_SetError(ctx, EINVAL, "unknown parameter"); - } - - return 0; -} - -int glite_jpcl_Error( glite_jpcl_context_t ctx, char **errt, char **errd) -{ - if ( errt ) *errt = strdup(strerror(ctx->errCode)); - if ( errd ) *errd = (ctx->errDesc)? strdup(ctx->errDesc): NULL; - return ctx->errCode; -} - -int glite_jpcl_SetError(glite_jpcl_context_t ctx, int code, const char *desc) -{ - glite_jpcl_ResetError(ctx); - if ( code ) { - ctx->errCode = code; - if ( desc ) ctx->errDesc = (char *) strdup(desc); - } - - return ctx->errCode; -} - -int glite_jpcl_ResetError(glite_jpcl_context_t ctx) -{ - if ( ctx->errDesc ) free(ctx->errDesc); - ctx->errDesc = NULL; - ctx->errCode = 0; - - return ctx->errCode; -} diff --git a/org.glite.jp.client/src/jpimp_lib.c b/org.glite.jp.client/src/jpimp_lib.c deleted file mode 100644 index efebc2ab..0000000 --- a/org.glite.jp.client/src/jpimp_lib.c +++ /dev/null @@ -1,115 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include - - -#define COMPILE_WITH_LIBTAR -#ifdef COMPILE_WITH_LIBTAR -# include -#endif - -#include "glite/lb/lb_maildir.h" - -#include "jp_client.h" -#include "jpimporter.h" -#include "jpcl_ctx_int.h" - -#define TEMP_FILE_PREFIX "/tmp/jpimporter" - -int glite_jpimporter_upload_files( - glite_jpcl_context_t ctx, - const char *jobid, - const char **files, - const char *proxy) -{ -#ifdef COMPILE_WITH_LIBTAR - TAR *t = NULL; -#endif - char *msg = NULL, - *errs = NULL; - char archive[PATH_MAX]; - int fd = -1, - rv = 0, - i; - - - assert((files != NULL) && (files[0] != NULL)); - assert(jobid != NULL); - /* TODO: get the user proxy if it is not specified and find its location */ - assert(proxy != NULL); - - if ( edg_wll_MaildirInit(ctx->lbmd_dir) ) { - asprintf(&errs, "edg_wll_MaildirInit(): %s", lbm_errdesc); - glite_jpcl_SetError(ctx, errno, errs); - free(errs); - return -1; - } - - i = 0; - do { - if ( ++i > 10 ) { - glite_jpcl_SetError(ctx, ECANCELED, "Can't create temporary tar file"); - return -1; - } - snprintf(archive, PATH_MAX, "%s_%ld_%ld.tar", - TEMP_FILE_PREFIX, getpid(), time(NULL)); - if ( (fd = open(archive, O_CREAT|O_EXCL|O_WRONLY, 00600)) < 0 ) { - if ( errno == EEXIST ) { sleep(2); continue; } - asprintf(&errs, "Can't create tar file %s", archive); - glite_jpcl_SetError(ctx, ECANCELED, errs); - free(errs); - return -1; - } - } while ( fd < 0 ); - -#ifdef COMPILE_WITH_LIBTAR - if ( tar_fdopen(&t, fd, archive, NULL, O_WRONLY, 0, TAR_GNU) < 0 ) { - asprintf(&errs, "Can't create tar archive %s", archive); - glite_jpcl_SetError(ctx, errno, errs); - rv = -1; - goto cleanup; - } - - for ( i = 0; files[i]; i++ ) { - char *s = (char *)files[i]; - if ( tar_append_file(t, s, (s[0]=='/')? s+1: s) < 0 ) { - asprintf(&errs, "Can't append file into tar archive %s", archive); - glite_jpcl_SetError(ctx, errno, errs); - rv = -1; - goto cleanup; - } - } -#endif - - if ( ctx->jpps ) - asprintf(&msg, "jobid\t%s\nfile\t%s\nproxy\t%s\njpps\t%s\n", - jobid, archive, proxy, ctx->jpps); - else - asprintf(&msg, "jobid\t%s\nfile\t%s\nproxy\t%s\n", - jobid, archive, proxy); - - if ( edg_wll_MaildirStoreMsg(ctx->lbmd_dir, "localhost", msg) ) { - asprintf(&errs, "edg_wll_MaildirStoreMsg(): %s", lbm_errdesc); - glite_jpcl_SetError(ctx, errno, errs); - rv = -1; - goto cleanup; - } - - -cleanup: -#ifdef COMPILE_WITH_LIBTAR - if ( t ) tar_close(t); - else close(fd); -#else - close(fd); -#endif - if ( rv ) unlink(archive); - free(errs); - free(msg); - - return rv; -} diff --git a/org.glite.jp.client/src/jpimporter.c b/org.glite.jp.client/src/jpimporter.c deleted file mode 100644 index 31e9a3d..0000000 --- a/org.glite.jp.client/src/jpimporter.c +++ /dev/null @@ -1,811 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "glite/lb/lb_maildir.h" - -#include "jpps_H.h" -#include "jpps_.nsmap" - -#include "jptype_map.h" -#include "glite/security/glite_gsplugin.h" -#include "glite/security/glite_gscompat.h" - -#include "globus_ftp_client.h" - -#if GSOAP_VERSION <= 20602 -#define soap_call___jpsrv__RegisterJob soap_call___ns1__RegisterJob -#endif - - -typedef struct { - char *key; - char *val; -} msg_pattern_t; - - -#ifndef dprintf -#define dprintf(FMT, ARGS...) { if (debug) printf(FMT, ##ARGS); } -#endif - -#define check_soap_fault(SOAP, ERR) glite_jp_clientCheckFault((SOAP), (ERR), name, 1) - -#ifndef GLITE_JPIMPORTER_PIDFILE -#define GLITE_JPIMPORTER_PIDFILE "/var/run/glite-jpimporter.pid" -#endif - -#ifndef GLITE_REG_IMPORTER_MDIR -#define GLITE_REG_IMPORTER_MDIR "/tmp/jpreg" -#endif - -#ifndef GLITE_DUMP_IMPORTER_MDIR -#define GLITE_DUMP_IMPORTER_MDIR "/tmp/jpdump" -#endif - -#ifndef GLITE_SANDBOX_IMPORTER_MDIR -#define GLITE_SANDBOX_IMPORTER_MDIR "/tmp/jpsandbox" -#endif - -#ifndef GLITE_JPPS -#define GLITE_JPPS "http://localhost:8901" -#endif - - -#define MAX_REG_CONNS 500 -#define JPPS_NO_RESPONSE_TIMEOUT 120 - - -static int debug = 0; -static int die = 0; -static int child_died = 0; -static int poll = 2; -static char *name; -static char *jpps = GLITE_JPPS; -static char reg_mdir[PATH_MAX] = GLITE_REG_IMPORTER_MDIR; -static char dump_mdir[PATH_MAX] = GLITE_DUMP_IMPORTER_MDIR; -static char sandbox_mdir[PATH_MAX] = GLITE_SANDBOX_IMPORTER_MDIR; -static char *store = NULL; -static struct soap *soap; - -static time_t cert_mtime; -static char *server_cert = NULL, - *server_key = NULL, - *cadir = NULL; -static gss_cred_id_t mycred = GSS_C_NO_CREDENTIAL; -static char *mysubj; -struct timeval to = {JPPS_NO_RESPONSE_TIMEOUT, 0}; - - -static struct option opts[] = { - { "help", 0, NULL, 'h'}, - { "cert", 1, NULL, 'c'}, - { "key", 1, NULL, 'k'}, - { "CAdir", 1, NULL, 'C'}, - { "debug", 0, NULL, 'g'}, - { "jpps", 1, NULL, 'p'}, - { "reg-mdir", 1, NULL, 'r'}, - { "dump-mdir", 1, NULL, 'd'}, - { "sandbox-mdir",1, NULL, 's'}, - { "pidfile", 1, NULL, 'i'}, - { "poll", 1, NULL, 't'}, - { "store", 1, NULL, 'S'}, - { NULL, 0, NULL, 0} -}; - -static const char *get_opt_string = "hgp:r:d:s:i:t:c:k:C:"; - -#include "glite/jp/ws_fault.c" - -static void usage(char *me) -{ - fprintf(stderr,"usage: %s [option]\n" - "\t-h, --help displays this screen\n" - "\t-k, --key private key file\n" - "\t-c, --cert certificate file\n" - "\t-C, --CAdir trusted certificates directory\n" - "\t-g, --debug don't run as daemon, additional diagnostics\n" - "\t-p, --jpps JP primary service server\n" - "\t-r, --reg-mdir path to the 'LB maildir' subtree for registrations\n" - "\t-d, --dump-mdir path to the 'LB maildir' subtree for LB dumps\n" - "\t-s, --sandbox-mdir path to the 'LB maildir' subtree for input/output sandboxes\n" - "\t-i, --pidfile file to store master pid\n" - "\t-t, --poll maildir polling interval (in seconds)\n", - "\t-S, --store keep uploaded jobs in this directory\n", - me); -} - -static void catchsig(int sig) -{ - die = sig; -} - -static void catch_chld(int sig) -{ - child_died = 1; -} - - -static int slave(int (*)(void), const char *); -static int reg_importer(void); -static int dump_importer(void); -static int sandbox_importer(void); -static int parse_msg(char *, msg_pattern_t []); -static int gftp_put_file(const char *, int); - - - -int main(int argc, char *argv[]) -{ - edg_wll_GssStatus gss_code; - struct sigaction sa; - sigset_t sset; - FILE *fpid; - pid_t reg_pid, dump_pid, sandbox_pid; - int opt; - char *name, - pidfile[PATH_MAX] = GLITE_JPIMPORTER_PIDFILE; - glite_gsplugin_Context plugin_ctx; - - - name = strrchr(argv[0],'/'); - if (name) name++; else name = argv[0]; - - if ( geteuid() ) - snprintf(pidfile, sizeof pidfile, "%s/glite_jpimporter.pid", getenv("HOME")); - - while ( (opt = getopt_long(argc, argv, get_opt_string, opts, NULL)) != EOF ) - switch ( opt ) { - case 'g': debug = 1; break; - case 'h': usage(name); return 0; - case 'c': server_cert = optarg; break; - case 'k': server_key = optarg; break; - case 'C': cadir = optarg; break; - case 'p': jpps = optarg; break; - case 't': poll = atoi(optarg); break; - case 'S': store = optarg; break; - case 'r': strcpy(reg_mdir, optarg); break; - case 'd': strcpy(dump_mdir, optarg); break; - case 's': strcpy(sandbox_mdir, optarg); break; - case 'i': strcpy(pidfile, optarg); break; - case '?': usage(name); return 1; - } - if ( optind < argc ) { usage(name); return 1; } - - setlinebuf(stdout); - setlinebuf(stderr); - - fpid = fopen(pidfile,"r"); - if ( fpid ) { - int opid = -1; - - if ( fscanf(fpid,"%d",&opid) == 1 ) { - if ( !kill(opid,0) ) { - fprintf(stderr,"%s: another instance running, pid = %d\n",argv[0],opid); - return 1; - } - else if (errno != ESRCH) { perror("kill()"); return 1; } - } - fclose(fpid); - } else if (errno != ENOENT) { perror(pidfile); return 1; } - fpid = fopen(pidfile, "w"); - if ( !fpid ) { perror(pidfile); return 1; } - fprintf(fpid, "%d", getpid()); - fclose(fpid); - - edg_wll_MaildirInit(reg_mdir); - edg_wll_MaildirInit(dump_mdir); - edg_wll_MaildirInit(sandbox_mdir); - if (store && *store) { - if (mkdir(store, 0750) != 0 && errno != EEXIST) { - fprintf(stderr, "Can't create directory %s: %s\n", store, strerror(errno)); - store = NULL; - } - } - - if ( !debug ) { - if ( daemon(1,0) == -1 ) { perror("deamon()"); exit(1); } - - fpid = fopen(pidfile,"w"); - if ( !fpid ) { perror(pidfile); return 1; } - fprintf(fpid, "%d", getpid()); - fclose(fpid); - openlog(name, LOG_PID, LOG_DAEMON); - } else { setpgid(0, getpid()); } - - dprintf("Master pid %d\n", getpid()); - - if ( globus_module_activate(GLOBUS_FTP_CLIENT_MODULE) != GLOBUS_SUCCESS ) { - dprintf("[master] Could not activate ftp client module\n"); - if (!debug) syslog(LOG_INFO, "Could not activate ftp client module\n"); - exit(1); - } else dprintf("[master] Ftp client module activated\n"); - - if ( !server_cert || !server_key ) - fprintf(stderr, "%s: key or certificate file not specified" - " - unable to watch them for changes!\n", argv[0]); - if ( cadir ) setenv("X509_CERT_DIR", cadir, 1); - edg_wll_gss_watch_creds(server_cert, &cert_mtime); - if ( !edg_wll_gss_acquire_cred_gsi(server_cert, server_key, &mycred, &mysubj, &gss_code) ) { - dprintf("[master] Server identity: %s\n", mysubj); - } else { - char *errmsg; - edg_wll_gss_get_error(&gss_code, "edg_wll_gss_acquire_cred_gsi()", &errmsg); - dprintf("[master] %s\n", errmsg); - free(errmsg); - dprintf("[master] Running unauthenticated\n"); - } - - memset(&sa, 0, sizeof(sa)); assert(sa.sa_handler == NULL); - sa.sa_handler = catchsig; - sigaction(SIGINT, &sa, NULL); - sigaction(SIGTERM, &sa, NULL); - - sa.sa_handler = catch_chld; - sigaction(SIGCHLD, &sa, NULL); - - sa.sa_handler = SIG_IGN; - sigaction(SIGUSR1, &sa, NULL); - - sigemptyset(&sset); - sigaddset(&sset, SIGCHLD); - sigaddset(&sset, SIGTERM); - sigaddset(&sset, SIGINT); - sigprocmask(SIG_BLOCK, &sset, NULL); - - soap = soap_new(); - soap_init(soap); - soap_set_namespaces(soap, jpps__namespaces); - - glite_gsplugin_init_context(&plugin_ctx); - if (server_key) plugin_ctx->key_filename = strdup(server_key); - if (server_cert) plugin_ctx->cert_filename = strdup(server_cert); - glite_gsplugin_set_timeout(plugin_ctx, &to); - - soap_register_plugin_arg(soap, glite_gsplugin,plugin_ctx); - - if ( (reg_pid = slave(reg_importer, "reg-imp")) < 0 ) { - perror("starting reg importer slave"); - exit(1); - } - if ( (dump_pid = slave(dump_importer, "dump-imp")) < 0 ) { - perror("starting dump importer slave"); - exit(1); - } - if ( (sandbox_pid = slave(sandbox_importer, "sandbox-imp")) < 0 ) { - perror("starting sandbox importer slave"); - exit(1); - } - - while ( !die ) { - - sigprocmask(SIG_UNBLOCK, &sset, NULL); - sleep(5); - sigprocmask(SIG_BLOCK, &sset, NULL); - - if ( child_died ) { - int pid; - - while ( (pid = waitpid(-1, NULL, WNOHANG)) > 0 ) { - if ( !die ) { - if ( pid == reg_pid ) { - dprintf("[master] reg importer slave died [%d]\n", pid); - if (!debug) syslog(LOG_INFO, "reg importer slave died [%d]\n", die); - if ( (reg_pid = slave(reg_importer, "reg-imp")) < 0 ) { - perror("starting reg importer slave"); - kill(0, SIGINT); - exit(1); - } - dprintf("[master] reg importer slave restarted [%d]\n", reg_pid); - } else if ( pid == dump_pid ) { - dprintf("[master] dump importer slave died [%d]\n", pid); - if (!debug) syslog(LOG_INFO, "dump importer slave died [%d]\n", die); - if ( (dump_pid = slave(dump_importer, "dump-imp")) < 0 ) { - perror("starting dump importer slave"); - kill(0, SIGINT); - exit(1); - } - dprintf("[master] dump importer slave restarted [%d]\n", dump_pid); - } else if ( pid == sandbox_pid ) { - dprintf("[master] sandbox importer slave died [%d]\n", pid); - if (!debug) syslog(LOG_INFO, "sandbox importer slave died [%d]\n", die); - if ( (sandbox_pid = slave(sandbox_importer, "sandbox-imp")) < 0 ) { - perror("starting sandbox importer slave"); - kill(0, SIGINT); - exit(1); - } - dprintf("[master] sandbox importer slave restarted [%d]\n", sandbox_pid); - } - - } - } - child_died = 0; - continue; - } - } - - dprintf("[master] Terminating on signal %d\n", die); - if (!debug) syslog(LOG_INFO, "Terminating on signal %d\n", die); - kill(0, die); - - globus_module_deactivate_all(); - unlink(pidfile); - - return 0; -} - -static int slave(int (*fn)(void), const char *nm) -{ - struct sigaction sa; - sigset_t sset; - int pid, - conn_cnt = 0; - - - if ( (pid = fork()) ) return pid; - - name = (char *)nm; - memset(&sa, 0, sizeof(sa)); assert(sa.sa_handler == NULL); - sa.sa_handler = catchsig; - sigaction(SIGUSR1, &sa, NULL); - - sigemptyset(&sset); - sigaddset(&sset, SIGTERM); - sigaddset(&sset, SIGINT); - sigaddset(&sset, SIGUSR1); - sigprocmask(SIG_BLOCK, &sset, NULL); - - dprintf("[%s] slave started - pid [%d]\n", name, getpid()); - - while ( !die && conn_cnt < MAX_REG_CONNS ) { - int ret = fn(); - - if ( ret > 0 ) conn_cnt++; - else if ( ret < 0 ) exit(1); - else if ( ret == 0 ) { - sigprocmask(SIG_UNBLOCK, &sset, NULL); - sleep(poll); - sigprocmask(SIG_BLOCK, &sset, NULL); - } - } - - if ( die ) { - dprintf("[%s] Terminating on signal %d\n", name, getpid(), die); - if ( !debug ) syslog(LOG_INFO, "Terminating on signal %d", die); - } - dprintf("[%s] Terminating after %d connections\n", name, conn_cnt); - if ( !debug ) syslog(LOG_INFO, "Terminating after %d connections", conn_cnt); - - exit(0); -} - - -static int reg_importer(void) -{ - struct _jpelem__RegisterJob in; - struct _jpelem__RegisterJobResponse empty; - int ret; - static int readnew = 1; - char *msg = NULL, - *fname = NULL, - *aux; - - if ( readnew ) ret = edg_wll_MaildirTransStart(reg_mdir, &msg, &fname); - else ret = edg_wll_MaildirRetryTransStart(reg_mdir, (time_t)30, (time_t)500, &msg, &fname); - if ( !ret ) { - readnew = !readnew; - if ( readnew ) ret = edg_wll_MaildirTransStart(reg_mdir, &msg, &fname); - else ret = edg_wll_MaildirRetryTransStart(reg_mdir, (time_t)30, (time_t)500, &msg, &fname); - if ( !ret ) { - readnew = !readnew; - return 0; - } - } - - if ( ret < 0 ) { - dprintf("[%s] edg_wll_MaildirTransStart: %s (%s)\n", name, strerror(errno), lbm_errdesc); - if ( !debug ) syslog(LOG_ERR, "edg_wll_MaildirTransStart: %s (%s)", strerror(errno), lbm_errdesc); - return -1; - } - - if ( ret < 0 ) { - dprintf("[%s] edg_wll_MaildirTransStart: %s (%s)\n", name, strerror(errno), lbm_errdesc); - if ( !debug ) syslog(LOG_ERR, "edg_wll_MaildirTransStart: %s (%s)", strerror(errno), lbm_errdesc); - return -1; - } else if ( ret > 0 ) { - dprintf("[%s] JP registration request received\n", name); - if ( !debug ) syslog(LOG_INFO, "JP registration request received\n"); - - ret = 0; - if ( !(aux = strchr(msg, '\n')) ) { - dprintf("[%s] Wrong format of message!\n", name); - if ( !debug ) syslog(LOG_ERR, "Wrong format of message\n"); - ret = 0; - } else do { - *aux++ = '\0'; - in.job = msg; - in.owner = aux; - dprintf("[%s] Registering '%s'\n", name, msg); - if ( !debug ) syslog(LOG_INFO, "Registering '%s'\n", msg); - ret = soap_call___jpsrv__RegisterJob(soap, jpps, "", &in, &empty); - if ( (ret = check_soap_fault(soap, ret)) ) break; - } while (0); - edg_wll_MaildirTransEnd(reg_mdir, fname, ret? LBMD_TRANS_FAILED_RETRY: LBMD_TRANS_OK); - free(fname); - free(msg); - return 1; - } - - return 0; -} - -static int dump_importer(void) -{ - struct _jpelem__StartUpload su_in; - struct _jpelem__StartUploadResponse su_out; - struct _jpelem__CommitUpload cu_in; - struct _jpelem__CommitUploadResponse empty; - static int readnew = 1; - char *msg = NULL, - *fname = NULL, - *aux, - *bname; - char fspec[PATH_MAX]; - int ret; - int fhnd; - msg_pattern_t tab[] = { - {"jobid", NULL}, - {"file", NULL}, - {"jpps", NULL}, - {"proxy", NULL}, - {NULL, NULL}}; -#define _job 0 -#define _file 1 -#define _jpps 2 -#define _proxy 3 - - - if ( readnew ) ret = edg_wll_MaildirTransStart(dump_mdir, &msg, &fname); - else ret = edg_wll_MaildirRetryTransStart(dump_mdir, (time_t)60, (time_t)600, &msg, &fname); - if ( !ret ) { - readnew = !readnew; - if ( readnew ) ret = edg_wll_MaildirTransStart(dump_mdir, &msg, &fname); - else ret = edg_wll_MaildirRetryTransStart(dump_mdir, (time_t)60, (time_t)600, &msg, &fname); - if ( !ret ) { - readnew = !readnew; - return 0; - } - } - - if ( ret < 0 ) { - dprintf("[%s] edg_wll_MaildirTransStart: %s (%s)\n", name, strerror(errno), lbm_errdesc); - if ( !debug ) syslog(LOG_ERR, "edg_wll_MaildirTransStart: %s (%s)", strerror(errno), lbm_errdesc); - return -1; - } - - dprintf("[%s] dump JP import request received\n", name); - if ( !debug ) syslog(LOG_INFO, "dump JP import request received"); - - ret = 0; - if ( parse_msg(msg, tab) < 0 ) { - dprintf("[%s] Wrong format of message!\n", name); - if ( !debug ) syslog(LOG_ERR, "Wrong format of message"); - ret = 0; - } else do { - su_in.job = tab[_job].val; - su_in.class_ = "urn:org.glite.jp.primary:lb"; - su_in.name = NULL; - su_in.commitBefore = 1000 + time(NULL); - su_in.contentType = "text/lb"; - dprintf("[%s] Importing LB dump file '%s'\n", name, tab[_file].val); - if ( !debug ) syslog(LOG_INFO, "Importing LB dump file '%s'\n", msg); - ret = soap_call___jpsrv__StartUpload(soap, tab[_jpps].val?:jpps, "", &su_in, &su_out); - if ( (ret = check_soap_fault(soap, ret)) ) break; - dprintf("[%s] Destination: %s\n\tCommit before: %s\n", name, su_out.destination, ctime(&su_out.commitBefore)); - if (su_out.destination == NULL) { - dprintf("[%s] StartUpload returned NULL destination\n", name); - if ( !debug ) syslog(LOG_ERR, "StartUpload returned NULL destination"); - break; - } - - if ( (fhnd = open(tab[_file].val, O_RDONLY)) < 0 ) { - dprintf("[%s] Can't open dump file: %s\n", name, tab[_file].val); - if ( !debug ) syslog(LOG_ERR, "Can't open dump file: %s", tab[_file].val); - ret = 1; - break; - } - if ( (ret = gftp_put_file(su_out.destination, fhnd)) ) break; - close(fhnd); - dprintf("[%s] File sent, commiting the upload\n", name); - cu_in.destination = su_out.destination; - ret = soap_call___jpsrv__CommitUpload(soap, tab[_jpps].val?:jpps, "", &cu_in, &empty); - if ( (ret = check_soap_fault(soap, ret)) ) break; - dprintf("[%s] Dump upload succesfull\n", name); - if (store && *store) { - bname = strdup(tab[_file].val); - snprintf(fspec, sizeof fspec, "%s/%s", store, basename(bname)); - free(bname); - if (rename(tab[_file].val, fspec) != 0) - fprintf(stderr, "moving %s to %s failed: %s\n", tab[_file].val, fspec, strerror(errno)); - else - dprintf("[%s] moving %s to %s OK\n", name, tab[_file].val, fspec); - } else { - if (unlink(tab[_file].val) != 0) - fprintf(stderr, "removing %s failed: %s\n", tab[_file].val, strerror(errno)); - else - dprintf("[%s] %s removed\n", name, tab[_file].val); - } - } while (0); - - edg_wll_MaildirTransEnd(dump_mdir, fname, ret? LBMD_TRANS_FAILED_RETRY: LBMD_TRANS_OK); - free(fname); - free(msg); - - return 1; -} - - - -static int sandbox_importer(void) -{ - struct _jpelem__StartUpload su_in; - struct _jpelem__StartUploadResponse su_out; - struct _jpelem__CommitUpload cu_in; - struct _jpelem__CommitUploadResponse empty; - static int readnew = 1; - char *msg = NULL, - *fname = NULL, - *aux; - int ret; - int fhnd; - msg_pattern_t tab[] = { - {"jobid", NULL}, - {"file", NULL}, - {"jpps", NULL}, - {"proxy", NULL}, - {NULL, NULL}}; - -#define _job 0 -#define _file 1 -#define _jpps 2 -#define _proxy 3 - - - if ( readnew ) ret = edg_wll_MaildirTransStart(sandbox_mdir, &msg, &fname); - else ret = edg_wll_MaildirRetryTransStart(sandbox_mdir, (time_t)60, (time_t) 600,&msg, &fname); - if ( !ret ) { - readnew = !readnew; - if ( readnew ) ret = edg_wll_MaildirTransStart(sandbox_mdir, &msg, &fname); - else ret = edg_wll_MaildirRetryTransStart(sandbox_mdir, (time_t)60, (time_t) 600,&msg, &fname); - if ( !ret ) { - readnew = !readnew; - return 0; - } - } - - if ( ret < 0 ) { - dprintf("[%s] edg_wll_MaildirTransStart: %s (%s)\n", name, strerror(errno), lbm_errdesc); - if ( !debug ) syslog(LOG_ERR, "edg_wll_MaildirTransStart: %s (%s)", strerror(errno), lbm_errdesc); - return -1; - } - - dprintf("[%s] sandbox JP import request received\n", name); - if ( !debug ) syslog(LOG_INFO, "sandbox JP import request received"); - - ret = 0; - if ( parse_msg(msg, tab) < 0 ) { - dprintf("[%s] Wrong format of message!\n", name); - if ( !debug ) syslog(LOG_ERR, "Wrong format of message"); - ret = 0; - } else do { - su_in.job = tab[_job].val; - // XXX: defined in org.glite.jp.primary/src/builtin_plugins.h - // shloud use symbolic const... - // do not distinquish between ibs and obs now - su_in.class_ = "urn:org.glite.jp.primary:isb"; - su_in.name = NULL; - su_in.commitBefore = 1000 + time(NULL); - su_in.contentType = "tar/lb"; - dprintf("[%s] Importing LB sandbox tar file '%s'\n", name, tab[_file].val); - if ( !debug ) syslog(LOG_INFO, "Importing LB sandbox tar file '%s'\n", msg); - ret = soap_call___jpsrv__StartUpload(soap, tab[_jpps].val?:jpps, "", &su_in, &su_out); - ret = check_soap_fault(soap, ret); - /* XXX: grrrrrrr! test it!!!*/ -// if ( (ret = check_soap_fault(soap, ret)) ) break; - dprintf("[%s] Destination: %s\n\tCommit before: %s\n", name, su_out.destination, ctime(&su_out.commitBefore)); - - if ( (fhnd = open(tab[_file].val, O_RDONLY)) < 0 ) { - dprintf("[%s] Can't open sandbox tar file: %s\n", name, tab[_file].val); - if ( !debug ) syslog(LOG_ERR, "Can't open sandbox tar file: %s", tab[_file].val); - ret = 1; - break; - } - if ( (ret = gftp_put_file(su_out.destination, fhnd)) ) break; - close(fhnd); - dprintf("[%s] File sent, commiting the upload\n", name); - cu_in.destination = su_out.destination; - ret = soap_call___jpsrv__CommitUpload(soap, tab[_jpps].val?:jpps, "", &cu_in, &empty); - if ( (ret = check_soap_fault(soap, ret)) ) break; - dprintf("[%s] Dump upload succesfull\n", name); - } while (0); - - edg_wll_MaildirTransEnd(sandbox_mdir, fname, ret? LBMD_TRANS_FAILED_RETRY: LBMD_TRANS_OK); - free(fname); - free(msg); - - return 1; -} - - -/** Parses every line looking for pattern string and stores the value into - * the given variable - * - * line format is: key[space(s)]+val - */ -int parse_msg(char *msg, msg_pattern_t tab[]) -{ - char *eol = msg, - *key, *val; - - while ( eol && *eol != '\0' ) { - int i; - - key = eol; - if ( (eol = strchr(key, '\n')) ) *eol++ = '\0'; - while ( isblank(*key) ) key++; - if ( *key == '\0' ) continue; - val = key; - while ( !isblank(*val) ) val++; - if ( *val == '\0' ) return -1; - *val++ = '\0'; - while ( isblank(*val) ) val++; - if ( *val == '\0' ) return -1; - - for ( i = 0; tab[i].key; i++ ) { - if ( !strcmp(tab[i].key, key) ) { - tab[i].val = val; - break; - } - } - } - - return 0; -} - - -#define BUFSZ 1024 - -static globus_mutex_t gLock; -static globus_cond_t gCond; -static globus_bool_t gDone; -static globus_bool_t gError = GLOBUS_FALSE; -static globus_byte_t gBuffer[BUFSZ]; -static int gOffset; - - -static void gftp_done_cb( - void *user_arg, - globus_ftp_client_handle_t *handle, - globus_object_t *err) -{ - if ( err != GLOBUS_SUCCESS ) { - char *tmp = globus_object_printable_to_string(err); - dprintf("[%s] Error in callback: %s\n", name, tmp); - if ( !debug ) syslog(LOG_ERR, "Error in callback: %s", tmp); - gError = GLOBUS_TRUE; - globus_libc_free(tmp); - } - globus_mutex_lock(&gLock); - gDone = GLOBUS_TRUE; - globus_cond_signal(&gCond); - globus_mutex_unlock(&gLock); -} - -static void gftp_data_cb( - void *user_arg, - globus_ftp_client_handle_t *handle, - globus_object_t *error, - globus_byte_t *buffer, - globus_size_t length, - globus_off_t offset, - globus_bool_t eof) -{ - if ( !eof ) { - int rc; - globus_mutex_lock(&gLock); - if ( (rc = read(*((int *)user_arg), gBuffer, BUFSZ)) < 0 ) { - dprintf("[%s] Error reading dump file\n", name); - if ( !debug ) syslog(LOG_ERR, "Error reading dump file"); - gDone = GLOBUS_TRUE; - gError = GLOBUS_TRUE; - globus_cond_signal(&gCond); - } else { - globus_ftp_client_register_write( - handle, gBuffer, rc, gOffset, rc == 0, gftp_data_cb, user_arg); - gOffset += rc; - } - globus_mutex_unlock(&gLock); - } -} - -static int gftp_put_file(const char *url, int fhnd) -{ - globus_ftp_client_handle_t hnd; - globus_ftp_client_operationattr_t op_attr; - globus_ftp_client_handleattr_t hnd_attr; - -#define put_file_err(errs) { \ - dprintf("[%s] %s\n", name, errs); \ - if ( !debug ) syslog(LOG_ERR, errs); \ - return 1; \ -} - if ( globus_ftp_client_handleattr_init(&hnd_attr) != GLOBUS_SUCCESS ) - put_file_err("Could not initialise handle attributes"); - - if ( globus_ftp_client_operationattr_init(&op_attr) != GLOBUS_SUCCESS ) - put_file_err("Could not initialise operation attributes"); - - if ( globus_ftp_client_operationattr_set_authorization( - &op_attr, server_cert? mycred: GSS_C_NO_CREDENTIAL, - NULL, "", 0, NULL) != GLOBUS_SUCCESS ) - put_file_err("Could not set authorization procedure"); - - if ( globus_ftp_client_handle_init(&hnd, &hnd_attr) != GLOBUS_SUCCESS ) - put_file_err("Could not initialise ftp client handle"); -#undef put_file_err - - globus_mutex_init(&gLock, GLOBUS_NULL); - globus_cond_init(&gCond, GLOBUS_NULL); - - gDone = GLOBUS_FALSE; - gError = GLOBUS_FALSE; - - /* do the op */ - if ( globus_ftp_client_put( - &hnd, url, &op_attr, - GLOBUS_NULL, gftp_done_cb, (void *)&fhnd) != GLOBUS_SUCCESS) { - dprintf("[%s] Could not start file put\n", name); - if ( !debug ) syslog(LOG_ERR, "Could not start file put"); - gError = GLOBUS_TRUE; - gDone = GLOBUS_TRUE; - } else { - int rc; - globus_mutex_lock(&gLock); - if ( (rc = read(fhnd, gBuffer, BUFSZ)) < 0 ) { - dprintf("[%s] Error reading dump file\n", name); - if ( !debug ) syslog(LOG_ERR, "Error reading dump file"); - gDone = GLOBUS_TRUE; - gError = GLOBUS_TRUE; - globus_cond_signal(&gCond); - } else { - globus_ftp_client_register_write(&hnd, - gBuffer, rc, gOffset, rc == 0, gftp_data_cb, (void *)&fhnd); - gOffset += rc; - } - globus_mutex_unlock(&gLock); - } - - globus_mutex_lock(&gLock); - while ( !gDone ) globus_cond_wait(&gCond, &gLock); - globus_mutex_unlock(&gLock); - - globus_ftp_client_handle_destroy(&hnd); - - - return (gError == GLOBUS_TRUE)? 1: 0; -} - -/* XXX: we don't use it */ -SOAP_NMAC struct Namespace namespaces[] = { {NULL,NULL} }; - diff --git a/org.glite.jp.client/src/jptype_map.h b/org.glite.jp.client/src/jptype_map.h deleted file mode 100644 index 56d611f..0000000 --- a/org.glite.jp.client/src/jptype_map.h +++ /dev/null @@ -1,18 +0,0 @@ -#include "soap_version.h" - -#if GSOAP_VERSION >= 20700 -#define INPUT_SANDBOX jptype__UploadClass__INPUT_SANDBOX -#define OUTPUT_SANDBOX jptype__UploadClass__OUTPUT_SANDBOX -#define JOB_LOG jptype__UploadClass__JOB_LOG - -#define OWNER jptype__AttributeType__OWNER -#define TIME jptype__AttributeType__TIME -#define TAG jptype__AttributeType__TAG - -#define EQUAL jptype__queryOp__EQUAL -#define UNEQUAL jptype__queryOp__UNEQUAL -#define LESS jptype__queryOp__LESS -#define GREATER jptype__queryOp__GREATER -#define WITHIN jptype__queryOp__WITHIN -#endif - diff --git a/org.glite.jp.client/src/typemap.dat b/org.glite.jp.client/src/typemap.dat deleted file mode 100644 index 72f515f..0000000 --- a/org.glite.jp.client/src/typemap.dat +++ /dev/null @@ -1,3 +0,0 @@ -jpsrv = http://glite.org/wsdl/services/jp -jptype = http://glite.org/wsdl/types/jp -jpelem = http://glite.org/wsdl/elements/jp diff --git a/org.glite.jp.common/.cvsignore b/org.glite.jp.common/.cvsignore deleted file mode 100644 index 3a4edf6..0000000 --- a/org.glite.jp.common/.cvsignore +++ /dev/null @@ -1 +0,0 @@ -.project diff --git a/org.glite.jp.common/Makefile b/org.glite.jp.common/Makefile deleted file mode 100644 index 88a27f0..0000000 --- a/org.glite.jp.common/Makefile +++ /dev/null @@ -1,117 +0,0 @@ -# defaults -top_srcdir=. -builddir=build -top_builddir=${top_srcdir}/${builddir} -stagedir=. -distdir=. -globalprefix=glite -lbprefix=lb -package=glite-jp-common -version=0.0.0 -PREFIX=/opt/glite - -glite_location=/opt/glite -globus_prefix=/opt/globus -nothrflavour=gcc32 -thrflavour=gcc32pthr -expat_prefix=/opt/expat -gsoap_prefix=/software/gsoap-2.6 - -CC=gcc - --include Makefile.inc - - -VPATH=${top_srcdir}/src:${top_srcdir}/test:${top_srcdir}/project:${jpproject} - -GLOBUSINC:= -I${globus_prefix}/include/${nothrflavour} -GLOBUSINCTHR:= -I${globus_prefix}/include/${thrflavour} - -DEBUG:=-g -O0 -CFLAGS:=${DEBUG} -I. -I${top_srcdir}/interface -I${stagedir}/include - -offset=0 -version_info:=-version-info ${shell \ - perl -e '$$,=":"; @F=split "\\.","${version}"; print $$F[0]+$$F[1]+${offset},$$F[2],$$F[1]' } - - -LINK:=libtool --mode=link ${CC} ${LDFLAGS} -rpath ${stagedir}/lib ${version_info} -LINKXX:=libtool --mode=link ${CXX} ${LDFLAGS} -INSTALL:=libtool --mode=install install -COMPILE:=libtool --mode=compile ${CC} ${CFLAGS} - -HDRS:=types.h context.h strmd5.h attr.h known_attr.h trio.h escape.h - -SRCS:=context.c strmd5.c attr.c -OBJS:=${SRCS:.c=.lo} -THROBJS:=${OBJS:.o=.thr.lo} -LIBS:=-L${globus_prefix}/lib -lcrypto_${nothrflavour} -THRLIBS:=-L${globus_prefix}/lib -lcrypto_${thrflavour} - -commonlib:= libglite_jp_common_${nothrflavour}.la -commonlib_thr:= libglite_jp_common_${thrflavour}.la - -TRIO_OBJS:=escape.o trio.o strio.o -TRIO_LIB:=libglite_jp_trio.la -TRIO_LOBJS:=${TRIO_OBJS:.o=.lo} - -TEST_LIBS:=-L${cppunit}/lib -lcppunit -ldl -TEST_INC:=-I${cppunit}/include - - -default all: compile - -compile: ${commonlib} ${commonlib_thr} ${TRIO_LIB} - -${commonlib}: ${OBJS} - ${LINK} -o $@ ${OBJS} ${LIBS} - -${commonlib_thr}: ${THROBJS} - ${LINK} -o $@ ${THROBJS} ${THRLIBS} - -${TRIO_LIB}: ${TRIO_LOBJS} - ${LINK} ${version_info} -o $@ ${TRIO_LOBJS} -lm - -check: base64_test type_test - ./base64_test base64_test.xml - ./type_test type_test.xml - -type_test base64_test: %: %.cpp compile - ${CXX} -c ${CFLAGS} ${TEST_INC} $< - ${LINKXX} -o $@ $@.o ${commonlib} ${TRIO_LIB} ${TEST_LIBS} - -doc: - -stage: compile - $(MAKE) install PREFIX=${stagedir} - -install: - -mkdir -p ${PREFIX}/include/${globalprefix}/${jpprefix} - cd ${top_srcdir}/interface && install -m 644 ${HDRS} ${PREFIX}/include/${globalprefix}/${jpprefix} - -mkdir -p ${PREFIX}/lib - ${INSTALL} -m 755 ${commonlib} ${commonlib_thr} ${TRIO_LIB} ${PREFIX}/lib - -dist: distsrc distbin - -# FIXME: just copied from LB -distsrc: - mkdir -p ${top_srcdir}/${package}-${version} - cd ${top_srcdir} && GLOBIGNORE="${package}-${version}" && cp -Rf * ${package}-${version} - cd ${top_srcdir} && tar -czf ${distdir}/${package}-${version}_src.tar.gz --exclude-from=project/tar_exclude ${package}-${version} - rm -rf ${top_srcdir}/${package}-${version} - -distbin: - $(MAKE) install PREFIX=`pwd`/tmpbuilddir${stagedir} - save_dir=`pwd`; cd tmpbuilddir${stagedir} && tar -czf $$save_dir/${top_srcdir}/${distdir}/${package}-${version}_bin.tar.gz *; cd $$save_dir - rm -rf tmpbuilddir - -clean: - -%.thr.lo: %.c - ${COMPILE} ${GLOBUSTHRINC} -o $@ -c $< - -%.lo: %.c - ${COMPILE} ${GLOBUSINC} -o $@ -c $< - -${TRIO_LOBJS}: %.lo: %.c - ${COMPILE} -o $@ -c -DDATAGRID_EXTENSION $< diff --git a/org.glite.jp.common/build.xml b/org.glite.jp.common/build.xml deleted file mode 100755 index 6e50854..0000000 --- a/org.glite.jp.common/build.xml +++ /dev/null @@ -1,97 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/org.glite.jp.common/interface/attr.h b/org.glite.jp.common/interface/attr.h deleted file mode 100644 index 6badff7..0000000 --- a/org.glite.jp.common/interface/attr.h +++ /dev/null @@ -1,32 +0,0 @@ -#ifndef __GLITE_JP_ATTR -#define __GLITE_JP_ATTR - -#ifdef __cplusplus -extern "C" { -#endif - -void glite_jp_attrval_free(glite_jp_attrval_t *,int); -void glite_jp_attrval_copy(glite_jp_attrval_t *,const glite_jp_attrval_t *); - -/* Search through registered type plugins and call appropriate plugin method. - * See type_plugin.h for detailed description. - */ - -int glite_jp_attrval_cmp(glite_jp_context_t ctx,const glite_jp_attrval_t *a,const glite_jp_attrval_t *b,int *result); - -char *glite_jp_attrval_to_db_full(glite_jp_context_t ctx,const glite_jp_attrval_t *attr); -char *glite_jp_attrval_to_db_index(glite_jp_context_t ctx,const glite_jp_attrval_t *attr,int len); - -int glite_jp_attrval_from_db(glite_jp_context_t ctx,const char *str,glite_jp_attrval_t *attr); -const char *glite_jp_attrval_db_type_full(glite_jp_context_t ctx,const char *attr); -const char *glite_jp_attrval_db_type_index(glite_jp_context_t ctx,const char *attr,int len); - -time_t glite_jp_attr2time(const char *); -char * glite_jp_time2attr(time_t); - -#ifdef __cplusplus -}; -#endif - - -#endif diff --git a/org.glite.jp.common/interface/context.h b/org.glite.jp.common/interface/context.h deleted file mode 100644 index 75a71a3..0000000 --- a/org.glite.jp.common/interface/context.h +++ /dev/null @@ -1,26 +0,0 @@ -#ifndef __GLITE_JP_CONTEXT -#define __GLITE_JP_CONTEXT - -#ifdef __cplusplus -extern "C" { -#endif - -int glite_jp_init_context(glite_jp_context_t *); -void glite_jp_free_context(glite_jp_context_t); -void glite_jp_free_query_rec(glite_jp_query_rec_t *); - -char *glite_jp_peer_name(glite_jp_context_t); -char *glite_jp_error_chain(glite_jp_context_t); - -int glite_jp_stack_error(glite_jp_context_t, const glite_jp_error_t *); -int glite_jp_clear_error(glite_jp_context_t); - -int glite_jp_add_deferred(glite_jp_context_t,int (*)(glite_jp_context_t,void *),void *); -int glite_jp_run_deferred(glite_jp_context_t); - - -#ifdef __cplusplus -}; -#endif - -#endif diff --git a/org.glite.jp.common/interface/escape.h b/org.glite.jp.common/interface/escape.h deleted file mode 100644 index 4cf54c0..0000000 --- a/org.glite.jp.common/interface/escape.h +++ /dev/null @@ -1,60 +0,0 @@ -#ifndef __EDG_WORKLOAD_LOGGING_COMMON_ESCAPE_H__ -#define __EDG_WORKLOAD_LOGGING_COMMON_ESCAPE_H__ -/*! - * \file Client/escape.h - * \brief Prototypes for Client/escape.c - */ - -#ident "$Header$" - - -/*! - * \fn char *edg_wll_LogEscape(const char *str) - * \param str a string to escape - * \return new (allocated) escaped string - * \brief in given string (ULM) escape all ULM_QM, ULM_BS and ULM_LF by ULM_BS - */ - -char *edg_wll_LogEscape(const char *); - - -/*! - * \fn char *edg_wll_LogUnescape(const char *str) - * \param str a string to unescape - * \return new (allocated) unescaped string - * \brief in given string (ULM) unescape all escaped ULM_QM, ULM_BS and ULM_LF - */ - -char *edg_wll_LogUnescape(const char *); - - -/*! - * \fn char *edg_wll_EscapeXML(const char *str); - * \param str a string to escape - * \return new (allocated) escaped string - * \brief in given string (XML) escape all unwanted characters - */ - -char *edg_wll_EscapeXML(const char *); - - -/*! - * \fn char *edg_wll_UnescapeXML(const char *str) - * \param str a string to unescape - * \return new (allocated) unescaped string - * \brief in given string (XML) unescape all escaped characters - */ - -char *edg_wll_UnescapeXML(const char *); - - -/*! - * \fn char *edg_wll_EscapeSQL(const char *str) - * \param str a string to escape - * \return new (allocated) escaped string - * \briefin given string (SQL) escape all unwanted characters - */ - -char *edg_wll_EscapeSQL(const char *); - -#endif /* __EDG_WORKLOAD_LOGGING_COMMON_ESCAPE_H__ */ diff --git a/org.glite.jp.common/interface/known_attr.h b/org.glite.jp.common/interface/known_attr.h deleted file mode 100644 index b3c80ad..0000000 --- a/org.glite.jp.common/interface/known_attr.h +++ /dev/null @@ -1,41 +0,0 @@ -#ifndef __GLITE_JP_KNOWN_ATTR -#define __GLITE_JP_KNOWN_ATTR - -/** Namespace of JP system attributes */ -#define GLITE_JP_SYSTEM_NS "http://egee.cesnet.cz/en/Schema/JP/System" -#define GLITE_JP_WORKFLOW_NS "http://egee.cesnet.cz/en/Schema/JP/Workflow" - -/** Job owner, as specified with RegisterJob JPPS operation */ -#define GLITE_JP_ATTR_OWNER GLITE_JP_SYSTEM_NS ":owner" - -/** JobId */ -#define GLITE_JP_ATTR_JOBID GLITE_JP_SYSTEM_NS ":jobId" - -/** Timestamp of job registration in JP. - * Should be almost the same time as registration with LB. */ -#define GLITE_JP_ATTR_REGTIME GLITE_JP_SYSTEM_NS ":regtime" - -/** Workflow node relationships. */ -#define GLITE_JP_ATTR_WF_ANCESTOR GLITE_JP_WORKFLOW_NS ":ancestor" -#define GLITE_JP_ATTR_WF_SUCCESSOR GLITE_JP_WORKFLOW_NS ":successor" - -/** Attributes derived from LB system data - * \see jp_job_attrs.h */ - -/** Namespace for LB user tags, schemaless, all values are strings */ -#define GLITE_JP_LBTAG_NS "http://egee.cesnet.cz/en/WSDL/jp-lbtag" -#define GLITE_JP_JDL_NS "http://jdl" - -/** Namespace for Sandboxes */ -#define GLITE_JP_ISB_NS "http://egee.cesnet.cz/en/Schema/JP/ISB" -#define GLITE_JP_OSB_NS "http://egee.cesnet.cz/en/Schema/JP/OSB" - -/** Namespace for file names listed from tar */ -#define GLITE_JP_ATTR_ISB_FILENAME GLITE_JP_ISB_NS ":filename" -#define GLITE_JP_ATTR_OSB_FILENAME GLITE_JP_OSB_NS ":filename" - -/** Namespace for filenames to be unpacked from sanbox tar */ -#define GLITE_JP_ISB_CONTENT_NS GLITE_JP_ISB_NS ":content" -#define GLITE_JP_OSB_CONTENT_NS GLITE_JP_OSB_NS ":content" - -#endif diff --git a/org.glite.jp.common/interface/strmd5.h b/org.glite.jp.common/interface/strmd5.h deleted file mode 100755 index c354e6d..0000000 --- a/org.glite.jp.common/interface/strmd5.h +++ /dev/null @@ -1,40 +0,0 @@ -#ifndef _GLITE_STRMD5_H -#define _GLITE_STRMD5_H - -#ifdef __cplusplus -extern "C" { -#endif - -#ident "$Header$" - -/* Compute MD5 sum of the first argument. - * The sum is returned in the 16-byte array pointed to by 2nd argument - * (if not NULL) - * - * Return value: ASCII string of the sum, i.e. 32 characters [0-9a-f] - * (pointer to static area, changed by subsequent calls) - */ - -char *strmd5(const char *src, unsigned char *dst); - -/** - * Returns: allocated 32bytes long ASCII string with md5 sum - * of the first argument - */ -char *str2md5(const char *src); - -/** - * Returns: allocated 22bytes long ASCII string with md5 sum in base64 - * format of the source argument - */ -char *str2md5base64(const char *src); - -int base64_encode(const void *enc, int enc_size, char *out, int out_max_size); -int base64_decode(const char *enc,char *out,int out_size); - -#ifdef __cplusplus -}; -#endif - - -#endif /* _GLITE_STRMD5_H */ diff --git a/org.glite.jp.common/interface/trio.h b/org.glite.jp.common/interface/trio.h deleted file mode 100644 index 04f133c..0000000 --- a/org.glite.jp.common/interface/trio.h +++ /dev/null @@ -1,187 +0,0 @@ -/************************************************************************* - * - * $Id$ - * - * Copyright (C) 1998 Bjorn Reese and Daniel Stenberg. - * - * Permission to use, copy, modify, and distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF - * MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE AUTHORS AND - * CONTRIBUTORS ACCEPT NO RESPONSIBILITY IN ANY CONCEIVABLE MANNER. - * - ************************************************************************/ - -#ifndef TRIO_TRIO_H -#define TRIO_TRIO_H - -#include -#include -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/* make utility and C++ compiler in Windows NT fails to find this symbol */ -#if defined(WIN32) && !defined(isascii) -# define isascii ((unsigned)(x) < 0x80) -#endif - -/* - * Error codes. - * - * Remember to add a textual description to trio_strerror. - */ -enum { - TRIO_EOF = 1, - TRIO_EINVAL = 2, - TRIO_ETOOMANY = 3, - TRIO_EDBLREF = 4, - TRIO_EGAP = 5, - TRIO_ENOMEM = 6, - TRIO_ERANGE = 7 -}; - -/* Error macros */ -#define TRIO_ERROR_CODE(x) ((-(x)) & 0x00FF) -#define TRIO_ERROR_POSITION(x) ((-(x)) >> 8) -#define TRIO_ERROR_NAME(x) trio_strerror(x) - -const char *trio_strerror(int); - -/************************************************************************* - * Print Functions - */ - -int trio_printf(const char *format, ...); -int trio_vprintf(const char *format, va_list args); -int trio_printfv(const char *format, void **args); - -int trio_fprintf(FILE *file, const char *format, ...); -int trio_vfprintf(FILE *file, const char *format, va_list args); -int trio_fprintfv(FILE *file, const char *format, void **args); - -int trio_dprintf(int fd, const char *format, ...); -int trio_vdprintf(int fd, const char *format, va_list args); -int trio_dprintfv(int fd, const char *format, void **args); - -/* trio_sprintf(target, format, ...) - * trio_snprintf(target, maxsize, format, ...) - * - * Build 'target' according to 'format' and succesive - * arguments. This is equal to the sprintf() and - * snprintf() functions. - */ -int trio_sprintf(char *buffer, const char *format, ...); -int trio_vsprintf(char *buffer, const char *format, va_list args); -int trio_sprintfv(char *buffer, const char *format, void **args); - -int trio_snprintf(char *buffer, size_t max, const char *format, ...); -int trio_vsnprintf(char *buffer, size_t bufferSize, const char *format, - va_list args); -int trio_snprintfv(char *buffer, size_t bufferSize, const char *format, - void **args); - -int trio_snprintfcat(char *buffer, size_t max, const char *format, ...); -int trio_vsnprintfcat(char *buffer, size_t bufferSize, const char *format, - va_list args); - -char *trio_aprintf(const char *format, ...); -char *trio_vaprintf(const char *format, va_list args); - -int trio_asprintf(char **ret, const char *format, ...); -int trio_vasprintf(char **ret, const char *format, va_list args); - -/************************************************************************* - * Scan Functions - */ -int trio_scanf(const char *format, ...); -int trio_vscanf(const char *format, va_list args); -int trio_scanfv(const char *format, void **args); - -int trio_fscanf(FILE *file, const char *format, ...); -int trio_vfscanf(FILE *file, const char *format, va_list args); -int trio_fscanfv(FILE *file, const char *format, void **args); - -int trio_dscanf(int fd, const char *format, ...); -int trio_vdscanf(int fd, const char *format, va_list args); -int trio_dscanfv(int fd, const char *format, void **args); - -int trio_sscanf(const char *buffer, const char *format, ...); -int trio_vsscanf(const char *buffer, const char *format, va_list args); -int trio_sscanfv(const char *buffer, const char *format, void **args); - -/************************************************************************* - * Renaming - */ -#ifdef TRIO_REPLACE_STDIO -/* Replace the functions */ -#ifndef HAVE_PRINTF -# define printf trio_printf -#endif -#ifndef HAVE_VPRINTF -# define vprintf trio_vprintf -#endif -#ifndef HAVE_FPRINTF -# define fprintf trio_fprintf -#endif -#ifndef HAVE_VFPRINTF -# define vfprintf trio_vfprintf -#endif -#ifndef HAVE_SPRINTF -# define sprintf trio_sprintf -#endif -#ifndef HAVE_VSPRINTF -# define vsprintf trio_vsprintf -#endif -#ifndef HAVE_SNPRINTF -# define snprintf trio_snprintf -#endif -#ifndef HAVE_VSNPRINTF -# define vsnprintf trio_vsnprintf -#endif -#ifndef HAVE_SCANF -# define scanf trio_scanf -#endif -#ifndef HAVE_VSCANF -# define vscanf trio_vscanf -#endif -#ifndef HAVE_FSCANF -# define fscanf trio_fscanf -#endif -#ifndef HAVE_VFSCANF -# define vfscanf trio_vfscanf -#endif -#ifndef HAVE_SSCANF -# define sscanf trio_sscanf -#endif -#ifndef HAVE_VSSCANF -# define vsscanf trio_vsscanf -#endif -/* These aren't stdio functions, but we make them look similar */ -#define dprintf trio_dprintf -#define vdprintf trio_vdprintf -#define aprintf trio_aprintf -#define vaprintf trio_vaprintf -#define asprintf trio_asprintf -#define vasprintf trio_vasprintf -#define dscanf trio_dscanf -#define vdscanf trio_vdscanf -#endif - -/* strio compatible names */ -#define StrScan trio_sscanf -#define StrFormat trio_sprintf -#define StrFormatMax trio_snprintf -#define StrFormatAlloc trio_aprintf -#define StrFormatAppendMax trio_snprintfcat - -#ifdef __cplusplus -} /* extern "C" */ -#endif - -#endif /* TRIO_TRIO_H */ diff --git a/org.glite.jp.common/interface/type_plugin.h b/org.glite.jp.common/interface/type_plugin.h deleted file mode 100644 index 8630be3..0000000 --- a/org.glite.jp.common/interface/type_plugin.h +++ /dev/null @@ -1,74 +0,0 @@ -#ifndef __GLITE_JP_TYPEPLUGIN -#define __GLITE_JP_TYPEPLUGIN - -typedef struct _glite_jp_tplug_data_t { - - char *namespace; - void *pctx; - -/** Compare attribute values. - * \param[in] a value to compare - * \param[in] b value to compare - * \param[out] result like strcmp() - * \param[out] err set if the values cannot be compared - * \retval 0 OK - * \retval other error - */ - int (*cmp)( - void *ctx, - const glite_jp_attrval_t *a, - const glite_jp_attrval_t *b, - int *result); - -/** Convert to database string representation. - * It is guaranteed the returned value can be converted back with - * from_db(). - * The resulting value may not be suitable for indexing with db engine. - * - * \param[in] attr the attribute value to convert - * \retval NULL can't be converted - * \retval other the string representation. - * */ - char * (*to_db_full)(void *ctx,const glite_jp_attrval_t *attr); - -/** Convert to a database string representation suitable for indexing. - * The function is non-decreasing (wrt. cmp() above and strcmp()), however it - * is not guaranteed to be one-to-one. - * - * \param[in] attr the value to convert - * \param[in] len maximum length of the converted value. - * \retval NULL can't be converted - * \retval other the string representation - */ - char * (*to_db_index)(void *ctx,const glite_jp_attrval_t *attr,int len); - -/** Convert from the database format. - * \param[in] str the string value - * \param[inout] attr name contains the name of the attribute to be converted - * the rest of attr is filled in. - */ - int (*from_db)(void *ctx,const char *str,glite_jp_attrval_t *attr); - -/** Query for database types suitable to store values returned by - * to_db_full() and to_db_index(). - * Useful for db column dynamic creation etc. - * Return pointer to internal static data, non-reentrant. - */ - const char * (*db_type_full)(void *ctx,const char *attr); - const char * (*db_type_index)(void *ctx,const char *attr,int len); - -} glite_jp_tplug_data_t; - -/** Plugin init function. - Must be called init, supposed to be called as many times as required - for different param's (e.g. xsd files). - Registers the plugin in ctx. - */ - -typedef int (*glite_jp_tplug_init_t)( - glite_jp_context_t ctx, - const char *param, - glite_jp_tplug_data_t *plugin_data -); - -#endif diff --git a/org.glite.jp.common/interface/types.h b/org.glite.jp.common/interface/types.h deleted file mode 100644 index e4208c1..0000000 --- a/org.glite.jp.common/interface/types.h +++ /dev/null @@ -1,66 +0,0 @@ -#ifndef __GLITE_JP_TYPES -#define __GLITE_JP_TYPES - -#include - -typedef struct _glite_jp_error_t { - int code; - const char *desc; - const char *source; - struct _glite_jp_error_t *reason; -} glite_jp_error_t; - -typedef struct _glite_jp_context { - glite_jp_error_t *error; - int (**deferred_func)(struct _glite_jp_context *,void *); - void **deferred_arg; - void *feeds; - struct soap *other_soap; - char *peer; - void **plugins; - void **type_plugins; - void *dbhandle; - char **trusted_peers; - char *myURL; - int noauth; -} *glite_jp_context_t; - -typedef enum { - GLITE_JP_ATTR_ORIG_ANY, /**< for queries: don't care about origin */ - GLITE_JP_ATTR_ORIG_SYSTEM, /**< JP internal, e.g. job owner */ - GLITE_JP_ATTR_ORIG_USER, /**< inserted by user explicitely */ - GLITE_JP_ATTR_ORIG_FILE /**< coming from uploaded file */ -} glite_jp_attr_orig_t; - -typedef struct { - char *name; /**< including namespace */ - char *value; - int binary; /**< value is binary */ - size_t size; /**< in case of binary value */ - glite_jp_attr_orig_t origin; - char *origin_detail; /**< where it came from, i.e. file URI:name */ - time_t timestamp; -} glite_jp_attrval_t; - - -typedef enum { - GLITE_JP_QUERYOP_UNDEF, - GLITE_JP_QUERYOP_EQUAL, - GLITE_JP_QUERYOP_UNEQUAL, - GLITE_JP_QUERYOP_LESS, - GLITE_JP_QUERYOP_GREATER, - GLITE_JP_QUERYOP_WITHIN, - GLITE_JP_QUERYOP_EXISTS, - GLITE_JP_QUERYOP__LAST, -} glite_jp_queryop_t; - -typedef struct { - char *attr; - glite_jp_queryop_t op; - char *value, *value2; - int binary; - size_t size,size2; - glite_jp_attr_orig_t origin; -} glite_jp_query_rec_t; - -#endif diff --git a/org.glite.jp.common/project/build.number b/org.glite.jp.common/project/build.number deleted file mode 100644 index 8717663..0000000 --- a/org.glite.jp.common/project/build.number +++ /dev/null @@ -1,2 +0,0 @@ -#Mon Jan 16 06:46:39 CET 2006 -module.build=39 diff --git a/org.glite.jp.common/project/build.properties b/org.glite.jp.common/project/build.properties deleted file mode 100644 index e69de29..0000000 diff --git a/org.glite.jp.common/project/configure.properties.xml b/org.glite.jp.common/project/configure.properties.xml deleted file mode 100644 index d4e6f4f..0000000 --- a/org.glite.jp.common/project/configure.properties.xml +++ /dev/null @@ -1,62 +0,0 @@ - - - - - - - - - - - -top_srcdir=.. -builddir=build -stagedir=${stage.abs.dir} -distdir=${dist.dir} -globalprefix=${global.prefix} -jpprefix=${subsystem.prefix} -package=${module.package.name} -PREFIX=${install.dir} -version=${module.version} -glite_location=${with.glite.location} -globus_prefix=${with.globus.prefix} -expat_prefix=${with.expat.prefix} -gsoap_prefix=${with.gsoap.prefix} -thrflavour=${with.globus.thr.flavor} -nothrflavour=${with.globus.nothr.flavor} -cppunit=${with.cppunit.prefix} -jpproject=${subsystem.project.dir} -project=${component.project.dir} - - - diff --git a/org.glite.jp.common/project/properties.xml b/org.glite.jp.common/project/properties.xml deleted file mode 100755 index b9d669d..0000000 --- a/org.glite.jp.common/project/properties.xml +++ /dev/null @@ -1,52 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/org.glite.jp.common/project/tar_exclude b/org.glite.jp.common/project/tar_exclude deleted file mode 100644 index e1fcd1a..0000000 --- a/org.glite.jp.common/project/tar_exclude +++ /dev/null @@ -1,10 +0,0 @@ -tar_exclude -CVS -build.xml -build -build.properties -properties.xml -configure.properties.xml -.cvsignore -.project -.cdtproject diff --git a/org.glite.jp.common/project/version.properties b/org.glite.jp.common/project/version.properties deleted file mode 100644 index 1441742..0000000 --- a/org.glite.jp.common/project/version.properties +++ /dev/null @@ -1,2 +0,0 @@ -module.version=1.3.0 -module.age=1 diff --git a/org.glite.jp.common/src/attr.c b/org.glite.jp.common/src/attr.c deleted file mode 100644 index 117cb15..0000000 --- a/org.glite.jp.common/src/attr.c +++ /dev/null @@ -1,289 +0,0 @@ -#include -#include -#include -#include -#include - -#include "strmd5.h" -#include "types.h" -#include "attr.h" -#include "type_plugin.h" - -void glite_jp_attrval_free(glite_jp_attrval_t *a,int f) -{ - free(a->name); - free(a->value); - free(a->origin_detail); - memset(a,0,sizeof *a); - if (f) free(a); -} - -void glite_jp_attrval_copy(glite_jp_attrval_t *dst,const glite_jp_attrval_t *src) -{ - dst->name = strdup(src->name); - dst->origin = src->origin; - dst->size = src->size; - dst->timestamp = src->timestamp; - dst->origin_detail = src->origin_detail ? - strdup(src->origin_detail) : NULL; - if (dst->binary = src->binary) { - dst->value = malloc(src->size); - memcpy(dst->value,src->value,src->size); - } - else dst->value = strdup(src->value); -} - - -#define min(x,y) ((x) > (y) ? (y) : (x)) - -static int fb_cmp(void *ctx,const glite_jp_attrval_t *a,const glite_jp_attrval_t *b,int *result) -{ - if (a->binary != b->binary) return EINVAL; - if (a->binary) { - *result = memcmp(a->value,b->value,min(a->size,b->size)); - if (!*result && a->size != b->size) - *result = a->size > b->size ? 1 : -1; - } - else *result = strcmp(a->value,b->value); - return 0; -} - -/* XXX: depends on specific definition of glite_jp_attr_orig_t */ -static char orig_char[] = "ASUF"; - -/* XXX: don't allocate memory, don't grow more than twice */ -static int escape_colon(const char *in, char *out) -{ - int i,o; - - for (i=o=0; in[i]; i++) switch (in[i]) { - case ':': out[o++] = '\\'; out[o++] = ':'; break; - case '\\': out[o++] = '\\'; out[o++] = '\\'; break; - default: out[o++] = in[i]; break; - } - out[o] = 0; - return o; -} - -/* XXX: read until unescaped colon is found - * allocates output */ -static char * unescape_colon(const char *in,int *rd) -{ - int i,o; - char *out; - - for (i=o=0; in[i] && in[i] != ':'; i++,o++) - if (in[i] == '\\') i++; - - out = malloc(o+1); - - for (i=o=0; in[i] && in[i] != ':'; i++) - if (in[i] == '\\') out[o++] = in[++i]; - else out[o++] = in[i]; - - out[o] = 0; - *rd = i; - return out; -} - -static char * fb_to_db_full(void *ctx,const glite_jp_attrval_t *attr) -{ - - int vsize = attr->binary ? attr->size * 4/3 + 6 : strlen(attr->value)+1, - len; - - /* 4x: + \0 + ASUF + BS + %12d */ - char *db = malloc(19 + (attr->origin_detail ? 2*strlen(attr->origin_detail) : 0) + vsize); - - if (attr->origin < 0 || attr->origin > GLITE_JP_ATTR_ORIG_FILE) { - free(db); return NULL; - } - len = sprintf(db,"%c:%d:%c:",attr->binary ? 'B' : 'S', - attr->timestamp,orig_char[attr->origin]); - - if (attr->origin_detail) len += escape_colon(attr->origin_detail,db+len); - db[len++] = ':'; - - if (attr->binary) { - vsize = base64_encode(attr->value,attr->size,db+len,vsize-1); - if (vsize < 0) { free(db); return NULL; } - db[len+vsize] = 0; - } - else strcpy(db+len,attr->value); - - return db; -} - -static char * fb_to_db_index(void *ctx,const glite_jp_attrval_t *attr,int len) -{ - char *s; - -/* XXX: binary values not really handled. Though the formal semantics is not broken */ - if (attr->binary) return strdup("XXX"); - - s = strdup(attr->value); - if (len < strlen(s)) s[len] = 0; - return s; -} - -static int fb_from_db(void *ctx,const char *str,glite_jp_attrval_t *attr) -{ - int p = 2; - char *colon,*cp; - - if (str[0] != 'B' && str[0] != 'S') return EINVAL; - attr->binary = str[0] == 'B'; - cp = attr->value = strdup(str); - - colon = strchr(cp+p,':'); - if (!colon) return EINVAL; - - *colon++ = 0; - attr->timestamp = (time_t) atol(cp+p); - p = colon-cp; - - for (attr->origin = GLITE_JP_ATTR_ORIG_ANY; orig_char[attr->origin] && orig_char[attr->origin] != cp[p]; attr->origin++); - if (!orig_char[attr->origin]) return EINVAL; - - p += 2; - if (cp[p] == ':') attr->origin_detail = NULL; - else { - int r; - attr->origin_detail = unescape_colon(cp+p,&r); - p += r; - } - if (cp[p++] != ':') return EINVAL; - - if (attr->binary) { - attr->size = base64_decode(str+p,attr->value,strlen(str)); - if (attr->size < 0) return EINVAL; - } - else strcpy(attr->value,str+p); - - return 0; -} - -static const char * fb_type_full(void *ctx,const char *attr) -{ - return "mediumblob"; -} - -static const char * fb_type_index(void *ctx,const char *attr,int len) -{ - static char tbuf[100]; - sprintf(tbuf,"varchar(%d)",len); - return tbuf; -} - - - -static glite_jp_tplug_data_t fallback_plugin = { - "", - NULL, - fb_cmp, - fb_to_db_full, - fb_to_db_index, - fb_from_db, - fb_type_full, - fb_type_index, -}; - -static glite_jp_tplug_data_t *get_plugin(glite_jp_context_t ctx,const char *aname) -{ - void **cp = ctx->type_plugins; - char *colon,*ns; - - if (!cp) return &fallback_plugin; - glite_jp_clear_error(ctx); - ns = strdup(aname); - colon = strrchr(ns,':'); - if (colon) *colon = 0; else *ns = 0; - - while (*cp) { - glite_jp_tplug_data_t *p = *cp; - if (!strcmp(ns,p->namespace)) { - free(ns); - return p; - } - } - free(ns); - return &fallback_plugin; /* XXX: is it always desirable? */ -} - -int glite_jp_attrval_cmp(glite_jp_context_t ctx,const glite_jp_attrval_t *a,const glite_jp_attrval_t *b,int *result) -{ - glite_jp_tplug_data_t *ap = get_plugin(ctx,a->name); - glite_jp_error_t err; - - memset(&err,0,sizeof err); - err.source = __FUNCTION__; - glite_jp_clear_error(ctx); - - if (strcmp(a->name,b->name)) { - err.code = EINVAL; - err.desc = "Can't compare different attributes"; - return glite_jp_stack_error(ctx,&err); - } - - return ap->cmp(ap->pctx,a,b,result); -} - -char *glite_jp_attrval_to_db_full(glite_jp_context_t ctx,const glite_jp_attrval_t *attr) -{ - glite_jp_tplug_data_t *ap = get_plugin(ctx,attr->name); - - glite_jp_clear_error(ctx); - return ap->to_db_full(ap->pctx,attr); -} - -char *glite_jp_attrval_to_db_index(glite_jp_context_t ctx,const glite_jp_attrval_t *attr,int len) -{ - glite_jp_tplug_data_t *ap = get_plugin(ctx,attr->name); - - glite_jp_clear_error(ctx); - return ap->to_db_index(ap->pctx,attr,len); -} - - -int glite_jp_attrval_from_db(glite_jp_context_t ctx,const char *str,glite_jp_attrval_t *attr) -{ - glite_jp_tplug_data_t *ap = get_plugin(ctx,attr->name); - - glite_jp_clear_error(ctx); - return ap->from_db(ap->pctx,str,attr); -} - -const char *glite_jp_attrval_db_type_full(glite_jp_context_t ctx,const char *attr) -{ - glite_jp_tplug_data_t *ap = get_plugin(ctx,attr); - - glite_jp_clear_error(ctx); - return ap->db_type_full(ap->pctx,attr); -} - -const char *glite_jp_attrval_db_type_index(glite_jp_context_t ctx,const char *attr,int len) -{ - glite_jp_tplug_data_t *ap = get_plugin(ctx,attr); - - glite_jp_clear_error(ctx); - return ap->db_type_index(ap->pctx,attr,len); -} - -/* XXX: UNIX time, should be ISO blahblah */ -time_t glite_jp_attr2time(const char *a) -{ - long t; - - sscanf(a,"%ld",&t); - return t; -} - -/* XXX: UNIX time, should be ISO blahblah */ -char * glite_jp_time2attr(time_t t) -{ - char *r; - - asprintf(&r,"%ld",(long) t); - return r; -} - diff --git a/org.glite.jp.common/src/context.c b/org.glite.jp.common/src/context.c deleted file mode 100644 index a6608aa..0000000 --- a/org.glite.jp.common/src/context.c +++ /dev/null @@ -1,144 +0,0 @@ -#include -#include - -#include "types.h" -#include "context.h" - -int glite_jp_init_context(glite_jp_context_t *ctx) -{ - return (*ctx = calloc(1,sizeof **ctx)) != NULL; -} - -void glite_jp_free_context(glite_jp_context_t ctx) -{ - glite_jp_clear_error(ctx); - free(ctx); -} - -char *glite_jp_peer_name(glite_jp_context_t ctx) -{ - return strdup(ctx->peer ? ctx->peer : "unknown"); -} - -char *glite_jp_error_chain(glite_jp_context_t ctx) -{ - char *ret = NULL,indent[300] = ""; - int len = 0,add; - char buf[2000]; - - glite_jp_error_t *ep = ctx->error; - - do { - add = snprintf(buf,sizeof buf,"%s%s: %s (%s)\n", - indent, - ep->source, - strerror(ep->code), - ep->desc ? ep->desc : ""); - ret = realloc(ret,len + add + 1); - strncpy(ret + len,buf,add); ret[len += add] = 0; - strcat(indent," "); - } while (ep = ep->reason); - - return ret; -} - -int glite_jp_stack_error(glite_jp_context_t ctx, const glite_jp_error_t *err) -{ - glite_jp_error_t *reason = ctx->error; - - ctx->error = calloc(1,sizeof *ctx->error); - ctx->error->code = err->code; - ctx->error->desc = err->desc ? strdup(err->desc) : NULL; - ctx->error->source = err->source ? strdup(err->source) : NULL; - ctx->error->reason = reason; - - return err->code; -} - -int glite_jp_clear_error(glite_jp_context_t ctx) -{ - glite_jp_error_t *e = ctx->error, *r; - - while (e) { - r = e->reason; - free((char *) e->source); - free((char *) e->desc); - free(e); - e = r; - } - ctx->error = NULL; - return 0; -} - - -void glite_jp_free_query_rec(glite_jp_query_rec_t *q) -{ - free(q->attr); - free(q->value); - free(q->value2); - memset(q,0,sizeof *q); -} - -int glite_jp_queryrec_copy(glite_jp_query_rec_t *dst, const glite_jp_query_rec_t *src) -{ - memcpy(dst,src,sizeof *src); - if (src->attr) dst->attr = strdup(src->attr); - if (src->value) dst->value = strdup(src->value); - if (src->value2) dst->value2 = strdup(src->value2); - return 0; -} - -int glite_jp_run_deferred(glite_jp_context_t ctx) -{ - int i,cnt,ret; - - if (!ctx->deferred_func) return 0; - - glite_jp_clear_error(ctx); - for (cnt=0;ctx->deferred_func[cnt];cnt++); - for (i=0; ideferred_func)(ctx,*ctx->deferred_arg)) { - glite_jp_error_t err; - char desc[100]; - - sprintf(desc,"calling func #%d, %p",i,*ctx->deferred_func); - err.code = ret; - err.desc = desc; - err.source = "glite_jp_run_deferred()"; - - glite_jp_stack_error(ctx,&err); - return ret; - } - else { - memmove(ctx->deferred_func,ctx->deferred_func+1, - (cnt-i) * sizeof *ctx->deferred_func); - memmove(ctx->deferred_arg,ctx->deferred_arg+1, - (cnt-i) * sizeof *ctx->deferred_arg); - } - } - free(ctx->deferred_func); ctx->deferred_func = NULL; - free(ctx->deferred_arg); ctx->deferred_arg = NULL; - return 0; -} - -int glite_jp_add_deferred( - glite_jp_context_t ctx, - int (*func)(glite_jp_context_t, void *), - void *arg -) -{ - int (**v)(glite_jp_context_t, void *) = ctx->deferred_func; - int i; - - for (i=0; v && v[i]; i++); - - ctx->deferred_func = realloc(ctx->deferred_func, (i+2) * sizeof *ctx->deferred_func); - ctx->deferred_func[i] = func; - ctx->deferred_func[i+1] = NULL; - - ctx->deferred_arg = realloc(ctx->deferred_arg,(i+2) * sizeof *ctx->deferred_arg); - ctx->deferred_arg[i] = arg; - ctx->deferred_arg[i+1] = NULL; - - return 0; -} diff --git a/org.glite.jp.common/src/escape.c b/org.glite.jp.common/src/escape.c deleted file mode 100644 index 2ea1413..0000000 --- a/org.glite.jp.common/src/escape.c +++ /dev/null @@ -1,225 +0,0 @@ -#ident "$Header$" - -#include -#include -#include -#include - -#include "escape.h" - -#define ULM_QM '"' -#define ULM_BS '\\' -#define ULM_LF '\n' - - -/* - *---------------------------------------------------------------------- - * - * \fn char *edg_wll_LogEscape(const char *str) - * \param str a string to escape - * \return new (allocated) escaped string - * \brief in given string escape all ULM_QM, ULM_BS and ULM_LF by ULM_BS - * - * Calls: malloc, strlen - * - * Algorithm: array lookup - * - the new string will be allocated - * - *---------------------------------------------------------------------- - */ - -char *edg_wll_LogEscape(const char *str) -{ -unsigned int i,j; -size_t size; -char *ret; - -if (str == NULL) return NULL; -if ((size = strlen(str)) == 0) return strdup(""); - -ret = (char*) malloc(1+2*size*sizeof(char)); - -j = 0; -for (i=0; i',"gt" }, - { '&',"amp" }, - { '"',"quot" }, - { '\'',"apos" }, - { 0, NULL } -}; - -#define XML_ESCAPE_SET "<>&\"'" - -char *edg_wll_EscapeXML(const char *in) -{ - const char* tmp_in; - char *out; - int cnt,i,j,k; - - if (!in) return NULL; - - for (cnt = 0, tmp_in = in; *tmp_in != '\0'; ++tmp_in) { - if (strchr(XML_ESCAPE_SET, *tmp_in) || - (*tmp_in & 0x7f) < 0x20 /* control character */ || - (*tmp_in == '%')) cnt++; - } - - out = malloc(strlen(in)+1+cnt*5); - - for (i=j=0; in[i]; i++) { - for (k=0; xml_etab[k].c && xml_etab[k].c != in[i]; k++); - if (xml_etab[k].c) { - int l; - - out[j++] = '&'; - memcpy(out+j,xml_etab[k].e,l=strlen(xml_etab[k].e)); - j += l; - out[j++] = ';'; - } else if ((in[i] & 0x7f) < 0x20 || in[i] == '%') { - sprintf(out+j, "%%%02x", (unsigned char)in[i]); - j+=3; - } else { - out[j++] = in[i]; - } - } - out[j] = 0; - return out; -} - -char *edg_wll_UnescapeXML(const char *in) -{ - char *out; - int i,j,k; - char xtmp[3]; - unsigned char origchar; - - if (!in) return NULL; - out = malloc(strlen(in)+1); - - for (i=j=0; in[i]; j++) if (in[i] == '&') { - char *s = strchr(in+i,';'); - if (s) { - int l = s-in-i+1; - for (k=0; xml_etab[k].c && strncasecmp(in+i+1,xml_etab[k].e,l-2); k++); - if (xml_etab[k].c) { - out[j] = xml_etab[k].c; - i += l; - } else out[j] = in[i++]; - } else out[j] = in[i++]; - } else if (in[i] == '%') { - if (isxdigit(xtmp[0]=in[i+1]) && isxdigit(xtmp[1]=in[i+2])) { - xtmp[2] = '\0'; - origchar = (unsigned char) strtol(xtmp, NULL, 16); - if ((origchar & 0x7f) < 0x20 || origchar == '%') { - out[j] = origchar; - i += 3; - } else out[j] = in[i++]; - } else out[j] = in[i++]; - } else { - out[j] = in[i++]; - } - out[j] = 0; - return out; -} - -char *edg_wll_EscapeSQL(const char *in) -{ - const char* tmp_in; - char *out = NULL; - int i,j,cnt; - - if (!in) return NULL; - - for (cnt = 0, tmp_in = in; (tmp_in = strchr(tmp_in,'\'')) != NULL; ++tmp_in) { - ++cnt; - } - for (tmp_in = in; (tmp_in = strchr(tmp_in,'\\')) != NULL; ++tmp_in) { - ++cnt; - } - - out = malloc(strlen(in)+1+cnt); - - for (i=j=0; in[i]; i++) { - if (in[i] == '\\') out[j++] = '\\'; - if (in[i] == '\'') out[j++] = '\''; - out[j++] = in[i]; - } - out[j] = 0; - - return out; -} diff --git a/org.glite.jp.common/src/strio.c b/org.glite.jp.common/src/strio.c deleted file mode 100644 index f1ab5b8..0000000 --- a/org.glite.jp.common/src/strio.c +++ /dev/null @@ -1,581 +0,0 @@ -/************************************************************************* - * - * $Id$ - * - * Copyright (C) 1998 Bjorn Reese and Daniel Stenberg. - * - * Permission to use, copy, modify, and distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF - * MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE AUTHORS AND - * CONTRIBUTORS ACCEPT NO RESPONSIBILITY IN ANY CONCEIVABLE MANNER. - * - ************************************************************************/ - -/* - * TODO - * - StrToLongDouble - */ - -static const char rcsid[] = "@(#)$Id$"; - -#if defined(unix) || defined(__xlC__) || defined(__QNX__) -# define PLATFORM_UNIX -#elif defined(WIN32) || defined(_WIN32) -# define PLATFORM_WIN32 -#elif defined(AMIGA) && defined(__GNUC__) -# define PLATFORM_UNIX -#endif - -#if defined(__STDC__) && (__STDC_VERSION__ >= 199901L) -# define TRIO_C99 -#endif - -#include "strio.h" -#include -#include -#include -#include -#include -#include -#ifndef DEBUG -# define NDEBUG -#endif -#include - -#ifndef NULL -# define NULL 0 -#endif -#define NIL ((char)0) -#ifndef FALSE -# define FALSE (1 == 0) -# define TRUE (! FALSE) -#endif - -#define VALID(x) (NULL != (x)) -#define INVALID(x) (NULL == (x)) - -#if defined(PLATFORM_UNIX) -# define USE_STRCASECMP -# define USE_STRNCASECMP -# define USE_STRERROR -# if defined(__QNX__) -# define strcasecmp(x,y) stricmp(x,y) -# define strncasecmp(x,y,n) strnicmp(x,y,n) -# endif -#elif defined(PLATFORM_WIN32) -# define USE_STRCASECMP -# define strcasecmp(x,y) strcmpi(x,y) -#endif - -/************************************************************************* - * StrAppendMax - */ -char *StrAppendMax(char *target, size_t max, const char *source) -{ - assert(VALID(target)); - assert(VALID(source)); - assert(max > 0); - - max -= StrLength(target) + 1; - return (max > 0) ? strncat(target, source, max) : target; -} - -/************************************************************************* - * StrCopyMax - */ -char *StrCopyMax(char *target, size_t max, const char *source) -{ - assert(VALID(target)); - assert(VALID(source)); - assert(max > 0); /* Includes != 0 */ - - target = strncpy(target, source, max - 1); - target[max - 1] = (char)0; - return target; -} - -/************************************************************************* - * StrDuplicate - */ -char *StrDuplicate(const char *source) -{ - char *target; - - assert(VALID(source)); - - target = StrAlloc(StrLength(source) + 1); - if (target) - { - StrCopy(target, source); - } - return target; -} - -/************************************************************************* - * StrDuplicateMax - */ -char *StrDuplicateMax(const char *source, size_t max) -{ - char *target; - size_t len; - - assert(VALID(source)); - assert(max > 0); - - /* Make room for string plus a terminating zero */ - len = StrLength(source) + 1; - if (len > max) - { - len = max; - } - target = StrAlloc(len); - if (target) - { - StrCopyMax(target, len, source); - } - return target; -} - -/************************************************************************* - * StrEqual - */ -int StrEqual(const char *first, const char *second) -{ - assert(VALID(first)); - assert(VALID(second)); - - if (VALID(first) && VALID(second)) - { -#if defined(USE_STRCASECMP) - return (0 == strcasecmp(first, second)); -#else - while ((*first != NIL) && (*second != NIL)) - { - if (toupper(*first) != toupper(*second)) - { - break; - } - first++; - second++; - } - return ((*first == NIL) && (*second == NIL)); -#endif - } - return FALSE; -} - -/************************************************************************* - * StrEqualCase - */ -int StrEqualCase(const char *first, const char *second) -{ - assert(VALID(first)); - assert(VALID(second)); - - if (VALID(first) && VALID(second)) - { - return (0 == strcmp(first, second)); - } - return FALSE; -} - -/************************************************************************* - * StrEqualCaseMax - */ -int StrEqualCaseMax(const char *first, size_t max, const char *second) -{ - assert(VALID(first)); - assert(VALID(second)); - - if (VALID(first) && VALID(second)) - { - return (0 == strncmp(first, second, max)); - } - return FALSE; -} - -/************************************************************************* - * StrEqualLocale - */ -int StrEqualLocale(const char *first, const char *second) -{ - assert(VALID(first)); - assert(VALID(second)); - -#if defined(LC_COLLATE) - return (strcoll(first, second) == 0); -#else - return StrEqual(first, second); -#endif -} - -/************************************************************************* - * StrEqualMax - */ -int StrEqualMax(const char *first, size_t max, const char *second) -{ - assert(VALID(first)); - assert(VALID(second)); - - if (VALID(first) && VALID(second)) - { -#if defined(USE_STRNCASECMP) - return (0 == strncasecmp(first, second, max)); -#else - /* Not adequately tested yet */ - size_t cnt = 0; - while ((*first != NIL) && (*second != NIL) && (cnt <= max)) - { - if (toupper(*first) != toupper(*second)) - { - break; - } - first++; - second++; - cnt++; - } - return ((cnt == max) || ((*first == NIL) && (*second == NIL))); -#endif - } - return FALSE; -} - -/************************************************************************* - * StrError - */ -const char *StrError(int errorNumber) -{ -#if defined(USE_STRERROR) - return strerror(errorNumber); -#else - return "unknown"; -#endif -} - -/************************************************************************* - * StrFormatDate - */ -size_t StrFormatDateMax(char *target, - size_t max, - const char *format, - const struct tm *datetime) -{ - assert(VALID(target)); - assert(VALID(format)); - assert(VALID(datetime)); - assert(max > 0); - - return strftime(target, max, format, datetime); -} - -/************************************************************************* - * StrHash - */ -unsigned long StrHash(const char *string, int type) -{ - unsigned long value = 0L; - char ch; - - assert(VALID(string)); - - switch (type) - { - case STRIO_HASH_PLAIN: - while ( (ch = *string++) != NIL ) - { - value *= 31; - value += (unsigned long)ch; - } - break; - default: - assert(FALSE); - break; - } - return value; -} - -/************************************************************************* - * StrMatch - */ -int StrMatch(char *string, char *pattern) -{ - assert(VALID(string)); - assert(VALID(pattern)); - - for (; ('*' != *pattern); ++pattern, ++string) - { - if (NIL == *string) - { - return (NIL == *pattern); - } - if ((toupper((int)*string) != toupper((int)*pattern)) - && ('?' != *pattern)) - { - return FALSE; - } - } - /* two-line patch to prevent *too* much recursiveness: */ - while ('*' == pattern[1]) - pattern++; - - do - { - if ( StrMatch(string, &pattern[1]) ) - { - return TRUE; - } - } - while (*string++); - - return FALSE; -} - -/************************************************************************* - * StrMatchCase - */ -int StrMatchCase(char *string, char *pattern) -{ - assert(VALID(string)); - assert(VALID(pattern)); - - for (; ('*' != *pattern); ++pattern, ++string) - { - if (NIL == *string) - { - return (NIL == *pattern); - } - if ((*string != *pattern) - && ('?' != *pattern)) - { - return FALSE; - } - } - /* two-line patch to prevent *too* much recursiveness: */ - while ('*' == pattern[1]) - pattern++; - - do - { - if ( StrMatchCase(string, &pattern[1]) ) - { - return TRUE; - } - } - while (*string++); - - return FALSE; -} - -/************************************************************************* - * StrSpanFunction - * - * Untested - */ -size_t StrSpanFunction(char *source, int (*Function)(int)) -{ - size_t count = 0; - - assert(VALID(source)); - assert(VALID(Function)); - - while (*source != NIL) - { - if (Function(*source)) - break; /* while */ - source++; - count++; - } - return count; -} - -/************************************************************************* - * StrSubstringMax - */ -char *StrSubstringMax(const char *string, size_t max, const char *find) -{ - size_t count; - size_t size; - char *result = NULL; - - assert(VALID(string)); - assert(VALID(find)); - - size = StrLength(find); - if (size <= max) - { - for (count = 0; count <= max - size; count++) - { - if (StrEqualMax(find, size, &string[count])) - { - result = (char *)&string[count]; - break; - } - } - } - return result; -} - -/************************************************************************* - * StrToDouble - * - * double ::= [ ] - * ( | - * | - * ) - * [ [ ] ] - * number ::= 1*( ) - * digit ::= ( '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' ) - * exponential ::= ( 'e' | 'E' ) - * sign ::= ( '-' | '+' ) - * decimal_point ::= '.' - */ -double StrToDouble(const char *source, const char **endp) -{ -#if defined(TRIO_C99) - return strtod(source, endp); -#else - /* Preliminary code */ - int isNegative = FALSE; - int isExponentNegative = FALSE; - unsigned long integer = 0; - unsigned long fraction = 0; - unsigned long fracdiv = 1; - unsigned long exponent = 0; - double value = 0.0; - - /* First try hex-floats */ - if ((source[0] == '0') && ((source[1] == 'x') || (source[1] == 'X'))) - { - source += 2; - while (isxdigit((int)*source)) - { - integer *= 16; - integer += (isdigit((int)*source) - ? (*source - '0') - : 10 + (toupper((int)*source) - 'A')); - source++; - } - if (*source == '.') - { - source++; - while (isxdigit((int)*source)) - { - fraction *= 16; - fraction += (isdigit((int)*source) - ? (*source - '0') - : 10 + (toupper((int)*source) - 'A')); - fracdiv *= 16; - source++; - } - if ((*source == 'p') || (*source == 'P')) - { - source++; - if ((*source == '+') || (*source == '-')) - { - isExponentNegative = (*source == '-'); - source++; - } - while (isdigit((int)*source)) - { - exponent *= 10; - exponent += (*source - '0'); - source++; - } - } - } - } - else /* Then try normal decimal floats */ - { - isNegative = (*source == '-'); - /* Skip sign */ - if ((*source == '+') || (*source == '-')) - source++; - - /* Integer part */ - while (isdigit((int)*source)) - { - integer *= 10; - integer += (*source - '0'); - source++; - } - - if (*source == '.') - { - source++; /* skip decimal point */ - while (isdigit((int)*source)) - { - fraction *= 10; - fraction += (*source - '0'); - fracdiv *= 10; - source++; - } - } - if ((*source == 'e') || (*source == 'E')) - { - source++; /* Skip exponential indicator */ - isExponentNegative = (*source == '-'); - if ((*source == '+') || (*source == '-')) - source++; - while (isdigit((int)*source)) - { - exponent *= 10; - exponent += (*source - '0'); - source++; - } - } - } - - value = (double)integer; - if (fraction != 0) - { - value += (double)fraction / (double)fracdiv; - } - if (exponent != 0) - { - if (isExponentNegative) - value /= pow((double)10, (double)exponent); - else - value *= pow((double)10, (double)exponent); - } - if (isNegative) - value = -value; - - if (endp) - *endp = source; - return value; -#endif -} - -/************************************************************************* - * StrToFloat - */ -float StrToFloat(const char *source, const char **endp) -{ -#if defined(TRIO_C99) - return strtof(source, endp); -#else - return (float)StrToDouble(source, endp); -#endif -} - -/************************************************************************* - * StrToUpper - */ -int StrToUpper(char *target) -{ - int i = 0; - - assert(VALID(target)); - - while (NIL != *target) - { - *target = toupper((int)*target); - target++; - i++; - } - return i; -} diff --git a/org.glite.jp.common/src/strio.h b/org.glite.jp.common/src/strio.h deleted file mode 100644 index 68845a3..0000000 --- a/org.glite.jp.common/src/strio.h +++ /dev/null @@ -1,227 +0,0 @@ -/************************************************************************* - * - * $Id$ - * - * Copyright (C) 1998 Bjorn Reese and Daniel Stenberg. - * - * Permission to use, copy, modify, and distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF - * MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE AUTHORS AND - * CONTRIBUTORS ACCEPT NO RESPONSIBILITY IN ANY CONCEIVABLE MANNER. - * - ************************************************************************/ - -#ifndef TRIO_STRIO_H -#define TRIO_STRIO_H - -#if !(defined(DEBUG) || defined(NDEBUG)) -# define NDEBUG -#endif -#include -#include -#include -#include - -#ifndef STRIO_MALLOC -# define STRIO_MALLOC(n) malloc(n) -#endif -#ifndef STRIO_FREE -# define STRIO_FREE(x) free(x) -#endif - -/* - * StrAppend(target, source) - * StrAppendMax(target, maxsize, source) - * - * Append 'source' to 'target' - * - * target = StrAlloc(size) - * - * Allocate a new string - * - * StrContains(target, substring) - * - * Find out if the string 'substring' is - * contained in the string 'target' - * - * StrCopy(target, source) - * StrCopyMax(target, maxsize, source) - * - * Copy 'source' to 'target' - * - * target = StrDuplicate(source) - * target = StrDuplicateMax(source, maxsize) - * - * Allocate and copy 'source' to 'target' - * - * StrEqual(first, second) - * StrEqualMax(first, maxsize, second) - * - * Compare if 'first' is equal to 'second'. - * Case-independent. - * - * StrEqualCase(first, second) - * StrEqualCaseMax(first, maxsize, second) - * - * Compare if 'first' is equal to 'second' - * Case-dependent. Please note that the use of the - * word 'case' has the opposite meaning as that of - * strcasecmp(). - * - * StrFormat(target, format, ...) - * StrFormatMax(target, maxsize, format, ...) - * - * Build 'target' according to 'format' and succesive - * arguments. This is equal to the sprintf() and - * snprintf() functions. - * - * StrFormatDate(target, format, ...) - * - * StrFree(target) - * - * De-allocates a string - * - * StrHash(string, type) - * - * Calculates the hash value of 'string' based on the - * 'type'. - * - * StrIndex(target, character) - * StrIndexLast(target, character) - * - * Find the first/last occurrence of 'character' in - * 'target' - * - * StrLength(target) - * - * Return the length of 'target' - * - * StrMatch(string, pattern) - * StrMatchCase(string, pattern) - * - * Find 'pattern' within 'string'. 'pattern' may contain - * wildcards such as * (asterics) and ? (question mark) - * which matches zero or more characters and exactly - * on character respectively - * - * StrScan(source, format, ...) - * - * Equal to sscanf() - * - * StrSubstring(target, substring) - * - * Find the first occurrence of the string 'substring' - * within the string 'target' - * - * StrTokenize(target, list) - * - * Split 'target' into the first token delimited by - * one of the characters in 'list'. If 'target' is - * NULL then next token will be returned. - * - * StrToUpper(target) - * - * Convert all lower case characters in 'target' into - * upper case characters. - */ - -enum { - STRIO_HASH_NONE = 0, - STRIO_HASH_PLAIN, - STRIO_HASH_TWOSIGNED -}; - -#if !defined(DEBUG) || defined(__DECC) -#define StrAlloc(n) (char *)STRIO_MALLOC(n) -#define StrAppend(x,y) strcat((x), (y)) -#define StrContains(x,y) (0 != strstr((x), (y))) -#define StrCopy(x,y) strcpy((x), (y)) -#define StrIndex(x,y) strchr((x), (y)) -#define StrIndexLast(x,y) strrchr((x), (y)) -#define StrFree(x) STRIO_FREE(x) -#define StrLength(x) strlen((x)) -#define StrSubstring(x,y) strstr((x), (y)) -#define StrTokenize(x,y) strtok((x), (y)) -#define StrToLong(x,y,n) strtol((x), (y), (n)) -#define StrToUnsignedLong(x,y,n) strtoul((x), (y), (n)) -#else /* DEBUG */ - /* - * To be able to use these macros everywhere, including in - * if() sentences, the assertions are put first in a comma - * seperated list. - * - * Unfortunately the DECC compiler does not seem to like this - * so it will use the un-asserted functions above for the - * debugging case too. - */ -#define StrAlloc(n) \ - (assert((n) > 0),\ - (char *)STRIO_MALLOC(n)) -#define StrAppend(x,y) \ - (assert((x) != NULL),\ - assert((y) != NULL),\ - strcat((x), (y))) -#define StrContains(x,y) \ - (assert((x) != NULL),\ - assert((y) != NULL),\ - (0 != strstr((x), (y)))) -#define StrCopy(x,y) \ - (assert((x) != NULL),\ - assert((y) != NULL),\ - strcpy((x), (y))) -#define StrIndex(x,c) \ - (assert((x) != NULL),\ - strchr((x), (c))) -#define StrIndexLast(x,c) \ - (assert((x) != NULL),\ - strrchr((x), (c))) -#define StrFree(x) \ - (assert((x) != NULL),\ - STRIO_FREE(x)) -#define StrLength(x) \ - (assert((x) != NULL),\ - strlen((x))) -#define StrSubstring(x,y) \ - (assert((x) != NULL),\ - assert((y) != NULL),\ - strstr((x), (y))) -#define StrTokenize(x,y) \ - (assert((y) != NULL),\ - strtok((x), (y))) -#define StrToLong(x,y,n) \ - (assert((x) != NULL),\ - assert((y) != NULL),\ - assert((n) >= 2 && (n) <= 36),\ - strtol((x), (y), (n))) -#define StrToUnsignedLong(x,y,n) \ - (assert((x) != NULL),\ - assert((y) != NULL),\ - assert((n) >= 2 && (n) <= 36),\ - strtoul((x), (y), (n))) -#endif /* DEBUG */ - -char *StrAppendMax(char *target, size_t max, const char *source); -char *StrCopyMax(char *target, size_t max, const char *source); -char *StrDuplicate(const char *source); -char *StrDuplicateMax(const char *source, size_t max); -int StrEqual(const char *first, const char *second); -int StrEqualCase(const char *first, const char *second); -int StrEqualCaseMax(const char *first, size_t max, const char *second); -int StrEqualLocale(const char *first, const char *second); -int StrEqualMax(const char *first, size_t max, const char *second); -const char *StrError(int); -size_t StrFormatDateMax(char *target, size_t max, const char *format, const struct tm *datetime); -unsigned long StrHash(const char *string, int type); -int StrMatch(char *string, char *pattern); -int StrMatchCase(char *string, char *pattern); -size_t StrSpanFunction(char *source, int (*Function)(int)); -char *StrSubstringMax(const char *string, size_t max, const char *find); -float StrToFloat(const char *source, const char **target); -double StrToDouble(const char *source, const char **target); -int StrToUpper(char *target); - -#endif /* TRIO_STRIO_H */ diff --git a/org.glite.jp.common/src/strmd5.c b/org.glite.jp.common/src/strmd5.c deleted file mode 100755 index b07593f..0000000 --- a/org.glite.jp.common/src/strmd5.c +++ /dev/null @@ -1,147 +0,0 @@ -#include -#include -#include -#include - -#include "strmd5.h" - -static char mbuf[33]; - -static const char* b64 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"; - -static char *b64r; - -int base64_encode(const void *enc, int enc_size, char *out, int out_max_size) -{ - - unsigned char* enc_buf = (unsigned char*)enc; - int out_size = 0; - unsigned int bits = 0; - unsigned int shift = 0; - - while ( out_size < out_max_size ) { - if ( enc_size>0 ) { - // Shift in byte - bits <<= 8; - bits |= *enc_buf; - shift += 8; - // Next byte - enc_buf++; - enc_size--; - } else if ( shift>0 ) { - // Pad last bits to 6 bits - will end next loop - bits <<= 6 - shift; - shift = 6; - } else { - // Terminate with Mime style '=' - *out = '='; - out_size++; - - return out_size; - } - - // Encode 6 bit segments - while ( shift>=6 ) { - shift -= 6; - *out = b64[ (bits >> shift) & 0x3F ]; - out++; - out_size++; - } - } - - // Output overflow - return -1; -} - -int base64_decode(const char *enc,char *out,int max_out_size) -{ - unsigned int bits = 0; - int shift = 0; - int out_size = 0; - - if (!b64r) { - int i; - b64r = calloc(128,1); - - for (i=0; b64[i]; i++) b64r[b64[i]] = i; - } - - while (*enc && *enc != '=') { - bits <<= 6; - bits |= b64r[*enc++]; - shift += 6; - - while (shift >= 8) { - if (out_size >= max_out_size) return -1; - shift -= 8; - *out++ = (bits >> shift) & 0xff; - out_size++; - } - } - - return out_size; -} - -char *strmd5(const char *s, unsigned char *digest) -{ - MD5_CTX md5; - unsigned char d[16]; - int i; - - MD5_Init(&md5); - MD5_Update(&md5,s,strlen(s)); - MD5_Final(d,&md5); - - if (digest) memcpy(digest,d,sizeof(d)); - - for (i=0; i<16; i++) { - int dd = d[i] & 0x0f; - mbuf[2*i+1] = dd<10 ? dd+'0' : dd-10+'a'; - dd = d[i] >> 4; - mbuf[2*i] = dd<10 ? dd+'0' : dd-10+'a'; - } - mbuf[32] = 0; - return (char *) mbuf; -} - -char *str2md5(const char *s) -{ - MD5_CTX md5; - unsigned char d[16]; - char* ret = malloc(33); - int i; - - if (!ret) - return NULL; - - MD5_Init(&md5); - MD5_Update(&md5, s, strlen(s)); - MD5_Final(d, &md5); - - for (i=0; i<16; i++) { - int dd = d[i] & 0x0f; - ret[2*i+1] = dd<10 ? dd+'0' : dd-10+'a'; - dd = d[i] >> 4; - ret[2*i] = dd<10 ? dd+'0' : dd-10+'a'; - } - ret[32] = 0; - return ret; -} - -char *str2md5base64(const char *s) -{ - MD5_CTX md5; - unsigned char d[16]; - char buf[50]; - int l; - - MD5_Init(&md5); - MD5_Update(&md5, s, strlen(s)); - MD5_Final(d, &md5); - - l = base64_encode(d, 16, buf, sizeof(buf) - 1); - if (l < 1) - return NULL; - buf[l - 1] = 0; - return strdup(buf); -} diff --git a/org.glite.jp.common/src/trio.c b/org.glite.jp.common/src/trio.c deleted file mode 100644 index d46736e..0000000 --- a/org.glite.jp.common/src/trio.c +++ /dev/null @@ -1,5708 +0,0 @@ - -/************************************************************************* - * - * $Id$ - * - * Copyright (C) 1998 Bjorn Reese and Daniel Stenberg. - * - * Permission to use, copy, modify, and distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF - * MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE AUTHORS AND - * CONTRIBUTORS ACCEPT NO RESPONSIBILITY IN ANY CONCEIVABLE MANNER. - * - ************************************************************************* - * - * A note to trio contributors: - * - * Avoid heap allocation at all costs to ensure that the trio functions - * are async-safe. The exceptions are the printf/fprintf functions, which - * uses fputc, and the asprintf functions and the modifier, which - * by design are required to allocate form the heap. - * - ************************************************************************/ - -/* - * TODO: - * - Scan is probably too permissive about its modifiers. - * - C escapes in %#[] ? - * - C99 support has not been properly tested. - * - Multibyte characters (done for format parsing, except scan groups) - * - Complex numbers? (C99 _Complex) - * - Boolean values? (C99 _Bool) - * - C99 NaN(n-char-sequence) missing - * - Should we support the GNU %a alloc modifier? GNU has an ugly hack - * for %a, because C99 used %a for other purposes. If specified as - * %as or %a[ it is interpreted as the alloc modifier, otherwise as - * the C99 hex-float. This means that you cannot scan %as as a hex-float - * immediately followed by an 's'. - * - Scanning of collating symbols. - */ - -static const char rcsid[] = "@(#)$Id$"; - -/************************************************************************* - * Trio include files - */ -#include "trio.h" -#include "triop.h" -#include "strio.h" - -#ifdef DATAGRID_EXTENSION -#include "glite/lb/events.h" -#include "escape.h" -//#include "edg/workload/thirdparty/trio/events.h" -#endif - -/* - * Encode the error code and the position. This is decoded - * with TRIO_ERROR_CODE and TRIO_ERROR_POSITION. - */ -#if TRIO_ERRORS -# define TRIO_ERROR_RETURN(x,y) (- ((x) + ((y) << 8))) -#else -# define TRIO_ERROR_RETURN(x,y) (-1) -#endif - - -/************************************************************************* - * Platform and compiler support detection - */ -#if defined(unix) || defined(__xlC__) || defined(_AIX) || defined(__QNX__) -# define PLATFORM_UNIX -#elif defined(AMIGA) && defined(__GNUC__) -# define PLATFORM_UNIX -#elif defined(WIN32) || defined(_WIN32) || defined(_MSC_VER) -# define PLATFORM_WIN32 -# define TRIO_MSVC_5 1100 -#endif - -#if defined(__STDC__) && defined(__STDC_VERSION__) -# if (__STDC_VERSION__ >= 199409L) -# define TRIO_COMPILER_SUPPORTS_ISO94 -# endif -# if (__STDC_VERSION__ >= 199901L) -# define TRIO_COMPILER_SUPPORTS_C99 -# endif -#endif - -#if defined(_XOPEN_SOURCE) && defined(_XOPEN_SOURCE_EXTENDED) -# define TRIO_COMPILER_SUPPORTS_UNIX98 -#endif - -#if defined(__STDC_ISO_10646__) || defined(MB_LEN_MAX) || defined(USE_MULTIBYTE) || TRIO_WIDECHAR -# define TRIO_COMPILER_SUPPORTS_MULTIBYTE -# if !defined(MB_LEN_MAX) -# define MB_LEN_MAX 6 -# endif -#endif - - -/************************************************************************* - * Generic definitions - */ - -#if !(defined(DEBUG) || defined(NDEBUG)) -# define NDEBUG -#endif -#include -#include -#if !defined(TRIO_COMPILER_SUPPORTS_C99) && !defined(isblank) -# define isblank(x) (((x)==32) || ((x)==9)) -#endif -#include -#include -#include -#include -#include -#include - -#ifndef NULL -# define NULL 0 -#endif -#define NIL ((char)0) -#ifndef FALSE -# define FALSE (1 == 0) -# define TRUE (! FALSE) -#endif -#define BOOLEAN_T int - -/* mincore() can be used for debugging purposes */ -#define VALID(x) (NULL != (x)) - -/* xlC crashes on log10(0) */ -#define guarded_log10(x) (((x) == 0.0) ? -HUGE_VAL : log10(x)) -#define guarded_log16(x) (guarded_log10(x) / log10(16.0)) - - -/************************************************************************* - * Platform specific definitions - */ -#if defined(PLATFORM_UNIX) -# include -# include -# include -# define USE_LOCALE -#endif /* PLATFORM_UNIX */ -#if defined(PLATFORM_WIN32) -# include -# define read _read -# define write _write -#endif /* PLATFORM_WIN32 */ - -#if TRIO_WIDECHAR -# if defined(TRIO_COMPILER_SUPPORTS_ISO94) -# include -# include -# else -typedef char wchar_t; -typedef int wint_t; -# define WEOF EOF -# define iswalnum(x) isalnum(x) -# define iswalpha(x) isalpha(x) -# define iswblank(x) isblank(x) -# define iswcntrl(x) iscntrl(x) -# define iswdigit(x) isdigit(x) -# define iswgraph(x) isgraph(x) -# define iswlower(x) islower(x) -# define iswprint(x) isprint(x) -# define iswpunct(x) ispunct(x) -# define iswspace(x) isspace(x) -# define iswupper(x) isupper(x) -# define iswxdigit(x) isxdigit(x) -# endif -#endif - - -/************************************************************************* - * Compiler dependent definitions - */ - -/* Support for long long */ -#ifndef __cplusplus -# if !defined(USE_LONGLONG) -# if defined(__GNUC__) && !defined(__STRICT_ANSI__) -# define USE_LONGLONG -# elif defined(__SUNPRO_C) -# define USE_LONGLONG -# elif defined(_LONG_LONG) || defined(_LONGLONG) -# define USE_LONGLONG -# endif -# endif -#endif - -/* The extra long numbers */ -#if defined(USE_LONGLONG) -typedef signed long long int trio_longlong_t; -typedef unsigned long long int trio_ulonglong_t; -#elif defined(_MSC_VER) -# if (_MSC_VER >= TRIO_MSVC_5) -typedef signed __int64 trio_longlong_t; -typedef unsigned __int64 trio_ulonglong_t; -# else -typedef signed long int trio_longlong_t; -typedef unsigned long int trio_ulonglong_t; -# endif -#else -typedef signed long int trio_longlong_t; -typedef unsigned long int trio_ulonglong_t; -#endif - -/* Maximal and fixed integer types */ -#if defined(TRIO_COMPILER_SUPPORTS_C99) -# include -typedef intmax_t trio_intmax_t; -typedef uintmax_t trio_uintmax_t; -typedef int8_t trio_int8_t; -typedef int16_t trio_int16_t; -typedef int32_t trio_int32_t; -typedef int64_t trio_int64_t; -#elif defined(TRIO_COMPILER_SUPPORTS_UNIX98) -# include -typedef intmax_t trio_intmax_t; -typedef uintmax_t trio_uintmax_t; -typedef int8_t trio_int8_t; -typedef int16_t trio_int16_t; -typedef int32_t trio_int32_t; -typedef int64_t trio_int64_t; -#elif defined(_MSC_VER) && (_MSC_VER >= TRIO_MSVC_5) -typedef trio_longlong_t trio_intmax_t; -typedef trio_ulonglong_t trio_uintmax_t; -typedef __int8 trio_int8_t; -typedef __int16 trio_int16_t; -typedef __int32 trio_int32_t; -typedef __int64 trio_int64_t; -#else -typedef trio_longlong_t trio_intmax_t; -typedef trio_ulonglong_t trio_uintmax_t; -# if defined(TRIO_INT8_T) -typedef TRIO_INT8_T trio_int8_t; -# else -typedef signed char trio_int8_t; -# endif -# if defined(TRIO_INT16_T) -typedef TRIO_INT16_T trio_int16_t; -# else -typedef signed short trio_int16_t; -# endif -# if defined(TRIO_INT32_T) -typedef TRIO_INT32_T trio_int32_t; -# else -typedef signed int trio_int32_t; -# endif -# if defined(TRIO_INT64_T) -typedef TRIO_INT64_T trio_int64_t; -# else -typedef trio_longlong_t trio_int64_t; -# endif -#endif - - -/************************************************************************* - * Internal definitions - */ - -/* Long double sizes */ -#ifdef LDBL_DIG -# define MAX_MANTISSA_DIGITS LDBL_DIG -# define MAX_EXPONENT_DIGITS 4 -#else -# define MAX_MANTISSA_DIGITS DBL_DIG -# define MAX_EXPONENT_DIGITS 3 -#endif - -/* The maximal number of digits is for base 2 */ -#define MAX_CHARS_IN(x) (sizeof(x) * CHAR_BIT) -/* The width of a pointer. The number of bits in a hex digit is 4 */ -#define POINTER_WIDTH ((sizeof("0x") - 1) + sizeof(void *) * CHAR_BIT / 4) - -/* Infinite and Not-A-Number for floating-point */ -#define INFINITE_LOWER "inf" -#define INFINITE_UPPER "INF" -#define LONG_INFINITE_LOWER "infinite" -#define LONG_INFINITE_UPPER "INFINITE" -#define NAN_LOWER "nan" -#define NAN_UPPER "NAN" - -/* Various constants */ -enum { - TYPE_PRINT = 1, - TYPE_SCAN = 2, - - /* Flags. Use maximum 32 */ - FLAGS_NEW = 0, - FLAGS_STICKY = 1, - FLAGS_SPACE = 2 * FLAGS_STICKY, - FLAGS_SHOWSIGN = 2 * FLAGS_SPACE, - FLAGS_LEFTADJUST = 2 * FLAGS_SHOWSIGN, - FLAGS_ALTERNATIVE = 2 * FLAGS_LEFTADJUST, - FLAGS_SHORT = 2 * FLAGS_ALTERNATIVE, - FLAGS_SHORTSHORT = 2 * FLAGS_SHORT, - FLAGS_LONG = 2 * FLAGS_SHORTSHORT, - FLAGS_QUAD = 2 * FLAGS_LONG, - FLAGS_LONGDOUBLE = 2 * FLAGS_QUAD, - FLAGS_SIZE_T = 2 * FLAGS_LONGDOUBLE, - FLAGS_PTRDIFF_T = 2 * FLAGS_SIZE_T, - FLAGS_INTMAX_T = 2 * FLAGS_PTRDIFF_T, - FLAGS_NILPADDING = 2 * FLAGS_INTMAX_T, - FLAGS_UNSIGNED = 2 * FLAGS_NILPADDING, - FLAGS_UPPER = 2 * FLAGS_UNSIGNED, - FLAGS_WIDTH = 2 * FLAGS_UPPER, - FLAGS_WIDTH_PARAMETER = 2 * FLAGS_WIDTH, - FLAGS_PRECISION = 2 * FLAGS_WIDTH_PARAMETER, - FLAGS_PRECISION_PARAMETER = 2 * FLAGS_PRECISION, - FLAGS_BASE = 2 * FLAGS_PRECISION_PARAMETER, - FLAGS_BASE_PARAMETER = 2 * FLAGS_BASE, - FLAGS_FLOAT_E = 2 * FLAGS_BASE_PARAMETER, - FLAGS_FLOAT_G = 2 * FLAGS_FLOAT_E, - FLAGS_QUOTE = 2 * FLAGS_FLOAT_G, - FLAGS_WIDECHAR = 2 * FLAGS_QUOTE, - FLAGS_ALLOC = 2 * FLAGS_WIDECHAR, - FLAGS_IGNORE = 2 * FLAGS_ALLOC, - FLAGS_IGNORE_PARAMETER = 2 * FLAGS_IGNORE, - FLAGS_VARSIZE_PARAMETER = 2 * FLAGS_IGNORE_PARAMETER, - FLAGS_FIXED_SIZE = 2 * FLAGS_VARSIZE_PARAMETER, - /* Reused flags */ - FLAGS_EXCLUDE = FLAGS_SHORT, - FLAGS_USER_DEFINED = FLAGS_IGNORE, - /* Compounded flags */ - FLAGS_ALL_VARSIZES = FLAGS_LONG | FLAGS_QUAD | FLAGS_INTMAX_T | FLAGS_PTRDIFF_T | FLAGS_SIZE_T, - FLAGS_ALL_SIZES = FLAGS_ALL_VARSIZES | FLAGS_SHORTSHORT | FLAGS_SHORT, - - NO_POSITION = -1, - NO_WIDTH = 0, - NO_PRECISION = -1, - NO_SIZE = -1, - - NO_BASE = -1, - MIN_BASE = 2, - MAX_BASE = 36, - BASE_BINARY = 2, - BASE_OCTAL = 8, - BASE_DECIMAL = 10, - BASE_HEX = 16, - - /* Maximal number of allowed parameters */ - MAX_PARAMETERS = 64, - /* Maximal number of characters in class */ - MAX_CHARACTER_CLASS = UCHAR_MAX, - - /* Maximal string lengths for user-defined specifiers */ - MAX_USER_NAME = 64, - MAX_USER_DATA = 256, - - /* Maximal length of locale separator strings */ - MAX_LOCALE_SEPARATOR_LENGTH = MB_LEN_MAX, - /* Maximal number of integers in grouping */ - MAX_LOCALE_GROUPS = 64 -}; - -#define NO_GROUPING ((int)CHAR_MAX) - -/* Fundamental formatting parameter types */ -#define FORMAT_UNKNOWN 0 -#define FORMAT_INT 1 -#define FORMAT_DOUBLE 2 -#define FORMAT_CHAR 3 -#define FORMAT_STRING 4 -#define FORMAT_POINTER 5 -#define FORMAT_COUNT 6 -#define FORMAT_PARAMETER 7 -#define FORMAT_GROUP 8 -#if TRIO_GNU -# define FORMAT_ERRNO 9 -#endif -#if TRIO_EXTENSION -# define FORMAT_USER_DEFINED 10 -#endif - -/* Character constants */ -#define CHAR_IDENTIFIER '%' -#define CHAR_BACKSLASH '\\' -#define CHAR_QUOTE '\"' -#define CHAR_ADJUST ' ' - -/* Character class expressions */ -#define CLASS_ALNUM ":alnum:" -#define CLASS_ALPHA ":alpha:" -#define CLASS_CNTRL ":cntrl:" -#define CLASS_DIGIT ":digit:" -#define CLASS_GRAPH ":graph:" -#define CLASS_LOWER ":lower:" -#define CLASS_PRINT ":print:" -#define CLASS_PUNCT ":punct:" -#define CLASS_SPACE ":space:" -#define CLASS_UPPER ":upper:" -#define CLASS_XDIGIT ":xdigit:" - -/* - * SPECIFIERS: - * - * - * a Hex-float - * A Hex-float - * c Character - * C Widechar character (wint_t) - * d Decimal - * e Float - * E Float - * F Float - * F Float - * g Float - * G Float - * i Integer - * m Error message - * n Count - * o Octal - * p Pointer - * s String - * S Widechar string (wchar_t *) - * u Unsigned - * x Hex - * X Hex - * [] Group - * <> User-defined - * - * Reserved: - * - * D Binary Coded Decimal %D(length,precision) (OS/390) - */ -#define SPECIFIER_CHAR 'c' -#define SPECIFIER_STRING 's' -#define SPECIFIER_DECIMAL 'd' -#define SPECIFIER_INTEGER 'i' -#define SPECIFIER_UNSIGNED 'u' -#define SPECIFIER_OCTAL 'o' -#define SPECIFIER_HEX 'x' -#define SPECIFIER_HEX_UPPER 'X' -#define SPECIFIER_FLOAT_E 'e' -#define SPECIFIER_FLOAT_E_UPPER 'E' -#define SPECIFIER_FLOAT_F 'f' -#define SPECIFIER_FLOAT_F_UPPER 'F' -#define SPECIFIER_FLOAT_G 'g' -#define SPECIFIER_FLOAT_G_UPPER 'G' -#define SPECIFIER_POINTER 'p' -#define SPECIFIER_GROUP '[' -#define SPECIFIER_UNGROUP ']' -#define SPECIFIER_COUNT 'n' -#if TRIO_UNIX98 -# define SPECIFIER_CHAR_UPPER 'C' -# define SPECIFIER_STRING_UPPER 'S' -#endif -#if TRIO_C99 -# define SPECIFIER_HEXFLOAT 'a' -# define SPECIFIER_HEXFLOAT_UPPER 'A' -#endif -#if TRIO_GNU -# define SPECIFIER_ERRNO 'm' -#endif -#if TRIO_EXTENSION -# define SPECIFIER_BINARY 'b' -# define SPECIFIER_BINARY_UPPER 'B' -# define SPECIFIER_USER_DEFINED_BEGIN '<' -# define SPECIFIER_USER_DEFINED_END '>' -# define SPECIFIER_USER_DEFINED_SEPARATOR ':' -#endif - -/* - * QUALIFIERS: - * - * - * Numbers = d,i,o,u,x,X - * Float = a,A,e,E,f,F,g,G - * String = s - * Char = c - * - * - * 9$ Position - * Use the 9th parameter. 9 can be any number between 1 and - * the maximal argument - * - * 9 Width - * Set width to 9. 9 can be any number, but must not be postfixed - * by '$' - * - * h Short - * Numbers: - * (unsigned) short int - * - * hh Short short - * Numbers: - * (unsigned) char - * - * l Long - * Numbers: - * (unsigned) long int - * String: - * as the S specifier - * Char: - * as the C specifier - * - * ll Long Long - * Numbers: - * (unsigned) long long int - * - * L Long Double - * Float - * long double - * - * # Alternative - * Float: - * Decimal-point is always present - * String: - * non-printable characters are handled as \number - * - * Spacing - * - * + Sign - * - * - Alignment - * - * . Precision - * - * * Parameter - * print: use parameter - * scan: no parameter (ignore) - * - * q Quad - * - * Z size_t - * - * w Widechar - * - * ' Thousands/quote - * Numbers: - * Integer part grouped in thousands - * Binary numbers: - * Number grouped in nibbles (4 bits) - * String: - * Quoted string - * - * j intmax_t - * t prtdiff_t - * z size_t - * - * ! Sticky - * @ Parameter (for both print and scan) - * - * I n-bit Integer - * Numbers: - * The following options exists - * I8 = 8-bit integer - * I16 = 16-bit integer - * I32 = 32-bit integer - * I64 = 64-bit integer - */ -#define QUALIFIER_POSITION '$' -#define QUALIFIER_SHORT 'h' -#define QUALIFIER_LONG 'l' -#define QUALIFIER_LONG_UPPER 'L' -#define QUALIFIER_ALTERNATIVE '#' -#define QUALIFIER_SPACE ' ' -#define QUALIFIER_PLUS '+' -#define QUALIFIER_MINUS '-' -#define QUALIFIER_DOT '.' -#define QUALIFIER_STAR '*' -#define QUALIFIER_CIRCUMFLEX '^' -#if TRIO_C99 -# define QUALIFIER_SIZE_T 'z' -# define QUALIFIER_PTRDIFF_T 't' -# define QUALIFIER_INTMAX_T 'j' -#endif -#if TRIO_BSD || TRIO_GNU -# define QUALIFIER_QUAD 'q' -#endif -#if TRIO_GNU -# define QUALIFIER_SIZE_T_UPPER 'Z' -#endif -#if TRIO_MISC -# define QUALIFIER_WIDECHAR 'w' -#endif -#if TRIO_MICROSOFT -# define QUALIFIER_FIXED_SIZE 'I' -#endif -#if TRIO_EXTENSION -# define QUALIFIER_QUOTE '\'' -# define QUALIFIER_STICKY '!' -# define QUALIFIER_VARSIZE '&' /* This should remain undocumented */ -# define QUALIFIER_PARAM '@' /* Experimental */ -# define QUALIFIER_COLON ':' /* For scanlists */ -# define QUALIFIER_EQUAL '=' /* For scanlists */ -#endif -#if DATAGRID_EXTENSION -# define QUALIFIER_ESCAPE '|' -#endif - - -/************************************************************************* - * Internal structures - */ - -/* Parameters */ -typedef struct { - int type; - unsigned long flags; - int width; - int precision; - int base; - int varsize; -#ifdef QUALIFIER_ESCAPE - enum dg_escape { ESCAPE_NONE, ESCAPE_ULM, ESCAPE_XML, ESCAPE_SQL } escape; -#endif - int indexAfterSpecifier; - union { - char *string; -#if TRIO_WIDECHAR - wchar_t *wstring; -#endif - void *pointer; - union { - trio_uintmax_t as_signed; - trio_intmax_t as_unsigned; - } number; - double doubleNumber; - double *doublePointer; - long double longdoubleNumber; - long double *longdoublePointer; - int errorNumber; - } data; - /* For the user-defined specifier */ - char user_name[MAX_USER_NAME]; - char user_data[MAX_USER_DATA]; -} parameter_T; - -/* General trio "class" */ -typedef struct _trio_T { - void *location; - void (*OutStream)(struct _trio_T *, int); - void (*InStream)(struct _trio_T *, int *); - /* - * The number of characters that would have been written/read if - * there had been sufficient space. - */ - int processed; - /* - * The number of characters that are actually written/read. - * Processed and committed with only differ for the *nprintf - * and *nscanf functions. - */ - int committed; - int max; - int current; -} trio_T; - -/* References (for user-defined callbacks) */ -typedef struct _reference_T { - trio_T *data; - parameter_T *parameter; -} reference_T; - -/* Registered entries (for user-defined callbacks) */ -typedef struct _userdef_T { - struct _userdef_T *next; - trio_callback_t callback; - char *name; -} userdef_T; - - -/************************************************************************* - * Internal variables - */ - -static const char null[] = "(nil)"; - -#if defined(USE_LOCALE) -static struct lconv *internalLocaleValues = NULL; -#endif - -/* - * UNIX98 says "in a locale where the radix character is not defined, - * the radix character defaults to a period (.)" - */ -static char internalDecimalPoint[MAX_LOCALE_SEPARATOR_LENGTH + 1] = "."; -static char internalThousandSeparator[MAX_LOCALE_SEPARATOR_LENGTH + 1] = ","; -static char internalGrouping[MAX_LOCALE_GROUPS] = { (char)NO_GROUPING }; - -static const char internalDigitsLower[] = "0123456789abcdefghijklmnopqrstuvwxyz"; -static const char internalDigitsUpper[] = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"; -static BOOLEAN_T internalDigitsUnconverted = TRUE; -static int internalDigitArray[128]; -#if TRIO_EXTENSION -static BOOLEAN_T internalCollationUnconverted = TRUE; -static char internalCollationArray[MAX_CHARACTER_CLASS][MAX_CHARACTER_CLASS]; -#endif - -static volatile trio_callback_t internalEnterCriticalRegion = NULL; -static volatile trio_callback_t internalLeaveCriticalRegion = NULL; -static userdef_T *internalUserDef = NULL; - - -/************************************************************************* - * trio_strerror [public] - */ -const char *trio_strerror(int errorcode) -{ - /* Textual versions of the error codes */ - switch (TRIO_ERROR_CODE(errorcode)) - { - case TRIO_EOF: - return "End of file"; - case TRIO_EINVAL: - return "Invalid argument"; - case TRIO_ETOOMANY: - return "Too many arguments"; - case TRIO_EDBLREF: - return "Double reference"; - case TRIO_EGAP: - return "Reference gap"; - case TRIO_ENOMEM: - return "Out of memory"; - case TRIO_ERANGE: - return "Invalid range"; - default: - return "Unknown"; - } -} - -/************************************************************************* - * TrioIsQualifier [private] - * - * Description: - * Remember to add all new qualifiers to this function. - * QUALIFIER_POSITION must not be added. - */ -static BOOLEAN_T -TrioIsQualifier(const char ch) -{ - /* QUALIFIER_POSITION is not included */ - switch (ch) - { - case '0': case '1': case '2': case '3': case '4': - case '5': case '6': case '7': case '8': case '9': - case QUALIFIER_PLUS: - case QUALIFIER_MINUS: - case QUALIFIER_SPACE: - case QUALIFIER_DOT: - case QUALIFIER_STAR: - case QUALIFIER_ALTERNATIVE: - case QUALIFIER_SHORT: - case QUALIFIER_LONG: - case QUALIFIER_LONG_UPPER: - case QUALIFIER_CIRCUMFLEX: -#if defined(QUALIFIER_SIZE_T) - case QUALIFIER_SIZE_T: -#endif -#if defined(QUALIFIER_PTRDIFF_T) - case QUALIFIER_PTRDIFF_T: -#endif -#if defined(QUALIFIER_INTMAX_T) - case QUALIFIER_INTMAX_T: -#endif -#if defined(QUALIFIER_QUAD) - case QUALIFIER_QUAD: -#endif -#if defined(QUALIFIER_SIZE_T_UPPER) - case QUALIFIER_SIZE_T_UPPER: -#endif -#if defined(QUALIFIER_WIDECHAR) - case QUALIFIER_WIDECHAR: -#endif -#if defined(QUALIFIER_QUOTE) - case QUALIFIER_QUOTE: -#endif -#if defined(QUALIFIER_STICKY) - case QUALIFIER_STICKY: -#endif -#if defined(QUALIFIER_VARSIZE) - case QUALIFIER_VARSIZE: -#endif -#if defined(QUALIFIER_PARAM) - case QUALIFIER_PARAM: -#endif -#if defined(QUALIFIER_FIXED_SIZE) - case QUALIFIER_FIXED_SIZE: -#endif -#ifdef QUALIFIER_ESCAPE - case QUALIFIER_ESCAPE: -#endif - return TRUE; - default: - return FALSE; - } -} - -/************************************************************************* - * TrioGenerateNan [private] - * - * Calculating NaN portably is difficult. Some compilers will emit - * warnings about divide by zero, and others will simply fail to - * generate a NaN. - */ -static double -TrioGenerateNaN(void) -{ -#if defined(TRIO_COMPILER_SUPPORTS_C99) - return nan(NULL); -#elif defined(DBL_QNAN) - return DBL_QNAN; -#elif defined(PLATFORM_UNIX) - double value; - void (*signal_handler)(int); - - signal_handler = signal(SIGFPE, SIG_IGN); - value = 0.0 / 0.0; - signal(SIGFPE, signal_handler); - return value; -#else - return 0.0 / 0.0; -#endif -} - -/************************************************************************* - * TrioIsNan [private] - */ -static int -TrioIsNan(double number) -{ -#ifdef isnan - /* C99 defines isnan() as a macro */ - return isnan(number); -#else - double integral, fraction; - - return (/* NaN is the only number which does not compare to itself */ - (number != number) || - /* Fallback solution if NaN compares to NaN */ - ((number != 0.0) && - (fraction = modf(number, &integral), - integral == fraction))); -#endif -} - -/************************************************************************* - * TrioIsInfinite [private] - */ -static int -TrioIsInfinite(double number) -{ -#ifdef isinf - /* C99 defines isinf() as a macro */ - return isinf(number); -#else - return ((number == HUGE_VAL) ? 1 : ((number == -HUGE_VAL) ? -1 : 0)); -#endif -} - -/************************************************************************* - * TrioSetLocale [private] - */ -#if defined(USE_LOCALE) -static void -TrioSetLocale(void) -{ - internalLocaleValues = (struct lconv *)localeconv(); - if (internalLocaleValues) - { - if ((internalLocaleValues->decimal_point) && - (internalLocaleValues->decimal_point[0] != NIL)) - { - StrCopyMax(internalDecimalPoint, - sizeof(internalDecimalPoint), - internalLocaleValues->decimal_point); - } - if ((internalLocaleValues->thousands_sep) && - (internalLocaleValues->thousands_sep[0] != NIL)) - { - StrCopyMax(internalThousandSeparator, - sizeof(internalThousandSeparator), - internalLocaleValues->thousands_sep); - } - if ((internalLocaleValues->grouping) && - (internalLocaleValues->grouping[0] != NIL)) - { - StrCopyMax(internalGrouping, - sizeof(internalGrouping), - internalLocaleValues->grouping); - } - } -} -#endif /* defined(USE_LOCALE) */ - -/************************************************************************* - * TrioGetPosition [private] - * - * Get the %n$ position. - */ -static int -TrioGetPosition(const char *format, - int *indexPointer) -{ - char *tmpformat; - int number = 0; - int index = *indexPointer; - - number = (int)StrToLong(&format[index], &tmpformat, BASE_DECIMAL); - index = (int)(tmpformat - format); - if ((number != 0) && (QUALIFIER_POSITION == format[index++])) - { - *indexPointer = index; - /* - * number is decreased by 1, because n$ starts from 1, whereas - * the array it is indexing starts from 0. - */ - return number - 1; - } - return NO_POSITION; -} - -/************************************************************************* - * TrioFindNamespace [private] - * - * Find registered user-defined specifier. - * The prev argument is used for optimisation only. - */ -static userdef_T * -TrioFindNamespace(const char *name, userdef_T **prev) -{ - userdef_T *def; - - if (internalEnterCriticalRegion) - (void)internalEnterCriticalRegion(NULL); - - for (def = internalUserDef; def; def = def->next) - { - /* Case-sensitive string comparison */ - if (StrEqualCase(def->name, name)) - break; - - if (prev) - *prev = def; - } - - if (internalLeaveCriticalRegion) - (void)internalLeaveCriticalRegion(NULL); - - return def; -} - -/************************************************************************* - * TrioPreprocess [private] - * - * Description: - * Parse the format string - */ -static int -TrioPreprocess(int type, - const char *format, - parameter_T *parameters, - va_list arglist, - void **argarray) -{ -#if TRIO_ERRORS - /* Count the number of times a parameter is referenced */ - unsigned short usedEntries[MAX_PARAMETERS]; -#endif - /* Parameter counters */ - int parameterPosition; - int currentParam; - int maxParam = -1; - /* Utility variables */ - unsigned long flags; - int width; - int precision; - int varsize; -#ifdef QUALIFIER_ESCAPE - enum dg_escape escape; -#endif - int base; - int index; /* Index into formatting string */ - int dots; /* Count number of dots in modifier part */ - BOOLEAN_T positional; /* Does the specifier have a positional? */ - BOOLEAN_T got_sticky = FALSE; /* Are there any sticky modifiers at all? */ - /* - * indices specifies the order in which the parameters must be - * read from the va_args (this is necessary to handle positionals) - */ - int indices[MAX_PARAMETERS]; - int pos = 0; - /* Various variables */ - char ch; -#if defined(TRIO_COMPILER_SUPPORTS_MULTIBYTE) - int charlen; -#endif - int i = -1; - int num; - char *tmpformat; - - -#if TRIO_ERRORS - /* - * The 'parameters' array is not initialized, but we need to - * know which entries we have used. - */ - memset(usedEntries, 0, sizeof(usedEntries)); -#endif - - index = 0; - parameterPosition = 0; -#if defined(TRIO_COMPILER_SUPPORTS_MULTIBYTE) - mblen(NULL, 0); -#endif - - while (format[index]) - { -#if defined(TRIO_COMPILER_SUPPORTS_MULTIBYTE) - if (! isascii(format[index])) - { - /* - * Multibyte characters cannot be legal specifiers or - * modifiers, so we skip over them. - */ - charlen = mblen(&format[index], MB_LEN_MAX); - index += (charlen > 0) ? charlen : 1; - continue; /* while */ - } -#endif /* TRIO_COMPILER_SUPPORTS_MULTIBYTE */ - if (CHAR_IDENTIFIER == format[index++]) - { - if (CHAR_IDENTIFIER == format[index]) - { - index++; - continue; /* while */ - } - - flags = FLAGS_NEW; - dots = 0; - currentParam = TrioGetPosition(format, &index); - positional = (NO_POSITION != currentParam); - if (!positional) - { - /* We have no positional, get the next counter */ - currentParam = parameterPosition; - } - if(currentParam >= MAX_PARAMETERS) - { - /* Bail out completely to make the error more obvious */ - return TRIO_ERROR_RETURN(TRIO_ETOOMANY, index); - } - - if (currentParam > maxParam) - maxParam = currentParam; - - /* Default values */ - width = NO_WIDTH; - precision = NO_PRECISION; - base = NO_BASE; - varsize = NO_SIZE; -#ifdef QUALIFIER_ESCAPE - escape = ESCAPE_NONE; -#endif - - while (TrioIsQualifier(format[index])) - { - ch = format[index++]; - - switch (ch) - { - case QUALIFIER_SPACE: - flags |= FLAGS_SPACE; - break; - - case QUALIFIER_PLUS: - flags |= FLAGS_SHOWSIGN; - break; - - case QUALIFIER_MINUS: - flags |= FLAGS_LEFTADJUST; - flags &= ~FLAGS_NILPADDING; - break; - - case QUALIFIER_ALTERNATIVE: - flags |= FLAGS_ALTERNATIVE; - break; - - case QUALIFIER_DOT: - if (dots == 0) /* Precision */ - { - dots++; - - /* Skip if no precision */ - if (QUALIFIER_DOT == format[index]) - break; - - /* After the first dot we have the precision */ - flags |= FLAGS_PRECISION; - if ((QUALIFIER_STAR == format[index]) || - (QUALIFIER_PARAM == format[index])) - { - index++; - flags |= FLAGS_PRECISION_PARAMETER; - - precision = TrioGetPosition(format, &index); - if (precision == NO_POSITION) - { - parameterPosition++; - if (positional) - precision = parameterPosition; - else - { - precision = currentParam; - currentParam = precision + 1; - } - } - else - { - if (! positional) - currentParam = precision + 1; - if (width > maxParam) - maxParam = precision; - } - if (currentParam > maxParam) - maxParam = currentParam; - } - else - { - precision = StrToLong(&format[index], &tmpformat, BASE_DECIMAL); - index = (int)(tmpformat - format); - } - } - else if (dots == 1) /* Base */ - { - dots++; - - /* After the second dot we have the base */ - flags |= FLAGS_BASE; - if ((QUALIFIER_STAR == format[index]) || - (QUALIFIER_PARAM == format[index])) - { - index++; - flags |= FLAGS_BASE_PARAMETER; - base = TrioGetPosition(format, &index); - if (base == NO_POSITION) - { - parameterPosition++; - if (positional) - base = parameterPosition; - else - { - base = currentParam; - currentParam = base + 1; - } - } - else - { - if (! positional) - currentParam = base + 1; - if (base > maxParam) - maxParam = base; - } - if (currentParam > maxParam) - maxParam = currentParam; - } - else - { - base = StrToLong(&format[index], &tmpformat, BASE_DECIMAL); - if (base > MAX_BASE) - return TRIO_ERROR_RETURN(TRIO_EINVAL, index); - index = (int)(tmpformat - format); - } - } - else - { - return TRIO_ERROR_RETURN(TRIO_EINVAL, index); - } - break; /* QUALIFIER_DOT */ - - case QUALIFIER_PARAM: - type = TYPE_PRINT; - /* FALLTHROUGH */ - case QUALIFIER_STAR: - /* This has different meanings for print and scan */ - if (TYPE_PRINT == type) - { - /* Read with from parameter */ - flags |= (FLAGS_WIDTH | FLAGS_WIDTH_PARAMETER); - width = TrioGetPosition(format, &index); - if (width == NO_POSITION) - { - parameterPosition++; - if (positional) - width = parameterPosition; - else - { - width = currentParam; - currentParam = width + 1; - } - } - else - { - if (! positional) - currentParam = width + 1; - if (width > maxParam) - maxParam = width; - } - if (currentParam > maxParam) - maxParam = currentParam; - } - else - { - /* Scan, but do not store result */ - flags |= FLAGS_IGNORE; - } - - break; /* QUALIFIER_STAR */ - - case '0': - if (! (flags & FLAGS_LEFTADJUST)) - flags |= FLAGS_NILPADDING; - /* FALLTHROUGH */ - case '1': case '2': case '3': case '4': - case '5': case '6': case '7': case '8': case '9': - flags |= FLAGS_WIDTH; - /* &format[index - 1] is used to "rewind" the read - * character from format - */ - width = StrToLong(&format[index - 1], &tmpformat, BASE_DECIMAL); - index = (int)(tmpformat - format); - break; - - case QUALIFIER_SHORT: - if (flags & FLAGS_SHORTSHORT) - return TRIO_ERROR_RETURN(TRIO_EINVAL, index); - else if (flags & FLAGS_SHORT) - flags |= FLAGS_SHORTSHORT; - else - flags |= FLAGS_SHORT; - break; - - case QUALIFIER_LONG: - if (flags & FLAGS_QUAD) - return TRIO_ERROR_RETURN(TRIO_EINVAL, index); - else if (flags & FLAGS_LONG) - flags |= FLAGS_QUAD; - else - flags |= FLAGS_LONG; - break; - - case QUALIFIER_LONG_UPPER: - flags |= FLAGS_LONGDOUBLE; - break; - -#if defined(QUALIFIER_SIZE_T) - case QUALIFIER_SIZE_T: - flags |= FLAGS_SIZE_T; - /* Modify flags for later truncation of number */ - if (sizeof(size_t) == sizeof(trio_ulonglong_t)) - flags |= FLAGS_QUAD; - else if (sizeof(size_t) == sizeof(long)) - flags |= FLAGS_LONG; - break; -#endif - -#if defined(QUALIFIER_PTRDIFF_T) - case QUALIFIER_PTRDIFF_T: - flags |= FLAGS_PTRDIFF_T; - if (sizeof(ptrdiff_t) == sizeof(trio_ulonglong_t)) - flags |= FLAGS_QUAD; - else if (sizeof(ptrdiff_t) == sizeof(long)) - flags |= FLAGS_LONG; - break; -#endif - -#if defined(QUALIFIER_INTMAX_T) - case QUALIFIER_INTMAX_T: - flags |= FLAGS_INTMAX_T; - if (sizeof(trio_intmax_t) == sizeof(trio_ulonglong_t)) - flags |= FLAGS_QUAD; - else if (sizeof(trio_intmax_t) == sizeof(long)) - flags |= FLAGS_LONG; - break; -#endif - -#if defined(QUALIFIER_QUAD) - case QUALIFIER_QUAD: - flags |= FLAGS_QUAD; - break; -#endif - -#if defined(QUALIFIER_FIXED_SIZE) - case QUALIFIER_FIXED_SIZE: - if (flags & FLAGS_FIXED_SIZE) - return TRIO_ERROR_RETURN(TRIO_EINVAL, index); - - if (flags & (FLAGS_ALL_SIZES | FLAGS_LONGDOUBLE | - FLAGS_WIDECHAR | FLAGS_VARSIZE_PARAMETER)) - return TRIO_ERROR_RETURN(TRIO_EINVAL, index); - - if ((format[index] == '6') && - (format[index + 1] == '4')) - { - varsize = sizeof(trio_int64_t); - index += 2; - } - else if ((format[index] == '3') && - (format[index + 1] == '2')) - { - varsize = sizeof(trio_int32_t); - index += 2; - } - else if ((format[index] == '1') && - (format[index + 1] == '6')) - { - varsize = sizeof(trio_int16_t); - index += 2; - } - else if (format[index] == '8') - { - varsize = sizeof(trio_int8_t); - index++; - } - else - return TRIO_ERROR_RETURN(TRIO_EINVAL, index); - - flags |= FLAGS_FIXED_SIZE; - break; -#endif - -#ifdef QUALIFIER_ESCAPE - case QUALIFIER_ESCAPE: - switch (format[index++]) { - case 'U': escape = ESCAPE_ULM; break; - case 'X': escape = ESCAPE_XML; break; - case 'S': escape = ESCAPE_SQL; break; - default: return TRIO_ERROR_RETURN(TRIO_EINVAL,index); - } - break; -#endif - - -#if defined(QUALIFIER_WIDECHAR) - case QUALIFIER_WIDECHAR: - flags |= FLAGS_WIDECHAR; - break; -#endif - -#if defined(QUALIFIER_SIZE_T_UPPER) - case QUALIFIER_SIZE_T_UPPER: - break; -#endif - -#if defined(QUALIFIER_QUOTE) - case QUALIFIER_QUOTE: - flags |= FLAGS_QUOTE; - break; -#endif - -#if defined(QUALIFIER_STICKY) - case QUALIFIER_STICKY: - flags |= FLAGS_STICKY; - got_sticky = TRUE; - break; -#endif - -#if defined(QUALIFIER_VARSIZE) - case QUALIFIER_VARSIZE: - flags |= FLAGS_VARSIZE_PARAMETER; - parameterPosition++; - if (positional) - varsize = parameterPosition; - else - { - varsize = currentParam; - currentParam = varsize + 1; - } - if (currentParam > maxParam) - maxParam = currentParam; - break; -#endif - - default: - /* Bail out completely to make the error more obvious */ - return TRIO_ERROR_RETURN(TRIO_EINVAL, index); - } - } /* while qualifier */ - - /* - * Parameters only need the type and value. The value is - * read later. - */ - if (flags & FLAGS_WIDTH_PARAMETER) - { -#if TRIO_ERRORS - usedEntries[width] += 1; -#endif - parameters[pos].type = FORMAT_PARAMETER; - indices[width] = pos; - width = pos++; - } - if (flags & FLAGS_PRECISION_PARAMETER) - { -#if TRIO_ERRORS - usedEntries[precision] += 1; -#endif - parameters[pos].type = FORMAT_PARAMETER; - indices[precision] = pos; - precision = pos++; - } - if (flags & FLAGS_BASE_PARAMETER) - { -#if TRIO_ERRORS - usedEntries[base] += 1; -#endif - parameters[pos].type = FORMAT_PARAMETER; - indices[base] = pos; - base = pos++; - } - if (flags & FLAGS_VARSIZE_PARAMETER) - { -#if TRIO_ERRORS - usedEntries[varsize] += 1; -#endif - parameters[pos].type = FORMAT_PARAMETER; - indices[varsize] = pos; - varsize = pos++; - } - - indices[currentParam] = pos; - - switch (format[index++]) - { -#if defined(SPECIFIER_CHAR_UPPER) - case SPECIFIER_CHAR_UPPER: - flags |= FLAGS_WIDECHAR; - /* FALLTHROUGH */ -#endif - case SPECIFIER_CHAR: - if (flags & FLAGS_LONG) - flags |= FLAGS_WIDECHAR; - else if (flags & FLAGS_SHORT) - flags &= ~FLAGS_WIDECHAR; - parameters[pos].type = FORMAT_CHAR; - break; - -#if defined(SPECIFIER_STRING_UPPER) - case SPECIFIER_STRING_UPPER: - flags |= FLAGS_WIDECHAR; - /* FALLTHROUGH */ -#endif - case SPECIFIER_STRING: - if (flags & FLAGS_LONG) - flags |= FLAGS_WIDECHAR; - else if (flags & FLAGS_SHORT) - flags &= ~FLAGS_WIDECHAR; - parameters[pos].type = FORMAT_STRING; - break; - - - case SPECIFIER_GROUP: - if (TYPE_SCAN == type) - { - int depth = 1; - parameters[pos].type = FORMAT_GROUP; - if (format[index] == QUALIFIER_CIRCUMFLEX) - index++; - if (format[index] == SPECIFIER_UNGROUP) - index++; - if (format[index] == QUALIFIER_MINUS) - index++; - /* Skip nested brackets */ - while (format[index] != NIL) - { - if (format[index] == SPECIFIER_GROUP) - { - depth++; - } - else if (format[index] == SPECIFIER_UNGROUP) - { - if (--depth <= 0) - { - index++; - break; - } - } - index++; - } - } - break; - - case SPECIFIER_INTEGER: - parameters[pos].type = FORMAT_INT; - break; - - case SPECIFIER_UNSIGNED: - flags |= FLAGS_UNSIGNED; - parameters[pos].type = FORMAT_INT; - break; - - case SPECIFIER_DECIMAL: - /* Disable base modifier */ - flags &= ~FLAGS_BASE_PARAMETER; - base = BASE_DECIMAL; - parameters[pos].type = FORMAT_INT; - break; - - case SPECIFIER_OCTAL: - flags &= ~FLAGS_BASE_PARAMETER; - base = BASE_OCTAL; - parameters[pos].type = FORMAT_INT; - break; - -#if defined(SPECIFIER_BINARY) - case SPECIFIER_BINARY_UPPER: - flags |= FLAGS_UPPER; - /* FALLTHROUGH */ - case SPECIFIER_BINARY: - flags |= FLAGS_NILPADDING; - flags &= ~FLAGS_BASE_PARAMETER; - base = BASE_BINARY; - parameters[pos].type = FORMAT_INT; - break; -#endif - - case SPECIFIER_HEX_UPPER: - flags |= FLAGS_UPPER; - /* FALLTHROUGH */ - case SPECIFIER_HEX: - flags |= FLAGS_UNSIGNED; - flags &= ~FLAGS_BASE_PARAMETER; - base = BASE_HEX; - parameters[pos].type = FORMAT_INT; - break; - - case SPECIFIER_FLOAT_E_UPPER: - flags |= FLAGS_UPPER; - /* FALLTHROUGH */ - case SPECIFIER_FLOAT_E: - flags |= FLAGS_FLOAT_E; - parameters[pos].type = FORMAT_DOUBLE; - break; - - case SPECIFIER_FLOAT_G_UPPER: - flags |= FLAGS_UPPER; - /* FALLTHROUGH */ - case SPECIFIER_FLOAT_G: - flags |= FLAGS_FLOAT_G; - parameters[pos].type = FORMAT_DOUBLE; - break; - - case SPECIFIER_FLOAT_F_UPPER: - flags |= FLAGS_UPPER; - /* FALLTHROUGH */ - case SPECIFIER_FLOAT_F: - parameters[pos].type = FORMAT_DOUBLE; - break; - - case SPECIFIER_POINTER: - parameters[pos].type = FORMAT_POINTER; - break; - - case SPECIFIER_COUNT: - parameters[pos].type = FORMAT_COUNT; - break; - -#if defined(SPECIFIER_HEXFLOAT) -# if defined(SPECIFIER_HEXFLOAT_UPPER) - case SPECIFIER_HEXFLOAT_UPPER: - flags |= FLAGS_UPPER; - /* FALLTHROUGH */ -# endif - case SPECIFIER_HEXFLOAT: - base = BASE_HEX; - parameters[pos].type = FORMAT_DOUBLE; - break; -#endif - -#if defined(FORMAT_ERRNO) - case SPECIFIER_ERRNO: - parameters[pos].type = FORMAT_ERRNO; - break; -#endif - -#if defined(SPECIFIER_USER_DEFINED_BEGIN) - case SPECIFIER_USER_DEFINED_BEGIN: - { - unsigned int max; - int without_namespace = TRUE; - - parameters[pos].type = FORMAT_USER_DEFINED; - parameters[pos].user_name[0] = NIL; - tmpformat = (char *)&format[index]; - - while ((ch = format[index])) - { - index++; - if (ch == SPECIFIER_USER_DEFINED_END) - { - if (without_namespace) - { - /* We must get the handle first */ - parameters[pos].type = FORMAT_PARAMETER; - parameters[pos].indexAfterSpecifier = index; - parameters[pos].flags = FLAGS_USER_DEFINED; - /* Adjust parameters for insertion of new one */ - pos++; -# if TRIO_ERRORS - usedEntries[currentParam] += 1; -# endif - parameters[pos].type = FORMAT_USER_DEFINED; - currentParam++; - indices[currentParam] = pos; - if (currentParam > maxParam) - maxParam = currentParam; - } - /* Copy the user data */ - max = (unsigned int)(&format[index] - tmpformat); - if (max > MAX_USER_DATA) - max = MAX_USER_DATA; - StrCopyMax(parameters[pos].user_data, - max, - tmpformat); - break; /* while */ - } - if (ch == SPECIFIER_USER_DEFINED_SEPARATOR) - { - without_namespace = FALSE; - /* Copy the namespace for later looking-up */ - max = (int)(&format[index] - tmpformat); - if (max > MAX_USER_NAME) - max = MAX_USER_NAME; - StrCopyMax(parameters[pos].user_name, - max, - tmpformat); - tmpformat = (char *)&format[index]; - } - } - if (ch != SPECIFIER_USER_DEFINED_END) - return TRIO_ERROR_RETURN(TRIO_EINVAL, index); - } - break; -#endif /* defined(SPECIFIER_USER_DEFINED_BEGIN) */ - - default: - /* Bail out completely to make the error more obvious */ - return TRIO_ERROR_RETURN(TRIO_EINVAL, index); - } - -#if TRIO_ERRORS - /* Count the number of times this entry has been used */ - usedEntries[currentParam] += 1; -#endif - - /* Find last sticky parameters */ - if (got_sticky && !(flags & FLAGS_STICKY)) - { - for (i = pos - 1; i >= 0; i--) - { - if (parameters[i].type == FORMAT_PARAMETER) - continue; - if ((parameters[i].flags & FLAGS_STICKY) && - (parameters[i].type == parameters[pos].type)) - { - /* Do not overwrite current qualifiers */ - flags |= (parameters[i].flags & (unsigned long)~FLAGS_STICKY); - if (width == NO_WIDTH) - width = parameters[i].width; - if (precision == NO_PRECISION) - precision = parameters[i].precision; - if (base == NO_BASE) - base = parameters[i].base; - break; - } - } - } - - parameters[pos].indexAfterSpecifier = index; - parameters[pos].flags = flags; - parameters[pos].width = width; - parameters[pos].precision = precision; - parameters[pos].base = (base == NO_BASE) ? BASE_DECIMAL : base; - parameters[pos].varsize = varsize; -#ifdef QUALIFIER_ESCAPE - parameters[pos].escape = escape; -#endif - pos++; - - if (! positional) - parameterPosition++; - - } /* if identifier */ - - } /* while format characters left */ - - for (num = 0; num <= maxParam; num++) - { -#if TRIO_ERRORS - if (usedEntries[num] != 1) - { - if (usedEntries[num] == 0) /* gap detected */ - return TRIO_ERROR_RETURN(TRIO_EGAP, num); - else /* double references detected */ - return TRIO_ERROR_RETURN(TRIO_EDBLREF, num); - } -#endif - - i = indices[num]; - - /* - * FORMAT_PARAMETERS are only present if they must be read, - * so it makes no sense to check the ignore flag (besides, - * the flags variable is not set for that particular type) - */ - if ((parameters[i].type != FORMAT_PARAMETER) && - (parameters[i].flags & FLAGS_IGNORE)) - continue; /* for all arguments */ - - /* - * The stack arguments are read according to ANSI C89 - * default argument promotions: - * - * char = int - * short = int - * unsigned char = unsigned int - * unsigned short = unsigned int - * float = double - * - * In addition to the ANSI C89 these types are read (the - * default argument promotions of C99 has not been - * considered yet) - * - * long long - * long double - * size_t - * ptrdiff_t - * intmax_t - */ - switch (parameters[i].type) - { - case FORMAT_GROUP: - case FORMAT_STRING: -#if TRIO_WIDECHAR - if (flags & FLAGS_WIDECHAR) - { - parameters[i].data.wstring = (argarray == NULL) - ? va_arg(arglist, wchar_t *) - : (wchar_t *)(argarray[num]); - } - else -#endif - { - parameters[i].data.string = (argarray == NULL) - ? va_arg(arglist, char *) - : (char *)(argarray[num]); - } - break; - - case FORMAT_POINTER: - case FORMAT_COUNT: - case FORMAT_USER_DEFINED: - case FORMAT_UNKNOWN: - parameters[i].data.pointer = (argarray == NULL) - ? va_arg(arglist, void *) - : argarray[num]; - break; - - case FORMAT_CHAR: - case FORMAT_INT: - if (TYPE_SCAN == type) - { - if (argarray == NULL) - parameters[i].data.pointer = - (trio_uintmax_t *)va_arg(arglist, void *); - else - { - if (parameters[i].type == FORMAT_CHAR) - parameters[i].data.pointer = - (trio_uintmax_t *)((char *)argarray[num]); - else if (parameters[i].flags & FLAGS_SHORT) - parameters[i].data.pointer = - (trio_uintmax_t *)((short *)argarray[num]); - else - parameters[i].data.pointer = - (trio_uintmax_t *)((int *)argarray[num]); - } - } - else - { -#if defined(QUALIFIER_VARSIZE) || defined(QUALIFIER_FIXED_SIZE) - if ((parameters[i].flags & FLAGS_VARSIZE_PARAMETER) || - (parameters[i].flags & FLAGS_FIXED_SIZE)) - { - if (parameters[i].flags & FLAGS_VARSIZE_PARAMETER) - { - /* - * Variable sizes are mapped onto the fixed sizes, in - * accordance with integer promotion. - * - * Please note that this may not be portable, as we - * only guess the size, not the layout of the numbers. - * For example, if int is little-endian, and long is - * big-endian, then this will fail. - */ - varsize = (int)parameters[parameters[i].varsize].data.number.as_unsigned; - } - else - { - /* Used for the I modifiers */ - varsize = parameters[i].varsize; - } - parameters[i].flags &= ~FLAGS_ALL_VARSIZES; - - if (varsize <= (int)sizeof(int)) - ; - else if (varsize <= (int)sizeof(long)) - parameters[i].flags |= FLAGS_LONG; -#if defined(QUALIFIER_INTMAX_T) - else if (varsize <= (int)sizeof(trio_longlong_t)) - parameters[i].flags |= FLAGS_QUAD; - else - parameters[i].flags |= FLAGS_INTMAX_T; -#else - else - parameters[i].flags |= FLAGS_QUAD; -#endif - } -#endif /* defined(QUALIFIER_VARSIZE) */ -#if defined(QUALIFIER_SIZE_T) || defined(QUALIFIER_SIZE_T_UPPER) - if (parameters[i].flags & FLAGS_SIZE_T) - parameters[i].data.number.as_unsigned = (argarray == NULL) - ? (trio_uintmax_t)va_arg(arglist, size_t) - : (trio_uintmax_t)(*((size_t *)argarray[num])); - else -#endif -#if defined(QUALIFIER_PTRDIFF_T) - if (parameters[i].flags & FLAGS_PTRDIFF_T) - parameters[i].data.number.as_unsigned = (argarray == NULL) - ? (trio_uintmax_t)va_arg(arglist, ptrdiff_t) - : (trio_uintmax_t)(*((ptrdiff_t *)argarray[num])); - else -#endif -#if defined(QUALIFIER_INTMAX_T) - if (parameters[i].flags & FLAGS_INTMAX_T) - parameters[i].data.number.as_unsigned = (argarray == NULL) - ? (trio_uintmax_t)va_arg(arglist, trio_intmax_t) - : (trio_uintmax_t)(*((trio_intmax_t *)argarray[num])); - else -#endif - if (parameters[i].flags & FLAGS_QUAD) - parameters[i].data.number.as_unsigned = (argarray == NULL) - ? (trio_uintmax_t)va_arg(arglist, trio_ulonglong_t) - : (trio_uintmax_t)(*((trio_ulonglong_t *)argarray[num])); - else if (parameters[i].flags & FLAGS_LONG) - parameters[i].data.number.as_unsigned = (argarray == NULL) - ? (trio_uintmax_t)va_arg(arglist, long) - : (trio_uintmax_t)(*((long *)argarray[num])); - else - { - if (argarray == NULL) - parameters[i].data.number.as_unsigned = (trio_uintmax_t)va_arg(arglist, int); - else - { - if (parameters[i].type == FORMAT_CHAR) - parameters[i].data.number.as_unsigned = (trio_uintmax_t)(*((char *)argarray[num])); - else if (parameters[i].flags & FLAGS_SHORT) - parameters[i].data.number.as_unsigned = (trio_uintmax_t)(*((short *)argarray[num])); - else - parameters[i].data.number.as_unsigned = (trio_uintmax_t)(*((int *)argarray[num])); - } - } - } - break; - - case FORMAT_PARAMETER: - /* - * The parameter for the user-defined specifier is a pointer, - * whereas the rest (width, precision, base) uses an integer. - */ - if (parameters[i].flags & FLAGS_USER_DEFINED) - parameters[i].data.pointer = (argarray == NULL) - ? va_arg(arglist, void *) - : argarray[num]; - else - parameters[i].data.number.as_unsigned = (argarray == NULL) - ? (trio_uintmax_t)va_arg(arglist, int) - : (trio_uintmax_t)(*((int *)argarray[num])); - break; - - case FORMAT_DOUBLE: - if (TYPE_SCAN == type) - { - if (parameters[i].flags & FLAGS_LONG) - parameters[i].data.longdoublePointer = (argarray == NULL) - ? va_arg(arglist, long double *) - : (long double *)((long double *)argarray[num]); - else - { - if (argarray == NULL) - parameters[i].data.doublePointer = - va_arg(arglist, double *); - else - { - if (parameters[i].flags & FLAGS_SHORT) - parameters[i].data.doublePointer = - (double *)((float *)argarray[num]); - else - parameters[i].data.doublePointer = - (double *)((double *)argarray[num]); - } - } - } - else - { - if (parameters[i].flags & FLAGS_LONG) - parameters[i].data.longdoubleNumber = (argarray == NULL) - ? va_arg(arglist, long double) - : (long double)(*((long double *)argarray[num])); - else - { - if (argarray == NULL) - parameters[i].data.longdoubleNumber = (long double)va_arg(arglist, double); - else - { - if (parameters[i].flags & FLAGS_SHORT) - parameters[i].data.longdoubleNumber = (long double)(*((float *)argarray[num])); - else - parameters[i].data.longdoubleNumber = (long double)(long double)(*((double *)argarray[num])); - } - } - } - break; - -#if defined(FORMAT_ERRNO) - case FORMAT_ERRNO: - parameters[i].data.errorNumber = errno; - break; -#endif - - default: - break; - } - } /* for all specifiers */ - return num; -} - - -/************************************************************************* - * - * @FORMATTING - * - ************************************************************************/ - - -/************************************************************************* - * TrioWriteNumber [private] - * - * Description: - * Output a number. - * The complexity of this function is a result of the complexity - * of the dependencies of the flags. - */ -static void -TrioWriteNumber(trio_T *self, - trio_uintmax_t number, - unsigned long flags, - int width, - int precision, - int base) -{ - BOOLEAN_T isNegative; - char buffer[MAX_CHARS_IN(trio_uintmax_t) * (1 + MAX_LOCALE_SEPARATOR_LENGTH) + 1]; - char *bufferend; - char *pointer; - const char *digits; - int i; - int length; - char *p; - int charsPerThousand; - int groupingIndex; - int count; - - assert(VALID(self)); - assert(VALID(self->OutStream)); - assert((base >= MIN_BASE && base <= MAX_BASE) || (base == NO_BASE)); - - digits = (flags & FLAGS_UPPER) ? internalDigitsUpper : internalDigitsLower; - - isNegative = (flags & FLAGS_UNSIGNED) - ? FALSE - : ((trio_intmax_t)number < 0); - if (isNegative) - number = -number; - - if (flags & FLAGS_QUAD) - number &= (trio_ulonglong_t)-1; - else if (flags & FLAGS_LONG) - number &= (unsigned long)-1; - else - number &= (unsigned int)-1; - - /* Build number */ - pointer = bufferend = &buffer[sizeof(buffer) - 1]; - *pointer-- = NIL; - charsPerThousand = (int)internalGrouping[0]; - groupingIndex = 1; - for (i = 1; i < (int)sizeof(buffer); i++) - { - *pointer-- = digits[number % base]; - number /= base; - if (number == 0) - break; - - if ((flags & FLAGS_QUOTE) - && (charsPerThousand != NO_GROUPING) - && (i % charsPerThousand == 0)) - { - /* - * We are building the number from the least significant - * to the most significant digit, so we have to copy the - * thousand separator backwards - */ - length = StrLength(internalThousandSeparator); - if (((int)(pointer - buffer) - length) > 0) - { - p = &internalThousandSeparator[length - 1]; - while (length-- > 0) - *pointer-- = *p--; - } - - /* Advance to next grouping number */ - switch (internalGrouping[groupingIndex]) - { - case CHAR_MAX: /* Disable grouping */ - charsPerThousand = NO_GROUPING; - break; - case 0: /* Repeat last group */ - break; - default: - charsPerThousand = (int)internalGrouping[groupingIndex++]; - break; - } - } - } - - /* Adjust width */ - width -= (bufferend - pointer) - 1; - - /* Adjust precision */ - if (NO_PRECISION != precision) - { - precision -= (bufferend - pointer) - 1; - if (precision < 0) - precision = 0; - flags |= FLAGS_NILPADDING; - } - - /* Adjust width further */ - if (isNegative || (flags & FLAGS_SHOWSIGN) || (flags & FLAGS_SPACE)) - width--; - if (flags & FLAGS_ALTERNATIVE) - { - switch (base) - { - case BASE_BINARY: - case BASE_HEX: - width -= 2; - break; - case BASE_OCTAL: - width--; - break; - default: - break; - } - } - - /* Output prefixes spaces if needed */ - if (! ((flags & FLAGS_LEFTADJUST) || - ((flags & FLAGS_NILPADDING) && (precision == NO_PRECISION)))) - { - count = (precision == NO_PRECISION) ? 0 : precision; - while (width-- > count) - self->OutStream(self, CHAR_ADJUST); - } - - /* width has been adjusted for signs and alternatives */ - if (isNegative) - self->OutStream(self, '-'); - else if (flags & FLAGS_SHOWSIGN) - self->OutStream(self, '+'); - else if (flags & FLAGS_SPACE) - self->OutStream(self, ' '); - - if (flags & FLAGS_ALTERNATIVE) - { - switch (base) - { - case BASE_BINARY: - self->OutStream(self, '0'); - self->OutStream(self, (flags & FLAGS_UPPER) ? 'B' : 'b'); - break; - - case BASE_OCTAL: - self->OutStream(self, '0'); - break; - - case BASE_HEX: - self->OutStream(self, '0'); - self->OutStream(self, (flags & FLAGS_UPPER) ? 'X' : 'x'); - break; - - default: - break; - } /* switch base */ - } - - /* Output prefixed zero padding if needed */ - if (flags & FLAGS_NILPADDING) - { - if (precision == NO_PRECISION) - precision = width; - while (precision-- > 0) - { - self->OutStream(self, '0'); - width--; - } - } - - /* Output the number itself */ - while (*(++pointer)) - { - self->OutStream(self, *pointer); - } - - /* Output trailing spaces if needed */ - if (flags & FLAGS_LEFTADJUST) - { - while (width-- > 0) - self->OutStream(self, CHAR_ADJUST); - } -} - -/************************************************************************* - * TrioWriteStringCharacter [private] - * - * Description: - * Output a single character of a string - */ -static void -TrioWriteStringCharacter(trio_T *self, - int ch, - unsigned long flags) -{ - if (flags & FLAGS_ALTERNATIVE) - { - if (! (isprint(ch) || isspace(ch))) - { - /* - * Non-printable characters are converted to C escapes or - * \number, if no C escape exists. - */ - self->OutStream(self, CHAR_BACKSLASH); - switch (ch) - { - case '\007': self->OutStream(self, 'a'); break; - case '\b': self->OutStream(self, 'b'); break; - case '\f': self->OutStream(self, 'f'); break; - case '\n': self->OutStream(self, 'n'); break; - case '\r': self->OutStream(self, 'r'); break; - case '\t': self->OutStream(self, 't'); break; - case '\v': self->OutStream(self, 'v'); break; - case '\\': self->OutStream(self, '\\'); break; - default: - self->OutStream(self, 'x'); - TrioWriteNumber(self, (trio_intmax_t)ch, - FLAGS_UNSIGNED | FLAGS_NILPADDING, - 2, 2, BASE_HEX); - break; - } - } - else if (ch == CHAR_BACKSLASH) - { - self->OutStream(self, CHAR_BACKSLASH); - self->OutStream(self, CHAR_BACKSLASH); - } - else - { - self->OutStream(self, ch); - } - } - else - { - self->OutStream(self, ch); - } -} - -/************************************************************************* - * TrioWriteString [private] - * - * Description: - * Output a string - */ -static void -TrioWriteString(trio_T *self, - const char *string, - unsigned long flags, - int width, - int precision) -{ - int length; - int ch; - - assert(VALID(self)); - assert(VALID(self->OutStream)); - - if (string == NULL) - { - string = null; - length = sizeof(null) - 1; - /* Disable quoting for the null pointer */ - flags &= (~FLAGS_QUOTE); - width = 0; - } - else - { - length = StrLength(string); - } - if ((NO_PRECISION != precision) && - (precision < length)) - { - length = precision; - } - width -= length; - - if (flags & FLAGS_QUOTE) - self->OutStream(self, CHAR_QUOTE); - - if (! (flags & FLAGS_LEFTADJUST)) - { - while (width-- > 0) - self->OutStream(self, CHAR_ADJUST); - } - - while (length-- > 0) - { - /* The ctype parameters must be an unsigned char (or EOF) */ - ch = (int)((unsigned char)(*string++)); - TrioWriteStringCharacter(self, ch, flags); - } - - if (flags & FLAGS_LEFTADJUST) - { - while (width-- > 0) - self->OutStream(self, CHAR_ADJUST); - } - if (flags & FLAGS_QUOTE) - self->OutStream(self, CHAR_QUOTE); -} - -/************************************************************************* - * TrioWriteWideStringCharacter [private] - * - * Description: - * Output a wide string as a multi-byte sequence - */ -#if TRIO_WIDECHAR -static int -TrioWriteWideStringCharacter(trio_T *self, - wchar_t wch, - unsigned long flags, - int width) -{ - int size; - int i; - int ch; - char *string; - char buffer[MB_LEN_MAX + 1]; - - if (width == NO_WIDTH) - width = sizeof(buffer); - - size = wctomb(buffer, wch); - if ((size <= 0) || (size > width) || (buffer[0] == NIL)) - return 0; - - string = buffer; - i = size; - while ((width >= i) && (width-- > 0) && (i-- > 0)) - { - /* The ctype parameters must be an unsigned char (or EOF) */ - ch = (int)((unsigned char)(*string++)); - TrioWriteStringCharacter(self, ch, flags); - } - return size; -} -#endif /* TRIO_WIDECHAR */ - -/************************************************************************* - * TrioWriteString [private] - * - * Description: - * Output a wide character string as a multi-byte string - */ -#if TRIO_WIDECHAR -static void -TrioWriteWideString(trio_T *self, - const wchar_t *wstring, - unsigned long flags, - int width, - int precision) -{ - int length; - int size; - - assert(VALID(self)); - assert(VALID(self->OutStream)); - -#if defined(TRIO_COMPILER_SUPPORTS_MULTIBYTE) - mblen(NULL, 0); -#endif - - if (wstring == NULL) - { - TrioWriteString(self, NULL, flags, width, precision); - return; - } - - if (NO_PRECISION == precision) - { - length = INT_MAX; - } - else - { - length = precision; - width -= length; - } - - if (flags & FLAGS_QUOTE) - self->OutStream(self, CHAR_QUOTE); - - if (! (flags & FLAGS_LEFTADJUST)) - { - while (width-- > 0) - self->OutStream(self, CHAR_ADJUST); - } - - while (length > 0) - { - size = TrioWriteWideStringCharacter(self, *wstring++, flags, length); - if (size == 0) - break; /* while */ - length -= size; - } - - if (flags & FLAGS_LEFTADJUST) - { - while (width-- > 0) - self->OutStream(self, CHAR_ADJUST); - } - if (flags & FLAGS_QUOTE) - self->OutStream(self, CHAR_QUOTE); -} -#endif /* TRIO_WIDECHAR */ - -/************************************************************************* - * TrioWriteDouble [private] - */ -static void -TrioWriteDouble(trio_T *self, - long double longdoubleNumber, - unsigned long flags, - int width, - int precision, - int base) -{ - int charsPerThousand; - int length; - double number; - double workNumber; - int integerDigits; - int fractionDigits; - int exponentDigits; - int expectedWidth; - int exponent; - unsigned int uExponent = 0; - double dblBase; - BOOLEAN_T isNegative; - BOOLEAN_T isExponentNegative = FALSE; - BOOLEAN_T isHex; - const char *digits; - char numberBuffer[MAX_MANTISSA_DIGITS - * (1 + MAX_LOCALE_SEPARATOR_LENGTH) + 1]; - char *numberPointer; - char exponentBuffer[MAX_EXPONENT_DIGITS + 1]; - char *exponentPointer = NULL; - int groupingIndex; - char *work; - int i; - BOOLEAN_T onlyzero; - int zeroes = 0; - - assert(VALID(self)); - assert(VALID(self->OutStream)); - assert(base == BASE_DECIMAL || base == BASE_HEX); - - number = (double)longdoubleNumber; - - /* Look for infinite numbers and non-a-number first */ - switch (TrioIsInfinite(number)) - { - case 1: - /* Positive infinity */ - TrioWriteString(self, - (flags & FLAGS_UPPER) - ? INFINITE_UPPER - : INFINITE_LOWER, - flags, width, precision); - return; - - case -1: - /* Negative infinity */ - TrioWriteString(self, - (flags & FLAGS_UPPER) - ? "-" INFINITE_UPPER - : "-" INFINITE_LOWER, - flags, width, precision); - return; - - default: - /* Finitude */ - break; - } - if (TrioIsNan(number)) - { - TrioWriteString(self, - (flags & FLAGS_UPPER) - ? NAN_UPPER - : NAN_LOWER, - flags, width, precision); - return; - } - - /* Normal numbers */ - digits = (flags & FLAGS_UPPER) ? internalDigitsUpper : internalDigitsLower; - isHex = (base == BASE_HEX); - dblBase = (double)base; - - if (precision == NO_PRECISION) - precision = FLT_DIG; - - isNegative = (number < 0.0); - if (isNegative) - number = -number; - - if ((flags & FLAGS_FLOAT_G) || isHex) - { - if (precision == 0) - precision = 1; - - if ((number < 1.0e-4) || (number > pow(10.0, (double)precision))) - { - /* Use scientific notation */ - flags |= FLAGS_FLOAT_E; - } - else if (number < 1.0) - { - /* - * Use normal notation. If the integer part of the number is - * zero, then adjust the precision to include leading fractional - * zeros. - */ - workNumber = fabs(guarded_log10(number)); - if (workNumber - floor(workNumber) < 0.001) - workNumber--; - zeroes = (int)floor(workNumber); - } - } - - if (flags & FLAGS_FLOAT_E) - { - /* Scale the number */ - workNumber = guarded_log10(number); - if (workNumber == -HUGE_VAL) - { - exponent = 0; - /* Undo setting */ - if (flags & FLAGS_FLOAT_G) - flags &= ~FLAGS_FLOAT_E; - } - else - { - exponent = (int)floor(workNumber); - number /= pow(10.0, (double)exponent); - isExponentNegative = (exponent < 0); - uExponent = (isExponentNegative) ? -exponent : exponent; - /* No thousand separators */ - flags &= ~FLAGS_QUOTE; - } - } - - /* - * Truncated number. - * - * precision is number of significant digits for FLOAT_G - * and number of fractional digits for others - */ - integerDigits = (floor(number) > DBL_EPSILON) - ? 1 + (int)guarded_log10(floor(number)) - : 1; - fractionDigits = ((flags & FLAGS_FLOAT_G) && (zeroes == 0)) - ? precision - integerDigits - : zeroes + precision; - - number = floor(0.5 + number * pow(dblBase, (double)fractionDigits)); - workNumber = (isHex - ? guarded_log16(0.5 + number) - : guarded_log10(0.5 + number)); - if ((int)workNumber + 1 > integerDigits + fractionDigits) - { - if (flags & FLAGS_FLOAT_E) - { - /* Adjust if number was rounded up one digit (ie. 0.99 to 1.00) */ - exponent--; - uExponent -= (isExponentNegative) ? 1 : -1; - number /= dblBase; - } - else - { - /* Adjust if number was rounded up one digit (ie. 99 to 100) */ - integerDigits++; - } - } - - /* Build the fraction part */ - numberPointer = &numberBuffer[sizeof(numberBuffer) - 1]; - *numberPointer = NIL; - onlyzero = TRUE; - for (i = 0; i < fractionDigits; i++) - { - *(--numberPointer) = digits[(int)fmod(number, dblBase)]; - number = floor(number / dblBase); - - if ((flags & FLAGS_FLOAT_G) && !(flags & FLAGS_ALTERNATIVE)) - { - /* Prune trailing zeroes */ - if (numberPointer[0] != digits[0]) - onlyzero = FALSE; - else if (onlyzero && (numberPointer[0] == digits[0])) - numberPointer++; - } - else - onlyzero = FALSE; - } - - /* Insert decimal point */ - if ((flags & FLAGS_ALTERNATIVE) || ((fractionDigits > 0) && !onlyzero)) - { - i = StrLength(internalDecimalPoint); - while (i> 0) - { - *(--numberPointer) = internalDecimalPoint[--i]; - } - } - /* Insert the integer part and thousand separators */ - charsPerThousand = (int)internalGrouping[0]; - groupingIndex = 1; - for (i = 1; i < integerDigits + 1; i++) - { - *(--numberPointer) = digits[(int)fmod(number, dblBase)]; - number = floor(number / dblBase); - if (number < DBL_EPSILON) - break; - - if ((i > 0) - && ((flags & (FLAGS_FLOAT_E | FLAGS_QUOTE)) == FLAGS_QUOTE) - && (charsPerThousand != NO_GROUPING) - && (i % charsPerThousand == 0)) - { - /* - * We are building the number from the least significant - * to the most significant digit, so we have to copy the - * thousand separator backwards - */ - length = StrLength(internalThousandSeparator); - integerDigits += length; - if (((int)(numberPointer - numberBuffer) - length) > 0) - { - work = &internalThousandSeparator[length - 1]; - while (length-- > 0) - *(--numberPointer) = *work--; - } - - /* Advance to next grouping number */ - if (charsPerThousand != NO_GROUPING) - { - switch (internalGrouping[groupingIndex]) - { - case CHAR_MAX: /* Disable grouping */ - charsPerThousand = NO_GROUPING; - break; - case 0: /* Repeat last group */ - break; - default: - charsPerThousand = (int)internalGrouping[groupingIndex++]; - break; - } - } - } - } - - /* Build the exponent */ - exponentDigits = 0; - if (flags & FLAGS_FLOAT_E) - { - exponentPointer = &exponentBuffer[sizeof(exponentBuffer) - 1]; - *exponentPointer-- = NIL; - do { - *exponentPointer-- = digits[uExponent % base]; - uExponent /= base; - exponentDigits++; - } while (uExponent); - } - - /* - * Calculate expected width. - * sign + integer part + thousands separators + decimal point - * + fraction + exponent - */ - expectedWidth = StrLength(numberPointer); - if (isNegative || (flags & FLAGS_SHOWSIGN)) - expectedWidth += sizeof("-") - 1; - if (exponentDigits > 0) - expectedWidth += exponentDigits + - ((exponentDigits > 1) ? sizeof("E+") : sizeof("E+0")) - 1; - if (isHex) - expectedWidth += sizeof("0X") - 1; - - /* Output prefixing */ - if (flags & FLAGS_NILPADDING) - { - /* Leading zeros must be after sign */ - if (isNegative) - self->OutStream(self, '-'); - else if (flags & FLAGS_SHOWSIGN) - self->OutStream(self, '+'); - if (isHex) - { - self->OutStream(self, '0'); - self->OutStream(self, (flags & FLAGS_UPPER) ? 'X' : 'x'); - } - if (!(flags & FLAGS_LEFTADJUST)) - { - for (i = expectedWidth; i < width; i++) - { - self->OutStream(self, '0'); - } - } - } - else - { - /* Leading spaces must be before sign */ - if (!(flags & FLAGS_LEFTADJUST)) - { - for (i = expectedWidth; i < width; i++) - { - self->OutStream(self, CHAR_ADJUST); - } - } - if (isNegative) - self->OutStream(self, '-'); - else if (flags & FLAGS_SHOWSIGN) - self->OutStream(self, '+'); - if (isHex) - { - self->OutStream(self, '0'); - self->OutStream(self, (flags & FLAGS_UPPER) ? 'X' : 'x'); - } - } - /* Output number */ - for (i = 0; numberPointer[i]; i++) - { - self->OutStream(self, numberPointer[i]); - } - /* Output exponent */ - if (exponentDigits > 0) - { - self->OutStream(self, - isHex - ? ((flags & FLAGS_UPPER) ? 'P' : 'p') - : ((flags & FLAGS_UPPER) ? 'E' : 'e')); - self->OutStream(self, (isExponentNegative) ? '-' : '+'); - - /* The exponent must contain at least two digits */ - if (exponentDigits == 1) - self->OutStream(self, '0'); - - for (i = 0; i < exponentDigits; i++) - { - self->OutStream(self, exponentPointer[i + 1]); - } - } - /* Output trailing spaces */ - if (flags & FLAGS_LEFTADJUST) - { - for (i = expectedWidth; i < width; i++) - { - self->OutStream(self, CHAR_ADJUST); - } - } -} - -/************************************************************************* - * TrioFormatProcess [private] - */ -static int -TrioFormatProcess(trio_T *data, - const char *format, - parameter_T *parameters) - -{ -#if defined(TRIO_COMPILER_SUPPORTS_MULTIBYTE) - int charlen; -#endif - int i; - const char *string; - void *pointer; - unsigned long flags; - int width; - int precision; - int base; - int index; - - index = 0; - i = 0; -#if defined(TRIO_COMPILER_SUPPORTS_MULTIBYTE) - mblen(NULL, 0); -#endif - - while (format[index]) - { -#if defined(TRIO_COMPILER_SUPPORTS_MULTIBYTE) - if (! isascii(format[index])) - { - charlen = mblen(&format[index], MB_LEN_MAX); - while (charlen-- > 0) - { - data->OutStream(data, format[index++]); - } - continue; /* while */ - } -#endif /* TRIO_COMPILER_SUPPORTS_MULTIBYTE */ - if (CHAR_IDENTIFIER == format[index]) - { - if (CHAR_IDENTIFIER == format[index + 1]) - { - data->OutStream(data, CHAR_IDENTIFIER); - index += 2; - } - else - { - /* Skip the parameter entries */ - while (parameters[i].type == FORMAT_PARAMETER) - i++; - - flags = parameters[i].flags; - - /* Find width */ - width = parameters[i].width; - if (flags & FLAGS_WIDTH_PARAMETER) - { - /* Get width from parameter list */ - width = (int)parameters[width].data.number.as_signed; - } - - /* Find precision */ - if (flags & FLAGS_PRECISION) - { - precision = parameters[i].precision; - if (flags & FLAGS_PRECISION_PARAMETER) - { - /* Get precision from parameter list */ - precision = (int)parameters[precision].data.number.as_signed; - } - } - else - { - precision = NO_PRECISION; - } - - /* Find base */ - base = parameters[i].base; - if (flags & FLAGS_BASE_PARAMETER) - { - /* Get base from parameter list */ - base = (int)parameters[base].data.number.as_signed; - } - - switch (parameters[i].type) - { - case FORMAT_CHAR: - if (flags & FLAGS_QUOTE) - data->OutStream(data, CHAR_QUOTE); - if (! (flags & FLAGS_LEFTADJUST)) - { - while (--width > 0) - data->OutStream(data, CHAR_ADJUST); - } -#if TRIO_WIDECHAR - if (flags & FLAGS_WIDECHAR) - { - TrioWriteWideStringCharacter(data, - (wchar_t)parameters[i].data.number.as_signed, - flags, - NO_WIDTH); - } - else -#endif - TrioWriteStringCharacter(data, - (int)parameters[i].data.number.as_signed, - flags); - - if (flags & FLAGS_LEFTADJUST) - { - while(--width > 0) - data->OutStream(data, CHAR_ADJUST); - } - if (flags & FLAGS_QUOTE) - data->OutStream(data, CHAR_QUOTE); - - break; /* FORMAT_CHAR */ - - case FORMAT_INT: - if (base == NO_BASE) - base = BASE_DECIMAL; - - TrioWriteNumber(data, - parameters[i].data.number.as_signed, - flags, - width, - precision, - base); - - break; /* FORMAT_INT */ - - case FORMAT_DOUBLE: - TrioWriteDouble(data, - parameters[i].data.longdoubleNumber, - flags, - width, - precision, - base); - break; /* FORMAT_DOUBLE */ - - case FORMAT_STRING: -#if TRIO_WIDECHAR - if (flags & FLAGS_WIDECHAR) - { - TrioWriteWideString(data, - parameters[i].data.wstring, - flags, - width, - precision); - } - else -#endif -#ifdef QUALIFIER_ESCAPE - { - char *s = NULL; - static const char* empty = "(null)"; - switch (parameters[i].escape) - { - case ESCAPE_ULM: - s = edg_wll_LogEscape(parameters[i].data.string); - break; - case ESCAPE_XML: - s = edg_wll_EscapeXML(parameters[i].data.string); - break; - case ESCAPE_SQL: - s = edg_wll_EscapeSQL(parameters[i].data.string); - break; - case ESCAPE_NONE: - s = strdup(parameters[i].data.string ? parameters[i].data.string : empty); - break; - } - TrioWriteString(data,s,flags,width,precision); - free(s); - } -#else - { - TrioWriteString(data, - parameters[i].data.string, - flags, - width, - precision); - } -#endif - break; /* FORMAT_STRING */ - - case FORMAT_POINTER: - { - reference_T reference; - - reference.data = data; - reference.parameter = ¶meters[i]; - trio_print_pointer(&reference, parameters[i].data.pointer); - } - break; /* FORMAT_POINTER */ - - case FORMAT_COUNT: - pointer = parameters[i].data.pointer; - if (NULL != pointer) - { - /* - * C99 paragraph 7.19.6.1.8 says "the number of - * characters written to the output stream so far by - * this call", which is data->committed - */ -#if defined(QUALIFIER_SIZE_T) || defined(QUALIFIER_SIZE_T_UPPER) - if (flags & FLAGS_SIZE_T) - *(size_t *)pointer = (size_t)data->committed; - else -#endif -#if defined(QUALIFIER_PTRDIFF_T) - if (flags & FLAGS_PTRDIFF_T) - *(ptrdiff_t *)pointer = (ptrdiff_t)data->committed; - else -#endif -#if defined(QUALIFIER_INTMAX_T) - if (flags & FLAGS_INTMAX_T) - *(trio_intmax_t *)pointer = (trio_intmax_t)data->committed; - else -#endif - if (flags & FLAGS_QUAD) - { - *(trio_ulonglong_t *)pointer = (trio_ulonglong_t)data->committed; - } - else if (flags & FLAGS_LONG) - { - *(long int *)pointer = (long int)data->committed; - } - else if (flags & FLAGS_SHORT) - { - *(short int *)pointer = (short int)data->committed; - } - else - { - *(int *)pointer = (int)data->committed; - } - } - break; /* FORMAT_COUNT */ - - case FORMAT_PARAMETER: - break; /* FORMAT_PARAMETER */ - -#if defined(FORMAT_ERRNO) - case FORMAT_ERRNO: - string = StrError(parameters[i].data.errorNumber); - if (string) - { - TrioWriteString(data, - string, - flags, - width, - precision); - } - else - { - data->OutStream(data, '#'); - TrioWriteNumber(data, - (trio_intmax_t)parameters[i].data.errorNumber, - flags, - width, - precision, - BASE_DECIMAL); - } - break; /* FORMAT_ERRNO */ -#endif /* defined(FORMAT_ERRNO) */ - -#if defined(FORMAT_USER_DEFINED) - case FORMAT_USER_DEFINED: - { - reference_T reference; - userdef_T *def = NULL; - - if (parameters[i].user_name[0] == NIL) - { - /* Use handle */ - if ((i > 0) || - (parameters[i - 1].type == FORMAT_PARAMETER)) - def = (userdef_T *)parameters[i - 1].data.pointer; - } - else - { - /* Look up namespace */ - def = TrioFindNamespace(parameters[i].user_name, NULL); - } - if (def) { - reference.data = data; - reference.parameter = ¶meters[i]; - def->callback(&reference); - } - } - break; -#endif /* defined(FORMAT_USER_DEFINED) */ - - default: - break; - } /* switch parameter type */ - - /* Prepare for next */ - index = parameters[i].indexAfterSpecifier; - i++; - } - } - else /* not identifier */ - { - data->OutStream(data, format[index++]); - } - } - return data->processed; -} - -/************************************************************************* - * TrioFormatRef [private] - */ -static int -TrioFormatRef(reference_T *reference, - const char *format, - va_list arglist, - void **argarray) -{ - int status; - parameter_T parameters[MAX_PARAMETERS]; - - status = TrioPreprocess(TYPE_PRINT, format, parameters, arglist, argarray); - if (status < 0) - return status; - - return TrioFormatProcess(reference->data, format, parameters); -} - -/************************************************************************* - * TrioFormat [private] - * - * Description: - * This is the main engine for formatting output - */ -static int -TrioFormat(void *destination, - size_t destinationSize, - void (*OutStream)(trio_T *, int), - const char *format, - va_list arglist, - void **argarray) -{ - int status; - trio_T data; - parameter_T parameters[MAX_PARAMETERS]; - - assert(VALID(OutStream)); - assert(VALID(format)); - - memset(&data, 0, sizeof(data)); - data.OutStream = OutStream; - data.location = destination; - data.max = destinationSize; - -#if defined(USE_LOCALE) - if (NULL == internalLocaleValues) - { - TrioSetLocale(); - } -#endif - - status = TrioPreprocess(TYPE_PRINT, format, parameters, arglist, argarray); - if (status < 0) - return status; - - return TrioFormatProcess(&data, format, parameters); -} - -/************************************************************************* - * TrioOutStreamFile [private] - */ -static void -TrioOutStreamFile(trio_T *self, - int output) -{ - FILE *file = (FILE *)self->location; - - assert(VALID(self)); - assert(VALID(file)); - - self->processed++; - self->committed++; - (void)fputc(output, file); -} - -/************************************************************************* - * TrioOutStreamFileDescriptor [private] - */ -static void -TrioOutStreamFileDescriptor(trio_T *self, - int output) -{ - int fd = *((int *)self->location); - char ch; - - assert(VALID(self)); - - ch = (char)output; - (void)write(fd, &ch, sizeof(char)); - self->processed++; - self->committed++; -} - -/************************************************************************* - * TrioOutStreamString [private] - */ -static void -TrioOutStreamString(trio_T *self, - int output) -{ - char **buffer = (char **)self->location; - - assert(VALID(self)); - assert(VALID(buffer)); - - **buffer = (char)output; - (*buffer)++; - self->processed++; - self->committed++; -} - -/************************************************************************* - * TrioOutStreamStringMax [private] - */ -static void -TrioOutStreamStringMax(trio_T *self, - int output) -{ - char **buffer; - - assert(VALID(self)); - buffer = (char **)self->location; - assert(VALID(buffer)); - - if (self->processed < self->max) - { - **buffer = (char)output; - (*buffer)++; - self->committed++; - } - self->processed++; -} - -/************************************************************************* - * TrioOutStreamStringDynamic [private] - */ -#define DYNAMIC_START_SIZE 32 -struct dynamicBuffer { - char *buffer; - size_t length; - size_t allocated; -}; - -static void -TrioOutStreamStringDynamic(trio_T *self, - int output) -{ - struct dynamicBuffer *infop; - - assert(VALID(self)); - assert(VALID(self->location)); - - infop = (struct dynamicBuffer *)self->location; - - if (infop->buffer == NULL) - { - /* Start with a reasonable size */ - infop->buffer = (char *)TRIO_MALLOC(DYNAMIC_START_SIZE); - if (infop->buffer == NULL) - return; /* fail */ - - infop->allocated = DYNAMIC_START_SIZE; - self->processed = 0; - self->committed = 0; - } - else if (self->committed + sizeof(NIL) >= infop->allocated) - { - char *newptr; - - /* Allocate increasing chunks */ - newptr = (char *)TRIO_REALLOC(infop->buffer, infop->allocated * 2); - - if (newptr == NULL) - return; - - infop->buffer = newptr; - infop->allocated *= 2; - } - - infop->buffer[self->committed] = (char)output; - self->committed++; - self->processed++; - - infop->length = self->committed; -} - -/************************************************************************* - * printf - */ -int -trio_printf(const char *format, - ...) -{ - int status; - va_list args; - - assert(VALID(format)); - - va_start(args, format); - status = TrioFormat(stdout, 0, TrioOutStreamFile, format, args, NULL); - va_end(args); - return status; -} - -int -trio_vprintf(const char *format, - va_list args) -{ - assert(VALID(format)); - - return TrioFormat(stdout, 0, TrioOutStreamFile, format, args, NULL); -} - -#ifdef __GNUC__ -#define UNUSED_VAR __attribute__((unused)) -#else -#define UNUSED_VAR -#endif - -static void shutup_unitialized(va_list *dummy UNUSED_VAR) { -} - -int -trio_printfv(const char *format, - void ** args) -{ - va_list dummy; - shutup_unitialized(&dummy); - - assert(VALID(format)); - - return TrioFormat(stdout, 0, TrioOutStreamFile, format, dummy, args); -} - -/************************************************************************* - * fprintf - */ -int -trio_fprintf(FILE *file, - const char *format, - ...) -{ - int status; - va_list args; - - assert(VALID(file)); - assert(VALID(format)); - - va_start(args, format); - status = TrioFormat(file, 0, TrioOutStreamFile, format, args, NULL); - va_end(args); - return status; -} - -int -trio_vfprintf(FILE *file, - const char *format, - va_list args) -{ - assert(VALID(file)); - assert(VALID(format)); - - return TrioFormat(file, 0, TrioOutStreamFile, format, args, NULL); -} - -int -trio_fprintfv(FILE *file, - const char *format, - void ** args) -{ - va_list dummy; - shutup_unitialized(&dummy); - - assert(VALID(file)); - assert(VALID(format)); - - return TrioFormat(file, 0, TrioOutStreamFile, format, dummy, args); -} - -/************************************************************************* - * dprintf - */ -int -trio_dprintf(int fd, - const char *format, - ...) -{ - int status; - va_list args; - - assert(VALID(format)); - - va_start(args, format); - status = TrioFormat(&fd, 0, TrioOutStreamFileDescriptor, format, args, NULL); - va_end(args); - return status; -} - -int -trio_vdprintf(int fd, - const char *format, - va_list args) -{ - assert(VALID(format)); - - return TrioFormat(&fd, 0, TrioOutStreamFileDescriptor, format, args, NULL); -} - -int -trio_dprintfv(int fd, - const char *format, - void **args) -{ - va_list dummy; - shutup_unitialized(&dummy); - - assert(VALID(format)); - - return TrioFormat(&fd, 0, TrioOutStreamFileDescriptor, format, dummy, args); -} - -/************************************************************************* - * sprintf - */ -int -trio_sprintf(char *buffer, - const char *format, - ...) -{ - int status; - va_list args; - - assert(VALID(buffer)); - assert(VALID(format)); - - va_start(args, format); - status = TrioFormat(&buffer, 0, TrioOutStreamString, format, args, NULL); - *buffer = NIL; /* Terminate with NIL character */ - va_end(args); - return status; -} - -int -trio_vsprintf(char *buffer, - const char *format, - va_list args) -{ - int status; - - assert(VALID(buffer)); - assert(VALID(format)); - - status = TrioFormat(&buffer, 0, TrioOutStreamString, format, args, NULL); - *buffer = NIL; - return status; -} - -int -trio_sprintfv(char *buffer, - const char *format, - void **args) -{ - int status; - va_list dummy; - shutup_unitialized(&dummy); - - assert(VALID(buffer)); - assert(VALID(format)); - - status = TrioFormat(&buffer, 0, TrioOutStreamString, format, dummy, args); - *buffer = NIL; - return status; -} - -/************************************************************************* - * snprintf - */ -int -trio_snprintf(char *buffer, - size_t bufferSize, - const char *format, - ...) -{ - int status; - va_list args; - - assert(VALID(buffer)); - assert(VALID(format)); - - va_start(args, format); - status = TrioFormat(&buffer, bufferSize > 0 ? bufferSize - 1 : 0, - TrioOutStreamStringMax, format, args, NULL); - if (bufferSize > 0) - *buffer = NIL; - va_end(args); - return status; -} - -int -trio_vsnprintf(char *buffer, - size_t bufferSize, - const char *format, - va_list args) -{ - int status; - - assert(VALID(buffer)); - assert(VALID(format)); - - status = TrioFormat(&buffer, bufferSize > 0 ? bufferSize - 1 : 0, - TrioOutStreamStringMax, format, args, NULL); - if (bufferSize > 0) - *buffer = NIL; - return status; -} - -int -trio_snprintfv(char *buffer, - size_t bufferSize, - const char *format, - void **args) -{ - int status; - va_list dummy; - shutup_unitialized(&dummy); - - assert(VALID(buffer)); - assert(VALID(format)); - - status = TrioFormat(&buffer, bufferSize > 0 ? bufferSize - 1 : 0, - TrioOutStreamStringMax, format, dummy, args); - if (bufferSize > 0) - *buffer = NIL; - return status; -} - -/************************************************************************* - * snprintfcat - * Appends the new string to the buffer string overwriting the '\0' - * character at the end of buffer. - */ -int -trio_snprintfcat(char *buffer, - size_t bufferSize, - const char *format, - ...) -{ - int status; - va_list args; - size_t buf_len; - - va_start(args, format); - - assert(VALID(buffer)); - assert(VALID(format)); - - buf_len = strlen(buffer); - buffer = &buffer[buf_len]; - - status = TrioFormat(&buffer, bufferSize - 1 - buf_len, - TrioOutStreamStringMax, format, args, NULL); - va_end(args); - *buffer = NIL; - return status; -} - -int -trio_vsnprintfcat(char *buffer, - size_t bufferSize, - const char *format, - va_list args) -{ - int status; - size_t buf_len; - assert(VALID(buffer)); - assert(VALID(format)); - - buf_len = strlen(buffer); - buffer = &buffer[buf_len]; - status = TrioFormat(&buffer, bufferSize - 1 - buf_len, - TrioOutStreamStringMax, format, args, NULL); - *buffer = NIL; - return status; -} - -/************************************************************************* - * trio_aprintf - */ - -/* Deprecated */ -char * -trio_aprintf(const char *format, - ...) -{ - va_list args; - struct dynamicBuffer info; - - assert(VALID(format)); - - info.buffer = NULL; - info.length = 0; - info.allocated = 0; - - va_start(args, format); - (void)TrioFormat(&info, 0, TrioOutStreamStringDynamic, format, args, NULL); - va_end(args); - if (info.length) { - info.buffer[info.length] = NIL; /* we terminate this with a zero byte */ - return info.buffer; - } - else - return NULL; -} - -/* Deprecated */ -char * -trio_vaprintf(const char *format, - va_list args) -{ - struct dynamicBuffer info; - - assert(VALID(format)); - - info.buffer = NULL; - info.length = 0; - info.allocated = 0; - - (void)TrioFormat(&info, 0, TrioOutStreamStringDynamic, format, args, NULL); - if (info.length) { - info.buffer[info.length] = NIL; /* we terminate this with a zero byte */ - return info.buffer; - } - else - return NULL; -} - -int -trio_asprintf(char **result, - const char *format, - ...) -{ - va_list args; - int status; - struct dynamicBuffer info; - - assert(VALID(format)); - - info.buffer = NULL; - info.length = 0; - info.allocated = 0; - - va_start(args, format); - status = TrioFormat(&info, 0, TrioOutStreamStringDynamic, format, args, NULL); - va_end(args); - if (status < 0) { - *result = NULL; - return status; - } - if (info.length == 0) { - /* - * If the length is zero, no characters have been written and therefore - * no memory has been allocated, but we must to allocate and return an - * empty string. - */ - info.buffer = (char *)TRIO_MALLOC(sizeof(char)); - if (info.buffer == NULL) { - *result = NULL; - return TRIO_ERROR_RETURN(TRIO_ENOMEM, 0); - } - } - info.buffer[info.length] = NIL; /* we terminate this with a zero byte */ - *result = info.buffer; - - return status; -} - -int -trio_vasprintf(char **result, - const char *format, - va_list args) -{ - int status; - struct dynamicBuffer info; - - assert(VALID(format)); - - info.buffer = NULL; - info.length = 0; - info.allocated = 0; - - status = TrioFormat(&info, 0, TrioOutStreamStringDynamic, format, args, NULL); - if (status < 0) { - *result = NULL; - return status; - } - if (info.length == 0) { - info.buffer = (char *)TRIO_MALLOC(sizeof(char)); - if (info.buffer == NULL) { - *result = NULL; - return TRIO_ERROR_RETURN(TRIO_ENOMEM, 0); - } - } - info.buffer[info.length] = NIL; /* we terminate this with a zero byte */ - *result = info.buffer; - - return status; -} - - -/************************************************************************* - * - * @CALLBACK - * - ************************************************************************/ - - -/************************************************************************* - * trio_register [public] - */ -void * -trio_register(trio_callback_t callback, - const char *name) -{ - userdef_T *def; - userdef_T *prev = NULL; - - if (callback == NULL) - return NULL; - - if (name) - { - /* Handle built-in namespaces */ - if (name[0] == ':') - { - if (StrEqual(name, ":enter")) - { - internalEnterCriticalRegion = callback; - } - else if (StrEqual(name, ":leave")) - { - internalLeaveCriticalRegion = callback; - } - return NULL; - } - - /* Bail out if namespace is too long */ - if (StrLength(name) >= MAX_USER_NAME) - return NULL; - - /* Bail out if namespace already is registered */ - def = TrioFindNamespace(name, &prev); - if (def) - return NULL; - } - - def = (userdef_T *)TRIO_MALLOC(sizeof(userdef_T)); - if (def) - { - if (internalEnterCriticalRegion) - (void)internalEnterCriticalRegion(NULL); - - if (name) - { - /* Link into internal list */ - if (prev == NULL) - internalUserDef = def; - else - prev->next = def; - } - /* Initialize */ - def->callback = callback; - def->name = (name == NULL) - ? NULL - : StrDuplicate(name); - def->next = NULL; - - if (internalLeaveCriticalRegion) - (void)internalLeaveCriticalRegion(NULL); - } - return def; -} - -/************************************************************************* - * trio_unregister [public] - */ -void -trio_unregister(void *handle) -{ - userdef_T *self = (userdef_T *)handle; - userdef_T *def; - userdef_T *prev = NULL; - - assert(VALID(self)); - - if (self->name) - { - def = TrioFindNamespace(self->name, &prev); - if (def) - { - if (internalEnterCriticalRegion) - (void)internalEnterCriticalRegion(NULL); - - if (prev == NULL) - internalUserDef = NULL; - else - prev->next = def->next; - - if (internalLeaveCriticalRegion) - (void)internalLeaveCriticalRegion(NULL); - } - StrFree(self->name); - } - TRIO_FREE(self); -} - -/************************************************************************* - * trio_get_format [public] - */ -const char * -trio_get_format(void *ref) -{ - assert(((reference_T *)ref)->parameter->type == FORMAT_USER_DEFINED); - - return (((reference_T *)ref)->parameter->user_data); -} - -/************************************************************************* - * trio_get_argument [public] - */ -void * -trio_get_argument(void *ref) -{ - assert(((reference_T *)ref)->parameter->type == FORMAT_USER_DEFINED); - - return ((reference_T *)ref)->parameter->data.pointer; -} - -/************************************************************************* - * trio_get_width / trio_set_width [public] - */ -int -trio_get_width(void *ref) -{ - return ((reference_T *)ref)->parameter->width; -} - -void -trio_set_width(void *ref, - int width) -{ - ((reference_T *)ref)->parameter->width = width; -} - -/************************************************************************* - * trio_get_precision / trio_set_precision [public] - */ -int -trio_get_precision(void *ref) -{ - return (((reference_T *)ref)->parameter->precision); -} - -void -trio_set_precision(void *ref, - int precision) -{ - ((reference_T *)ref)->parameter->precision = precision; -} - -/************************************************************************* - * trio_get_base / trio_set_base [public] - */ -int -trio_get_base(void *ref) -{ - return (((reference_T *)ref)->parameter->base); -} - -void -trio_set_base(void *ref, - int base) -{ - ((reference_T *)ref)->parameter->base = base; -} - -/************************************************************************* - * trio_get_long / trio_set_long [public] - */ -int -trio_get_long(void *ref) -{ - return (((reference_T *)ref)->parameter->flags & FLAGS_LONG); -} - -void -trio_set_long(void *ref, - int is_long) -{ - if (is_long) - ((reference_T *)ref)->parameter->flags |= FLAGS_LONG; - else - ((reference_T *)ref)->parameter->flags &= ~FLAGS_LONG; -} - -/************************************************************************* - * trio_get_longlong / trio_set_longlong [public] - */ -int -trio_get_longlong(void *ref) -{ - return (((reference_T *)ref)->parameter->flags & FLAGS_QUAD); -} - -void -trio_set_longlong(void *ref, - int is_longlong) -{ - if (is_longlong) - ((reference_T *)ref)->parameter->flags |= FLAGS_QUAD; - else - ((reference_T *)ref)->parameter->flags &= ~FLAGS_QUAD; -} - -/************************************************************************* - * trio_get_longdouble / trio_set_longdouble [public] - */ -int -trio_get_longdouble(void *ref) -{ - return (((reference_T *)ref)->parameter->flags & FLAGS_LONGDOUBLE); -} - -void -trio_set_longdouble(void *ref, - int is_longdouble) -{ - if (is_longdouble) - ((reference_T *)ref)->parameter->flags |= FLAGS_LONGDOUBLE; - else - ((reference_T *)ref)->parameter->flags &= ~FLAGS_LONGDOUBLE; -} - -/************************************************************************* - * trio_get_short / trio_set_short [public] - */ -int -trio_get_short(void *ref) -{ - return (((reference_T *)ref)->parameter->flags & FLAGS_SHORT); -} - -void -trio_set_short(void *ref, - int is_short) -{ - if (is_short) - ((reference_T *)ref)->parameter->flags |= FLAGS_SHORT; - else - ((reference_T *)ref)->parameter->flags &= ~FLAGS_SHORT; -} - -/************************************************************************* - * trio_get_shortshort / trio_set_shortshort [public] - */ -int -trio_get_shortshort(void *ref) -{ - return (((reference_T *)ref)->parameter->flags & FLAGS_SHORTSHORT); -} - -void -trio_set_shortshort(void *ref, - int is_shortshort) -{ - if (is_shortshort) - ((reference_T *)ref)->parameter->flags |= FLAGS_SHORTSHORT; - else - ((reference_T *)ref)->parameter->flags &= ~FLAGS_SHORTSHORT; -} - -/************************************************************************* - * trio_get_alternative / trio_set_alternative [public] - */ -int -trio_get_alternative(void *ref) -{ - return (((reference_T *)ref)->parameter->flags & FLAGS_ALTERNATIVE); -} - -void -trio_set_alternative(void *ref, - int is_alternative) -{ - if (is_alternative) - ((reference_T *)ref)->parameter->flags |= FLAGS_ALTERNATIVE; - else - ((reference_T *)ref)->parameter->flags &= ~FLAGS_ALTERNATIVE; -} - -/************************************************************************* - * trio_get_alignment / trio_set_alignment [public] - */ -int -trio_get_alignment(void *ref) -{ - return (((reference_T *)ref)->parameter->flags & FLAGS_LEFTADJUST); -} - -void -trio_set_alignment(void *ref, - int is_leftaligned) -{ - if (is_leftaligned) - ((reference_T *)ref)->parameter->flags |= FLAGS_LEFTADJUST; - else - ((reference_T *)ref)->parameter->flags &= ~FLAGS_LEFTADJUST; -} - -/************************************************************************* - * trio_get_spacing /trio_set_spacing [public] - */ -int -trio_get_spacing(void *ref) -{ - return (((reference_T *)ref)->parameter->flags & FLAGS_SPACE); -} - -void -trio_set_spacing(void *ref, - int is_space) -{ - if (is_space) - ((reference_T *)ref)->parameter->flags |= FLAGS_SPACE; - else - ((reference_T *)ref)->parameter->flags &= ~FLAGS_SPACE; -} - -/************************************************************************* - * trio_get_sign / trio_set_sign [public] - */ -int -trio_get_sign(void *ref) -{ - return (((reference_T *)ref)->parameter->flags & FLAGS_SHOWSIGN); -} - -void -trio_set_sign(void *ref, - int is_sign) -{ - if (is_sign) - ((reference_T *)ref)->parameter->flags |= FLAGS_SHOWSIGN; - else - ((reference_T *)ref)->parameter->flags &= ~FLAGS_SHOWSIGN; -} - -/************************************************************************* - * trio_get_padding / trio_set_padding [public] - */ -int -trio_get_padding(void *ref) -{ - return (((reference_T *)ref)->parameter->flags & FLAGS_NILPADDING); -} - -void -trio_set_padding(void *ref, - int is_padding) -{ - if (is_padding) - ((reference_T *)ref)->parameter->flags |= FLAGS_NILPADDING; - else - ((reference_T *)ref)->parameter->flags &= ~FLAGS_NILPADDING; -} - -/************************************************************************* - * trio_get_quote / trio_set_quote [public] - */ -int -trio_get_quote(void *ref) -{ - return (((reference_T *)ref)->parameter->flags & FLAGS_QUOTE); -} - -void -trio_set_quote(void *ref, - int is_quote) -{ - if (is_quote) - ((reference_T *)ref)->parameter->flags |= FLAGS_QUOTE; - else - ((reference_T *)ref)->parameter->flags &= ~FLAGS_QUOTE; -} - -/************************************************************************* - * trio_get_upper / trio_set_upper [public] - */ -int -trio_get_upper(void *ref) -{ - return (((reference_T *)ref)->parameter->flags & FLAGS_UPPER); -} - -void -trio_set_upper(void *ref, - int is_upper) -{ - if (is_upper) - ((reference_T *)ref)->parameter->flags |= FLAGS_UPPER; - else - ((reference_T *)ref)->parameter->flags &= ~FLAGS_UPPER; -} - -/************************************************************************* - * trio_get_largest / trio_set_largest [public] - */ -#if TRIO_C99 -int -trio_get_largest(void *ref) -{ - return (((reference_T *)ref)->parameter->flags & FLAGS_INTMAX_T); -} - -void -trio_set_largest(void *ref, - int is_largest) -{ - if (is_largest) - ((reference_T *)ref)->parameter->flags |= FLAGS_INTMAX_T; - else - ((reference_T *)ref)->parameter->flags &= ~FLAGS_INTMAX_T; -} -#endif - -/************************************************************************* - * trio_get_ptrdiff / trio_set_ptrdiff [public] - */ -int -trio_get_ptrdiff(void *ref) -{ - return (((reference_T *)ref)->parameter->flags & FLAGS_PTRDIFF_T); -} - -void -trio_set_ptrdiff(void *ref, - int is_ptrdiff) -{ - if (is_ptrdiff) - ((reference_T *)ref)->parameter->flags |= FLAGS_PTRDIFF_T; - else - ((reference_T *)ref)->parameter->flags &= ~FLAGS_PTRDIFF_T; -} - -/************************************************************************* - * trio_get_size / trio_set_size [public] - */ -#if TRIO_C99 -int -trio_get_size(void *ref) -{ - return (((reference_T *)ref)->parameter->flags & FLAGS_SIZE_T); -} - -void -trio_set_size(void *ref, - int is_size) -{ - if (is_size) - ((reference_T *)ref)->parameter->flags |= FLAGS_SIZE_T; - else - ((reference_T *)ref)->parameter->flags &= ~FLAGS_SIZE_T; -} -#endif - -/************************************************************************* - * trio_print_int [public] - */ -void -trio_print_int(void *ref, - int number) -{ - reference_T *self = (reference_T *)ref; - - TrioWriteNumber(self->data, - (trio_intmax_t)number, - self->parameter->flags, - self->parameter->width, - self->parameter->precision, - self->parameter->base); -} - -/************************************************************************* - * trio_print_uint [public] - */ -void -trio_print_uint(void *ref, - unsigned int number) -{ - reference_T *self = (reference_T *)ref; - - TrioWriteNumber(self->data, - (trio_intmax_t)number, - self->parameter->flags | FLAGS_UNSIGNED, - self->parameter->width, - self->parameter->precision, - self->parameter->base); -} - -/************************************************************************* - * trio_print_double [public] - */ -void -trio_print_double(void *ref, - double number) -{ - reference_T *self = (reference_T *)ref; - - TrioWriteDouble(self->data, - number, - self->parameter->flags, - self->parameter->width, - self->parameter->precision, - self->parameter->base); -} - -/************************************************************************* - * trio_print_string [public] - */ -void -trio_print_string(void *ref, - char *string) -{ - reference_T *self = (reference_T *)ref; - - TrioWriteString(self->data, - string, - self->parameter->flags, - self->parameter->width, - self->parameter->precision); -} - -/************************************************************************* - * trio_print_pointer [public] - */ -void -trio_print_pointer(void *ref, - void *pointer) -{ - reference_T *self = (reference_T *)ref; - unsigned long flags; - trio_uintmax_t number; - - if (NULL == pointer) - { - const char *string = null; - while (*string) - self->data->OutStream(self->data, *string++); - } - else - { - /* - * The subtraction of the null pointer is a workaround - * to avoid a compiler warning. The performance overhead - * is negligible (and likely to be removed by an - * optimising compiler). The (char *) casting is done - * to please ANSI C++. - */ - number = (trio_uintmax_t)((char *)pointer - (char *)0); - /* Shrink to size of pointer */ - number &= (trio_uintmax_t)-1; - flags = self->parameter->flags; - flags |= (FLAGS_UNSIGNED | FLAGS_ALTERNATIVE | - FLAGS_NILPADDING); - TrioWriteNumber(self->data, - (trio_intmax_t)number, - flags, - POINTER_WIDTH, - NO_PRECISION, - BASE_HEX); - } -} - -/************************************************************************* - * trio_print_ref [public] - */ -int -trio_print_ref(void *ref, - const char *format, - ...) -{ - int status; - va_list arglist; - - assert(VALID(format)); - - va_start(arglist, format); - status = TrioFormatRef((reference_T *)ref, format, arglist, NULL); - va_end(arglist); - return status; -} - -/************************************************************************* - * trio_vprint_ref [public] - */ -int -trio_vprint_ref(void *ref, - const char *format, - va_list arglist) -{ - assert(VALID(format)); - - return TrioFormatRef((reference_T *)ref, format, arglist, NULL); -} - -/************************************************************************* - * trio_printv_ref [public] - */ -int -trio_printv_ref(void *ref, - const char *format, - void **argarray) -{ - va_list dummy; - shutup_unitialized(&dummy); - - assert(VALID(format)); - - return TrioFormatRef((reference_T *)ref, format, dummy, argarray); -} - - -/************************************************************************* - * - * @SCANNING - * - ************************************************************************/ - - -/************************************************************************* - * TrioSkipWhitespaces [private] - */ -static int -TrioSkipWhitespaces(trio_T *self) -{ - int ch; - - ch = self->current; - while (isspace(ch)) - { - self->InStream(self, &ch); - } - return ch; -} - -/************************************************************************* - * TrioGetCollation [private] - */ -#if TRIO_EXTENSION -static void -TrioGetCollation() -{ - int i; - int j; - int k; - char first[2]; - char second[2]; - - /* This is computational expensive */ - first[1] = NIL; - second[1] = NIL; - for (i = 0; i < MAX_CHARACTER_CLASS; i++) - { - k = 0; - first[0] = (char)i; - for (j = 0; j < MAX_CHARACTER_CLASS; j++) - { - second[0] = (char)j; - if (StrEqualLocale(first, second)) - internalCollationArray[i][k++] = (char)j; - } - internalCollationArray[i][k] = NIL; - } -} -#endif - -/************************************************************************* - * TrioGetCharacterClass [private] - * - * FIXME: - * multibyte - */ -static int -TrioGetCharacterClass(const char *format, - int *indexPointer, - unsigned long *flagsPointer, - int *characterclass) -{ - int index = *indexPointer; - int i; - char ch; - char range_begin; - char range_end; - - *flagsPointer &= ~FLAGS_EXCLUDE; - - if (format[index] == QUALIFIER_CIRCUMFLEX) - { - *flagsPointer |= FLAGS_EXCLUDE; - index++; - } - /* - * If the ungroup character is at the beginning of the scanlist, - * it will be part of the class, and a second ungroup character - * must follow to end the group. - */ - if (format[index] == SPECIFIER_UNGROUP) - { - characterclass[(int)SPECIFIER_UNGROUP]++; - index++; - } - /* - * Minus is used to specify ranges. To include minus in the class, - * it must be at the beginning of the list - */ - if (format[index] == QUALIFIER_MINUS) - { - characterclass[(int)QUALIFIER_MINUS]++; - index++; - } - /* Collect characters */ - for (ch = format[index]; - (ch != SPECIFIER_UNGROUP) && (ch != NIL); - ch = format[++index]) - { - switch (ch) - { - case QUALIFIER_MINUS: /* Scanlist ranges */ - - /* - * Both C99 and UNIX98 describes ranges as implementation- - * defined. - * - * We support the following behaviour (although this may - * change as we become wiser) - * - only increasing ranges, ie. [a-b] but not [b-a] - * - transitive ranges, ie. [a-b-c] == [a-c] - * - trailing minus, ie. [a-] is interpreted as an 'a' - * and a '-' - * - duplicates (although we can easily convert these - * into errors) - */ - range_begin = format[index - 1]; - range_end = format[++index]; - if (range_end == SPECIFIER_UNGROUP) - { - /* Trailing minus is included */ - characterclass[(int)ch]++; - ch = range_end; - break; /* for */ - } - if (range_end == NIL) - return TRIO_ERROR_RETURN(TRIO_EINVAL, index); - if (range_begin > range_end) - return TRIO_ERROR_RETURN(TRIO_ERANGE, index); - - for (i = (int)range_begin; i <= (int)range_end; i++) - characterclass[i]++; - - ch = range_end; - break; - -#if TRIO_EXTENSION - - case SPECIFIER_GROUP: - - switch (format[index + 1]) - { - case QUALIFIER_DOT: /* Collating symbol */ - /* - * FIXME: This will be easier to implement when multibyte - * characters have been implemented. Until now, we ignore - * this feature. - */ - for (i = index + 2; ; i++) - { - if (format[i] == NIL) - /* Error in syntax */ - return -1; - else if (format[i] == QUALIFIER_DOT) - break; /* for */ - } - if (format[++i] != SPECIFIER_UNGROUP) - return -1; - - index = i; - break; - - case QUALIFIER_EQUAL: /* Equivalence class expressions */ - { - unsigned int j; - unsigned int k; - - if (internalCollationUnconverted) - { - /* Lazy evalutation of collation array */ - TrioGetCollation(); - internalCollationUnconverted = FALSE; - } - for (i = index + 2; ; i++) - { - if (format[i] == NIL) - /* Error in syntax */ - return -1; - else if (format[i] == QUALIFIER_EQUAL) - break; /* for */ - else - { - /* Mark any equivalent character */ - k = (unsigned int)format[i]; - for (j = 0; internalCollationArray[k][j] != NIL; j++) - characterclass[(int)internalCollationArray[k][j]]++; - } - } - if (format[++i] != SPECIFIER_UNGROUP) - return -1; - - index = i; - } - break; - - case QUALIFIER_COLON: /* Character class expressions */ - - if (StrEqualMax(CLASS_ALNUM, sizeof(CLASS_ALNUM) - 1, - &format[index])) - { - for (i = 0; i < MAX_CHARACTER_CLASS; i++) - if (isalnum(i)) - characterclass[i]++; - index += sizeof(CLASS_ALNUM) - 1; - } - else if (StrEqualMax(CLASS_ALPHA, sizeof(CLASS_ALPHA) - 1, - &format[index])) - { - for (i = 0; i < MAX_CHARACTER_CLASS; i++) - if (isalpha(i)) - characterclass[i]++; - index += sizeof(CLASS_ALPHA) - 1; - } - else if (StrEqualMax(CLASS_CNTRL, sizeof(CLASS_CNTRL) - 1, - &format[index])) - { - for (i = 0; i < MAX_CHARACTER_CLASS; i++) - if (iscntrl(i)) - characterclass[i]++; - index += sizeof(CLASS_CNTRL) - 1; - } - else if (StrEqualMax(CLASS_DIGIT, sizeof(CLASS_DIGIT) - 1, - &format[index])) - { - for (i = 0; i < MAX_CHARACTER_CLASS; i++) - if (isdigit(i)) - characterclass[i]++; - index += sizeof(CLASS_DIGIT) - 1; - } - else if (StrEqualMax(CLASS_GRAPH, sizeof(CLASS_GRAPH) - 1, - &format[index])) - { - for (i = 0; i < MAX_CHARACTER_CLASS; i++) - if (isgraph(i)) - characterclass[i]++; - index += sizeof(CLASS_GRAPH) - 1; - } - else if (StrEqualMax(CLASS_LOWER, sizeof(CLASS_LOWER) - 1, - &format[index])) - { - for (i = 0; i < MAX_CHARACTER_CLASS; i++) - if (islower(i)) - characterclass[i]++; - index += sizeof(CLASS_LOWER) - 1; - } - else if (StrEqualMax(CLASS_PRINT, sizeof(CLASS_PRINT) - 1, - &format[index])) - { - for (i = 0; i < MAX_CHARACTER_CLASS; i++) - if (isprint(i)) - characterclass[i]++; - index += sizeof(CLASS_PRINT) - 1; - } - else if (StrEqualMax(CLASS_PUNCT, sizeof(CLASS_PUNCT) - 1, - &format[index])) - { - for (i = 0; i < MAX_CHARACTER_CLASS; i++) - if (ispunct(i)) - characterclass[i]++; - index += sizeof(CLASS_PUNCT) - 1; - } - else if (StrEqualMax(CLASS_SPACE, sizeof(CLASS_SPACE) - 1, - &format[index])) - { - for (i = 0; i < MAX_CHARACTER_CLASS; i++) - if (isspace(i)) - characterclass[i]++; - index += sizeof(CLASS_SPACE) - 1; - } - else if (StrEqualMax(CLASS_UPPER, sizeof(CLASS_UPPER) - 1, - &format[index])) - { - for (i = 0; i < MAX_CHARACTER_CLASS; i++) - if (isupper(i)) - characterclass[i]++; - index += sizeof(CLASS_UPPER) - 1; - } - else if (StrEqualMax(CLASS_XDIGIT, sizeof(CLASS_XDIGIT) - 1, - &format[index])) - { - for (i = 0; i < MAX_CHARACTER_CLASS; i++) - if (isxdigit(i)) - characterclass[i]++; - index += sizeof(CLASS_XDIGIT) - 1; - } - else - { - characterclass[(int)ch]++; - } - break; - - default: - characterclass[(int)ch]++; - break; - } - break; - -#endif /* TRIO_EXTENSION */ - - default: - characterclass[(int)ch]++; - break; - } - } - return 0; -} - -/************************************************************************* - * TrioReadNumber [private] - * - * We implement our own number conversion in preference of strtol and - * strtoul, because we must handle 'long long' and thousand separators. - */ -static BOOLEAN_T -TrioReadNumber(trio_T *self, - trio_uintmax_t *target, - unsigned long flags, - int width, - int base) -{ - trio_uintmax_t number = 0; - int digit; - int count; - BOOLEAN_T isNegative = FALSE; - int j; - - assert(VALID(self)); - assert(VALID(self->InStream)); - assert((base >= MIN_BASE && base <= MAX_BASE) || (base == NO_BASE)); - - if (internalDigitsUnconverted) - { - /* Lazy evaluation of digits array */ - memset(internalDigitArray, -1, sizeof(internalDigitArray)); - for (j = 0; j < (int)sizeof(internalDigitsLower) - 1; j++) - { - internalDigitArray[(int)internalDigitsLower[j]] = j; - internalDigitArray[(int)internalDigitsUpper[j]] = j; - } - internalDigitsUnconverted = FALSE; - } - - TrioSkipWhitespaces(self); - - if (!(flags & FLAGS_UNSIGNED)) - { - /* Leading sign */ - if (self->current == '+') - { - self->InStream(self, NULL); - } - else if (self->current == '-') - { - self->InStream(self, NULL); - isNegative = TRUE; - } - } - - count = self->processed; - - if (flags & FLAGS_ALTERNATIVE) - { - switch (base) - { - case NO_BASE: - case BASE_OCTAL: - case BASE_HEX: - case BASE_BINARY: - if (self->current == '0') - { - self->InStream(self, NULL); - if (self->current) - { - if ((base == BASE_HEX) && - (toupper(self->current) == 'X')) - { - self->InStream(self, NULL); - } - else if ((base == BASE_BINARY) && - (toupper(self->current) == 'B')) - { - self->InStream(self, NULL); - } - } - } - else - return FALSE; - break; - default: - break; - } - } - - while (((width == NO_WIDTH) || (self->processed - count < width)) && - (! ((self->current == EOF) || isspace(self->current)))) - { - if (isascii(self->current)) - { - digit = internalDigitArray[self->current]; - /* Abort if digit is not allowed in the specified base */ - if ((digit == -1) || (digit >= base)) - break; - } - else if (flags & FLAGS_QUOTE) - { - /* Compare with thousands separator */ - for (j = 0; internalThousandSeparator[j] && self->current; j++) - { - if (internalThousandSeparator[j] != self->current) - break; - - self->InStream(self, NULL); - } - if (internalThousandSeparator[j]) - break; /* Mismatch */ - else - continue; /* Match */ - } - else - break; - - number *= base; - number += digit; - - self->InStream(self, NULL); - } - - /* Was anything read at all? */ - if (self->processed == count) - return FALSE; - - if (target) - *target = (isNegative) ? -number : number; - return TRUE; -} - -/************************************************************************* - * TrioReadChar [private] - */ -static int -TrioReadChar(trio_T *self, - char *target, - unsigned long flags, - int width) -{ - int i; - char ch; - trio_uintmax_t number; - - assert(VALID(self)); - assert(VALID(self->InStream)); - - for (i = 0; - (self->current != EOF) && (i < width); - i++) - { - ch = (char)self->current; - self->InStream(self, NULL); - if ((flags & FLAGS_ALTERNATIVE) && (ch == CHAR_BACKSLASH)) - { - switch (self->current) - { - case '\\': ch = '\\'; break; - case 'a': ch = '\007'; break; - case 'b': ch = '\b'; break; - case 'f': ch = '\f'; break; - case 'n': ch = '\n'; break; - case 'r': ch = '\r'; break; - case 't': ch = '\t'; break; - case 'v': ch = '\v'; break; - default: - if (isdigit(self->current)) - { - /* Read octal number */ - if (!TrioReadNumber(self, &number, 0, 3, BASE_OCTAL)) - return 0; - ch = (char)number; - } - else if (toupper(self->current) == 'X') - { - /* Read hexadecimal number */ - self->InStream(self, NULL); - if (!TrioReadNumber(self, &number, 0, 2, BASE_HEX)) - return 0; - ch = (char)number; - } - else - { - ch = (char)self->current; - } - break; - } - } - - if (target) - target[i] = ch; - } - return i + 1; -} - -/************************************************************************* - * TrioReadString [private] - */ -static BOOLEAN_T -TrioReadString(trio_T *self, - char *target, - unsigned long flags, - int width) -{ - int i; - - assert(VALID(self)); - assert(VALID(self->InStream)); - - TrioSkipWhitespaces(self); - - /* - * Continue until end of string is reached, a whitespace is encountered, - * or width is exceeded - */ - for (i = 0; - ((width == NO_WIDTH) || (i < width)) && - (! ((self->current == EOF) || isspace(self->current))); - i++) - { - if (TrioReadChar(self, &target[i], flags, 1) == 0) - break; /* for */ - } - if (target) - target[i] = NIL; - return TRUE; -} - -/************************************************************************* - * TrioReadWideChar [private] - */ -#if TRIO_WIDECHAR -static int -TrioReadWideChar(trio_T *self, - wchar_t *target, - unsigned long flags, - int width) -{ - int i; - int j; - int size; - int amount = 0; - wchar_t wch; - char buffer[MB_LEN_MAX + 1]; - - assert(VALID(self)); - assert(VALID(self->InStream)); - - for (i = 0; - (self->current != EOF) && (i < width); - i++) - { - if (isascii(self->current)) - { - if (TrioReadChar(self, buffer, flags, 1) == 0) - return 0; - buffer[1] = NIL; - } - else - { - /* - * Collect a multibyte character, by enlarging buffer until - * it contains a fully legal multibyte character, or the - * buffer is full. - */ - j = 0; - do - { - buffer[j++] = (char)self->current; - buffer[j] = NIL; - self->InStream(self, NULL); - } - while ((j < (int)sizeof(buffer)) && (mblen(buffer, (size_t)j) != j)); - } - if (target) - { - size = mbtowc(&wch, buffer, sizeof(buffer)); - if (size > 0) - target[i] = wch; - } - amount += size; - self->InStream(self, NULL); - } - return amount; -} -#endif /* TRIO_WIDECHAR */ - -/************************************************************************* - * TrioReadWideString [private] - */ -#if TRIO_WIDECHAR -static BOOLEAN_T -TrioReadWideString(trio_T *self, - wchar_t *target, - unsigned long flags, - int width) -{ - int i; - int size; - - assert(VALID(self)); - assert(VALID(self->InStream)); - - TrioSkipWhitespaces(self); - -#if defined(TRIO_COMPILER_SUPPORTS_MULTIBYTE) - mblen(NULL, 0); -#endif - - /* - * Continue until end of string is reached, a whitespace is encountered, - * or width is exceeded - */ - for (i = 0; - ((width == NO_WIDTH) || (i < width)) && - (! ((self->current == EOF) || isspace(self->current))); - ) - { - size = TrioReadWideChar(self, &target[i], flags, 1); - if (size == 0) - break; /* for */ - - i += size; - } - if (target) - target[i] = L'\0'; - return TRUE; -} -#endif /* TRIO_WIDECHAR */ - -/************************************************************************* - * TrioReadGroup [private] - * - * FIXME: characterclass does not work with multibyte characters - */ -static BOOLEAN_T -TrioReadGroup(trio_T *self, - char *target, - int *characterclass, - unsigned long flags, - int width) -{ - int ch; - int i; - - assert(VALID(self)); - assert(VALID(self->InStream)); - - ch = self->current; - for (i = 0; - ((width == NO_WIDTH) || (i < width)) && - (! ((ch == EOF) || - (((flags & FLAGS_EXCLUDE) != 0) ^ (characterclass[ch] == 0)))); - i++) - { - if (target) - target[i] = (char)ch; - self->InStream(self, &ch); - } - - if (target) - target[i] = NIL; - return TRUE; -} - -/************************************************************************* - * TrioReadDouble [private] - * - * FIXME: - * add long double - */ -static BOOLEAN_T -TrioReadDouble(trio_T *self, - double *target, - unsigned long flags, - int width) -{ - int ch; - char doubleString[512] = ""; - int index = 0; - int start; - int j; - BOOLEAN_T isHex = FALSE; - - if ((width == NO_WIDTH) || (width > (int)sizeof(doubleString) - 1)) - width = sizeof(doubleString) - 1; - - TrioSkipWhitespaces(self); - - /* - * Read entire double number from stream. StrToDouble requires a - * string as input, but InStream can be anything, so we have to - * collect all characters. - */ - ch = self->current; - if ((ch == '+') || (ch == '-')) - { - doubleString[index++] = (char)ch; - self->InStream(self, &ch); - width--; - } - - start = index; - switch (ch) - { - case 'n': - case 'N': - /* Not-a-number */ - if (index != 0) - break; - /* FALLTHROUGH */ - case 'i': - case 'I': - /* Infinity */ - while (isalpha(ch) && (index - start < width)) - { - doubleString[index++] = (char)ch; - self->InStream(self, &ch); - } - doubleString[index] = NIL; - - /* Case insensitive string comparison */ - if (StrEqual(&doubleString[start], INFINITE_UPPER) || - StrEqual(&doubleString[start], LONG_INFINITE_UPPER)) - { - *target = ((start == 1 && doubleString[0] == '-')) - ? -HUGE_VAL - : HUGE_VAL; - return TRUE; - } - if (StrEqual(doubleString, NAN_LOWER)) - { - /* NaN must not have a preceeding + nor - */ - *target = TrioGenerateNaN(); - return TRUE; - } - return FALSE; - - default: - break; - } - - if (ch == '0') - { - doubleString[index++] = (char)ch; - self->InStream(self, &ch); - if (toupper(ch) == 'X') - { - isHex = TRUE; - doubleString[index++] = (char)ch; - self->InStream(self, &ch); - } - } - while ((ch != EOF) && (index - start < width)) - { - /* Integer part */ - if (isHex ? isxdigit(ch) : isdigit(ch)) - { - doubleString[index++] = (char)ch; - self->InStream(self, &ch); - } - else if (flags & FLAGS_QUOTE) - { - /* Compare with thousands separator */ - for (j = 0; internalThousandSeparator[j] && self->current; j++) - { - if (internalThousandSeparator[j] != self->current) - break; - - self->InStream(self, &ch); - } - if (internalThousandSeparator[j]) - break; /* Mismatch */ - else - continue; /* Match */ - } - else - break; /* while */ - } - if (ch == '.') - { - /* Decimal part */ - doubleString[index++] = (char)ch; - self->InStream(self, &ch); - while ((isHex ? isxdigit(ch) : isdigit(ch)) && - (index - start < width)) - { - doubleString[index++] = (char)ch; - self->InStream(self, &ch); - } - if (isHex ? (toupper(ch) == 'P') : (toupper(ch) == 'E')) - { - /* Exponent */ - doubleString[index++] = (char)ch; - self->InStream(self, &ch); - if ((ch == '+') || (ch == '-')) - { - doubleString[index++] = (char)ch; - self->InStream(self, &ch); - } - while ((isHex ? isxdigit(ch) : isdigit(ch)) && - (index - start < width)) - { - doubleString[index++] = (char)ch; - self->InStream(self, &ch); - } - } - } - - if ((index == start) || (*doubleString == NIL)) - return FALSE; - - if (flags & FLAGS_LONGDOUBLE) -/* *longdoublePointer = StrToLongDouble()*/ - return FALSE; /* FIXME: Remove when long double is implemented */ - else - { - *target = StrToDouble(doubleString, NULL); - } - return TRUE; -} - -/************************************************************************* - * TrioReadPointer [private] - */ -static BOOLEAN_T -TrioReadPointer(trio_T *self, - void **target, - unsigned long flags) -{ - trio_uintmax_t number; - char buffer[sizeof(null)]; - - flags |= (FLAGS_UNSIGNED | FLAGS_ALTERNATIVE | FLAGS_NILPADDING); - - if (TrioReadNumber(self, - &number, - flags, - POINTER_WIDTH, - BASE_HEX)) - { - /* - * The strange assignment of number is a workaround for a compiler - * warning - */ - if (target) - *target = (char *)0 + number; - return TRUE; - } - else if (TrioReadString(self, - (flags & FLAGS_IGNORE) - ? NULL - : buffer, - 0, - sizeof(null) - 1)) - { - if (StrEqualCase(buffer, null)) - { - if (target) - *target = NULL; - return TRUE; - } - } - return FALSE; -} - -/************************************************************************* - * TrioScan [private] - */ -static int -TrioScan(const void *source, - size_t sourceSize, - void (*InStream)(trio_T *, int *), - const char *format, - va_list arglist, - void **argarray) -{ -#if defined(TRIO_COMPILER_SUPPORTS_MULTIBYTE) - int charlen; -#endif - int status; - int assignment; - parameter_T parameters[MAX_PARAMETERS]; - trio_T internalData; - trio_T *data; - int ch; -#if defined(TRIO_COMPILER_SUPPORTS_MULTIBYTE) - int cnt; -#endif - int index; /* Index of format string */ - int i; /* Index of current parameter */ - unsigned long flags; - int width; - int base; - void *pointer; - - assert(VALID(InStream)); - assert(VALID(format)); - - memset(&internalData, 0, sizeof(internalData)); - data = &internalData; - data->InStream = InStream; - data->location = (void *)source; - data->max = sourceSize; - -#if defined(USE_LOCALE) - if (NULL == internalLocaleValues) - { - TrioSetLocale(); - } -#endif - - status = TrioPreprocess(TYPE_SCAN, format, parameters, arglist, argarray); - if (status < 0) - return status; - - assignment = 0; - i = 0; - index = 0; - data->InStream(data, &ch); - -#if defined(TRIO_COMPILER_SUPPORTS_MULTIBYTE) - mblen(NULL, 0); -#endif - - while (format[index]) - { -#if defined(TRIO_COMPILER_SUPPORTS_MULTIBYTE) - if (! isascii(format[index])) - { - charlen = mblen(&format[index], MB_LEN_MAX); - /* Compare multibyte characters in format string */ - for (cnt = 0; cnt < charlen - 1; cnt++) - { - if (ch != format[index + cnt]) - { - return TRIO_ERROR_RETURN(TRIO_EINVAL, index); - } - data->InStream(data, &ch); - } - continue; /* while */ - } -#endif /* TRIO_COMPILER_SUPPORTS_MULTIBYTE */ - if (EOF == ch) - return EOF; - - if (CHAR_IDENTIFIER == format[index]) - { - if (CHAR_IDENTIFIER == format[index + 1]) - { - /* Two % in format matches one % in input stream */ - if (CHAR_IDENTIFIER == ch) - { - data->InStream(data, &ch); - index += 2; - continue; /* while format chars left */ - } - else - return TRIO_ERROR_RETURN(TRIO_EINVAL, index); - } - - /* Skip the parameter entries */ - while (parameters[i].type == FORMAT_PARAMETER) - i++; - - flags = parameters[i].flags; - /* Find width */ - width = parameters[i].width; - if (flags & FLAGS_WIDTH_PARAMETER) - { - /* Get width from parameter list */ - width = (int)parameters[width].data.number.as_signed; - } - /* Find base */ - base = parameters[i].base; - if (flags & FLAGS_BASE_PARAMETER) - { - /* Get base from parameter list */ - base = (int)parameters[base].data.number.as_signed; - } - - switch (parameters[i].type) - { - case FORMAT_INT: - { - trio_uintmax_t number; - - if (0 == base) - base = BASE_DECIMAL; - - if (!TrioReadNumber(data, - &number, - flags, - width, - base)) - return assignment; - assignment++; - - if (!(flags & FLAGS_IGNORE)) - { - pointer = parameters[i].data.pointer; -#if defined(QUALIFIER_SIZE_T) || defined(QUALIFIER_SIZE_T_UPPER) - if (flags & FLAGS_SIZE_T) - *(size_t *)pointer = (size_t)number; - else -#endif -#if defined(QUALIFIER_PTRDIFF_T) - if (flags & FLAGS_PTRDIFF_T) - *(ptrdiff_t *)pointer = (ptrdiff_t)number; - else -#endif -#if defined(QUALIFIER_INTMAX_T) - if (flags & FLAGS_INTMAX_T) - *(trio_intmax_t *)pointer = (trio_intmax_t)number; - else -#endif - if (flags & FLAGS_QUAD) - *(trio_ulonglong_t *)pointer = (trio_ulonglong_t)number; - else if (flags & FLAGS_LONG) - *(long int *)pointer = (long int)number; - else if (flags & FLAGS_SHORT) - *(short int *)pointer = (short int)number; - else - *(int *)pointer = (int)number; - } - } - break; /* FORMAT_INT */ - - case FORMAT_STRING: -#if TRIO_WIDECHAR - if (flags & FLAGS_WIDECHAR) - { - if (!TrioReadWideString(data, - (flags & FLAGS_IGNORE) - ? NULL - : parameters[i].data.wstring, - flags, - width)) - return assignment; - } - else -#endif - { - if (!TrioReadString(data, - (flags & FLAGS_IGNORE) - ? NULL - : parameters[i].data.string, - flags, - width)) - return assignment; - } - assignment++; - break; /* FORMAT_STRING */ - - case FORMAT_DOUBLE: - if (!TrioReadDouble(data, - (flags & FLAGS_IGNORE) - ? NULL - : parameters[i].data.doublePointer, - flags, - width)) - return assignment; - assignment++; - break; /* FORMAT_DOUBLE */ - - case FORMAT_GROUP: - { - int characterclass[MAX_CHARACTER_CLASS + 1]; - int rc; - - /* Skip over modifiers */ - while (format[index] != SPECIFIER_GROUP) - { - index++; - } - /* Skip over group specifier */ - index++; - - memset(characterclass, 0, sizeof(characterclass)); - rc = TrioGetCharacterClass(format, - &index, - &flags, - characterclass); - if (rc < 0) - return rc; - - if (!TrioReadGroup(data, - (flags & FLAGS_IGNORE) - ? NULL - : parameters[i].data.string, - characterclass, - flags, - parameters[i].width)) - return assignment; - assignment++; - } - break; /* FORMAT_GROUP */ - - case FORMAT_COUNT: - pointer = parameters[i].data.pointer; - if (NULL != pointer) - { -#if defined(QUALIFIER_SIZE_T) || defined(QUALIFIER_SIZE_T_UPPER) - if (flags & FLAGS_SIZE_T) - *(size_t *)pointer = (size_t)data->committed; - else -#endif -#if defined(QUALIFIER_PTRDIFF_T) - if (flags & FLAGS_PTRDIFF_T) - *(ptrdiff_t *)pointer = (ptrdiff_t)data->committed; - else -#endif -#if defined(QUALIFIER_INTMAX_T) - if (flags & FLAGS_INTMAX_T) - *(trio_intmax_t *)pointer = (trio_intmax_t)data->committed; - else -#endif - if (flags & FLAGS_QUAD) - { - *(trio_ulonglong_t *)pointer = (trio_ulonglong_t)data->committed; - } - else if (flags & FLAGS_LONG) - { - *(long int *)pointer = (long int)data->committed; - } - else if (flags & FLAGS_SHORT) - { - *(short int *)pointer = (short int)data->committed; - } - else - { - *(int *)pointer = (int)data->committed; - } - } - break; /* FORMAT_COUNT */ - - case FORMAT_CHAR: -#if TRIO_WIDECHAR - if (flags & FLAGS_WIDECHAR) - { - if (TrioReadWideChar(data, - (flags & FLAGS_IGNORE) - ? NULL - : parameters[i].data.wstring, - flags, - (width == NO_WIDTH) ? 1 : width) > 0) - return assignment; - } - else -#endif - { - if (TrioReadChar(data, - (flags & FLAGS_IGNORE) - ? NULL - : parameters[i].data.string, - flags, - (width == NO_WIDTH) ? 1 : width) > 0) - return assignment; - } - assignment++; - break; /* FORMAT_CHAR */ - - case FORMAT_POINTER: - if (!TrioReadPointer(data, - (flags & FLAGS_IGNORE) - ? NULL - : (void **)parameters[i].data.pointer, - flags)) - return assignment; - assignment++; - break; /* FORMAT_POINTER */ - - case FORMAT_PARAMETER: - break; /* FORMAT_PARAMETER */ - - default: - return TRIO_ERROR_RETURN(TRIO_EINVAL, index); - } - ch = data->current; - index = parameters[i].indexAfterSpecifier; - i++; - } - else /* Not an % identifier */ - { - if (isspace((int)format[index])) - { - /* Whitespaces may match any amount of whitespaces */ - ch = TrioSkipWhitespaces(data); - } - else if (ch == format[index]) - { - data->InStream(data, &ch); - } - else - return TRIO_ERROR_RETURN(TRIO_EINVAL, index); - - index++; - } - } - return assignment; -} - -/************************************************************************* - * TrioInStreamFile [private] - */ -static void -TrioInStreamFile(trio_T *self, - int *intPointer) -{ - FILE *file = (FILE *)self->location; - - assert(VALID(self)); - assert(VALID(file)); - - self->current = fgetc(file); - self->processed++; - self->committed++; - - if (VALID(intPointer)) - { - *intPointer = self->current; - } -} - -/************************************************************************* - * TrioInStreamFileDescriptor [private] - */ -static void -TrioInStreamFileDescriptor(trio_T *self, - int *intPointer) -{ - int fd = *((int *)self->location); - int size; - unsigned char input; - - assert(VALID(self)); - - size = read(fd, &input, sizeof(char)); - self->current = (size == 0) ? EOF : input; - self->processed++; - self->committed++; - - if (VALID(intPointer)) - { - *intPointer = self->current; - } -} - -/************************************************************************* - * TrioInStreamString [private] - */ -static void -TrioInStreamString(trio_T *self, - int *intPointer) -{ - unsigned char **buffer; - - assert(VALID(self)); - assert(VALID(self->InStream)); - assert(VALID(self->location)); - - buffer = (unsigned char **)self->location; - self->current = (*buffer)[0]; - if (self->current == NIL) - self->current = EOF; - (*buffer)++; - self->processed++; - self->committed++; - - if (VALID(intPointer)) - { - *intPointer = self->current; - } -} - -/************************************************************************* - * scanf - */ -int -trio_scanf(const char *format, - ...) -{ - int status; - va_list args; - - assert(VALID(format)); - - va_start(args, format); - status = TrioScan(stdin, 0, TrioInStreamFile, format, args, NULL); - va_end(args); - return status; -} - -int -trio_vscanf(const char *format, - va_list args) -{ - assert(VALID(format)); - - return TrioScan(stdin, 0, TrioInStreamFile, format, args, NULL); -} - -int -trio_scanfv(const char *format, - void **args) -{ - va_list dummy; - shutup_unitialized(&dummy); - - assert(VALID(format)); - - return TrioScan(stdin, 0, TrioInStreamFile, format, dummy, args); -} - -/************************************************************************* - * fscanf - */ -int -trio_fscanf(FILE *file, - const char *format, - ...) -{ - int status; - va_list args; - - assert(VALID(file)); - assert(VALID(format)); - - va_start(args, format); - status = TrioScan(file, 0, TrioInStreamFile, format, args, NULL); - va_end(args); - return status; -} - -int -trio_vfscanf(FILE *file, - const char *format, - va_list args) -{ - assert(VALID(file)); - assert(VALID(format)); - - return TrioScan(file, 0, TrioInStreamFile, format, args, NULL); -} - -int -trio_fscanfv(FILE *file, - const char *format, - void **args) -{ - va_list dummy; - shutup_unitialized(&dummy); - - assert(VALID(file)); - assert(VALID(format)); - - return TrioScan(file, 0, TrioInStreamFile, format, dummy, args); -} - -/************************************************************************* - * dscanf - */ -int -trio_dscanf(int fd, - const char *format, - ...) -{ - int status; - va_list args; - - assert(VALID(format)); - - va_start(args, format); - status = TrioScan(&fd, 0, TrioInStreamFileDescriptor, format, args, NULL); - va_end(args); - return status; -} - -int -trio_vdscanf(int fd, - const char *format, - va_list args) -{ - assert(VALID(format)); - - return TrioScan(&fd, 0, TrioInStreamFileDescriptor, format, args, NULL); -} - -int -trio_dscanfv(int fd, - const char *format, - void **args) -{ - va_list dummy; - shutup_unitialized(&dummy); - - assert(VALID(format)); - - return TrioScan(&fd, 0, TrioInStreamFileDescriptor, format, dummy, args); -} - -/************************************************************************* - * sscanf - */ -int -trio_sscanf(const char *buffer, - const char *format, - ...) -{ - int status; - va_list args; - - assert(VALID(buffer)); - assert(VALID(format)); - - va_start(args, format); - status = TrioScan(&buffer, 0, TrioInStreamString, format, args, NULL); - va_end(args); - return status; -} - -int -trio_vsscanf(const char *buffer, - const char *format, - va_list args) -{ - assert(VALID(buffer)); - assert(VALID(format)); - - return TrioScan(&buffer, 0, TrioInStreamString, format, args, NULL); -} - -int -trio_sscanfv(const char *buffer, - const char *format, - void **args) -{ - va_list dummy; - shutup_unitialized(&dummy); - - assert(VALID(buffer)); - assert(VALID(format)); - - return TrioScan(&buffer, 0, TrioInStreamString, format, dummy, args); -} - diff --git a/org.glite.jp.common/src/triop.h b/org.glite.jp.common/src/triop.h deleted file mode 100644 index ca49fab..0000000 --- a/org.glite.jp.common/src/triop.h +++ /dev/null @@ -1,138 +0,0 @@ -/************************************************************************* - * - * $Id$ - * - * Copyright (C) 2000 Bjorn Reese and Daniel Stenberg. - * - * Permission to use, copy, modify, and distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF - * MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE AUTHORS AND - * CONTRIBUTORS ACCEPT NO RESPONSIBILITY IN ANY CONCEIVABLE MANNER. - * - ************************************************************************ - * - * Private functions, types, etc. used for callback functions. - * - * The ref pointer is an opaque type and should remain as such. - * Private data must only be accessible through the getter and - * setter functions. - * - ************************************************************************/ - -#ifndef TRIO_TRIOP_H -#define TRIO_TRIOP_H - -#include - -#ifdef __cplusplus -extern "C" { -#endif - -#ifndef TRIO_C99 -# define TRIO_C99 1 -#endif -#ifndef TRIO_BSD -# define TRIO_BSD 1 -#endif -#ifndef TRIO_GNU -# define TRIO_GNU 1 -#endif -#ifndef TRIO_MISC -# define TRIO_MISC 1 -#endif -#ifndef TRIO_UNIX98 -# define TRIO_UNIX98 1 -#endif -#ifndef TRIO_MICROSOFT -# define TRIO_MICROSOFT 1 -#endif -#ifndef TRIO_EXTENSION -# define TRIO_EXTENSION 1 -#endif -#ifndef TRIO_WIDECHAR -# define TRIO_WIDECHAR 0 -#endif -#ifndef TRIO_ERRORS -# define TRIO_ERRORS 1 -#endif - -#ifndef TRIO_MALLOC -# define TRIO_MALLOC(n) malloc(n) -#endif -#ifndef TRIO_REALLOC -# define TRIO_REALLOC(x,n) realloc((x),(n)) -#endif -#ifndef TRIO_FREE -# define TRIO_FREE(x) free(x) -#endif - -typedef int (*trio_callback_t)(void *ref); - -void *trio_register(trio_callback_t callback, const char *name); -void trio_unregister(void *handle); - -const char *trio_get_format(void *ref); -void *trio_get_argument(void *ref); - -/* Modifiers */ -int trio_get_width(void *ref); -void trio_set_width(void *ref, int width); -int trio_get_precision(void *ref); -void trio_set_precision(void *ref, int precision); -int trio_get_base(void *ref); -void trio_set_base(void *ref, int base); -int trio_get_padding(void *ref); -void trio_set_padding(void *ref, int is_padding); -int trio_get_short(void *ref); /* h */ -void trio_set_shortshort(void *ref, int is_shortshort); -int trio_get_shortshort(void *ref); /* hh */ -void trio_set_short(void *ref, int is_short); -int trio_get_long(void *ref); /* l */ -void trio_set_long(void *ref, int is_long); -int trio_get_longlong(void *ref); /* ll */ -void trio_set_longlong(void *ref, int is_longlong); -int trio_get_longdouble(void *ref); /* L */ -void trio_set_longdouble(void *ref, int is_longdouble); -int trio_get_alternative(void *ref); /* # */ -void trio_set_alternative(void *ref, int is_alternative); -int trio_get_alignment(void *ref); /* - */ -void trio_set_alignment(void *ref, int is_leftaligned); -int trio_get_spacing(void *ref); /* (space) */ -void trio_set_spacing(void *ref, int is_space); -int trio_get_sign(void *ref); /* + */ -void trio_set_sign(void *ref, int is_showsign); -int trio_get_quote(void *ref); /* ' */ -void trio_set_quote(void *ref, int is_quote); -int trio_get_upper(void *ref); -void trio_set_upper(void *ref, int is_upper); -#if TRIO_C99 -int trio_get_largest(void *ref); /* j */ -void trio_set_largest(void *ref, int is_largest); -int trio_get_ptrdiff(void *ref); /* t */ -void trio_set_ptrdiff(void *ref, int is_ptrdiff); -int trio_get_size(void *ref); /* z / Z */ -void trio_set_size(void *ref, int is_size); -#endif - -/* Printing */ -int trio_print_ref(void *ref, const char *format, ...); -int trio_vprint_ref(void *ref, const char *format, va_list args); -int trio_printv_ref(void *ref, const char *format, void **args); - -void trio_print_int(void *ref, int number); -void trio_print_uint(void *ref, unsigned int number); -/* void trio_print_long(void *ref, long number); */ -/* void trio_print_ulong(void *ref, unsigned long number); */ -void trio_print_double(void *ref, double number); -void trio_print_string(void *ref, char *string); -void trio_print_pointer(void *ref, void *pointer); - -#ifdef __cplusplus -} /* extern "C" */ -#endif - -#endif /* TRIO_TRIOP_H */ diff --git a/org.glite.jp.common/test/base64_test.cpp b/org.glite.jp.common/test/base64_test.cpp deleted file mode 100644 index 55a41c1..0000000 --- a/org.glite.jp.common/test/base64_test.cpp +++ /dev/null @@ -1,75 +0,0 @@ -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include - -#include "strmd5.h" - -class Base64Test: public CppUnit::TestFixture -{ - CPPUNIT_TEST_SUITE(Base64Test); - CPPUNIT_TEST(test); - CPPUNIT_TEST_SUITE_END(); -public: - void test(); -}; - -void Base64Test::test() -{ - int i; - unsigned char in[2000], b[4000], out[2000]; - - srandom(0xDEAD); - in[0] = 'x'; - for (i=1; i<2000; i++) { - char s[20]; - int len; - sprintf(s,"%d",i); - in[i] = random() % 256; - - std::cerr << '.'; - - base64_encode(in,i,(char *) b,sizeof b); - len = base64_decode((const char *) b,(char *) out,sizeof out); - - CPPUNIT_ASSERT_MESSAGE(std::string("len"),i == len); - CPPUNIT_ASSERT_MESSAGE(std::string(s),!memcmp(in,out,i)); - } - std::cerr << std::endl; -} - -CPPUNIT_TEST_SUITE_REGISTRATION(Base64Test); - - -int main (int argc,const char *argv[]) -{ - CppUnit::Test *suite = CppUnit::TestFactoryRegistry::getRegistry().makeTest(); - - assert(argc == 2); - std::ofstream xml(argv[1]); - - CppUnit::TestResult controller; - CppUnit::TestResultCollector result; - controller.addListener( &result ); - - CppUnit::TestRunner runner; - runner.addTest(suite); - runner.run(controller); - - CppUnit::XmlOutputter xout( &result, xml ); - CppUnit::CompilerOutputter tout( &result, std::cout); - xout.write(); - tout.write(); - - return result.wasSuccessful() ? 0 : 1 ; -} - - - diff --git a/org.glite.jp.common/test/type_test.cpp b/org.glite.jp.common/test/type_test.cpp deleted file mode 100644 index 8669637..0000000 --- a/org.glite.jp.common/test/type_test.cpp +++ /dev/null @@ -1,184 +0,0 @@ -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include - -#include "types.h" -#include "attr.h" -#include "context.h" - - -class TypePluginTest: public CppUnit::TestFixture -{ - CPPUNIT_TEST_SUITE(TypePluginTest); - CPPUNIT_TEST(simple); - CPPUNIT_TEST(binary); - CPPUNIT_TEST(origin); - CPPUNIT_TEST(origin2); - CPPUNIT_TEST(index); - CPPUNIT_TEST_SUITE_END(); -public: - void simple(); - void binary(); - void origin(); - void origin2(); - void index(); -}; - -void TypePluginTest::simple() -{ - glite_jp_context_t ctx; - - glite_jp_attrval_t attr = { - "myattr", - "short string", - 0,0, - GLITE_JP_ATTR_ORIG_USER, - NULL, - 0 - },attr2; - - char *db; - - glite_jp_init_context(&ctx); - attr.timestamp = time(NULL); - - db = glite_jp_attrval_to_db_full(ctx,&attr); - - CPPUNIT_ASSERT_MESSAGE(std::string("glite_jp_attrval_to_db_full()"),db); - std::cerr << db << std::endl; - - glite_jp_attrval_from_db(ctx,db,&attr2); - CPPUNIT_ASSERT_MESSAGE(std::string("value"),!strcmp(attr.value,attr2.value)); - CPPUNIT_ASSERT_MESSAGE(std::string("origin"),attr.origin == attr2.origin); - CPPUNIT_ASSERT_MESSAGE(std::string("timestamp"),attr.timestamp == attr2.timestamp); -} - -void TypePluginTest::binary() -{ - glite_jp_context_t ctx; - - glite_jp_attrval_t attr = { - "myattr", - NULL, - 1,1000, - GLITE_JP_ATTR_ORIG_USER, - NULL, - 0 - },attr2; - - char *db; - - glite_jp_init_context(&ctx); - attr.timestamp = time(NULL); - attr.value = (char *) malloc(attr.size); - - db = glite_jp_attrval_to_db_full(ctx,&attr); - - CPPUNIT_ASSERT_MESSAGE(std::string("glite_jp_attrval_to_db_full()"),db); - std::cerr << db << std::endl; - - glite_jp_attrval_from_db(ctx,db,&attr2); - CPPUNIT_ASSERT_MESSAGE(std::string("size"),attr.size == attr2.size); - CPPUNIT_ASSERT_MESSAGE(std::string("value"),!memcmp(attr.value,attr2.value,attr.size)); -} - -void TypePluginTest::origin() -{ - glite_jp_context_t ctx; - - glite_jp_attrval_t attr = { - "myattr", - NULL, - 0,0, - GLITE_JP_ATTR_ORIG_USER, - NULL, - 0 - },attr2; - - char *db; - - glite_jp_init_context(&ctx); - attr.timestamp = time(NULL); - attr.value = "origin test"; - attr.origin_detail = "simple origin"; - - db = glite_jp_attrval_to_db_full(ctx,&attr); - - CPPUNIT_ASSERT_MESSAGE(std::string("glite_jp_attrval_to_db_full()"),db); - std::cerr << db << std::endl; - - glite_jp_attrval_from_db(ctx,db,&attr2); - CPPUNIT_ASSERT_MESSAGE(std::string("origin detail"),!strcmp(attr.origin_detail,attr2.origin_detail)); -} - -void TypePluginTest::origin2() -{ - glite_jp_context_t ctx; - - glite_jp_attrval_t attr = { - "myattr", - NULL, - 0,0, - GLITE_JP_ATTR_ORIG_USER, - NULL, - 0 - },attr2; - - char *db; - - glite_jp_init_context(&ctx); - attr.timestamp = time(NULL); - attr.value = "origin:test"; - attr.origin_detail = "ftp://some.server:1234/ugly \\file"; - - db = glite_jp_attrval_to_db_full(ctx,&attr); - - CPPUNIT_ASSERT_MESSAGE(std::string("glite_jp_attrval_to_db_full()"),db); - std::cerr << db << std::endl; - - glite_jp_attrval_from_db(ctx,db,&attr2); - CPPUNIT_ASSERT_MESSAGE(std::string("origin detail"),!strcmp(attr.origin_detail,attr2.origin_detail)); - CPPUNIT_ASSERT_MESSAGE(std::string("value"),!strcmp(attr.value,attr2.value)); -} - -void TypePluginTest::index() -{ - /* TODO: check monotonity */ -} - -CPPUNIT_TEST_SUITE_REGISTRATION(TypePluginTest); - - -int main (int argc,const char *argv[]) -{ - CppUnit::Test *suite = CppUnit::TestFactoryRegistry::getRegistry().makeTest(); - - assert(argc == 2); - std::ofstream xml(argv[1]); - - CppUnit::TestResult controller; - CppUnit::TestResultCollector result; - controller.addListener( &result ); - - CppUnit::TestRunner runner; - runner.addTest(suite); - runner.run(controller); - - CppUnit::XmlOutputter xout( &result, xml ); - CppUnit::CompilerOutputter tout( &result, std::cout); - xout.write(); - tout.write(); - - return result.wasSuccessful() ? 0 : 1 ; -} - - - diff --git a/org.glite.jp.index/.cvsignore b/org.glite.jp.index/.cvsignore deleted file mode 100644 index 3a4edf6..0000000 --- a/org.glite.jp.index/.cvsignore +++ /dev/null @@ -1 +0,0 @@ -.project diff --git a/org.glite.jp.index/Makefile b/org.glite.jp.index/Makefile deleted file mode 100644 index 940ddf1..0000000 --- a/org.glite.jp.index/Makefile +++ /dev/null @@ -1,185 +0,0 @@ -# defaults -top_srcdir=. -builddir=build -top_builddir=${top_srcdir}/${builddir} -stagedir=. -distdir=. -globalprefix=glite -lbprefix=lb -package=glite-lb-server -version=0.0.0 -PREFIX=/opt/glite - -glite_location=/opt/glite -globus_prefix=/opt/globus -nothrflavour=gcc32 -thrflavour=gcc32pthr -expat_prefix=/opt/expat -gsoap_prefix=/software/gsoap-2.6 - -CC=gcc - --include Makefile.inc - - -VPATH=${top_srcdir}/src:${top_srcdir}/examples:${top_srcdir}/project:${top_srcdir}/doc:${jpproject}:${stagedir}/interface - -GLOBUS_LIBS:=-L${globus_prefix}/lib \ - -lglobus_common_${nothrflavour} \ - -lglobus_gssapi_gsi_${nothrflavour} - -GLOBUS_CFLAGS:=-I${globus_prefix}/include/${nothrflavour} - -DEBUG:=-W -Wall -g -O0 -CPPFLAGS:=-DDEBUG -D_GNU_SOURCE -I. -I${top_srcdir}/interface -I${top_srcdir}/src -I${gsoap_prefix}/include -I${gsoap_prefix} -I${stagedir}/include ${GLOBUS_CFLAGS} -I${gsoap_prefix}/include -CFLAGS:=${DEBUG} ${CFLAGS} -LDFLAGS:=-L${stagedir}/lib - -dotless_soap_ver:=${shell echo ${gsoap_version} | tr -d . } -GSOAPLIB:=-L${stagedir}/lib -lglite_security_gsoap_plugin_${dotless_soap_ver}_${nothrflavour} - -gsoap_bin_prefix:=${shell if [ -x ${gsoap_prefix}/bin/soapcpp2 ]; then echo ${gsoap_prefix}/bin; else echo ${gsoap_prefix}; fi } - - -LINK:=libtool --mode=link ${CC} ${LDFLAGS} -LINKXX:=libtool --mode=link ${CXX} ${LDFLAGS} -INSTALL:=libtool --mode=install install - - -daemon:=glite-jp-indexd -examples:=glite-jpis-test glite-jpis-client -test:=run-test.sh -test_files:=dump1.sql simple_query.in simple_query.out complex_query.in complex_query.out authz.out jobid_query.in jobid_query.out origin_query.in origin_query.out exists_query.in exists_query.out within_query.in within_query.out - -MANS1:=glite-jpis-client.1 -MANS8:=glite-jp-indexd.8 -MANS:=${MANS1} ${MANS8} -HTMLS:=glite-jpis-client.html glite-jp-indexd.html -ws_prefix:=jp_ -is_prefix:=${ws_prefix} -ps_prefix:=${ws_prefix} - -SRCS:= conf.c bones_server.c soap_ops.c soap_ps_calls.c common.c \ - ${is_prefix}Server.c ${ps_prefix}Client.c ${ws_prefix}C.c \ - ws_ps_typeref.c ws_is_typeref.c db_ops.c context.c common_server.c - -EXA_TEST_SRCS:=jpis-test.c ${is_prefix}Client.c ${is_prefix}C.c context.c db_ops.c conf.c ws_is_typeref.c -EXA_DB_SRCS:=jpis-db-internal.c db_ops.c conf.c context.c ws_is_typeref.c -EXA_CLIENT_SRCS:=jpis-client.c ${is_prefix}Client.c ${is_prefix}C.c common.c - -OBJS:=${SRCS:.c=.o} -EXA_TEST_OBJS:=${EXA_TEST_SRCS:.c=.o} -EXA_DB_OBJS:=${EXA_DB_SRCS:.c=.o} -EXA_CLIENT_OBJS:=${EXA_CLIENT_SRCS:.c=.o} - - -COMMONLIB:=-lglite_jp_common_${nothrflavour} -SRVCOMMONLIB:=-lglite_jp_server_common -BONESLIB:=-lglite_lb_server_bones -TRIOLIB:=-lglite_jp_trio - -default all: compile doc - -compile: ${daemon} ${examples} - -${daemon}: ${OBJS} - ${LINK} -o $@ -export-dynamic ${OBJS} ${BONESLIB} ${TRIOLIB} ${COMMONLIB} ${GSOAPLIB} ${SRVCOMMONLIB} - -glite-jpis-test: ${EXA_TEST_OBJS} - ${LINK} -o $@ $+ ${GSOAPLIB} ${COMMONLIB} ${TRIOLIB} ${SRVCOMMONLIB} - -jpis-db-internal: ${EXA_DB_OBJS} - ${LINK} -o $@ $+ ${COMMONLIB} ${SRVCOMMONLIB} - -glite-jpis-client: ${EXA_CLIENT_OBJS} - ${LINK} -o $@ $+ ${GSOAPLIB} ${COMMONLIB} ${TRIOLIB} - -${ws_prefix}Client.c ${ws_prefix}Server.c \ -${ws_prefix}C.c ${ws_prefix}H.h ${ws_prefix}Stub.h: JobProvenance.xh - ${gsoap_bin_prefix}/soapcpp2 -n -w -c -p ${ws_prefix} $< - -JobProvenance.xh: jpdev.wsdl - cp ${stagedir}/interface/JobProvenanceTypes.wsdl . - ${gsoap_bin_prefix}/wsdl2h -t ${top_srcdir}/src/typemap.dat -c -o $@ $< - rm -f JobProvenanceTypes.wsdl - -check: - # ../test/run-test.sh - -doc: ${MANS} ${HTMLS} - -stage: compile doc - ${MAKE} PREFIX=${stagedir} DOSTAGE=yes install - -dist: distsrc distbin - -distsrc: - mkdir -p ${top_srcdir}/${package}-${version} - cd ${top_srcdir} && GLOBIGNORE="${package}-${version}" && cp -Rf * ${package}-${version} - cd ${top_srcdir} && tar -czf ${distdir}/${package}-${version}_src.tar.gz --exclude-from=project/tar_exclude ${package}-${version} - rm -rf ${top_srcdir}/${package}-${version} - -distbin: - $(MAKE) install PREFIX=`pwd`/tmpbuilddir${stagedir} - save_dir=`pwd`; cd tmpbuilddir${stagedir} && tar -czf $$save_dir/${top_srcdir}/${distdir}/${package}-${version}_bin.tar.gz *; cd $$save_dir - rm -rf tmpbuilddir - -install: - -mkdir -p ${PREFIX}/bin ${PREFIX}/etc ${PREFIX}/etc/init.d - -mkdir -p ${PREFIX}/share/doc/${package}-${version} - -mkdir -p ${PREFIX}/examples ${PREFIX}/examples/query-tests - -mkdir -p ${PREFIX}/interface - -mkdir -p ${PREFIX}/share/man/man1 - -mkdir -p ${PREFIX}/share/man/man8 - ${INSTALL} -m 755 ${daemon} ${PREFIX}/bin - ${INSTALL} -m 755 ${examples} ${PREFIX}/examples - ${INSTALL} -m 755 ${top_srcdir}/config/startup ${PREFIX}/etc/init.d/glite-jp-indexd - ${INSTALL} -m 755 ${top_srcdir}/config/glite-jp-index-dbsetup.sql ${PREFIX}/etc - ${INSTALL} -m 755 ${top_srcdir}/config/glite-jpis-config.xml ${PREFIX}/etc - ${INSTALL} -m 755 ${top_srcdir}/config/glite-jpis-test-config.xml ${PREFIX}/etc - ${INSTALL} -m 644 ${top_srcdir}/doc/README ${HTMLS} ${PREFIX}/share/doc/${package}-${version} - ${INSTALL} -m 644 ${MANS1} ${PREFIX}/share/man/man1 - ${INSTALL} -m 644 ${MANS8} ${PREFIX}/share/man/man8 - ${INSTALL} -m 755 ../examples/query-tests/${test} ${PREFIX}/examples/query-tests - for i in ${test_files}; do \ - ${INSTALL} -m 644 ../examples/query-tests/$$i ${PREFIX}/examples/query-tests; \ - done - ${INSTALL} -m 644 ${top_srcdir}/interface/JobProvenanceISClient.xsd ${PREFIX}/interface - -clean: - -soap_ops.o bones_server.o simple_server.o: ${is_prefix}H.h ${ps_prefix}H.h - -soap_ops.o bones_server.o: soap_version.h - -soap_version.h: - ${gsoap_bin_prefix}/soapcpp2 /dev/null - perl -ne '$$. == 2 && /.*([0-9])\.([0-9])\.([0-9]).*/ && printf "#define GSOAP_VERSION %d%02d%02d\n",$$1,$$2,$$3' soapH.h >$@ - -rm soapC.cpp soapH.h soapStub.h soapClient.cpp soapServer.cpp soapClientLib.cpp soapServerLib.cpp - -db_ops.h: context.h -context.h: conf.h -db_ops.o: db_ops.c conf.h context.h db_ops.h -context.o: context.c conf.h context.h -soap_ps_calls.o: soap_ps_calls.c ${ps_prefix}H.h ${ps_prefix}.nsmap soap_version.h conf.h db_ops.h ws_ps_typeref.h context.h -soap_ops.o: soap_ops.c jp_H.h ${is_prefix}.nsmap soap_version.h db_ops.h ws_ps_typeref.h ws_is_typeref.h context.h -ws_ps_typeref.o: ws_ps_typeref.c ${ps_prefix}H.h ws_typemap.h ws_ps_typeref.h soap_version.h -ws_is_typeref.o: ws_is_typeref.c ${is_prefix}H.h ws_typemap.h ws_is_typeref.h soap_version.h -comon_server.o: common_server.c common_server.h -jpis-client.o: jpis-client.c ${is_prefix}H.h soap_version.h -jpis-test.o: jpis-client.c ${is_prefix}H.h soap_version.h -conf.o: conf.c ${is_prefix}H.h soap_version.h - -${ws_prefix}C.o: ${ws_prefix}C.c - $(CC) -c $(CPPFLAGS) $(CFLAGS) -Wno-unused-parameter $< - -%.1: %.sgml - docbook2man $< - -%.8: %.sgml - docbook2man $< - -%.html: %.sgml - docbook2html $< --nochunks - -.PHONY: default all compile check doc stage dist distsrc distbin install clean diff --git a/org.glite.jp.index/build.xml b/org.glite.jp.index/build.xml deleted file mode 100755 index 3a97943..0000000 --- a/org.glite.jp.index/build.xml +++ /dev/null @@ -1,98 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/org.glite.jp.index/config/dbsetup.sh b/org.glite.jp.index/config/dbsetup.sh deleted file mode 100755 index e860b31..0000000 --- a/org.glite.jp.index/config/dbsetup.sh +++ /dev/null @@ -1,14 +0,0 @@ -#! /bin/sh - -# -# Shell example of preparing the database for JP Index Server -# - -# database -mysqladmin -u root -p create jpis - -# user -mysql -u root -p -e 'GRANT ALL on jpis.* to jpis@localhost' - -# tables -mysql -u jpis jpis < `dirname $0`/glite-jp-index-dbsetup.sql diff --git a/org.glite.jp.index/config/glite-jp-index-dbsetup.sql b/org.glite.jp.index/config/glite-jp-index-dbsetup.sql deleted file mode 100644 index 485c04f..0000000 --- a/org.glite.jp.index/config/glite-jp-index-dbsetup.sql +++ /dev/null @@ -1,69 +0,0 @@ -create table jobs ( - jobid char(32) binary not null, - dg_jobid varchar(255) binary not null, - ownerid char(32) binary not null, - aclid char(32) binary null, - ps varchar(255) not null, - - primary key (jobid), - unique (dg_jobid), - index (jobid), - index (dg_jobid) -); - -create table attrs ( - attrid char(32) binary not null, - name varchar(255) binary not null, - indexed int not null, - type char(32) binary null, - - primary key (attrid), - index (attrid), - index (name) -); - -create table feeds ( - uniqueid int auto_increment not null, - feedid char(32) binary unique, - state int not null, - locked int not null, - source varchar(255) not null, - expires datetime, - condition mediumblob null, - - primary key (uniqueid), - index (uniqueid), - index (feedid), - index (state) -); - -create table acls ( - aclid char(32) binary not null, - value mediumblob not null, - refcnt int not null, - - primary key (aclid) -); - -create table users ( - userid char(32) binary not null, - cert_subj varchar(255) binary not null, - - primary key (userid), - unique (cert_subj) -); - - -# data tables - created one for each configured attribute, index on -# value is created only for attributes configured to be indexed -# -#create table attr_ ( -# jobid char(32) binary not null, -# value varchar(255) binary not null, -# full_value mediumblob not null, -# origin int not null, -# -# index (jobid), -# index (value) -#); - diff --git a/org.glite.jp.index/config/glite-jpis-config.xml b/org.glite.jp.index/config/glite-jpis-config.xml deleted file mode 100644 index 9a2bdea..0000000 --- a/org.glite.jp.index/config/glite-jpis-config.xml +++ /dev/null @@ -1,49 +0,0 @@ - - - - - http://egee.cesnet.cz/en/Schema/JP/System:owner - http://egee.cesnet.cz/en/Schema/JP/System:jobId - http://egee.cesnet.cz/en/Schema/JP/System:regtime - http://egee.cesnet.cz/en/Schema/LB/Attributes:user - http://egee.cesnet.cz/en/Schema/LB/Attributes:aTag - http://egee.cesnet.cz/en/Schema/LB/Attributes:eNodes - http://egee.cesnet.cz/en/Schema/LB/Attributes:RB - http://egee.cesnet.cz/en/Schema/LB/Attributes:CE - http://egee.cesnet.cz/en/Schema/LB/Attributes:UIHost - http://egee.cesnet.cz/en/Schema/LB/Attributes:CPUTime - http://egee.cesnet.cz/en/Schema/LB/Attributes:NProc - http://egee.cesnet.cz/en/Schema/LB/Attributes:finalStatus - http://egee.cesnet.cz/en/Schema/LB/Attributes:finalStatusDate - http://egee.cesnet.cz/en/Schema/LB/Attributes:retryCount - http://egee.cesnet.cz/en/Schema/LB/Attributes:jobType - http://egee.cesnet.cz/en/Schema/LB/Attributes:nsubjobs - http://egee.cesnet.cz/en/Schema/LB/Attributes:lastStatusHistory - http://egee.cesnet.cz/en/Schema/LB/Attributes:fullStatusHistory - - - - http://egee.cesnet.cz/en/Schema/JP/System:owner - http://egee.cesnet.cz/en/Schema/JP/System:jobId - http://egee.cesnet.cz/en/Schema/LB/Attributes:user - http://egee.cesnet.cz/en/Schema/LB/Attributes:CE - http://egee.cesnet.cz/en/Schema/LB/Attributes:finalStatus - - - - - - - https://localhost:8901 - - - http://egee.cesnet.cz/en/Schema/JP/System:owner - EQUAL - - /DC=cz/DC=cesnet-ca/O=Masaryk University/CN=Milos Mulac - - - 1 - 1 - - diff --git a/org.glite.jp.index/config/glite-jpis-test-config.xml b/org.glite.jp.index/config/glite-jpis-test-config.xml deleted file mode 100644 index b81b342..0000000 --- a/org.glite.jp.index/config/glite-jpis-test-config.xml +++ /dev/null @@ -1,34 +0,0 @@ - - - - - http://egee.cesnet.cz/en/Schema/JP/System:owner - http://egee.cesnet.cz/en/Schema/JP/System:jobId - http://egee.cesnet.cz/en/Schema/JP/System:regtime - http://egee.cesnet.cz/en/Schema/LB/Attributes:user - http://egee.cesnet.cz/en/Schema/LB/Attributes:aTag - http://egee.cesnet.cz/en/Schema/LB/Attributes:eNodes - http://egee.cesnet.cz/en/Schema/LB/Attributes:RB - http://egee.cesnet.cz/en/Schema/LB/Attributes:CE - http://egee.cesnet.cz/en/Schema/LB/Attributes:UIHost - http://egee.cesnet.cz/en/Schema/LB/Attributes:CPUTime - http://egee.cesnet.cz/en/Schema/LB/Attributes:NProc - http://egee.cesnet.cz/en/Schema/LB/Attributes:finalStatus - http://egee.cesnet.cz/en/Schema/LB/Attributes:finalStatusDate - http://egee.cesnet.cz/en/Schema/LB/Attributes:retryCount - http://egee.cesnet.cz/en/Schema/LB/Attributes:jobType - http://egee.cesnet.cz/en/Schema/LB/Attributes:nsubjobs - http://egee.cesnet.cz/en/Schema/LB/Attributes:lastStatusHistory - http://egee.cesnet.cz/en/Schema/LB/Attributes:fullStatusHistory - - - - http://egee.cesnet.cz/en/Schema/JP/System:owner - http://egee.cesnet.cz/en/Schema/JP/System:jobId - http://egee.cesnet.cz/en/Schema/LB/Attributes:user - http://egee.cesnet.cz/en/Schema/LB/Attributes:CE - http://egee.cesnet.cz/en/Schema/LB/Attributes:finalStatus - - - - diff --git a/org.glite.jp.index/config/startup b/org.glite.jp.index/config/startup deleted file mode 100755 index 4680b41..0000000 --- a/org.glite.jp.index/config/startup +++ /dev/null @@ -1,135 +0,0 @@ -#! /bin/sh - -# -# startup script for JP index server -# - -GLITE_LOCATION=${GLITE_LOCATION:-/opt/glite} -GLITE_LOCATION_VAR=${GLITE_LOCATION_VAR:-${GLITE_LOCATION}/var} - -[ -f /etc/glite.conf ] && . /etc/glite.conf -[ -f $GLITE_LOCATION/etc/glite-wms.conf ] && . $GLITE_LOCATION/etc/glite-wms.conf -[ -f $HOME/.glite.conf ] && . $HOME/.glite.conf - -[ -f $GLITE_LOCATION/etc/jpis.conf ] && . $GLITE_LOCATION/etc/jpis.conf -[ -f $GLITE_LOCATION_VAR/etc/jpis.conf ] && . $GLITE_LOCATION_VAR/etc/jpis.conf - -[ -n "$GLITE_JPIS_PIDFILE" ] || export GLITE_JPIS_PIDFILE=$GLITE_LOCATION_VAR/glite-jp-indexd.pid -[ -n "$GLITE_JPIS_LOGFILE" ] || export GLITE_JPIS_LOGFILE=$GLITE_LOCATION_VAR/glite-jp-indexd.log -pidfile="$GLITE_JPIS_PIDFILE" - -test -n "$GLITE_JPIS_CONFIG" || GLITE_JPIS_CONFIG="$GLITE_LOCATION/etc/glite-jpis-config.xml" -test -n "$GLITE_JPIS_PORT" || GLITE_JPIS_PORT=8902 -test -n "$GLITE_JPIS_DB" || GLITE_JPIS_DB=jpis/@localhost:jpis -test -n "$GLITE_JPIS_QT" || GLITE_JPIS_QT="both" -#GLITE_JPIS_AUTH can have '-n' value to force indexd not to check auth -#GLITE_JPIS_DEBUG can have '-d' value to force indexd not to deamonize - -unset creds port - -start() -{ - if test -z "$GLITE_USER" ;then - echo 'Error: GLITE_USER is not set' - echo FAILED - return 1 - fi - if test -z "$GLOBUS_LOCATION" ;then - echo 'Error: GLOBUS_LOCATION is not set' - echo FAILED - return 1 - fi - if [ -n "$GLITE_HOST_CERT" -a -n "$GLITE_HOST_KEY" ] ;then - creds="-c '$GLITE_HOST_CERT' -k '$GLITE_HOST_KEY'" - X509_USER_CERT="$GLITE_HOST_CERT" - X509_USER_KEY="$GLITE_HOST_KEY" - fi - if test -z "$creds"; then - if su - $GLITE_USER -c "test -r /etc/grid-security/hostkey.pem -a -r /etc/grid-security/hostcert.pem"; then - echo "$0: WARNING: /etc/grid-security/hostkey.pem readable by $GLITE_USER" - creds="-c /etc/grid-security/hostcert.pem -k /etc/grid-security/hostkey.pem" - X509_USER_CERT=/etc/grid-security/hostcert.pem - X509_USER_KEY=/etc/grid-security/hostkey.pem - fi - fi - - - [ -z "$creds" ] && echo $0: WARNING: No credentials specified. Using default lookup which is dangerous. >&2 - - if [ ! -d "`dirname $GLITE_JPIS_PIDFILE`" ] - then - echo "Directory `dirname $GLITE_JPIS_PIDFILE` does not exist!" - exit 1 - fi - if [ ! -d "`dirname $GLITE_JPIS_LOGFILE`" ] - then - echo "Directory `dirname $GLITE_JPIS_LOGFILE` does not exist!" - exit 1 - fi - - - echo -n Starting glite-jp-indexd ... - #su " $GLITE_LOCATION/bin/glite-jp-indexd \ - su - $GLITE_USER -c " $GLITE_LOCATION/bin/glite-jp-indexd \ - $GLITE_JPIS_DEBUG \ - -q $GLITE_JPIS_QT $creds $GLITE_JPIS_AUTH \ - -m $GLITE_JPIS_DB -p $GLITE_JPIS_PORT \ - -i $GLITE_JPIS_PIDFILE -o $GLITE_JPIS_LOGFILE \ - -x $GLITE_JPIS_CONFIG - " && echo " done" || echo " FAILED" -} - -stop() -{ - if [ -f $pidfile ]; then - pid=`cat $pidfile` - kill $pid - echo -n Stopping glite-jp-indexd \($pid\) ... - try=0 - while ps p $pid >/dev/null 2>&1; do - sleep 1; - try=`expr $try + 1` - if [ $try = 20 ]; then - echo " giving up after $try retries" - return 1 - fi - done - echo " done" - rm -f $pidfile - else - echo $pidfile does not exist - glite-jp-indexd not running? >&2 - return 1 - fi - - return 0 -} - -status() -{ -# if [ -f $pidfile ]; then -# pid=`cat $pidfile` -# if ps p $pid >/dev/null 2>&1; then -# echo glite-jp-indexd running as $pid -# return 0 -# fi -# fi - - retval=0 - if netstat -an --inet | grep "^tcp .* 0.0.0.0:${GLITE_JPIS_PORT} .*LISTEN" >/dev/null 2>&1 ;then - echo glite-jp-indexd running - else - echo glite-jp-indexd not running - retval=1 - fi - - return $retval -} - -case x$1 in - xstart) start;; - xstop) stop;; - xrestart) stop; start;; - xstatus) status;; - x*) echo usage: $0 start,stop,restart,status >&2 - exit 1;; -esac diff --git a/org.glite.jp.index/doc/README b/org.glite.jp.index/doc/README deleted file mode 100644 index 2261d3c..0000000 --- a/org.glite.jp.index/doc/README +++ /dev/null @@ -1,116 +0,0 @@ -Job provenance Index server README -================================== - -($Header$) - -Job provenance and its components ---------------------------------- - -This file contains basic administrator's documentation for Job -provenance (JP) Index server (IS). For Job provenance architecture and -functionality description please see: EGEE architecture document -DJRA1.4 - https://edms.cern.ch/document/594698/ chapter 8.4. -Job provenance interfaces are documented on http://egee.cesnet.cz/en/WSDL/ -page. - -Source code, executables, dependences -------------------------------------- - -JP-IS CVS module name is org.glite.jp.index. It depends on common JP libraries -(module org.glite.jp.common, org.glite.jp.server-common) and implements -interfaces defined in org.glite.jp.ws-interface. It is also based on -org.glite.lb.server-bones. - -JP-IS consist from one stand-alone daemon (glite-jp-indexd) which is -using MySQL database. Default db name is jpis, all access is granted to -user jpis. - -JP-IS interactions: - -- JP primary storage - feedings data from primary storage to the IS according - to particular IS instance administrator needs (expressed by IS configuration) - -- IS user query interface - implements IS service for end users - -- admin interface - intended for admin tools (management and - on-the-fly configuration changes) - - -Release notes -------------- - -- In this release configuration of JP-IS is rather limited. Parts of - configuration are hard-coded (src/conf.c) - -- Debug outputs are on and directed to /opt/glite/var/log/glite-jp-index.log - file. - -- No admin tools are implemented yet. - - -Installation ------------- - -- database setup - - The JP-IS server daemon assume prior creation of its database. Simple tool - for database creation is org.glite.jp.index/config/dbsetup.sh - -- customize startup script /etc/init.d/glite-jp-indexd (see below) - and set up service startup using this script - - -Configuration -------------- - -Currently, configuration is done by command line options, and -some hard-coded options. - - -The index server takes the following options: - -./glite-jp-indexd [option] - -d, --debug don't run as daemon, additional diagnostics - -q, --query-type hist/cont/both (default history) - -n, --noauth don't check user identity with result owner - -m, --mysql database connect string - -p, --port port to listen - -i, --pidfile file to store master pid - -o, --logfile file to store logs - -x, --config file with server configuration - -The config file parameter is required. There is the example configuration in -$GLITE_LOCATION/etc/glite-jpis-config.xml. - - -Starting the daemon -------------------- - -Preferred way of starting the daemon is using start-up script -(config/startup). It loads glite.conf file (personal version may be stored -in ~/.glite.conf) where many variables may be set to configure the daemon. -The script takes following variables: - -GLITE_JPIS_CONFIG - server config file specification - (default is $GLITE_LOCATION//etc/glite-jpis-config.xml) -GLITE_JPIS_DEBUG - setting to '-d' forces the daemon not to daemonize -GLITE_JPIS_QT - defines query type - 'hist' ... history query - 'cont' ... continuous query - 'both' ... combination of previous types -GLITE_JPIS_AUTH - setting to '-n' forces the daemon not to check - authorisation -GLITE_JPIS_PORT - used port (default 8902) -GLITE_JPIS_DB - database connection string - (default jpis/@localhost:jpis) -GLITE_JPIS_LOGFILE - log file - (default is $GLITE_LOCATION_VAR/log/glite-jp-indexd.log) -GLITE_JPIS_PIDFILE - pid file - (default is $GLITE_LOCATION_VAR/run/glite-jp-indexd.log) - - -Testing -------- - -For testing recipes of JP-IS please see appropriate chapter of JP test plan -document (org.glite.jp/doc/testplan.tex). diff --git a/org.glite.jp.index/doc/client_conf.xsd b/org.glite.jp.index/doc/client_conf.xsd deleted file mode 100644 index 4101567..0000000 --- a/org.glite.jp.index/doc/client_conf.xsd +++ /dev/null @@ -1,84 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/org.glite.jp.index/doc/glite-jp-indexd.sgml b/org.glite.jp.index/doc/glite-jp-indexd.sgml deleted file mode 100644 index a0713bd..0000000 --- a/org.glite.jp.index/doc/glite-jp-indexd.sgml +++ /dev/null @@ -1,278 +0,0 @@ - - - - - - glite-jp-indexd - 8 - EU EGEE Project - - - - glite-jp-indexd - daemon providing subset of data from Job Provenance - - - - - glite-jp-indexd - - - -h - --help - - - -d - - - -q - --query-type - - hist - cont - both - - - - -n - --no-auth - - - - -m - --mysql - USER/PASSWORD@HOST:DBNAME - - - -p - --port - PORT - - - -i - --pidfile - FILE.PID - - - -o - --logfile - FILE.LOG - - - -x - --config - CONFIG.XML - - - - - - DESCRIPTION - -glite-jp-index is stand-alone daemon which is using MySQL database. It provides subset of attributes and jobs from Job Provenance. - - - - - OPTIONS - - -With no options you get simple usage message as with . - - - - - | - -Don't run as daemon, additional diagnostics. - - - - - | - -Type of query: , or (default: ). - - - - hist - history query - - - cont - continuous query - - - both - combination of previous types - - - - - - - | - -Don't check user identity with result owner. - - - - - | - -Database connect string: USER/PASSWORD@HOST:DBNAME (default: ). - - - - - | - -Port to listen (default: ). - - - - - | - -File to store master pid (default: /var/run/glite-jp-indexd.pid or $HOME/glite-jp-indexd.pid). - - - - - | - -File to store logs (default: /var/run/glite-jp-indexd.log or $HOME/glite-jp-indexd.log). - - - - - | - -Configuration file containing information about feeds, primary storages, ... Structure is defined in server_conf.xsd. - - - - - -Other parameters will be configurable in close future. Its current hard-coded values are in org.glite.jp.index/src/conf.[ch]. - - - - - Starting the daemon - -Preferred way of starting the daemon is using start-up script (config/startup). It loads glite.conf file (personal version may be stored in ~/.glite.conf) where many variables may be set to configure the daemon. The script takes following variables: - - - - - GLITE_JPIS_CONFIG - -Specifying config file. Default is $GLITE_LOCATION/etc/glite-jpis-config.xml - - - - - GLITE_JPIS_DEBUG - -Setting to '-d' forces the daemon not to daemonize. - - - - - GLITE_JPIS_QT - -Defines query type (see parameter). - - - - - GLITE_JPIS_AUTH - -Setting to '-n' forces the daemon not to check authorisation. - - - - - GLITE_JPIS_PORT - -Used port (default is 8902). - - - - - GLITE_JPIS_DB - -Database connection string, see parameter. - - - - - GLITE_JPIS_LOGFILE - -Log file (default in startup script is $GLITE_LOCATION_VAR/log/glite-jp-indexd.log). - - - - - GLITE_JPIS_PIDFILE - -Pid file (default is in startup script is $GLITE_LOCATION_VAR/run/glite-jp-indexd.pid). - - - - - - - RETURN VALUE - - - 0 - Success start. - - - - 1 - -Error (database or network initialisation for example). - - - - - - - EXAMPLES - - - configure file for startup script - GLITE_LOCATION_VAR=/opt/glite/var -GLITE_JPIS_DB=jpis/@localhost:jpis -GLITE_JPIS_PORT=8902 -GLITE_JPIS_LOGFILE=$GLITE_LOCATION_VAR/run/glite-jp-indexd.log -GLITE_JPIS_PIDFILE=$GLITE_LOCATION_VAR/run/glite-jp-indexd.pid -GLITE_JPIS_DEBUG=0 -GLITE_JPIS_PS=JPPS:8901 -GLITE_JPIS_QT=cont - - - - - glite-jp-indexd -s JPPS:8901 -i $HOME/jpis.log -o $HOME/jpis.pid - -Manual run of the JP index server. Use local MySQL database, communicates with Job Provenance on JPPS:8901, listen on default port, store logs and pid to given files. - - - - - - - SEE ALSO - glite-jpis-client(1) - - - - AUTHOR - EU DataGrid Work Package 1, CESNET group. - - - diff --git a/org.glite.jp.index/doc/glite-jpis-client.sgml b/org.glite.jp.index/doc/glite-jpis-client.sgml deleted file mode 100644 index 0593485..0000000 --- a/org.glite.jp.index/doc/glite-jpis-client.sgml +++ /dev/null @@ -1,193 +0,0 @@ - - - - - - glite-jpis-client - 1 - EU EGEE Project - - - - glite-jpis-client - client interface for JP IS - - - - - glite-jpis-client - - - -h - --help - - - - -i - --index-server - JPIS:PORT - - - -q - --query-file - IN_FILE.XML - - - -t - --test-file - IN_FILE.XML - - - -e - --example-file - OUT_FILE.XML - - - -f - --format - - xml - human - - - - - - - DESCRIPTION - -glite-jpis-client is command line interface for querying -the Job Provenance Index Server. It takes the XML input, process the QueryJobs -operation and returns the result in specified format. - - - - - OPTIONS - - -With no options you get simple usage message as with . - - - - - | - -Displays usage message. - - - - - | - -Specifies Job Provenance Index Server as HOST:PORT. - - - - - | - -Process the QueryJobs operation. Requires input data in file -IN_FILE.XML, for using stdin specify -. - -The input and output data are in XML format with XSD schema, which can be found -in JobProvenanceISClient.xsd (element QueryJobs for input -and QueryJobsResponse for output). - - - - - | - -Test the input data from IN_FILE.XML (or from stdin -if is specified) and prints the found content. - - - - - | - -Write the example input data to file OUT_FILE.XML -(or to stdout if is specified). The XML is valid against XSD -schema in JobProvananceISClient.xsd, formating may vary -according to used gsoap version. - - - - - | - -Use FORMAT as output format type. You can specify - for interchangeable XML output or -for nice looking human readable output. - - - - - - - RETURN VALUE - - - 0 - Success. - - - - -1 - Communication error or error from the remote server. - - - - EINVAL - In most cases XML parsing error. - - - - other error - Other error from errno. - - - - - - EXAMPLES - - - glite-jpis-client --example-file query.xml - -Save the example query parameters to file query.xml. - - - - - glite-jpis-client --query-file query.xml - -Queries the local index server running on default port with the query -parameters specified in the file query.xml. - - - - - glite-jpis-client -i localhost:8902 -q - -f human - -Queries the index server running on local host on the port 8902 with the query -parameters from stdin and show results in non-XML form. - - - - - - - - SEE ALSO - glite-jp-indexd(8) - - - - AUTHOR - EU DataGrid Work Package 1, CESNET group. - - - diff --git a/org.glite.jp.index/doc/server_conf.xsd b/org.glite.jp.index/doc/server_conf.xsd deleted file mode 100644 index 16f464d..0000000 --- a/org.glite.jp.index/doc/server_conf.xsd +++ /dev/null @@ -1,97 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/org.glite.jp.index/examples/jpis-client.c b/org.glite.jp.index/examples/jpis-client.c deleted file mode 100644 index a8eb355..0000000 --- a/org.glite.jp.index/examples/jpis-client.c +++ /dev/null @@ -1,521 +0,0 @@ -#include -#include -#include -#include -#include -#include - -#include "soap_version.h" - -#include -#include -#include - -#include "jp_.nsmap" -#include "common.h" -#define dprintf(FMT, ARGS...) fprintf(stderr, FMT, ##ARGS); -#include - - -#define DEFAULT_JPIS "http://localhost:8902" -#define USE_GMT 1 - - -static struct option opts[] = { - {"index-server",required_argument, NULL, 'i'}, - {"example-file",required_argument, NULL, 'e'}, - {"query-file", required_argument, NULL, 'q'}, - {"test-file", required_argument, NULL, 't'}, - {"format", required_argument, NULL, 'f'}, - {NULL, 0, NULL, 0} -}; -static const char *get_opt_string = "i:q:e:t:f:"; - -#define NUMBER_OP 6 -struct { - enum jptype__queryOp op; - const char *name; -} operations[] = { - {jptype__queryOp__EQUAL, "=="}, - {jptype__queryOp__UNEQUAL, "<>"}, - {jptype__queryOp__LESS, "<"}, - {jptype__queryOp__GREATER, ">"}, - {jptype__queryOp__WITHIN, "WITHIN"}, - {jptype__queryOp__EXISTS, "EXISTS"}, - {0, "unknown"} -}; - -#define NUMBER_ORIG 3 -struct { - enum jptype__attrOrig orig; - const char *name; -} origins[] = { - {jptype__attrOrig__SYSTEM, "SYSTEM"}, - {jptype__attrOrig__USER, "USER"}, - {jptype__attrOrig__FILE_, "FILE"}, - {0, "unknown"} -}; - -typedef enum {FORMAT_XML, FORMAT_STRIPPEDXML, FORMAT_HR} format_t; - - -/* - * set the value - */ -static void value_set(struct soap *soap, struct jptype__stringOrBlob **value, const char *str) { - *value = soap_malloc(soap, sizeof(**value)); - memset(*value, 0, sizeof(*value)); - GSOAP_SETSTRING(*value, soap_strdup(soap, str)); -} - - -/* - * print the query data in the soap structre - */ -static void value_print(FILE *out, const struct jptype__stringOrBlob *value) { - int i, size, maxsize; - unsigned char *ptr; - - if (value) { - if (GSOAP_ISSTRING(value)) fprintf(out, "%s", GSOAP_STRING(value)); - else if (GSOAP_ISBLOB(value)) { - fprintf(out, "BLOB("); - ptr = GSOAP_BLOB(value)->__ptr; - size = GSOAP_BLOB(value)->__size; - - maxsize = 10; - if (ptr) { - maxsize = size < 10 ? size : 10; - for (i = 0; i < maxsize; i++) fprintf(out, "%02X ", ptr[i]); - if (maxsize < size) fprintf(out, "..."); - } else fprintf(out, "NULL"); - fprintf(out, ")"); - } - } else { - fprintf(out, "-"); - } -} - - -/* - * fill the query soap structure with some example data - */ -static void query_example_fill(struct soap *soap, struct _jpelem__QueryJobs *in) { - struct jptype__indexQuery *cond; - struct jptype__indexQueryRecord *rec; - - GLITE_SECURITY_GSOAP_LIST_CREATE(soap, in, conditions, struct jptype__indexQuery, 2); - - // query status - cond = GLITE_SECURITY_GSOAP_LIST_GET(in->conditions, 0); - memset(cond, 0, sizeof(*cond)); - cond->attr = soap_strdup(soap, "http://egee.cesnet.cz/en/Schema/LB/Attributes:finalStatus"); - cond->origin = soap_malloc(soap, sizeof(*(cond->origin))); - *(cond->origin) = jptype__attrOrig__SYSTEM; - GLITE_SECURITY_GSOAP_LIST_CREATE(soap, cond, record, struct jptype__indexQueryRecord, 2); - - // equal to Done - rec = GLITE_SECURITY_GSOAP_LIST_GET(cond->record, 0); - memset(rec, 0, sizeof(*rec)); - rec->op = jptype__queryOp__EQUAL; - value_set(soap, &rec->value, "Done"); - - // OR equal to Ready - rec = GLITE_SECURITY_GSOAP_LIST_GET(cond->record, 1); - memset(rec, 0, sizeof(*rec)); - rec->op = jptype__queryOp__EQUAL; - value_set(soap, &rec->value, "Ready"); - - - // AND - // owner - cond = GLITE_SECURITY_GSOAP_LIST_GET(in->conditions, 1); - memset(cond, 0, sizeof(*cond)); - cond->attr = soap_strdup(soap, "http://egee.cesnet.cz/en/Schema/LB/Attributes:user"); - cond->origin = NULL; - GLITE_SECURITY_GSOAP_LIST_CREATE(soap, cond, record, struct jptype__indexQueryRecord, 1); - - // not equal to CertSubj - rec = GLITE_SECURITY_GSOAP_LIST_GET(cond->record, 0); - memset(rec, 0, sizeof(*rec)); - rec->op = jptype__queryOp__UNEQUAL; - value_set(soap, &rec->value, "God"); - - - in->__sizeattributes = 4; - in->attributes = soap_malloc(soap, - in->__sizeattributes * - sizeof(*(in->attributes))); - in->attributes[0] = soap_strdup(soap, "http://egee.cesnet.cz/en/Schema/JP/System:owner"); - in->attributes[1] = soap_strdup(soap, "http://egee.cesnet.cz/en/Schema/JP/System:jobId"); - in->attributes[2] = soap_strdup(soap, "http://egee.cesnet.cz/en/Schema/LB/Attributes:finalStatus"); - in->attributes[3] = soap_strdup(soap, "http://egee.cesnet.cz/en/Schema/LB/Attributes:user"); - -} - - -/* - * read the XML query - */ -static int query_recv(struct soap *soap, int fd, struct _jpelem__QueryJobs *qj) { - int i; - - memset(qj, 0, sizeof(*qj)); - - soap->recvfd = fd; - soap_begin_recv(soap); - soap_default__jpelem__QueryJobs(soap, qj); - if (!soap_get__jpelem__QueryJobs(soap, qj, "jpelem:QueryJobs", NULL)) { - soap_end_recv(soap); - soap_end(soap); - return EINVAL; - } - soap_end_recv(soap); - - /* strip white-space characters from attributes */ - for (i = 0; i < qj->__sizeattributes; i++) - glite_jpis_trim_soap(soap, &qj->attributes[i]); - for (i = 0; i < qj->__sizeconditions; i++) - glite_jpis_trim_soap(soap, &GLITE_SECURITY_GSOAP_LIST_GET(qj->conditions, i)->attr); - - return 0; -} - - -/* - * print info from the query soap structure - */ -static void query_print(FILE *out, const struct _jpelem__QueryJobs *in) { - struct jptype__indexQuery *cond; - struct jptype__indexQueryRecord *rec; - int i, j, k; - - fprintf(out, "Conditions:\n"); - for (i = 0; i < in->__sizeconditions; i++) { - cond = GLITE_SECURITY_GSOAP_LIST_GET(in->conditions, i); - fprintf(out, "\t%s\n", cond->attr); - if (cond->origin) { - for (k = 0; k <= NUMBER_ORIG; k++) - if (origins[k].orig == *(cond->origin)) break; - fprintf(out, "\t\torigin == %s\n", origins[k].name); - } else { - fprintf(out, "\t\torigin IS ANY\n"); - } - for (j = 0; j < cond->__sizerecord; j++) { - rec = GLITE_SECURITY_GSOAP_LIST_GET(cond->record, j); - for (k = 0; k <= NUMBER_OP; k++) - if (operations[k].op == rec->op) break; - fprintf(out, "\t\tvalue %s", operations[k].name); - if (rec->value) { - fprintf(out, " "); - value_print(out, rec->value); - } - if (rec->value2) { - if (!rec->value) fprintf(out, "-"); - fprintf(out, " AND "); - value_print(out, rec->value2); - } - fprintf(out, "\n"); - } - } - fprintf(out, "Attributes:\n"); - for (i = 0; i < in->__sizeattributes; i++) - fprintf(out, "\t%s\n", in->attributes[i]); -} - - -/* - * dump the XML query - */ -static int query_dump(struct soap *soap, int fd, struct _jpelem__QueryJobs *qj) { - int retval; - - soap->sendfd = fd; - soap_begin_send(soap); - soap_serialize__jpelem__QueryJobs(soap, qj); - retval = soap_put__jpelem__QueryJobs(soap, qj, "jpelem:QueryJobs", NULL); - soap_end_send(soap); - write(fd, "\n", strlen("\n")); - - return retval; -} - - -static int query_format(struct soap *soap, format_t format, FILE *f, struct _jpelem__QueryJobs *qj) { - switch (format) { - case FORMAT_XML: - case FORMAT_STRIPPEDXML: - return query_dump(soap, fileno(f), qj); - case FORMAT_HR: query_print(f, qj); return 0; - default: return EINVAL; - } -} - - -/* - * dump the XML query with the example data - */ -static int query_example_dump(struct soap *soap, int fd) { - struct _jpelem__QueryJobs qj; - int retval; - - memset(&qj, 0, sizeof(qj)); - - soap_begin(soap); - query_example_fill(soap, &qj); - retval = query_dump(soap, fd, &qj); - soap_end(soap); - - return retval; -} - - -/* - * dump the data returned from JP IS - */ -static int queryresult_dump(struct soap *soap, int fd, const struct _jpelem__QueryJobsResponse *qjr) { - int retval; - - soap->sendfd = fd; - soap_begin_send(soap); - soap_serialize__jpelem__QueryJobsResponse(soap, qjr); - retval = soap_put__jpelem__QueryJobsResponse(soap, qjr, "QueryJobsResponse", NULL); - soap_end_send(soap); - write(fd, "\n", strlen("\n")); - - return retval; -} - - -/* - * print the data returned from JP IS - */ -static void queryresult_print(FILE *out, const struct _jpelem__QueryJobsResponse *in) { - struct jptype__jobRecord *job; - struct jptype__attrValue *attr; - int i, j, k; - -#if USE_GMT - setenv("TZ","UTC",1); tzset(); -#endif - fprintf(out, "Result %d jobs:\n", in->__sizejobs); - for (j=0; j__sizejobs; j++) { - job = GLITE_SECURITY_GSOAP_LIST_GET(in->jobs, j); - fprintf(out, "\tjobid = %s, owner = %s\n", job->jobid, job->owner); - for (i=0; i__sizeattributes; i++) { - attr = GLITE_SECURITY_GSOAP_LIST_GET(job->attributes, i); - fprintf(out, "\t\t%s\n", attr->name); - fprintf(out, "\t\t\tvalue = "); - value_print(out, attr->value); - fprintf(out, "\n"); - - for (k = 0; k <= NUMBER_ORIG; k++) - if (origins[k].orig == attr->origin) break; - fprintf(out, "\t\t\torigin = %s", origins[k].name); - if (attr->originDetail) fprintf(out, ", %s\n", attr->originDetail); - else fprintf(out, " (no detail)\n"); - if (attr->timestamp != (time_t)0) - fprintf(out, "\t\t\ttime = %s", ctime(&attr->timestamp)); - } - } -} - - -static int queryresult_format(struct soap *soap, format_t format, FILE *f, const struct _jpelem__QueryJobsResponse *qj) { - switch (format) { - case FORMAT_XML: - case FORMAT_STRIPPEDXML: - return queryresult_dump(soap, fileno(f), qj); - case FORMAT_HR: queryresult_print(f, qj); return 0; - default: return EINVAL; - } -} - - -/* - * help screen - */ -static void usage(const char *prog_name) { - fprintf(stderr, "Usage: %s OPTIONS\n", prog_name); - fprintf(stderr, "Options:\n"); - fprintf(stderr, " -h|--help\n"); - fprintf(stderr, " -i|--index-server JPIS:PORT (default: " DEFAULT_JPIS ")\n"); - fprintf(stderr, " -q|--query-file IN_FILE.XML\n"); - fprintf(stderr, " -t|--test-file IN_FILE.XML\n"); - fprintf(stderr, " -e|--example-file OUT_FILE.XML\n"); - fprintf(stderr, " -f|--format xml | strippedxml | human\n"); -} - - -/* - * process the result after calling soap - */ -#define check_fault(SOAP, ERR) glite_jp_clientCheckFault((SOAP), (ERR), NULL, 0) - - -int main(int argc, char * const argv[]) { - struct soap soap, soap_comm; - struct _jpelem__QueryJobs qj; - char *server, *example_file, *query_file, *test_file; - const char *prog_name; - int retval, opt, example_fd, query_fd, test_fd; - format_t format = FORMAT_XML; - - prog_name = server = NULL; - example_file = query_file = test_file = NULL; - query_fd = example_fd = test_fd = -1; - retval = 1; - - soap_init(&soap); - soap_set_namespaces(&soap, jp__namespaces); - - /* - * Soap with registered plugin can't be used for reading XML. - * For communications with JP IS glite_gsplugin needs to be registered yet. - */ - soap_init(&soap_comm); - soap_set_namespaces(&soap_comm, jp__namespaces); - soap_register_plugin(&soap_comm, glite_gsplugin); - - /* program name */ - prog_name = strrchr(argv[0], '/'); - if (prog_name) prog_name++; - else prog_name = argv[0]; - - if (argc <= 1) { - usage(prog_name); - goto cleanup; - } - - /* handle arguments */ - while ((opt = getopt_long(argc, argv, get_opt_string, opts, NULL)) != EOF) switch (opt) { - case 'i': - free(server); - server = strdup(optarg); - break; - case 'e': - free(example_file); - example_file = strdup(optarg); - break; - case 'q': - free(query_file); - query_file = strdup(optarg); - break; - case 't': - free(test_file); - test_file = strdup(optarg); - break; - case 'f': - if (strcasecmp(optarg, "xml") == 0) format = FORMAT_XML; - else if (strcasecmp(optarg, "strippedxml") == 0) format = FORMAT_STRIPPEDXML; - else format = FORMAT_HR; - break; - default: - usage(prog_name); - goto cleanup; - } - if (optind < argc) { - usage(prog_name); - goto cleanup; - } - if (!server) server = strdup(DEFAULT_JPIS); -#ifdef SOAP_XML_INDENT - if (format != FORMAT_STRIPPEDXML) soap_omode(&soap, SOAP_XML_INDENT); -#endif - - - /* prepare steps according to the arguments */ - if (query_file) { - if (strcmp(query_file, "-") == 0) query_fd = STDIN_FILENO; - else if ((query_fd = open(query_file, 0)) < 0) { - fprintf(stderr, "error opening %s: %s\n", query_file, strerror(errno)); - goto cleanup; - } - free(query_file); - query_file = NULL; - } - if (example_file) { - if (strcmp(example_file, "-") == 0) example_fd = STDOUT_FILENO; - else if ((example_fd = creat(example_file, S_IREAD | S_IWRITE | S_IRGRP)) < 0) { - fprintf(stderr, "error creating %s: %s\n", example_file, strerror(errno)); - goto cleanup; - } - free(example_file); - example_file = NULL; - } - if (test_file) { - if (strcmp(test_file, "-") == 0) test_fd = STDIN_FILENO; - else if ((test_fd = open(test_file, 0)) < 0) { - fprintf(stderr, "error opening %s: %s\n", test_file, strerror(errno)); - goto cleanup; - } - free(test_file); - test_file = NULL; - } - - /* the dump action */ - if (example_fd >= 0) { - if (query_example_dump(&soap, example_fd) != 0) { - fprintf(stderr, "Error dumping example query XML.\n"); - } - } - - /* the test XML file action */ - if (test_fd >= 0) { - soap_begin(&soap); - if (query_recv(&soap, test_fd, &qj) != 0) { - fprintf(stderr, "test: Error getting query XML\n"); - } else { - query_format(&soap, format, stdout, &qj); - } - soap_end(&soap); - } - - /* query action */ - if (query_fd >= 0) { - struct _jpelem__QueryJobs in; - struct _jpelem__QueryJobsResponse out; - int ret; - - soap_begin(&soap); - memset(&in, 0, sizeof(in)); - memset(&out, 0, sizeof(out)); - /* - * Right way would be copy data from client query structure to IS query - * structure. Just ugly retype to client here. - */ - if (query_recv(&soap, query_fd, (struct _jpelem__QueryJobs *)&in) != 0) { - fprintf(stderr, "query: Error getting query XML\n"); - } else { - fprintf(stderr, "query: using JPIS %s\n\n", server); - query_print(stderr, &in); - fprintf(stderr, "\n"); - soap_begin(&soap_comm); - ret = check_fault(&soap_comm, soap_call___jpsrv__QueryJobs(&soap_comm, server, "", &in, &out)); - if (ret == 0) { - queryresult_format(&soap, format, stdout, (struct _jpelem__QueryJobsResponse *)&out); - } else { - soap_end(&soap_comm); - soap_end(&soap); - goto cleanup; - } - soap_end(&soap_comm); - } - soap_end(&soap); - } - - retval = 0; - -cleanup: - soap_done(&soap); - soap_done(&soap_comm); - if (example_fd > STDERR_FILENO) close(example_fd); - if (query_fd > STDERR_FILENO) close(query_fd); - if (test_fd > STDERR_FILENO) close(test_fd); - free(server); - free(example_file); - free(query_file); - free(test_file); - - return retval; -} diff --git a/org.glite.jp.index/examples/jpis-db-internal.c b/org.glite.jp.index/examples/jpis-db-internal.c deleted file mode 100644 index 39aa48a..0000000 --- a/org.glite.jp.index/examples/jpis-db-internal.c +++ /dev/null @@ -1,134 +0,0 @@ -#include -#include -#include -#include -#include - -#include - -#include "db_ops.h" - - -static void print_err(glite_jp_context_t ctx) { - glite_jp_error_t *e; - - e = ctx->error; - while(e) { - printf("%s (%s)\n", e->desc, e->source); - e = e->reason; - } - printf("\n"); -} - - -int glite_jpis_db_queries_serialize(void **blob, size_t *len, glite_jp_query_rec_t **queries); -int glite_jpis_db_queries_deserialize(glite_jp_query_rec_t ***queries, void *blob, size_t blob_size); - -int main(int argc, char *argv[]) { -#if 1 - glite_jp_context_t jpctx; - glite_jp_is_conf *conf; - glite_jpis_context_t isctx; - int ret; - long int uniqueid; - char *ps, *feedid; - - jpctx = NULL; - isctx = NULL; - conf = NULL; - glite_jp_init_context(&jpctx); - if (glite_jp_get_conf(argc, argv, NULL, &conf) != 0) goto fail; - if (glite_jpis_init_context(&isctx, jpctx, conf) != 0) goto fail; - if (glite_jpis_init_db(isctx) != 0) goto fail; - - printf("dropping...\n"); - if (glite_jpis_dropDatabase(isctx) != 0) goto faildb; - - printf("initializing...\n"); - if (glite_jpis_initDatabase(isctx) != 0) goto faildb; - - printf("locking...\n"); - do { - if ((ret = glite_jpis_lockUninitializedFeed(isctx, &uniqueid, &ps)) == ENOLCK) goto faildb; - if (ret == 0) { - printf("locked: uniqueid=%li, ps=%s\n", uniqueid, ps); - free(ps); - - asprintf(&feedid, "feed://%lu", uniqueid + 3); - if (glite_jpis_initFeed(isctx, uniqueid, feedid, (time_t)10000) != 0) { - free(feedid); - goto faildb; - } - free(feedid); - - if (glite_jpis_unlockFeed(isctx, uniqueid) != 0) goto faildb; - } - } while (ret == 0); - - if (glite_jpis_tryReconnectFeed(isctx, uniqueid, time(NULL) + 10) != 0) goto faildb; - - glite_jpis_free_db(isctx); - glite_jpis_free_context(isctx); - glite_jp_free_conf(conf); - glite_jp_free_context(jpctx); - - return 0; - -faildb: - glite_jpis_free_db(isctx); -fail: - printf("failed\n"); - glite_jpis_free_context(isctx); - glite_jp_free_conf(conf); - if (jpctx) { - print_err(jpctx); - glite_jp_free_context(jpctx); - } - - return 1; -#endif -#if 0 - glite_jp_context_t ctx; - glite_jp_is_conf *conf; - void *blob; - size_t len; - int ret, i; - glite_jp_query_rec_t **queries; - - ret = 0; - glite_jp_init_context(&ctx); - - if (glite_jp_get_conf(argc, argv, NULL, &conf) != 0) goto fail_ctx; - if ((ret = glite_jpis_db_queries_serialize(&blob, &len, conf->feeds[0]->query)) != 0) goto fail; - - if (write(1, blob, len) != len) { - ret = errno; - free(blob); - goto fail; - } - - if ((ret = glite_jpis_db_queries_deserialize(&queries, blob, len)) != 0) goto fail_blob; - i = 0; - while (queries[i] && queries[i]->attr) { - printf("query: attr=%s, op=%d, value=%s, value2=%s, bin=%d\n", queries[i]->attr, queries[i]->op, queries[i]->value, queries[i]->value2, queries[i]->binary); - free(queries[i]->attr); - free(queries[i]->value); - free(queries[i]->value2); - free(queries[i]); - i++; - } - free(queries); - - free(blob); - glite_jp_free_context(ctx); - return 0; - -fail_blob: - free(blob); -fail: - fprintf(stderr, "fail: %s\n", strerror(ret)); -fail_ctx: - glite_jp_free_context(ctx); - return 1; -#endif -} diff --git a/org.glite.jp.index/examples/jpis-test.c b/org.glite.jp.index/examples/jpis-test.c deleted file mode 100644 index f450182..0000000 --- a/org.glite.jp.index/examples/jpis-test.c +++ /dev/null @@ -1,240 +0,0 @@ -#include -#include -#include -#include - -#include -#include "glite/jp/strmd5.h" - -#include "jp_H.h" -#include "jp_.nsmap" -#include "db_ops.h" -#include "conf.h" - - -#include "soap_version.h" -#if GSOAP_VERSION <= 20602 -#define soap_call___jpsrv__UpdateJobs soap_call___ns1__UpdateJobs -#define soap_call___jpsrv__QueryJobs soap_call___ns1__QueryJobs -#endif -#define dprintf(FMT, ARGS...) fprintf(stderr, FMT, ##ARGS); -#define check_fault(SOAP, ERR) glite_jp_clientCheckFault((SOAP), (ERR), NULL, 0) -#include "glite/jp/ws_fault.c" - - -/* insert simulating FeedIndex call */ -#define INSERT "insert into feeds value ('93', '12345', '8', '0' , 'http://localhost:8901', '2005-10-14 10:48:27', 'COND2');" -#define DELETE "delete from feeds where feedid = '12345';" - - -int main(int argc,char *argv[]) -{ - char *default_server = NULL; - char server[512]; - struct soap *soap = soap_new(); - - soap_init(soap); - soap_set_namespaces(soap, jp__namespaces); - soap_register_plugin(soap,glite_gsplugin); - -/*---------------------------------------------------------------------------*/ - // simulate FeedIndex PS response - { - glite_jp_db_stmt_t stmt; - glite_jp_context_t ctx; - glite_jpis_context_t isctx = NULL; - glite_jp_is_conf *conf; - - - glite_jp_init_context(&ctx); - glite_jp_get_conf(argc, argv, &conf); - if (!conf) { - fprintf(stderr, "Can't gather configuration\n"); - goto end; - } - if (default_server) strcpy(server, default_server); - else snprintf(server, sizeof(server), "http://localhost:%s", conf->port ? conf->port : GLITE_JPIS_DEFAULT_PORT_STR); - printf("JP index server: %s\n", server); - - glite_jpis_init_context(&isctx, ctx, conf); - if (glite_jpis_init_db(isctx) != 0) { - fprintf(stderr, "Connect DB failed: %s (%s)\n", - ctx->error->desc, ctx->error->source); - goto end; - } - - if (glite_jp_db_execstmt(ctx, DELETE, &stmt) < 0) goto end; - if (glite_jp_db_execstmt(ctx, INSERT, &stmt) < 0) goto end; - end: - glite_jpis_free_context(isctx); - glite_jp_free_context(ctx); - glite_jp_free_conf(conf); - } - -/*---------------------------------------------------------------------------*/ - // test calls of server functions - // this call is issued by JPPS - { - struct jptype__jobRecord *rec; - struct _jpelem__UpdateJobs in; - struct _jpelem__UpdateJobsResponse out; - struct jptype__attrValue *a; - - memset(&in, 0, sizeof(in)); - memset(&out, 0, sizeof(out)); - - in.feedId = soap_strdup(soap, "12345"); - in.feedDone = GLITE_SECURITY_GSOAP_FALSE; - GLITE_SECURITY_GSOAP_LIST_CREATE(soap, &in, jobAttributes, struct jptype__jobRecord, 2); - rec = GLITE_SECURITY_GSOAP_LIST_GET(in.jobAttributes, 0); - { - memset(rec, 0, sizeof(*rec)); - rec->jobid = soap_strdup(soap, "https://localhost:7846/pokus1"); - { - gss_cred_id_t cred = GSS_C_NO_CREDENTIAL; - edg_wll_GssStatus gss_code; - char *subject = NULL; - - if ( edg_wll_gss_acquire_cred_gsi(NULL, NULL, &cred, &subject, &gss_code) ) { - printf("Cannot obtain credentials - exiting.\n"); - return EINVAL; - } - rec->owner = soap_strdup(soap, subject); - free(subject); - } - rec->__sizeprimaryStorage = 0; - rec->primaryStorage = NULL; - GLITE_SECURITY_GSOAP_LIST_CREATE(soap, rec, attributes, struct jptype__attrValue, 2); - a = GLITE_SECURITY_GSOAP_LIST_GET(rec->attributes, 0); - a->name = soap_strdup(soap, "http://egee.cesnet.cz/en/Schema/LB/Attributes:user"); - a->value = soap_malloc(soap, sizeof(*(a->value))); - memset(a->value, 0, sizeof(a->value)); - GSOAP_SETSTRING(a->value, soap_strdup(soap, "CertSubj")); - a->timestamp = 333; - a->origin = jptype__attrOrig__SYSTEM; - a->originDetail = NULL; - - a = GLITE_SECURITY_GSOAP_LIST_GET(rec->attributes, 1); - a->name = soap_strdup(soap, "http://egee.cesnet.cz/en/Schema/LB/Attributes:finalStatus"); - a->value = soap_malloc(soap, sizeof(*(a->value))); - memset(a->value, 0, sizeof(a->value)); - GSOAP_SETSTRING(a->value, soap_strdup(soap, "Done")); - a->timestamp = 333; - a->origin = jptype__attrOrig__SYSTEM; - a->originDetail = NULL; - - } - - rec = GLITE_SECURITY_GSOAP_LIST_GET(in.jobAttributes, 1); - { - memset(rec, 0, sizeof(*rec)); - rec->jobid = soap_strdup(soap, "https://localhost:7846/pokus2"); - rec->owner = soap_strdup(soap, "OwnerName"); - rec->__sizeprimaryStorage = 0; - rec->primaryStorage = NULL; - GLITE_SECURITY_GSOAP_LIST_CREATE(soap, rec, attributes, struct jptype__jobRecord, 2); - a = GLITE_SECURITY_GSOAP_LIST_GET(rec->attributes, 0); - a->name = soap_strdup(soap, "http://egee.cesnet.cz/en/Schema/LB/Attributes:user"); - a->value = soap_malloc(soap, sizeof(*(a->value))); - memset(a->value, 0, sizeof(a->value)); - GSOAP_SETSTRING(a->value, soap_strdup(soap, "CertSubj")); - a->timestamp = 333; - a->origin = jptype__attrOrig__USER; - a->originDetail = NULL; - - a = GLITE_SECURITY_GSOAP_LIST_GET(rec->attributes, 1); - a->name = soap_strdup(soap, "http://egee.cesnet.cz/en/Schema/LB/Attributes:finalStatus"); - a->value = soap_malloc(soap, sizeof(*(a->value))); - memset(a->value, 0, sizeof(a->value)); - GSOAP_SETSTRING(a->value, soap_strdup(soap, "Ready")); - a->timestamp = 333; - a->origin = jptype__attrOrig__SYSTEM; - a->originDetail = NULL; - } - - check_fault(soap, - soap_call___jpsrv__UpdateJobs(soap,server,"",&in,&out)); - } - -/*---------------------------------------------------------------------------*/ - // this query call issued by user - { - struct _jpelem__QueryJobs in; - struct jptype__indexQuery *cond; - struct jptype__indexQueryRecord *rec; - struct _jpelem__QueryJobsResponse out; - struct jptype__jobRecord *job; - struct jptype__attrValue *attr; - int i, j; - - GLITE_SECURITY_GSOAP_LIST_CREATE(soap, &in, conditions, struct jptype__indexQuery, 2); - - // query status - cond = GLITE_SECURITY_GSOAP_LIST_GET(in.conditions, 0); - memset(cond, 0, sizeof(*cond)); - cond->attr = soap_strdup(soap, "http://egee.cesnet.cz/en/Schema/LB/Attributes:finalStatus"); - cond->origin = NULL; - GLITE_SECURITY_GSOAP_LIST_CREATE(soap, cond, record, struct jptype__indexQueryRecord, 2); - - // equal to Done - rec = GLITE_SECURITY_GSOAP_LIST_GET(cond->record, 0); - memset(rec, 0, sizeof(*rec)); - rec->op = jptype__queryOp__EQUAL; - rec->value = soap_malloc(soap, sizeof(*(rec->value))); - memset(rec->value, 0, sizeof(*rec->value)); - GSOAP_SETSTRING(rec->value, soap_strdup(soap, "Done")); - - // OR equal to Ready - rec = GLITE_SECURITY_GSOAP_LIST_GET(cond->record, 1); - memset(rec, 0, sizeof(*rec)); - rec->op = jptype__queryOp__EQUAL; - rec->value = soap_malloc(soap, sizeof(*(rec->value))); - memset(rec->value, 0, sizeof(*rec->value)); - GSOAP_SETSTRING(rec->value, soap_strdup(soap, "Ready")); - - - // AND - // owner - cond = GLITE_SECURITY_GSOAP_LIST_GET(in.conditions, 1); - memset(cond, 0, sizeof(*cond)); - cond->attr = soap_strdup(soap, "http://egee.cesnet.cz/en/Schema/LB/Attributes:user"); - cond->origin = NULL; - GLITE_SECURITY_GSOAP_LIST_CREATE(soap, cond, record, struct jptype__indexQueryRecord, 1); - - // not equal to CertSubj - rec = GLITE_SECURITY_GSOAP_LIST_GET(cond->record, 0); - memset(rec, 0, sizeof(*rec)); - rec->op = jptype__queryOp__UNEQUAL; - rec->value = soap_malloc(soap, sizeof(*(rec->value))); - memset(rec->value, 0, sizeof(*rec->value)); - GSOAP_SETSTRING(rec->value, soap_strdup(soap, "God")); - - - in.__sizeattributes = 4; - in.attributes = soap_malloc(soap, - in.__sizeattributes * - sizeof(*(in.attributes))); - in.attributes[0] = soap_strdup(soap, "http://egee.cesnet.cz/en/Schema/JP/System:owner"); - in.attributes[1] = soap_strdup(soap, "http://egee.cesnet.cz/en/Schema/JP/System:jobId"); - in.attributes[2] = soap_strdup(soap, "http://egee.cesnet.cz/en/Schema/LB/Attributes:finalStatus"); - in.attributes[3] = soap_strdup(soap, "http://egee.cesnet.cz/en/Schema/LB/Attributes:user"); - - memset(&out, 0, sizeof(out)); - - check_fault(soap, - soap_call___jpsrv__QueryJobs(soap, server, "",&in,&out)); - - for (j=0; jjobid); - for (i=0; i__sizeattributes; i++) { - attr = GLITE_SECURITY_GSOAP_LIST_GET(job->attributes, i); - printf("\t%s = %s\n", - attr->name, - GSOAP_ISSTRING(attr->value) ? GSOAP_STRING(attr->value) : "binary"); - } - } - } - - return 0; -} diff --git a/org.glite.jp.index/examples/query-tests/authz.out b/org.glite.jp.index/examples/query-tests/authz.out deleted file mode 100644 index 53ff341..0000000 --- a/org.glite.jp.index/examples/query-tests/authz.out +++ /dev/null @@ -1,14 +0,0 @@ -query: using JPIS http://localhost:10000 - -Conditions: - http://egee.cesnet.cz/en/Schema/LB/Attributes:finalStatus - origin IS ANY - value == Ready -Attributes: - http://egee.cesnet.cz/en/Schema/JP/System:owner - http://egee.cesnet.cz/en/Schema/JP/System:jobId - http://egee.cesnet.cz/en/Schema/LB/Attributes:finalStatus - http://egee.cesnet.cz/en/Schema/LB/Attributes:user - -OK -Result 0 jobs: diff --git a/org.glite.jp.index/examples/query-tests/complex_query.in b/org.glite.jp.index/examples/query-tests/complex_query.in deleted file mode 100644 index 3dd8f22..0000000 --- a/org.glite.jp.index/examples/query-tests/complex_query.in +++ /dev/null @@ -1,36 +0,0 @@ - - - - - http://egee.cesnet.cz/en/Schema/LB/Attributes:finalStatus - - EQUAL - - Done - - - - EQUAL - - Ready - - - - - - http://egee.cesnet.cz/en/Schema/LB/Attributes:user - - UNEQUAL - - God - - - - - http://egee.cesnet.cz/en/Schema/JP/System:owner - http://egee.cesnet.cz/en/Schema/JP/System:jobId - http://egee.cesnet.cz/en/Schema/LB/Attributes:finalStatus - http://egee.cesnet.cz/en/Schema/LB/Attributes:user - - - diff --git a/org.glite.jp.index/examples/query-tests/complex_query.out b/org.glite.jp.index/examples/query-tests/complex_query.out deleted file mode 100644 index 69971c1..0000000 --- a/org.glite.jp.index/examples/query-tests/complex_query.out +++ /dev/null @@ -1,36 +0,0 @@ -query: using JPIS http://localhost:10000 - -Conditions: - http://egee.cesnet.cz/en/Schema/LB/Attributes:finalStatus - origin IS ANY - value == Done - value == Ready - http://egee.cesnet.cz/en/Schema/LB/Attributes:user - origin IS ANY - value <> God -Attributes: - http://egee.cesnet.cz/en/Schema/JP/System:owner - http://egee.cesnet.cz/en/Schema/JP/System:jobId - http://egee.cesnet.cz/en/Schema/LB/Attributes:finalStatus - http://egee.cesnet.cz/en/Schema/LB/Attributes:user - -OK -Result 2 jobs: - jobid = https://localhost:7846/pokus1, owner = /O=CESNET/O=Masaryk University/CN=Milos Mulac - http://egee.cesnet.cz/en/Schema/LB/Attributes:finalStatus - value = Done - origin = FILE (no detail) - time = Thu Jan 1 02:00:01 1970 - http://egee.cesnet.cz/en/Schema/LB/Attributes:user - value = CertSubj - origin = FILE (no detail) - time = Thu Jan 1 02:00:01 1970 - jobid = https://localhost:7846/pokus2, owner = OwnerName - http://egee.cesnet.cz/en/Schema/LB/Attributes:finalStatus - value = Ready - origin = SYSTEM (no detail) - time = Thu Jan 1 02:00:01 1970 - http://egee.cesnet.cz/en/Schema/LB/Attributes:user - value = CertSubj - origin = SYSTEM (no detail) - time = Thu Jan 1 02:00:01 1970 diff --git a/org.glite.jp.index/examples/query-tests/dump1.sql b/org.glite.jp.index/examples/query-tests/dump1.sql deleted file mode 100644 index 1953b66..0000000 --- a/org.glite.jp.index/examples/query-tests/dump1.sql +++ /dev/null @@ -1,594 +0,0 @@ --- MySQL dump 10.8 --- --- Host: localhost Database: jpis1test --- ------------------------------------------------------ --- Server version 4.1.7-max-log - -/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; -/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; -/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; -/*!40101 SET NAMES utf8 */; -/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; -/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; -/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE="NO_AUTO_VALUE_ON_ZERO" */; - --- --- Current Database: `jpis1test` --- - -CREATE DATABASE /*!32312 IF NOT EXISTS*/ `jpis1test`; - -USE `jpis1test`; - --- --- Table structure for table `acls` --- - -DROP TABLE IF EXISTS `acls`; -CREATE TABLE `acls` ( - `aclid` varchar(32) character set latin1 collate latin1_bin NOT NULL default '', - `value` mediumblob NOT NULL, - `refcnt` int(11) NOT NULL default '0', - PRIMARY KEY (`aclid`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1; - --- --- Dumping data for table `acls` --- - - -/*!40000 ALTER TABLE `acls` DISABLE KEYS */; -LOCK TABLES `acls` WRITE; -UNLOCK TABLES; -/*!40000 ALTER TABLE `acls` ENABLE KEYS */; - --- --- Table structure for table `attr_1005bc536e987ca1e027a5b8f84c9a67` --- - -DROP TABLE IF EXISTS `attr_1005bc536e987ca1e027a5b8f84c9a67`; -CREATE TABLE `attr_1005bc536e987ca1e027a5b8f84c9a67` ( - `jobid` varchar(32) character set latin1 collate latin1_bin NOT NULL default '', - `value` varchar(255) character set latin1 collate latin1_bin NOT NULL default '', - `full_value` mediumblob NOT NULL, - `origin` int(11) NOT NULL default '0', - KEY `jobid` (`jobid`), - KEY `value` (`value`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1; - --- --- Dumping data for table `attr_1005bc536e987ca1e027a5b8f84c9a67` --- - - -/*!40000 ALTER TABLE `attr_1005bc536e987ca1e027a5b8f84c9a67` DISABLE KEYS */; -LOCK TABLES `attr_1005bc536e987ca1e027a5b8f84c9a67` WRITE; -UNLOCK TABLES; -/*!40000 ALTER TABLE `attr_1005bc536e987ca1e027a5b8f84c9a67` ENABLE KEYS */; - --- --- Table structure for table `attr_12aaad5454b6e3e44cb4f4a432336af4` --- - -DROP TABLE IF EXISTS `attr_12aaad5454b6e3e44cb4f4a432336af4`; -CREATE TABLE `attr_12aaad5454b6e3e44cb4f4a432336af4` ( - `jobid` varchar(32) character set latin1 collate latin1_bin NOT NULL default '', - `value` varchar(255) character set latin1 collate latin1_bin NOT NULL default '', - `full_value` mediumblob NOT NULL, - `origin` int(11) NOT NULL default '0', - KEY `jobid` (`jobid`), - KEY `value` (`value`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1; - --- --- Dumping data for table `attr_12aaad5454b6e3e44cb4f4a432336af4` --- - - -/*!40000 ALTER TABLE `attr_12aaad5454b6e3e44cb4f4a432336af4` DISABLE KEYS */; -LOCK TABLES `attr_12aaad5454b6e3e44cb4f4a432336af4` WRITE; -UNLOCK TABLES; -/*!40000 ALTER TABLE `attr_12aaad5454b6e3e44cb4f4a432336af4` ENABLE KEYS */; - --- --- Table structure for table `attr_29d3ef83b39b8cf690e8113df316835a` --- - -DROP TABLE IF EXISTS `attr_29d3ef83b39b8cf690e8113df316835a`; -CREATE TABLE `attr_29d3ef83b39b8cf690e8113df316835a` ( - `jobid` varchar(32) character set latin1 collate latin1_bin NOT NULL default '', - `value` varchar(255) character set latin1 collate latin1_bin NOT NULL default '', - `full_value` mediumblob NOT NULL, - `origin` int(11) NOT NULL default '0', - KEY `jobid` (`jobid`), - KEY `value` (`value`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1; - --- --- Dumping data for table `attr_29d3ef83b39b8cf690e8113df316835a` --- - - -/*!40000 ALTER TABLE `attr_29d3ef83b39b8cf690e8113df316835a` DISABLE KEYS */; -LOCK TABLES `attr_29d3ef83b39b8cf690e8113df316835a` WRITE; -UNLOCK TABLES; -/*!40000 ALTER TABLE `attr_29d3ef83b39b8cf690e8113df316835a` ENABLE KEYS */; - --- --- Table structure for table `attr_5023d8d4cc249460dd947a878153027f` --- - -DROP TABLE IF EXISTS `attr_5023d8d4cc249460dd947a878153027f`; -CREATE TABLE `attr_5023d8d4cc249460dd947a878153027f` ( - `jobid` varchar(32) character set latin1 collate latin1_bin NOT NULL default '', - `value` varchar(255) character set latin1 collate latin1_bin NOT NULL default '', - `full_value` mediumblob NOT NULL, - `origin` int(11) NOT NULL default '0', - KEY `jobid` (`jobid`), - KEY `value` (`value`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1; - --- --- Dumping data for table `attr_5023d8d4cc249460dd947a878153027f` --- - - -/*!40000 ALTER TABLE `attr_5023d8d4cc249460dd947a878153027f` DISABLE KEYS */; -LOCK TABLES `attr_5023d8d4cc249460dd947a878153027f` WRITE; -UNLOCK TABLES; -/*!40000 ALTER TABLE `attr_5023d8d4cc249460dd947a878153027f` ENABLE KEYS */; - --- --- Table structure for table `attr_52942b8c70bab8491ab5d3b9713d79f5` --- - -DROP TABLE IF EXISTS `attr_52942b8c70bab8491ab5d3b9713d79f5`; -CREATE TABLE `attr_52942b8c70bab8491ab5d3b9713d79f5` ( - `jobid` varchar(32) character set latin1 collate latin1_bin NOT NULL default '', - `value` varchar(255) character set latin1 collate latin1_bin NOT NULL default '', - `full_value` mediumblob NOT NULL, - `origin` int(11) NOT NULL default '0', - KEY `jobid` (`jobid`), - KEY `value` (`value`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1; - --- --- Dumping data for table `attr_52942b8c70bab8491ab5d3b9713d79f5` --- - - -/*!40000 ALTER TABLE `attr_52942b8c70bab8491ab5d3b9713d79f5` DISABLE KEYS */; -LOCK TABLES `attr_52942b8c70bab8491ab5d3b9713d79f5` WRITE; -UNLOCK TABLES; -/*!40000 ALTER TABLE `attr_52942b8c70bab8491ab5d3b9713d79f5` ENABLE KEYS */; - --- --- Table structure for table `attr_6bc44144bf813a2ad7d67cb2adbdaf42` --- - -DROP TABLE IF EXISTS `attr_6bc44144bf813a2ad7d67cb2adbdaf42`; -CREATE TABLE `attr_6bc44144bf813a2ad7d67cb2adbdaf42` ( - `jobid` varchar(32) character set latin1 collate latin1_bin NOT NULL default '', - `value` varchar(255) character set latin1 collate latin1_bin NOT NULL default '', - `full_value` mediumblob NOT NULL, - `origin` int(11) NOT NULL default '0', - KEY `jobid` (`jobid`), - KEY `value` (`value`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1; - --- --- Dumping data for table `attr_6bc44144bf813a2ad7d67cb2adbdaf42` --- - - -/*!40000 ALTER TABLE `attr_6bc44144bf813a2ad7d67cb2adbdaf42` DISABLE KEYS */; -LOCK TABLES `attr_6bc44144bf813a2ad7d67cb2adbdaf42` WRITE; -UNLOCK TABLES; -/*!40000 ALTER TABLE `attr_6bc44144bf813a2ad7d67cb2adbdaf42` ENABLE KEYS */; - --- --- Table structure for table `attr_760a84e0ff89fa3f4e96ec82adfd92f1` --- - -DROP TABLE IF EXISTS `attr_760a84e0ff89fa3f4e96ec82adfd92f1`; -CREATE TABLE `attr_760a84e0ff89fa3f4e96ec82adfd92f1` ( - `jobid` varchar(32) character set latin1 collate latin1_bin NOT NULL default '', - `value` varchar(255) character set latin1 collate latin1_bin NOT NULL default '', - `full_value` mediumblob NOT NULL, - `origin` int(11) NOT NULL default '0', - KEY `jobid` (`jobid`), - KEY `value` (`value`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1; - --- --- Dumping data for table `attr_760a84e0ff89fa3f4e96ec82adfd92f1` --- - - -/*!40000 ALTER TABLE `attr_760a84e0ff89fa3f4e96ec82adfd92f1` DISABLE KEYS */; -LOCK TABLES `attr_760a84e0ff89fa3f4e96ec82adfd92f1` WRITE; -UNLOCK TABLES; -/*!40000 ALTER TABLE `attr_760a84e0ff89fa3f4e96ec82adfd92f1` ENABLE KEYS */; - --- --- Table structure for table `attr_7c3be9defcbcf9f0e7890600d9c204ac` --- - -DROP TABLE IF EXISTS `attr_7c3be9defcbcf9f0e7890600d9c204ac`; -CREATE TABLE `attr_7c3be9defcbcf9f0e7890600d9c204ac` ( - `jobid` varchar(32) character set latin1 collate latin1_bin NOT NULL default '', - `value` varchar(255) character set latin1 collate latin1_bin NOT NULL default '', - `full_value` mediumblob NOT NULL, - `origin` int(11) NOT NULL default '0', - KEY `jobid` (`jobid`), - KEY `value` (`value`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1; - --- --- Dumping data for table `attr_7c3be9defcbcf9f0e7890600d9c204ac` --- - - -/*!40000 ALTER TABLE `attr_7c3be9defcbcf9f0e7890600d9c204ac` DISABLE KEYS */; -LOCK TABLES `attr_7c3be9defcbcf9f0e7890600d9c204ac` WRITE; -UNLOCK TABLES; -/*!40000 ALTER TABLE `attr_7c3be9defcbcf9f0e7890600d9c204ac` ENABLE KEYS */; - --- --- Table structure for table `attr_862e3dd7c5da90c9a659a32a41f63af8` --- - -DROP TABLE IF EXISTS `attr_862e3dd7c5da90c9a659a32a41f63af8`; -CREATE TABLE `attr_862e3dd7c5da90c9a659a32a41f63af8` ( - `jobid` varchar(32) character set latin1 collate latin1_bin NOT NULL default '', - `value` varchar(255) character set latin1 collate latin1_bin NOT NULL default '', - `full_value` mediumblob NOT NULL, - `origin` int(11) NOT NULL default '0', - KEY `jobid` (`jobid`), - KEY `value` (`value`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1; - --- --- Dumping data for table `attr_862e3dd7c5da90c9a659a32a41f63af8` --- - - -/*!40000 ALTER TABLE `attr_862e3dd7c5da90c9a659a32a41f63af8` DISABLE KEYS */; -LOCK TABLES `attr_862e3dd7c5da90c9a659a32a41f63af8` WRITE; -UNLOCK TABLES; -/*!40000 ALTER TABLE `attr_862e3dd7c5da90c9a659a32a41f63af8` ENABLE KEYS */; - --- --- Table structure for table `attr_982d06bdc65d3a4240b36a060a09886e` --- - -DROP TABLE IF EXISTS `attr_982d06bdc65d3a4240b36a060a09886e`; -CREATE TABLE `attr_982d06bdc65d3a4240b36a060a09886e` ( - `jobid` varchar(32) character set latin1 collate latin1_bin NOT NULL default '', - `value` varchar(255) character set latin1 collate latin1_bin NOT NULL default '', - `full_value` mediumblob NOT NULL, - `origin` int(11) NOT NULL default '0', - KEY `jobid` (`jobid`), - KEY `value` (`value`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1; - --- --- Dumping data for table `attr_982d06bdc65d3a4240b36a060a09886e` --- - - -/*!40000 ALTER TABLE `attr_982d06bdc65d3a4240b36a060a09886e` DISABLE KEYS */; -LOCK TABLES `attr_982d06bdc65d3a4240b36a060a09886e` WRITE; -UNLOCK TABLES; -/*!40000 ALTER TABLE `attr_982d06bdc65d3a4240b36a060a09886e` ENABLE KEYS */; - --- --- Table structure for table `attr_9892f81a8175c09bd00afcb152f510ad` --- - -DROP TABLE IF EXISTS `attr_9892f81a8175c09bd00afcb152f510ad`; -CREATE TABLE `attr_9892f81a8175c09bd00afcb152f510ad` ( - `jobid` varchar(32) character set latin1 collate latin1_bin NOT NULL default '', - `value` varchar(255) character set latin1 collate latin1_bin NOT NULL default '', - `full_value` mediumblob NOT NULL, - `origin` int(11) NOT NULL default '0', - KEY `jobid` (`jobid`), - KEY `value` (`value`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1; - --- --- Dumping data for table `attr_9892f81a8175c09bd00afcb152f510ad` --- - - -/*!40000 ALTER TABLE `attr_9892f81a8175c09bd00afcb152f510ad` DISABLE KEYS */; -LOCK TABLES `attr_9892f81a8175c09bd00afcb152f510ad` WRITE; -INSERT INTO `attr_9892f81a8175c09bd00afcb152f510ad` VALUES ('593e62a063231f8c623b74406b3e12b0','CertSubj','S:7201:F::CertSubj',3),('9276789a0093ad44457655ef03ade36a','CertSubj','S:7201:S::CertSubj',2); -UNLOCK TABLES; -/*!40000 ALTER TABLE `attr_9892f81a8175c09bd00afcb152f510ad` ENABLE KEYS */; - --- --- Table structure for table `attr_9a812abe1262a90858b7be792f198596` --- - -DROP TABLE IF EXISTS `attr_9a812abe1262a90858b7be792f198596`; -CREATE TABLE `attr_9a812abe1262a90858b7be792f198596` ( - `jobid` varchar(32) character set latin1 collate latin1_bin NOT NULL default '', - `value` varchar(255) character set latin1 collate latin1_bin NOT NULL default '', - `full_value` mediumblob NOT NULL, - `origin` int(11) NOT NULL default '0', - KEY `jobid` (`jobid`), - KEY `value` (`value`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1; - --- --- Dumping data for table `attr_9a812abe1262a90858b7be792f198596` --- - - -/*!40000 ALTER TABLE `attr_9a812abe1262a90858b7be792f198596` DISABLE KEYS */; -LOCK TABLES `attr_9a812abe1262a90858b7be792f198596` WRITE; -UNLOCK TABLES; -/*!40000 ALTER TABLE `attr_9a812abe1262a90858b7be792f198596` ENABLE KEYS */; - --- --- Table structure for table `attr_a1e9e0a1b7943cc041fefb5da65868f9` --- - -DROP TABLE IF EXISTS `attr_a1e9e0a1b7943cc041fefb5da65868f9`; -CREATE TABLE `attr_a1e9e0a1b7943cc041fefb5da65868f9` ( - `jobid` varchar(32) character set latin1 collate latin1_bin NOT NULL default '', - `value` varchar(255) character set latin1 collate latin1_bin NOT NULL default '', - `full_value` mediumblob NOT NULL, - `origin` int(11) NOT NULL default '0', - KEY `jobid` (`jobid`), - KEY `value` (`value`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1; - --- --- Dumping data for table `attr_a1e9e0a1b7943cc041fefb5da65868f9` --- - - -/*!40000 ALTER TABLE `attr_a1e9e0a1b7943cc041fefb5da65868f9` DISABLE KEYS */; -LOCK TABLES `attr_a1e9e0a1b7943cc041fefb5da65868f9` WRITE; -INSERT INTO `attr_a1e9e0a1b7943cc041fefb5da65868f9` VALUES ('593e62a063231f8c623b74406b3e12b0','Done','S:7201:F::Done',3),('9276789a0093ad44457655ef03ade36a','Ready','S:7201:S::Ready',1); -UNLOCK TABLES; -/*!40000 ALTER TABLE `attr_a1e9e0a1b7943cc041fefb5da65868f9` ENABLE KEYS */; - --- --- Table structure for table `attr_a9c522a79597e1bfd2bd687d42d557b7` --- - -DROP TABLE IF EXISTS `attr_a9c522a79597e1bfd2bd687d42d557b7`; -CREATE TABLE `attr_a9c522a79597e1bfd2bd687d42d557b7` ( - `jobid` varchar(32) character set latin1 collate latin1_bin NOT NULL default '', - `value` varchar(255) character set latin1 collate latin1_bin NOT NULL default '', - `full_value` mediumblob NOT NULL, - `origin` int(11) NOT NULL default '0', - KEY `jobid` (`jobid`), - KEY `value` (`value`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1; - --- --- Dumping data for table `attr_a9c522a79597e1bfd2bd687d42d557b7` --- - - -/*!40000 ALTER TABLE `attr_a9c522a79597e1bfd2bd687d42d557b7` DISABLE KEYS */; -LOCK TABLES `attr_a9c522a79597e1bfd2bd687d42d557b7` WRITE; -UNLOCK TABLES; -/*!40000 ALTER TABLE `attr_a9c522a79597e1bfd2bd687d42d557b7` ENABLE KEYS */; - --- --- Table structure for table `attr_c47f78255056386d2b3da6d506d1f244` --- - -DROP TABLE IF EXISTS `attr_c47f78255056386d2b3da6d506d1f244`; -CREATE TABLE `attr_c47f78255056386d2b3da6d506d1f244` ( - `jobid` varchar(32) character set latin1 collate latin1_bin NOT NULL default '', - `value` varchar(255) character set latin1 collate latin1_bin NOT NULL default '', - `full_value` mediumblob NOT NULL, - `origin` int(11) NOT NULL default '0', - KEY `jobid` (`jobid`), - KEY `value` (`value`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1; - --- --- Dumping data for table `attr_c47f78255056386d2b3da6d506d1f244` --- - - -/*!40000 ALTER TABLE `attr_c47f78255056386d2b3da6d506d1f244` DISABLE KEYS */; -LOCK TABLES `attr_c47f78255056386d2b3da6d506d1f244` WRITE; -INSERT INTO `attr_c47f78255056386d2b3da6d506d1f244` VALUES ('593e62a063231f8c623b74406b3e12b0','VOCE','S:7201:F::VOCE',3); -UNLOCK TABLES; -/*!40000 ALTER TABLE `attr_c47f78255056386d2b3da6d506d1f244` ENABLE KEYS */; - --- --- Table structure for table `attr_d193237d94c17244ebba4ce049759371` --- - -DROP TABLE IF EXISTS `attr_d193237d94c17244ebba4ce049759371`; -CREATE TABLE `attr_d193237d94c17244ebba4ce049759371` ( - `jobid` varchar(32) character set latin1 collate latin1_bin NOT NULL default '', - `value` varchar(255) character set latin1 collate latin1_bin NOT NULL default '', - `full_value` mediumblob NOT NULL, - `origin` int(11) NOT NULL default '0', - KEY `jobid` (`jobid`), - KEY `value` (`value`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1; - --- --- Dumping data for table `attr_d193237d94c17244ebba4ce049759371` --- - - -/*!40000 ALTER TABLE `attr_d193237d94c17244ebba4ce049759371` DISABLE KEYS */; -LOCK TABLES `attr_d193237d94c17244ebba4ce049759371` WRITE; -UNLOCK TABLES; -/*!40000 ALTER TABLE `attr_d193237d94c17244ebba4ce049759371` ENABLE KEYS */; - --- --- Table structure for table `attr_e019a506c890326966714893ac3e8cf5` --- - -DROP TABLE IF EXISTS `attr_e019a506c890326966714893ac3e8cf5`; -CREATE TABLE `attr_e019a506c890326966714893ac3e8cf5` ( - `jobid` varchar(32) character set latin1 collate latin1_bin NOT NULL default '', - `value` varchar(255) character set latin1 collate latin1_bin NOT NULL default '', - `full_value` mediumblob NOT NULL, - `origin` int(11) NOT NULL default '0', - KEY `jobid` (`jobid`), - KEY `value` (`value`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1; - --- --- Dumping data for table `attr_e019a506c890326966714893ac3e8cf5` --- - - -/*!40000 ALTER TABLE `attr_e019a506c890326966714893ac3e8cf5` DISABLE KEYS */; -LOCK TABLES `attr_e019a506c890326966714893ac3e8cf5` WRITE; -UNLOCK TABLES; -/*!40000 ALTER TABLE `attr_e019a506c890326966714893ac3e8cf5` ENABLE KEYS */; - --- --- Table structure for table `attr_e26a86a86bfc6799461d999860e57d81` --- - -DROP TABLE IF EXISTS `attr_e26a86a86bfc6799461d999860e57d81`; -CREATE TABLE `attr_e26a86a86bfc6799461d999860e57d81` ( - `jobid` varchar(32) character set latin1 collate latin1_bin NOT NULL default '', - `value` varchar(255) character set latin1 collate latin1_bin NOT NULL default '', - `full_value` mediumblob NOT NULL, - `origin` int(11) NOT NULL default '0', - KEY `jobid` (`jobid`), - KEY `value` (`value`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1; - --- --- Dumping data for table `attr_e26a86a86bfc6799461d999860e57d81` --- - - -/*!40000 ALTER TABLE `attr_e26a86a86bfc6799461d999860e57d81` DISABLE KEYS */; -LOCK TABLES `attr_e26a86a86bfc6799461d999860e57d81` WRITE; -UNLOCK TABLES; -/*!40000 ALTER TABLE `attr_e26a86a86bfc6799461d999860e57d81` ENABLE KEYS */; - --- --- Table structure for table `attrs` --- - -DROP TABLE IF EXISTS `attrs`; -CREATE TABLE `attrs` ( - `attrid` varchar(32) character set latin1 collate latin1_bin NOT NULL default '', - `name` varchar(255) character set latin1 collate latin1_bin NOT NULL default '', - `indexed` int(11) NOT NULL default '0', - `type` varchar(32) character set latin1 collate latin1_bin default NULL, - PRIMARY KEY (`attrid`), - KEY `attrid` (`attrid`), - KEY `name` (`name`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1; - --- --- Dumping data for table `attrs` --- - - -/*!40000 ALTER TABLE `attrs` DISABLE KEYS */; -LOCK TABLES `attrs` WRITE; -INSERT INTO `attrs` VALUES ('52942b8c70bab8491ab5d3b9713d79f5','http://egee.cesnet.cz/en/Schema/JP/System:owner',1,'mediumblob'),('6bc44144bf813a2ad7d67cb2adbdaf42','http://egee.cesnet.cz/en/Schema/JP/System:jobId',1,'mediumblob'),('862e3dd7c5da90c9a659a32a41f63af8','http://egee.cesnet.cz/en/Schema/JP/System:regtime',0,'mediumblob'),('9892f81a8175c09bd00afcb152f510ad','http://egee.cesnet.cz/en/Schema/LB/Attributes:user',1,'mediumblob'),('e019a506c890326966714893ac3e8cf5','http://egee.cesnet.cz/en/Schema/LB/Attributes:aTag',0,'mediumblob'),('d193237d94c17244ebba4ce049759371','http://egee.cesnet.cz/en/Schema/LB/Attributes:eNodes',0,'mediumblob'),('5023d8d4cc249460dd947a878153027f','http://egee.cesnet.cz/en/Schema/LB/Attributes:RB',1,'mediumblob'),('c47f78255056386d2b3da6d506d1f244','http://egee.cesnet.cz/en/Schema/LB/Attributes:CE',1,'mediumblob'),('29d3ef83b39b8cf690e8113df316835a','http://egee.cesnet.cz/en/Schema/LB/Attributes:UIHost',1,'mediumblob'),('a9c522a79597e1bfd2bd687d42d557b7','http://egee.cesnet.cz/en/Schema/LB/Attributes:CPUTime',0,'mediumblob'),('12aaad5454b6e3e44cb4f4a432336af4','http://egee.cesnet.cz/en/Schema/LB/Attributes:NProc',0,'mediumblob'),('a1e9e0a1b7943cc041fefb5da65868f9','http://egee.cesnet.cz/en/Schema/LB/Attributes:finalStatus',1,'mediumblob'),('760a84e0ff89fa3f4e96ec82adfd92f1','http://egee.cesnet.cz/en/Schema/LB/Attributes:finalStatusDate',0,'mediumblob'),('9a812abe1262a90858b7be792f198596','http://egee.cesnet.cz/en/Schema/LB/Attributes:retryCount',0,'mediumblob'),('e26a86a86bfc6799461d999860e57d81','http://egee.cesnet.cz/en/Schema/LB/Attributes:jobType',0,'mediumblob'),('1005bc536e987ca1e027a5b8f84c9a67','http://egee.cesnet.cz/en/Schema/LB/Attributes:nsubjobs',0,'mediumblob'),('7c3be9defcbcf9f0e7890600d9c204ac','http://egee.cesnet.cz/en/Schema/LB/Attributes:lastStatusHistory',0,'mediumblob'),('982d06bdc65d3a4240b36a060a09886e','http://egee.cesnet.cz/en/Schema/LB/Attributes:fullStatusHistory',0,'mediumblob'); -UNLOCK TABLES; -/*!40000 ALTER TABLE `attrs` ENABLE KEYS */; - --- --- Table structure for table `feeds` --- - -DROP TABLE IF EXISTS `feeds`; -CREATE TABLE `feeds` ( - `uniqueid` int(11) NOT NULL auto_increment, - `feedid` varchar(32) character set latin1 collate latin1_bin default NULL, - `state` int(11) NOT NULL default '0', - `locked` int(11) NOT NULL default '0', - `source` varchar(255) NOT NULL default '', - `expires` datetime default NULL, - `condition` mediumblob, - PRIMARY KEY (`uniqueid`), - UNIQUE KEY `feedid` (`feedid`), - KEY `uniqueid` (`uniqueid`), - KEY `feedid_2` (`feedid`), - KEY `state` (`state`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1; - --- --- Dumping data for table `feeds` --- - - -/*!40000 ALTER TABLE `feeds` DISABLE KEYS */; -LOCK TABLES `feeds` WRITE; -INSERT INTO `feeds` VALUES (93,'12345',8,0,'http://localhost:8901','2005-10-14 10:48:27','COND2'); -UNLOCK TABLES; -/*!40000 ALTER TABLE `feeds` ENABLE KEYS */; - --- --- Table structure for table `jobs` --- - -DROP TABLE IF EXISTS `jobs`; -CREATE TABLE `jobs` ( - `jobid` varchar(32) character set latin1 collate latin1_bin NOT NULL default '', - `dg_jobid` varchar(255) character set latin1 collate latin1_bin NOT NULL default '', - `ownerid` varchar(32) character set latin1 collate latin1_bin NOT NULL default '', - `aclid` varchar(32) character set latin1 collate latin1_bin default NULL, - `ps` varchar(255) NOT NULL default '', - PRIMARY KEY (`jobid`), - UNIQUE KEY `dg_jobid` (`dg_jobid`), - KEY `jobid` (`jobid`), - KEY `dg_jobid_2` (`dg_jobid`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1; - --- --- Dumping data for table `jobs` --- - - -/*!40000 ALTER TABLE `jobs` DISABLE KEYS */; -LOCK TABLES `jobs` WRITE; -INSERT INTO `jobs` VALUES ('593e62a063231f8c623b74406b3e12b0','https://localhost:7846/pokus1','5864429d57da18e4ecf9ea366c6b2c9c',NULL,'http://localhost:8901'),('9276789a0093ad44457655ef03ade36a','https://localhost:7846/pokus2','9996d295b9e10ce182983b258b280779',NULL,'http://localhost:8901'); -UNLOCK TABLES; -/*!40000 ALTER TABLE `jobs` ENABLE KEYS */; - --- --- Table structure for table `users` --- - -DROP TABLE IF EXISTS `users`; -CREATE TABLE `users` ( - `userid` varchar(32) character set latin1 collate latin1_bin NOT NULL default '', - `cert_subj` varchar(255) character set latin1 collate latin1_bin NOT NULL default '', - PRIMARY KEY (`userid`), - UNIQUE KEY `cert_subj` (`cert_subj`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1; - --- --- Dumping data for table `users` --- - - -/*!40000 ALTER TABLE `users` DISABLE KEYS */; -LOCK TABLES `users` WRITE; -INSERT INTO `users` VALUES ('5864429d57da18e4ecf9ea366c6b2c9c','/O=CESNET/O=Masaryk University/CN=Milos Mulac'),('9996d295b9e10ce182983b258b280779','OwnerName'); -UNLOCK TABLES; -/*!40000 ALTER TABLE `users` ENABLE KEYS */; - -/*!40101 SET SQL_MODE=@OLD_SQL_MODE */; -/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; -/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; -/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; -/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; -/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; - diff --git a/org.glite.jp.index/examples/query-tests/exists_query.in b/org.glite.jp.index/examples/query-tests/exists_query.in deleted file mode 100644 index c56c485..0000000 --- a/org.glite.jp.index/examples/query-tests/exists_query.in +++ /dev/null @@ -1,17 +0,0 @@ - - - - - http://egee.cesnet.cz/en/Schema/LB/Attributes:CE - - EXISTS - - - - http://egee.cesnet.cz/en/Schema/JP/System:owner - http://egee.cesnet.cz/en/Schema/JP/System:jobId - http://egee.cesnet.cz/en/Schema/LB/Attributes:finalStatus - http://egee.cesnet.cz/en/Schema/LB/Attributes:user - http://egee.cesnet.cz/en/Schema/LB/Attributes:CE - - diff --git a/org.glite.jp.index/examples/query-tests/exists_query.out b/org.glite.jp.index/examples/query-tests/exists_query.out deleted file mode 100644 index 2fbebf3..0000000 --- a/org.glite.jp.index/examples/query-tests/exists_query.out +++ /dev/null @@ -1,28 +0,0 @@ -query: using JPIS http://localhost:10000 - -Conditions: - http://egee.cesnet.cz/en/Schema/LB/Attributes:CE - origin IS ANY - value EXISTS -Attributes: - http://egee.cesnet.cz/en/Schema/JP/System:owner - http://egee.cesnet.cz/en/Schema/JP/System:jobId - http://egee.cesnet.cz/en/Schema/LB/Attributes:finalStatus - http://egee.cesnet.cz/en/Schema/LB/Attributes:user - http://egee.cesnet.cz/en/Schema/LB/Attributes:CE - -OK -Result 1 jobs: - jobid = https://localhost:7846/pokus1, owner = /O=CESNET/O=Masaryk University/CN=Milos Mulac - http://egee.cesnet.cz/en/Schema/LB/Attributes:finalStatus - value = Done - origin = FILE (no detail) - time = Thu Jan 1 02:00:01 1970 - http://egee.cesnet.cz/en/Schema/LB/Attributes:user - value = CertSubj - origin = FILE (no detail) - time = Thu Jan 1 02:00:01 1970 - http://egee.cesnet.cz/en/Schema/LB/Attributes:CE - value = VOCE - origin = FILE (no detail) - time = Thu Jan 1 02:00:01 1970 diff --git a/org.glite.jp.index/examples/query-tests/jobid_query.in b/org.glite.jp.index/examples/query-tests/jobid_query.in deleted file mode 100644 index 1f57246..0000000 --- a/org.glite.jp.index/examples/query-tests/jobid_query.in +++ /dev/null @@ -1,19 +0,0 @@ - - - - - http://egee.cesnet.cz/en/Schema/JP/System:jobId - - EQUAL - - https://localhost:7846/pokus1 - - - - - http://egee.cesnet.cz/en/Schema/JP/System:owner - http://egee.cesnet.cz/en/Schema/JP/System:jobId - http://egee.cesnet.cz/en/Schema/LB/Attributes:finalStatus - http://egee.cesnet.cz/en/Schema/LB/Attributes:user - - diff --git a/org.glite.jp.index/examples/query-tests/jobid_query.out b/org.glite.jp.index/examples/query-tests/jobid_query.out deleted file mode 100644 index e00d456..0000000 --- a/org.glite.jp.index/examples/query-tests/jobid_query.out +++ /dev/null @@ -1,23 +0,0 @@ -query: using JPIS http://localhost:10000 - -Conditions: - http://egee.cesnet.cz/en/Schema/JP/System:jobId - origin IS ANY - value == https://localhost:7846/pokus1 -Attributes: - http://egee.cesnet.cz/en/Schema/JP/System:owner - http://egee.cesnet.cz/en/Schema/JP/System:jobId - http://egee.cesnet.cz/en/Schema/LB/Attributes:finalStatus - http://egee.cesnet.cz/en/Schema/LB/Attributes:user - -OK -Result 1 jobs: - jobid = https://localhost:7846/pokus1, owner = /O=CESNET/O=Masaryk University/CN=Milos Mulac - http://egee.cesnet.cz/en/Schema/LB/Attributes:finalStatus - value = Done - origin = FILE (no detail) - time = Thu Jan 1 02:00:01 1970 - http://egee.cesnet.cz/en/Schema/LB/Attributes:user - value = CertSubj - origin = FILE (no detail) - time = Thu Jan 1 02:00:01 1970 diff --git a/org.glite.jp.index/examples/query-tests/origin_query.in b/org.glite.jp.index/examples/query-tests/origin_query.in deleted file mode 100644 index 3e398ed..0000000 --- a/org.glite.jp.index/examples/query-tests/origin_query.in +++ /dev/null @@ -1,20 +0,0 @@ - - - - - http://egee.cesnet.cz/en/Schema/LB/Attributes:finalStatus - FILE - - EQUAL - - Done - - - - - http://egee.cesnet.cz/en/Schema/JP/System:owner - http://egee.cesnet.cz/en/Schema/JP/System:jobId - http://egee.cesnet.cz/en/Schema/LB/Attributes:finalStatus - http://egee.cesnet.cz/en/Schema/LB/Attributes:user - - diff --git a/org.glite.jp.index/examples/query-tests/origin_query.out b/org.glite.jp.index/examples/query-tests/origin_query.out deleted file mode 100644 index 573f5d7..0000000 --- a/org.glite.jp.index/examples/query-tests/origin_query.out +++ /dev/null @@ -1,23 +0,0 @@ -query: using JPIS http://localhost:10000 - -Conditions: - http://egee.cesnet.cz/en/Schema/LB/Attributes:finalStatus - origin == FILE - value == Done -Attributes: - http://egee.cesnet.cz/en/Schema/JP/System:owner - http://egee.cesnet.cz/en/Schema/JP/System:jobId - http://egee.cesnet.cz/en/Schema/LB/Attributes:finalStatus - http://egee.cesnet.cz/en/Schema/LB/Attributes:user - -OK -Result 1 jobs: - jobid = https://localhost:7846/pokus1, owner = /O=CESNET/O=Masaryk University/CN=Milos Mulac - http://egee.cesnet.cz/en/Schema/LB/Attributes:finalStatus - value = Done - origin = FILE (no detail) - time = Thu Jan 1 02:00:01 1970 - http://egee.cesnet.cz/en/Schema/LB/Attributes:user - value = CertSubj - origin = FILE (no detail) - time = Thu Jan 1 02:00:01 1970 diff --git a/org.glite.jp.index/examples/query-tests/run-test.sh b/org.glite.jp.index/examples/query-tests/run-test.sh deleted file mode 100755 index 32388a0..0000000 --- a/org.glite.jp.index/examples/query-tests/run-test.sh +++ /dev/null @@ -1,296 +0,0 @@ -#! /bin/bash - -# -# test script for the index server -# -# requires running mysql -# - -LC_ALL=C - -usage() { -cat <&1| \ - grep timeleft| sed 's/^.* //'` - if [ "$timeleft" = "0:00:00" -o -z "$timeleft" ]; then - echo "No valid proxy cert found nor "\ - "GLITE_HOST_KEY/GLITE_HOST_KEY specified!"\ - " Aborting." - exit 1 - fi - else - echo "Can't check proxy cert (grid-proxy-info not found). If you do not have valid proxy certificate, set GLITE_HOST_KEY/GLITE_HOST_KEY - otherwise tests will fail!" - fi - fi - - # handle the configuration - ARGS="-u ${GLITE_JPIS_TEST_ROOT_USER:-root}" - [ -z "$GLITE_JPIS_TEST_ROOT_PASSWORD" ] || ARGS="--password=${GLITE_JPIS_TEST_ROOT_PASSWORD} $ARGS" - GLITE_JPIS_TEST_PORT=${GLITE_JPIS_TEST_PORT:-"10000"} - GLITE_JPIS_TEST_PIDFILE=${GLITE_JPIS_TEST_PIDFILE:-"/tmp/glite-jp-indexd.pid"} - GLITE_JPIS_TEST_LOGFILE=${GLITE_JPIS_TEST_LOGFILE:-"/tmp/glite-jp-indexd.log"} - GLITE_JPIS_TEST_CONFIG=${GLITE_JPIS_TEST_CONFIG:-"$GLITE_LOCATION/etc/glite-jpis-test-config.xml"} - - if [ -z "$GLITE_JPIS_TEST_DB" ]; then - GLITE_JPIS_TEST_DB="jpis/@localhost:jpis1test" - need_new_db=1; - fi - DB_USER=`echo $GLITE_JPIS_TEST_DB| sed 's!/.*$!!'` - DB_HOST=`echo $GLITE_JPIS_TEST_DB| sed 's!^.*@!!' | sed 's!:.*!!'` - DB_NAME=`echo $GLITE_JPIS_TEST_DB| sed 's!^.*:!!'` - - GLITE_JPIS_DEBUG=0 -} - -create_db() { - # create database when needed - if [ "x$need_new_db" = "x1" ]; then - mysqladmin -f $ARGS drop $DB_NAME > /dev/null 2>&1 - mysqladmin -f $ARGS create $DB_NAME && \ - mysql $ARGS -e "GRANT ALL on $DB_NAME.* to jpis@localhost" && \ - mysql -u $DB_USER $DB_NAME < $GLITE_LOCATION/etc/glite-jp-index-dbsetup.sql || exit 1 - db_created="1" - fi -} - -import_db() { - # import database - echo -n "D" - cat $1 | sed "s/jpis1test/$DB_NAME/" | mysql -u $DB_USER -h $DB_HOST - if [ x"$?" != x"0" ]; then - echo "FAILED to import database." - kill_is; - drop_db; - exit 1 - fi - echo -n "B " -} - -drop_db() { - # drop databaze when created - [ -z "$db_created" ] || mysqladmin -f $ARGS drop $DB_NAME >/dev/null - -} - -run_is() { - # check - if [ -f "${GLITE_JPIS_TEST_PIDFILE}" ]; then - echo "Index server already running!" - echo " pid $(cat ${GLITE_JPIS_TEST_PIDFILE})" - echo " pidfile ${GLITE_JPIS_TEST_PIDFILE}" - exit 1 - fi - - echo -n "I" - # run index server - X509_USER_KEY=${X509_USER_KEY} X509_USER_CERT=${X509_USER_CERT} \ - $GLITE_LOCATION/bin/glite-jp-indexd -m $GLITE_JPIS_TEST_DB -p $GLITE_JPIS_TEST_PORT \ - -i ${GLITE_JPIS_TEST_PIDFILE} -o ${GLITE_JPIS_TEST_LOGFILE} \ - -x ${GLITE_JPIS_TEST_CONFIG} $1\ - 2>/tmp/result - - if [ x"$?" != x"0" ]; then - echo FAILED - drop_db; - exit 1 - fi - i=0 - while [ ! -s "${GLITE_JPIS_TEST_PIDFILE}" -a $i -lt 20 ]; do - sleep 0.1 - i=$(($i+1)) - done - if [ ! -s "${GLITE_JPIS_TEST_PIDFILE}" ]; then - echo "Can't startup index server." - kill_is; - drop_db; - exit 1 - fi - - # wait for index server - ret=1 - i=0 - while [ x"$ret" != x"0" -a $i -lt 20 ]; do - netstat -tap 2>/dev/null | grep "\<$GLITE_JPIS_TEST_PORT\>" > /dev/null - ret=$? - i=$(($i+1)) - sleep 0.1 - done - if [ x"$ret" != x"0" ]; then - echo "Index server not started." - kill_is; - drop_db; - exit 1; - fi - echo -n "S " -} - -kill_is() { - # kill the index server - kill `cat ${GLITE_JPIS_TEST_PIDFILE}`; - sleep 1; - kill -9 `cat ${GLITE_JPIS_TEST_PIDFILE}` 2>/dev/null - rm -f ${GLITE_JPIS_TEST_PIDFILE} -} - -run_test_query() { - echo -n "Q" - X509_USER_KEY=${X509_USER_KEY} X509_USER_CERT=${X509_USER_CERT} \ - $GLITE_LOCATION/examples/glite-jpis-client -f hr -q $1 \ - -i http://localhost:$GLITE_JPIS_TEST_PORT > /tmp/result 2>&1 - echo -n "R " - DIFF=`diff -b -B --ignore-matching-lines="query: using JPIS" $2 /tmp/result` - if [ -z "$DIFF" -a "$?" -eq "0" ] ; then - echo "OK." - rm /tmp/result - else - echo "FAILED!" - echo - echo "Expected result (using query $1):" - echo ------------------------------------------------------------------------------ - cat $2 - echo - echo --------------------------------------------------------------------------------------------------- - echo - echo "Obtained result (in /tmp/result):" - echo --------------------------------- - cat /tmp/result - echo - echo --------------------------------------------------------------------------------------------------- - drop_db; - kill_is; - exit 1 - fi -} - -run_test_feed() { - # run the example - X509_USER_KEY=${X509_USER_KEY} X509_USER_CERT=${X509_USER_CERT}\ - $GLITE_LOCATION/examples/glite-jpis-test -p $GLITE_JPIS_TEST_PORT \ - -m $GLITE_JPIS_TEST_DB -x $GLITE_JPIS_TEST_CONFIG &>/tmp/result - numok="$(cat /tmp/result | grep -c OK)" - if [ "$numok" -eq "2" ]; then - echo OK. - else - echo FAILED! - echo --------------------------------------------------------------------------------------------------- - echo - echo "Obtained result (in /tmp/result):" - echo --------------------------------- - cat /tmp/result - echo - echo --------------------------------------------------------------------------------------------------- - drop_db; - kill_is; - exit 1 - fi -} - - -########################################################################## -# - -if [ "$1" ]; then usage; exit 1; fi -init; - -echo - -echo -n "Simple query test.... " -create_db; -run_is "-n"; -import_db $GLITE_LOCATION/examples/query-tests/dump1.sql; -run_test_query $GLITE_LOCATION/examples/query-tests/simple_query.in $GLITE_LOCATION/examples/query-tests/simple_query.out; -drop_db; -kill_is; - -echo -n "Complex query test... " -create_db; -run_is "-n"; -import_db $GLITE_LOCATION/examples/query-tests/dump1.sql; -run_test_query $GLITE_LOCATION/examples/query-tests/complex_query.in $GLITE_LOCATION/examples/query-tests/complex_query.out; -drop_db; -kill_is; - -echo -n "Feed & query test.... " -create_db; -run_is; -run_test_feed; -drop_db; -kill_is; - -echo -n "Authz test........... " -create_db; -run_is; -import_db $GLITE_LOCATION/examples/query-tests/dump1.sql; -run_test_query $GLITE_LOCATION/examples/query-tests/simple_query.in $GLITE_LOCATION/examples/query-tests/authz.out; -drop_db; -kill_is; - -echo -n "Query jobId test..... " -create_db; -run_is "-n"; -import_db $GLITE_LOCATION/examples/query-tests/dump1.sql; -run_test_query $GLITE_LOCATION/examples/query-tests/jobid_query.in $GLITE_LOCATION/examples/query-tests/jobid_query.out; -drop_db; -kill_is; - -echo -n "Origin test.......... " -create_db; -run_is "-n"; -import_db $GLITE_LOCATION/examples/query-tests/dump1.sql; -run_test_query $GLITE_LOCATION/examples/query-tests/origin_query.in $GLITE_LOCATION/examples/query-tests/origin_query.out; -drop_db; -kill_is; - -echo -n "EXISTS test.......... " -create_db; -run_is "-n"; -import_db $GLITE_LOCATION/examples/query-tests/dump1.sql; -run_test_query $GLITE_LOCATION/examples/query-tests/exists_query.in $GLITE_LOCATION/examples/query-tests/exists_query.out; -drop_db; -kill_is; - -echo -n "WITHIN test.......... " -create_db; -run_is "-n"; -import_db $GLITE_LOCATION/examples/query-tests/dump1.sql; -run_test_query $GLITE_LOCATION/examples/query-tests/within_query.in $GLITE_LOCATION/examples/query-tests/within_query.out; -drop_db; -kill_is; diff --git a/org.glite.jp.index/examples/query-tests/simple_query.in b/org.glite.jp.index/examples/query-tests/simple_query.in deleted file mode 100644 index 3a32ae3..0000000 --- a/org.glite.jp.index/examples/query-tests/simple_query.in +++ /dev/null @@ -1,19 +0,0 @@ - - - - - http://egee.cesnet.cz/en/Schema/LB/Attributes:finalStatus - - EQUAL - - Ready - - - - - http://egee.cesnet.cz/en/Schema/JP/System:owner - http://egee.cesnet.cz/en/Schema/JP/System:jobId - http://egee.cesnet.cz/en/Schema/LB/Attributes:finalStatus - http://egee.cesnet.cz/en/Schema/LB/Attributes:user - - diff --git a/org.glite.jp.index/examples/query-tests/simple_query.out b/org.glite.jp.index/examples/query-tests/simple_query.out deleted file mode 100644 index 3426131..0000000 --- a/org.glite.jp.index/examples/query-tests/simple_query.out +++ /dev/null @@ -1,23 +0,0 @@ -query: using JPIS http://localhost:10000 - -Conditions: - http://egee.cesnet.cz/en/Schema/LB/Attributes:finalStatus - origin IS ANY - value == Ready -Attributes: - http://egee.cesnet.cz/en/Schema/JP/System:owner - http://egee.cesnet.cz/en/Schema/JP/System:jobId - http://egee.cesnet.cz/en/Schema/LB/Attributes:finalStatus - http://egee.cesnet.cz/en/Schema/LB/Attributes:user - -OK -Result 1 jobs: - jobid = https://localhost:7846/pokus2, owner = OwnerName - http://egee.cesnet.cz/en/Schema/LB/Attributes:finalStatus - value = Ready - origin = SYSTEM (no detail) - time = Thu Jan 1 02:00:01 1970 - http://egee.cesnet.cz/en/Schema/LB/Attributes:user - value = CertSubj - origin = SYSTEM (no detail) - time = Thu Jan 1 02:00:01 1970 diff --git a/org.glite.jp.index/examples/query-tests/within_query.in b/org.glite.jp.index/examples/query-tests/within_query.in deleted file mode 100644 index e40d902..0000000 --- a/org.glite.jp.index/examples/query-tests/within_query.in +++ /dev/null @@ -1,19 +0,0 @@ - - - - - http://egee.cesnet.cz/en/Schema/LB/Attributes:CE - - WITHIN - VOCA - VOCI - - - - http://egee.cesnet.cz/en/Schema/JP/System:owner - http://egee.cesnet.cz/en/Schema/JP/System:jobId - http://egee.cesnet.cz/en/Schema/LB/Attributes:finalStatus - http://egee.cesnet.cz/en/Schema/LB/Attributes:user - http://egee.cesnet.cz/en/Schema/LB/Attributes:CE - - diff --git a/org.glite.jp.index/examples/query-tests/within_query.out b/org.glite.jp.index/examples/query-tests/within_query.out deleted file mode 100644 index c1d7251..0000000 --- a/org.glite.jp.index/examples/query-tests/within_query.out +++ /dev/null @@ -1,28 +0,0 @@ -query: using JPIS http://localhost:12002 - -Conditions: - http://egee.cesnet.cz/en/Schema/LB/Attributes:CE - origin IS ANY - value WITHIN VOCA AND VOCI -Attributes: - http://egee.cesnet.cz/en/Schema/JP/System:owner - http://egee.cesnet.cz/en/Schema/JP/System:jobId - http://egee.cesnet.cz/en/Schema/LB/Attributes:finalStatus - http://egee.cesnet.cz/en/Schema/LB/Attributes:user - http://egee.cesnet.cz/en/Schema/LB/Attributes:CE - -OK -Result 1 jobs: - jobid = https://localhost:7846/pokus1, owner = /O=CESNET/O=Masaryk University/CN=Milos Mulac - http://egee.cesnet.cz/en/Schema/LB/Attributes:finalStatus - value = Done - origin = FILE (no detail) - time = Thu Jan 1 02:00:01 1970 - http://egee.cesnet.cz/en/Schema/LB/Attributes:user - value = CertSubj - origin = FILE (no detail) - time = Thu Jan 1 02:00:01 1970 - http://egee.cesnet.cz/en/Schema/LB/Attributes:CE - value = VOCE - origin = FILE (no detail) - time = Thu Jan 1 02:00:01 1970 diff --git a/org.glite.jp.index/interface/JobProvenanceISClient.xsd b/org.glite.jp.index/interface/JobProvenanceISClient.xsd deleted file mode 100644 index 2cf0755..0000000 --- a/org.glite.jp.index/interface/JobProvenanceISClient.xsd +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/org.glite.jp.index/project/build.number b/org.glite.jp.index/project/build.number deleted file mode 100644 index 5a6321a..0000000 --- a/org.glite.jp.index/project/build.number +++ /dev/null @@ -1,2 +0,0 @@ -#Fri Oct 14 15:22:37 CEST 2005 -module.build=12 diff --git a/org.glite.jp.index/project/build.properties b/org.glite.jp.index/project/build.properties deleted file mode 100644 index e69de29..0000000 diff --git a/org.glite.jp.index/project/configure.properties.xml b/org.glite.jp.index/project/configure.properties.xml deleted file mode 100644 index 5406d55..0000000 --- a/org.glite.jp.index/project/configure.properties.xml +++ /dev/null @@ -1,74 +0,0 @@ - - - - - - - - - - - -top_srcdir=.. -builddir=build -stagedir=${stage.abs.dir} -distdir=${dist.dir} -globalprefix=${global.prefix} -lbprefix=${subsystem.prefix} -package=${module.package.name} -PREFIX=${install.dir} -version=${module.version} -glite_location=${with.glite.location} -globus_prefix=${with.globus.prefix} -expat_prefix=${with.expat.prefix} -gsoap_prefix=${with.gsoap.prefix} -gsoap_version=${ext.gsoap.version} -mysql_prefix=${with.mysql.prefix} -mysql_version=${ext.mysql.version} -thrflavour=${with.globus.thr.flavor} -nothrflavour=${with.globus.nothr.flavor} -cppunit=${with.cppunit.prefix} -jpproject=${subsystem.project.dir} -project=${component.project.dir} - - - diff --git a/org.glite.jp.index/project/properties.xml b/org.glite.jp.index/project/properties.xml deleted file mode 100755 index 5f56392..0000000 --- a/org.glite.jp.index/project/properties.xml +++ /dev/null @@ -1,52 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/org.glite.jp.index/project/tar_exclude b/org.glite.jp.index/project/tar_exclude deleted file mode 100644 index e1fcd1a..0000000 --- a/org.glite.jp.index/project/tar_exclude +++ /dev/null @@ -1,10 +0,0 @@ -tar_exclude -CVS -build.xml -build -build.properties -properties.xml -configure.properties.xml -.cvsignore -.project -.cdtproject diff --git a/org.glite.jp.index/project/version.properties b/org.glite.jp.index/project/version.properties deleted file mode 100644 index 1441742..0000000 --- a/org.glite.jp.index/project/version.properties +++ /dev/null @@ -1,2 +0,0 @@ -module.version=1.3.0 -module.age=1 diff --git a/org.glite.jp.index/src/bones_server.c b/org.glite.jp.index/src/bones_server.c deleted file mode 100644 index 279254c..0000000 --- a/org.glite.jp.index/src/bones_server.c +++ /dev/null @@ -1,467 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include - -#include -#include - -#include - -#include -#include -#include - -#include "conf.h" -#include "db_ops.h" -#include "soap_ps_calls.h" -#include "context.h" -#include "common_server.h" - -#include "soap_version.h" -#include "jp_H.h" -#include "jp_.nsmap" - -#if GSOAP_VERSION <= 20602 -#define soap_call___jpsrv__FeedIndex soap_call___ns1__FeedIndex -#define soap_call___jpsrv__FeedIndexRefresh soap_call___ns1__FeedIndexRefresh -#endif - -#define CONN_QUEUE 20 -#define MAX_SLAVES_NUM 20 // max. of slaves to be spawned -#define USER_QUERY_SLAVES_NUM 2 // # of slaves reserved for user queries if - // # PS to conntact is << MAX_SLAVES_NUM - -#define RECONNECT_TIME 60*20 // when try reconnect to PS in case of error (in sec) -#define RECONNECT_TIME_QUICK 1 // time between feed requests -#define REACTION_TIME 60*2 // when try reconnect to PS in case of new feeds (in sec) -#define LAUNCH_TIME 2 // wait (for starting slaves) before requesting feeds - - -extern SOAP_NMAC struct Namespace jp__namespaces[],jpps__namespaces[]; - -int newconn(int,struct timeval *,void *); -int request(int,struct timeval *,void *); -static int reject(int); -static int disconn(int,struct timeval *,void *); -int data_init(void **data); -#ifndef ONETIME_FEEDS -int feed_loop_slave(void); -#endif - - -static struct glite_srvbones_service stab = { - "JP Index Server", -1, newconn, request, reject, disconn -}; - -static time_t cert_mtime; -static char *server_cert, *server_key, *cadir; -static gss_cred_id_t mycred = GSS_C_NO_CREDENTIAL; -static char *mysubj; - -static char *port = GLITE_JPIS_DEFAULT_PORT_STR; -static int debug = 1; - -static glite_jp_context_t ctx; -static glite_jp_is_conf *conf; // Let's make configuration visible to all slaves - - -int main(int argc, char *argv[]) -{ - int one = 1, nfeeds; - edg_wll_GssStatus gss_code; - struct sockaddr_in a; - glite_jpis_context_t isctx; - - - glite_jp_init_context(&ctx); - - if (glite_jp_get_conf(argc, argv, &conf)) { - glite_jp_free_context(ctx); - exit(1); - } - glite_jpis_init_context(&isctx, ctx, conf); - - /* connect to DB */ - if (glite_jpis_init_db(isctx) != 0) { - fprintf(stderr, "Connect DB failed: %s (%s)\n", ctx->error->desc, ctx->error->source); - glite_jpis_free_context(isctx); - glite_jp_free_context(ctx); - glite_jp_free_conf(conf); - return 1; - } - - /* daemonize */ - if (!conf->debug) glite_jpis_daemonize("glite-jp-indexd", conf->pidfile, conf->logfile); - - /* XXX preliminary support for plugins - for (i=0; conf->plugins[i]; i++) - glite_jp_typeplugin_load(ctx,conf->plugins[i]); - */ - - - if (glite_jpis_dropDatabase(isctx) != 0) { - fprintf(stderr, "Drop DB failed: %s (%s)\n", ctx->error->desc, ctx->error->source); - glite_jpis_free_db(isctx); - glite_jpis_free_context(isctx); - glite_jp_free_context(ctx); - glite_jp_free_conf(conf); - return 1; - } - - if (glite_jpis_initDatabase(isctx) != 0) { - fprintf(stderr, "Init DB failed: %s (%s)\n", ctx->error->desc, ctx->error->source); - glite_jpis_free_db(isctx); - glite_jpis_free_context(isctx); - glite_jp_free_context(ctx); - glite_jp_free_conf(conf); - return 1; - } - - stab.conn = socket(PF_INET, SOCK_STREAM, 0); - if (stab.conn < 0) { - perror("socket"); - return 1; - } - - setsockopt(stab.conn,SOL_SOCKET, SO_REUSEADDR, &one, sizeof(one)); - - if (conf->port) port = conf->port; - a.sin_family = AF_INET; - a.sin_addr.s_addr = INADDR_ANY; - a.sin_port = htons(atoi(port)); - if (bind(stab.conn,(struct sockaddr *) &a, sizeof(a)) ) { - char buf[200]; - - snprintf(buf,sizeof(buf),"bind(%d)",atoi(port)); - perror(buf); - return 1; - } - - if (listen(stab.conn,CONN_QUEUE)) { - perror("listen()"); - return 1; - } - - server_cert = conf->server_cert; - server_key = conf->server_key; - - if (!server_cert || !server_key) - fprintf(stderr, "%s: WARNING: key or certificate file not specified, " - "can't watch them for changes\n", - argv[0]); - - if ( cadir ) setenv("X509_CERT_DIR", cadir, 1); - edg_wll_gss_watch_creds(server_cert, &cert_mtime); - - if ( !edg_wll_gss_acquire_cred_gsi(server_cert, server_key, &mycred, &mysubj, &gss_code)) - fprintf(stderr,"Server idenity: %s\n",mysubj); - else fputs("WARNING: Running unauthenticated\n",stderr); - - // XXX: more tests needed - if (conf->feeds) - for (nfeeds=0; conf->feeds[nfeeds]; nfeeds++); - else nfeeds = 0; - if (conf->slaves <= 0) { - // add some slaves for user queries and PS responses - conf->slaves = nfeeds + (USER_QUERY_SLAVES_NUM - 1); - if (conf->slaves > MAX_SLAVES_NUM) conf->slaves = MAX_SLAVES_NUM; - } - // - // SUM(PS, feeds(PS) - slaves(PS)) slaves would be blocked - // when waited for all PS - // - // wild guess for slaves(PS) == 1 on all PS: - // 1 + SUM(PS, feeds(PS) - 1) slaves is required, - // SUM(PS, feeds(PS)) is enough. - // - if (conf->slaves < nfeeds) { - fprintf(stderr, "WARNING: %d slaves can be too low for %d feeds\n", conf->slaves, nfeeds); - } - glite_srvbones_set_param(GLITE_SBPARAM_SLAVES_COUNT, conf->slaves); -#ifndef ONETIME_FEEDS - if (feed_loop_slave() < 0) { - fprintf(stderr, "forking feed_loop_slave failed!\n"); - } else -#endif - glite_srvbones_run(data_init,&stab,1 /* XXX: entries in stab */,debug); - - glite_jpis_free_db(isctx); - glite_jp_free_conf(conf); - glite_jpis_free_context(isctx); - glite_jp_free_context(ctx); - - return 0; -} - - -/* looking for some feed in DB */ -int feed_caller(glite_jpis_context_t isctx, glite_jp_is_conf *conf) { - char *PS_URL; - long int uniqueid; - int i, ok; - - // dirty hack - try quicker several times first - glite_jp_clear_error(isctx->jpctx); - switch (glite_jpis_lockUninitializedFeed(isctx,&uniqueid,&PS_URL)) { - case 0: - ok = 0; - for (i = 0; i < 10; i++) { - // contact PS server, ask for data, save - // feedId and expiration to DB and unlock feed - if (MyFeedIndex(isctx, conf, uniqueid, PS_URL) != 0) { - // error when connecting to PS - printf("[%d] %s: %s (%s), reconnecting later\n", getpid(), __FUNCTION__, isctx->jpctx->error->desc, isctx->jpctx->error->source); - } else { - free(PS_URL); - ok = 1; - break; - } - } - if (!ok) glite_jpis_tryReconnectFeed(isctx, uniqueid, time(NULL) + RECONNECT_TIME); - sleep(RECONNECT_TIME_QUICK); - - return 1; - case ENOENT: - // no more feeds to initialize - return 0; - default: - // error during locking - printf("[%d] %s: Locking error: ", getpid(), __FUNCTION__); - if (isctx->jpctx->error) printf("%s (%d)\n", isctx->jpctx->error->desc, isctx->jpctx->error->code); - else printf("\n"); - return -1; - } -} - - -#ifndef ONETIME_FEEDS -int feed_loop_slave(void) { - pid_t pid; - glite_jpis_context_t isctx; - - if ( (pid = fork()) ) return pid; - - glite_jpis_init_context(&isctx, ctx, conf); - if (glite_jpis_init_db(isctx) != 0) { - printf("[%d] %s: DB error: %s (%s)\n", getpid(), __FUNCTION__, ctx->error->desc, ctx->error->source); - exit(1); - } - - printf("[%d] %s: waiting before feed requests...\n", getpid(), __FUNCTION__); - sleep(LAUNCH_TIME); - printf("[%d] %s: feeder slave started\n", getpid(), __FUNCTION__); - do { - switch (feed_caller(isctx, conf)) { - case 1: break; - case 0: - sleep(REACTION_TIME); - break; - default: - printf("[%d] %s: feed locking error, slave terminated\n", getpid(), __FUNCTION__); - exit(1); - } - } while (1); - - printf("[%d] %s: slave terminated\n", getpid(), __FUNCTION__); - exit(0); -} -#endif - - -/* slave's init comes here */ -int data_init(void **data) -{ - slave_data_t *private; - - private = calloc(sizeof(*private), 1); - glite_jpis_init_context(&private->ctx, ctx, conf); - if (glite_jpis_init_db(private->ctx) != 0) { - printf("[%d] slave_init(): DB error: %s (%s)\n",getpid(),ctx->error->desc,ctx->error->source); - return -1; - } - - printf("[%d] slave started\n",getpid()); - private->soap = soap_new(); - -#if ONETIME_FEEDS - /* ask PS server for data */ - do { - switch (feed_caller(private->ctx, conf)) { - case 1: - // one feed handled - break; - case 0: - // no more feeds to initialize - *data = (void *) private; - return 0; - default: - // error during locking - glite_jpis_free_db(private->ctx); - glite_jpis_free_context(private->ctx); - return -1; - } - } while (1); -#else - *data = (void *) private; - return 0; -#endif -} - - -int newconn(int conn,struct timeval *to,void *data) -{ - slave_data_t *private = (slave_data_t *)data; - struct soap *soap = private->soap; - glite_jp_context_t ctx = private->ctx->jpctx; - glite_gsplugin_Context plugin_ctx; - - gss_cred_id_t newcred = GSS_C_NO_CREDENTIAL; - edg_wll_GssStatus gss_code; - gss_name_t client_name = GSS_C_NO_NAME; - gss_buffer_desc token = GSS_C_EMPTY_BUFFER; - OM_uint32 maj_stat,min_stat; - int ret = 0; - - - soap_init2(soap,SOAP_IO_KEEPALIVE,SOAP_IO_KEEPALIVE); - soap_set_omode(soap, SOAP_IO_BUFFER); // set buffered response - // buffer set to SOAP_BUFLEN (default = 8k) - soap_set_namespaces(soap,jp__namespaces); - soap->user = (void *) private; - - glite_gsplugin_init_context(&plugin_ctx); - plugin_ctx->connection = calloc(1,sizeof *plugin_ctx->connection); - - switch (edg_wll_gss_watch_creds(server_cert,&cert_mtime)) { - case 0: break; - case 1: if (!edg_wll_gss_acquire_cred_gsi(server_cert,server_key, - &newcred,NULL,&gss_code)) - { - - printf("[%d] reloading credentials\n",getpid()); /* XXX: log */ - gss_release_cred(&min_stat,&mycred); - mycred = newcred; - } - break; - case -1: - printf("[%d] edg_wll_gss_watch_creds failed\n", getpid()); /* XXX: log */ - break; - } - - /* TODO: DNS paranoia etc. */ - - if (edg_wll_gss_accept(mycred,conn,to,plugin_ctx->connection,&gss_code)) { - char *et; - - edg_wll_gss_get_error(&gss_code,"",&et); - - fprintf(stderr,"[%d] GSS connection accept failed: %s\nClosing connection.\n",getpid(),et); - free(et); - ret = 1; - goto cleanup; - } - - maj_stat = gss_inquire_context(&min_stat,plugin_ctx->connection->context, - &client_name, NULL, NULL, NULL, NULL, NULL, NULL); - - if (!GSS_ERROR(maj_stat)) - maj_stat = gss_display_name(&min_stat,client_name,&token,NULL); - - if (ctx->peer) free(ctx->peer); - if (!GSS_ERROR(maj_stat)) { - printf("[%d] client DN: %s\n",getpid(),(char *) token.value); /* XXX: log */ - - ctx->peer = strdup(token.value); - memset(&token, 0, sizeof(token)); - } - else { - printf("[%d] annonymous client\n",getpid()); - ctx->peer = NULL; - } - - if (client_name != GSS_C_NO_NAME) gss_release_name(&min_stat, &client_name); - if (token.value) gss_release_buffer(&min_stat, &token); - - soap_register_plugin_arg(soap,glite_gsplugin,plugin_ctx); - - return 0; - -cleanup: - glite_gsplugin_free_context(plugin_ctx); - soap_end(soap); - - return ret; -} - -int request(int conn UNUSED,struct timeval *to,void *data) -{ - slave_data_t *private = (slave_data_t *)data; - struct soap *soap = private->soap; - glite_jp_context_t ctx = private->ctx->jpctx; - - glite_gsplugin_set_timeout(glite_gsplugin_get_context(soap),to); - - soap->max_keep_alive = 1; /* XXX: prevent gsoap to close connection */ - soap_begin(soap); - if (soap_begin_recv(soap)) { - if (soap->error < SOAP_STOP) { - soap_send_fault(soap); - return EIO; - } - return ENOTCONN; - } - - soap->keep_alive = 1; - if (soap_envelope_begin_in(soap) - || soap_recv_header(soap) - || soap_body_begin_in(soap) - || jp__serve_request(soap) -#if GSOAP_VERSION >= 20700 - || (soap->fserveloop && soap->fserveloop(soap)) -#endif - ) - { - soap_send_fault(soap); // sets soap->keep_alive back to 0 :( - // and closes connection - if (ctx->error) { - /* XXX: shall we die on some errors? */ - int err = ctx->error->code; - glite_jp_clear_error(ctx); - return err == EIO ? -err : err; /* EIO is fatal */ - } - - return ECANCELED; // let srv_bones know something is wrong - } - - glite_jp_run_deferred(ctx); - return ENOTCONN; -} - -static int reject(int conn) -{ - int flags = fcntl(conn, F_GETFL, 0); - - fcntl(conn,F_SETFL,flags | O_NONBLOCK); - edg_wll_gss_reject(conn); - - return 0; -} - -static int disconn(int conn UNUSED,struct timeval *to UNUSED,void *data) -{ - slave_data_t *private = (slave_data_t *)data; - struct soap *soap = private->soap; - -// XXX: belongs to "data_init complement" -// glite_jpis_free_db(private->ctx); -// glite_jpis_free_context(private->ctx); - soap_end(soap); // clean up everything and close socket - - return 0; -} - - diff --git a/org.glite.jp.index/src/common.c b/org.glite.jp.index/src/common.c deleted file mode 100644 index caa0f89..0000000 --- a/org.glite.jp.index/src/common.c +++ /dev/null @@ -1,53 +0,0 @@ -#ident "$Header$" - -#include -#include -#include -#include - -#include -#include - -#include "common.h" - -#define WHITE_SPACE_SET "\n\r \t" - - -void glite_jpis_trim_soap(struct soap *soap, char **soap_str) { - size_t pos, len; - char *s; - - if (!*soap_str) return; - - pos = strspn(*soap_str, WHITE_SPACE_SET); - len = strcspn(*soap_str + pos, WHITE_SPACE_SET); - s = soap_malloc(soap, len + 1); - memcpy(s, *soap_str + pos, len); - s[len] = '\0'; - - soap_dealloc(soap, *soap_str); - *soap_str = s; -} - - -int glite_jpis_stack_error_source(glite_jp_context_t ctx, int code, const char *func, int line, const char *descfmt, ...) { - glite_jp_error_t err; - char *source, *desc; - va_list ap; - - va_start(ap, descfmt); - - asprintf(&source, "%s:%d", func, line); - if (descfmt) vasprintf(&desc, descfmt, ap); - else desc = NULL; - memset(&err, 0, sizeof err); - err.code = code; - err.desc = desc; - err.source = source; - glite_jp_stack_error(ctx, &err); - free(source); - free(desc); - - va_end(ap); - return code; -} diff --git a/org.glite.jp.index/src/common.h b/org.glite.jp.index/src/common.h deleted file mode 100644 index 4a38bb8..0000000 --- a/org.glite.jp.index/src/common.h +++ /dev/null @@ -1,15 +0,0 @@ -#ident "$Header$" - -#ifndef GLITE_JPIS_COMMON_H -#define GLITE_JPIS_COMMON_H - -#include -#include - -void glite_jpis_trim_soap(struct soap *soap, char **soap_str); - -int glite_jpis_stack_error_source(glite_jp_context_t ctx, int code, const char *func, int line, const char *desc, ...); - -#define glite_jpis_stack_error(CTX, CODE, DESCFMT...) glite_jpis_stack_error_source((CTX), (CODE), __FUNCTION__, __LINE__, ##DESCFMT); - -#endif diff --git a/org.glite.jp.index/src/common_server.c b/org.glite.jp.index/src/common_server.c deleted file mode 100644 index a815293..0000000 --- a/org.glite.jp.index/src/common_server.c +++ /dev/null @@ -1,75 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include -#include -#include - -/* TODO: belongs to server-bones */ - -int glite_jpis_daemonize(const char *servername, const char *custom_pidfile, const char *custom_logfile) { - int lfd, opid; - FILE *fpid; - pid_t master; - char *pidfile, *logfile; - - if (!custom_logfile) { - asprintf(&logfile, "%s/%s.log", geteuid() == 0 ? "/var/log" : getenv("HOME"), servername); - } else { - logfile = NULL; - } - lfd = open(logfile ? logfile : custom_logfile,O_CREAT|O_TRUNC|O_WRONLY,0600); - if (lfd < 0) { - fprintf(stderr,"%s: %s: %s\n",servername,logfile,strerror(errno)); - free(logfile); - return 0; - } -// printf("logfile: %s\n", logfile ? logfile : custom_logfile); - free(logfile); - - if (daemon(0,1) == -1) { - perror("can't daemonize"); - return 0; - } - dup2(lfd,1); - dup2(lfd,2); - - if (!custom_pidfile) { - asprintf(&pidfile, "%s/%s.pid", geteuid() == 0 ? "/var/run" : getenv("HOME"), servername); - } else { - pidfile = strdup(custom_pidfile); - } -// printf("pidfile: %s\n", pidfile ? pidfile : custom_pidfile); - setpgrp(); /* needs for signalling */ - master = getpid(); - fpid = fopen(pidfile,"r"); - if ( fpid ) - { - opid = -1; - - if ( fscanf(fpid,"%d",&opid) == 1 ) - { - if ( !kill(opid,0) ) - { - fprintf(stderr,"%s: another instance running, pid = %d\n",servername,opid); - return 0; - } - else if (errno != ESRCH) { perror("kill()"); return 0; } - } - fclose(fpid); - } else if (errno != ENOENT) { perror(pidfile); free(pidfile); return 0; } - - if (((fpid = fopen(pidfile, "w")) == NULL) || - (fprintf(fpid, "%d", getpid()) <= 0) || - (fclose(fpid) != 0)) { - perror(pidfile); - free(pidfile); - return 0; - } - - free(pidfile); - return 1; -} diff --git a/org.glite.jp.index/src/common_server.h b/org.glite.jp.index/src/common_server.h deleted file mode 100644 index 45db839..0000000 --- a/org.glite.jp.index/src/common_server.h +++ /dev/null @@ -1,6 +0,0 @@ -#ifndef GLITE_JPIS_COMMON_SERVER_H -#define GLITE_JPIS_COMMON_SERVER_H - -int glite_jpis_daemonize(const char *servername, const char *custom_pidfile, const char *custom_logfile); - -#endif diff --git a/org.glite.jp.index/src/conf.c b/org.glite.jp.index/src/conf.c deleted file mode 100644 index 767a120..0000000 --- a/org.glite.jp.index/src/conf.c +++ /dev/null @@ -1,286 +0,0 @@ -/* Module for obtaining configuration for Index Server */ - -#ident "$Header$" - -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include "soap_version.h" -#include - -#include "conf.h" -#include "db_ops.h" -#include "ws_is_typeref.h" - -#include - - -extern SOAP_NMAC struct Namespace jp__namespaces[]; - -static const char *get_opt_string = "dq:c:k:C:V:nm:p:i:o:x:s:"; - -static struct option opts[] = { - {"debug", 0, NULL, 'd'}, - {"query-type", 1, NULL, 'q'}, - {"cert", 1, NULL, 'c'}, - {"key", 1, NULL, 'k'}, -// {"CAdir", 1, NULL, 'C'}, -// {"VOMSdir", 1, NULL, 'V'}, - {"noauth", 0, NULL, 'n'}, - {"mysql", 1, NULL, 'm'}, - {"port", 1, NULL, 'p'}, - {"pidfile", 1, NULL, 'i'}, - {"logfile", 1, NULL, 'o'}, - {"config", 1, NULL, 'x'}, - {"slaves", 1, NULL, 's'}, - {NULL, 0, NULL, 0} -}; - -static int read_conf(glite_jp_is_conf *conf, char *conf_file); -#if 0 -static int dump_conf(void); -#endif - -static void usage(char *me) -{ - fprintf(stderr,"usage: %s [option]\n" - "\t-d, --debug\t don't run as daemon, additional diagnostics\n" - "\t-q, --query-type hist/cont/both (default history)\n" - "\t-k, --key\t private key file\n" - "\t-c, --cert\t certificate file\n" -// "\t-C, --CAdir\t trusted certificates directory\n" -// "\t-V, --VOMSdir\t trusted VOMS servers certificates directory\n" - "\t-n, --noauth\t don't check user identity with result owner\n" - "\t-m, --mysql\t database connect string\n" - "\t-p, --port\t port to listen\n" - "\t-i, --pidfile\t file to store master pid\n" - "\t-o, --logfile\t file to store logs\n" - "\t-x, --config\t file with server configuration\n" - "\t-s, --slaves\t number of slaves for responses\n" - "\n" - ,me); -} - - -int glite_jp_get_conf(int argc, char **argv, glite_jp_is_conf **configuration) -{ - char *qt = NULL, *conf_file = NULL; - int opt; - glite_jp_is_conf *conf; - - - conf = calloc(1, sizeof(*conf)); - - while ((opt = getopt_long(argc,argv,get_opt_string,opts,NULL)) != EOF) switch (opt) { - case 'd': conf->debug = 1; break; - case 'q': qt = optarg; break; - case 'c': conf->server_cert = optarg; break; - case 'k': conf->server_key = optarg; break; -// case 'C': cadir = optarg; break; -// case 'V': vomsdir = optarg; break; - case 'n': conf->no_auth = 1; break; - case 'm': conf->cs = optarg; break; - case 'p': conf->port = optarg; break; - case 'i': conf->pidfile = optarg; break; - case 'o': conf->logfile = optarg; break; - case 'x': conf_file = optarg; break; - case 's': conf->slaves = atoi(optarg); if (conf->slaves > 0) break; - default : usage(argv[0]); exit(0); break; - } - - if (!conf->cs) { - fprintf(stderr,"DB contact string not specified! "\ - "Using build-in default: %s \n", GLITE_JP_IS_DEFAULTCS); - } - if (!conf->port) { - fprintf(stderr,"JP IS port not specified! "\ - "Using build-in default: %s \n", GLITE_JPIS_DEFAULT_PORT_STR); - } - - if (!conf_file) { - fprintf(stderr,"JP IS configuration file must be specified! "\ - "Exiting.\n"); - return 1; - } - else { - if (read_conf(conf, conf_file) != 0) return 1; - } - - *configuration = conf; - - return 0; -} - - -void glite_jp_free_conf(glite_jp_is_conf *conf) -{ - size_t i, j; - glite_jp_is_feed *feed; - - if (!conf) return; - - if (conf->attrs) for (i = 0; conf->attrs[i]; i++) free(conf->attrs[i]); - if (conf->indexed_attrs) for (i = 0; conf->indexed_attrs[i]; i++) free(conf->indexed_attrs[i]); - if (conf->plugins) for (i = 0; conf->plugins[i]; i++) free(conf->plugins[i]); - if (conf->feeds) for (i = 0; conf->feeds[i]; i++) { - feed = conf->feeds[i]; - free(feed->PS_URL); - for (j = 0; feed->query[j].attr; j++) glite_jp_free_query_rec(&feed->query[j]); - free(feed->query); - free(feed); - } - free(conf->attrs); - free(conf->indexed_attrs); - free(conf->plugins); - free(conf->feeds); - free(conf); -} - - -void glite_jp_lprintf(const char *source, const char *fmt, ...) { - va_list ap; - - printf("[%d] %s: ", getpid(), source); - va_start(ap, fmt); - vprintf(fmt, ap); - va_end(ap); -} - -/* - * Reads configuration from XML conf. file - */ -static int read_conf(glite_jp_is_conf *conf, char *conf_file) -{ - struct soap soap; - struct _jpelem__ServerConfigurationResponse out; - int fd, i; - - - if ((fd = open(conf_file, 0)) < 0) { - fprintf(stderr, "error opening %s: %s\n", conf_file, strerror(errno)); - return 1; - } - - soap_init(&soap); - soap_set_namespaces(&soap, jp__namespaces); - - soap_begin(&soap); - soap.recvfd = fd; - soap_begin_recv(&soap); - memset(&out, 0, sizeof(out)); - - soap_default__jpelem__ServerConfigurationResponse(&soap, &out); - if (!soap_get__jpelem__ServerConfigurationResponse(&soap, &out, "ServerConfiguration", NULL)) { - soap_end_recv(&soap); - soap_end(&soap); - return EINVAL; - } - soap_end_recv(&soap); - - if (out.__sizeattrs) { - conf->attrs = calloc(out.__sizeattrs + 1, sizeof(*conf->attrs)); - for (i=0; i < out.__sizeattrs; i++) { - conf->attrs[i] = strdup(out.attrs[i]); - } - } - if (out.__sizeindexedAttrs) { - conf->indexed_attrs = calloc(out.__sizeindexedAttrs + 1, sizeof(*conf->indexed_attrs)); - for (i=0; i < out.__sizeindexedAttrs; i++) { - conf->indexed_attrs[i] = strdup(out.indexedAttrs[i]); - } - } - if (out.__sizeplugins) { - conf->plugins = calloc(out.__sizeplugins + 1, sizeof(*conf->plugins)); - for (i=0; i < out.__sizeplugins; i++) { - conf->plugins[i] = strdup(out.plugins[i]); - } - } - if (out.__sizefeeds) { - conf->feeds = calloc(out.__sizefeeds + 1, sizeof(*conf->feeds)); - for (i=0; i < out.__sizefeeds; i++) { - struct jptype__feedSession *feed; - - feed = GLITE_SECURITY_GSOAP_LIST_GET(out.feeds, i); - conf->feeds[i] = calloc(1, sizeof(*conf->feeds[i])); - conf->feeds[i]->PS_URL=strdup(feed->primaryServer); - - if (glite_jpis_SoapToPrimaryQueryConds(feed->__sizecondition, - feed->condition, &conf->feeds[i]->query)) return EINVAL; - - conf->feeds[i]->history = feed->history; - conf->feeds[i]->continuous = feed->continuous; - conf->feeds[i]->uniqueid = -1; - } - } - - soap_destroy(&soap); - soap_end(&soap); - soap_done(&soap); - - return 0; -} - -#if 0 -/* - * Just helper function - used only once for first generation - * of XML example configuration (which was then reedited in hand) - */ -static int dump_conf(void) { - int retval; - struct _jpelem__ServerConfigurationResponse out; - struct soap soap; - struct jptype__feedSession *feed; - struct jptype__primaryQuery *cond; - - soap_init(&soap); - soap_set_namespaces(&soap, jp__namespaces); - - soap.sendfd = STDOUT_FILENO; - soap_begin_send(&soap); - soap_default__jpelem__ServerConfigurationResponse(&soap, &out); - - out.__sizeattrs = 2; - out.attrs = calloc(2, sizeof(*out.attrs)); - out.attrs[0] = strdup("atrr1"); - out.attrs[1] = strdup("atrr2"); - - out.__sizeindexedAttrs = 2; - out.indexedAttrs = calloc(2, sizeof(*out.indexedAttrs)); - out.indexedAttrs[0] = strdup("idxAtrr1"); - out.indexedAttrs[1] = strdup("idxAtrr2"); - - out.__sizeplugins = 2; - out.plugins = calloc(2, sizeof(*out.plugins)); - out.plugins[0] = strdup("plugin1"); - out.plugins[1] = strdup("plugin2"); - - GLITE_SECURITY_GSOAP_LIST_CREATE(&soap, &out, feeds, struct jptype__feedSession, 1); - feed = GLITE_SECURITY_GSOAP_LIST_GET(out.feeds, 0); - feed->primaryServer = strdup("PrimaryServer"); - feed->__sizecondition = 1; - GLITE_SECURITY_GSOAP_LIST_CREATE(&soap, feed, condition, struct jptype__primaryQuery, 1); - cond = GLITE_SECURITY_GSOAP_LIST_GET(feed->condition, 0); - cond->attr = strdup("queryAttr"); - cond->op = jptype__queryOp__EQUAL; - cond->origin = jptype__attrOrig__SYSTEM; - cond->value = calloc(1, sizeof(*(cond->value))); - GSOAP_SETSTRING(cond->value, soap_strdup(&soap, "attrValue")); - feed->history = 1; - feed->continuous = 0; - - soap_serialize__jpelem__ServerConfigurationResponse(&soap, &out); - retval = soap_put__jpelem__ServerConfigurationResponse(&soap, &out, "jpelem:ServerConfiguration", NULL); - soap_end_send(&soap); - soap_free(&soap); - soap_end(&soap); - - return retval; -} -#endif diff --git a/org.glite.jp.index/src/conf.h b/org.glite.jp.index/src/conf.h deleted file mode 100644 index 4c64a79..0000000 --- a/org.glite.jp.index/src/conf.h +++ /dev/null @@ -1,62 +0,0 @@ -#ident "$Header$" - -#ifndef _CONF_H -#define _CONF_H - -#include - -#ifndef UNUSED - #ifdef __GNUC__ - #define UNUSED __attribute__((unused)) - #else - #define UNUSED - #endif -#endif - -#define GLITE_JPIS_DEFAULT_PORT_STR "8902" - -//#define lprintf -#define lprintf(args...) glite_jp_lprintf(__FUNCTION__, ##args) -#define llprintf(MODULE, args...) do { \ - if ((MODULE)) glite_jp_lprintf(__FUNCTION__, ##args); \ -} while(0) - - -typedef struct _glite_jp_is_feed { - char *PS_URL; //URLs of Primary Storage servers - glite_jp_query_rec_t *query; // query to Primary Server (aka filter) - int history, // type of query - continuous; - long int uniqueid; // internal ID -} glite_jp_is_feed; - -typedef struct _glite_jp_is_conf { - // all I need to get from comman line options and configuration file - - // arrays are zero-terminated - char **attrs; // atributes to obtain - char **indexed_attrs; // list of indexed atributes - char **plugins; // list of plugin.so's - - glite_jp_is_feed **feeds; // null terminated list of feeds - - int debug; - int no_auth; // set if you do not want authorization - char *cs, // database contact string - *port, // server port - *pidfile, - *logfile, - *server_cert, - *server_key; - int slaves; -} glite_jp_is_conf; - - - -// read commad line options and configuration file -int glite_jp_get_conf(int argc, char **argv, glite_jp_is_conf **configuration); -void glite_jp_free_conf(glite_jp_is_conf *conf); - -void glite_jp_lprintf(const char *source, const char *fmt, ...); - -#endif diff --git a/org.glite.jp.index/src/context.c b/org.glite.jp.index/src/context.c deleted file mode 100644 index d6f1379..0000000 --- a/org.glite.jp.index/src/context.c +++ /dev/null @@ -1,37 +0,0 @@ -#include -#include -#include - -#include - -#include "conf.h" -#include "context.h" - - -int glite_jpis_init_context(glite_jpis_context_t *isctx, glite_jp_context_t jpctx, glite_jp_is_conf *conf) { - char hname[512]; - char *op_args; - - if ((*isctx = calloc(sizeof(**isctx), 1)) != NULL) { - (*isctx)->jpctx = jpctx; - (*isctx)->conf = conf; - globus_libc_gethostname(hname, sizeof hname); - asprintf(&(*isctx)->hname, "https://%s:%s", hname, (conf && conf->port) ? conf->port : GLITE_JPIS_DEFAULT_PORT_STR); - - op_args = (*isctx)->op_args; - op_args[GLITE_JP_QUERYOP_WITHIN] = 2; - op_args[GLITE_JP_QUERYOP_UNDEF] = 0; - op_args[GLITE_JP_QUERYOP_EQUAL] = 1; - op_args[GLITE_JP_QUERYOP_LESS] = 1; - op_args[GLITE_JP_QUERYOP_GREATER] = 1; - op_args[GLITE_JP_QUERYOP_EXISTS] = 0; - return 0; - } else return ENOMEM; -} - - -void glite_jpis_free_context(glite_jpis_context_t ctx) { - if (!ctx) return; - free(ctx->hname); - free(ctx); -} diff --git a/org.glite.jp.index/src/context.h b/org.glite.jp.index/src/context.h deleted file mode 100644 index d67445a..0000000 --- a/org.glite.jp.index/src/context.h +++ /dev/null @@ -1,32 +0,0 @@ -#ifndef GLITE_JP_IS_CONTEXT_H -#define GLITE_JP_IS_CONTEXT_H - -#include -#include -#include -#include "conf.h" - - -typedef struct _glite_jpis_context { - glite_jp_context_t jpctx; - glite_jp_is_conf *conf; - glite_jp_db_stmt_t select_unlocked_feed_stmt, lock_feed_stmt, init_feed_stmt, unlock_feed_stmt, select_info_feed_stmt, update_state_feed_stmt, update_error_feed_stmt, select_info_attrs_indexed, select_jobid_stmt, select_user_stmt, insert_job_stmt, insert_user_stmt; - long int param_uniqueid, param_state; - char param_feedid[33], param_ps[256], param_indexed[256], param_jobid[33], param_dg_jobid[256], param_ownerid[33], param_cert[256]; - unsigned long param_ps_len, param_feedid_len, param_indexed_len, param_jobid_len, param_dg_jobid_len, param_ownerid_len, param_cert_len; - void *param_expires; - - char *hname; - - char op_args[GLITE_JP_QUERYOP__LAST]; -} *glite_jpis_context_t; - -typedef struct _slave_data_t{ - glite_jpis_context_t ctx; - glite_jp_is_conf *conf; - struct soap *soap; -} slave_data_t; - -int glite_jpis_init_context(glite_jpis_context_t *isctx, glite_jp_context_t jpctx, glite_jp_is_conf *conf); -void glite_jpis_free_context(glite_jpis_context_t ctx); -#endif diff --git a/org.glite.jp.index/src/db_ops.c b/org.glite.jp.index/src/db_ops.c deleted file mode 100644 index 798723f..0000000 --- a/org.glite.jp.index/src/db_ops.c +++ /dev/null @@ -1,686 +0,0 @@ -#ident "$Header$" - -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include - -#include "conf.h" -#include "context.h" -#include "db_ops.h" - - -#ifndef LOG_SQL -#define LOG_SQL 1 -#endif - -#define TABLE_PREFIX_DATA "attr_" -#define SQLCMD_DROP_DATA_TABLE "DROP TABLE " TABLE_PREFIX_DATA "%s" -#define SQLCMD_CREATE_DATA_TABLE "CREATE TABLE " TABLE_PREFIX_DATA "%s (\n\ - jobid CHAR(32) BINARY NOT NULL,\n\ - value %s BINARY NOT NULL,\n\ - full_value %s NOT NULL,\n\ - origin INT NOT NULL,\n\ -\n\ - INDEX (jobid),\n\ - INDEX (value)\n\ -);" -#define SQLCMD_INSERT_ATTRVAL "INSERT INTO " TABLE_PREFIX_DATA "%|Ss (jobid, value, full_value, origin) VALUES (\n\ - '%|Ss',\n\ - '%|Ss',\n\ - '%|Ss',\n\ - '%ld'\n\ -)" -#define INDEX_LENGTH 255 - -#define WORD_SWAP(X) ((((X) >> 8) & 0xFF) | (((X) & 0xFF) << 8)) -#define LONG_SWAP(X) (WORD_SWAP(((X) >> 16) & 0xFFFF) | ((WORD_SWAP(X) & 0xFFFF) << 16)) -#if __BYTE_ORDER == __LITTLE_ENDIAN -#define LONG_LE(X) (X) -#else -#define LONG_LE(X) LONG_SWAP(X) -#endif - -#define COND_MAGIC 0x444E4F43 - - -static int glite_jpis_db_queries_deserialize(glite_jp_query_rec_t **queries, void *blob, size_t blob_size) UNUSED; - - -static int is_indexed(glite_jp_is_conf *conf, const char *attr) { - size_t i; - - i = 0; - while (conf->indexed_attrs[i]) { - if (strcasecmp(attr, conf->indexed_attrs[i]) == 0) return 1; - i++; - } - return 0; -} - - -static size_t db_arg1_length(glite_jpis_context_t isctx, glite_jp_query_rec_t *query) { - size_t len; - - assert(query->op > GLITE_JP_QUERYOP_UNDEF && query->op <= GLITE_JP_QUERYOP__LAST); - if (isctx->op_args[query->op] >= 1) - len = query->binary ? query->size : (query->value ? strlen(query->value) + 1 : 0); - else len = 0; - - return len; -} - -static size_t db_arg2_length(glite_jpis_context_t isctx, glite_jp_query_rec_t *query) { - size_t len; - - assert(query->op > GLITE_JP_QUERYOP_UNDEF && query->op <= GLITE_JP_QUERYOP__LAST); - if (isctx->op_args[query->op] >= 1) - len = query->binary ? query->size2 : (query->value2 ? strlen(query->value2) + 1 : 0); - else len = 0; - - return len; -} - - -static int array_init(void **data, size_t *len, size_t *maxlen, size_t initial_len) { - *len = 0; - if ((*data = malloc(initial_len)) != NULL) { - *maxlen = initial_len; - return 0; - } else { - *maxlen = 0; - return ENOMEM; - } -} - - -static int array_add(void **data, size_t *len, size_t *maxlen, void *new_data, size_t new_data_len) { - void *tmp; - size_t ptr; - - ptr = *len; - (*len) += new_data_len; - if (*len > *maxlen) { - do { - (*maxlen) *= 2; - } while (*len > *maxlen); - if ((tmp = realloc(*data, *maxlen)) == NULL) return ENOMEM; - *data = tmp; - } - memcpy(((char *)(*data)) + ptr, new_data, new_data_len); - - return 0; -} - - -static int array_add_long(void **data, size_t *len, size_t *maxlen, uint32_t l) { - uint32_t lel; - - lel = LONG_LE(l); - return array_add(data, len, maxlen, &lel, sizeof(uint32_t)); -} - - -static uint32_t array_get_long(void **data) { - uint32_t *lel; - - lel = (uint32_t *)*data; - *data = ((char *)*data) + sizeof(uint32_t); - - return LONG_LE(*lel); -} - - -static void *array_get(void **data, size_t data_len) { - void *res; - - res = *data; - *data = ((char *)*data) + data_len; - - return res; -} - - -static int glite_jpis_db_queries_serialize(glite_jpis_context_t isctx, void **blob, size_t *len, glite_jp_query_rec_t *queries) { - size_t maxlen; - glite_jp_query_rec_t *query; - int ret; - size_t datalen; - - if ((ret = array_init(blob, len, &maxlen, 1024)) != 0) return ret; - query = queries; - while(query && query->attr) { - if ((ret = array_add_long(blob, len, &maxlen, COND_MAGIC)) != 0) goto fail; - datalen = strlen(query->attr) + 1; - if ((ret = array_add_long(blob, len, &maxlen, datalen)) != 0) goto fail; - if ((ret = array_add(blob, len, &maxlen, query->attr, datalen)) != 0) goto fail; - if ((ret = array_add_long(blob, len, &maxlen, query->op)) != 0) goto fail; - if ((ret = array_add_long(blob, len, &maxlen, query->binary ? 1 : 0)) != 0) goto fail; - - datalen = db_arg1_length(isctx, query); - if ((ret = array_add_long(blob, len, &maxlen, datalen)) != 0) goto fail; - if (datalen) - if ((ret = array_add(blob, len, &maxlen, query->value, datalen)) != 0) goto fail; - - datalen = db_arg2_length(isctx, query); - if ((ret = array_add_long(blob, len, &maxlen, datalen)) != 0) goto fail; - if (datalen) - if ((ret = array_add(blob, len, &maxlen, query->value2, datalen)) != 0) goto fail; - - query++; - } - - return 0; -fail: - free(*blob); - *len = 0; - return ret; -} - - -static int glite_jpis_db_queries_deserialize(glite_jp_query_rec_t **queries, void *blob, size_t blob_size) { - size_t maxlen, len, datalen; - void *blob_ptr, *blob_end; - int ret; - uint32_t l; - glite_jp_query_rec_t query; - int i; - - if ((ret = array_init((void *)queries, &len, &maxlen, 512)) != 0) return ret; - blob_ptr = blob; - blob_end = (char *)blob + blob_size; - while (blob_end > blob_ptr) { - ret = ENOMEM; - memset(&query, 0, sizeof query); - l = array_get_long(&blob_ptr); - if (l != COND_MAGIC) { - lprintf("blob=%p, blob_ptr=%p, 0x%08" PRIX32 "\n", blob, blob_ptr, l); - ret = EINVAL; - goto fail_query; - } - - datalen = array_get_long(&blob_ptr); - if (datalen) { - if ((query.attr = malloc(datalen)) == NULL) goto fail_query; - memcpy(query.attr, array_get(&blob_ptr, datalen), datalen); - } else query.attr = NULL; - - query.op = array_get_long(&blob_ptr); - query.binary = array_get_long(&blob_ptr); - - datalen = array_get_long(&blob_ptr); - if (datalen) { - if ((query.value = malloc(datalen)) == NULL) goto fail_query; - memcpy(query.value, array_get(&blob_ptr, datalen), datalen); - } else query.value = NULL; - query.size = datalen; - - datalen = array_get_long(&blob_ptr); - if (datalen) { - if ((query.value2 = malloc(datalen)) == NULL) goto fail_query; - memcpy(query.value2, array_get(&blob_ptr, datalen), datalen); - } else query.value2 = NULL; - query.size2 = datalen; - - if ((ret = array_add((void *)queries, &len, &maxlen, &query, sizeof(query))) != 0) goto fail_query; - } - assert(blob_end == blob_ptr); - - memset(&query, 0, sizeof query); - if ((ret = array_add((void *)queries, &len, &maxlen, &query, sizeof(query))) != 0) goto fail; - - return 0; - -fail_query: -fail: - i = 0; - while ((*queries)[i].attr) { - free((*queries)[i].attr); - free((*queries)[i].value); - free((*queries)[i].value2); - i++; - } - free(*queries); - return ret; -} - - -/** - * Convert attribute name to attribute id. - */ -char *glite_jpis_attr_name2id(const char *name) { - return str2md5(name); -} - - -/* Init the database. - * - * \retval 0 OK - * \retval non-zero JP error code - */ - -int glite_jpis_initDatabase(glite_jpis_context_t ctx) { - char **attrs, *tmp; - const char *type_index, *type_full; - size_t i; - void *param; - unsigned long attrid_len, name_len, type_len, source_len, dbconds_len; - char attrid[33], name[256], type[33], source[256], dbconds[1024]; - int indexed, state, locked; - size_t conds_len; - char sql[512]; - glite_jp_is_feed **feeds; - void *conds; - glite_jp_context_t jpctx = ctx->jpctx; - glite_jp_db_stmt_t stmt = NULL; - - jpctx = ctx->jpctx; - glite_jp_db_create_params(¶m, 4, - GLITE_JP_DB_TYPE_VARCHAR, attrid, &attrid_len, - GLITE_JP_DB_TYPE_VARCHAR, name, &name_len, - GLITE_JP_DB_TYPE_INT, &indexed, - GLITE_JP_DB_TYPE_VARCHAR, type, &type_len); - if (glite_jp_db_prepare(jpctx, "INSERT INTO attrs (attrid, name, indexed, type) VALUES (?, ?, ?, ?)", &stmt, param, NULL) != 0) goto fail; - - // attrs table and attrid_* tables - attrs = ctx->conf->attrs; - i = 0; - if (attrs) while (attrs[i]) { - type_full = glite_jp_attrval_db_type_full(jpctx, attrs[i]); - type_index = glite_jp_attrval_db_type_index(jpctx, attrs[i], INDEX_LENGTH); - - // attrid column - tmp = glite_jpis_attr_name2id(attrs[i]); - GLITE_JPIS_PARAM(attrid, attrid_len, tmp); - free(tmp); - GLITE_JPIS_PARAM(name, name_len, attrs[i]); - // indexed column - indexed = is_indexed(ctx->conf, name); - // type column - GLITE_JPIS_PARAM(type, type_len, type_full); - // insert - if (glite_jp_db_execute(stmt) == -1) goto fail; - - // silently drop - sql[sizeof(sql) - 1] = '\0'; - snprintf(sql, sizeof(sql), SQLCMD_DROP_DATA_TABLE, attrid); - llprintf(LOG_SQL, "preventive dropping '%s' ==> '%s'\n", attrid, sql); - glite_jp_db_execstmt(jpctx, sql, NULL); - - // create table - sql[sizeof(sql) - 1] = '\0'; - snprintf(sql, sizeof(sql) - 1, SQLCMD_CREATE_DATA_TABLE, attrid, type_index, type_full); - llprintf(LOG_SQL, "creating table: '%s'\n", sql); - if ((glite_jp_db_execstmt(jpctx, sql, NULL)) == -1) { - glite_jp_error_t err; - - memset(&err,0,sizeof err); - err.code = EAGAIN; - err.source = __FUNCTION__; - err.desc = "If the atribute table already exists, restart may help."; - glite_jp_stack_error(ctx->jpctx, &err); - goto fail; - } - - i++; - } - glite_jp_db_freestmt(&stmt); - - // feeds table - glite_jp_db_create_params(¶m, 4, - GLITE_JP_DB_TYPE_INT, &state, - GLITE_JP_DB_TYPE_INT, &locked, - GLITE_JP_DB_TYPE_VARCHAR, source, &source_len, - GLITE_JP_DB_TYPE_MEDIUMBLOB, dbconds, &dbconds_len); - if (glite_jp_db_prepare(jpctx, "INSERT INTO feeds (state, locked, source, condition) VALUES (?, ?, ?, ?)", &stmt, param, NULL) != 0) goto fail; - feeds = ctx->conf->feeds; - i = 0; - if (feeds) while (feeds[i]) { - state = (feeds[i]->history ? GLITE_JP_IS_STATE_HIST : 0) | - (feeds[i]->continuous ? GLITE_JP_IS_STATE_CONT : 0); - locked = 0; - GLITE_JPIS_PARAM(source, source_len, feeds[i]->PS_URL); - assert(glite_jpis_db_queries_serialize(ctx, &conds, &conds_len, feeds[i]->query) == 0); - assert(conds_len <= sizeof(dbconds)); - dbconds_len = conds_len; - memcpy(dbconds, conds, conds_len); - free(conds); - if (glite_jp_db_execute(stmt) == -1) goto fail_conds; - feeds[i]->uniqueid = glite_jp_db_lastid(stmt); - - i++; - } - glite_jp_db_freestmt(&stmt); - - return 0; - -fail_conds: - free(conds); -fail: - glite_jp_db_freestmt(&stmt); - return jpctx->error->code; -} - - -/* Drop the whole database. - * - * \retval 0 OK - * \retval non-zero JP error code - */ - -int glite_jpis_dropDatabase(glite_jpis_context_t ctx) { - void *res; - char attrid[33], sql[256]; - unsigned long len; - int ret; - glite_jp_context_t jpctx = ctx->jpctx; - glite_jp_db_stmt_t stmt_tabs = NULL; - - // search data tables and drop them - glite_jp_db_create_results(&res, 1, GLITE_JP_DB_TYPE_CHAR, NULL, attrid, sizeof(attrid), &len); - if (glite_jp_db_prepare(jpctx, "SELECT attrid FROM attrs", &stmt_tabs, NULL, res) != 0) goto fail; - if (glite_jp_db_execute(stmt_tabs) == -1) goto fail; - while ((ret = glite_jp_db_fetch(stmt_tabs)) == 0) { - snprintf(sql, sizeof(sql), SQLCMD_DROP_DATA_TABLE, attrid); - llprintf(LOG_SQL, "dropping '%s' ==> '%s'\n", attrid, sql); - if (glite_jp_db_execstmt(jpctx, sql, NULL) == -1) printf("warning: can't drop table '" TABLE_PREFIX_DATA "%s': %s (%s)\n", attrid, jpctx->error->desc, jpctx->error->source); - } - if (ret != ENODATA) goto fail; - glite_jp_db_freestmt(&stmt_tabs); - - // drop feeds and atributes - if (glite_jp_db_execstmt(jpctx, "DELETE FROM attrs", NULL) == -1) goto fail; - if (glite_jp_db_execstmt(jpctx, "DELETE FROM feeds", NULL) == -1) goto fail; - if (glite_jp_db_execstmt(jpctx, "DELETE FROM jobs", NULL) == -1) goto fail; - if (glite_jp_db_execstmt(jpctx, "DELETE FROM users", NULL) == -1) goto fail; - if (glite_jp_db_execstmt(jpctx, "DELETE FROM acls", NULL) == -1) goto fail; - - return 0; - -fail: - glite_jp_db_freestmt(&stmt_tabs); - return jpctx->error->code; -} - - -int glite_jpis_init_db(glite_jpis_context_t isctx) { - int ret; - void *myparam; - void *myres; - const char *cs; - glite_jp_context_t jpctx; - - jpctx = isctx->jpctx; - if ((cs = isctx->conf->cs) == NULL) cs = GLITE_JP_IS_DEFAULTCS; - if ((ret = glite_jp_db_connect(jpctx, cs)) != 0) goto fail; - - // sql command: lock the feed (via uniqueid) - glite_jp_db_create_params(&myparam, 1, GLITE_JP_DB_TYPE_INT, &isctx->param_uniqueid); - if ((ret = glite_jp_db_prepare(jpctx, "UPDATE feeds SET locked=1 WHERE (locked = 0) AND (uniqueid = ?)", &isctx->lock_feed_stmt, myparam, NULL)) != 0) goto fail; - - // sql command: assign the feed (via uniqueid) - glite_jp_db_create_params(&myparam, 4, - GLITE_JP_DB_TYPE_CHAR, isctx->param_feedid, &isctx->param_feedid_len, - GLITE_JP_DB_TYPE_DATETIME, &isctx->param_expires, - GLITE_JP_DB_TYPE_INT, &isctx->param_state, - GLITE_JP_DB_TYPE_INT, &isctx->param_uniqueid); - if ((ret = glite_jp_db_prepare(jpctx, "UPDATE feeds SET feedid=?, expires=?, state=? WHERE (uniqueid=?)", &isctx->init_feed_stmt, myparam, NULL)) != 0) goto fail; - - // sql command: unlock the feed (via uniqueid) - glite_jp_db_create_params(&myparam, 1, GLITE_JP_DB_TYPE_INT, &isctx->param_uniqueid); - if ((ret = glite_jp_db_prepare(jpctx, "UPDATE feeds SET locked=0 WHERE (uniqueid=?)", &isctx->unlock_feed_stmt, myparam, NULL)) != 0) goto fail; - - // sql command: get info about the feed (via feedid) - glite_jp_db_create_params(&myparam, 1, GLITE_JP_DB_TYPE_CHAR, isctx->param_feedid, &isctx->param_feedid_len); - glite_jp_db_create_results(&myres, 3, - GLITE_JP_DB_TYPE_INT, NULL, &isctx->param_uniqueid, - GLITE_JP_DB_TYPE_INT, NULL, &isctx->param_state, - GLITE_JP_DB_TYPE_VARCHAR, NULL, isctx->param_ps, sizeof(isctx->param_ps), &isctx->param_ps_len); - if ((ret = glite_jp_db_prepare(jpctx, "SELECT uniqueid, state, source FROM feeds WHERE (feedid=?)", &isctx->select_info_feed_stmt, myparam, myres)) != 0) goto fail; - - // sql command: update state of the feed (via uniqueid) - glite_jp_db_create_params(&myparam, 2, - GLITE_JP_DB_TYPE_INT, &isctx->param_state, - GLITE_JP_DB_TYPE_INT, &isctx->param_uniqueid); - if ((ret = glite_jp_db_prepare(jpctx, "UPDATE feeds SET state=? WHERE (uniqueid=?)", &isctx->update_state_feed_stmt, myparam, NULL)) != 0) goto fail; - - // sql command: set the error on feed - glite_jp_db_create_params(&myparam, 3, - GLITE_JP_DB_TYPE_INT, &isctx->param_state, - GLITE_JP_DB_TYPE_DATETIME, &isctx->param_expires, - GLITE_JP_DB_TYPE_INT, &isctx->param_uniqueid); - if ((ret = glite_jp_db_prepare(jpctx, "UPDATE feeds SET state=?, expires=? WHERE (uniqueid=?)", &isctx->update_error_feed_stmt, myparam, NULL)) != 0) goto fail; - - // sql command: get info about indexed attributes - glite_jp_db_create_results(&myres, 1, - GLITE_JP_DB_TYPE_VARCHAR, NULL, isctx->param_indexed, sizeof(isctx->param_indexed), &isctx->param_indexed_len); - if ((ret = glite_jp_db_prepare(jpctx, "SELECT name FROM attrs WHERE (indexed=1)", &isctx->select_info_attrs_indexed, NULL, myres)) != 0) goto fail; - - // sql command: check for job with jobid - glite_jp_db_create_params(&myparam, 1, - GLITE_JP_DB_TYPE_CHAR, isctx->param_jobid, &isctx->param_jobid_len); - if ((glite_jp_db_prepare(jpctx, "SELECT jobid FROM jobs WHERE jobid=?", &isctx->select_jobid_stmt, myparam, NULL)) != 0) goto fail; - - // sql command: insert the job - glite_jp_db_create_params(&myparam, 4, - GLITE_JP_DB_TYPE_CHAR, isctx->param_jobid, &isctx->param_jobid_len, - GLITE_JP_DB_TYPE_VARCHAR, isctx->param_dg_jobid, &isctx->param_dg_jobid_len, - GLITE_JP_DB_TYPE_CHAR, isctx->param_ownerid, &isctx->param_ownerid_len, - GLITE_JP_DB_TYPE_CHAR, isctx->param_feedid, &isctx->param_feedid_len); - if ((glite_jp_db_prepare(jpctx, "INSERT INTO jobs (jobid, dg_jobid, ownerid, ps) VALUES (?, ?, ?, (SELECT source FROM feeds WHERE feedid=?))", &isctx->insert_job_stmt, myparam, NULL)) != 0) goto fail; - - // sql command: check the user - glite_jp_db_create_params(&myparam, 1, - GLITE_JP_DB_TYPE_CHAR, isctx->param_ownerid, &isctx->param_ownerid_len); - if ((glite_jp_db_prepare(jpctx, "SELECT userid FROM users WHERE userid=?", &isctx->select_user_stmt, myparam, NULL)) != 0) goto fail; - - // sql command: insert the user - glite_jp_db_create_params(&myparam, 2, - GLITE_JP_DB_TYPE_CHAR, isctx->param_ownerid, &isctx->param_ownerid_len, - GLITE_JP_DB_TYPE_VARCHAR, isctx->param_cert, &isctx->param_cert_len); - if ((glite_jp_db_prepare(jpctx, "INSERT INTO users (userid, cert_subj) VALUES (?, ?)", &isctx->insert_user_stmt, myparam, NULL)) != 0) goto fail; - - return 0; - -fail: - glite_jpis_free_db(isctx); - return ret; -} - - -void glite_jpis_free_db(glite_jpis_context_t ctx) { - glite_jp_db_freestmt(&ctx->lock_feed_stmt); - glite_jp_db_freestmt(&ctx->init_feed_stmt); - glite_jp_db_freestmt(&ctx->unlock_feed_stmt); - glite_jp_db_freestmt(&ctx->select_info_feed_stmt); - glite_jp_db_freestmt(&ctx->update_state_feed_stmt); - glite_jp_db_freestmt(&ctx->update_error_feed_stmt); - glite_jp_db_freestmt(&ctx->select_info_attrs_indexed); - glite_jp_db_freestmt(&ctx->select_jobid_stmt); - glite_jp_db_freestmt(&ctx->select_user_stmt); - glite_jp_db_freestmt(&ctx->insert_job_stmt); - glite_jp_db_freestmt(&ctx->insert_user_stmt); - glite_jp_db_close(ctx->jpctx); -} - - -/* Find first unitialized feed, lock it and return URL of corresponding PS - * - * Return value: - * 0 - OK - * ENOENT - no more feeds to initialize - * ENOLCK - error during locking */ - -int glite_jpis_lockUninitializedFeed(glite_jpis_context_t ctx, long int *uniqueid, char **PS_URL) -{ - int ret; - static int uninit_msg = 1; - char *sql, *res[1], *t; - glite_jp_db_stmt_t stmt; - - do { - t = glite_jp_db_timetodb(time(NULL)); - trio_asprintf(&sql, "SELECT uniqueid, source FROM feeds WHERE (locked=0) AND (feedid IS NULL) AND ((state < " GLITE_JP_IS_STATE_ERROR_STR ") OR (expires <= %s))", t); - free(t); - ret = glite_jp_db_execstmt(ctx->jpctx, sql, &stmt); - free(sql); - switch (ret) { - case -1: - lprintf("error selecting unlocked feed\n"); - uninit_msg = 1; - glite_jp_db_freestmt(&stmt); - return ENOLCK; - case 0: - if (uninit_msg) { - lprintf("no more uninit. feeds unlocked\n"); - uninit_msg = 0; - } - glite_jp_db_freestmt(&stmt); - return ENOENT; - default: break; - } - uninit_msg = 1; - if (glite_jp_db_fetchrow(stmt, res) <= 0) { - lprintf("error fetching unlocked feed\n"); - glite_jp_db_freestmt(&stmt); - return ENOLCK; - } - glite_jp_db_freestmt(&stmt); - ctx->param_uniqueid = atol(res[0]); - strncpy(ctx->param_ps, res[1], sizeof ctx->param_ps); - lprintf("selected uninit. feed, uniqueid='%s'\n", res[0]); - free(res[0]); - free(res[1]); - - ret = glite_jp_db_execute(ctx->lock_feed_stmt); - lprintf("locked %d feeds (uniqueid=%ld)\n", ret, ctx->param_uniqueid); - } while (ret != 1); - - *uniqueid = ctx->param_uniqueid; - if (PS_URL) *PS_URL = strdup(ctx->param_ps); - - return 0; -} - - -/* Store feed ID and expiration time returned by PS for locked feed. */ - -int glite_jpis_initFeed(glite_jpis_context_t ctx, long int uniqueid, char *feedId, time_t feedExpires, int status) -{ - int ret; - - GLITE_JPIS_PARAM(ctx->param_feedid, ctx->param_feedid_len, feedId); - glite_jp_db_set_time(ctx->param_expires, feedExpires); - ctx->param_uniqueid = uniqueid; - ctx->param_state = status; - - ret = glite_jp_db_execute(ctx->init_feed_stmt); - lprintf("initializing feed, uniqueid=%li, result=%d\n", uniqueid, ret); - - return ret == 1 ? 0 : ENOLCK; -} - - -/* Unlock given feed */ - -int glite_jpis_unlockFeed(glite_jpis_context_t ctx, long int uniqueid) { - int ret; - - ctx->param_uniqueid = uniqueid; - ret = glite_jp_db_execute(ctx->unlock_feed_stmt); - lprintf("unlocking feed, uniqueid=%li, result=%d\n", uniqueid, ret); - - return ret == 1 ? 0 : ENOLCK; -} - - -/* Saves TTL (when to reconnect if error occured) for given feed */ - -int glite_jpis_tryReconnectFeed(glite_jpis_context_t ctx, long int uniqueid, time_t reconn_time) { - lprintf("reconnect, un=%ld, %ld\n", uniqueid, reconn_time); - ctx->param_uniqueid = uniqueid; - ctx->param_state = GLITE_JP_IS_STATE_ERROR; - glite_jp_db_set_time(ctx->param_expires, reconn_time); - if (glite_jp_db_execute(ctx->update_error_feed_stmt) == -1) return ctx->jpctx->error->code; - return 0; -} - - -int glite_jpis_insertAttrVal(glite_jpis_context_t ctx, const char *jobid, glite_jp_attrval_t *av) { - char *sql, *table, *value, *full_value, *md5_jobid; - long int origin; - - table = glite_jpis_attr_name2id(av->name); - value = glite_jp_attrval_to_db_index(ctx->jpctx, av, INDEX_LENGTH); - full_value = glite_jp_attrval_to_db_full(ctx->jpctx, av); - md5_jobid = str2md5(jobid); - origin = av->origin; - trio_asprintf(&sql, SQLCMD_INSERT_ATTRVAL, table, md5_jobid, value, full_value, origin); - free(md5_jobid); - free(table); - free(value); - free(full_value); - llprintf(LOG_SQL, "(%s) sql=%s\n", av->name, sql); - if (glite_jp_db_execstmt(ctx->jpctx, sql, NULL) != 1) { - free(sql); - return ctx->jpctx->error->code; - } - free(sql); - - return 0; -} - - -int glite_jpis_lazyInsertJob(glite_jpis_context_t ctx, const char *ps, const char *jobid, const char *owner) { - int ret; - char *md5_jobid = NULL, *md5_cert = NULL; - - lprintf("\n"); - - md5_jobid = str2md5(jobid); - md5_cert = str2md5(owner); - GLITE_JPIS_PARAM(ctx->param_jobid, ctx->param_jobid_len, md5_jobid); - switch (ret = glite_jp_db_execute(ctx->select_jobid_stmt)) { - case 1: lprintf("jobid '%s' found\n", jobid); goto ok0; - case 0: - lprintf("inserting jobid %s (%s)\n", jobid, md5_jobid); - - GLITE_JPIS_PARAM(ctx->param_dg_jobid, ctx->param_dg_jobid_len, jobid); - GLITE_JPIS_PARAM(ctx->param_ownerid, ctx->param_ownerid_len, md5_cert); - GLITE_JPIS_PARAM(ctx->param_ps, ctx->param_ps_len, ps); - if (glite_jp_db_execute(ctx->insert_job_stmt) != 1) goto fail; - break; - default: assert(ret != 1); break; - } -ok0: - - GLITE_JPIS_PARAM(ctx->param_ownerid, ctx->param_ownerid_len, md5_cert); - switch (ret = glite_jp_db_execute(ctx->select_user_stmt)) { - case 1: lprintf("owner '%s' found\n", owner); goto ok; - case 0: - lprintf("inserting user %s (%s)\n", owner, md5_cert); - GLITE_JPIS_PARAM(ctx->param_cert, ctx->param_cert_len, owner); - if (glite_jp_db_execute(ctx->insert_user_stmt) != 1) goto fail; - break; - default: assert(ret != 1); break; - } - -ok: - free(md5_jobid); - free(md5_cert); - return 0; -fail: - free(md5_jobid); - free(md5_cert); - return ctx->jpctx->error->code; -} diff --git a/org.glite.jp.index/src/db_ops.h b/org.glite.jp.index/src/db_ops.h deleted file mode 100644 index 9105ba2..0000000 --- a/org.glite.jp.index/src/db_ops.h +++ /dev/null @@ -1,44 +0,0 @@ -#ident "$Header$" - -#ifndef _DB_OPS_H -#define _DB_OPS_H - - -#include -#include -#include "context.h" - - -#define GLITE_JP_IS_DEFAULTCS "jpis/@localhost:jpis" - -#define GLITE_JP_IS_STATE_HIST 1 -#define GLITE_JP_IS_STATE_CONT 2 -#define GLITE_JP_IS_STATE_DONE 4 -#define GLITE_JP_IS_STATE_ERROR 8 -#define GLITE_JP_IS_STATE_ERROR_STR "8" - -#define GLITE_JPIS_PARAM(DEST, DEST_LEN, SRC) do { \ - (DEST)[sizeof((DEST)) - 1] = '\0'; \ - strncpy((DEST), (SRC), sizeof((DEST)) - 1); \ - (DEST_LEN) = strlen((SRC)); \ -} while(0) - - -char *glite_jpis_attr_name2id(const char *name); - -int glite_jpis_initDatabase(glite_jpis_context_t ctx); -int glite_jpis_dropDatabase(glite_jpis_context_t ctx); - -int glite_jpis_init_db(glite_jpis_context_t isctx); -void glite_jpis_free_db(glite_jpis_context_t ctx); - -int glite_jpis_lockUninitializedFeed(glite_jpis_context_t ctx, long int *uinqueid, char **PS_URL); -int glite_jpis_initFeed(glite_jpis_context_t ctx, long int uniqueid, char *feedId, time_t feedExpires, int status); -int glite_jpis_unlockFeed(glite_jpis_context_t ctx, long int uniqueid); -int glite_jpis_tryReconnectFeed(glite_jpis_context_t ctx, long int uniqueid, time_t reconn_time); - -int glite_jpis_insertAttrVal(glite_jpis_context_t ctx, const char *jobid, glite_jp_attrval_t *av); - -int glite_jpis_lazyInsertJob(glite_jpis_context_t ctx, const char *ps, const char *jobid, const char *owner); - -#endif diff --git a/org.glite.jp.index/src/simple_server.c b/org.glite.jp.index/src/simple_server.c deleted file mode 100644 index a125aa6..0000000 --- a/org.glite.jp.index/src/simple_server.c +++ /dev/null @@ -1,39 +0,0 @@ -#include "glite/jp/types.h" -#include "glite/jp/context.h" - -#include "jp_H.h" - -int main() { - struct soap soap; - int i, m, s; // master and slave sockets - - glite_jp_context_t ctx; - - soap_init(&soap); - glite_jp_init_context(&ctx); - soap.user = (void *) ctx; - - srand48(time(NULL)); /* feed id generation */ - - m = soap_bind(&soap, NULL, 8902, 100); - if (m < 0) - soap_print_fault(&soap, stderr); - else - { - fprintf(stderr, "Socket connection successful: master socket = %d\n", m); - for (i = 1; ; i++) { - s = soap_accept(&soap); - if (s < 0) { - soap_print_fault(&soap, stderr); - break; - } - soap_serve(&soap); // process RPC request - soap_destroy(&soap); // clean up class instances - soap_end(&soap); // clean up everything and close socket - glite_jp_run_deferred(ctx); - } - } - soap_done(&soap); // close master socket - - return 0; -} diff --git a/org.glite.jp.index/src/soap_ops.c b/org.glite.jp.index/src/soap_ops.c deleted file mode 100644 index f05abee..0000000 --- a/org.glite.jp.index/src/soap_ops.c +++ /dev/null @@ -1,700 +0,0 @@ -#include -#include -#include - -#include "glite/jp/types.h" -#include "glite/jp/context.h" -#include "glite/jp/strmd5.h" -#include "glite/jp/attr.h" -#include "glite/jp/known_attr.h" -#include "glite/lb/trio.h" - -#include "jp_H.h" -#include "soap_version.h" -#include "glite/security/glite_gscompat.h" -#include "db_ops.h" -#include "ws_ps_typeref.h" -#include "ws_is_typeref.h" -#include "context.h" -#include "common.h" - -#define INDEXED_STRIDE 2 // how often realloc indexed attr result - // XXX: 2 is only for debugging, replace with e.g. 100 -#define JOBIDS_STRIDE 2 // how often realloc matched jobids result - -/*------------------*/ -/* Helper functions */ -/*------------------*/ - -#include "glite/jp/ws_fault.c" - - - -/*-----------------------------------------*/ -/* IS WSDL server function implementations */ -/*-----------------------------------------*/ - - -#define CONTEXT_FROM_SOAP(soap,ctx) glite_jpis_context_t ctx = (glite_jpis_context_t) ((slave_data_t *) (soap->user))->ctx - - -static int updateJob(glite_jpis_context_t ctx, const char *ps, struct jptype__jobRecord *jobAttrs) { - glite_jp_attrval_t av; - struct jptype__attrValue *attr; - int ret, iattrs; - - lprintf("jobid='%s', attrs=%d\n", jobAttrs->jobid, jobAttrs->__sizeattributes); - - if (jobAttrs->remove) assert(*(jobAttrs->remove) == GLITE_SECURITY_GSOAP_FALSE); - - if ((ret = glite_jpis_lazyInsertJob(ctx, ps, jobAttrs->jobid, jobAttrs->owner)) != 0) return ret; - for (iattrs = 0; iattrs < jobAttrs->__sizeattributes; iattrs++) { - attr = GLITE_SECURITY_GSOAP_LIST_GET(jobAttrs->attributes, iattrs); - glite_jpis_SoapToAttrVal(&av, attr); - if ((ret = glite_jpis_insertAttrVal(ctx, jobAttrs->jobid, &av)) != 0) return ret; - } - - return 0; -} - - -SOAP_FMAC5 int SOAP_FMAC6 __jpsrv__UpdateJobs( - struct soap *soap, - struct _jpelem__UpdateJobs *jpelem__UpdateJobs, - struct _jpelem__UpdateJobsResponse *jpelem__UpdateJobsResponse UNUSED) -{ - int ret, ijobs; - const char *feedid; - int status, done; - CONTEXT_FROM_SOAP(soap, ctx); - glite_jp_context_t jpctx = ctx->jpctx; - char *err, *ps; - - // XXX: test client in examples/jpis-test - // sends to this function some data for testing - puts(__FUNCTION__); - ps = NULL; - - // get info about the feed - feedid = jpelem__UpdateJobs->feedId; - lprintf("feedid='%s'\n", feedid); - - GLITE_JPIS_PARAM(ctx->param_feedid, ctx->param_feedid_len, feedid); - if ((ret = glite_jp_db_execute(ctx->select_info_feed_stmt)) != 1) { - fprintf(stderr, "can't get info about feed '%s', returned %d records", feedid, ret); - if (jpctx->error) fprintf(stderr, ": %s (%s)\n", jpctx->error->desc, jpctx->error->source); - else fprintf(stderr, "\n"); - goto fail; - } - if (glite_jp_db_fetch(ctx->select_info_feed_stmt) != 0) { - fprintf(stderr, "can't fetch feed '%s'", feedid); - if (jpctx->error) fprintf(stderr, ": %s (%s)\n", jpctx->error->desc, jpctx->error->source); - else fprintf(stderr, "\n"); - goto fail; - } - lprintf("uniqueid=%ld, state=%d, source='%s'\n", ctx->param_uniqueid, ctx->param_state, ctx->param_ps); - ps = strdup(ctx->param_ps); - - // update status, if needed (only orig) - status = ctx->param_state; - done = jpelem__UpdateJobs->feedDone ? GLITE_JP_IS_STATE_DONE : 0; - if ((done != (status & GLITE_JP_IS_STATE_DONE)) && done) { - ctx->param_state |= done; - if ((ret = glite_jp_db_execute(ctx->update_state_feed_stmt)) != 1) { - fprintf(stderr, "can't update state of '%s', returned %d records", feedid, ret); - if (jpctx->error) fprintf(stderr, ": %s (%s)\n", jpctx->error->desc, jpctx->error->source); - else fprintf(stderr, "\n"); - goto fail; - } - } - - // insert all attributes - for (ijobs = 0; ijobs < jpelem__UpdateJobs->__sizejobAttributes; ijobs++) { - if (updateJob(ctx, (const char *) ps, GLITE_SECURITY_GSOAP_LIST_GET(jpelem__UpdateJobs->jobAttributes, ijobs)) != 0) goto fail; - } - free(ps); - - return SOAP_OK; - -fail: - free(ps); - if (ctx->jpctx->error) { - err = glite_jp_error_chain(ctx->jpctx); - fprintf(stderr, "%s:%s\n", __FUNCTION__, err); - free(err); - } - glite_jp_server_err2fault(ctx->jpctx, soap); - return SOAP_FAULT; -} - - -static int checkIndexedConditions(glite_jpis_context_t ctx, struct _jpelem__QueryJobs *in) -{ - char **indexed_attrs = NULL, *res; - int i, j, k, ret; - glite_jp_db_stmt_t stmt; - - - if ((ret = glite_jp_db_execstmt(ctx->jpctx, - "SELECT name FROM attrs WHERE (indexed=1)", &stmt)) < 0) goto end; - - i = 0; - while ( (ret = glite_jp_db_fetchrow(stmt, &res)) > 0 ) { - if (!(i % INDEXED_STRIDE)) { - indexed_attrs = realloc(indexed_attrs, - ((i / INDEXED_STRIDE + 1) * INDEXED_STRIDE) - * sizeof(*indexed_attrs)); - } - indexed_attrs[i++] = strdup(res); - free(res); - } - if ( ret < 0 ) goto end; - - for (k=0; k < in->__sizeconditions; k++) { - for (j=0; j < i; j++) { - char *attr = GLITE_SECURITY_GSOAP_LIST_GET(in->conditions, k)->attr; - if (!strcmp(attr, GLITE_JP_ATTR_JOBID) || !strcmp(attr, indexed_attrs[j])) { - ret = 0; - goto end; - } - } - } - ret = 1; - -end: - for (j=0; j < i; j++) free(indexed_attrs[j]); - free(indexed_attrs); - - return(ret); -} - - -static int checkConditions(glite_jpis_context_t ctx, struct _jpelem__QueryJobs *in) { - int i, j; - char *attr; - - for (i = 0; i < in->__sizeconditions; i++) { - attr = GLITE_SECURITY_GSOAP_LIST_GET(in->conditions, i)->attr; - if (!attr) return 1; - for (j = 0; ctx->conf->attrs[j] && strcasecmp(ctx->conf->attrs[j], attr) != 0; j++); - if (!ctx->conf->attrs[j]) return 1; - } - - return 0; -} - - -/* adds attr table name to the list (null terminated) , iff unigue */ -static void add_attr_table(char *new, char ***attr_tables) -{ - int i; - - for (i=0; (*attr_tables && (*attr_tables)[i]); i++) { - if (!strcmp((*attr_tables)[i], new)) return; - } - - *attr_tables = realloc((*attr_tables), (i+2) * sizeof(**attr_tables)); - (*attr_tables)[i] = strdup(new); - (*attr_tables)[i+1] = NULL; -} - -/* transform soap enum queryOp to mysql quivalent */ -static int get_op(const enum jptype__queryOp in, char **out) -{ - char *qop; - glite_jp_queryop_t op; - - glite_jpis_SoapToQueryOp(in, &op); - switch (op) { - case GLITE_JP_QUERYOP_EQUAL: - qop = strdup("="); - break; - case GLITE_JP_QUERYOP_UNEQUAL: - qop = strdup("!="); - break; - case GLITE_JP_QUERYOP_GREATER: - qop = strdup(">"); - break; - case GLITE_JP_QUERYOP_LESS: - qop = strdup("<"); - break; - case GLITE_JP_QUERYOP_WITHIN: - qop = strdup("BETWEEN"); - break; - default: - // unsupported query operator - return(1); - break; - } - - *out = qop; - return(0); -} - - -static char *get_sql_stringvalue(struct jptype__stringOrBlob *value) { - if (!value) return NULL; - if (!GSOAP_ISSTRING(value)) return NULL; - return GSOAP_STRING(value); -} - - -static int get_sql_indexvalue(char **sql, glite_jpis_context_t ctx, struct jptype__indexQuery *condition, struct jptype__stringOrBlob *value) { - glite_jp_attrval_t attr; - - *sql = NULL; - if (!value) return 0; - memset(&attr, 0, sizeof attr); - attr.name = condition->attr; - if (GSOAP_ISSTRING(value)) { - attr.value = GSOAP_STRING(value); - attr.binary = 0; - } else if (GSOAP_ISBLOB(value)) { - attr.value = GSOAP_BLOB(value)->__ptr; - attr.size = GSOAP_BLOB(value)->__size; - attr.binary = 1; - } else return 0; - glite_jpis_SoapToAttrOrig(condition->origin, &(attr.origin)); - - *sql = glite_jp_attrval_to_db_index(ctx->jpctx, &attr, 255); - return 0; -} - - -static int get_sql_cond(char **sql, const char *attr_md5, enum jptype__queryOp op, char *value, char *value2) { - char *s, *qop, *column; - - *sql = NULL; - if (get_op(op, &qop) != 0) return 0; - if (attr_md5) trio_asprintf(&column, "attr_%|Ss.value", attr_md5); - else asprintf(&column, "jobs.dg_jobid"); - trio_asprintf(sql, "%s %s \"%|Ss\"", column, qop, value); - free(column); - free(qop); - if (op == jptype__queryOp__WITHIN) { - if (!value) { - free(*sql); - *sql = NULL; - return EINVAL; - } - trio_asprintf(&s, "%s AND \"%|Ss\"", *sql, value2); - free(*sql); *sql = s; - } - return 0; -} - - -static char *get_sql_or(glite_jpis_context_t ctx, struct jptype__indexQuery *condition, const char *attr_md5) { - struct jptype__indexQueryRecord *record; - char *sql, *cond, *s = NULL, *value, *value2; - int j; - - sql = strdup(""); - for (j=0; j < condition->__sizerecord; j++) { - record = GLITE_SECURITY_GSOAP_LIST_GET(condition->record, j); - if (record->op == jptype__queryOp__EXISTS) { - /* no additional conditions needed when existing is enough */ - } else { - if (strcmp(condition->attr, GLITE_JP_ATTR_JOBID) == 0) { - value = get_sql_stringvalue(record->value); - if (!value) goto err; - value2 = get_sql_stringvalue(record->value2); - if (get_sql_cond(&cond, attr_md5, record->op, value, value2) != 0) goto err; - } else { - get_sql_indexvalue(&value, ctx, condition, record->value); - get_sql_indexvalue(&value2, ctx, condition, record->value2); - get_sql_cond(&cond, attr_md5, record->op, value, value2); - free(value); - free(value2); - if (!cond) goto err; - } - trio_asprintf(&s,"%s%s%s", sql, (sql[0] ? " OR " : ""), cond); - free(cond); - free(sql); sql = s; - } - } - - return sql; -err: - free(sql); - free(s); - return NULL; -} - - -/* get all jobids matching the query conditions */ -static int get_jobids(glite_jpis_context_t ctx, struct _jpelem__QueryJobs *in, char ***jobids, char *** ps_list) -{ - char *qa = NULL, *qb = NULL, *qor, *attr_md5, - *qwhere = NULL, *query = NULL, *res[2], - **jids = NULL, **pss = NULL, **attr_tables = NULL; - int i, ret; - glite_jp_db_stmt_t stmt = NULL; - glite_jp_attr_orig_t orig; - - - qwhere = strdup(""); - for (i=0; i < in->__sizeconditions; i++) { - struct jptype__indexQuery *condition; - - condition = GLITE_SECURITY_GSOAP_LIST_GET(in->conditions, i); - - /* attr name */ - if (strcmp(condition->attr, GLITE_JP_ATTR_JOBID) == 0) { - /* no subset from attr_ table, used jobs table instead */ - attr_md5 = NULL; - qa = strdup(""); - } else { - attr_md5 = str2md5(condition->attr); - add_attr_table(attr_md5, &attr_tables); - - /* origin */ - if (condition->origin) { - glite_jpis_SoapToAttrOrig(condition->origin, &orig); - trio_asprintf(&qb, "attr_%|Ss.origin = %d AND ", attr_md5, orig); - } else - trio_asprintf(&qb, ""); - - /* select given records in attr_ table */ - trio_asprintf(&qa,"%s%sjobs.jobid = attr_%|Ss.jobid", - (i ? "AND " : ""), qb, attr_md5); - - free(qb); - } - - /* inside part of the condition: record list (ORs) */ - if ((qor = get_sql_or(ctx, condition, attr_md5)) == NULL) goto err; - if (qor[0]) { - asprintf(&qb, "%s%s(%s)", qa, qa[0] ? " AND " : "", qor); - free(qa); - qa = qb; - } - free(qor); - - trio_asprintf(&qb,"%s%s%s", qwhere, qa[0] ? " " : "", qa); - free(qa); qwhere = qb; qb = NULL; qa = NULL; - free(attr_md5); - } - - qa = strdup(""); - - for (i=0; (attr_tables && attr_tables[i]); i++) { - trio_asprintf(&qb,"%s, attr_%s", qa, attr_tables[i]); - free(qa); qa = qb; qb = NULL; - } - - if (ctx->conf->no_auth) { - trio_asprintf(&query, "SELECT DISTINCT dg_jobid,ps FROM jobs%s WHERE%s", qa, qwhere); - } - else { - trio_asprintf(&query, "SELECT DISTINCT dg_jobid,ps FROM jobs,users%s WHERE (jobs.ownerid = users.userid AND users.cert_subj='%s') AND%s", qa, ctx->jpctx->peer, qwhere); - } - printf("Incomming QUERY:\n %s\n", query); - free(qwhere); - free(qa); - - if ((ret = glite_jp_db_execstmt(ctx->jpctx, query, &stmt)) < 0) goto err; - free(query); - - i = 0; - while ( (ret = glite_jp_db_fetchrow(stmt, res)) > 0 ) { - if (!(i % JOBIDS_STRIDE)) { - jids = realloc(jids, - ((i / JOBIDS_STRIDE + 1) * JOBIDS_STRIDE + 1) - * sizeof(*jids)); - } - if (!(i % JOBIDS_STRIDE)) { - pss = realloc(pss, - ((i / JOBIDS_STRIDE + 1) * JOBIDS_STRIDE + 1) - * sizeof(*pss)); - } - jids[i] = res[0]; - jids[i+1] = NULL; - pss[i] = res[1]; - pss[i+1] = NULL; - i++; - } - - if ( ret < 0 ) goto err; - - glite_jp_db_freestmt(&stmt); - - *jobids = jids; - *ps_list = pss; - - return 0; - -err: - free(query); - for (i=0; (pss && pss[i]); i++) free(pss[i]); - free(pss); - for (i=0; (jids && jids[i]); i++) free(jids[i]); - free(jids); - glite_jp_db_freestmt(&stmt); - - return ret; -} - -static void freeAttval_t(glite_jp_attrval_t jav) -{ - free(jav.name); - free(jav.value); - free(jav.origin_detail); -} - - -/* get all values of a given attribute for a job with a given jobid */ -/* all values are soap_malloc-ated, exept of av (due to absence of */ -/* soap_realloc) */ -/* Needs to be copied to list using soap_malloc in calling function! */ - -static int get_attr(struct soap *soap, glite_jpis_context_t ctx, char *jobid, char *attr_name, int *size, struct jptype__attrValue **out) -{ - glite_jp_attrval_t jav; - struct jptype__attrValue *av; - enum jptype__attrOrig *origin; - char *query, *fv, *jobid_md5, *attr_md5; - int i, ret; - glite_jp_db_stmt_t stmt; - - memset(&jav,0,sizeof(jav)); - jobid_md5 = str2md5(jobid); - attr_md5 = str2md5(attr_name); - trio_asprintf(&query,"SELECT full_value FROM attr_%|Ss WHERE jobid = \"%s\"", - attr_md5, jobid_md5); - free(attr_md5); - free(jobid_md5); - - if ((ret = glite_jp_db_execstmt(ctx->jpctx, query, &stmt)) < 0) { - glite_jpis_stack_error(ctx->jpctx, EIO, "SELECT from attribute '%s' failed", attr_name); - goto err; - } - free(query); - - av = *out; - i = *size; - while ( (ret = glite_jp_db_fetchrow(stmt, &fv)) > 0 ) { - av = realloc(av, (i+1) * sizeof(*av)); - memset(&av[i], 0, sizeof(av[i])); - - memset(&jav,0,sizeof(jav)); - if (glite_jp_attrval_from_db(ctx->jpctx, fv, &jav)) goto err; - av[i].name = soap_strdup(soap, attr_name); - av[i].value = soap_malloc(soap, sizeof(*(av[i].value))); - memset(av[i].value, 0, sizeof(*(av[i].value))); - if (jav.binary) { - GSOAP_SETBLOB(av[i].value, soap_malloc(soap, sizeof(*(GSOAP_BLOB(av[i].value))))); - memset(GSOAP_BLOB(av[i].value), 0, sizeof(*(GSOAP_BLOB(av[i].value)))); - GSOAP_BLOB(av[i].value)->__ptr = soap_malloc(soap, jav.size); - memcpy(GSOAP_BLOB(av[i].value)->__ptr, jav.value, jav.size); - GSOAP_BLOB(av[i].value)->__size = jav.size; - // XXX: id, type, option - how to handle? - } - else { - GSOAP_SETSTRING(av[i].value, jav.value ? soap_strdup(soap, jav.value) : NULL); - } - av[i].timestamp = jav.timestamp; - glite_jpis_AttrOrigToSoap(soap, jav.origin, &origin); - // atribute has always origin - assert(origin != GLITE_JP_ATTR_ORIG_ANY); - av[i].origin = *origin; soap_dealloc(soap, origin); - if (jav.origin_detail) av[i].originDetail = soap_strdup(soap, jav.origin_detail); - - i++; - freeAttval_t(jav); - } - if (ret < 0) goto err; - - glite_jp_db_freestmt(&stmt); - *size = i; - *out = av; - - return 0; - -err: - glite_jp_db_freestmt(&stmt); - freeAttval_t(jav); - return 1; -} - - -/* return owner of job record */ -static int get_owner(glite_jpis_context_t ctx, char *jobid, char **owner) -{ - char *ownerid = NULL, *jobid_md5, *query, *fv = NULL; - glite_jp_db_stmt_t stmt; - - - /* get ownerid correspondig to jobid */ - jobid_md5 = str2md5(jobid); - trio_asprintf(&query,"SELECT ownerid FROM jobs WHERE jobid = \"%s\"", - jobid_md5); - free(jobid_md5); - - if ((glite_jp_db_execstmt(ctx->jpctx, query, &stmt)) < 0) goto err; - free(query); - - if (glite_jp_db_fetchrow(stmt, &ownerid) <= 0 ) goto err; - - /* DB consistency check - only one record per jobid ! */ - assert (glite_jp_db_fetchrow(stmt, &fv) <=0); free(fv); - - - /* get cert_subj corresponding to ownerid */ - trio_asprintf(&query,"SELECT cert_subj FROM users WHERE userid = \"%s\"", - ownerid); - - if ((glite_jp_db_execstmt(ctx->jpctx, query, &stmt)) < 0) goto err; - free(query); - - if (glite_jp_db_fetchrow(stmt, owner) <= 0 ) goto err; - - /* DB consistency check - only one record per userid ! */ - assert (glite_jp_db_fetchrow(stmt, &fv) <=0); free(fv); - - - return 0; -err: - free(ownerid); - free(query); - return 1; -} - -/* fills structure jobRecord for a given jobid*/ -static int get_attrs(struct soap *soap, glite_jpis_context_t ctx, char *jobid, struct _jpelem__QueryJobs *in, struct jptype__jobRecord *out) -{ - struct jptype__attrValue *av = NULL; - int j, size = 0; - - - assert(out); - memset(out, 0, sizeof(*out)); - - /* jobid */ - out->jobid = soap_strdup(soap, jobid); - - /* sizeattributes & attributes */ - size = 0; - for (j=0; j < in->__sizeattributes; j++) - if (get_attr(soap, ctx, jobid, in->attributes[j], &size, &av) ) goto err; - if ( get_owner(ctx, jobid, &(out->owner)) ) goto err; - - GLITE_SECURITY_GSOAP_LIST_CREATE(soap, out, attributes, struct jptype__attrValue, size); - for (j = 0; j < size; j++) - memcpy(GLITE_SECURITY_GSOAP_LIST_GET(out->attributes, j), &av[j], sizeof(av[0])); - free(av); - - return 0; - -err: - return 1; -} - -SOAP_FMAC5 int SOAP_FMAC6 __jpsrv__QueryJobs( - struct soap *soap, - struct _jpelem__QueryJobs *in, - struct _jpelem__QueryJobsResponse *out) -{ - CONTEXT_FROM_SOAP(soap, ctx); - struct jptype__jobRecord *jr; - - char **jobids = NULL, **ps_list = NULL; - int i, size, err; - - - puts(__FUNCTION__); - memset(out, 0, sizeof(*out)); - - /* test whether there is any indexed attribudes in the condition */ - if ( checkIndexedConditions(ctx, in) ) { - glite_jpis_stack_error(ctx->jpctx, EINVAL, "No indexed attribute in query"); - goto fail; - } - - /* test whether there is known attribudes in the condition */ - if ( checkConditions(ctx, in) ) { - glite_jpis_stack_error(ctx->jpctx, EINVAL, "Unknown attribute in query"); - goto fail; - } - - /* get all jobids matching the conditions */ - if ( (err = get_jobids(ctx, in, &jobids, &ps_list)) != 0 ) { - glite_jpis_stack_error(ctx->jpctx, err, "Error getting jobs"); - goto fail; - } - - /* get all requested attributes for matching jobids */ - for (i=0; (jobids && jobids[i]); i++); - size = i; - GLITE_SECURITY_GSOAP_LIST_CREATE(soap, out, jobs, struct jptype__jobRecord, size); - for (i=0; (jobids && jobids[i]); i++) { - jr = GLITE_SECURITY_GSOAP_LIST_GET(out->jobs, i); - if ( (err = get_attrs(soap, ctx, jobids[i], in, jr)) != 0 ) { - glite_jpis_stack_error(ctx->jpctx, err, "Error getting attributes of the job '%s'", jobids[i]); - goto fail; - } - - // XXX: in prototype we return only first value of PS URL - // in future database should contain one more table with URLs - jr->__sizeprimaryStorage = 1; - jr->primaryStorage = soap_malloc(soap, sizeof(*(jr->primaryStorage))); - jr->primaryStorage[0] = soap_strdup(soap, ps_list[i]); - free(ps_list[i]); - free(jobids[i]); - } - free(jobids); - free(ps_list); - - return SOAP_OK; -fail: - glite_jp_server_err2fault(ctx->jpctx, soap); - return SOAP_ERR; -} - - -SOAP_FMAC5 int SOAP_FMAC6 __jpsrv__AddFeed( - struct soap *soap UNUSED, - struct _jpelem__AddFeed *in UNUSED, - struct _jpelem__AddFeedResponse *out UNUSED) -{ - // XXX: test client in examples/jpis-test - // sends to this function some data for testing - puts(__FUNCTION__); - return SOAP_OK; -} - - -SOAP_FMAC5 int SOAP_FMAC6 __jpsrv__GetFeedIDs( - struct soap *soap UNUSED, - struct _jpelem__GetFeedIDs *in UNUSED, - struct _jpelem__GetFeedIDsResponse *out UNUSED) -{ - // XXX: test client in examples/jpis-test - // sends to this function some data for testing - puts(__FUNCTION__); - return SOAP_OK; -} - - -SOAP_FMAC5 int SOAP_FMAC6 __jpsrv__DeleteFeed( - struct soap *soap UNUSED, - struct _jpelem__DeleteFeed *in UNUSED, - struct _jpelem__DeleteFeedResponse *out UNUSED) -{ - // XXX: test client in examples/jpis-test - // sends to this function some data for testing - puts(__FUNCTION__); - return SOAP_OK; -} - - -SOAP_FMAC5 int SOAP_FMAC6 __jpsrv__ServerConfiguration( - struct soap *soap UNUSED, - struct _jpelem__ServerConfiguration *in UNUSED, - struct _jpelem__ServerConfigurationResponse *out UNUSED) -{ - // empty, just for deserializer generation - puts(__FUNCTION__); - return SOAP_OK; -} - diff --git a/org.glite.jp.index/src/soap_ps_calls.c b/org.glite.jp.index/src/soap_ps_calls.c deleted file mode 100644 index 0f9eed2..0000000 --- a/org.glite.jp.index/src/soap_ps_calls.c +++ /dev/null @@ -1,148 +0,0 @@ -#include -#include -#include -#include - -#include "soap_version.h" -#include "glite/jp/types.h" -#include "glite/jp/context.h" -#include "glite/security/glite_gsplugin.h" -#include "glite/security/glite_gscompat.h" - -#include "jp_H.h" - -#include "conf.h" -#include "db_ops.h" -#include "ws_ps_typeref.h" -#include "context.h" - -#include "stdsoap2.h" - - -extern struct Namespace jp__namespaces[]; - - -/*------------------*/ -/* Helper functions */ -/*------------------*/ - -#define dprintf(FMT, ARGS...) do {fprintf(stderr, "[%d] %s: ", getpid(), __FUNCTION__); fprintf(stderr, FMT, ##ARGS); } while(0); -#include "glite/jp/ws_fault.c" -#define check_fault(SOAP, ERR) glite_jp_clientCheckFault((SOAP), (ERR), NULL, 0) - - -/*----------------------*/ -/* PS WSDL client calls */ -/*----------------------*/ - -static int find_dest_index(glite_jp_is_conf *conf, long int uniqueid) -{ - int i; - - for (i=0; conf->feeds[i]; i++) - if (conf->feeds[i]->uniqueid == uniqueid) return(i); - - return -1; -} - - -// call PS FeedIndex for a given destination -int MyFeedIndex(glite_jpis_context_t ctx, glite_jp_is_conf *conf, long int uniqueid, char *dest) -{ - struct _jpelem__FeedIndex in; - struct _jpelem__FeedIndexResponse out; -// struct jptype__primaryQuery query; -// struct jptype__stringOrBlob value; -// struct xsd__base64Binary blob; - int i, dest_index, status; - struct soap *soap = soap_new(); - glite_gsplugin_Context plugin_ctx; - glite_jp_error_t err; - char *src, *desc = NULL; - // preventive very long timeout - static const struct timeval to = {tv_sec: 7200, tv_usec: 0}; - - lprintf("(%ld) for %s called\n", uniqueid, dest); - - glite_gsplugin_init_context(&plugin_ctx); - glite_gsplugin_set_timeout(plugin_ctx, &to); - if (ctx->conf->server_key) plugin_ctx->key_filename = strdup(ctx->conf->server_key); - if (ctx->conf->server_cert) plugin_ctx->cert_filename = strdup(ctx->conf->server_cert); - - soap_init(soap); - soap_set_namespaces(soap, jp__namespaces); - soap_set_omode(soap, SOAP_IO_BUFFER); // set buffered response - // buffer set to SOAP_BUFLEN (default = 8k) - soap_register_plugin_arg(soap,glite_gsplugin,plugin_ctx); - - memset(&in, 0, sizeof(in)); - memset(&err, 0, sizeof(err)); - - for (i=0; conf->attrs[i]; i++) ; - in.__sizeattributes = i; - in.attributes = conf->attrs; - - if ((dest_index = find_dest_index(conf, uniqueid)) < 0) goto err; - - for (i=0; conf->feeds[dest_index]->query[i].attr; i++); - GLITE_SECURITY_GSOAP_LIST_CREATE(soap, &in, conditions, struct jptype__primaryQuery, i); - - for (i=0; conf->feeds[dest_index]->query[i].attr; i++) { - if (glite_jpis_QueryCondToSoap(soap, &conf->feeds[dest_index]->query[i], - GLITE_SECURITY_GSOAP_LIST_GET(in.conditions, i)) != SOAP_OK) { - err.code = EINVAL; - err.desc = "error during conds conversion"; - asprintf(&src, "%s/%s():%d", __FILE__, __FUNCTION__, __LINE__); - fprintf(stderr, "%s\n", src); - goto err; - } - } - - in.history = conf->feeds[dest_index]->history; - in.continuous = conf->feeds[dest_index]->continuous; - in.destination = ctx->hname; - lprintf("(%ld) destination IS: '%s'\n", uniqueid, ctx->hname); - - if (check_fault(soap,soap_call___jpsrv__FeedIndex(soap,dest,"", &in, &out)) != 0) { - fprintf(stderr, "\n"); - glite_jpis_unlockFeed(ctx, uniqueid); - err.code = EIO; - asprintf(&desc, "soap_call___jpsrv__FeedIndex() returned error %d", soap->error); - err.desc = desc; - asprintf(&src, "%s/%s():%d", __FILE__, __FUNCTION__, __LINE__); - fprintf(stderr, "%s\n", err.desc); - goto err; - } - else { - status = (conf->feeds[dest_index]->history ? GLITE_JP_IS_STATE_HIST : 0) | (conf->feeds[dest_index]->continuous ? GLITE_JP_IS_STATE_CONT : 0); - lprintf("(%ld) FeedId: %s\n", uniqueid, out.feedId); - lprintf("(%ld) Expires: %s", uniqueid, ctime(&out.feedExpires)); - glite_jpis_initFeed(ctx, uniqueid, out.feedId, out.feedExpires, status); - glite_jpis_unlockFeed(ctx, uniqueid); - } - - soap_end(soap); - soap_done(soap); - - return 0; - -err: - err.source = src; - glite_jp_stack_error(ctx->jpctx, &err); - free(src); - free(desc); - soap_end(soap); - soap_done(soap); - - return err.code; -} - - -int __jpsrv__RegisterJob(struct soap* soap UNUSED, struct _jpelem__RegisterJob *jpelem__RegisterJob UNUSED, struct _jpelem__RegisterJobResponse *jpelem__RegisterJobResponse UNUSED) { return 0; } -int __jpsrv__StartUpload(struct soap* soap UNUSED, struct _jpelem__StartUpload *jpelem__StartUpload UNUSED, struct _jpelem__StartUploadResponse *jpelem__StartUploadResponse UNUSED) { return 0; } -int __jpsrv__CommitUpload(struct soap* soap UNUSED, struct _jpelem__CommitUpload *jpelem__CommitUpload UNUSED, struct _jpelem__CommitUploadResponse *jpelem__CommitUploadResponse UNUSED) { return 0; } -int __jpsrv__RecordTag(struct soap* soap UNUSED, struct _jpelem__RecordTag *jpelem__RecordTag UNUSED, struct _jpelem__RecordTagResponse *jpelem__RecordTagResponse UNUSED) { return 0; } -int __jpsrv__FeedIndex(struct soap* soap UNUSED, struct _jpelem__FeedIndex *jpelem__FeedIndex UNUSED, struct _jpelem__FeedIndexResponse *jpelem__FeedIndexResponse UNUSED) { return 0; } -int __jpsrv__FeedIndexRefresh(struct soap* soap UNUSED, struct _jpelem__FeedIndexRefresh *jpelem__FeedIndexRefresh UNUSED, struct _jpelem__FeedIndexRefreshResponse *jpelem__FeedIndexRefreshResponse UNUSED) { return 0; } -int __jpsrv__GetJobFiles(struct soap* soap UNUSED, struct _jpelem__GetJobFiles *jpelem__GetJobFiles UNUSED, struct _jpelem__GetJobFilesResponse *jpelem__GetJobFilesResponse UNUSED) { return 0; } -int __jpsrv__GetJobAttributes(struct soap* soap UNUSED, struct _jpelem__GetJobAttributes *jpelem__GetJobAttributes UNUSED, struct _jpelem__GetJobAttributesResponse *jpelem__GetJobAttributesResponse UNUSED) { return 0; } diff --git a/org.glite.jp.index/src/soap_ps_calls.h b/org.glite.jp.index/src/soap_ps_calls.h deleted file mode 100644 index cf167ef..0000000 --- a/org.glite.jp.index/src/soap_ps_calls.h +++ /dev/null @@ -1,11 +0,0 @@ -#ident "$Header$" - -#ifndef _SOAP_PS_CALLS_H -#define _SOAP_PS_CALLS_H - -#include "context.h" -#include "conf.h" - -int MyFeedIndex(glite_jpis_context_t ctx, glite_jp_is_conf *conf, long int uniqueid, char *dest); - -#endif diff --git a/org.glite.jp.index/src/typemap.dat b/org.glite.jp.index/src/typemap.dat deleted file mode 100644 index e86b875..0000000 --- a/org.glite.jp.index/src/typemap.dat +++ /dev/null @@ -1,4 +0,0 @@ -jpsrv = http://glite.org/wsdl/services/jp -jptype = http://glite.org/wsdl/types/jp -jpelem = http://glite.org/wsdl/elements/jp -jpisclient = http://glite.org/xsd/types/jpisclient diff --git a/org.glite.jp.index/src/ws_is_typeref.c b/org.glite.jp.index/src/ws_is_typeref.c deleted file mode 100644 index 17e315e..0000000 --- a/org.glite.jp.index/src/ws_is_typeref.c +++ /dev/null @@ -1,214 +0,0 @@ -#include -#include -#include -#include - -#include -#include "soap_version.h" - -#include "jp_H.h" -#include "ws_typemap.h" -#include -#include "ws_is_typeref.h" - -#include "glite/jp/ws_fault.c" - - -void glite_jpis_SoapToQueryOp(const enum jptype__queryOp in, glite_jp_queryop_t *out) -{ - switch ( in ) - { - case EQUAL: *out = GLITE_JP_QUERYOP_EQUAL; break; - case UNEQUAL: *out = GLITE_JP_QUERYOP_UNEQUAL; break; - case LESS: *out = GLITE_JP_QUERYOP_LESS; break; - case GREATER: *out = GLITE_JP_QUERYOP_GREATER; break; - case WITHIN: *out = GLITE_JP_QUERYOP_WITHIN; break; - case EXISTS: *out = GLITE_JP_QUERYOP_EXISTS; break; - default: assert(0); break; - } -} - -void glite_jpis_SoapToAttrOrig(const enum jptype__attrOrig *in, glite_jp_attr_orig_t *out) -{ - assert(out); - - if (!in) { - *out = GLITE_JP_ATTR_ORIG_ANY; - return; - } - - switch ( *in ) - { - case SYSTEM: *out = GLITE_JP_ATTR_ORIG_SYSTEM; break; - case USER: *out = GLITE_JP_ATTR_ORIG_USER; break; - case FILE_: *out = GLITE_JP_ATTR_ORIG_FILE; break; - default: assert(0); break; - } -} - -static int SoapToQueryRecordVal( - struct jptype__stringOrBlob *in, - int *binary, - size_t *size, - char **value) -{ - - assert(in); - if (GSOAP_ISSTRING(in)) { - *binary = 0; - *size = 0; - *value = strdup(GSOAP_STRING(in)); - - return 0; - } - else if (GSOAP_ISBLOB(in)) { - *binary = 1; - *size = GSOAP_BLOB(in)->__size; - memcpy(*value, GSOAP_BLOB(in)->__ptr, GSOAP_BLOB(in)->__size); - // XXX how to handle id, type, option? - - return 0; - } - else - // malformed value - return 1; -} - - -#if 0 -static int SoapToQueryCond( - struct jptype__indexQuery *in, - glite_jp_query_rec_t **out) -{ - glite_jp_query_rec_t *qr; - int i; - struct jptype__indexQueryRecord *record; - - assert(in); assert(out); - qr = calloc(in->__sizerecord + 1, sizeof(*qr)); - - for (i=0; i < in->__sizerecord; i++) { - record = GLITE_SECURITY_GSOAP_LIST_GET(in->record, i); - qr[i].attr = strdup(in->attr); - glite_jpis_SoapToQueryOp(record->op, &(qr[i].op)); - - switch (qr[i].op) { - case GLITE_JP_QUERYOP_EXISTS: - break; - - case GLITE_JP_QUERYOP_WITHIN: - SoapToQueryRecordVal(record->value2, &(qr[i].binary), - &(qr[i].size2), &(qr[i].value2)); - // fall through - default: - if ( SoapToQueryRecordVal(record->value, &(qr[i].binary), - &(qr[i].size), &(qr[i].value)) ) { - *out = NULL; - return 1; - } - break; - } - - glite_jpis_SoapToAttrOrig(in->origin, &(qr[i].origin) ); - } - - *out = qr; - - return 0; -} - -/** - * Translate JP index query conditions from soap to C query_rec - * - * \param OUT array of glite_jp_query_rec_t query records - */ -int glite_jpis_SoapToQueryConds( - int size, - struct jptype__indexQuery **in, - glite_jp_query_rec_t ***out) -{ - glite_jp_query_rec_t **qr; - int i; - - assert(in); assert(out); - qr = calloc(size+1, sizeof(*qr)); - - for (i=0; iattr); assert(out); - qr = out; - - qr[0].attr = strdup(in->attr); - glite_jpis_SoapToQueryOp(in->op, &(qr[0].op)); - - switch (qr[0].op) { - case GLITE_JP_QUERYOP_EXISTS: - break; - - case GLITE_JP_QUERYOP_WITHIN: - SoapToQueryRecordVal(in->value2, &(qr[0].binary), - &(qr[0].size2), &(qr[0].value2)); - // fall through - default: - if ( SoapToQueryRecordVal(in->value, &(qr[0].binary), - &(qr[0].size), &(qr[0].value)) ) { - return 1; - } - break; - } - - glite_jpis_SoapToAttrOrig(in->origin, &(qr[0].origin) ); - - return 0; -} - - - -/** - * Translate JP primary query conditions from soap to C query_rec - * - * \param IN Soap structure - * \param OUT array of glite_jp_query_rec_t query records - */ -int glite_jpis_SoapToPrimaryQueryConds( - int size, - GLITE_SECURITY_GSOAP_LIST_TYPE(jptype, primaryQuery) in, - glite_jp_query_rec_t **out) -{ - glite_jp_query_rec_t *qr; - int i; - - assert(in || !size); assert(out); - qr = calloc(size+1, sizeof(*qr)); - - for (i=0; i -#include -#include -#include - -#include - -#include "jp_H.h" -#include "ws_typemap.h" -#include "ws_ps_typeref.h" -#include "glite/jp/ws_fault.c" - - -static void QueryOpToSoap(const glite_jp_queryop_t in, enum jptype__queryOp *out) -{ - switch ( in ) - { - case GLITE_JP_QUERYOP_EQUAL: *out = EQUAL; break; - case GLITE_JP_QUERYOP_UNEQUAL: *out = UNEQUAL; break; - case GLITE_JP_QUERYOP_LESS: *out = LESS; break; - case GLITE_JP_QUERYOP_GREATER: *out = GREATER; break; - case GLITE_JP_QUERYOP_WITHIN: *out = WITHIN; break; - case GLITE_JP_QUERYOP_EXISTS: *out = EXISTS; break; - default: assert(0); break; - } -} - -void glite_jpis_AttrOrigToSoap(struct soap *soap, const glite_jp_attr_orig_t in, enum jptype__attrOrig **out) -{ - enum jptype__attrOrig *o = soap_malloc(soap, sizeof(*o)); - - switch ( in ) - { - case GLITE_JP_ATTR_ORIG_ANY: o = NULL; break; - case GLITE_JP_ATTR_ORIG_SYSTEM: *o = SYSTEM; break; - case GLITE_JP_ATTR_ORIG_USER: *o = USER; break; - case GLITE_JP_ATTR_ORIG_FILE: *o = FILE_; break; - default: assert(0); break; - } - - *out = o; -} - -static int QueryRecordValToSoap( - struct soap *soap, - int binary, - size_t size, - char *in, - struct jptype__stringOrBlob **out) -{ - struct jptype__stringOrBlob *val; - - - assert(out); - if ( !(val = soap_malloc(soap, sizeof(*val))) ) return SOAP_FAULT; - memset(val, 0, sizeof(*val) ); - - if (binary) { - GSOAP_SETBLOB(val, soap_malloc(soap, sizeof(*GSOAP_BLOB(val)))); - if ( !GSOAP_BLOB(val) ) return SOAP_FAULT; - GSOAP_BLOB(val)->__size = size; - if ( !(GSOAP_BLOB(val)->__ptr = soap_malloc(soap, GSOAP_BLOB(val)->__size)) ) return SOAP_FAULT; - memcpy(GSOAP_BLOB(val)->__ptr, in, GSOAP_BLOB(val)->__size); - // XXX how to handle id, type, option? - } - else { - GSOAP_SETSTRING(val, soap_strdup(soap, in)); - if ( !(GSOAP_STRING(val) ) ) return SOAP_FAULT; - } - - *out = val; - - return SOAP_OK; -} - -/** - * Translate JP query condition from C query_rec to Soap - * - * \param IN in glite_jp_query_rec_t query record - * \param OUT Soap structure - */ -int glite_jpis_QueryCondToSoap( - struct soap *soap, - glite_jp_query_rec_t *in, - struct jptype__primaryQuery *out) -{ - struct jptype__primaryQuery *qr; - - assert(in); assert(out); - qr = out; - memset(qr, 0, sizeof(*qr)); - - if ( !(qr->attr = soap_strdup(soap, in->attr)) ) return SOAP_FAULT; - QueryOpToSoap(in->op, &(qr->op)); - glite_jpis_AttrOrigToSoap(soap, in->origin, &(qr->origin)); - - switch ( in->op ) { - case GLITE_JP_QUERYOP_WITHIN: - if (QueryRecordValToSoap(soap, in->binary, in->size2, in->value2, &qr->value2)) - return SOAP_FAULT; - case GLITE_JP_QUERYOP_EQUAL: - case GLITE_JP_QUERYOP_UNEQUAL: - case GLITE_JP_QUERYOP_LESS: - case GLITE_JP_QUERYOP_GREATER: - if (QueryRecordValToSoap(soap, in->binary, in->size, in->value, &qr->value)) - return SOAP_FAULT; - case GLITE_JP_QUERYOP_EXISTS: - break; - default: - assert(0); // unknown or undefined operation - break; - } - - *out = *qr; - - return SOAP_OK; -} - -static void SoapToAttrOrig(glite_jp_attr_orig_t *out, const enum jptype__attrOrig in) -{ - switch ( in ) - { - case jptype__attrOrig__SYSTEM: *out = GLITE_JP_ATTR_ORIG_SYSTEM; break; - case jptype__attrOrig__USER: *out = GLITE_JP_ATTR_ORIG_USER; break; - case jptype__attrOrig__FILE_: *out = GLITE_JP_ATTR_ORIG_FILE; break; - default: assert(0); break; - } -} - -void glite_jpis_SoapToAttrVal(glite_jp_attrval_t *av, const struct jptype__attrValue *attr) { - memset(av, 0, sizeof(*av)); - av->name = attr->name; - av->binary = GSOAP_ISBLOB(attr->value); - if (av->binary) { - av->value = GSOAP_BLOB(attr->value)->__ptr; - av->size = GSOAP_BLOB(attr->value)->__size ; - } else { - av->size = -1; - av->value = GSOAP_STRING(attr->value); - } - SoapToAttrOrig(&av->origin, attr->origin); - av->origin_detail = attr->originDetail; - av->timestamp = attr->timestamp; -} diff --git a/org.glite.jp.index/src/ws_ps_typeref.h b/org.glite.jp.index/src/ws_ps_typeref.h deleted file mode 100644 index 7c38192..0000000 --- a/org.glite.jp.index/src/ws_ps_typeref.h +++ /dev/null @@ -1,10 +0,0 @@ -#ifndef GLITE_JPIS_TYPEREF_H -#define GLITE_JPIS_TYPEREF_H - -int glite_jpis_QueryCondToSoap(struct soap *soap, glite_jp_query_rec_t *in, struct jptype__primaryQuery *out); - -void glite_jpis_AttrOrigToSoap(struct soap *soap, const glite_jp_attr_orig_t in, enum jptype__attrOrig **out); - -void glite_jpis_SoapToAttrVal(glite_jp_attrval_t *av, const struct jptype__attrValue *attr); - -#endif diff --git a/org.glite.jp.index/src/ws_typemap.h b/org.glite.jp.index/src/ws_typemap.h deleted file mode 100644 index f8b8670..0000000 --- a/org.glite.jp.index/src/ws_typemap.h +++ /dev/null @@ -1,28 +0,0 @@ -// XXX: may be glued with org.glite.jp.primary/src/jptype_map.h? - -#include "soap_version.h" - -#if GSOAP_VERSION >= 20700 - -#define SYSTEM jptype__attrOrig__SYSTEM -#define USER jptype__attrOrig__USER -#define FILE_ jptype__attrOrig__FILE_ - -#define EQUAL jptype__queryOp__EQUAL -#define UNEQUAL jptype__queryOp__UNEQUAL -#define LESS jptype__queryOp__LESS -#define GREATER jptype__queryOp__GREATER -#define WITHIN jptype__queryOp__WITHIN -#define EXISTS jptype__queryOp__EXISTS - -#else - -#define __jpsrv__UpdateJobs __ns1__UpdateJobs -#define __jpsrv__QueryJobs __ns1__QueryJobs -#define __jpsrv__AddFeed __ns1__AddFeed -#define __jpsrv__GetFeeds __ns1__getFeedIDs -#define __jpsrv__DeleteFeed __ns1__DeleteFeed -#define __jpsrv__ServerConfiguration __ns1__ServerConfiguration - -#endif - diff --git a/org.glite.jp.primary/.cvsignore b/org.glite.jp.primary/.cvsignore deleted file mode 100644 index 3a4edf6..0000000 --- a/org.glite.jp.primary/.cvsignore +++ /dev/null @@ -1 +0,0 @@ -.project diff --git a/org.glite.jp.primary/Makefile b/org.glite.jp.primary/Makefile deleted file mode 100644 index 87d77e2..0000000 --- a/org.glite.jp.primary/Makefile +++ /dev/null @@ -1,236 +0,0 @@ -# defaults -top_srcdir=. -builddir=build -top_builddir=${top_srcdir}/${builddir} -stagedir=. -distdir=. -globalprefix=glite -jpprefix=jp -package=glite-jp-primary -version=0.0.0 -PREFIX=/opt/glite - -glite_location=/opt/glite -globus_prefix=/opt/globus -nothrflavour=gcc32 -thrflavour=gcc32pthr -expat_prefix=/opt/expat -gsoap_prefix=/software/gsoap-2.6 - -CC=gcc - --include Makefile.inc - - -VPATH=${top_srcdir}/src:${top_srcdir}/examples:${top_srcdir}/test:${top_srcdir}/project:${stagedir}/interface - -GLOBUS_LIBS:=-L${globus_prefix}/lib \ - -lglobus_common_${nothrflavour} \ - -lglobus_gssapi_gsi_${nothrflavour} - -ifneq (${classads_prefix},/usr) - classadslib := -L${classads_prefix}/lib -lclassad -endif - -CLASSADPLUGIN_LIBS:= ${classadslib} -lstdc++ - -CLASSADPLUGIN_LOBJS:= classad_plugin.lo - -GLOBUS_CFLAGS:=-I${globus_prefix}/include/${nothrflavour} - -DEBUG:=-g -O0 -DDEBUG - -CFLAGS:=${DEBUG} -I. -I${top_srcdir}/interface -I${top_srcdir}/src -I${gsoap_prefix}/include -I${gsoap_prefix} -I${stagedir}/include ${GLOBUS_CFLAGS} -I${mysql_prefix}/include -I${mysql_prefix}/include/mysql -I${classads_prefix}/include -I${libtar_prefix}/include -LDFLAGS:=-L${stagedir}/lib - -LINK:=libtool --mode=link ${CC} ${LDFLAGS} -LTCOMPILE:=libtool --mode=compile ${CC} ${CFLAGS} -SOLINK:=libtool --mode=link ${CC} -module ${LDFLAGS} -rpath ${stagedir}/lib -LINKXX:=libtool --mode=link ${CXX} ${LDFLAGS} -INSTALL:=libtool --mode=install install - -ifneq (${classads_prefix},/usr) - classadslib := -L${classads_prefix}/lib -lclassad -endif - -daemon:=glite-jp-primarystoraged -example:=jpps-test dag-deps -ps_prefix:=jpps_ -is_prefix:=jpis_ -sample_jobs:=sample_job_aborted sample_job_cleared sample_job_tagged_done sample_job_waiting - -plugins:=glite-jp-ftpdauth.la glite-jp-classad.la glite-jp-sandbox.la - -HDRS_I=file_plugin.h -HDRS_S=builtin_plugins.h backend.h feed.h utils.h - -SRCS:= bones_server.c soap_ops.c \ - new_ftp_backend.c mysql.c file_plugin.c utils.c\ - feed.c authz.c attrs.c \ - tags.c\ - is_client.c \ - soap_switch.c - -# ${ps_prefix}ServerLib.c \ -# ${is_prefix}ClientLib.c jpps_C.c - -TEST_SRCS:=jpps-test.c ${ps_prefix}C.c ${ps_prefix}Client.c -DAG_SRCS:=dag-deps.c ${ps_prefix}C.c ${ps_prefix}Client.c - -gsoap_bin_prefix:=${shell if [ -x ${gsoap_prefix}/bin/soapcpp2 ]; then echo ${gsoap_prefix}/bin; else echo ${gsoap_prefix}; fi } - -OBJS:=${SRCS:.c=.o} -TEST_OBJS:=${TEST_SRCS:.c=.o} -DAG_OBJS:=${DAG_SRCS:.c=.o} - -dotless_soap_ver:=${shell echo ${gsoap_version} | tr -d . } -COMMONLIB:=-lglite_jp_common_${nothrflavour} -BONESLIB:=-lglite_lb_server_bones -GSOAPLIB:=-L${stagedir}/lib -lglite_security_gsoap_plugin_${dotless_soap_ver}_${nothrflavour} -TRIOLIB:=-lglite_jp_trio -LIBTARLIB:=-L${libtar_prefix}/lib -ltar - -archlib:=lib -host_cpu:=${shell uname -m} -ifeq (${host_cpu},x86_64) - archlib:=lib64 -endif - -ifneq (${mysql_prefix},/usr) - ifeq ($(shell test -f ${mysql_prefix}/${archlib}/libmysqlclient.a -o -f ${mysql_prefix}/${archlib}/libmysqlclient.so && echo ok),ok) - MYSQLIB := -L${mysql_prefix}/${archlib} -lmysqlclient -lz - else - MYSQLIB := -L${mysql_prefix}/${archlib}/mysql -L${mysql_prefix}/${archlib} -lmysqlclient -lz - endif -else - MYSQLIB := -lmysqlclient -endif - -default all: compile - -compile: ${daemon} ${example} ${plugins} - -${daemon}: ${OBJS} - ${LINK} -o $@ -export-dynamic ${OBJS} ${BONESLIB} ${TRIOLIB} ${COMMONLIB} ${GSOAPLIB} ${GLOBUS_LIBS} ${MYSQLIB} - -jpps-test: ${TEST_OBJS} - ${LINK} -o $@ ${TEST_OBJS} ${GSOAPLIB} - -dag-deps: ${DAG_OBJS} - ${LINKXX} -o $@ ${DAG_OBJS} ${classadslib} ${GSOAPLIB} - -JobProvenancePS.xh: %.xh: %.wsdl JobProvenanceTypes.wsdl typemap.dat - cp ${stagedir}/interface/JobProvenanceTypes.wsdl . - ${gsoap_bin_prefix}/wsdl2h -t ${top_srcdir}/src/typemap.dat -c -o $@ $< - rm -f JobProvenanceTypes.wsdl - -JobProvenanceIS.xh: %.xh: %.wsdl JobProvenanceTypes.wsdl typemap.dat - cp ${stagedir}/interface/JobProvenanceTypes.wsdl . - ${gsoap_bin_prefix}/wsdl2h -t ${top_srcdir}/src/typemap.dat -c -o $@ $< - rm -f JobProvenanceTypes.wsdl - -glite-jp-classad.la: ${CLASSADPLUGIN_LOBJS} - ${SOLINK} -o $@ ${CLASSADPLUGIN_LOBJS} ${CLASSADPLUGIN_LIBS} - -${ps_prefix}Client.c ${ps_prefix}ClientLib.c \ -${ps_prefix}Server.c ${ps_prefix}ServerLib.c \ -${ps_prefix}C.c ${ps_prefix}H.h: JobProvenancePS.xh - ${gsoap_bin_prefix}/soapcpp2 -n -w -c -p ${ps_prefix} JobProvenancePS.xh - -${is_prefix}ClientLib.c ${is_prefix}Client.c \ -${is_prefix}C.c ${is_prefix}H.h: JobProvenanceIS.xh - ${gsoap_bin_prefix}/soapcpp2 -n -w -c -p ${is_prefix} JobProvenanceIS.xh - -soap_ops.o: ${ps_prefix}ServerLib.c soap_util.c soap_env_ctx.c soap_env_ctx.h - -is_client.o: ${is_prefix}ClientLib.c soap_util.c soap_env_ctx.c soap_env_ctx.h - -env_C.c env_Server.c: - touch env.xh - ${gsoap_bin_prefix}/soapcpp2 -w -c -p env_ env.xh - -#$(SOAP_PREFIX)H.h $(SOAP_PREFIX)C.c: LB.xh -# $(GSOAP_BIN_PATH)/soapcpp2 -w -c -p $(SOAP_PREFIX) LB.xh -# -#LB.xh: LB.wsdl typemap.dat -# $(GSOAP_BIN_PATH)/wsdl2h -c -o $@ LB.wsdl -# - - -bones_server.o simple_server.o: ${is_prefix}H.h ${ps_prefix}H.h - -check: - -echo nothing yet - -doc: - -stage: compile - ${MAKE} PREFIX=${stagedir} DOSTAGE=yes install - -dist: distsrc distbin - -distsrc: - mkdir -p ${top_srcdir}/${package}-${version} - cd ${top_srcdir} && GLOBIGNORE="${package}-${version}" && cp -Rf * ${package}-${version} - cd ${top_srcdir} && tar -czf ${distdir}/${package}-${version}_src.tar.gz --exclude-from=project/tar_exclude ${package}-${version} - rm -rf ${top_srcdir}/${package}-${version} - -distbin: - $(MAKE) install PREFIX=`pwd`/tmpbuilddir${stagedir} - save_dir=`pwd`; cd tmpbuilddir${stagedir} && tar -czf $$save_dir/${top_srcdir}/${distdir}/${package}-${version}_bin.tar.gz *; cd $$save_dir - rm -rf tmpbuilddir - -install: - -mkdir -p ${PREFIX}/bin ${PREFIX}/etc ${PREFIX}/examples ${PREFIX}/etc/init.d ${PREFIX}/lib - ${INSTALL} -m 755 ${daemon} ${PREFIX}/bin - ${INSTALL} -m 755 jpps-test ${PREFIX}/examples/glite-jp-primary-test - if [ x${DOSTAGE} = xyes ]; then \ - mkdir -p ${PREFIX}/include/${globalprefix}/${jpprefix} ; \ - (cd ${top_srcdir}/interface && install -m 644 ${HDRS_I} ${PREFIX}/include/${globalprefix}/${jpprefix}) ; \ - (cd ${top_srcdir}/src && install -m 644 ${HDRS_S} ${PREFIX}/include/${globalprefix}/${jpprefix}) ; \ - fi - for plugin in ${plugins}; do \ - ${INSTALL} -m 755 $$plugin ${PREFIX}/lib; \ - done - ${INSTALL} -m 755 ${top_srcdir}/config/startup ${PREFIX}/etc/init.d/glite-jp-primary - ${INSTALL} -m 755 ${top_srcdir}/config/glite-jp-primary-dbsetup.sql ${PREFIX}/etc - ${INSTALL} -m 755 ${top_srcdir}/config/glite-jp-primary-dbsetup.sh ${PREFIX}/etc - ${INSTALL} -m 755 ${top_srcdir}/examples/jpps_store_test ${PREFIX}/examples/glite-jp-primary-store-test - for i in ${sample_jobs}; do \ - ${INSTALL} -m 644 ${top_srcdir}/examples/$$i ${PREFIX}/examples/glite-jp-primary-$$i.lb; \ - done - -clean: - -simple_server.o soap_ops.o jpps-test.o: ${ps_prefix}H.h - -# we have no real config.h but have to force gSoap not to use -# linux ftime with broken (aka obsolete) DST information - -# stdsoap2.o: ${gsoap_prefix}/devel/stdsoap2.c -# test -f config.h || touch config.h -# @echo 'The following warning "time_t (de)serialization is not MT safe on this platform" is harmless' -# ${CC} -o $@ -c -DWITH_NONAMESPACES -DHAVE_CONFIG_H ${CFLAGS} ${gsoap_prefix}/devel/stdsoap2.c -# - -glite-jp-sandbox.la: sandbox_plugin.lo - ${SOLINK} -o $@ sandbox_plugin.lo ${LIBTARLIB} - -glite-jp-ftpdauth.la: ftpd_auth.lo mysql.lo - ${SOLINK} -o $@ ftpd_auth.lo mysql.lo ${COMMONLIB} ${TRIOLIB} ${MYSQLIB} - -#glite-jp-classad.lo: classad_plugin.c -# ${LTCOMPILE} -DPLUGIN_DEBUG -o $@ -c $< - -%.lo: %.c - ${LTCOMPILE} -o $@ -c $< - -soap_ops.o bones_server.o: soap_version.h - -soap_version.h: - ${gsoap_bin_prefix}/soapcpp2 /dev/null - perl -ne '$$. == 2 && /.*([0-9])\.([0-9])\.([0-9]).*/ && printf "#define GSOAP_VERSION %d%02d%02d\n",$$1,$$2,$$3' soapH.h >$@ - -rm soapC.cpp soapH.h soapStub.h soapClient.cpp soapServer.cpp soapClientLib.cpp soapServerLib.cpp - -soap_env_ctx.c soap_env_ctx.h soap_switch.c: env_C.c mk_soap_switch.pl - ${top_srcdir}/src/mk_soap_switch.pl env_C.c >soap_switch.c diff --git a/org.glite.jp.primary/build.xml b/org.glite.jp.primary/build.xml deleted file mode 100755 index d6081d8..0000000 --- a/org.glite.jp.primary/build.xml +++ /dev/null @@ -1,116 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/org.glite.jp.primary/config/glite-jp-primary-dbsetup.sh b/org.glite.jp.primary/config/glite-jp-primary-dbsetup.sh deleted file mode 100644 index aed8e1a..0000000 --- a/org.glite.jp.primary/config/glite-jp-primary-dbsetup.sh +++ /dev/null @@ -1,14 +0,0 @@ -#! /bin/sh - -# -# Shell example of preparing the database for JP Index Server -# - -# database -mysqladmin -u root -p create jpps - -# user -mysql -u root -p -e 'GRANT ALL on jpps.* to jpps@localhost' - -# tables -mysql -u jpps jpps < `dirname $0`/glite-jp-primary-dbsetup.sql diff --git a/org.glite.jp.primary/config/glite-jp-primary-dbsetup.sql b/org.glite.jp.primary/config/glite-jp-primary-dbsetup.sql deleted file mode 100644 index 0e2dc70..0000000 --- a/org.glite.jp.primary/config/glite-jp-primary-dbsetup.sql +++ /dev/null @@ -1,63 +0,0 @@ -create table jobs ( - jobid char(32) binary not null, - dg_jobid varchar(255) binary not null, - owner char(32) binary not null, - - reg_time datetime not null, - - primary key (jobid), - unique (dg_jobid), - index (owner), - index (owner,reg_time) -); - -create table files ( - jobid char(32) binary not null, - filename varchar(255) binary not null, - int_path mediumblob null, - ext_url mediumblob null, - - state char(32) binary not null, - deadline datetime null, - ul_userid char(32) binary not null, - - primary key (jobid,filename), - index (ext_url(255)) -); - -create table attrs ( - jobid char(32) binary not null, - name varchar(255) binary not null, - value mediumblob null, - - primary key (jobid,name) -); - -create table users ( - userid char(32) binary not null, - cert_subj varchar(255) binary not null, - - primary key (userid), - unique (cert_subj) -); - -create table backend_info ( - version char(32) binary not null -); - -create table feeds ( - feedid char(32) binary not null, - destination varchar(255) binary not null, - expires datetime not null, - cols mediumblob not null, - query mediumblob not null, - - primary key (feedid) -); - -create table fed_jobs ( - feedid char(32) binary not null, - jobid char(32) binary not null, - - primary key (jobid,feedid) -); diff --git a/org.glite.jp.primary/config/startup b/org.glite.jp.primary/config/startup deleted file mode 100644 index c08da87..0000000 --- a/org.glite.jp.primary/config/startup +++ /dev/null @@ -1,161 +0,0 @@ -#!/bin/sh - -GLITE_LOCATION=${GLITE_LOCATION:-/opt/glite} -GLITE_LOCATION_VAR=${GLITE_LOCATION_VAR:-${GLITE_LOCATION}/var} - -[ -f /etc/glite.conf ] && . /etc/glite.conf -[ -f $GLITE_LOCATION/etc/glite-wms.conf ] && . $GLITE_LOCATION/etc/glite-wms.conf - -[ -f $GLITE_LOCATION/etc/jp.conf ] && . $GLITE_LOCATION/etc/jp.conf -[ -f $GLITE_LOCATION_VAR/etc/jp.conf ] && . $GLITE_LOCATION_VAR/etc/jp.conf - -[ -f $HOME/.glite.conf ] && . $HOME/.glite.conf - -[ -n "$GLITE_JP_PRIMARY_PIDFILE" ] && pidfile=$GLITE_JP_PRIMARY_PIDFILE || - pidfile="$GLITE_LOCATION_VAR/glite-jp-primarystoraged.pid" - -unset creds - -test -n "$GLITE_JP_PRIMARY_PORT" || GLITE_JP_PRIMARY_PORT=8901 - -start() -{ - if test -z "$GLITE_USER" ;then - echo 'Error: GLITE_USER is not set' - echo FAILED - return 1 - fi - if test -z "$GLOBUS_LOCATION" ;then - echo 'Error: GLOBUS_LOCATION is not set' - echo FAILED - return 1 - fi - if test -z "$GLITE_JP_PRIMARY_PEERS" ;then - echo 'Error: incomplete configuration (GLITE_JP_PRIMARY_PEERS is not set)' - echo FAILED - return 1 - fi - if test -z "$GLITE_JP_PRIMARY_FTP_PORT" -o \ - -z "$GLITE_JP_PRIMARY_INTERNAL" -o -z "$GLITE_JP_PRIMARY_EXTERNAL" ;then - echo 'Error: incomplete configuration (GLITE_JP_PRIMARY_FTP_PORT,' \ - 'GLITE_JP_PRIMARY_INTERNAL, or GLITE_JP_PRIMARY_EXTERNAL is not set)' - echo FAILED - return 1 - fi - - if [ -n "$GLITE_HOST_CERT" -a -n "$GLITE_HOST_KEY" ] ;then - creds="-c '$GLITE_HOST_CERT' -k '$GLITE_HOST_KEY'" - X509_USER_CERT="$GLITE_HOST_CERT" - X509_USER_KEY="$GLITE_HOST_KEY" - fi - - if test -z "$creds"; then - if su - $GLITE_USER -c "test -r /etc/grid-security/hostkey.pem -a -r /etc/grid-security/hostcert.pem"; then - echo "$0: WARNING: /etc/grid-security/hostkey.pem readable by $GLITE_USER" - creds="-c /etc/grid-security/hostcert.pem -k /etc/grid-security/hostkey.pem" - X509_USER_CERT=/etc/grid-security/hostcert.pem - X509_USER_KEY=/etc/grid-security/hostkey.pem - fi - fi - - - [ -z "$creds" ] && echo $0: WARNING: No credentials specified. Using default lookup which is dangerous. >&2 - - unset GLITE_JP_PRIMARY_DBCS_OPTION - if test -n "$GLITE_JP_PRIMARY_DBCS"; then - GLITE_JP_PRIMARY_DBCS_OPTION="-BD,'$GLITE_JP_PRIMARY_DBCS'" - fi - - echo -n Starting glite-jp-primarystoraged ... - su - $GLITE_USER -c " $GLITE_LOCATION/bin/glite-jp-primarystoraged \ - $GLITE_JP_DEBUG \ - -P $GLITE_LOCATION/lib/glite-jp-tags.so -P $GLITE_LOCATION/lib/glite_lb_plugin.so -P $GLITE_LOCATION/lib/glite-jp-sandbox.so \ - $creds -a '$GLITE_JP_PRIMARY_PEERS' \ - -i '$pidfile' -p $GLITE_JP_PRIMARY_PORT $GLITE_JP_PRIMARY_SPECIAL \ - -BI,'$GLITE_JP_PRIMARY_INTERNAL' -BE,'$GLITE_JP_PRIMARY_EXTERNAL' \ - ${GLITE_JP_PRIMARY_DBCS_OPTION} " && echo " done" || echo " FAILED" - - echo -n Starting JP gridftp server ... - su - $GLITE_USER -c "X509_USER_CERT=\"$X509_USER_CERT\" \ - X509_USER_KEY=\"$X509_USER_KEY\" \ - GLITE_USER=\"$GLITE_USER\" \ - FTPBE_INT_PREFIX=\"$GLITE_JP_PRIMARY_INTERNAL\" \ - LD_LIBRARY_PATH=$GLOBUS_LOCATION/lib \ - LD_PRELOAD=$GLITE_LOCATION/lib/glite-jp-ftpdauth.so \ - $GLOBUS_LOCATION/sbin/in.ftpd -Q -W -a -s -p $GLITE_JP_PRIMARY_FTP_PORT & \ - pid=\$!; echo \$pid > $pidfile.ftpd; sleep 2; true kill -0 \$pid" && echo " done" || echo " FAILED" -} - -stop() -{ - if [ -f "$pidfile" ]; then - pid=`cat "$pidfile"` - kill $pid - echo -n Stopping glite-jp-primarystoraged \($pid\) ... - try=0 - while ps p $pid >/dev/null 2>&1; do - sleep 1; - try=`expr $try + 1` - if [ $try = 20 ]; then - echo " giving up after $try retries" - return 1 - fi - done - echo " done" - rm -f "$pidfile" - else - echo "$pidfile" does not exist - glite-jp-primarystoraged not running? >&2 - return 1 - fi - if [ -f "$pidfile.ftpd" ]; then - pid=`cat "$pidfile.ftpd"` - kill $pid - echo -n Stopping JP ftp server \($pid\) ... - try=0 - while ps p $pid >/dev/null 2>&1; do - sleep 1; - try=`expr $try + 1` - if [ $try = 20 ]; then - echo " giving up after $try retries" - return 1 - fi - done - echo " done" - rm -f "$pidfile.ftpd" - else - echo "$pidfile.ftpd" does not exist - JP ftp server not running? >&2 - return 1 - fi - - return 0 -} - -status() -{ - retval=0 - # XXX pidfile? - if netstat -an --inet | grep "^tcp .* 0.0.0.0:${GLITE_JP_PRIMARY_PORT} .*LISTEN" >/dev/null 2>&1 ;then - echo glite-jp-primarystoraged running - else - echo glite-jp-primarystoraged not running - retval=1 - fi - - if netstat -an --inet | grep "^tcp .* 0.0.0.0:${GLITE_JP_PRIMARY_FTP_PORT} .*LISTEN" >/dev/null 2>&1 ;then - echo JP gridftp server running - else - echo JP gridftp server not running - retval=1 - fi - - return $retval -} - -case x$1 in - xstart) start;; - xstop) stop;; - xrestart) stop; start;; - xstatus) status;; - x*) echo usage: $0 start,stop,restart,status >&2 - exit 1;; -esac diff --git a/org.glite.jp.primary/doc/README.install b/org.glite.jp.primary/doc/README.install deleted file mode 100644 index 17d0d27..0000000 --- a/org.glite.jp.primary/doc/README.install +++ /dev/null @@ -1,59 +0,0 @@ -0. install glite-jp-primary package - -1. create MySQL database of the service, preferably using - ${GLITE_LOCATION}/etc/glite-jp-primary-dbsetup.sh - (the script prompts two times for MySQL root password) - -2. create a directory where JPPS files will be stored and configure - gridftp server so that this directory is accessible via gridftp - -3. create the configuration file $GLITE_LOCATION/etc/jp.conf, it should - contain /bin/sh syntax assignment to the following variables (or they - have to be set in the environment of the startup script by other means: - - GLITE_USER the unix user running the service - - GLOBUS_LOCATION where is Globus installed - - GLITE_JP_PRIMARY_FTP_PORT - port for the ftp JPPS interface (bulk file transfers) - - GLITE_JP_PRIMARY_INTERNAL - directory where the JPPS files are stored (local path) - - GLITE_JP_PRIMARY_EXTERNAL - URL prefix which is mapped by gridftp to the directory, - eg. gsiftp://this.host.name:$GLITE_JP_PRIMARY_FTP_PORT/some/directory - - - GLITE_JP_PRIMARY_PEERS - file with list (one per line) of X509 certificate subjects of "trusted peers", i.e. L&B servers which may upload data to this JPPS - - -4. start the service with - $GLITE_LOCATION/etc/init.d/glite-jp-primary start - - -5. This step taints the database with testing data. Don't do it if it is an issue. -It is not necessary for the service operation, it's just checking its basic functionality. - -$ JOB=https://scientific.civ.zcu.cz:9200/1Yjk3Wlaspl07y45iX8Tng -$ TEST=$GLITE_LOCATION/examples/glite-jp-primary-test -$ export X5O9_USER_PROXY=/some/proxy.pem # must be among $GLITE_JP_PRIMARY_PEERS - -$ $TEST registerjob $JOB '/the/job/owner/x509/cert' - -$ $TEST startupload "urn:org.glite.jp.primary:lb" 1 text/plain - responds with destination gsiftp url - -$ globus-url-copy file:///$GLITE_LOCATION/examples/glite-jp-primary-sample_job.lb $DESTINATION_URL - -$ $TEST commitupload $DESTINATION_URL - -$ $TEST getjobattr $JOB http://egee.cesnet.cz/en/Schema/LB/Attributes:finalStatus - -The command should output: - - Waiting FILE Mon Oct 10 23:48:47 2005 - --- diff --git a/org.glite.jp.primary/examples/README.test b/org.glite.jp.primary/examples/README.test deleted file mode 100644 index 9b939b7..0000000 --- a/org.glite.jp.primary/examples/README.test +++ /dev/null @@ -1,94 +0,0 @@ -Create database: ----------------- - -$ mysqladmin -u root -p create jpps -$ mysql -u root -p -mysql> grant all privileges on jpps.* to jpps@localhost identified by ''; - -$ mysql -p -u jpps jpps -#include - -#include -#include -#include - -#include - -#include "glite/jp/known_attr.h" - -#include "jpps_H.h" -#include "jpps_.nsmap" - -#include "jptype_map.h" -#include "glite/security/glite_gsplugin.h" -#include "glite/security/glite_gscompat.h" - -#if GSOAP_VERSION <= 20602 -#define soap_call___jpsrv__RegisterJob soap_call___ns1__RegisterJob -#define soap_call___jpsrv__StartUpload soap_call___ns1__StartUpload -#define soap_call___jpsrv__CommitUpload soap_call___ns1__CommitUpload -#define soap_call___jpsrv__RecordTag soap_call___ns1__RecordTag -#define soap_call___jpsrv__FeedIndex soap_call___ns1__FeedIndex -#define soap_call___jpsrv__FeedIndexRefresh soap_call___ns1__FeedIndexRefresh -#define soap_call___jpsrv__GetJob soap_call___ns1__GetJob -#endif - -#define dprintf(FMT, ARGS...) fprintf(stderr, (FMT), ##ARGS) -#include "glite/jp/ws_fault.c" -#define check_fault(SOAP, ERR) glite_jp_clientCheckFault((SOAP), (ERR), NULL, 0) - - -static void usage(const char *me) -{ - fprintf(stderr,"%s: [-s server-url] jobid\n",me); - - exit (EX_USAGE); -} - -static const char *orig2str(enum jptype__attrOrig orig) -{ - switch (orig) { - case jptype__attrOrig__SYSTEM: return "SYSTEM"; - case jptype__attrOrig__USER: return "USER"; - case jptype__attrOrig__FILE_: return "FILE"; - default: return "unknown"; - } -} - - -int main(int argc,char *argv[]) -{ - char *server = NULL; - int opt,ret = 0,i; - struct soap *soap = soap_new(); - struct _jpelem__GetJobAttributes in; - struct _jpelem__GetJobAttributesResponse out; - char *aname = "http://egee.cesnet.cz/en/Schema/LB/Attributes:JDL"; - struct cclassad *ad; - struct { char *a,*s; } *deps = calloc(1,sizeof *deps); - int ndeps = 0; - char *dep_s,*where,*end,*tmp_a,*tmp_s,*wa,*wa_r,*ws,*ws_r; - - if (argc < 2) usage(argv[0]); - - soap_init(soap); - soap_set_namespaces(soap, jpps__namespaces); - - soap_register_plugin(soap,glite_gsplugin); - - while ((opt = getopt(argc,argv,"s:")) >= 0) switch (opt) { - case 's': server = optarg; - break; - case '?': usage(argv[0]); - } - - if (server) { - argv += 2; - argc -= 2; - } - else server = "http://localhost:8901"; - - - - in.jobid = argv[1]; - in.__sizeattributes = 1; - in.attributes = &aname; - - puts("Retrieving JDL ..."); - if ((ret = check_fault(soap,soap_call___jpsrv__GetJobAttributes(soap,server,"",&in,&out)))) - return 1; - - ad = cclassad_create(GSOAP_STRING(GLITE_SECURITY_GSOAP_LIST_GET(out.attrValues, 0)->value)); - if (!ad) { - fputs("Can't parse JDL\n",stderr); - return 1; - } - - // cclassad_evaluate_to_string(ad,"dependencies",&dep_s); - cclassad_evaluate_to_expr(ad,"dependencies",&dep_s); - - /* XXX: assumes syntacticly correct dependencies = { ... } */ - where = strchr(dep_s,'{'); assert(where); - where++; - - while ((where = strchr(where, '{'))) { /* 2nd level */ - for (where++; isspace(*where); where++); - - if (*where == '{') end = strchr(where, '}')+1; /* more ancestors */ - else for (end = where; !isspace(*end) && *end != ','; end++); - tmp_a = strndup(where,end - where); - where = end++; - - while(isspace(*where)) where++; - where++; /* comma */ - while(isspace(*where)) where++; - - if (*where == '{') end = strchr(where, '}')+1; /* more successors */ - else for (end = where; !isspace(*end) && *end != ','; end++); - tmp_s = strndup(where,end - where); - where = strchr(end+1,'}'); - -#define DELIM "{} ,\t\n" - for (ws = strtok_r(tmp_s,DELIM,&ws_r); ws; ws = strtok_r(NULL,DELIM,&ws_r)) - for (wa = strtok_r(tmp_a,DELIM,&wa_r); wa; wa = strtok_r(NULL,DELIM,&wa_r)) { - deps[ndeps].a = strdup(wa); - deps[ndeps].s = strdup(ws); - deps = realloc(deps, (ndeps+2) * sizeof *deps); - ndeps++; - deps[ndeps].a = deps[ndeps].s = NULL; - } - free(tmp_a); free(tmp_s); - } - - for (i=0; deps[i].a; i++) { - char attr[1000],*ja,*js; - int have_a,have_s; - - printf("node: %s -> %s\n",deps[i].a,deps[i].s); - sprintf(attr,"nodes.%s.description.edg_jobid",deps[i].a); - have_a = cclassad_evaluate_to_string(ad,attr,&ja); - - sprintf(attr,"nodes.%s.description.edg_jobid",deps[i].s); - have_s = cclassad_evaluate_to_string(ad,attr,&js); - - printf("jobid: %s -> %s\n",ja,js); - - if (have_a && have_s) { - struct _jpelem__RecordTag in; - struct _jpelem__RecordTagResponse empty; - struct jptype__tagValue tagval; - struct jptype__stringOrBlob val; - - in.jobid = ja; - in.tag = &tagval; - tagval.name = GLITE_JP_ATTR_WF_SUCCESSOR; - tagval.value = &val; - memset(&val, 0, sizeof(val)); - GSOAP_SETSTRING(&val, js); - - printf("Register successor ...\n"); - ret = check_fault(soap,soap_call___jpsrv__RecordTag(soap, server, "",&in, &empty)); - in.jobid = js; - tagval.name = GLITE_JP_ATTR_WF_ANCESTOR; - GSOAP_SETSTRING(&val, ja); - - printf("Register ancestor ...\n"); - ret = check_fault(soap,soap_call___jpsrv__RecordTag(soap, server, "",&in, &empty)); - putchar(10); - } - } - - return ret; -} diff --git a/org.glite.jp.primary/examples/job_template b/org.glite.jp.primary/examples/job_template deleted file mode 100644 index 14b312d..0000000 --- a/org.glite.jp.primary/examples/job_template +++ /dev/null @@ -1,14 +0,0 @@ -DG.ARRIVED=20051010210927.000000 DATE=20051010210926.978300 HOST="scientific.civ.zcu.cz" PROG=edg-wms LVL=SYSTEM DG.PRIORITY=0 DG.SOURCE="UserInterface" DG.SRC_INSTANCE="" DG.EVNT="RegJob" DG.JOBID="_CHANGE_ME_JOBID_" DG.SEQCODE="UI=000001:NS=0000000000:WM=000000:BH=0000000000:JSS=000000:LM=000000:LRMS=000000:APP=000000" DG.USER="/O=CESNET/O=Masaryk University/CN=Ales Krenek" DG.REGJOB.JDL="blabla" DG.REGJOB.NS="NNNSSSS" DG.REGJOB.PARENT="" DG.REGJOB.JOBTYPE="SIMPLE" DG.REGJOB.NSUBJOBS="0" DG.REGJOB.SEED="uLU0BArrdV98O41PLThJ5Q" -DG.ARRIVED=20051010210928.000000 DATE=20051010210928.871099 HOST="scientific.civ.zcu.cz" PROG=edg-wms LVL=SYSTEM DG.PRIORITY=0 DG.SOURCE="NetworkServer" DG.SRC_INSTANCE="" DG.EVNT="Accepted" DG.JOBID="_CHANGE_ME_JOBID_" DG.SEQCODE="UI=000002:NS=0000000001:WM=000000:BH=0000000000:JSS=000000:LM=000000:LRMS=000000:APP=000000" DG.USER="/O=CESNET/O=Masaryk University/CN=Ales Krenek" DG.ACCEPTED.FROM="UserInterface" DG.ACCEPTED.FROM_HOST="sending component hostname" DG.ACCEPTED.FROM_INSTANCE="sending component instance" DG.ACCEPTED.LOCAL_JOBID="new jobId (Condor Globus ...)" -DG.ARRIVED=20051010210928.000000 DATE=20051010210928.917822 HOST="scientific.civ.zcu.cz" PROG=edg-wms LVL=SYSTEM DG.PRIORITY=0 DG.SOURCE="NetworkServer" DG.SRC_INSTANCE="" DG.EVNT="EnQueued" DG.JOBID="_CHANGE_ME_JOBID_" DG.SEQCODE="UI=000002:NS=0000000003:WM=000000:BH=0000000000:JSS=000000:LM=000000:LRMS=000000:APP=000000" DG.USER="/O=CESNET/O=Masaryk University/CN=Ales Krenek" DG.ENQUEUED.QUEUE="destination queue" DG.ENQUEUED.JOB="job description in receiver language" DG.ENQUEUED.RESULT="OK" DG.ENQUEUED.REASON="detailed description of transfer" -DG.ARRIVED=20051010210928.000000 DATE=20051010210928.947076 HOST="scientific.civ.zcu.cz" PROG=edg-wms LVL=SYSTEM DG.PRIORITY=0 DG.SOURCE="WorkloadManager" DG.SRC_INSTANCE="" DG.EVNT="DeQueued" DG.JOBID="_CHANGE_ME_JOBID_" DG.SEQCODE="UI=000002:NS=0000000004:WM=000001:BH=0000000000:JSS=000000:LM=000000:LRMS=000000:APP=000000" DG.USER="/O=CESNET/O=Masaryk University/CN=Ales Krenek" DG.DEQUEUED.QUEUE="queue name" DG.DEQUEUED.LOCAL_JOBID="new jobId assigned by the receiving component" -DG.ARRIVED=20051010210928.000000 DATE=20051010210928.980395 HOST="scientific.civ.zcu.cz" PROG=edg-wms LVL=SYSTEM DG.PRIORITY=0 DG.SOURCE="WorkloadManager" DG.SRC_INSTANCE="" DG.EVNT="HelperCall" DG.JOBID="_CHANGE_ME_JOBID_" DG.SEQCODE="UI=000002:NS=0000000004:WM=000003:BH=0000000000:JSS=000000:LM=000000:LRMS=000000:APP=000000" DG.USER="/O=CESNET/O=Masaryk University/CN=Ales Krenek" DG.HELPERCALL.HELPER_NAME="name of the called component" DG.HELPERCALL.HELPER_PARAMS="parameters of the call" DG.HELPERCALL.SRC_ROLE="CALLING" -DG.ARRIVED=20051010210929.000000 DATE=20051010210929.011781 HOST="scientific.civ.zcu.cz" PROG=edg-wms LVL=SYSTEM DG.PRIORITY=0 DG.SOURCE="WorkloadManager" DG.SRC_INSTANCE="" DG.EVNT="Match" DG.JOBID="_CHANGE_ME_JOBID_" DG.SEQCODE="UI=000002:NS=0000000004:WM=000005:BH=0000000000:JSS=000000:LM=000000:LRMS=000000:APP=000000" DG.USER="/O=CESNET/O=Masaryk University/CN=Ales Krenek" DG.MATCH.DEST_ID="destination CE/queue" -DG.ARRIVED=20051010210929.000000 DATE=20051010210929.283947 HOST="scientific.civ.zcu.cz" PROG=edg-wms LVL=SYSTEM DG.PRIORITY=0 DG.SOURCE="LogMonitor" DG.SRC_INSTANCE="" DG.EVNT="Done" DG.JOBID="_CHANGE_ME_JOBID_" DG.SEQCODE="UI=000002:NS=0000000004:WM=000010:BH=0000000000:JSS=000004:LM=000007:LRMS=000000:APP=000000" DG.USER="/O=CESNET/O=Masaryk University/CN=Ales Krenek" DG.DONE.STATUS_CODE="OK" DG.DONE.REASON="reason for the change" DG.DONE.EXIT_CODE="0" -DG.ARRIVED=20051010210929.000000 DATE=20051010210929.042443 HOST="scientific.civ.zcu.cz" PROG=edg-wms LVL=SYSTEM DG.PRIORITY=0 DG.SOURCE="WorkloadManager" DG.SRC_INSTANCE="" DG.EVNT="HelperReturn" DG.JOBID="_CHANGE_ME_JOBID_" DG.SEQCODE="UI=000002:NS=0000000004:WM=000007:BH=0000000000:JSS=000000:LM=000000:LRMS=000000:APP=000000" DG.USER="/O=CESNET/O=Masaryk University/CN=Ales Krenek" DG.HELPERRETURN.HELPER_NAME="name of the called component" DG.HELPERRETURN.RETVAL="returned data" DG.HELPERRETURN.SRC_ROLE="CALLING" -DG.ARRIVED=20051010210929.000000 DATE=20051010210929.071034 HOST="scientific.civ.zcu.cz" PROG=edg-wms LVL=SYSTEM DG.PRIORITY=0 DG.SOURCE="WorkloadManager" DG.SRC_INSTANCE="" DG.EVNT="EnQueued" DG.JOBID="_CHANGE_ME_JOBID_" DG.SEQCODE="UI=000002:NS=0000000004:WM=000009:BH=0000000000:JSS=000000:LM=000000:LRMS=000000:APP=000000" DG.USER="/O=CESNET/O=Masaryk University/CN=Ales Krenek" DG.ENQUEUED.QUEUE="destination queue" DG.ENQUEUED.JOB="job description in receiver language" DG.ENQUEUED.RESULT="OK" DG.ENQUEUED.REASON="detailed description of transfer" -DG.ARRIVED=20051010210929.000000 DATE=20051010210929.101204 HOST="scientific.civ.zcu.cz" PROG=edg-wms LVL=SYSTEM DG.PRIORITY=0 DG.SOURCE="JobController" DG.SRC_INSTANCE="" DG.EVNT="DeQueued" DG.JOBID="_CHANGE_ME_JOBID_" DG.SEQCODE="UI=000002:NS=0000000004:WM=000010:BH=0000000000:JSS=000001:LM=000000:LRMS=000000:APP=000000" DG.USER="/O=CESNET/O=Masaryk University/CN=Ales Krenek" DG.DEQUEUED.QUEUE="queue name" DG.DEQUEUED.LOCAL_JOBID="new jobId assigned by the receiving component" -DG.ARRIVED=20051010210929.000000 DATE=20051010210929.132080 HOST="scientific.civ.zcu.cz" PROG=edg-wms LVL=SYSTEM DG.PRIORITY=0 DG.SOURCE="JobController" DG.SRC_INSTANCE="" DG.EVNT="Transfer" DG.JOBID="_CHANGE_ME_JOBID_" DG.SEQCODE="UI=000002:NS=0000000004:WM=000010:BH=0000000000:JSS=000003:LM=000000:LRMS=000000:APP=000000" DG.USER="/O=CESNET/O=Masaryk University/CN=Ales Krenek" DG.TRANSFER.DESTINATION="LRMS" DG.TRANSFER.DEST_HOST="destination hostname" DG.TRANSFER.DEST_INSTANCE="destination instance" DG.TRANSFER.JOB="(nil)" DG.TRANSFER.RESULT="OK" DG.TRANSFER.REASON="detailed description of transfer" DG.TRANSFER.DEST_JOBID="destination internal jobid" -DG.ARRIVED=20051010210929.000000 DATE=20051010210929.167712 HOST="scientific.civ.zcu.cz" PROG=edg-wms LVL=SYSTEM DG.PRIORITY=0 DG.SOURCE="LogMonitor" DG.SRC_INSTANCE="" DG.EVNT="Accepted" DG.JOBID="_CHANGE_ME_JOBID_" DG.SEQCODE="UI=000002:NS=0000000004:WM=000010:BH=0000000000:JSS=000004:LM=000001:LRMS=000000:APP=000000" DG.USER="/O=CESNET/O=Masaryk University/CN=Ales Krenek" DG.ACCEPTED.FROM="JobController" DG.ACCEPTED.FROM_HOST="sending component hostname" DG.ACCEPTED.FROM_INSTANCE="sending component instance" DG.ACCEPTED.LOCAL_JOBID="new jobId (Condor Globus ...)" -DG.ARRIVED=20051010210929.000000 DATE=20051010210929.203602 HOST="scientific.civ.zcu.cz" PROG=edg-wms LVL=SYSTEM DG.PRIORITY=0 DG.SOURCE="LogMonitor" DG.SRC_INSTANCE="" DG.EVNT="Transfer" DG.JOBID="_CHANGE_ME_JOBID_" DG.SEQCODE="UI=000002:NS=0000000004:WM=000010:BH=0000000000:JSS=000004:LM=000003:LRMS=000000:APP=000000" DG.USER="/O=CESNET/O=Masaryk University/CN=Ales Krenek" DG.TRANSFER.DESTINATION="LRMS" DG.TRANSFER.DEST_HOST="destination hostname" DG.TRANSFER.DEST_INSTANCE="destination instance" DG.TRANSFER.JOB="(nil)" DG.TRANSFER.RESULT="OK" DG.TRANSFER.REASON="detailed description of transfer" DG.TRANSFER.DEST_JOBID="destination internal jobid" -DG.ARRIVED=20051010210929.000000 DATE=20051010210929.249042 HOST="scientific.civ.zcu.cz" PROG=edg-wms LVL=SYSTEM DG.PRIORITY=0 DG.SOURCE="LogMonitor" DG.SRC_INSTANCE="" DG.EVNT="Running" DG.JOBID="_CHANGE_ME_JOBID_" DG.SEQCODE="UI=000002:NS=0000000004:WM=000010:BH=0000000000:JSS=000004:LM=000005:LRMS=000000:APP=000000" DG.USER="/O=CESNET/O=Masaryk University/CN=Ales Krenek" DG.RUNNING.NODE="worker node" diff --git a/org.glite.jp.primary/examples/jpps-test.c b/org.glite.jp.primary/examples/jpps-test.c deleted file mode 100644 index c03df55..0000000 --- a/org.glite.jp.primary/examples/jpps-test.c +++ /dev/null @@ -1,278 +0,0 @@ -#include -#include -#include -#include - -#include "jpps_H.h" -#include "jpps_.nsmap" - -#include "jptype_map.h" -#include "glite/security/glite_gsplugin.h" -#include "glite/security/glite_gscompat.h" - -#if GSOAP_VERSION <= 20602 -#define soap_call___jpsrv__RegisterJob soap_call___ns1__RegisterJob -#define soap_call___jpsrv__StartUpload soap_call___ns1__StartUpload -#define soap_call___jpsrv__CommitUpload soap_call___ns1__CommitUpload -#define soap_call___jpsrv__RecordTag soap_call___ns1__RecordTag -#define soap_call___jpsrv__FeedIndex soap_call___ns1__FeedIndex -#define soap_call___jpsrv__FeedIndexRefresh soap_call___ns1__FeedIndexRefresh -#define soap_call___jpsrv__GetJob soap_call___ns1__GetJob -#endif - -#define dprintf(FMT, ARGS...) printf(FMT, ##ARGS) -#include "glite/jp/ws_fault.c" -#define check_fault(SOAP, ERR) glite_jp_clientCheckFault((SOAP), (ERR), NULL, 0) - -static void usage(const char *me) -{ - fprintf(stderr,"%s: [-s server-url] operation args \n\n" - " operations are:\n" - " RegisterJob jobid owner\n" - " StartUpload jobid class commit_before mimetype\n" - " CommitUpload destination\n" - " RecordTag jobid tagname stringvalue\n" - " GetJobFiles jobid\n" - " GetJobAttr jobid attr\n" - " FeedIndex [yes (history)]\n" - " FeedIndexRefresh feedid\n" - ,me); - - exit (EX_USAGE); -} - -/* FIXME: new wsdl */ -#if 0 -static struct jptype__Attribute sample_attr[] = { - { OWNER, NULL }, - { TIME, "submitted" }, - { TAG, "test" }, -}; - -static struct jptype__PrimaryQueryElement sample_query[][5] = { - { - { sample_attr+OWNER, EQUAL, "unknown", NULL }, - { NULL, 0, NULL, NULL } - }, -}; -#endif - -static const char *orig2str(enum jptype__attrOrig orig) -{ - switch (orig) { - case jptype__attrOrig__SYSTEM: return "SYSTEM"; - case jptype__attrOrig__USER: return "USER"; - case jptype__attrOrig__FILE_: return "FILE"; - default: return "unknown"; - } -} - -int main(int argc,char *argv[]) -{ - char *server = NULL; - int opt,ret = 0; - struct soap *soap = soap_new(); - - if (argc < 2) usage(argv[0]); - - soap_init(soap); - soap_set_namespaces(soap, jpps__namespaces); - - soap_register_plugin(soap,glite_gsplugin); - - /*while ((opt = getopt(argc,argv,"s:")) >= 0) switch (opt) { - case 's': server = optarg; - break; - //case '?': usage(argv[0]); - }*/ - int i; - for (i = 0; i < argc-1; i++) - if (strcmp(argv[i], "-s") == 0) - server = argv[i+1]; - - if (server) { - argv += 2; - argc -= 2; - } - else server = "http://localhost:8901"; - - - if (!strcasecmp(argv[1],"RegisterJob")) { - struct _jpelem__RegisterJob in; - struct _jpelem__RegisterJobResponse empty; - - if (argc != 4) usage(argv[0]); - in.job = argv[2]; - in.owner = argv[3]; - ret = check_fault(soap, - soap_call___jpsrv__RegisterJob(soap,server,"",&in,&empty)); - } else if (!strcasecmp(argv[1], "StartUpload")) { - struct _jpelem__StartUpload in; - struct _jpelem__StartUploadResponse out; - - in.job = argv[2]; - in.class_ = argv[3]; - in.name = NULL; - in.commitBefore = atoi(argv[4]) + time(NULL); - in.contentType = argv[5]; - - if (argc != 6) usage(argv[0]); - if (!(ret = check_fault(soap, - soap_call___jpsrv__StartUpload(soap, server, "",&in,&out)))) - { - printf("Destination: %s\nCommit before: %s\n", out.destination, ctime(&out.commitBefore)); - } - } else if (!strcasecmp(argv[1], "CommitUpload")) { - struct _jpelem__CommitUpload in; - struct _jpelem__CommitUploadResponse empty; - - in.destination = argv[2]; - - if (argc != 3) usage(argv[0]); - if (!(ret = check_fault(soap, - soap_call___jpsrv__CommitUpload(soap, server, "",&in,&empty)))) { - /* OK */ - } - } else if (!strcasecmp(argv[1], "RecordTag")) { - struct _jpelem__RecordTag in; - struct _jpelem__RecordTagResponse empty; - struct jptype__tagValue tagval; - struct jptype__stringOrBlob val; - - int seq = 0; - - if (argc != 5) usage(argv[0]); - - in.jobid = argv[2]; - in.tag = &tagval; - tagval.name = argv[3]; - tagval.value = &val; - memset(&val, 0, sizeof(val)); - GSOAP_SETSTRING(&val, argv[4]); - - if (!(ret = check_fault(soap, - soap_call___jpsrv__RecordTag(soap, server, "",&in, &empty)))) { - /* OK */ - } - } - else if (!strcasecmp(argv[1],"FeedIndex")) { - char *ap[2] = { - "http://egee.cesnet.cz/en/Schema/LB/Attributes:RB", - "http://egee.cesnet.cz/en/Schema/JP/System:owner" - }; - int sizepq; - - struct jptype__stringOrBlob vals[2]; - memset(vals, 0, sizeof vals); - GSOAP_SETSTRING(vals, "/O=CESNET/O=Masaryk University/CN=Ales Krenek"); - GSOAP_SETSTRING(vals + 1, "Done"); - - struct jptype__primaryQuery q[] = { - { - "http://egee.cesnet.cz/en/Schema/JP/System:owner", - jptype__queryOp__EQUAL, - NULL, vals, NULL - }, - { - "http://egee.cesnet.cz/en/Schema/LB/Attributes:finalStatus", - jptype__queryOp__UNEQUAL, - NULL, vals+1, NULL - } - }; - GLITE_SECURITY_GSOAP_LIST_TYPE(jptype, primaryQuery) pq; - - GLITE_SECURITY_GSOAP_LIST_CREATE0(soap, pq, sizepq, struct jptype__primaryQuery, 2); - memcpy(GLITE_SECURITY_GSOAP_LIST_GET(pq, 0), &q[0], sizeof(q[0])); - memcpy(GLITE_SECURITY_GSOAP_LIST_GET(pq, 1), &q[1], sizeof(q[1])); - struct _jpelem__FeedIndex in = { - "http://some.index//", - 2,ap, - sizepq,pq, - 0, - 1 - }; - struct _jpelem__FeedIndexResponse out; - - in.history = argc >= 3 && !strcasecmp(argv[2],"yes"); - - if (!(ret = check_fault(soap,soap_call___jpsrv__FeedIndex(soap,server,"",&in,&out)))) - { - printf("FeedId: %s\nExpires: %s\n",out.feedId,ctime(&out.feedExpires)); - } - GLITE_SECURITY_GSOAP_LIST_DESTROY(soap, &in, conditions); - } -/* FIXME: new wsdl */ -#if 0 - } else if (!strcasecmp(argv[1], "FeedIndexRefresh")) { - struct jpsrv__FeedIndexRefreshResponse r; - - if (argc != 3) usage(argv[0]); - if (!check_fault(soap, - soap_call_jpsrv__FeedIndexRefresh(soap, server, "", - argv[2], &r))) { - printf("FeedId: %s\nExpires: %s\n",r.feedId,ctime(&r.expires)); - } - } -#endif - else if (!strcasecmp(argv[1],"GetJobFiles")) { - struct _jpelem__GetJobFiles in; - struct _jpelem__GetJobFilesResponse out; - struct jptype__jppsFile *outf; - - if (argc != 3) usage(argv[0]); - in.jobid = argv[2]; - - if (!(ret = check_fault(soap,soap_call___jpsrv__GetJobFiles(soap,server,"", - &in,&out)))) - { - int i; - - printf("JobFiles:\n"); - - for (i=0; iclass_, - outf->name, - outf->url); - } - } - - } - else if (!strcasecmp(argv[1],"GetJobAttr")) { - struct _jpelem__GetJobAttributes in; - struct _jpelem__GetJobAttributesResponse out; - struct jptype__attrValue *outav; - - if (argc != 4) usage(argv[0]); - in.jobid = argv[2]; - in.__sizeattributes = 1; - in.attributes = &argv[3]; - - if (!(ret = check_fault(soap,soap_call___jpsrv__GetJobAttributes(soap,server,"",&in,&out)))) - { - int i; - - puts("Attribute values:"); - for (i=0; ivalue) ? - GSOAP_STRING(outav->value) : - "binary", - orig2str(outav->origin), - outav->originDetail, - ctime(&outav->timestamp)); - } - - } - - } - else { usage(argv[0]); ret = 1; } - - return ret; -} - - -/* XXX: we don't use it */ -SOAP_NMAC struct Namespace namespaces[] = { {NULL,NULL} }; diff --git a/org.glite.jp.primary/examples/jpps_store_test b/org.glite.jp.primary/examples/jpps_store_test deleted file mode 100755 index c461739..0000000 --- a/org.glite.jp.primary/examples/jpps_store_test +++ /dev/null @@ -1,86 +0,0 @@ -#!/bin/bash - -# usage: -# -# $ export X509_USER_PROXY=/trusted/peer/credentials -# $ /where/it/is/jpps_store_test \ -# -s jppps.host.name:port \ # default localhost:8901 -# -o '/job/owner/DN' \ # mandatory -# -t "name=value" ... \ # may occur multiple times -# -d /dump/file/template # optional -# -# in /dump/file/template occurences of _CHANGE_ME_JOBID_ are substituted with -# fake jobid generated by this script - -echodo() -{ - echo '**' $@ - "$@" || exit 1 -} - -if [ -f jpps-test ]; -then - jpps="./jpps-test" -elif [ -f glite-jp-primary-test ]; -then - jpps="./glite-jp-primary-test" -else - echo "glite-jp-primary-test or jpps-test not found!" - exit 1; -fi - -#getopt -s sh o:d:t:s: "$@" -#set -- `getopt -s sh o:d:t:s: "$@"` -while [ "x$1" != x ]; do case $1 in - -s) shift; jpps="$jpps -s $1";; - -o) shift; owner="$1";; - -d) shift; dump="$1";; - -t) shift; tags="$1|$tags";; -esac; shift; done - -[ x"$owner" = x ] && { echo -o required; exit 1; } - -jobid="https://nonexistent.test.server/jpps_store_test_$$" - -echodo $jpps RegisterJob $jobid "$owner" - -echodo $jpps GetJobAttr $jobid http://egee.cesnet.cz/en/Schema/JP/System:owner - -echodo $jpps GetJobAttr $jobid http://egee.cesnet.cz/en/Schema/JP/System:regtime - - -if [ -f "$dump" ]; then - sed "s|_CHANGE_ME_JOBID_|$jobid|" $dump >job.$$ - echodo $jpps StartUpload $jobid urn:org.glite.jp.primary:lb 1234 text/plain >start.$$ - cat start.$$ - dest=`grep '^Destination:' start.$$ | cut -d' ' -f2` - rm start.$$ - echodo globus-url-copy "file:$PWD/job.$$" $dest -# rm job.$$ - echodo $jpps CommitUpload "$dest" - -# does not pass authz check -- probably OK -# echodo $jpps GetJobFiles $jobid - - lbprefix="http://egee.cesnet.cz/en/Schema/LB/Attributes" - echodo $jpps GetJobAttr $jobid "$lbprefix:user" - echodo $jpps GetJobAttr $jobid "$lbprefix:finalStatus" -fi - -if [ "x$tags" != x ]; then - oIFS=$IFS - IFS='|' - set -- $tags - IFS=$oIFS - - while [ x$1 != x ]; do - value=`echo $1 | sed 's/^.*=//'` - name=`echo $1 | sed 's/=.*$//'` - - echodo $jpps RecordTag $jobid $name $value - - echodo $jpps GetJobAttr $jobid $name - - shift - done -fi diff --git a/org.glite.jp.primary/examples/sample_job_aborted b/org.glite.jp.primary/examples/sample_job_aborted deleted file mode 100644 index daf2674..0000000 --- a/org.glite.jp.primary/examples/sample_job_aborted +++ /dev/null @@ -1,9 +0,0 @@ -DATE=20060313114012.259501 HOST="scientific.civ.zcu.cz" PROG=edg-wms LVL=SYSTEM DG.PRIORITY=0 DG.SOURCE="UserInterface" DG.SRC_INSTANCE="" DG.EVNT="RegJob" DG.JOBID="https://scientific.civ.zcu.cz:9000/c63-U-RaOAAHp8YV8QMipw" DG.SEQCODE="UI=000001:NS=0000000000:WM=000000:BH=0000000000:JSS=000000:LM=000000:LRMS=000000:APP=000000" DG.USER="/O=CESNET/O=Masaryk University/CN=Milos Mulac" DG.REGJOB.JDL="blabla" DG.REGJOB.NS="NNNSSSS" DG.REGJOB.PARENT="" DG.REGJOB.JOBTYPE="SIMPLE" DG.REGJOB.NSUBJOBS="0" DG.REGJOB.SEED="uLU0BArrdV98O41PLThJ5Q" -DATE=20060313114012.332573 HOST="scientific.civ.zcu.cz" PROG=edg-wms LVL=SYSTEM DG.PRIORITY=0 DG.SOURCE="NetworkServer" DG.SRC_INSTANCE="" DG.EVNT="Accepted" DG.JOBID="https://scientific.civ.zcu.cz:9000/c63-U-RaOAAHp8YV8QMipw" DG.SEQCODE="UI=000002:NS=0000000001:WM=000000:BH=0000000000:JSS=000000:LM=000000:LRMS=000000:APP=000000" DG.USER="/O=CESNET/O=Masaryk University/CN=Milos Mulac" DG.ACCEPTED.FROM="UserInterface" DG.ACCEPTED.FROM_HOST="sending component hostname" DG.ACCEPTED.FROM_INSTANCE="sending component instance" DG.ACCEPTED.LOCAL_JOBID="new jobId (Condor Globus ...)" -DATE=20060313114012.421854 HOST="scientific.civ.zcu.cz" PROG=edg-wms LVL=SYSTEM DG.PRIORITY=0 DG.SOURCE="NetworkServer" DG.SRC_INSTANCE="" DG.EVNT="EnQueued" DG.JOBID="https://scientific.civ.zcu.cz:9000/c63-U-RaOAAHp8YV8QMipw" DG.SEQCODE="UI=000002:NS=0000000003:WM=000000:BH=0000000000:JSS=000000:LM=000000:LRMS=000000:APP=000000" DG.USER="/O=CESNET/O=Masaryk University/CN=Milos Mulac" DG.ENQUEUED.QUEUE="destination queue" DG.ENQUEUED.JOB="job description in receiver language" DG.ENQUEUED.RESULT="OK" DG.ENQUEUED.REASON="detailed description of transfer" -DATE=20060313114012.527562 HOST="scientific.civ.zcu.cz" PROG=edg-wms LVL=SYSTEM DG.PRIORITY=0 DG.SOURCE="WorkloadManager" DG.SRC_INSTANCE="" DG.EVNT="DeQueued" DG.JOBID="https://scientific.civ.zcu.cz:9000/c63-U-RaOAAHp8YV8QMipw" DG.SEQCODE="UI=000002:NS=0000000004:WM=000001:BH=0000000000:JSS=000000:LM=000000:LRMS=000000:APP=000000" DG.USER="/O=CESNET/O=Masaryk University/CN=Milos Mulac" DG.DEQUEUED.QUEUE="queue name" DG.DEQUEUED.LOCAL_JOBID="new jobId assigned by the receiving component" -DATE=20060313114012.629873 HOST="scientific.civ.zcu.cz" PROG=edg-wms LVL=SYSTEM DG.PRIORITY=0 DG.SOURCE="WorkloadManager" DG.SRC_INSTANCE="" DG.EVNT="HelperCall" DG.JOBID="https://scientific.civ.zcu.cz:9000/c63-U-RaOAAHp8YV8QMipw" DG.SEQCODE="UI=000002:NS=0000000004:WM=000003:BH=0000000000:JSS=000000:LM=000000:LRMS=000000:APP=000000" DG.USER="/O=CESNET/O=Masaryk University/CN=Milos Mulac" DG.HELPERCALL.HELPER_NAME="name of the called component" DG.HELPERCALL.HELPER_PARAMS="parameters of the call" DG.HELPERCALL.SRC_ROLE="CALLING" -DATE=20060313114012.730207 HOST="scientific.civ.zcu.cz" PROG=edg-wms LVL=SYSTEM DG.PRIORITY=0 DG.SOURCE="WorkloadManager" DG.SRC_INSTANCE="" DG.EVNT="Match" DG.JOBID="https://scientific.civ.zcu.cz:9000/c63-U-RaOAAHp8YV8QMipw" DG.SEQCODE="UI=000002:NS=0000000004:WM=000005:BH=0000000000:JSS=000000:LM=000000:LRMS=000000:APP=000000" DG.USER="/O=CESNET/O=Masaryk University/CN=Milos Mulac" DG.MATCH.DEST_ID="destination CE/queue" -DATE=20060313114012.835673 HOST="scientific.civ.zcu.cz" PROG=edg-wms LVL=SYSTEM DG.PRIORITY=0 DG.SOURCE="WorkloadManager" DG.SRC_INSTANCE="" DG.EVNT="HelperReturn" DG.JOBID="https://scientific.civ.zcu.cz:9000/c63-U-RaOAAHp8YV8QMipw" DG.SEQCODE="UI=000002:NS=0000000004:WM=000007:BH=0000000000:JSS=000000:LM=000000:LRMS=000000:APP=000000" DG.USER="/O=CESNET/O=Masaryk University/CN=Milos Mulac" DG.HELPERRETURN.HELPER_NAME="name of the called component" DG.HELPERRETURN.RETVAL="returned data" DG.HELPERRETURN.SRC_ROLE="CALLING" -DATE=20060313114012.940723 HOST="scientific.civ.zcu.cz" PROG=edg-wms LVL=SYSTEM DG.PRIORITY=0 DG.SOURCE="WorkloadManager" DG.SRC_INSTANCE="" DG.EVNT="EnQueued" DG.JOBID="https://scientific.civ.zcu.cz:9000/c63-U-RaOAAHp8YV8QMipw" DG.SEQCODE="UI=000002:NS=0000000004:WM=000009:BH=0000000000:JSS=000000:LM=000000:LRMS=000000:APP=000000" DG.USER="/O=CESNET/O=Masaryk University/CN=Milos Mulac" DG.ENQUEUED.QUEUE="destination queue" DG.ENQUEUED.JOB="job description in receiver language" DG.ENQUEUED.RESULT="OK" DG.ENQUEUED.REASON="detailed description of transfer" -DATE=20060313114013.040365 HOST="scientific.civ.zcu.cz" PROG=edg-wms LVL=SYSTEM DG.PRIORITY=0 DG.SOURCE="JobController" DG.SRC_INSTANCE="" DG.EVNT="Abort" DG.JOBID="https://scientific.civ.zcu.cz:9000/c63-U-RaOAAHp8YV8QMipw" DG.SEQCODE="UI=000002:NS=0000000004:WM=000010:BH=0000000000:JSS=000001:LM=000000:LRMS=000000:APP=000000" DG.USER="/O=CESNET/O=Masaryk University/CN=Milos Mulac" DG.ABORT.REASON="just to test" diff --git a/org.glite.jp.primary/examples/sample_job_cleared b/org.glite.jp.primary/examples/sample_job_cleared deleted file mode 100644 index 65793b8..0000000 --- a/org.glite.jp.primary/examples/sample_job_cleared +++ /dev/null @@ -1,15 +0,0 @@ -DATE=20060313113718.964280 HOST="scientific.civ.zcu.cz" PROG=edg-wms LVL=SYSTEM DG.PRIORITY=0 DG.SOURCE="UserInterface" DG.SRC_INSTANCE="" DG.EVNT="RegJob" DG.JOBID="https://scientific.civ.zcu.cz:9000/Zziy0_yoV0-j9dtlNl1h7w" DG.SEQCODE="UI=000001:NS=0000000000:WM=000000:BH=0000000000:JSS=000000:LM=000000:LRMS=000000:APP=000000" DG.USER="/O=CESNET/O=Masaryk University/CN=Milos Mulac" DG.REGJOB.JDL="blabla" DG.REGJOB.NS="NNNSSSS" DG.REGJOB.PARENT="" DG.REGJOB.JOBTYPE="SIMPLE" DG.REGJOB.NSUBJOBS="0" DG.REGJOB.SEED="uLU0BArrdV98O41PLThJ5Q" -DATE=20060313113719.131973 HOST="scientific.civ.zcu.cz" PROG=edg-wms LVL=SYSTEM DG.PRIORITY=0 DG.SOURCE="NetworkServer" DG.SRC_INSTANCE="" DG.EVNT="Accepted" DG.JOBID="https://scientific.civ.zcu.cz:9000/Zziy0_yoV0-j9dtlNl1h7w" DG.SEQCODE="UI=000002:NS=0000000001:WM=000000:BH=0000000000:JSS=000000:LM=000000:LRMS=000000:APP=000000" DG.USER="/O=CESNET/O=Masaryk University/CN=Milos Mulac" DG.ACCEPTED.FROM="UserInterface" DG.ACCEPTED.FROM_HOST="sending component hostname" DG.ACCEPTED.FROM_INSTANCE="sending component instance" DG.ACCEPTED.LOCAL_JOBID="new jobId (Condor Globus ...)" -DATE=20060313113719.202155 HOST="scientific.civ.zcu.cz" PROG=edg-wms LVL=SYSTEM DG.PRIORITY=0 DG.SOURCE="NetworkServer" DG.SRC_INSTANCE="" DG.EVNT="EnQueued" DG.JOBID="https://scientific.civ.zcu.cz:9000/Zziy0_yoV0-j9dtlNl1h7w" DG.SEQCODE="UI=000002:NS=0000000003:WM=000000:BH=0000000000:JSS=000000:LM=000000:LRMS=000000:APP=000000" DG.USER="/O=CESNET/O=Masaryk University/CN=Milos Mulac" DG.ENQUEUED.QUEUE="destination queue" DG.ENQUEUED.JOB="job description in receiver language" DG.ENQUEUED.RESULT="OK" DG.ENQUEUED.REASON="detailed description of transfer" -DATE=20060313113719.316644 HOST="scientific.civ.zcu.cz" PROG=edg-wms LVL=SYSTEM DG.PRIORITY=0 DG.SOURCE="WorkloadManager" DG.SRC_INSTANCE="" DG.EVNT="DeQueued" DG.JOBID="https://scientific.civ.zcu.cz:9000/Zziy0_yoV0-j9dtlNl1h7w" DG.SEQCODE="UI=000002:NS=0000000004:WM=000001:BH=0000000000:JSS=000000:LM=000000:LRMS=000000:APP=000000" DG.USER="/O=CESNET/O=Masaryk University/CN=Milos Mulac" DG.DEQUEUED.QUEUE="queue name" DG.DEQUEUED.LOCAL_JOBID="new jobId assigned by the receiving component" -DATE=20060313113719.442051 HOST="scientific.civ.zcu.cz" PROG=edg-wms LVL=SYSTEM DG.PRIORITY=0 DG.SOURCE="WorkloadManager" DG.SRC_INSTANCE="" DG.EVNT="HelperCall" DG.JOBID="https://scientific.civ.zcu.cz:9000/Zziy0_yoV0-j9dtlNl1h7w" DG.SEQCODE="UI=000002:NS=0000000004:WM=000003:BH=0000000000:JSS=000000:LM=000000:LRMS=000000:APP=000000" DG.USER="/O=CESNET/O=Masaryk University/CN=Milos Mulac" DG.HELPERCALL.HELPER_NAME="name of the called component" DG.HELPERCALL.HELPER_PARAMS="parameters of the call" DG.HELPERCALL.SRC_ROLE="CALLING" -DATE=20060313113719.542691 HOST="scientific.civ.zcu.cz" PROG=edg-wms LVL=SYSTEM DG.PRIORITY=0 DG.SOURCE="WorkloadManager" DG.SRC_INSTANCE="" DG.EVNT="Match" DG.JOBID="https://scientific.civ.zcu.cz:9000/Zziy0_yoV0-j9dtlNl1h7w" DG.SEQCODE="UI=000002:NS=0000000004:WM=000005:BH=0000000000:JSS=000000:LM=000000:LRMS=000000:APP=000000" DG.USER="/O=CESNET/O=Masaryk University/CN=Milos Mulac" DG.MATCH.DEST_ID="destination CE/queue" -DATE=20060313113719.632697 HOST="scientific.civ.zcu.cz" PROG=edg-wms LVL=SYSTEM DG.PRIORITY=0 DG.SOURCE="WorkloadManager" DG.SRC_INSTANCE="" DG.EVNT="HelperReturn" DG.JOBID="https://scientific.civ.zcu.cz:9000/Zziy0_yoV0-j9dtlNl1h7w" DG.SEQCODE="UI=000002:NS=0000000004:WM=000007:BH=0000000000:JSS=000000:LM=000000:LRMS=000000:APP=000000" DG.USER="/O=CESNET/O=Masaryk University/CN=Milos Mulac" DG.HELPERRETURN.HELPER_NAME="name of the called component" DG.HELPERRETURN.RETVAL="returned data" DG.HELPERRETURN.SRC_ROLE="CALLING" -DATE=20060313113719.739851 HOST="scientific.civ.zcu.cz" PROG=edg-wms LVL=SYSTEM DG.PRIORITY=0 DG.SOURCE="WorkloadManager" DG.SRC_INSTANCE="" DG.EVNT="EnQueued" DG.JOBID="https://scientific.civ.zcu.cz:9000/Zziy0_yoV0-j9dtlNl1h7w" DG.SEQCODE="UI=000002:NS=0000000004:WM=000009:BH=0000000000:JSS=000000:LM=000000:LRMS=000000:APP=000000" DG.USER="/O=CESNET/O=Masaryk University/CN=Milos Mulac" DG.ENQUEUED.QUEUE="destination queue" DG.ENQUEUED.JOB="job description in receiver language" DG.ENQUEUED.RESULT="OK" DG.ENQUEUED.REASON="detailed description of transfer" -DATE=20060313113719.839754 HOST="scientific.civ.zcu.cz" PROG=edg-wms LVL=SYSTEM DG.PRIORITY=0 DG.SOURCE="JobController" DG.SRC_INSTANCE="" DG.EVNT="DeQueued" DG.JOBID="https://scientific.civ.zcu.cz:9000/Zziy0_yoV0-j9dtlNl1h7w" DG.SEQCODE="UI=000002:NS=0000000004:WM=000010:BH=0000000000:JSS=000001:LM=000000:LRMS=000000:APP=000000" DG.USER="/O=CESNET/O=Masaryk University/CN=Milos Mulac" DG.DEQUEUED.QUEUE="queue name" DG.DEQUEUED.LOCAL_JOBID="new jobId assigned by the receiving component" -DATE=20060313113719.955172 HOST="scientific.civ.zcu.cz" PROG=edg-wms LVL=SYSTEM DG.PRIORITY=0 DG.SOURCE="JobController" DG.SRC_INSTANCE="" DG.EVNT="Transfer" DG.JOBID="https://scientific.civ.zcu.cz:9000/Zziy0_yoV0-j9dtlNl1h7w" DG.SEQCODE="UI=000002:NS=0000000004:WM=000010:BH=0000000000:JSS=000003:LM=000000:LRMS=000000:APP=000000" DG.USER="/O=CESNET/O=Masaryk University/CN=Milos Mulac" DG.TRANSFER.DESTINATION="LRMS" DG.TRANSFER.DEST_HOST="destination hostname" DG.TRANSFER.DEST_INSTANCE="destination instance" DG.TRANSFER.JOB="(nil)" DG.TRANSFER.RESULT="OK" DG.TRANSFER.REASON="detailed description of transfer" DG.TRANSFER.DEST_JOBID="destination internal jobid" -DATE=20060313113720.062341 HOST="scientific.civ.zcu.cz" PROG=edg-wms LVL=SYSTEM DG.PRIORITY=0 DG.SOURCE="LogMonitor" DG.SRC_INSTANCE="" DG.EVNT="Accepted" DG.JOBID="https://scientific.civ.zcu.cz:9000/Zziy0_yoV0-j9dtlNl1h7w" DG.SEQCODE="UI=000002:NS=0000000004:WM=000010:BH=0000000000:JSS=000004:LM=000001:LRMS=000000:APP=000000" DG.USER="/O=CESNET/O=Masaryk University/CN=Milos Mulac" DG.ACCEPTED.FROM="JobController" DG.ACCEPTED.FROM_HOST="sending component hostname" DG.ACCEPTED.FROM_INSTANCE="sending component instance" DG.ACCEPTED.LOCAL_JOBID="new jobId (Condor Globus ...)" -DATE=20060313113720.158744 HOST="scientific.civ.zcu.cz" PROG=edg-wms LVL=SYSTEM DG.PRIORITY=0 DG.SOURCE="LogMonitor" DG.SRC_INSTANCE="" DG.EVNT="Transfer" DG.JOBID="https://scientific.civ.zcu.cz:9000/Zziy0_yoV0-j9dtlNl1h7w" DG.SEQCODE="UI=000002:NS=0000000004:WM=000010:BH=0000000000:JSS=000004:LM=000003:LRMS=000000:APP=000000" DG.USER="/O=CESNET/O=Masaryk University/CN=Milos Mulac" DG.TRANSFER.DESTINATION="LRMS" DG.TRANSFER.DEST_HOST="destination hostname" DG.TRANSFER.DEST_INSTANCE="destination instance" DG.TRANSFER.JOB="(nil)" DG.TRANSFER.RESULT="OK" DG.TRANSFER.REASON="detailed description of transfer" DG.TRANSFER.DEST_JOBID="destination internal jobid" -DATE=20060313113720.261956 HOST="scientific.civ.zcu.cz" PROG=edg-wms LVL=SYSTEM DG.PRIORITY=0 DG.SOURCE="LogMonitor" DG.SRC_INSTANCE="" DG.EVNT="Running" DG.JOBID="https://scientific.civ.zcu.cz:9000/Zziy0_yoV0-j9dtlNl1h7w" DG.SEQCODE="UI=000002:NS=0000000004:WM=000010:BH=0000000000:JSS=000004:LM=000005:LRMS=000000:APP=000000" DG.USER="/O=CESNET/O=Masaryk University/CN=Milos Mulac" DG.RUNNING.NODE="worker node" -DATE=20060313113720.371040 HOST="scientific.civ.zcu.cz" PROG=edg-wms LVL=SYSTEM DG.PRIORITY=0 DG.SOURCE="LogMonitor" DG.SRC_INSTANCE="" DG.EVNT="Done" DG.JOBID="https://scientific.civ.zcu.cz:9000/Zziy0_yoV0-j9dtlNl1h7w" DG.SEQCODE="UI=000002:NS=0000000004:WM=000010:BH=0000000000:JSS=000004:LM=000007:LRMS=000000:APP=000000" DG.USER="/O=CESNET/O=Masaryk University/CN=Milos Mulac" DG.DONE.STATUS_CODE="OK" DG.DONE.REASON="reason for the change" DG.DONE.EXIT_CODE="0" -DATE=20060313113720.473822 HOST="scientific.civ.zcu.cz" PROG=edg-wms LVL=SYSTEM DG.PRIORITY=0 DG.SOURCE="LogMonitor" DG.SRC_INSTANCE="" DG.EVNT="Clear" DG.JOBID="https://scientific.civ.zcu.cz:9000/Zziy0_yoV0-j9dtlNl1h7w" DG.SEQCODE="UI=000002:NS=0000000004:WM=000010:BH=0000000000:JSS=000004:LM=000009:LRMS=000000:APP=000000" DG.USER="/O=CESNET/O=Masaryk University/CN=Milos Mulac" DG.CLEAR.REASON="USER" diff --git a/org.glite.jp.primary/examples/sample_job_tagged_done b/org.glite.jp.primary/examples/sample_job_tagged_done deleted file mode 100644 index 1c0d57d..0000000 --- a/org.glite.jp.primary/examples/sample_job_tagged_done +++ /dev/null @@ -1,15 +0,0 @@ -DATE=20060313114125.327248 HOST="scientific.civ.zcu.cz" PROG=edg-wms LVL=SYSTEM DG.PRIORITY=0 DG.SOURCE="UserInterface" DG.SRC_INSTANCE="" DG.EVNT="RegJob" DG.JOBID="https://scientific.civ.zcu.cz:9000/rQn3lfqMWxWz3Dpm7kypqQ" DG.SEQCODE="UI=000001:NS=0000000000:WM=000000:BH=0000000000:JSS=000000:LM=000000:LRMS=000000:APP=000000" DG.USER="/O=CESNET/O=Masaryk University/CN=Milos Mulac" DG.REGJOB.JDL="blabla" DG.REGJOB.NS="NNNSSSS" DG.REGJOB.PARENT="" DG.REGJOB.JOBTYPE="SIMPLE" DG.REGJOB.NSUBJOBS="0" DG.REGJOB.SEED="uLU0BArrdV98O41PLThJ5Q" -DATE=20060313114125.449249 HOST="scientific.civ.zcu.cz" PROG=edg-wms LVL=SYSTEM DG.PRIORITY=0 DG.SOURCE="NetworkServer" DG.SRC_INSTANCE="" DG.EVNT="Accepted" DG.JOBID="https://scientific.civ.zcu.cz:9000/rQn3lfqMWxWz3Dpm7kypqQ" DG.SEQCODE="UI=000002:NS=0000000001:WM=000000:BH=0000000000:JSS=000000:LM=000000:LRMS=000000:APP=000000" DG.USER="/O=CESNET/O=Masaryk University/CN=Milos Mulac" DG.ACCEPTED.FROM="UserInterface" DG.ACCEPTED.FROM_HOST="sending component hostname" DG.ACCEPTED.FROM_INSTANCE="sending component instance" DG.ACCEPTED.LOCAL_JOBID="new jobId (Condor Globus ...)" -DATE=20060313114125.577238 HOST="scientific.civ.zcu.cz" PROG=edg-wms LVL=SYSTEM DG.PRIORITY=0 DG.SOURCE="NetworkServer" DG.SRC_INSTANCE="" DG.EVNT="EnQueued" DG.JOBID="https://scientific.civ.zcu.cz:9000/rQn3lfqMWxWz3Dpm7kypqQ" DG.SEQCODE="UI=000002:NS=0000000003:WM=000000:BH=0000000000:JSS=000000:LM=000000:LRMS=000000:APP=000000" DG.USER="/O=CESNET/O=Masaryk University/CN=Milos Mulac" DG.ENQUEUED.QUEUE="destination queue" DG.ENQUEUED.JOB="job description in receiver language" DG.ENQUEUED.RESULT="OK" DG.ENQUEUED.REASON="detailed description of transfer" -DATE=20060313114125.708618 HOST="scientific.civ.zcu.cz" PROG=edg-wms LVL=SYSTEM DG.PRIORITY=0 DG.SOURCE="WorkloadManager" DG.SRC_INSTANCE="" DG.EVNT="DeQueued" DG.JOBID="https://scientific.civ.zcu.cz:9000/rQn3lfqMWxWz3Dpm7kypqQ" DG.SEQCODE="UI=000002:NS=0000000004:WM=000001:BH=0000000000:JSS=000000:LM=000000:LRMS=000000:APP=000000" DG.USER="/O=CESNET/O=Masaryk University/CN=Milos Mulac" DG.DEQUEUED.QUEUE="queue name" DG.DEQUEUED.LOCAL_JOBID="new jobId assigned by the receiving component" -DATE=20060313114125.817613 HOST="scientific.civ.zcu.cz" PROG=edg-wms LVL=SYSTEM DG.PRIORITY=0 DG.SOURCE="WorkloadManager" DG.SRC_INSTANCE="" DG.EVNT="HelperCall" DG.JOBID="https://scientific.civ.zcu.cz:9000/rQn3lfqMWxWz3Dpm7kypqQ" DG.SEQCODE="UI=000002:NS=0000000004:WM=000003:BH=0000000000:JSS=000000:LM=000000:LRMS=000000:APP=000000" DG.USER="/O=CESNET/O=Masaryk University/CN=Milos Mulac" DG.HELPERCALL.HELPER_NAME="name of the called component" DG.HELPERCALL.HELPER_PARAMS="parameters of the call" DG.HELPERCALL.SRC_ROLE="CALLING" -DATE=20060313114125.913634 HOST="scientific.civ.zcu.cz" PROG=edg-wms LVL=SYSTEM DG.PRIORITY=0 DG.SOURCE="WorkloadManager" DG.SRC_INSTANCE="" DG.EVNT="Match" DG.JOBID="https://scientific.civ.zcu.cz:9000/rQn3lfqMWxWz3Dpm7kypqQ" DG.SEQCODE="UI=000002:NS=0000000004:WM=000005:BH=0000000000:JSS=000000:LM=000000:LRMS=000000:APP=000000" DG.USER="/O=CESNET/O=Masaryk University/CN=Milos Mulac" DG.MATCH.DEST_ID="destination CE/queue" -DATE=20060313114126.015139 HOST="scientific.civ.zcu.cz" PROG=edg-wms LVL=SYSTEM DG.PRIORITY=0 DG.SOURCE="WorkloadManager" DG.SRC_INSTANCE="" DG.EVNT="HelperReturn" DG.JOBID="https://scientific.civ.zcu.cz:9000/rQn3lfqMWxWz3Dpm7kypqQ" DG.SEQCODE="UI=000002:NS=0000000004:WM=000007:BH=0000000000:JSS=000000:LM=000000:LRMS=000000:APP=000000" DG.USER="/O=CESNET/O=Masaryk University/CN=Milos Mulac" DG.HELPERRETURN.HELPER_NAME="name of the called component" DG.HELPERRETURN.RETVAL="returned data" DG.HELPERRETURN.SRC_ROLE="CALLING" -DATE=20060313114126.132840 HOST="scientific.civ.zcu.cz" PROG=edg-wms LVL=SYSTEM DG.PRIORITY=0 DG.SOURCE="WorkloadManager" DG.SRC_INSTANCE="" DG.EVNT="EnQueued" DG.JOBID="https://scientific.civ.zcu.cz:9000/rQn3lfqMWxWz3Dpm7kypqQ" DG.SEQCODE="UI=000002:NS=0000000004:WM=000009:BH=0000000000:JSS=000000:LM=000000:LRMS=000000:APP=000000" DG.USER="/O=CESNET/O=Masaryk University/CN=Milos Mulac" DG.ENQUEUED.QUEUE="destination queue" DG.ENQUEUED.JOB="job description in receiver language" DG.ENQUEUED.RESULT="OK" DG.ENQUEUED.REASON="detailed description of transfer" -DATE=20060313114126.254850 HOST="scientific.civ.zcu.cz" PROG=edg-wms LVL=SYSTEM DG.PRIORITY=0 DG.SOURCE="JobController" DG.SRC_INSTANCE="" DG.EVNT="DeQueued" DG.JOBID="https://scientific.civ.zcu.cz:9000/rQn3lfqMWxWz3Dpm7kypqQ" DG.SEQCODE="UI=000002:NS=0000000004:WM=000010:BH=0000000000:JSS=000001:LM=000000:LRMS=000000:APP=000000" DG.USER="/O=CESNET/O=Masaryk University/CN=Milos Mulac" DG.DEQUEUED.QUEUE="queue name" DG.DEQUEUED.LOCAL_JOBID="new jobId assigned by the receiving component" -DATE=20060313114126.359397 HOST="scientific.civ.zcu.cz" PROG=edg-wms LVL=SYSTEM DG.PRIORITY=0 DG.SOURCE="JobController" DG.SRC_INSTANCE="" DG.EVNT="Transfer" DG.JOBID="https://scientific.civ.zcu.cz:9000/rQn3lfqMWxWz3Dpm7kypqQ" DG.SEQCODE="UI=000002:NS=0000000004:WM=000010:BH=0000000000:JSS=000003:LM=000000:LRMS=000000:APP=000000" DG.USER="/O=CESNET/O=Masaryk University/CN=Milos Mulac" DG.TRANSFER.DESTINATION="LRMS" DG.TRANSFER.DEST_HOST="destination hostname" DG.TRANSFER.DEST_INSTANCE="destination instance" DG.TRANSFER.JOB="(nil)" DG.TRANSFER.RESULT="OK" DG.TRANSFER.REASON="detailed description of transfer" DG.TRANSFER.DEST_JOBID="destination internal jobid" -DATE=20060313114126.462961 HOST="scientific.civ.zcu.cz" PROG=edg-wms LVL=SYSTEM DG.PRIORITY=0 DG.SOURCE="LogMonitor" DG.SRC_INSTANCE="" DG.EVNT="Accepted" DG.JOBID="https://scientific.civ.zcu.cz:9000/rQn3lfqMWxWz3Dpm7kypqQ" DG.SEQCODE="UI=000002:NS=0000000004:WM=000010:BH=0000000000:JSS=000004:LM=000001:LRMS=000000:APP=000000" DG.USER="/O=CESNET/O=Masaryk University/CN=Milos Mulac" DG.ACCEPTED.FROM="JobController" DG.ACCEPTED.FROM_HOST="sending component hostname" DG.ACCEPTED.FROM_INSTANCE="sending component instance" DG.ACCEPTED.LOCAL_JOBID="new jobId (Condor Globus ...)" -DATE=20060313114126.564692 HOST="scientific.civ.zcu.cz" PROG=edg-wms LVL=SYSTEM DG.PRIORITY=0 DG.SOURCE="LogMonitor" DG.SRC_INSTANCE="" DG.EVNT="Transfer" DG.JOBID="https://scientific.civ.zcu.cz:9000/rQn3lfqMWxWz3Dpm7kypqQ" DG.SEQCODE="UI=000002:NS=0000000004:WM=000010:BH=0000000000:JSS=000004:LM=000003:LRMS=000000:APP=000000" DG.USER="/O=CESNET/O=Masaryk University/CN=Milos Mulac" DG.TRANSFER.DESTINATION="LRMS" DG.TRANSFER.DEST_HOST="destination hostname" DG.TRANSFER.DEST_INSTANCE="destination instance" DG.TRANSFER.JOB="(nil)" DG.TRANSFER.RESULT="OK" DG.TRANSFER.REASON="detailed description of transfer" DG.TRANSFER.DEST_JOBID="destination internal jobid" -DATE=20060313114126.665625 HOST="scientific.civ.zcu.cz" PROG=edg-wms LVL=SYSTEM DG.PRIORITY=0 DG.SOURCE="LogMonitor" DG.SRC_INSTANCE="" DG.EVNT="Running" DG.JOBID="https://scientific.civ.zcu.cz:9000/rQn3lfqMWxWz3Dpm7kypqQ" DG.SEQCODE="UI=000002:NS=0000000004:WM=000010:BH=0000000000:JSS=000004:LM=000005:LRMS=000000:APP=000000" DG.USER="/O=CESNET/O=Masaryk University/CN=Milos Mulac" DG.RUNNING.NODE="worker node" -DATE=20060313114126.775084 HOST="scientific.civ.zcu.cz" PROG=edg-wms LVL=SYSTEM DG.PRIORITY=0 DG.SOURCE="LogMonitor" DG.SRC_INSTANCE="" DG.EVNT="Done" DG.JOBID="https://scientific.civ.zcu.cz:9000/rQn3lfqMWxWz3Dpm7kypqQ" DG.SEQCODE="UI=000002:NS=0000000004:WM=000010:BH=0000000000:JSS=000004:LM=000007:LRMS=000000:APP=000000" DG.USER="/O=CESNET/O=Masaryk University/CN=Milos Mulac" DG.DONE.STATUS_CODE="OK" DG.DONE.REASON="reason for the change" DG.DONE.EXIT_CODE="0" -DATE=20060313114936.079576 HOST="scientific.civ.zcu.cz" PROG=edg-wms LVL=SYSTEM DG.PRIORITY=0 DG.SOURCE="Application" DG.SRC_INSTANCE="" DG.EVNT="UserTag" DG.JOBID="https://scientific.civ.zcu.cz:9000/rQn3lfqMWxWz3Dpm7kypqQ" DG.SEQCODE="UI=000002:NS=0000000004:WM=000010:BH=0000000000:JSS=000004:LM=000007:LRMS=000000:APP=000002" DG.USER="/O=CESNET/O=Masaryk University/CN=Milos Mulac" DG.USERTAG.NAME="color" DG.USERTAG.VALUE="green" diff --git a/org.glite.jp.primary/examples/sample_job_waiting b/org.glite.jp.primary/examples/sample_job_waiting deleted file mode 100644 index f9b515f..0000000 --- a/org.glite.jp.primary/examples/sample_job_waiting +++ /dev/null @@ -1,8 +0,0 @@ -DG.ARRIVED=20051010204845.000000 DATE=20051010204845.409455 HOST="scientific.civ.zcu.cz" PROG=edg-wms LVL=SYSTEM DG.PRIORITY=0 DG.SOURCE="UserInterface" DG.SRC_INSTANCE="" DG.EVNT="RegJob" DG.JOBID="https://scientific.civ.zcu.cz:9200/1Yjk3Wlaspl07y45iX8Tng" DG.SEQCODE="UI=000001:NS=0000000000:WM=000000:BH=0000000000:JSS=000000:LM=000000:LRMS=000000:APP=000000" DG.USER="/O=CESNET/O=Masaryk University/CN=Ales Krenek" DG.REGJOB.JDL="blabla" DG.REGJOB.NS="NNNSSSS" DG.REGJOB.PARENT="" DG.REGJOB.JOBTYPE="SIMPLE" DG.REGJOB.NSUBJOBS="0" DG.REGJOB.SEED="uLU0BArrdV98O41PLThJ5Q" -DG.ARRIVED=20051010204847.000000 DATE=20051010204847.451986 HOST="scientific.civ.zcu.cz" PROG=edg-wms LVL=SYSTEM DG.PRIORITY=0 DG.SOURCE="WorkloadManager" DG.SRC_INSTANCE="" DG.EVNT="DeQueued" DG.JOBID="https://scientific.civ.zcu.cz:9200/1Yjk3Wlaspl07y45iX8Tng" DG.SEQCODE="UI=000002:NS=0000000004:WM=000001:BH=0000000000:JSS=000000:LM=000000:LRMS=000000:APP=000000" DG.USER="/O=CESNET/O=Masaryk University/CN=Ales Krenek" DG.DEQUEUED.QUEUE="queue name" DG.DEQUEUED.LOCAL_JOBID="new jobId assigned by the receiving component" -DG.ARRIVED=20051010204847.000000 DATE=20051010204847.485702 HOST="scientific.civ.zcu.cz" PROG=edg-wms LVL=SYSTEM DG.PRIORITY=0 DG.SOURCE="WorkloadManager" DG.SRC_INSTANCE="" DG.EVNT="HelperCall" DG.JOBID="https://scientific.civ.zcu.cz:9200/1Yjk3Wlaspl07y45iX8Tng" DG.SEQCODE="UI=000002:NS=0000000004:WM=000003:BH=0000000000:JSS=000000:LM=000000:LRMS=000000:APP=000000" DG.USER="/O=CESNET/O=Masaryk University/CN=Ales Krenek" DG.HELPERCALL.HELPER_NAME="name of the called component" DG.HELPERCALL.HELPER_PARAMS="parameters of the call" DG.HELPERCALL.SRC_ROLE="CALLING" -DG.ARRIVED=20051010204847.000000 DATE=20051010204847.520663 HOST="scientific.civ.zcu.cz" PROG=edg-wms LVL=SYSTEM DG.PRIORITY=0 DG.SOURCE="WorkloadManager" DG.SRC_INSTANCE="" DG.EVNT="Match" DG.JOBID="https://scientific.civ.zcu.cz:9200/1Yjk3Wlaspl07y45iX8Tng" DG.SEQCODE="UI=000002:NS=0000000004:WM=000005:BH=0000000000:JSS=000000:LM=000000:LRMS=000000:APP=000000" DG.USER="/O=CESNET/O=Masaryk University/CN=Ales Krenek" DG.MATCH.DEST_ID="destination CE/queue" -DG.ARRIVED=20051010204847.000000 DATE=20051010204847.552015 HOST="scientific.civ.zcu.cz" PROG=edg-wms LVL=SYSTEM DG.PRIORITY=0 DG.SOURCE="WorkloadManager" DG.SRC_INSTANCE="" DG.EVNT="HelperReturn" DG.JOBID="https://scientific.civ.zcu.cz:9200/1Yjk3Wlaspl07y45iX8Tng" DG.SEQCODE="UI=000002:NS=0000000004:WM=000007:BH=0000000000:JSS=000000:LM=000000:LRMS=000000:APP=000000" DG.USER="/O=CESNET/O=Masaryk University/CN=Ales Krenek" DG.HELPERRETURN.HELPER_NAME="name of the called component" DG.HELPERRETURN.RETVAL="returned data" DG.HELPERRETURN.SRC_ROLE="CALLING" -DG.ARRIVED=20051010204847.000000 DATE=20051010204847.584267 HOST="scientific.civ.zcu.cz" PROG=edg-wms LVL=SYSTEM DG.PRIORITY=0 DG.SOURCE="WorkloadManager" DG.SRC_INSTANCE="" DG.EVNT="EnQueued" DG.JOBID="https://scientific.civ.zcu.cz:9200/1Yjk3Wlaspl07y45iX8Tng" DG.SEQCODE="UI=000002:NS=0000000004:WM=000009:BH=0000000000:JSS=000000:LM=000000:LRMS=000000:APP=000000" DG.USER="/O=CESNET/O=Masaryk University/CN=Ales Krenek" DG.ENQUEUED.QUEUE="destination queue" DG.ENQUEUED.JOB="job description in receiver language" DG.ENQUEUED.RESULT="OK" DG.ENQUEUED.REASON="detailed description of transfer" -DG.ARRIVED=20051010204847.000000 DATE=20051010204847.381506 HOST="scientific.civ.zcu.cz" PROG=edg-wms LVL=SYSTEM DG.PRIORITY=0 DG.SOURCE="NetworkServer" DG.SRC_INSTANCE="" DG.EVNT="Accepted" DG.JOBID="https://scientific.civ.zcu.cz:9200/1Yjk3Wlaspl07y45iX8Tng" DG.SEQCODE="UI=000002:NS=0000000001:WM=000000:BH=0000000000:JSS=000000:LM=000000:LRMS=000000:APP=000000" DG.USER="/O=CESNET/O=Masaryk University/CN=Ales Krenek" DG.ACCEPTED.FROM="UserInterface" DG.ACCEPTED.FROM_HOST="sending component hostname" DG.ACCEPTED.FROM_INSTANCE="sending component instance" DG.ACCEPTED.LOCAL_JOBID="new jobId (Condor Globus ...)" -DG.ARRIVED=20051010204847.000000 DATE=20051010204847.409422 HOST="scientific.civ.zcu.cz" PROG=edg-wms LVL=SYSTEM DG.PRIORITY=0 DG.SOURCE="NetworkServer" DG.SRC_INSTANCE="" DG.EVNT="EnQueued" DG.JOBID="https://scientific.civ.zcu.cz:9200/1Yjk3Wlaspl07y45iX8Tng" DG.SEQCODE="UI=000002:NS=0000000003:WM=000000:BH=0000000000:JSS=000000:LM=000000:LRMS=000000:APP=000000" DG.USER="/O=CESNET/O=Masaryk University/CN=Ales Krenek" DG.ENQUEUED.QUEUE="destination queue" DG.ENQUEUED.JOB="job description in receiver language" DG.ENQUEUED.RESULT="OK" DG.ENQUEUED.REASON="detailed description of transfer" diff --git a/org.glite.jp.primary/interface/file_plugin.h b/org.glite.jp.primary/interface/file_plugin.h deleted file mode 100644 index f322d4d..0000000 --- a/org.glite.jp.primary/interface/file_plugin.h +++ /dev/null @@ -1,86 +0,0 @@ -#ifndef __GLITE_JP_FILEPLUGIN -#define __GLITE_JP_FILEPLUGIN - -/** Methods of the file plugin. */ - -typedef struct _glite_jpps_fplug_op_t { - -/** Open a file. -\param[in] fpctx Context of the plugin, returned by its init. -\param[in] bhandle Handle of the file via JPPS backend. -\param[in] uri URI (type) of the opened file. -\param[out] handle Handle to the opened file structure, to be passed to other plugin functions. -*/ - int (*open)(void *fpctx,void *bhandle,const char *uri,void **handle); -/** Open from a string. -\param[in] fpctx Context of the plugin, returned by its init. -\param[in] str The string to use. -\param[in] uri URI (type) of the string -\param[in] ns namespace to handle -\param[out] handle Handle to the opened file structure, to be passed to other plugin functions. -*/ - - int (*open_str)(void *fpctx,const char *str,const char *uri,const char *ns,void **handle); - -/** Close the file. Free data associated to a handle */ - int (*close)(void *fpctx,void *handle); - -/** "Preprocess" the file -- this function is called once after the file is commited */ - int (*filecom)(void *fpctx,void *handle); - -/** Retrieve value(s) of an attribute. -\param[in] fpctx Plugin context. -\param[in] handle Handle of the opened file. -\param[in] ns Namespace of queried attribute. -\param[in] attr Queried attribute. -\param[out] attrval GLITE_JP_ATTR_UNDEF-terminated list of value(s) of the attribute. - If there are more and there is an interpretation of their order - they must be sorted, eg. current value of tag is the last one. -\retval 0 success -\retval ENOSYS this attribute is not defined by this type of file -\retval ENOENT no value is present -*/ - int (*attr)(void *fpctx,void *handle, const char *attr,glite_jp_attrval_t **attrval); - -/** File type specific operation. -\param[in] fpctx Plugin context. -\param[in] handle Handle of the opened file. -\param[in] oper Code of the operation, specific for a concrete plugin. -*/ - int (*generic)(void *fpctx,void *handle,int oper,...); - -} glite_jpps_fplug_op_t; - -/** Data describing a plugin. */ -typedef struct _glite_jpps_fplug_data_t { - void *fpctx; /**< Context passed to plugin operations. */ - char **uris; /**< NULL-terminated list of file types (URIs) - handled by the plugin. */ - char **classes; /**< The same as uris but filesystem-friendly - (can be used to construct file names).*/ - char **namespaces; /**< Which attribute namespaces this plugin handles. */ - - glite_jpps_fplug_op_t ops; /**< Plugin operations. */ -} glite_jpps_fplug_data_t; - -/** Initialisation function of the plugin. - Called after dlopen(), must be named "init". -\param[in] ctx JPPS context -\param[out] data filled-in plugin data -*/ - -typedef int (*glite_jpps_fplug_init_t)( - glite_jp_context_t ctx, - glite_jpps_fplug_data_t *plugin_data -); - - - - -/* XXX: not really public interface follows */ - -int glite_jpps_fplug_load(glite_jp_context_t ctx,int argc,char **argv); -int glite_jpps_fplug_lookup(glite_jp_context_t ctx,const char *uri, glite_jpps_fplug_data_t ***plugin_data); -int glite_jpps_fplug_lookup_byclass(glite_jp_context_t, const char *class,glite_jpps_fplug_data_t ***plugin_data); - -#endif diff --git a/org.glite.jp.primary/project/build.number b/org.glite.jp.primary/project/build.number deleted file mode 100644 index 17d7d4d..0000000 --- a/org.glite.jp.primary/project/build.number +++ /dev/null @@ -1,2 +0,0 @@ -#Sat Oct 15 06:52:14 CEST 2005 -module.build=39 diff --git a/org.glite.jp.primary/project/build.properties b/org.glite.jp.primary/project/build.properties deleted file mode 100644 index e69de29..0000000 diff --git a/org.glite.jp.primary/project/configure.properties.xml b/org.glite.jp.primary/project/configure.properties.xml deleted file mode 100644 index cfa060a..0000000 --- a/org.glite.jp.primary/project/configure.properties.xml +++ /dev/null @@ -1,85 +0,0 @@ - - - - - - - - - - - -top_srcdir=.. -builddir=build -stagedir=${stage.abs.dir} -distdir=${dist.dir} -globalprefix=${global.prefix} -lbprefix=${subsystem.prefix} -package=${module.package.name} -PREFIX=${install.dir} -version=${module.version} -glite_location=${with.glite.location} -globus_prefix=${with.globus.prefix} -expat_prefix=${with.expat.prefix} -gsoap_prefix=${with.gsoap.prefix} -gsoap_version=${ext.gsoap.version} -mysql_prefix=${with.mysql.prefix} -mysql_version=${ext.mysql.version} -thrflavour=${with.globus.thr.flavor} -nothrflavour=${with.globus.nothr.flavor} -cppunit=${with.cppunit.prefix} -jpproject=${subsystem.project.dir} -project=${component.project.dir} -classads_prefix=${with.classads.prefix} -libtar_prefix=${with.libtar.prefix} - - - diff --git a/org.glite.jp.primary/project/properties.xml b/org.glite.jp.primary/project/properties.xml deleted file mode 100755 index 2149dd4..0000000 --- a/org.glite.jp.primary/project/properties.xml +++ /dev/null @@ -1,51 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/org.glite.jp.primary/project/tar_exclude b/org.glite.jp.primary/project/tar_exclude deleted file mode 100644 index e1fcd1a..0000000 --- a/org.glite.jp.primary/project/tar_exclude +++ /dev/null @@ -1,10 +0,0 @@ -tar_exclude -CVS -build.xml -build -build.properties -properties.xml -configure.properties.xml -.cvsignore -.project -.cdtproject diff --git a/org.glite.jp.primary/project/version.properties b/org.glite.jp.primary/project/version.properties deleted file mode 100644 index 1441742..0000000 --- a/org.glite.jp.primary/project/version.properties +++ /dev/null @@ -1,2 +0,0 @@ -module.version=1.3.0 -module.age=1 diff --git a/org.glite.jp.primary/src/attrs.c b/org.glite.jp.primary/src/attrs.c deleted file mode 100644 index 89d4e16..0000000 --- a/org.glite.jp.primary/src/attrs.c +++ /dev/null @@ -1,188 +0,0 @@ -#include -#include -#include -#include -#include - -#include "glite/jp/types.h" -#include "glite/jp/attr.h" - -#include "feed.h" -#include "backend.h" -#include "attrs.h" -#include "utils.h" -#include "file_plugin.h" -#include "builtin_plugins.h" - -static struct { - char *namespace; - glite_jpps_fplug_data_t **plugins; - int nplugins; - -} *known_namespaces; - -static void scan_namespaces(glite_jp_context_t ctx) -{ - int i,j,k; - glite_jpps_fplug_data_t *pd; - - if (!ctx->plugins) return; - - for (i=0; ctx->plugins[i]; i++) { - pd = ctx->plugins[i]; - - if (pd->namespaces){ - for (j=0; pd->namespaces[j]; j++) { - for (k=0; known_namespaces && known_namespaces[k].namespace - && strcmp(pd->namespaces[j],known_namespaces[k].namespace); k++) {}; - - if (known_namespaces && known_namespaces[k].namespace) { - printf("Adding new plugin into namespace %s\n", known_namespaces[k].namespace); - known_namespaces[k].plugins = realloc(known_namespaces[k].plugins, - (known_namespaces[k].nplugins + 2) * sizeof(glite_jpps_fplug_data_t *)); - known_namespaces[k].plugins[known_namespaces[k].nplugins++] = pd; - known_namespaces[k].plugins[known_namespaces[k].nplugins] = NULL; - known_namespaces[k].namespace = pd->namespaces[j]; - } - else { - printf("Adding new namespace %s\n", pd->namespaces[j]); - known_namespaces = realloc(known_namespaces,(k+2) * sizeof *known_namespaces); - known_namespaces[k].plugins = malloc(2 * sizeof(glite_jpps_fplug_data_t *)); - known_namespaces[k].plugins[0] = pd; - known_namespaces[k].plugins[1] = NULL; - known_namespaces[k].nplugins = 1; - known_namespaces[k].namespace = pd->namespaces[j]; - memset(known_namespaces+k+1,0,sizeof *known_namespaces); - } - } - } - } -} - -static int merge_attrvals(glite_jp_attrval_t **out,int nout,const glite_jp_attrval_t *in) -{ - int nin; - - if (!in) return nout; - - for (nin=0; in[nin].name; nin++); - *out = realloc(*out,(nout+nin+1) * sizeof **out); - memcpy(*out + nout,in,(nin+1) * sizeof **out); - memset(*out + nout+nin, 0, sizeof **out); - return nout+nin; -} - -void process_files(glite_jp_context_t ctx, const char *job, glite_jp_attrval_t** out, int* nout, const char* attr, const glite_jpps_fplug_data_t* plugin, const char* class, const char* uri){ - void *ph, *beh; - char** names = NULL; - int nnames; - int n; - glite_jp_error_t *keep_err = NULL; - - nnames = glite_jppsbe_get_names(ctx, job, class, &names); - - for (n = 0; n < nnames; n++) - if (! glite_jppsbe_open_file(ctx,job,class, names[n], O_RDONLY, &beh)) { - if (!plugin->ops.open(plugin->fpctx,beh,uri,&ph)) { - glite_jp_attrval_t* myattr; - // XXX: ignore errors - if (!plugin->ops.attr(plugin->fpctx,ph,attr,&myattr) && myattr) { - int k; - for (k=0; myattr[k].name; k++) { - myattr[k].origin = GLITE_JP_ATTR_ORIG_FILE; - if (!myattr[k].origin_detail) - trio_asprintf(&myattr[k].origin_detail,"%s %s", uri, names[n] ? names[n] : ""); - } - *nout = merge_attrvals(out,*nout,myattr); - free(myattr); - } - keep_err = ctx->error; ctx->error = NULL; - plugin->ops.close(plugin->fpctx, ph); - if (keep_err) { ctx->error = keep_err; keep_err = NULL; } - } - keep_err = ctx->error; ctx->error = NULL; - glite_jppsbe_close_file(ctx,beh); - if (keep_err) { ctx->error = keep_err; keep_err = NULL; } - } -} - -int glite_jpps_get_attrs(glite_jp_context_t ctx,const char *job,char **attr,int nattr,glite_jp_attrval_t **attrs_out) -{ - glite_jp_attrval_t *meta = NULL,*out = NULL,*tag_out = NULL; - char const **other = NULL; - int i,j,nmeta,nother,err = 0,nout = 0; - - nmeta = nother = 0; - glite_jp_clear_error(ctx); - -/* sort the queried attributes to backend metadata and others -- retrived by plugins - * XXX: assumes unique values for metadata. - */ - for (i=0; iclasses[l]; l++) - process_files(ctx, job, &out, &nout, other[i], known_namespaces[j].plugins[k] - , known_namespaces[j].plugins[k]->classes[l] - , known_namespaces[j].plugins[k]->uris[l]); - break; - } - free(attr_namespace); - } - } - - nout = merge_attrvals(&out,nout,meta); - - free(meta); meta = NULL; - - for (i = 0; i < nout; i++) - printf("%s\n", out[i].value); - - if (nout) { - *attrs_out = out; - err = 0; - } - else { - glite_jp_error_t e; - e.code = ENOENT; - e.source = __FUNCTION__; - e.desc = "no attributes found"; - err = glite_jp_stack_error(ctx,&e); - } - -cleanup: - if (meta) for (i=0; i -#include -#include -#include - -#include "glite/jp/types.h" -#include "glite/jp/context.h" - -#include "jpps_H.h" -#include "jptype_map.h" - -int glite_jpps_authz(glite_jp_context_t ctx,int op,const char *job,const char *owner) -{ - glite_jp_error_t err; - char buf[200]; - int i; - - memset(&err,0,sizeof err); - glite_jp_clear_error(ctx); - err.source = __FUNCTION__; - err.code = EPERM; - - switch (op) { - case SOAP_TYPE___jpsrv__RegisterJob: - case SOAP_TYPE___jpsrv__StartUpload: - case SOAP_TYPE___jpsrv__CommitUpload: - for (i=0; ctx->trusted_peers && ctx->trusted_peers[i]; i++) - if (!strcmp(ctx->trusted_peers[i],ctx->peer)) return 0; - err.desc = "you are not a trusted peer"; - return glite_jp_stack_error(ctx,&err); - - case SOAP_TYPE___jpsrv__GetJobFiles: - case SOAP_TYPE___jpsrv__GetJobAttributes: - case SOAP_TYPE___jpsrv__RecordTag: - assert(owner); - if (!ctx->noauth && strcmp(owner,ctx->peer)) { - err.desc = "you are not a job owner"; - glite_jp_stack_error(ctx,&err); - return 1; - } - return 0; - break; - - default: - snprintf(buf,sizeof buf,"%d: unknown operation",op); - err.desc = buf; - err.code = EINVAL; - return glite_jp_stack_error(ctx,&err); - } -} - -int glite_jpps_readauth(glite_jp_context_t ctx,const char *file) -{ - FILE *f = fopen(file,"r"); - glite_jp_error_t err; - int cnt = 0; - - glite_jp_clear_error(ctx); - memset(&err,0,sizeof err); - err.source = __FUNCTION__; - if (!f) { - err.code = errno; - err.desc = file; - return glite_jp_stack_error(ctx,&err); - } - - ctx->trusted_peers = NULL; - while (!feof(f)) { - char buf[BUFSIZ]; - - if (fscanf(f,"%[^\n]\n",buf) != 1) { - err.code = EINVAL; - err.desc = file; - fclose(f); - return glite_jp_stack_error(ctx,&err); - } - - ctx->trusted_peers = realloc(ctx->trusted_peers, (cnt+2) * sizeof *ctx->trusted_peers); - ctx->trusted_peers[cnt++] = strdup(buf); - ctx->trusted_peers[cnt] = NULL; - } - fclose(f); - return 0; -} - diff --git a/org.glite.jp.primary/src/authz.h b/org.glite.jp.primary/src/authz.h deleted file mode 100644 index 9451aef..0000000 --- a/org.glite.jp.primary/src/authz.h +++ /dev/null @@ -1,18 +0,0 @@ -/** - * Check authorisation of JPPS operation on job. - * - * \param[in] ctx JP context including peer name & other credentials (VOMS etc.) - * \param[in] op operation, one of SOAP_TYPE___jpsrv__* - * \param[in] job jobid of the job to decide upon - * \param[in] owner current known owner of the job (may be NULL), shortcut to avoid - * unnecessary database query. - * - * \retval 0 OK, operation permitted - * \retval EPERM denied - * \retval other error - */ - -int glite_jpps_authz(glite_jp_context_t ctx,int op,const char *job,const char *owner); - -int glite_jpps_readauth(glite_jp_context_t ctx,const char *file); - diff --git a/org.glite.jp.primary/src/backend.h b/org.glite.jp.primary/src/backend.h deleted file mode 100644 index 91e2ad2..0000000 --- a/org.glite.jp.primary/src/backend.h +++ /dev/null @@ -1,163 +0,0 @@ -#ifndef __GLITE_JP_BACKEND -#define __GLITE_JP_BACKEND - -#include -#include -#include - -#include "feed.h" - -int glite_jppsbe_init( - glite_jp_context_t ctx, - int argc, - char *argv[] -); - -int glite_jppsbe_init_slave( - glite_jp_context_t ctx -); - -int glite_jppsbe_register_job( - glite_jp_context_t ctx, - const char *job, - const char *owner -); - -int glite_jppsbe_start_upload( - glite_jp_context_t ctx, - const char *job, - const char *class, /* must be filesystem-friendly */ - const char *name, /* optional name within the class */ - const char *content_type, - char **destination_out, - time_t *commit_before_inout -); - -int glite_jppsbe_commit_upload( - glite_jp_context_t ctx, - const char *destination -); - -int glite_jppsbe_get_names( - glite_jp_context_t ctx, - const char *job, - const char *class, - char ***names_out -); - -int glite_jppsbe_destination_info( - glite_jp_context_t ctx, - const char *destination, - char **job_out, - char **class_out, - char **name_out -); - -int glite_jppsbe_get_job_url( - glite_jp_context_t ctx, - const char *job, - const char *class, - const char *name, /* optional within class */ - char **url_out -); - -int glite_jppsbe_open_file( - glite_jp_context_t ctx, - const char *job, - const char *class, - const char *name, /* optional within class */ - int mode, - void **handle_out -); - -int glite_jppsbe_close_file( - glite_jp_context_t ctx, - void *handle -); - -int glite_jppsbe_file_attrs( - glite_jp_context_t ctx, - void *handle, - struct stat *buf -); - -int glite_jppsbe_pread( - glite_jp_context_t ctx, - void *handle, - void *buf, - size_t nbytes, - off_t offset, - ssize_t *nbytes_ret -); - -int glite_jppsbe_pwrite( - glite_jp_context_t ctx, - void *handle, - void *buf, - size_t nbytes, - off_t offset -); - -int glite_jppsbe_append( - glite_jp_context_t ctx, - void *handle, - void *buf, - size_t nbytes -); - -int glite_jppsbe_is_metadata( - glite_jp_context_t ctx, - const char *attr -); - -int glite_jppsbe_get_job_metadata( - glite_jp_context_t ctx, - const char *job, - glite_jp_attrval_t attrs_inout[] -); - -int glite_jppsbe_query( - glite_jp_context_t ctx, - const glite_jp_query_rec_t query[], - char *attrs[], - void *arg, - int (*callback)( - glite_jp_context_t ctx, - const char *job, - const glite_jp_attrval_t metadata[], - void *arg - ) -); - -/** mark the job as sent to this feed */ -int glite_jppsbe_set_fed( - glite_jp_context_t ctx, - const char *feed, - const char *job -); - -/** check whether the job has been already sent to this feed */ -int glite_jppsbe_check_fed( - glite_jp_context_t ctx, - const char *feed, - const char *job, - int *result -); - -/** store the feed to database */ -int glite_jppsbe_store_feed( - glite_jp_context_t ctx, - struct jpfeed *feed -); - -/** purge expired feeds */ -int glite_jppsbe_purge_feeds( - glite_jp_context_t ctx -); - -/** read stored feed into context */ -int glite_jppsbe_read_feeds( - glite_jp_context_t ctx -); - -#endif diff --git a/org.glite.jp.primary/src/bones_server.c b/org.glite.jp.primary/src/bones_server.c deleted file mode 100644 index 49d87ad..0000000 --- a/org.glite.jp.primary/src/bones_server.c +++ /dev/null @@ -1,422 +0,0 @@ -#include -#include -#include -#include - -#include "glite/jp/types.h" -#include "glite/jp/context.h" - -#include "glite/lb/srvbones.h" -#include "glite/security/glite_gss.h" - -#include -#include "glite/security/glite_gsplugin.h" - -#include "feed.h" -#include "backend.h" -#include "file_plugin.h" - -#include "soap_version.h" -#include "jpps_H.h" - -#define CONN_QUEUE 20 - -extern SOAP_NMAC struct Namespace jpis__namespaces[],jpps__namespaces[]; - -static int newconn(int,struct timeval *,void *); -static int request(int,struct timeval *,void *); -static int reject(int); -static int disconn(int,struct timeval *,void *); -static int data_init(void **data); - -static struct glite_srvbones_service stab = { - "JP Primary Storage", -1, newconn, request, reject, disconn -}; - -static time_t cert_mtime; -char *server_cert, *server_key, *cadir; -gss_cred_id_t mycred = GSS_C_NO_CREDENTIAL; -static char *mysubj; - -static char *port = "8901"; -static int debug = 0; - -static glite_jp_context_t ctx; - -static int call_opts(glite_jp_context_t,char *,char *,int (*)(glite_jp_context_t,int,char **)); - -const char *glite_jp_default_namespace; - -pid_t master; - -int main(int argc, char *argv[]) -{ - int one = 1,opt,i; - edg_wll_GssStatus gss_code; - struct sockaddr_in a; - char *b_argv[20] = { "backend" },*p_argv[20] = { "plugins" },*com; - int b_argc,p_argc; - char buf[1000]; - int slaves = 10; - char *logfile = "/dev/null"; - char pidfile[PATH_MAX] = "/var/run/glite-jp-primarystoraged.pid"; - FILE *fpid; - - glite_jp_init_context(&ctx); - globus_libc_gethostname(buf,sizeof buf); - buf[999] = 0; - ctx->myURL = buf; - - if (geteuid()) snprintf(pidfile,sizeof pidfile,"%s/glite-jp-primarystoraged.pid",getenv("HOME")); - - b_argc = p_argc = 1; - - while ((opt = getopt(argc,argv,"B:P:a:p:s:dl:i:c:k:n")) != EOF) switch (opt) { - case 'B': - assert(b_argc < 20); - if (com = strchr(optarg,',')) *com = 0; - - /* XXX: memleak -- who cares for once */ - asprintf(&b_argv[b_argc++],"-%s",optarg); - if (com) b_argv[b_argc++] = com+1; - - break; - case 'P': - assert(p_argc < 20); - p_argv[p_argc++] = optarg; - - break; - case 'a': - if (glite_jpps_readauth(ctx,optarg)) { - fprintf(stderr,"%s: %s\n",argv[0],glite_jp_error_chain(ctx)); - exit (1); - } - break; - case 'p': - port = optarg; - break; - case 'd': debug = 1; break; - case 's': slaves = atoi(optarg); - if (slaves <= 0) { - fprintf(stderr,"%s: -s %s: invalid number\n",argv[0],optarg); - exit(1); - } - break; - case 'l': logfile = optarg; break; - case 'i': strncpy(pidfile,optarg,PATH_MAX); pidfile[PATH_MAX-1] = 0; break; - case 'c': server_cert = optarg; break; - case 'k': server_key = optarg; break; - case 'n': ctx->noauth = 1; break; - case '?': fprintf(stderr,"usage: %s: -Bb,val ... -Pplugin.so ...\n" - "b is backend option\n",argv[0]); - exit (1); - } - - if (b_argc == 1) { - fputs("-B required\n",stderr); - exit (1); - } - - optind = 0; /* XXX: getopt used internally */ - if (glite_jppsbe_init(ctx,b_argc,b_argv)) { - fputs(glite_jp_error_chain(ctx), stderr); - exit(1); - } - - optind = 0; /* XXX: getopt used internally */ - if (b_argc > 1 && glite_jpps_fplug_load(ctx,p_argc,p_argv)) { - fputs(glite_jp_error_chain(ctx), stderr); - exit(1); - } - - srand48(time(NULL)); /* feed id generation */ - -#if GSOAP_VERSION <= 20602 - for (i=0; jpps__namespaces[i].id && strcmp(jpps__namespaces[i].id,"ns1"); i++); -#else - for (i=0; jpps__namespaces[i].id && strcmp(jpps__namespaces[i].id,"jpsrv"); i++); -#endif - assert(jpps__namespaces[i].id); - glite_jp_default_namespace = jpps__namespaces[i].ns; - - stab.conn = socket(PF_INET, SOCK_STREAM, 0); - if (stab.conn < 0) { - perror("socket"); - return 1; - } - - setsockopt(stab.conn,SOL_SOCKET, SO_REUSEADDR, &one, sizeof(one)); - - a.sin_family = AF_INET; - a.sin_addr.s_addr = INADDR_ANY; - a.sin_port = htons(atoi(port)); - if (bind(stab.conn,(struct sockaddr *) &a, sizeof(a)) ) { - char buf[200]; - - snprintf(buf,sizeof(buf),"bind(%d)",atoi(port)); - perror(buf); - return 1; - } - - if (listen(stab.conn,CONN_QUEUE)) { - perror("listen()"); - return 1; - } - - if (!server_cert || !server_key) - fprintf(stderr, "%s: WARNING: key or certificate file not specified, " - "can't watch them for changes\n", - argv[0]); - - if ( cadir ) setenv("X509_CERT_DIR", cadir, 1); - edg_wll_gss_watch_creds(server_cert, &cert_mtime); - - if ( !edg_wll_gss_acquire_cred_gsi(server_cert, server_key, &mycred, &mysubj, &gss_code)) - fprintf(stderr,"Server idenity: %s\n",mysubj); - else fputs("WARNING: Running unauthenticated\n",stderr); - - /* XXX: daemonise */ - - if (!debug) { - int lfd = open(logfile,O_CREAT|O_TRUNC|O_WRONLY,0600); - if (lfd < 0) { - fprintf(stderr,"%s: %s: %s\n",argv[0],logfile,strerror(errno)); - exit(1); - } - daemon(0,1); - dup2(lfd,1); - dup2(lfd,2); - } - - setpgrp(); /* needs for signalling */ - master = getpid(); - fpid = fopen(pidfile,"r"); - if ( fpid ) - { - int opid = -1; - - if ( fscanf(fpid,"%d",&opid) == 1 ) - { - if ( !kill(opid,0) ) - { - fprintf(stderr,"%s: another instance running, pid = %d\n",argv[0],opid); - return 1; - } - else if (errno != ESRCH) { perror("kill()"); return 1; } - } - fclose(fpid); - } else if (errno != ENOENT) { perror(pidfile); return 1; } - - fpid = fopen(pidfile, "w"); - if (!fpid) { perror(pidfile); return 1; } - fprintf(fpid, "%d", getpid()); - fclose(fpid); - - glite_srvbones_set_param(GLITE_SBPARAM_SLAVES_COUNT,slaves); - glite_srvbones_run(data_init,&stab,1 /* XXX: entries in stab */,debug); - - return 0; -} - -static int data_init(void **data) -{ - *data = (void *) soap_new(); - - printf("[%d] slave started\n",getpid()); - glite_jpps_srv_init(ctx); - glite_jppsbe_init_slave(ctx); /* XXX: global but slave's */ - //sleep(10); - if (glite_jppsbe_purge_feeds(ctx) || /* XXX: is there a better place for the call? */ - glite_jppsbe_read_feeds(ctx)) fputs(glite_jp_error_chain(ctx),stderr); - printf("[%d] slave init done\n",getpid()); - - return 0; -} - -static int newconn(int conn,struct timeval *to,void *data) -{ - struct soap *soap = (struct soap *) data; - glite_gsplugin_Context plugin_ctx; - - gss_cred_id_t newcred = GSS_C_NO_CREDENTIAL; - edg_wll_GssStatus gss_code; - gss_name_t client_name = GSS_C_NO_NAME; - gss_buffer_desc token = GSS_C_EMPTY_BUFFER; - OM_uint32 maj_stat,min_stat; - - - int ret = 0; - - soap_init2(soap,SOAP_IO_KEEPALIVE,SOAP_IO_KEEPALIVE); - soap_set_omode(soap, SOAP_IO_BUFFER); // set buffered response - // buffer set to SOAP_BUFLEN (default = 8k) - - soap_set_namespaces(soap,jpps__namespaces); - soap->user = (void *) ctx; /* XXX: one instance per slave */ - - glite_gsplugin_init_context(&plugin_ctx); - plugin_ctx->connection = calloc(1,sizeof *plugin_ctx->connection); - - switch (edg_wll_gss_watch_creds(server_cert,&cert_mtime)) { - case 0: break; - case 1: if (!edg_wll_gss_acquire_cred_gsi(server_cert,server_key, - &newcred,NULL,&gss_code)) - { - - printf("[%d] reloading credentials\n",getpid()); /* XXX: log */ - gss_release_cred(&min_stat,&mycred); - mycred = newcred; - - /* drop it too, it is recreated and reloads creds when necessary */ - if (ctx->other_soap) { - soap_end(ctx->other_soap); - soap_free(ctx->other_soap); - ctx->other_soap = NULL; - } - } - break; - case -1: - printf("[%d] edg_wll_gss_watch_creds failed\n", getpid()); /* XXX: log */ - break; - } - - /* TODO: DNS paranoia etc. */ - - if (edg_wll_gss_accept(mycred,conn,to,plugin_ctx->connection,&gss_code)) { - char *et; - - edg_wll_gss_get_error(&gss_code,"",&et); - - fprintf(stderr,"[%d] GSS connection accept failed: %s\nClosing connection.\n",getpid(),et); - free(et); - ret = 1; - goto cleanup; - } - - maj_stat = gss_inquire_context(&min_stat,plugin_ctx->connection->context, - &client_name, NULL, NULL, NULL, NULL, NULL, NULL); - - if (!GSS_ERROR(maj_stat)) - maj_stat = gss_display_name(&min_stat,client_name,&token,NULL); - - if (ctx->peer) free(ctx->peer); - if (!GSS_ERROR(maj_stat)) { - printf("[%d] client DN: %s\n",getpid(),(char *) token.value); /* XXX: log */ - - ctx->peer = strdup(token.value); - memset(&token, 0, sizeof(token)); - } - else { - printf("[%d] annonymous client\n",getpid()); - ctx->peer = NULL; - } - - if (client_name != GSS_C_NO_NAME) gss_release_name(&min_stat, &client_name); - if (token.value) gss_release_buffer(&min_stat, &token); - - soap_register_plugin_arg(soap,glite_gsplugin,plugin_ctx); - return 0; - -cleanup: - glite_gsplugin_free_context(plugin_ctx); plugin_ctx = NULL; - soap_end(soap); - - return ret; -} - -static int request(int conn,struct timeval *to,void *data) -{ - struct soap *soap = data; - glite_jp_context_t ctx = soap->user; - - glite_gsplugin_set_timeout(glite_gsplugin_get_context(soap),to); - - soap->max_keep_alive = 1; /* XXX: prevent gsoap to close connection */ - soap_begin(soap); - if (soap_begin_recv(soap)) { - if (soap->error < SOAP_STOP) { - soap_send_fault(soap); - return EIO; - } - return ENOTCONN; - } - - soap->keep_alive = 1; - if (soap_envelope_begin_in(soap) - || soap_recv_header(soap) - || soap_body_begin_in(soap) - || jpps__serve_request(soap) -#if GSOAP_VERSION >= 20700 - || (soap->fserveloop && soap->fserveloop(soap)) -#endif - ) - { - soap_send_fault(soap); // sets soap->keep_alive back to 0 :( - // and closes connection - if (ctx->error) { - /* XXX: shall we die on some errors? */ - int err = ctx->error->code; - glite_jp_clear_error(ctx); - return err; - } - return ECANCELED; // let srv_bones know something is wrong - } -//printf("Ja cekam %d\n", getpid()); -//sleep(10); - if (glite_jp_run_deferred(ctx)) { - char *e; - fprintf(stderr,"[%d] %s\n",getpid(),e = glite_jp_error_chain(ctx)); - free(e); - } - return ENOTCONN; -} - -static int reject(int conn) -{ - int flags = fcntl(conn, F_GETFL, 0); - - fcntl(conn,F_SETFL,flags | O_NONBLOCK); - edg_wll_gss_reject(conn); - - return 0; -} - -static int disconn(int conn,struct timeval *to,void *data) -{ - struct soap *soap = (struct soap *) data; - glite_jp_context_t ctx = soap->user; - - soap_end(soap); // clean up everything and close socket - if (ctx->other_soap) { - soap_end(ctx->other_soap); - soap_free(ctx->other_soap); - ctx->other_soap = NULL; - } - - return 0; -} - -#define WSPACE "\t\n " - -static int call_opts(glite_jp_context_t ctx,char *opt,char *name,int (*f)(glite_jp_context_t,int,char **)) -{ - int ac = 1,ret,my_optind; - char **av = malloc(sizeof *av),*ap; - - *av = name; - for (ap = strtok(opt,WSPACE); ap; ap = strtok(NULL,WSPACE)) { - av = realloc(av,(ac+1) * sizeof *av); - av[ac++] = ap; - } - - my_optind = optind; - optind = 0; - ret = f(ctx,ac,av); - optind = my_optind; - free(av); - return ret; -} - - -/* XXX: we don't use it */ -SOAP_NMAC struct Namespace namespaces[] = { {NULL,NULL} }; diff --git a/org.glite.jp.primary/src/builtin_plugins.h b/org.glite.jp.primary/src/builtin_plugins.h deleted file mode 100644 index 70d900b..0000000 --- a/org.glite.jp.primary/src/builtin_plugins.h +++ /dev/null @@ -1,8 +0,0 @@ - -#define GLITE_JP_FILETYPE_TAGS "urn:org.glite.jp.primary:tags" -#define GLITE_JP_FILETYPE_LB "urn:org.glite.jp.primary:lb" -#define GLITE_JP_FILETYPE_CLASSAD "urn:org.glite.jp.primary:classad" -#define GLITE_JP_FILETYPE_ISB "urn:org.glite.jp.primary:isb" -#define GLITE_JP_FILETYPE_OSB "urn:org.glite.jp.primary:osb" - -#define GLITE_JP_FPLUG_TAGS_APPEND 0 diff --git a/org.glite.jp.primary/src/classad_plugin.c b/org.glite.jp.primary/src/classad_plugin.c deleted file mode 100644 index 6bd8328..0000000 --- a/org.glite.jp.primary/src/classad_plugin.c +++ /dev/null @@ -1,210 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include - -/* -#include "glite/lb/context.h" -#include "glite/lb/jobstat.h" -#include "glite/lb/events.h" -#include "glite/lb/events_parse.h" -#include "glite/lb/trio.h" -*/ -#include "glite/jp/types.h" -#include "glite/jp/context.h" -#include "glite/jp/attr.h" -#include "glite/jp/known_attr.h" - -#include "file_plugin.h" -#include "builtin_plugins.h" -#include "backend.h" - -//#define INITIAL_NUMBER_EVENTS 100 -//#define INITIAL_NUMBER_STATES EDG_WLL_NUMBER_OF_STATCODES -//#define LB_PLUGIN_NAMESPACE "urn:org.glite.lb" - -//extern int processEvent(intJobStat *, edg_wll_Event *, int, int, char **); - - -typedef struct _classad_handle{ - char* data; - struct cclassad* ad; - time_t timestamp; -} classad_handle; - -static int classad_query(void *fpctx, void *handle, const char *attr, glite_jp_attrval_t **attrval); -static int classad_open(void *fpctx, void *bhandle, const char *uri, void **handle); -static int classad_open_str(void *fpctx, const char *str, const char *uri, const char *ns, void **handle); -static int classad_close(void *fpctx, void *handle); -static int classad_filecom(void *fpctx, void *handle); - -int init(glite_jp_context_t ctx, glite_jpps_fplug_data_t *data) { - data->fpctx = ctx; - - data->uris = calloc(2,sizeof *data->uris); - data->uris[0] = strdup(GLITE_JP_FILETYPE_CLASSAD); - - data->classes = calloc(2,sizeof *data->classes); - data->classes[0] = strdup("classad"); - - data->namespaces = calloc(2, sizeof *data->namespaces); - data->namespaces[0] = strdup(GLITE_JP_JDL_NS); - - data->ops.open = classad_open; - data->ops.close = classad_close; - data->ops.attr = classad_query; - data->ops.open_str = classad_open_str; - data->ops.filecom = classad_filecom; - -#ifdef PLUGIN_DEBUG - fprintf(stderr,"classad_plugin: init OK\n"); -#endif - - return 0; -} - - -void done(glite_jp_context_t ctx, glite_jpps_fplug_data_t *data) { - free(data->uris[0]); - free(data->classes[0]); - free(data->uris); - free(data->classes); - memset(data, 0, sizeof(*data)); -} - - -static int classad_open(void *fpctx, void *bhandle, const char *uri, void **handle) { - glite_jp_context_t ctx = (glite_jp_context_t) fpctx; - glite_jp_error_t err; - classad_handle* h; - void* fh; - int retval = 0; - - glite_jp_clear_error(ctx); - h = calloc(1, sizeof(classad_handle)); - h->data = NULL; - struct stat fattr; - glite_jppsbe_file_attrs(ctx, bhandle, &fattr); - h->timestamp = fattr.st_mtime; - - // read the classad file - char buf[1024]; - size_t nbytes; - off_t offset = 0; - - do{ - if (! (retval = glite_jppsbe_pread(ctx, bhandle, buf, sizeof buf, offset, &nbytes))){ - h->data = realloc(h->data, offset + nbytes); - memcpy(h->data + offset, buf, nbytes); - offset += nbytes; - } - else - goto fail; - }while(nbytes); - - h->ad = cclassad_create(h->data); - -#ifdef PLUGIN_DEBUG - fprintf(stderr,"classad_plugin: opened\n"); -#endif - - *handle = h; - - return 0; - -fail: - err.code = EIO; - err.desc = NULL; - err.source = __FUNCTION__; - glite_jp_stack_error(ctx,&err); - - return retval; -} - -static int classad_open_str(void *fpctx,const char *str,const char *uri,const char *ns,void **handle){ - classad_handle* h; - - h = calloc(1, sizeof(classad_handle)); - h->data = strdup(str); - h->ad = cclassad_create(h->data); - h->timestamp = 0; - -#ifdef PLUGIN_DEBUG - fprintf(stderr,"classad_plugin: opened\n"); -#endif - - *handle = h; - - return 0; - -} - -static int classad_close(void *fpctx,void *handle) { - classad_handle *h = (classad_handle *) handle; - - cclassad_delete(h->ad); - free(h->data); - free(h); - -#ifdef PLUGIN_DEBUG - fprintf(stderr,"classad plugin: close OK\n"); -#endif - return 0; -} - - -static int classad_query(void *fpctx,void *handle, const char *attr,glite_jp_attrval_t **attrval) { - glite_jp_context_t ctx = (glite_jp_context_t) fpctx; - glite_jp_error_t err; - glite_jp_attrval_t *av = NULL; - classad_handle* h = (classad_handle*)handle; - - glite_jp_clear_error(ctx); - memset(&err,0,sizeof err); - err.source = __FUNCTION__; - - char *str = NULL; - - if (! h->ad){ - err.code = ENOENT; - err.desc = strdup("Classad plugin: No classad string, cannot get attr!"); - *attrval = NULL; - printf("Exiting classat_query...\n"); - return glite_jp_stack_error(ctx,&err); - } - - if (cclassad_evaluate_to_string(h->ad, strrchr(attr, ':')+1, &str)) { - //struct stat fattr; - /*XXX ignore error */ - //glite_jppsbe_file_attrs(ctx, h->bhandle, &fattr); - av = calloc(2, sizeof(glite_jp_attrval_t)); - av[0].name = strdup(attr); - av[0].value = strdup(str); - av[0].size = -1; - av[0].timestamp = h->timestamp; - av[0].origin = GLITE_JP_ATTR_ORIG_FILE; - } - else{ - printf("Classad plugin: bad attr!\n"); - } - - if (str) free(str); - - *attrval = av; - - if (av) - return 0; - else{ - err.code = ENOENT; - err.desc = attr; - return glite_jp_stack_error(ctx,&err); - } -} - -static int classad_filecom(void *fpctx, void *handle){ - return -1; -} - diff --git a/org.glite.jp.primary/src/db.h b/org.glite.jp.primary/src/db.h deleted file mode 100644 index 0b9f730..0000000 --- a/org.glite.jp.primary/src/db.h +++ /dev/null @@ -1,83 +0,0 @@ -#ifndef _DB_H -#define _DB_H - -#ident "$Header$" - -#include -#include - -#ifdef __cplusplus -extern "C" { -#endif - - -typedef struct _glite_jp_db_stmt_t *glite_jp_db_stmt_t; - -int glite_jp_db_connect( - glite_jp_context_t, /* INOUT: */ - char * /* IN: connect string user/password@host:database */ -); - -void glite_jp_db_close(glite_jp_context_t); - - -/* Parse and execute SQL statement. Returns number of rows selected, created - * or affected by update, or -1 on error */ - -int glite_jp_db_execstmt( - glite_jp_context_t, /* INOUT: */ - char *, /* IN: SQL statement */ - glite_jp_db_stmt_t * /* OUT: statement handle. Usable for - select only */ -); - - -/* Fetch next row of select statement. - * All columns are returned as fresh allocated strings - * - * return values: - * >0 - number of fields of the retrieved row - * 0 - no more rows - * -1 - error - * - * Errors are stored in context passed to previous glite_jp_db_execstmt() */ - -int glite_jp_db_fetchrow( - glite_jp_db_stmt_t, /* IN: statement */ - char ** /* OUT: array of fetched values. - * As number of columns is fixed and known, - * expects allocated array of pointers here */ -); - -/* Retrieve column names of a query statement */ - -int glite_jp_db_querycolumns( - glite_jp_db_stmt_t, /* IN: statement */ - char ** /* OUT: result set column names. Expects allocated array. */ -); - -/* Free the statement structure */ - -void glite_jp_db_freestmt( - glite_jp_db_stmt_t * /* INOUT: statement */ -); - - -/* convert time_t into database-specific time string - * returns pointer to static area that is changed by subsequent calls */ - -char *glite_jp_db_timetodb(time_t); -time_t glite_jp_db_dbtotime(char *); - - -/** - * Check database version. - */ -int glite_jp_db_dbcheckversion(glite_jp_context_t); - - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/org.glite.jp.primary/src/feed.c b/org.glite.jp.primary/src/feed.c deleted file mode 100644 index 6e59a2c..0000000 --- a/org.glite.jp.primary/src/feed.c +++ /dev/null @@ -1,712 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include -#include - -#include "glite/jp/types.h" -#include "glite/jp/context.h" -#include "glite/jp/strmd5.h" -#include "glite/jp/known_attr.h" -#include "feed.h" -#include "file_plugin.h" -#include "builtin_plugins.h" -#include "is_client.h" -#include "backend.h" - -extern pid_t master; - -/* - * seconds before feed expires: should be - * XXX: should be configurable, default for real deployment sort of 1 hour - */ -#define FEED_TTL 36000000 - -/* XXX: configurable */ -#define BATCH_FEED_SIZE 200 - -static int check_qry_item( - glite_jp_context_t ctx, - const glite_jp_query_rec_t *qry, - const glite_jp_attrval_t *attr -) -{ - int cmp,cmp2; - long scmp,ucmp; - glite_jp_attrval_t qattr; - - if (strcmp(qry->attr,attr->name)) return 0; - - if (qry->origin != GLITE_JP_ATTR_ORIG_ANY && qry->origin != attr->origin) return 0; - - memset(&qattr,0,sizeof qattr); - qattr.name = qry->attr; - qattr.value = qry->value; - qattr.binary = qry->binary; - qattr.size = qry->size; - qattr.origin = qry->origin; - - /* XXX: don't assert */ - assert(glite_jp_attrval_cmp(ctx,attr,&qattr,&cmp) == 0); - - switch (qry->op) { - case GLITE_JP_QUERYOP_EQUAL: return !cmp; - case GLITE_JP_QUERYOP_UNEQUAL: return cmp; - case GLITE_JP_QUERYOP_LESS: return cmp < 0; - case GLITE_JP_QUERYOP_GREATER: return cmp > 0; - - case GLITE_JP_QUERYOP_WITHIN: - qattr.value = qry->value2; - qattr.size = qry->size2; - /* XXX: assert */ - assert(glite_jp_attrval_cmp(ctx,attr,&qattr,&cmp2) == 0); - return cmp >= 0 && cmp2 <= 0; - } -} - -/* retrieve all attributes for a feed */ -int full_feed( - glite_jp_context_t ctx, - const struct jpfeed *feed, - const char *job, - glite_jp_attrval_t **attrs) -{ - int i,ret,no_owner = 1; - char **ma = NULL; - - for (i=0; feed->attrs[i]; i++) - if (!strcmp(feed->attrs[i],GLITE_JP_ATTR_OWNER)) no_owner = 0; - - if (no_owner) { - ma = malloc((i+2) * sizeof *ma); - ma[0] = GLITE_JP_ATTR_OWNER; - memcpy(ma+1,feed->attrs,(i+1) * sizeof *ma); - } - ret = glite_jpps_get_attrs(ctx,job, - no_owner ? ma : feed->attrs, - i+no_owner,attrs); - free(ma); - return ret; -} - -/* XXX: limit on query size -- I'm lazy to malloc() */ -#define QUERY_MAX 100 - -static int match_feed( - glite_jp_context_t ctx, - const struct jpfeed *feed, - const char *job, - -/* XXX: not checked for correctness, - assuming single occurence only */ - const glite_jp_attrval_t attrs[] -) -{ - int i,fed,ret = 0; - int qi[QUERY_MAX]; - char *owner = NULL; - glite_jp_attrval_t meta[QUERY_MAX+1]; - glite_jp_attrval_t *newattr = NULL; - - glite_jp_clear_error(ctx); - memset(meta,0,sizeof meta); - - if (feed->qry) { - int j,complete = 1; - - memset(qi,0,sizeof qi); - for (i=0; feed->qry[i].attr; i++) { - int sat = 0; - assert(iqry[i].attr)) { - if (check_qry_item(ctx,feed->qry+i,attrs+j)) { - qi[i] = 1; - sat = 1; /* matched, needn't loop further */ - } - else return 0; /* can't be satisfied either */ - } - - if (!sat) complete = 0; - } - - /* not all attributes in query are known from input - * we have to retrieve job metadata from the backend - * - * XXX: It is not optimal to retrieve it here without sharing - * over multiple invocations of match_feed() for the same job. - */ - if (!complete) { - int qi2[QUERY_MAX]; - - memset(meta,0,sizeof meta); - j=0; - for (i=0; feed->qry[i].attr; i++) if (!qi[i]) { - assert(jqry[i].attr); - qi2[j] = i; - j++; - } - - if (glite_jppsbe_get_job_metadata(ctx,job,meta)) { - glite_jp_error_t err; - - memset(&err,0,sizeof err); - err.code = EIO; - err.source = __FUNCTION__; - err.desc = "complete query"; - ret = glite_jp_stack_error(ctx,&err); - goto cleanup; - } - - for (i=0; meta[i].name; i++) { - if (!check_qry_item(ctx,feed->qry+qi2[i],meta+i)) { - ret = 0; - goto cleanup; - } - if (!strcmp(meta[i].name,GLITE_JP_ATTR_OWNER)) owner = meta[i].value; - } - } - } - - /* matched completely */ - glite_jppsbe_check_fed(ctx,feed->id,job,&fed); - if (!fed) { - glite_jp_attrval_t *a; - full_feed(ctx,feed,job,&a); - for (i=0; a[i].name && strcmp(a[i].name,GLITE_JP_ATTR_OWNER); i++); - owner = a[i].value; - - /* XXX: better error handling ? */ - if (!glite_jpps_single_feed(ctx,feed->id,0,feed->destination,job,owner,a)) - glite_jppsbe_set_fed(ctx,feed->id,job); /* XXX: on error? */ - - for (i=0; a[i].name; i++) glite_jp_attrval_free(a+i,0); - free(a); - } - else { - if (!owner) { - glite_jppsbe_get_job_metadata(ctx,job,meta); - for (i=0; meta[i].name && strcmp(meta[i].name,GLITE_JP_ATTR_OWNER); i++); - } - glite_jpps_single_feed(ctx,feed->id,0,feed->destination,job,owner,attrs); - } - -cleanup: - for (i=0; meta[i].name; i++) glite_jp_attrval_free(meta+i,0); - return ret; -} - -/* TODO: overit, ze do dalsich atributu se leze az kdyz matchuji metadata - * kdyby ne, stejne se to nepovede ; - * totez pro match_file */ - -int glite_jpps_match_attr( - glite_jp_context_t ctx, - const char *job, - const glite_jp_attrval_t attrs[] -) -{ - struct jpfeed *f = (struct jpfeed *) ctx->feeds; - int i,j,doit; - - for (;f; f = f->next) { - doit = 0; - - for (i=0; !doit && f->attrs[i]; i++) - for (j=0; !doit && attrs[j].name; j++) - if (!strcmp(f->attrs[i],attrs[j].name)) doit = 1; - - /* XXX: ignore any errors */ - if (doit) match_feed(ctx,f,job,attrs); - } - - return glite_jp_clear_error(ctx); -} - -static int attr_void_cmp(const void *a, const void *b) -{ - char const * const *ca = (char const * const *) a; - char const * const *cb = (char const * const *) b; - return strcmp(*ca,*cb); -} - -static void attr_union(char **a, char **b, char ***c) -{ - int ca = 0,cb = 0,cnt,i,j; - char **out; - - if (a) for (ca = 0; a[ca]; ca++); - if (b) for (cb = 0; b[cb]; cb++); - out = malloc((ca+cb+1) * sizeof *out); - if (a) memcpy(out,a,ca * sizeof *out); - if (b) memcpy(out+ca,b,cb * sizeof *out); - out[cnt = ca+cb] = NULL; - qsort(out,cnt,sizeof *out,attr_void_cmp); - - for (i=0; i i+1) memmove(out+i+1,out+j,(cnt-j) * sizeof *out); - cnt -= j-i-1; - } - assert(cnt); - out[cnt] = NULL; - - *c = out; -} - -int glite_jpps_match_file( - glite_jp_context_t ctx, - const char *job, - const char *class, - const char *name -) -{ - glite_jpps_fplug_data_t **pd = NULL; - int pi; - void *bh = NULL; - int ret; - struct jpfeed *f = ctx->feeds; - glite_jp_attrval_t meta[QUERY_MAX+1]; - - int nvals = 0,j,i; - char **attrs = NULL, **attrs2; - glite_jp_attrval_t *vals = NULL,*oneval; - - fprintf(stderr,"%s: %s %s %s\n",__FUNCTION__,job,class,name); - - memset(meta,0,sizeof meta); - meta[0].name = strdup(GLITE_JP_ATTR_OWNER); - glite_jppsbe_get_job_metadata(ctx,job,meta); - - if (!f) return 0; - - switch (glite_jpps_fplug_lookup_byclass(ctx,class,&pd)) { - case ENOENT: return 0; /* XXX: shall we complain? */ - case 0: break; - default: return -1; - } - - - for (;f;f=f->next) { - attr_union(attrs,f->attrs,&attrs2); - free(attrs); - attrs = attrs2; - } - - for (pi=0; pd[pi]; pi++) { - int ci; - for (ci=0; pd[pi]->uris[ci]; ci++) if (!strcmp(pd[pi]->classes[ci],class)) { - void *ph; - - if (!bh && (ret = glite_jppsbe_open_file(ctx,job,pd[pi]->classes[ci],name,O_RDONLY,&bh))) { - free(pd); - return ret; - } - - if (pd[pi]->ops.open(pd[pi]->fpctx,bh,class,&ph)) { - /* XXX: complain more visibly */ - fputs("plugin open failed\n",stderr); - continue; - } - - for (i=0; attrs[i]; i++) - if (!pd[pi]->ops.attr(pd[pi]->fpctx,ph,attrs[i],&oneval)) { - /* XXX: ignore error */ - for (j=0; oneval[j].name; j++); - vals = realloc(vals,(nvals+j+1) * sizeof *vals); - memcpy(vals+nvals,oneval,(j+1) * sizeof *vals); - nvals += j; - free(oneval); - } - - pd[pi]->ops.close(pd[pi]->fpctx,ph); - } - } - - free(attrs); - - if (bh) glite_jppsbe_close_file(ctx,bh); - free(pd); - - for (f = ctx->feeds; f; f=f->next) { - int k,fed; - glite_jp_attrval_t * fattr; - - match_feed(ctx,f,job,vals); - -/* covered by match_feed() - glite_jppsbe_check_fed(ctx,f->id,job,&fed); - if (!fed) full_feed(ctx,f,job,&fattr); - else { - fattr = malloc((nvals+1) * sizeof *fattr); - - j = 0; - for (i=0; iattrs[k]; k++) - if (!strcmp(f->attrs[k],vals[i].name)) - memcpy(fattr+j++,vals+i,sizeof *fattr); - - memset(fattr+j,0,sizeof *fattr); - - } - for (i=0; meta[i].name && strcmp(meta[i].name,GLITE_JP_ATTR_OWNER); i++); - if (!glite_jpps_single_feed(ctx,f->id,0,f->destination,job,meta[i].value,fattr) && !fed) - glite_jppsbe_set_fed(ctx,f->id,job); - - if (!fed) for (i=0; fattr[i].name; i++) glite_jp_attrval_free(fattr+i,0); - free(fattr); -*/ - } - - for (i=0; vals[i].name; i++) glite_jp_attrval_free(vals+i,0); - free(vals); - - for (i=0; meta[i].name; i++) glite_jp_attrval_free(meta+i,0); - - return 0; -} - -static char *generate_feedid(void) -{ - char hname[200],buf[1000]; - - gethostname(hname,sizeof hname); - snprintf(buf,sizeof buf,"%s%d%ld",hname,getpid(),lrand48()); - buf[sizeof buf-1] = 0; - return str2md5base64(buf); -} - -static struct jpfeed *make_jpfeed( - const char *destination, - char const *const *attrs, - const glite_jp_query_rec_t *qry, - char *id, - time_t expires) -{ - int i; - struct jpfeed *f = calloc(1,sizeof *f); - - f->id = id ? strdup(id) : NULL; - f->destination = strdup(destination); - f->expires = expires; - for (i=0; attrs[i]; i++) { - f->attrs = realloc(f->attrs,(i+2) * sizeof *f->attrs); - f->attrs[i] = strdup(attrs[i]); - f->attrs[i+1] = NULL; - } - for (i=0; qry[i].attr; i++) { - f->qry = realloc(f->qry,(i+2) * sizeof *f->qry); - glite_jp_queryrec_copy(f->qry+i,qry+i); - memset(f->qry+i+1,0,sizeof *f->qry); - } - - return f; -} - -void jpfeed_free(struct jpfeed *f) -{ - int i; - - assert(f->njobs == 0); /* XXX: we shouldn't do this */ - - free(f->id); - free(f->destination); - if (f->attrs) { - for (i=0; f->attrs[i]; i++) free(f->attrs[i]); - free(f->attrs); - } - for (i=0; inmeta_attr; i++) free(f->meta_attr[i]); - free(f->meta_attr); - for (i=0; inother_attr; i++) free(f->other_attr[i]); - free(f->other_attr); - - if (f->qry) { - for (i=0; f->qry[i].attr; i++) glite_jp_free_query_rec(f->qry+i); - free(f->qry); - } - - for (i=0; inmeta_qry; i++) glite_jp_free_query_rec(f->meta_qry+i); - free(f->meta_qry); - for (i=0; inother_qry; i++) glite_jp_free_query_rec(f->other_qry+i); - free(f->other_qry); - - /* XXX: no next */ - - free(f); -} - -static void drop_jobs(struct jpfeed *f) -{ - int i,j; - for (i=0; injobs; i++) { - for (j=0; f->job_attrs[i][j].name; j++) - glite_jp_attrval_free(&f->job_attrs[i][j],0); - free(f->job_attrs[i]); - free(f->jobs[i]); - free(f->owners[i]); - } - free(f->job_attrs); f->job_attrs = NULL; - free(f->jobs); f->jobs = NULL; - free(f->owners); f->owners = NULL; - f->njobs = 0; -} - -static int drain_feed(glite_jp_context_t ctx, struct jpfeed *f,int done) -{ - int ret = 0; - glite_jp_clear_error(ctx); - if (f->njobs) { - int i; - ret = glite_jpps_multi_feed(ctx,f->id,done,f->njobs,f->destination,f->jobs,f->owners,f->job_attrs); - - if (!ret && f->continuous) for (i=0; injobs; i++) glite_jppsbe_set_fed(ctx,f->id,f->jobs[i]); - drop_jobs(f); - } - return ret; -} - -static int feed_query_callback( - glite_jp_context_t ctx, - const char *job, - const glite_jp_attrval_t meta[], - void *arg) -{ - int i,j,nout = 0,ec; - glite_jp_error_t err; - struct jpfeed *f = arg; - glite_jp_attrval_t *other = NULL,*out = NULL; - - memset(&err,0,sizeof err); - err.source = __FUNCTION__; - glite_jp_clear_error(ctx); - -/* retrieve other attributes */ - ec = glite_jpps_get_attrs(ctx,job,f->other_attr,f->nother_attr,&other); - switch (ec) { - case 0: break; - case ENOENT: glite_jp_clear_error(ctx); break; - default: - err.code = EIO; - err.desc = "retrieve job attributes"; - glite_jp_stack_error(ctx,&err); - goto cleanup; - } - -/* no attributes known -- can't match */ - if (!other) goto cleanup; - -/* filter on non-meta query items */ - for (i=0; inother_qry; i++) { - for (j=0; other[j].name; j++) - if (check_qry_item(ctx,f->other_qry+i,other+j)) break; - if (!other[j].name) goto cleanup; /* no match is not an error */ - } - -/* extract attributes to be fed, stack the job for a batch feed */ - for (i=0; meta && meta[i].name; i++) - for (j=0; jnmeta_attr; j++) - if (!strcmp(meta[i].name,f->meta_attr[j])) { - out = realloc(out,(nout+2) * sizeof *out); - glite_jp_attrval_copy(out+nout,meta+i); - nout++; - } - - for (i=0; other[i].name; i++) - for (j=0; jint_other_attr; j++) - if (!strcmp(other[i].name,f->other_attr[j])) { - out = realloc(out,(nout+2) * sizeof *out); - glite_jp_attrval_copy(out+nout,other+i); - nout++; - } - - if (nout) { - int oi; - - memset(out+nout,0,sizeof *out); - f->jobs = realloc(f->jobs,(f->njobs+1)*sizeof *f->jobs); - f->jobs[f->njobs] = strdup(job); - f->job_attrs = realloc(f->job_attrs,(f->njobs+1)*sizeof *f->job_attrs); - f->job_attrs[f->njobs] = out; - out = NULL; - - for (oi=0; strcmp(meta[oi].name,GLITE_JP_ATTR_OWNER); oi++); - assert(meta[oi].name); - f->owners = realloc(f->owners,(f->njobs+1)*sizeof *f->owners); - f->owners[f->njobs] = strdup(meta[oi].value); - - f->njobs++; - } - -/* run the feed eventually */ - if (f->njobs >= BATCH_FEED_SIZE && drain_feed(ctx,f,0)) { - err.code = EIO; - err.desc = "sending batch feed"; - glite_jp_stack_error(ctx,&err); - } - -cleanup: - for (i=0; other && other[i].name; i++) glite_jp_attrval_free(other+i,0); - free(other); - - return err.code; -} - - -static int run_feed_deferred(glite_jp_context_t ctx,void *feed) -{ - struct jpfeed *f = feed; - int i,m,o,cnt,ret = 0; - char **meta; - - glite_jp_clear_error(ctx); -/* count "meta" attributes */ - cnt = 0; - for (i=0; f->attrs[i]; i++) - if (glite_jppsbe_is_metadata(ctx,f->attrs[i])) cnt++; - - f->meta_attr = cnt ? malloc((cnt+1) * sizeof *f->meta_attr) : NULL; - f->nmeta_attr = cnt; - - f->other_attr = i-cnt ? malloc((i-cnt+1) * sizeof *f->other_attr) : NULL; - f->nother_attr = i-cnt; - -/* sort attributes to "meta" and others */ - m = o = 0; - for (i=0; f->attrs[i]; i++) - if (glite_jppsbe_is_metadata(ctx,f->attrs[i])) - if (!strcmp(f->attrs[i],GLITE_JP_ATTR_OWNER)) { - free(f->attrs[i]); - f->nmeta_attr--; - } - else f->meta_attr[m++] = f->attrs[i]; - else { - /* XXX: jobid and owner are sent anyway */ - if (!strcmp(f->attrs[i],GLITE_JP_ATTR_JOBID)) { - free(f->attrs[i]); - f->nother_attr--; - } - else f->other_attr[o++] = f->attrs[i]; - } - - if (f->nmeta_attr == 0) { free(f->meta_attr); f->meta_attr = NULL; } - if (f->nother_attr == 0) { free(f->other_attr); f->other_attr = NULL; } - - if (f->meta_attr) f->meta_attr[m] = NULL; - if (f->other_attr) f->other_attr[o] = NULL; - - -/* the same for query records */ - cnt = 0; - for (i=0; f->qry[i].attr; i++) - if (glite_jppsbe_is_metadata(ctx,f->qry[i].attr)) cnt++; - - f->meta_qry = cnt ? malloc((cnt+1) * sizeof *f->meta_qry) : NULL; - if (f->meta_qry) memset(f->meta_qry+cnt,0,sizeof *f->meta_qry); - f->nmeta_qry = cnt; - f->other_qry = i-cnt ? malloc((i-cnt+1) * sizeof *f->other_qry) : NULL; - f->nother_qry = i-cnt; - - m = o = 0; - for (i=0; f->qry[i].attr; i++) - if (glite_jppsbe_is_metadata(ctx,f->qry[i].attr)) memcpy(f->meta_qry+m++,f->qry+i,sizeof *f->meta_qry); - else memcpy(f->other_qry+o++,f->qry+i,sizeof *f->other_qry); - - free(f->attrs); free(f->qry); - f->attrs = NULL; - f->qry = NULL; - - if (f->meta_qry) memset(f->meta_qry+m,0,sizeof *f->meta_qry); - else { - glite_jp_error_t err; - err.code = EINVAL; - err.source = __FUNCTION__; - err.desc = "at least one metadata query item required"; - ret = glite_jp_stack_error(ctx,&err); - goto cleanup; - } - - if (f->other_qry) memset(f->other_qry+o,0,sizeof *f->other_qry); - -/* extract other_qry items that are not present in other_attr */ - f->int_other_attr = o = f->nother_attr; - for (i=0; inother_qry; i++) { - int j; - for (j=0; jint_other_attr && strcmp(f->other_attr[j],f->other_qry[i].attr); j++); - if (j == f->int_other_attr) { - f->other_attr = realloc(f->other_attr,(o+2) * sizeof *f->other_attr); - f->other_attr[o++] = strdup(f->other_qry[i].attr); - } - } - if (f->other_attr) f->other_attr[o] = NULL; - f->nother_attr = o; - - meta = calloc(f->nmeta_attr+2,sizeof *meta); - meta[0] = GLITE_JP_ATTR_OWNER; - if (f->meta_attr) memcpy(meta+1,f->meta_attr,(f->nmeta_attr+1) * sizeof *meta); - else meta[1] = NULL; - - ret = glite_jppsbe_query(ctx,f->meta_qry,meta,f,feed_query_callback); - if (ret == 0) ret = drain_feed(ctx,f,1); - else if (ret == ENOENT) ret = 0; - else drop_jobs(f); - -cleanup: - - jpfeed_free(f); - return ret; -} - -int glite_jpps_run_feed( - glite_jp_context_t ctx, - const char *destination, - char const * const *attrs, - const glite_jp_query_rec_t *qry, - int continuous, - char **feed_id) -{ - struct jpfeed *f; - - fprintf(stderr,"%s: \n",__FUNCTION__); - if (!*feed_id) *feed_id = generate_feedid(); - - f = make_jpfeed(destination,attrs,qry,*feed_id,(time_t) 0); - f->continuous = continuous; - glite_jp_add_deferred(ctx,run_feed_deferred,f); - - return 0; -} - -static int register_feed_deferred(glite_jp_context_t ctx,void *feed) -{ - struct jpfeed *f = feed; - - if (glite_jppsbe_store_feed(ctx,f)) fputs(glite_jp_error_chain(ctx),stderr); - else kill(-master,SIGUSR1); /* gracefully terminate slaves - and let master restart them */ - - return 0; -} - - -int glite_jpps_register_feed( - glite_jp_context_t ctx, - const char *destination, - char const *const *attrs, - const glite_jp_query_rec_t *qry, - char **feed_id, - time_t *expires) -{ - struct jpfeed *f; - - if (!*feed_id) *feed_id = generate_feedid(); - time(expires); *expires += FEED_TTL; - - f = make_jpfeed(destination,attrs,qry,*feed_id,*expires); - glite_jp_add_deferred(ctx,register_feed_deferred,f); - - return 0; -} - diff --git a/org.glite.jp.primary/src/feed.h b/org.glite.jp.primary/src/feed.h deleted file mode 100644 index 05d64f5..0000000 --- a/org.glite.jp.primary/src/feed.h +++ /dev/null @@ -1,37 +0,0 @@ -#ifndef __GLITE_JP_FEED -#define __GLITE_JP_FEED - - -struct jpfeed { -/* feed data */ - char *id,*destination; - time_t expires; - int continuous; - -/* complete and split query and attribute list */ - char **attrs,**meta_attr,**other_attr; - int int_other_attr; /* index from where other_attr is extended - with attributes from other_query */ - - int nother_attr, nmeta_attr, nmeta_qry, nother_qry; - glite_jp_query_rec_t *qry,*meta_qry,*other_qry; - -/* jobs stacked for feed */ - int njobs; - char **jobs; - char **owners; - glite_jp_attrval_t **job_attrs; - -/* next feed */ - struct jpfeed *next; -}; - - -int glite_jpps_match_attr(glite_jp_context_t,const char *,const glite_jp_attrval_t[]); -int glite_jpps_match_file(glite_jp_context_t,const char *,const char *,const char *); -int glite_jpps_match_tag(glite_jp_context_t,const char *,const char *,const char *); -int glite_jpps_run_feed(glite_jp_context_t,const char *,char const * const *,const glite_jp_query_rec_t *,int,char **); -int glite_jpps_register_feed(glite_jp_context_t,const char *,char const * const *,const glite_jp_query_rec_t *,char **,time_t *); - -#endif - diff --git a/org.glite.jp.primary/src/file_plugin.c b/org.glite.jp.primary/src/file_plugin.c deleted file mode 100644 index 2c27f93..0000000 --- a/org.glite.jp.primary/src/file_plugin.c +++ /dev/null @@ -1,125 +0,0 @@ -#include -#include -#include -#include -#include - -#include -#include "file_plugin.h" - -static struct option opts[] = { - { "plugin", 1, NULL, 'p' }, - { NULL } -}; - -static int loadit(glite_jp_context_t ctx,const char *so) -{ -/* XXX: not stored but we never dlclose() yet */ - void *dl_handle = dlopen(so,RTLD_NOW); - - glite_jp_error_t err; - const char *e; - glite_jpps_fplug_data_t *data,*dp; - int i; - - glite_jpps_fplug_init_t init; - memset(&err,0,sizeof err); - - if (!dl_handle) { - err.source = "dlopen()"; - err.code = EINVAL; - err.desc = dlerror(); - return glite_jp_stack_error(ctx,&err); - } - - dlerror(); - init = dlsym(dl_handle,"init"); - e = dlerror(); - if (e) { - char buf[300]; - snprintf(buf,sizeof buf,"dlsym(\"%s\",\"init\")",so); - buf[299] = 0; - err.source = buf; - err.code = ENOENT; - err.desc = e; - return glite_jp_stack_error(ctx,&err); - } - - data = calloc(1,sizeof *data); - - if (init(ctx,data)) return -1; - - i = 0; - if (ctx->plugins) for (i=0; ctx->plugins[i]; i++); - ctx->plugins = realloc(ctx->plugins, (i+2) * sizeof *ctx->plugins); - ctx->plugins[i] = data; - ctx->plugins[i+1] = NULL; - - /* TODO: check consistency of uri+class pairs wrt. previous plugins */ - - return 0; -} - -int glite_jpps_fplug_load(glite_jp_context_t ctx,int argc,char **argv) -{ - int i; - - for (i=1; iplugins) { - return glite_jp_stack_error(ctx,&err); - } - - for (i = 0; ctx->plugins[i]; i++) { - int j; - glite_jpps_fplug_data_t *p = ctx->plugins[i]; - - for (j=0; p->uris && p->uris[j]; j++) - if ((uri && !strcmp(p->uris[j],uri)) || (class && !strcmp(p->classes[j],class))) { - out = realloc(out, (matches+2) * sizeof *out); - out[matches++] = p; - out[matches] = NULL; - } - } - - if (matches) { - *plugin_data = out; - return 0; - } - else return glite_jp_stack_error(ctx,&err); -} - -int glite_jpps_fplug_lookup(glite_jp_context_t ctx,const char *uri, glite_jpps_fplug_data_t ***plugin_data) -{ - return lookup_common(ctx,uri,NULL,plugin_data); -} - -int glite_jpps_fplug_lookup_byclass(glite_jp_context_t ctx, const char *class,glite_jpps_fplug_data_t ***plugin_data) -{ - return lookup_common(ctx,NULL,class,plugin_data); -} - diff --git a/org.glite.jp.primary/src/ftpd_auth.c b/org.glite.jp.primary/src/ftpd_auth.c deleted file mode 100644 index bc00462..0000000 --- a/org.glite.jp.primary/src/ftpd_auth.c +++ /dev/null @@ -1,196 +0,0 @@ -#include -#include -#include -#include -#include -#include - -#include "glite/jp/types.h" -#include "glite/jp/context.h" - -#include "db.h" - -extern void reply(int n, char *fmt,...); - -#define FTPBE_DEFAULT_DB_CS "jpps/@localhost:jpps" - -static char *user_subj = NULL; -static char *int_prefix = NULL; -static glite_jp_context_t ctx; - -static int open_db() -{ - char *db_cs = NULL; - - db_cs = getenv("FTPBE_DB_CS"); - if (!db_cs) db_cs = FTPBE_DEFAULT_DB_CS; - - int_prefix = getenv("FTPBE_INT_PREFIX"); - if (!int_prefix) { - reply(550, "Internal error: prefix not configured"); - return 0; - } - - glite_jp_init_context(&ctx); - if (glite_jp_db_connect(ctx, db_cs)) { - reply(550, "Internal error: backend DB access failed"); - return 0; - } - - return 1; -} - -static void close_db() -{ - glite_jp_db_close(ctx); -} - - -int globus_gss_assist_gridmap(char* globus_id, char** mapped_name) -{ - char *logname; - - logname = getenv("GLITE_USER"); - if (logname) { - *mapped_name = strdup(logname); - user_subj = strdup(globus_id); - if (!(*mapped_name) || !user_subj) return 1; - - return 0; - } else { - return 1; - /* - * Note: return value need not follow globus numbering - * scheme in ftpd - */ - } -} - -int globus_gss_assist_userok(char*globus_id, char *account) -{ - char *logname; - - logname = getenv("GLITE_USER"); - if (logname) - return strcmp(account,strdup(logname)) ? 1 : 0; - else - return 1; -} - -int checknoretrieve(char *name) -{ - int result = 1; /* deny access by default */ - - char *stmt = NULL; - int db_retn; - glite_jp_db_stmt_t db_res; - char *db_row[1] = { NULL }; - - trio_asprintf(&stmt,"select j.owner from jobs j,files f where " - "f.ext_url='%|Ss%|Ss' and j.jobid=f.jobid", - int_prefix, name); - if (!stmt) { - reply(550, "Internal error: out of memory"); - return 1; - } - - if (!open_db()) return 1; - - if ((db_retn = glite_jp_db_execstmt(ctx, stmt, &db_res)) <= 0) { - if (db_retn == 0) { - reply(553, "No such file registered"); - } else { - reply(550, "Internal error: backend DB access failed"); - } - goto out; - } - - db_retn = glite_jp_db_fetchrow(db_res, db_row); - if (db_retn != 1) { - glite_jp_db_freestmt(&db_res); - reply(550, "Internal error: backend DB access failed"); - goto out; - } - glite_jp_db_freestmt(&db_res); - - if (!strcmp(db_row[0], user_subj)) { - result = 0; - } else { - reply(553, "Permission denied"); - } - -out: - free(db_row[0]); - close_db(); - free(stmt); - return result; -} - -int upl_check(char *name, uid_t * uid, gid_t * gid, int *f_mode, int *valid) -{ - int result = -1; /* deny access by default */ - - char *stmt = NULL; - int db_retn; - glite_jp_db_stmt_t db_res; - char *db_row[1] = { NULL }; - - *valid = 0; /* don't used uid & gid */ - - trio_asprintf(&stmt,"select state from files " - "where ext_url='%|Ss%|Ss' and ul_userid='%|Ss'", - int_prefix, name, user_subj); - if (!stmt) { - reply(550, "Internal error: out of memory"); - return -1; - } - - if (!open_db()) return -1; - - if ((db_retn = glite_jp_db_execstmt(ctx, stmt, &db_res)) <= 0) { - if (db_retn == 0) { - reply(553, "No such upload in progress"); - } else { - reply(550, "Internal error: backend DB access failed"); - } - goto out; - } - - db_retn = glite_jp_db_fetchrow(db_res, db_row); - if (db_retn != 1) { - glite_jp_db_freestmt(&db_res); - reply(550, "Internal error: backend DB access failed"); - goto out; - } - glite_jp_db_freestmt(&db_res); - - if (!strcmp(db_row[0], "uploading")) { - result = 1; - } else { - reply(553, "Permission denied"); - } - -out: - free(db_row[0]); - close_db(); - free(stmt); - return result; -} - -int del_check(char *name) -{ - reply(553, "Deleting files not supported"); - return 0; -} - -int rename(const char *f, const char * t) -{ - errno = EPERM; - return -1; -} - -FILE *ftpd_popen(char *program, char *type, int closestderr) -{ - errno = EPERM; - return NULL; -} diff --git a/org.glite.jp.primary/src/is_client.c b/org.glite.jp.primary/src/is_client.c deleted file mode 100644 index 13c65c6..0000000 --- a/org.glite.jp.primary/src/is_client.c +++ /dev/null @@ -1,263 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include - - -#undef SOAP_FMAC1 -#define SOAP_FMAC1 static - -#include "glite/jp/types.h" -#include "soap_version.h" -#include "glite/security/glite_gsplugin.h" -#include "glite/security/glite_gscompat.h" - -#include "feed.h" -#include "is_client.h" - -/* same as ClientLib.c, without WITH_NOGLOBAL */ -#define SOAP_FMAC3 static -#include "jpis_C.c" -#include "jpis_Client.c" - -#include "jpis_.nsmap" - -#include "soap_env_ctx.h" -#include "soap_env_ctx.c" - -#include "glite/jp/ws_fault.c" -#include "soap_util.c" - -#define MAX_RETRY 10 -#define RETRY_SLEEP 2 - -extern char *server_key, *server_cert; /* XXX */ - -static int check_other_soap(glite_jp_context_t ctx) -{ - glite_gsplugin_Context plugin_ctx; - - if (!ctx->other_soap) { - glite_gsplugin_init_context(&plugin_ctx); - if (server_key) plugin_ctx->key_filename = strdup(server_key); - if (server_cert) plugin_ctx->cert_filename = strdup(server_cert); - - ctx->other_soap = soap_new(); - soap_init(ctx->other_soap); - soap_set_namespaces(ctx->other_soap,jpis__namespaces); - soap_set_omode(ctx->other_soap, SOAP_IO_BUFFER); // set buffered response - // buffer set to SOAP_BUFLEN (default = 8k) - soap_register_plugin_arg(ctx->other_soap,glite_gsplugin,plugin_ctx); - ctx->other_soap->user = ctx; - } - return 0; -} - -static check_fault(glite_jp_context_t ctx,struct soap *soap,int ec) -{ - glite_jp_error_t err; - char buf[1000] = "unknown fault"; - - switch (ec) { - case SOAP_OK: return 0; - default: - err.code = EIO; - err.source = __FUNCTION__; - err.desc = buf; - if (soap->fault) snprintf(buf,sizeof buf,"%s %s\n", - soap->fault->faultcode, - soap->fault->faultstring); - buf[999] = 0; - glite_jp_stack_error(ctx,&err); - return err.code; - } -} - -static struct _glite_jp_soap_env_ctx_t *keep_soap_env_ctx; - -#define SWITCH_SOAP_CTX \ -{ \ - keep_soap_env_ctx = glite_jp_soap_env_ctx; \ - glite_jp_soap_env_ctx = &my_soap_env_ctx; \ -} \ - -#define RESTORE_SOAP_CTX \ -{ \ - glite_jp_soap_env_ctx = keep_soap_env_ctx; \ -} \ - -static int glite_jpps_single_feed_wrapped( - glite_jp_context_t ctx, - const char *feed, - int done, - const char *destination, - const char *job, - const char *owner, - glite_jp_attrval_t const *attrs -) -{ - struct _jpelem__UpdateJobs in; - struct _jpelem__UpdateJobsResponse out; - struct jptype__jobRecord jr, *jrp = &jr; - int i; - enum xsd__boolean false = GLITE_SECURITY_GSOAP_FALSE; - glite_jp_error_t err; - - glite_jp_clear_error(ctx); - memset(&err,0,sizeof err); - - /* TODO: call JP Index server via interlogger */ - - printf("feed %s to %s, job %s\n",feed,destination,job); - - check_other_soap(ctx); - - in.feedId = (char *) feed; /* XXX: const */ - in.feedDone = done; - in.__sizejobAttributes = 1; - in.jobAttributes = &jrp; - - for (i=0; attrs[i].name; i++); - jr.jobid = soap_strdup(ctx->other_soap, job); - jr.owner = soap_strdup(ctx->other_soap, owner); - - jr.__sizeattributes = jp2s_attrValues(ctx->other_soap, - (glite_jp_attrval_t *) attrs, /* XXX: const */ - &jr.attributes,0); - - jr.remove = &false; - jr.__sizeprimaryStorage = 1; - jr.primaryStorage = &ctx->myURL; - - - SWITCH_SOAP_CTX - if (soap_call___jpsrv__UpdateJobs(ctx->other_soap,destination,"", - &in,&out - )) { - char buf[1000]; - err.code = EIO; - err.source = __FUNCTION__; - err.desc = buf; - memset(buf, 0, sizeof(buf)); - if (ctx->other_soap->fault) { - snprintf(buf,sizeof buf,"%s %s\n", - ctx->other_soap->fault->faultcode, - ctx->other_soap->fault->faultstring); - } - else { - sprintf(buf,"No detailed error description (JP IS not running?)\n"); - } - buf[999] = 0; - glite_jp_stack_error(ctx,&err); - } - RESTORE_SOAP_CTX - - soap_dealloc(ctx->other_soap, jr.jobid); - soap_dealloc(ctx->other_soap, jr.owner); - attrValues_free(ctx->other_soap,jr.attributes,jr.__sizeattributes); - - return err.code; -} - - -int glite_jpps_single_feed( - glite_jp_context_t ctx, - const char *feed, - int done, - const char *destination, - const char *job, - const char *owner, - glite_jp_attrval_t const *attrs -) -{ - int retry,ret; - for (retry = 0; retry < MAX_RETRY; retry++) { - if ((ret = glite_jpps_single_feed_wrapped(ctx,feed,done,destination,job,owner,attrs)) == 0) break; - sleep(RETRY_SLEEP); - } - return ret; -} - - -static int glite_jpps_multi_feed_wrapped( - glite_jp_context_t ctx, - const char *feed, - int done, - int njobs, - const char *destination, - char **jobs, - char **owners, - glite_jp_attrval_t **attrs) -{ - int i,j; - - struct _jpelem__UpdateJobs in; - struct _jpelem__UpdateJobsResponse out; - struct jptype__jobRecord *jr; - enum xsd__boolean false = GLITE_SECURITY_GSOAP_FALSE; - glite_jp_error_t err; - - printf("multi_feed %s to %s\n",feed,destination); - - glite_jp_clear_error(ctx); - memset(&err,0,sizeof err); - - check_other_soap(ctx); - - in.feedId = (char *) feed; /* XXX: const */ - in.feedDone = done; - GLITE_SECURITY_GSOAP_LIST_CREATE(ctx->other_soap, &in, jobAttributes, struct jptype__jobRecord, njobs); - - for (i=0; ijobid = jobs[i]; - jr->owner = owners[i]; - - jr->__sizeattributes = jp2s_attrValues(ctx->other_soap, - attrs[i], - &jr->attributes,0); - - jr->remove = &false; - jr->__sizeprimaryStorage = 1; - jr->primaryStorage = &ctx->myURL; - } - - SWITCH_SOAP_CTX - check_fault(ctx,ctx->other_soap, - soap_call___jpsrv__UpdateJobs(ctx->other_soap,destination,"", &in,&out)); - RESTORE_SOAP_CTX - for (i=0; iother_soap,jr->attributes,jr->__sizeattributes); - } - GLITE_SECURITY_GSOAP_LIST_DESTROY(ctx->other_soap, &in, jobAttributes); - - return err.code; -} - - -int glite_jpps_multi_feed( - glite_jp_context_t ctx, - const char *feed, - int done, - int njobs, - const char *destination, - char **jobs, - char **owners, - glite_jp_attrval_t **attrs) -{ - int retry,ret; - for (retry = 0; retry < MAX_RETRY; retry++) { - if ((ret = glite_jpps_multi_feed_wrapped(ctx,feed,done,njobs,destination,jobs,owners,attrs)) == 0) break; - sleep(RETRY_SLEEP); - } - return ret; -} diff --git a/org.glite.jp.primary/src/is_client.h b/org.glite.jp.primary/src/is_client.h deleted file mode 100644 index 74e4456..0000000 --- a/org.glite.jp.primary/src/is_client.h +++ /dev/null @@ -1,4 +0,0 @@ -int glite_jpps_single_feed(glite_jp_context_t,const char *,int,const char *,const char *,const char *,glite_jp_attrval_t const *); -int glite_jpps_multi_feed(glite_jp_context_t,const char *,int,int,const char *,char **,char **,glite_jp_attrval_t **); - - diff --git a/org.glite.jp.primary/src/jptype_map.h b/org.glite.jp.primary/src/jptype_map.h deleted file mode 100644 index c620c83..0000000 --- a/org.glite.jp.primary/src/jptype_map.h +++ /dev/null @@ -1,34 +0,0 @@ -#include "soap_version.h" - -#if GSOAP_VERSION >= 20700 -#define INPUT_SANDBOX jptype__UploadClass__INPUT_SANDBOX -#define OUTPUT_SANDBOX jptype__UploadClass__OUTPUT_SANDBOX -#define JOB_LOG jptype__UploadClass__JOB_LOG - -#define OWNER jptype__AttributeType__OWNER -#define TIME jptype__AttributeType__TIME -#define TAG jptype__AttributeType__TAG - -#define EQUAL jptype__queryOp__EQUAL -#define UNEQUAL jptype__queryOp__UNEQUAL -#define LESS jptype__queryOp__LESS -#define GREATER jptype__queryOp__GREATER -#define WITHIN jptype__queryOp__WITHIN - -#else - -#define __jpsrv__RegisterJob __ns1__RegisterJob -#define __jpsrv__StartUpload __ns1__StartUpload -#define __jpsrv__CommitUpload __ns1__CommitUpload -#define __jpsrv__RecordTag __ns1__RecordTag -#define __jpsrv__FeedIndex __ns1__FeedIndex -#define __jpsrv__FeedIndexRefresh __ns1__FeedIndexRefresh -#define __jpsrv__GetJob __ns1__GetJob - -#define SOAP_TYPE___jpsrv__RegisterJob SOAP_TYPE___ns1__RegisterJob -#define SOAP_TYPE___jpsrv__StartUpload SOAP_TYPE___ns1__StartUpload -#define SOAP_TYPE___jpsrv__CommitUpload SOAP_TYPE___ns1__CommitUpload -#define SOAP_TYPE___jpsrv__GetJob SOAP_TYPE___ns1__GetJob - -#endif - diff --git a/org.glite.jp.primary/src/mk_soap_switch.pl b/org.glite.jp.primary/src/mk_soap_switch.pl deleted file mode 100755 index c9acdab..0000000 --- a/org.glite.jp.primary/src/mk_soap_switch.pl +++ /dev/null @@ -1,63 +0,0 @@ -#!/usr/bin/perl - -$formula = "/* Generated from @ARGV with the help of black magic.\n Do not edit.\n*/\n\n"; -print "${formula}#include \"soap_env_ctx.h\"\n\n"; - -# XXX: hardcoded -$prefix = 'ENV'; - -open EH,">soap_env_ctx.h" or die "soap_env_ctx.h: $!\n"; -open EC,">soap_env_ctx.c" or die "soap_env_ctx.c: $!\n"; - -print EH "${formula}struct _glite_jp_soap_env_ctx_t {\n"; - -print EC "${formula}static struct _glite_jp_soap_env_ctx_t my_soap_env_ctx = {\n"; - - -while ($_ = <>) { - if (/^}$/) { - print; - $infunc = 0; - undef @args; - next; - } - - next if $infunc; - - if (/^SOAP_FMAC3\s+(.+)\s+SOAP_FMAC4\s+([^(]+)\(([^)]*)\)/) { - $type = $1; - $func = $2; - @a = split /,/,$3; - for $a (@a) { - $a =~ /.*\W(\w+)/; - push @args,$1; - } - print; - - next if $func =~ "SOAP_$prefix"; - - print EH "\t$type (*$func)();\n"; - print EC "\t$func,\n"; - next; - } - - if (/^{/) { - print; - next if $func =~ "SOAP_$prefix"; - local $"=','; - $infunc = 1; - print "\t"; - print 'return ' unless $type eq 'void'; - print "glite_jp_soap_env_ctx->$func(@args);\n"; - - next; - } - - print; -} - -print EH "};\n\n"; -print EH "extern struct _glite_jp_soap_env_ctx_t *glite_jp_soap_env_ctx;\n"; -print EC "};\n"; - -print "struct _glite_jp_soap_env_ctx_t *glite_jp_soap_env_ctx;\n"; diff --git a/org.glite.jp.primary/src/mysql.c b/org.glite.jp.primary/src/mysql.c deleted file mode 100644 index 0f080ce..0000000 --- a/org.glite.jp.primary/src/mysql.c +++ /dev/null @@ -1,265 +0,0 @@ -#ident "$Header$" - -#include "mysql.h" // MySql header file -#include "mysqld_error.h" -#include "errmsg.h" - -#include -#include -#include -#include -#include -#include -#include - -#include "glite/jp/types.h" -#include "glite/jp/context.h" - -#include "db.h" - -#define DEFAULTCS "jpps/@localhost:jpps1" -#define GLITE_JP_LB_MYSQL_VERSION 40018 - -static int my_err(glite_jp_context_t ctx, char *function) -{ - glite_jp_error_t err; - - glite_jp_clear_error(ctx); - memset(&err,0,sizeof err); - err.source = function; - err.code = EIO; /* XXX */ - err.desc = mysql_error((MYSQL *) ctx->dbhandle); - return glite_jp_stack_error(ctx,&err); -} - -struct _glite_jp_db_stmt_t { - MYSQL_RES *result; - glite_jp_context_t ctx; -}; - -int glite_jp_db_connect(glite_jp_context_t ctx,char *cs) -{ - char *buf = NULL; - char *host,*user,*pw,*db; - char *slash,*at,*colon; - - glite_jp_error_t err; - - glite_jp_clear_error(ctx); - memset(&err,0,sizeof err); - err.source = __FUNCTION__; - - if (!cs) cs = DEFAULTCS; - - if (!(ctx->dbhandle = (void *) mysql_init(NULL))) { - err.code = ENOMEM; - return glite_jp_stack_error(ctx,&err); - } - - mysql_options(ctx->dbhandle, MYSQL_READ_DEFAULT_FILE, "my"); - - host = user = pw = db = NULL; - - buf = strdup(cs); - slash = strchr(buf,'/'); - at = strrchr(buf,'@'); - colon = strrchr(buf,':'); - - if (!slash || !at || !colon) { - free(buf); - err.code = EINVAL; - err.desc = "Invalid DB connect string"; - return glite_jp_stack_error(ctx,&err); - } - - *slash = *at = *colon = 0; - host = at+1; - user = buf; - pw = slash+1; - db = colon+1; - - if (!mysql_real_connect((MYSQL *) ctx->dbhandle,host,user,pw,db,0,NULL,CLIENT_FOUND_ROWS)) { - free(buf); - return my_err(ctx, __FUNCTION__); - } - - free(buf); - return 0; -} - -void glite_jp_db_close(glite_jp_context_t ctx) -{ - mysql_close((MYSQL *) ctx->dbhandle); - ctx->dbhandle = NULL; -} - -int glite_jp_db_execstmt(glite_jp_context_t ctx,char *txt,glite_jp_db_stmt_t *stmt) -{ - int merr; - int retry_nr = 0; - int do_reconnect = 0; - - glite_jp_error_t err; - - glite_jp_clear_error(ctx); - memset(&err,0,sizeof err); - err.source = __FUNCTION__; - - if (stmt) { - *stmt = NULL; - } - - while (retry_nr == 0 || do_reconnect) { - do_reconnect = 0; - if (mysql_query((MYSQL *) ctx->dbhandle,txt)) { - /* error occured */ - switch (merr = mysql_errno((MYSQL *) ctx->dbhandle)) { - case 0: - break; - case ER_DUP_ENTRY: - err.code = EEXIST; - err.desc = mysql_error((MYSQL *) ctx->dbhandle); - glite_jp_stack_error(ctx,&err); - return -1; - break; - case CR_SERVER_LOST: - if (retry_nr <= 0) - do_reconnect = 1; - break; - default: - my_err(ctx, __FUNCTION__); - return -1; - break; - } - } - retry_nr++; - } - - if (stmt) { - *stmt = malloc(sizeof(**stmt)); - if (!*stmt) { - err.code = ENOMEM; - glite_jp_stack_error(ctx,&err); - return -1; - } - memset(*stmt,0,sizeof(**stmt)); - (**stmt).ctx = ctx; - (**stmt).result = mysql_store_result((MYSQL *) ctx->dbhandle); - if (!(**stmt).result) { - if (mysql_errno((MYSQL *) ctx->dbhandle)) { - my_err(ctx, __FUNCTION__); - return -1; - } - } - } else { - MYSQL_RES *r = mysql_store_result((MYSQL *) ctx->dbhandle); - mysql_free_result(r); - } - - return mysql_affected_rows((MYSQL *) ctx->dbhandle); -} - -int glite_jp_db_fetchrow(glite_jp_db_stmt_t stmt,char **res) -{ - MYSQL_ROW row; - glite_jp_context_t ctx = stmt->ctx; - int nr,i; - unsigned long *len; - - glite_jp_clear_error(ctx); - - if (!stmt->result) return 0; - - if (!(row = mysql_fetch_row(stmt->result))) { - if (mysql_errno((MYSQL *) ctx->dbhandle)) { - my_err(ctx, __FUNCTION__); - return -1; - } else return 0; - } - - nr = mysql_num_fields(stmt->result); - len = mysql_fetch_lengths(stmt->result); - for (i=0; iresult))) cols[i++] = f->name; - return i == 0; -} - -void glite_jp_db_freestmt(glite_jp_db_stmt_t *stmt) -{ - if (*stmt) { - if ((**stmt).result) mysql_free_result((**stmt).result); - free(*stmt); - *stmt = NULL; - } -} - - -char *glite_jp_db_timetodb(time_t t) -{ - struct tm *tm = gmtime(&t); - char tbuf[256]; - - /* XXX: the very end of our days */ - if (!tm && t == (time_t) LONG_MAX) return strdup("9999-12-31 23:59:59"); - - sprintf(tbuf,"'%4d-%02d-%02d %02d:%02d:%02d'",tm->tm_year+1900,tm->tm_mon+1, - tm->tm_mday,tm->tm_hour,tm->tm_min,tm->tm_sec); - - return strdup(tbuf); -} - -time_t glite_jp_db_dbtotime(char *t) -{ - struct tm tm; - - memset(&tm,0,sizeof(tm)); - setenv("TZ","UTC",1); tzset(); - sscanf(t,"%4d-%02d-%02d %02d:%02d:%02d", - &tm.tm_year,&tm.tm_mon,&tm.tm_mday, - &tm.tm_hour,&tm.tm_min,&tm.tm_sec); - tm.tm_year -= 1900; - tm.tm_mon--; - - return mktime(&tm); -} - -int glite_jp_db_dbcheckversion(glite_jp_context_t ctx) -{ - MYSQL *m = (MYSQL *) ctx->dbhandle; - const char *ver_s = mysql_get_server_info(m); - int major,minor,sub,version; - - glite_jp_error_t err; - - glite_jp_clear_error(ctx); - memset(&err,0,sizeof err); - err.source = __FUNCTION__; - - if (!ver_s || 3 != sscanf(ver_s,"%d.%d.%d",&major,&minor,&sub)) { - err.code = EINVAL; - err.desc = "problem checking MySQL version"; - return glite_jp_stack_error(ctx,&err); - } - - version = 10000*major + 100*minor + sub; - - if (version < GLITE_JP_LB_MYSQL_VERSION) { - char msg[300]; - - snprintf(msg,sizeof msg,"Your MySQL version is %d. At least %d required.",version, GLITE_JP_LB_MYSQL_VERSION); - err.code = EINVAL; - err.desc = msg; - return glite_jp_stack_error(ctx,&err); - } - - return 0; -} diff --git a/org.glite.jp.primary/src/new_ftp_backend.c b/org.glite.jp.primary/src/new_ftp_backend.c deleted file mode 100644 index 8dd5421..0000000 --- a/org.glite.jp.primary/src/new_ftp_backend.c +++ /dev/null @@ -1,2427 +0,0 @@ -#ident "$Header$" - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "glite/jp/types.h" -#include "glite/jp/context.h" -#include "glite/jp/strmd5.h" -#include "glite/jp/known_attr.h" -#include "glite/jp/attr.h" -#include "glite/jp/escape.h" - -#include "feed.h" -#include "tags.h" -#include "backend.h" -#include "db.h" - -#include "jpps_H.h" /* XXX: SOAP_TYPE___jpsrv__GetJob */ - -#include "jptype_map.h" - -#define FTPBE_DEFAULT_DB_CS "jpps/@localhost:jpps" - -struct ftpbe_config { - char *internal_path; - char *external_path; - char *db_cs; -// char *gridmap; - char *logname; -}; - -static struct ftpbe_config *config = NULL; - -struct fhandle_rec { - int fd; - int fd_append; -}; -typedef struct fhandle_rec *fhandle; - -static struct option ftpbe_opts[] = { - { "ftp-internal-path", 1, NULL, 'I' }, - { "ftp-external-path", 1, NULL, 'E' }, - { "ftp-db-cs", 1, NULL, 'D' }, -// { "ftp-gridmap", 1, NULL, 'G' }, - { NULL, 0, NULL, 0 } -}; - -/******************************************************************************* - Internal helpers -*******************************************************************************/ - - -static int config_check( - glite_jp_context_t ctx, - struct ftpbe_config *config) -{ - return config == NULL || - config->internal_path == NULL || - config->external_path == NULL || - config->db_cs == NULL || -// config->gridmap == NULL || - config->logname == NULL; - - /* XXX check reality */ -} - -static int jobid_unique_pathname(glite_jp_context_t ctx, const char *job, - char **unique, char **ju_path, int get_path) -{ - char *p; - glite_jp_error_t err; - - glite_jp_clear_error(ctx); - memset(&err,0,sizeof err); - err.source = __FUNCTION__; - - p = strrchr(job, '/'); - if (!p) { - err.code = EINVAL; - err.desc = "Malformed jobid"; - return glite_jp_stack_error(ctx,&err); - } - /* XXX thorough checks */ - if (!(*unique = strdup(p+1))) { - err.code = ENOMEM; - return glite_jp_stack_error(ctx,&err); - } - if (get_path) { - if (!(*ju_path = strdup(p+1))) { - free(*unique); - err.code = ENOMEM; - return glite_jp_stack_error(ctx,&err); - } - *(*ju_path + 10) = '\0'; - } - return 0; -} - -static int mkdirpath(const char* path, int prefixlen) -{ - char *wpath, *p; - int goout, ret; - - wpath = strdup(path); - if (!wpath) { - errno = ENOMEM; - return -1; - } - - p = wpath + prefixlen; - goout = 0; - while (!goout) { - while (*p == '/') p++; - while (*p != '/' && *p != '\0') p++; - goout = (*p == '\0'); - *p = '\0'; - ret = mkdir(wpath, S_IRUSR | S_IWUSR | S_IXUSR); - if (ret < 0 && errno != EEXIST) break; - *p = '/'; - } - free(wpath); - return goout ? 0 : ret; -} - -static int store_user(glite_jp_context_t ctx, const char *userid, const char *subj) -{ - glite_jp_error_t err; - char *stmt; - - glite_jp_clear_error(ctx); - memset(&err,0,sizeof err); - err.source = __FUNCTION__; - - assert(userid != NULL); - assert(subj != NULL); - - trio_asprintf(&stmt,"insert into users(userid,cert_subj) " - "values ('%|Ss','%|Ss')",userid,subj); - if (!stmt) { - err.code = ENOMEM; - return glite_jp_stack_error(ctx,&err); - } - - if (glite_jp_db_execstmt(ctx, stmt, NULL) < 0) { - if (ctx->error->code == EEXIST) - glite_jp_clear_error(ctx); - else { - free(stmt); - err.code = EIO; - err.desc = "DB access failed"; - return glite_jp_stack_error(ctx,&err); - } - } - free(stmt); - - return 0; -} - -static long regtime_trunc(long tv_sec) -{ - return tv_sec / (86400*7); -} - -static long regtime_ceil(long tv_sec) -{ - return (tv_sec % (86400*7)) ? tv_sec/(86400*7)+1 : tv_sec/(86400*7) ; -} - -/******************************************************************************** - Backend calls -********************************************************************************/ -int glite_jppsbe_init( - glite_jp_context_t ctx, - int argc, - char *argv[] -) -{ - glite_jp_error_t err; - int opt; - - glite_jp_clear_error(ctx); - memset(&err,0,sizeof err); - err.source = __FUNCTION__; - - config = (struct ftpbe_config *) calloc(1, sizeof *config); - if (!config) { - err.code = ENOMEM; - return glite_jp_stack_error(ctx,&err); - } - - config->logname = getlogin(); - - while ((opt = getopt_long(argc, argv, "I:E:D:" /* G: */, ftpbe_opts, NULL)) != EOF) { - switch (opt) { - case 'I': config->internal_path = optarg; break; - case 'E': config->external_path = optarg; break; - case 'D': config->db_cs = optarg; break; -// case 'G': config->gridmap = optarg; break; - default: break; - } - } - - /* Defaults */ - if (!config->db_cs) config->db_cs = strdup(FTPBE_DEFAULT_DB_CS); - - if (config_check(ctx, config)) { - err.code = EINVAL; - err.desc = "Invalid FTP backend configuration"; - return glite_jp_stack_error(ctx,&err); - } - - if (glite_jp_db_connect(ctx, config->db_cs)) { - err.code = EIO; - err.desc = "Cannot access backend's database (during init)"; - return glite_jp_stack_error(ctx,&err); - } else { - glite_jp_db_close(ctx); /* slaves open their own connections */ - } - - return 0; -} - -int glite_jppsbe_init_slave( - glite_jp_context_t ctx -) -{ - glite_jp_error_t err; - - glite_jp_clear_error(ctx); - memset(&err,0,sizeof err); - err.source = __FUNCTION__; - - if (glite_jp_db_connect(ctx, config->db_cs)) { - err.code = EIO; - err.desc = "Cannot access backend's database"; - return glite_jp_stack_error(ctx,&err); - } - - return 0; -} - -int glite_jppsbe_register_job( - glite_jp_context_t ctx, - const char *job, - const char *owner -) -{ - glite_jp_error_t err; - char *data_dir = NULL; - char *ju = NULL; - char *ju_path = NULL; - char *ownerhash = NULL; - struct timeval reg_tv; - char *stmt = NULL; - char *dbtime = NULL; - - glite_jp_clear_error(ctx); - memset(&err,0,sizeof err); - err.source = __FUNCTION__; - - assert(job != NULL); - assert(owner != NULL); - - gettimeofday(®_tv, NULL); - - if (jobid_unique_pathname(ctx, job, &ju, &ju_path, 1) != 0) { - err.code = ctx->error->code; - err.desc = "Cannot obtain jobid unique path/name"; - return glite_jp_stack_error(ctx,&err); - } - - ownerhash = str2md5(owner); /* static buffer */ - if (store_user(ctx, ownerhash, owner)) { - err.code = EIO; - err.desc = "Cannot store user entry"; - goto error_out; - } - - dbtime = glite_jp_db_timetodb(reg_tv.tv_sec); - if (!dbtime) { - err.code = ENOMEM; - goto error_out; - } - - trio_asprintf(&stmt,"insert into jobs(jobid,dg_jobid,owner,reg_time) " - "values ('%|Ss','%|Ss','%|Ss', %s)", - ju, job, ownerhash, dbtime); - if (!stmt) { - err.code = ENOMEM; - goto error_out; - } - - if (glite_jp_db_execstmt(ctx, stmt, NULL) < 0) { - if (ctx->error->code == EEXIST) { - err.code = EEXIST; - err.desc = "Job already registered"; - } - else { - err.code = EIO; - err.desc = "DB access failed"; - } - goto error_out; - } - - if (asprintf(&data_dir, "%s/data/%s/%d/%s", - config->internal_path, ownerhash, regtime_trunc(reg_tv.tv_sec), ju) == -1) { - err.code = ENOMEM; - goto error_out; - } - if (mkdirpath(data_dir, strlen(config->internal_path)) < 0 && - errno != EEXIST) { - err.code = errno; - err.desc = "Cannot mkdir jobs's data directory"; - goto error_out; - } - -error_out: - free(data_dir); - free(stmt); free(dbtime); - free(ju); free(ju_path); - - if (err.code) { - return glite_jp_stack_error(ctx,&err); - } else { - return 0; - } -} - -#if 0 -static int add_to_gridmap(glite_jp_context_t ctx, const char *dn) -{ - FILE *gridmap = NULL; - glite_jp_error_t err; - - glite_jp_clear_error(ctx); - memset(&err,0,sizeof err); - err.source = __FUNCTION__; - - gridmap = fopen(config->gridmap, "a"); - if (!gridmap) { - err.code = errno; - err.desc = "Cannot open gridmap file"; - return glite_jp_stack_error(ctx,&err); - } - if (fprintf(gridmap, "\"%s\" %s\n", dn, config->logname) < 6 || - ferror(gridmap)) { - err.code = EIO; - err.desc = "Cannot write to gridmap file"; - fclose(gridmap); - return glite_jp_stack_error(ctx,&err); - } - fclose(gridmap); - return 0; -} - -static int remove_from_gridmap(glite_jp_context_t ctx, const char *dn) -{ - FILE *gridmap = NULL; - char *temp_name = NULL; - FILE *temp_file = NULL; - glite_jp_error_t err; - - glite_jp_clear_error(ctx); - memset(&err,0,sizeof err); - err.source = __FUNCTION__; - - /* XXX */ - return 0; -} -#endif - -int glite_jppsbe_start_upload( - glite_jp_context_t ctx, - const char *job, - const char *class, - const char *name, - const char *content_type, - char **destination_out, - time_t *commit_before_inout -) -{ - char *data_basename = NULL; - char *data_fname = NULL; - char *ju = NULL; - char *ju_path = NULL; - char *peername = NULL; - char *peerhash = NULL; - - char *stmt = NULL; - glite_jp_db_stmt_t db_res; - int db_retn; - char *db_row[2] = { NULL, NULL }; - - glite_jp_error_t err; - - glite_jp_clear_error(ctx); - memset(&err,0,sizeof err); - err.source = __FUNCTION__; - - assert(job!=NULL); - assert(destination_out!=NULL); - - assert(class!=NULL); - - if (jobid_unique_pathname(ctx, job, &ju, &ju_path, 1) != 0) { - err.code = ctx->error->code; - err.desc = "Cannot obtain jobid unique path/name"; - return glite_jp_stack_error(ctx,&err); - } - - peername = glite_jp_peer_name(ctx); - if (peername == NULL) { - err.code = EINVAL; - err.desc = "Cannot obtain client certificate info"; - goto error_out; - } - - trio_asprintf(&stmt, "select owner, reg_time from jobs" - " where jobid='%|Ss'", ju); - - if (!stmt) { - err.code = ENOMEM; - goto error_out; - } - - if ((db_retn = glite_jp_db_execstmt(ctx, stmt, &db_res)) <= 0) { - if (db_retn == 0) { - err.code = ENOENT; - err.desc = "No such job registered"; - } else { - err.code = EIO; - err.desc = "DB access failed"; - } - goto error_out; - } - - db_retn = glite_jp_db_fetchrow(db_res, db_row); - if (db_retn != 2) { - glite_jp_db_freestmt(&db_res); - err.code = EIO; - err.desc = "DB access failed"; - goto error_out; - } - - glite_jp_db_freestmt(&db_res); - - /* XXX authorization done in soap_ops.c */ - - /* XXX name length */ - printf("data_basename: %s\n", data_basename); - if (asprintf(&data_basename, "%s%s%s", class, - (name != NULL) ? "." : "", - (name != NULL) ? name : "") == -1) { - err.code = ENOMEM; - goto error_out; - } - - if (asprintf(&data_fname, "%s/data/%s/%d/%s/%s", - config->internal_path, db_row[0], - regtime_trunc(glite_jp_db_dbtotime(db_row[1])), - ju, data_basename) == -1) { - err.code = ENOMEM; - goto error_out; - } - if (asprintf(destination_out, "%s/data/%s/%d/%s/%s", - config->external_path, db_row[0], - regtime_trunc(glite_jp_db_dbtotime(db_row[1])), - ju, data_basename) == -1) { - err.code = ENOMEM; - goto error_out; - } - - if (commit_before_inout != NULL) - /* XXX no timeout enforced */ - /* XXX: gsoap does not like so much, one year should be enough - *commit_before_inout = (time_t) LONG_MAX; - */ - *commit_before_inout = time(NULL) + 365*24*60*60; - - /* - if (add_to_gridmap(ctx, peername)) { - err.code = EIO; - err.desc = "Cannot add peer DN to ftp server authorization file"; - goto error_out; - } - */ - - peerhash = str2md5(peername); /* static buffer */ - if (store_user(ctx, peerhash, peername)) { - err.code = EIO; - err.desc = "Cannot store upload user entry"; - goto error_out; - } - - free(stmt); stmt = NULL; - trio_asprintf(&stmt,"insert into files" - "(jobid,filename,int_path,ext_url,state,deadline,ul_userid) " - "values ('%|Ss','%|Ss','%|Ss','%|Ss','%|Ss', '%|Ss', '%|Ss')", - ju, data_basename, data_fname, *destination_out, "uploading", - glite_jp_db_timetodb(*commit_before_inout), peerhash); - if (!stmt) { - err.code = ENOMEM; - goto error_out; - } - - if (glite_jp_db_execstmt(ctx, stmt, NULL) < 0) { - if (ctx->error->code == EEXIST) { - err.code = EEXIST; - err.desc = "File already stored or upload in progress"; - } else { - err.code = EIO; - err.desc = "DB access failed"; - } - goto error_out; - } - -error_out: - free(db_row[0]); free(db_row[1]); - free(stmt); - free(data_basename); - free(data_fname); - free(ju); free(ju_path); - if (err.code) { - return glite_jp_stack_error(ctx,&err); - } else { - return 0; - } -} - -int glite_jppsbe_commit_upload( - glite_jp_context_t ctx, - const char *destination -) -{ - char *peername = NULL; - char *peerhash = NULL; - - char *stmt = NULL; - glite_jp_db_stmt_t db_res; - int db_retn; - char *db_row[7] = { NULL, NULL, NULL, NULL, NULL, NULL, NULL }; - int i; - - glite_jp_error_t err; - - glite_jp_clear_error(ctx); - memset(&err,0,sizeof err); - err.source = __FUNCTION__; - - assert(destination != NULL); - - trio_asprintf(&stmt, "select * from files where " - "ext_url='%|Ss' and state='uploading'", destination); - if (!stmt) { - err.code = ENOMEM; - goto error_out; - } - - if ((db_retn = glite_jp_db_execstmt(ctx, stmt, &db_res)) <= 0) { - if (db_retn == 0) { - err.code = ENOENT; - err.desc = "No such upload in progress"; - } else { - err.code = EIO; - err.desc = "DB access failed"; - } - goto error_out; - } - - db_retn = glite_jp_db_fetchrow(db_res, db_row); - if (db_retn != 7) { - glite_jp_db_freestmt(&db_res); - err.code = EIO; - err.desc = "DB access failed"; - goto error_out; - } - glite_jp_db_freestmt(&db_res); - - peername = glite_jp_peer_name(ctx); - if (peername == NULL) { - err.code = EINVAL; - err.desc = "Cannot obtain client certificate info"; - goto error_out; - } - - peerhash = str2md5(peername); /* static buffer */ - if (strcmp(peerhash, db_row[6])) { - err.code = EPERM; - err.desc = "Upload started by client with different identity"; - goto error_out; - } - - free(stmt); - trio_asprintf(&stmt,"update files set state='committed', deadline=NULL " - "where jobid='%|Ss' and filename='%|Ss'", db_row[0], db_row[1]); - - if (!stmt) { - err.code = ENOMEM; - goto error_out; - } - - if (glite_jp_db_execstmt(ctx, stmt, NULL) < 0) { - err.code = EIO; - err.desc = "DB access failed"; - goto error_out; - } -error_out: - for (i=0; i<7; i++) free(db_row[i]); - free(peername); - free(stmt); - if (err.code) { - return glite_jp_stack_error(ctx,&err); - } else { - return 0; - } -} - -int glite_jppsbe_destination_info( - glite_jp_context_t ctx, - const char *destination, - char **job, - char **class, - char **name -) -{ - char *stmt = NULL; - glite_jp_db_stmt_t db_res; - int db_retn; - char *db_row[2] = { NULL, NULL}; - int i; - char *cp = NULL; - - char *classname = NULL; - glite_jp_error_t err; - - assert(destination != NULL); - assert(job != NULL); - assert(class != NULL); - assert(name != NULL); - - glite_jp_clear_error(ctx); - memset(&err,0,sizeof err); - err.source = __FUNCTION__; - - - trio_asprintf(&stmt, "select j.dg_jobid,f.filename from jobs j,files f where " - "f.ext_url='%|Ss' and j.jobid=f.jobid", destination); - if (!stmt) { - err.code = ENOMEM; - goto error_out; - } - - if ((db_retn = glite_jp_db_execstmt(ctx, stmt, &db_res)) <= 0) { - if (db_retn == 0) { - err.code = ENOENT; - err.desc = "Invalid destination string"; - } else { - err.code = EIO; - err.desc = "DB access failed"; - } - goto error_out; - } - - db_retn = glite_jp_db_fetchrow(db_res, db_row); - if (db_retn != 2) { - glite_jp_db_freestmt(&db_res); - err.code = EIO; - err.desc = "DB access failed"; - goto error_out; - } - glite_jp_db_freestmt(&db_res); - - *job = strdup(db_row[0]); - - cp = strchr(db_row[1],'.'); - if (!cp) { - *name = NULL; - } else { - *cp++ = '\0'; - *name = strdup(cp); - } - *class = strdup(db_row[1]); - - if (!*job || !*class) { - err.code = ENOMEM; - goto error_out; - } - -error_out: - for (i=0; i<2; i++) free(db_row[i]); - free(stmt); - if (err.code) { - return glite_jp_stack_error(ctx,&err); - } else { - return 0; - } -} - - -int glite_jppsbe_get_job_url( - glite_jp_context_t ctx, - const char *job, - const char *class, - const char *name, - char **url_out -) -{ - char *data_basename = NULL; - char *data_fname = NULL; - char *ju = NULL; - char *ju_path = NULL; - - char *stmt = NULL; - glite_jp_db_stmt_t db_res; - int db_retn; - char *db_row[3] = { NULL, NULL, NULL }; - - long reg_time; - glite_jp_error_t err; - - glite_jp_clear_error(ctx); - memset(&err,0,sizeof err); - err.source = __FUNCTION__; - - assert(job!=NULL); - assert(url_out != NULL); - - assert(class!=NULL); - - if (jobid_unique_pathname(ctx, job, &ju, &ju_path, 1) != 0) { - err.code = ctx->error->code; - err.desc = "Cannot obtain jobid unique path/ : ""name"; - return glite_jp_stack_error(ctx,&err); - } - - trio_asprintf(&stmt, "select j.owner,reg_time,u.cert_subj from jobs j, users u " - "where j.jobid='%|Ss' and j.owner = u.userid", ju); - - if (!stmt) { - err.code = ENOMEM; - goto error_out; - } - - if ((db_retn = glite_jp_db_execstmt(ctx, stmt, &db_res)) <= 0) { - if (db_retn == 0) { - err.code = ENOENT; - err.desc = "No such job registered"; - } else { - err.code = EIO; - err.desc = "DB access failed"; - } - goto error_out; - } - - free(stmt); stmt = NULL; - - db_retn = glite_jp_db_fetchrow(db_res, db_row); - if (db_retn != 3) { - glite_jp_db_freestmt(&db_res); - err.code = EIO; - err.desc = "DB access failed"; - goto error_out; - } - - glite_jp_db_freestmt(&db_res); - - if (glite_jpps_authz(ctx,SOAP_TYPE___jpsrv__GetJobFiles,job,db_row[2])) { - err.code = EPERM; - goto error_out; - } - - /* XXX name length */ - if (asprintf(&data_basename, "%s%s%s", class, - (name != NULL) ? "." : "", - (name != NULL) ? name : "") == -1) { - err.code = ENOMEM; - goto error_out; - } - - if (asprintf(url_out, "%s/data/%s/%d/%s/%s", - config->external_path, db_row[0], - regtime_trunc(glite_jp_db_dbtotime(db_row[1])), - ju, data_basename) == -1) { - err.code = ENOMEM; - goto error_out; - } - - trio_asprintf(&stmt,"select 'x' from files where jobid='%|Ss' " - "and ext_url = '%|Ss' " - "and state='committed' ",ju,*url_out); - - if ((db_retn = glite_jp_db_execstmt(ctx,stmt,&db_res)) <= 0) { - if (db_retn == 0) { - err.code = ENOENT; - err.desc = "not uploaded yet"; - } - else { - err.code = EIO; - err.desc = "DB access failed"; - } - /* goto error_out; */ - } - -error_out: - free(db_row[0]); free(db_row[1]); - free(stmt); - free(data_basename); - free(ju); free(ju_path); - if (err.code) { - return glite_jp_stack_error(ctx,&err); - } else { - return 0; - } -} - -static int get_job_fname( - glite_jp_context_t ctx, - const char *job, - const char *class, - const char *name, - char **fname_out -) -{ - char *data_basename = NULL; - char *ju = NULL; - char *ju_path = NULL; - - char *stmt = NULL; - glite_jp_db_stmt_t db_res; - int db_retn; - char *db_row[2] = { NULL, NULL }; - - long reg_time; - glite_jp_error_t err; - - glite_jp_clear_error(ctx); - memset(&err,0,sizeof err); - err.source = __FUNCTION__; - - assert(job!=NULL); - assert(fname_out != NULL); - - assert(class!=NULL); - - if (jobid_unique_pathname(ctx, job, &ju, &ju_path, 1) != 0) { - err.code = ctx->error->code; - err.desc = "Cannot obtain jobid unique path/name"; - return glite_jp_stack_error(ctx,&err); - } - - trio_asprintf(&stmt, "select owner, reg_time from jobs " - "where jobid='%|Ss'", ju); - - if (!stmt) { - err.code = ENOMEM; - goto error_out; - } - - if ((db_retn = glite_jp_db_execstmt(ctx, stmt, &db_res)) <= 0) { - if (db_retn == 0) { - err.code = ENOENT; - err.desc = "No such job registered"; - } else { - err.code = EIO; - err.desc = "DB access failed"; - } - goto error_out; - } - - db_retn = glite_jp_db_fetchrow(db_res, db_row); - if (db_retn != 2) { - glite_jp_db_freestmt(&db_res); - err.code = EIO; - err.desc = "DB access failed"; - goto error_out; - } - - glite_jp_db_freestmt(&db_res); - - /* XXX name length */ - if (asprintf(&data_basename, "%s%s%s", class, - (name != NULL) ? "." : "", (name != NULL) ? name : "") == -1) { - err.code = ENOMEM; - goto error_out; - } - - if (asprintf(fname_out, "%s/data/%s/%d/%s/%s", - config->internal_path, db_row[0], - regtime_trunc(glite_jp_db_dbtotime(db_row[1])), - ju, data_basename) == -1) { - err.code = ENOMEM; - goto error_out; - } - -error_out: - free(db_row[0]); free(db_row[1]); - free(stmt); - free(data_basename); - free(ju); free(ju_path); - if (err.code) { - return glite_jp_stack_error(ctx,&err); - } else { - return 0; - } -} - - -int glite_jppsbe_open_file( - glite_jp_context_t ctx, - const char *job, - const char *class, - const char *name, - int mode, - void **handle_out -) -{ - fhandle handle = NULL; - char* fname = NULL; - glite_jp_error_t err; - - assert(handle_out != NULL); - - glite_jp_clear_error(ctx); - memset(&err,0,sizeof err); - err.source = __FUNCTION__; - - if (get_job_fname(ctx, job, class, name, &fname)) { - err.code = ctx->error->code; - err.desc = "Cannot construct internal filename"; - return glite_jp_stack_error(ctx,&err); - } - - handle = (fhandle) calloc(1,sizeof(*handle)); - if (handle == NULL) { - err.code = ENOMEM; - goto error_out; - } - - handle->fd = open(fname, mode, S_IRUSR | S_IWUSR); - if (handle->fd < 0) { - err.code = errno; - err.desc = "Cannot open requested file"; - free(handle); - goto error_out; - } - handle->fd_append = open(fname, mode | O_APPEND, S_IRUSR | S_IWUSR); - if (handle->fd_append < 0) { - err.code = errno; - err.desc = "Cannot open requested file for append"; - close(handle->fd); - free(handle); - goto error_out; - } - *handle_out = (void*) handle; - -error_out: - free(fname); - if (err.code) { - return glite_jp_stack_error(ctx,&err); - } else { - return 0; - } -} - -int glite_jppsbe_close_file( - glite_jp_context_t ctx, - void *handle -) -{ - glite_jp_error_t err; - - assert(handle != NULL); - - glite_jp_clear_error(ctx); - memset(&err,0,sizeof err); - err.source = __FUNCTION__; - - if (close(((fhandle)handle)->fd_append) < 0) { - err.code = errno; - err.desc = "Error closing file descriptor (fd_append)"; - goto error_out; - } - if (close(((fhandle)handle)->fd) < 0) { - err.code = errno; - err.desc = "Error closing file descriptor"; - goto error_out; - } - -error_out: - free(handle); - if (err.code) { - return glite_jp_stack_error(ctx,&err); - } else { - return 0; - } -} - -int glite_jppsbe_file_attrs(glite_jp_context_t ctx, void *handle, struct stat *buf){ - glite_jp_error_t err; - - assert(handle != NULL); - - glite_jp_clear_error(ctx); - memset(&err,0,sizeof err); - err.source = __FUNCTION__; - - if (! fstat(((fhandle)handle)->fd, buf)) { - err.code = errno; - err.desc = "Error calling fstat"; - return -1; - } - - return 0; -} - -int glite_jppsbe_pread( - glite_jp_context_t ctx, - void *handle, - void *buf, - size_t nbytes, - off_t offset, - ssize_t *nbytes_ret -) -{ - ssize_t ret; - glite_jp_error_t err; - - assert(handle != NULL); - assert(buf != NULL); - - glite_jp_clear_error(ctx); - memset(&err,0,sizeof err); - err.source = __FUNCTION__; - - if ((ret = pread(((fhandle)handle)->fd, buf, nbytes, offset)) < 0) { - err.code = errno; - err.desc = "Error in pread()"; - return glite_jp_stack_error(ctx,&err); - } - *nbytes_ret = ret; - - return 0; -} - -int glite_jppsbe_pwrite( - glite_jp_context_t ctx, - void *handle, - void *buf, - size_t nbytes, - off_t offset -) -{ - glite_jp_error_t err; - - assert(handle != NULL); - assert(buf != NULL); - - glite_jp_clear_error(ctx); - memset(&err,0,sizeof err); - err.source = __FUNCTION__; - - if (pwrite(((fhandle)handle)->fd, buf, nbytes, offset) < 0) { - err.code = errno; - err.desc = "Error in pwrite()"; - return glite_jp_stack_error(ctx,&err); - } - - return 0; -} - -int glite_jppsbe_append( - glite_jp_context_t ctx, - void *handle, - void *buf, - size_t nbytes -) -{ - glite_jp_error_t err; - - assert(handle != NULL); - assert(buf != NULL); - - glite_jp_clear_error(ctx); - memset(&err,0,sizeof err); - err.source = __FUNCTION__; - - if (write(((fhandle)handle)->fd_append, buf, nbytes) < 0) { - err.code = errno; - err.desc = "Error in write()"; - return glite_jp_stack_error(ctx,&err); - } - - return 0; -} - -static int get_job_info( - glite_jp_context_t ctx, - const char *job, - char **owner, - struct timeval *tv_reg -) -{ - char *qry,*col[2]; - int rows; - glite_jp_error_t err; - glite_jp_db_stmt_t s = NULL; - - memset(&err,0,sizeof err); - err.source = __FUNCTION__; - glite_jp_clear_error(ctx); - - trio_asprintf(&qry,"select u.cert_subj,j.reg_time " - "from jobs j, users u " - "where j.owner = u.userid " - "and j.dg_jobid = '%|Ss'",job); - - if ((rows = glite_jp_db_execstmt(ctx,qry,&s)) <= 0) { - if (rows == 0) { - err.code = ENOENT; - err.desc = "No records for this job"; - } - else { - err.code = EIO; - err.desc = "DB call fail retrieving job files"; - } - glite_jp_stack_error(ctx,&err); - goto cleanup; - } - - if (glite_jp_db_fetchrow(s,col) < 0) { - err.code = EIO; - err.desc = "DB call fail retrieving job files"; - glite_jp_stack_error(ctx,&err); - goto cleanup; - } - - *owner = col[0]; - tv_reg->tv_sec = glite_jp_db_dbtotime(col[1]); - tv_reg->tv_usec = 0; - free(col[1]); - -cleanup: - free(qry); - if (s) glite_jp_db_freestmt(&s); - return err.code; -} - -#if 0 /* called from query */ -static int get_job_info_int( - glite_jp_context_t ctx, - const char *int_fname, - char **jobid, - char **owner, - struct timeval *tv_reg -) -{ - FILE *regfile = NULL; - long reg_time_sec; - long reg_time_usec; - int ownerlen = 0; - int info_version; - char jobid_buf[256]; - glite_jp_error_t err; - - glite_jp_clear_error(ctx); - memset(&err,0,sizeof err); - err.source = __FUNCTION__; - - regfile = fopen(int_fname, "r"); - if (regfile == NULL) { - err.code = errno; - err.desc = "Cannot open jobs's reg info file"; - goto error_out; - } - if (fscanf(regfile, "%d %ld.%ld %s %*s %d ", &info_version, - ®_time_sec, ®_time_usec, jobid_buf, &ownerlen) < 5 || ferror(regfile)) { - fclose(regfile); - err.code = errno; - err.desc = "Cannot read jobs's reg info file"; - goto error_out; - } - *jobid = strdup(jobid_buf); - if (ownerlen) { - *owner = (char *) calloc(1, ownerlen+1); - if (!*owner) { - err.code = ENOMEM; - goto error_out; - } - if (fgets(*owner, ownerlen+1, regfile) == NULL) { - fclose(regfile); - free(*owner); - err.code = errno; - err.desc = "Cannot read jobs's reg info file"; - goto error_out; - } - } - fclose(regfile); - - tv_reg->tv_sec = reg_time_sec; - tv_reg->tv_usec = reg_time_usec; - -error_out: - if (err.code) { - return glite_jp_stack_error(ctx,&err); - } else { - return 0; - } -} - -#endif - -int glite_jppsbe_get_job_metadata( - glite_jp_context_t ctx, - const char *job, - glite_jp_attrval_t attrs_inout[] -) -{ - int got_info = 0; - struct timeval tv_reg; - char *owner = NULL; -/* do in plugin - int got_tags = 0; - void *tags_handle = NULL; - glite_jp_tagval_t* tags = NULL; -*/ - int i,j; - glite_jp_error_t err; - - assert(job != NULL); - assert(attrs_inout != NULL); - - glite_jp_clear_error(ctx); - memset(&err,0,sizeof err); - err.source = __FUNCTION__; - - for (i = 0; attrs_inout[i].name; i++) { -/* must be implemented via filetype plugin - case GLITE_JP_ATTR_TIME: -*/ - if (!strcmp(attrs_inout[i].name,GLITE_JP_ATTR_OWNER) - || !strcmp(attrs_inout[i].name,GLITE_JP_ATTR_REGTIME)) { - if (!got_info) { - if (get_job_info(ctx, job, &owner, &tv_reg)) { - err.code = ctx->error->code; - err.desc = "Cannot retrieve job info"; - goto error_out; - } - got_info = 1; - } - } - -/* must be implemented via filetype plugin - case GLITE_JP_ATTR_TAG: - if (!got_tags) { - if (glite_jppsbe_open_file(ctx, job, GLITE_JP_FILECLASS_TAGS, - O_RDONLY, &tags_handle)) { - err.code = ctx->error->code; - err.desc = "Cannot open tag file"; - goto error_out; - } - if (glite_jpps_tag_readall(ctx, tags_handle, &tags)) { - err.code = ctx->error->code; - err.desc = "Cannot read tags"; - glite_jppsbe_close_file(ctx, tags_handle); - goto error_out; - } - glite_jppsbe_close_file(ctx, tags_handle); - got_tags = 1; - } - break; -*/ - else { - err.code = EINVAL; - err.desc = "Invalid attribute type"; - goto error_out; - break; - } - - if (!strcmp(attrs_inout[i].name,GLITE_JP_ATTR_OWNER)) { - attrs_inout[i].value = strdup(owner); - if (!attrs_inout[i].value) { - err.code = ENOMEM; - err.desc = "Cannot copy owner string"; - goto error_out; - } - attrs_inout[i].origin = GLITE_JP_ATTR_ORIG_SYSTEM; - attrs_inout[i].origin_detail = NULL; - - /* XXX */ - attrs_inout[i].timestamp = tv_reg.tv_sec; - } - - if (!strcmp(attrs_inout[i].name,GLITE_JP_ATTR_REGTIME)) { - trio_asprintf(&attrs_inout[i].value,"%ld.%06ld",tv_reg.tv_sec,tv_reg.tv_usec); - attrs_inout[i].origin = GLITE_JP_ATTR_ORIG_SYSTEM; - attrs_inout[i].origin_detail = NULL; - attrs_inout[i].timestamp = tv_reg.tv_sec; - } - -/* TODO: - case GLITE_JP_ATTR_TIME: - attrs_inout[i].value.time = tv_reg; - break; -*/ - -/* must be implemented via filetype plugin - case GLITE_JP_ATTR_TAG: - for (j = 0; tags[j].name != NULL; j++) { - if (!strcmp(tags[j].name, attrs_inout[i].attr.name)) { - if (glite_jpps_tagval_copy(ctx, &tags[j], - &attrs_inout[i].value.tag)) { - err.code = ENOMEM; - err.desc = "Cannot copy tag value"; - goto error_out; - } - break; - } - } - if (!tags[j].name) attrs_inout[i].value.tag.name = NULL; - break; -*/ - } - -error_out: - free(owner); -/* plugin - if (tags) for (j = 0; tags[j].name != NULL; j++) { - free(tags[j].name); - free(tags[j].value); - } - free(tags); -*/ - - if (err.code) { - while (i > 0) { - i--; - glite_jp_attrval_free(attrs_inout+i,0); - } - return glite_jp_stack_error(ctx,&err); - } else { - return 0; - } -} -static int compare_timeval(struct timeval a, struct timeval b) -{ - if (a.tv_sec < b.tv_sec) return -1; - if (a.tv_sec > b.tv_sec) return 1; - if (a.tv_usec < b.tv_usec) return -1; - if (a.tv_usec > b.tv_usec) return 1; - return 0; -} - - -/* FIXME: disabled -- clarification wrt. filetype plugin needed */ - -#if 0 - -static int query_phase2( - glite_jp_context_t ctx, - const char *ownerhash, - long regtime_tr, - int q_tags, - int md_tags, - const glite_jp_query_rec_t query[], - glite_jp_attrval_t metadata[], - int (*callback)( - glite_jp_context_t ctx, - const char *job, - const glite_jp_attrval_t metadata[] - ) -); - -static int query_phase2( - glite_jp_context_t ctx, - const char *ownerhash, - long regtime_tr, - int q_tags, - int md_tags, - const glite_jp_query_rec_t query[], - glite_jp_attrval_t metadata[], - int (*callback)( - glite_jp_context_t ctx, - const char *job, - const glite_jp_attrval_t metadata[] - ) -) -{ - char *time_dirname = NULL; - DIR *time_dirp = NULL; - struct dirent *jobent; - char *info_fname = NULL; - char *jobid = NULL; - char *owner = NULL; - struct timeval tv_reg; - void *tags_handle = NULL; - int matching; - int i, j; - glite_jp_tagval_t* tags = NULL; - glite_jp_error_t err; - - glite_jp_clear_error(ctx); - memset(&err,0,sizeof err); - err.source = __FUNCTION__; - - if (asprintf(&time_dirname, "%s/data/%s/%d", config->internal_path, - ownerhash, regtime_tr) == -1) { - err.code = ENOMEM; - return glite_jp_stack_error(ctx,&err); - } - time_dirp = opendir(time_dirname); - if (!time_dirp) { - free(time_dirname); - return 0; /* found nothing */ - } - while ((jobent = readdir(time_dirp)) != NULL) { - if (!strcmp(jobent->d_name, ".")) continue; - if (!strcmp(jobent->d_name, "..")) continue; - if (asprintf(&info_fname, "%s/%s/_info", time_dirname, - jobent->d_name) == -1) { - err.code = ENOMEM; - goto error_out; - } - if (get_job_info_int(ctx, info_fname, &jobid, &owner, &tv_reg)) { - err.code = EIO; - err.desc = "Cannot retrieve job info"; - goto error_out; - } - if (q_tags || md_tags) { - if (glite_jppsbe_open_file(ctx, jobid, GLITE_JP_FILECLASS_TAGS, - O_RDONLY, &tags_handle)) { - err.code = ctx->error->code; - err.desc = "Cannot open tag file"; - goto error_out; - } - if (glite_jpps_tag_readall(ctx, tags_handle, &tags)) { - err.code = ctx->error->code; - err.desc = "Cannot read tags"; - glite_jppsbe_close_file(ctx, tags_handle); - goto error_out; - } - glite_jppsbe_close_file(ctx, tags_handle); - tags_handle = NULL; - } - - matching = 1; - for (i = 0; matching && query[i].attr.type != GLITE_JP_ATTR_UNDEF; i++) { - switch (query[i].attr.type) { - case GLITE_JP_ATTR_OWNER: - if (query[i].value.s == NULL || - strcmp(query[i].value.s, owner)) matching = 0; - break; - case GLITE_JP_ATTR_TIME: - switch (query[i].op) { - case GLITE_JP_QUERYOP_EQUAL: - matching = !compare_timeval(tv_reg, query[i].value.time); - break; - case GLITE_JP_QUERYOP_UNEQUAL: - matching = compare_timeval(tv_reg, query[i].value.time); - break; - case GLITE_JP_QUERYOP_LESS: - matching = compare_timeval(tv_reg, query[i].value.time) < 0; - break; - case GLITE_JP_QUERYOP_GREATER: - matching = compare_timeval(tv_reg, query[i].value.time) > 0; - break; - case GLITE_JP_QUERYOP_WITHIN: - matching = compare_timeval(tv_reg, query[i].value.time) >= 0 - && compare_timeval(tv_reg, query[i].value2.time) <= 0; - break; - } - break; - case GLITE_JP_ATTR_TAG: - if (!tags) { - matching = 0; - break; - } - for (j = 0; tags[j].name != NULL; j++) { - if (!strcmp(tags[j].name, query[i].attr.name)) { - switch (query[i].op) { - case GLITE_JP_QUERYOP_EQUAL: - matching = !strcmp(tags[j].value, query[i].value.s); - break; - case GLITE_JP_QUERYOP_UNEQUAL: - matching = strcmp(tags[j].value, query[i].value.s); - break; - case GLITE_JP_QUERYOP_LESS: - matching = strcmp(tags[j].value, query[i].value.s) < 0; - break; - case GLITE_JP_QUERYOP_GREATER: - matching = strcmp(tags[j].value, query[i].value.s) > 0; - break; - case GLITE_JP_QUERYOP_WITHIN: - matching = strcmp(tags[j].value, query[i].value.s) >= 0 \ - && strcmp(tags[j].value, query[i].value2.s) <= 0 ; - break; - default: - break; - } - } - } - break; - default: - break; - } - } - if (!matching) { - free(info_fname); info_fname = NULL; - free(jobid); jobid = NULL; - if (tags) for (j = 0; tags[j].name != NULL; j++) { - free(tags[j].name); - free(tags[j].value); - } - free(tags); tags = NULL; - continue; - } - - for (i = 0; metadata[i].attr.type != GLITE_JP_ATTR_UNDEF; i++) { - switch (metadata[i].attr.type) { - case GLITE_JP_ATTR_OWNER: - metadata[i].value.s = owner; - break; - case GLITE_JP_ATTR_TIME: - metadata[i].value.time = tv_reg; - break; - case GLITE_JP_ATTR_TAG: - for (j = 0; tags[j].name != NULL; j++) { - if (!strcmp(tags[j].name, metadata[i].attr.name)) { - if (glite_jpps_tagval_copy(ctx, &tags[j], - &metadata[i].value.tag)) { - err.code = ENOMEM; - err.desc = "Cannot copy tag value"; - goto error_out; - } - break; - } - } - if (!tags[j].name) { - metadata[i].value.tag.name = NULL; - metadata[i].value.tag.value = NULL; - } - break; - default: - break; - } - } - (*callback)(ctx, jobid, metadata); - free(jobid); jobid = NULL; - while (i > 0) { - i--; - switch (metadata[i].attr.type) { - case GLITE_JP_ATTR_TAG: - free(metadata[i].value.tag.name); - free(metadata[i].value.tag.value); - default: - break; - } - } - } - -error_out: - if (tags) for (j = 0; tags[j].name != NULL; j++) { - free(tags[j].name); - free(tags[j].value); - } - if (tags_handle) glite_jppsbe_close_file(ctx, tags_handle); - free(info_fname); - free(owner); - free(jobid); - closedir(time_dirp); - free(time_dirname); - if (err.code) { - while (i > 0) { - i--; - switch (metadata[i].attr.type) { - case GLITE_JP_ATTR_TAG: - free(metadata[i].value.tag.name); - free(metadata[i].value.tag.value); - default: - break; - } - } - return glite_jp_stack_error(ctx,&err); - } else - return 0; -} - -int glite_jppsbe_query( - glite_jp_context_t ctx, - const glite_jp_query_rec_t query[], - const glite_jp_attrval_t metadata[], - void *arg, - int (*callback)( - glite_jp_context_t ctx, - const char *job, - const glite_jp_attrval_t metadata[], - void *arg - ) -) -{ - /* XXX clone metadata */ - int i; - char *q_exact_owner = NULL; - char *ownerhash = NULL; - long q_min_time = 0; - long q_max_time = LONG_MAX; - long q_min_time_tr; - long q_max_time_tr; - int q_with_tags = 0; - int md_info = 0; - int md_tags = 0; - char *owner_dirname = NULL; - DIR *owner_dirp = NULL; - struct dirent *ttimeent; - char *data_dirname = NULL; - DIR *data_dirp = NULL; - struct dirent *ownerent; - long ttime = 0; - glite_jp_attrval_t *metadata_templ = NULL; - glite_jp_error_t err; - - glite_jp_clear_error(ctx); - memset(&err,0,sizeof err); - err.source = __FUNCTION__; - - for (i = 0; query[i].attr.type != GLITE_JP_ATTR_UNDEF; i++) { - if (query[i].attr.type == GLITE_JP_ATTR_OWNER && query[i].op == GLITE_JP_QUERYOP_EQUAL) { - q_exact_owner = query[i].value.s; - } - if (query[i].attr.type == GLITE_JP_ATTR_TIME) { - switch (query[i].op) { - case GLITE_JP_QUERYOP_EQUAL: - q_min_time = query[i].value.time.tv_sec; - q_max_time = query[i].value.time.tv_sec + 1; - break; - case GLITE_JP_QUERYOP_LESS: - if (q_max_time > query[i].value.time.tv_sec + 1) - q_max_time = query[i].value.time.tv_sec + 1; - break; - case GLITE_JP_QUERYOP_WITHIN: - if (q_max_time > query[i].value2.time.tv_sec + 1) - q_max_time = query[i].value2.time.tv_sec + 1; - /* fallthrough */ - case GLITE_JP_QUERYOP_GREATER: - if (q_min_time < query[i].value.time.tv_sec) - q_min_time = query[i].value.time.tv_sec; - break; - default: - err.code = EINVAL; - err.desc = "Invalid query op"; - return glite_jp_stack_error(ctx,&err); - break; - } - } - if (query[i].attr.type == GLITE_JP_ATTR_TAG) - q_with_tags = 1; - - } - - for (i = 0; metadata[i].attr.type != GLITE_JP_ATTR_UNDEF; i++) { - switch (metadata[i].attr.type) { - case GLITE_JP_ATTR_OWNER: - case GLITE_JP_ATTR_TIME: - md_info = 1; - break; - case GLITE_JP_ATTR_TAG: - md_tags = 1; - break; - default: - err.code = EINVAL; - err.desc = "Invalid attribute type in metadata parameter"; - return glite_jp_stack_error(ctx,&err); - break; - } - } - metadata_templ = (glite_jp_attrval_t *) calloc(i + 1, sizeof(glite_jp_attrval_t)); - if (!metadata_templ) { - err.code = ENOMEM; - return glite_jp_stack_error(ctx,&err); - } - memcpy(metadata_templ, metadata, (i + 1) * sizeof(glite_jp_attrval_t)); - - q_min_time_tr = regtime_trunc(q_min_time); - q_max_time_tr = regtime_ceil(q_max_time); - - if (q_exact_owner) { - ownerhash = str2md5(q_exact_owner); /* static buffer */ - if (asprintf(&owner_dirname, "%s/data/%s", config->internal_path, ownerhash) == -1) { - err.code = ENOMEM; - return glite_jp_stack_error(ctx,&err); - } - owner_dirp = opendir(owner_dirname); - free(owner_dirname); - if (!owner_dirp) { - free(metadata_templ); - return 0; /* found nothing */ - } - while ((ttimeent = readdir(owner_dirp)) != NULL) { - if (!strcmp(ttimeent->d_name, ".")) continue; - if (!strcmp(ttimeent->d_name, "..")) continue; - ttime = atol(ttimeent->d_name); - if (ttime >= q_min_time_tr && ttime < q_max_time_tr) { - if (query_phase2(ctx, ownerhash, ttime, q_with_tags, md_tags, - query, metadata_templ, callback)) { - err.code = EIO; - err.desc = "query_phase2() error"; - goto error_out; - } - } - } - } else { /* !q_exact_owner */ - if (asprintf(&data_dirname, "%s/data", config->internal_path) == -1) { - err.code = ENOMEM; - goto error_out; - } - data_dirp = opendir(data_dirname); - if (!data_dirp) { - err.code = EIO; - err.desc = "Cannot open data directory"; - goto error_out; - } - while ((ownerent = readdir(data_dirp)) != NULL) { - if (!strcmp(ownerent->d_name, ".")) continue; - if (!strcmp(ownerent->d_name, "..")) continue; - if (asprintf(&owner_dirname, "%s/data/%s", config->internal_path, - ownerent->d_name) == -1) { - err.code = ENOMEM; - goto error_out; - } - owner_dirp = opendir(owner_dirname); - free(owner_dirname); - if (!owner_dirp) { - err.code = EIO; - err.desc = "Cannot open owner data directory"; - goto error_out; - } - while ((ttimeent = readdir(owner_dirp)) != NULL) { - if (!strcmp(ttimeent->d_name, ".")) continue; - if (!strcmp(ttimeent->d_name, "..")) continue; - ttime = atol(ttimeent->d_name); - if (ttime >= q_min_time_tr && ttime < q_max_time_tr) { - if (query_phase2(ctx, ownerent->d_name, ttime, q_with_tags, md_tags, - query, metadata_templ, callback)) { - err.code = EIO; - err.desc = "query_phase2() error"; - goto error_out; - } - } - } - closedir(owner_dirp); owner_dirp = NULL; - } - closedir(data_dirp); data_dirp = NULL; - } - return 0; - -error_out: - if (owner_dirp) closedir(owner_dirp); - if (data_dirp) closedir(data_dirp); - free(data_dirname); - free(metadata_templ); - return glite_jp_stack_error(ctx,&err); -} - -#else - -int glite_jppsbe_query( - glite_jp_context_t ctx, - const glite_jp_query_rec_t query[], - char * attrs[], - void *arg, - int (*callback)( - glite_jp_context_t ctx, - const char *job, - const glite_jp_attrval_t metadata[], - void *arg - ) -) -{ - glite_jp_error_t err; - int i,ret; - int quser = 0, muser = -1, mtime = -1; - char *where = NULL,*stmt = NULL,*aux = NULL, *cols = NULL; - char *qres[3] = { NULL, NULL, NULL }; - int cmask = 0, owner_idx = -1, reg_idx = -1; - glite_jp_db_stmt_t q = NULL; - glite_jp_attrval_t metadata[3]; - - memset(&err,0,sizeof err); - glite_jp_clear_error(ctx); - err.source = __FUNCTION__; - - /* XXX: assuming not more than 2 */ - memset(metadata,0, sizeof metadata); - - /* XXX: const discarding is OK */ - for (i=0;attrs[i]; i++) { - assert(i<2); - metadata[i].name = (char *) attrs[i]; - } - - for (i=0; query[i].attr; i++) { - char *qitem; - - /* XXX: don't assert() */ - assert(!query[i].binary); - - if (!strcmp(query[i].attr,GLITE_JP_ATTR_OWNER)) { - switch (query[i].op) { - case GLITE_JP_QUERYOP_EQUAL: - quser = 1; - trio_asprintf(&qitem,"u.cert_subj = '%|Ss'",query[i].value); - break; - default: - err.code = EINVAL; - err.desc = "only = allowed for owner queries"; - glite_jp_stack_error(ctx,&err); - goto cleanup; - } - } - else if (!strcmp(query[i].attr,GLITE_JP_ATTR_REGTIME)) { - time_t t = glite_jp_attr2time(query[i].value); - char *t1 = glite_jp_db_timetodb(t),*t2 = NULL; - - switch (query[i].op) { - case GLITE_JP_QUERYOP_EQUAL: - trio_asprintf(&qitem,"j.reg_time = %s",t1); - break; - case GLITE_JP_QUERYOP_UNEQUAL: - trio_asprintf(&qitem,"j.reg_time != %s",t1); - break; - case GLITE_JP_QUERYOP_LESS: - trio_asprintf(&qitem,"j.reg_time < %s",t1); - break; - case GLITE_JP_QUERYOP_GREATER: - trio_asprintf(&qitem,"j.reg_time > %s",t1); - break; - case GLITE_JP_QUERYOP_WITHIN: - free(t2); - trio_asprintf(&qitem,"j.reg_time >= %s and j.reg_time <= %s", - t1,t2 = glite_jp_db_timetodb(glite_jp_attr2time(query[i].value2)+1)); - break; - default: - err.code = EINVAL; - err.desc = "invalid query op"; - glite_jp_stack_error(ctx,&err); - goto cleanup; - } - free(t1); - free(t2); - } - trio_asprintf(&aux,"%s%s%s",where ? where : "",where ? " and " : "", qitem); - free(where); - free(qitem); - where = aux; - aux = NULL; - } - - for (i=0; metadata[i].name; i++) { - assert (i<2); /* XXX: should never happen */ - - if (!strcmp(metadata[i].name,GLITE_JP_ATTR_OWNER)) { - quser = 1; - cmask |= 1; - owner_idx = i; - } - else if (!strcmp(metadata[i].name,GLITE_JP_ATTR_REGTIME)) { - cmask |= 2; - reg_idx = i; - } - else { - err.code = EINVAL; - err.desc = "invalid query column"; - glite_jp_stack_error(ctx,&err); - goto cleanup; - } - } - switch (cmask) { - case 1: cols = "j.dg_jobid,u.cert_subj"; break; - case 2: cols = "j.dg_jobid,j.reg_time"; break; - case 3: cols = "j.dg_jobid,u.cert_subj,j.reg_time"; break; - } - - trio_asprintf(&stmt,"select %s from jobs j%s where %s %s", - cols, - quser ? ",users u" : "", - where, - cmask & 1 ? "and u.userid = j.owner" : ""); - - if ((ret = glite_jp_db_execstmt(ctx,stmt,&q)) < 0) { - err.code = EIO; - err.desc = "DB call fail"; - glite_jp_stack_error(ctx,&err); - goto cleanup; - } - else if (ret == 0) { - err.code = ENOENT; - err.desc = "no matching jobs"; - glite_jp_stack_error(ctx,&err); - goto cleanup; - } - - while ((ret = glite_jp_db_fetchrow(q,qres)) > 0) { - if (cmask & 1) { - /* XXX: owner always first */ - metadata[owner_idx].value = qres[1]; - metadata[owner_idx].origin = GLITE_JP_ATTR_ORIG_SYSTEM; - qres[1] = NULL; - } - if (cmask & 2) { - int qi = cmask == 2 ? 1 : 2; - time_t t = glite_jp_db_dbtotime(qres[qi]); - metadata[reg_idx].value = glite_jp_time2attr(t); - metadata[reg_idx].origin = GLITE_JP_ATTR_ORIG_SYSTEM; - free(qres[qi]); - qres[qi] = NULL; - } - if (callback(ctx,qres[0],metadata,arg)) { - err.code = EIO; - err.desc = qres[0]; - glite_jp_stack_error(ctx,&err); - goto cleanup; - } - - free(qres[0]); - free(metadata[0].value); - free(metadata[1].value); - qres[0] = metadata[0].value = metadata[1].value = NULL; - } - - - if (ret < 0) { - err.code = EIO; - err.desc = "DB call fail"; - glite_jp_stack_error(ctx,&err); - goto cleanup; - } - -cleanup: - free(where); - free(aux); - free(stmt); - free(qres[0]); free(qres[1]); free(qres[2]); - free(metadata[0].value); free(metadata[1].value); - if (q) glite_jp_db_freestmt(&q); - - return err.code; -} - -#endif - - -int glite_jppsbe_is_metadata(glite_jp_context_t ctx,const char *attr) -{ - /* XXX: should be more */ - if (!strcmp(attr,GLITE_JP_ATTR_OWNER)) return 1; - if (!strcmp(attr,GLITE_JP_ATTR_REGTIME)) return 1; - - return 0; -} - - -int glite_jppsbe_get_names( - glite_jp_context_t ctx, - const char *job, - const char *class, - char ***names_out -) -{ - char *qry = NULL,*file = NULL,*dot; - char **out = NULL; - glite_jp_db_stmt_t s = NULL; - int rows,nout = 0; - glite_jp_error_t err; - - glite_jp_clear_error(ctx); - memset(&err,0,sizeof err); - err.source = __FUNCTION__; - - trio_asprintf(&qry,"select filename from files f,jobs j " - "where j.dg_jobid = '%|Ss' and j.jobid = f.jobid and f.state = 'committed'",job); - - if ((rows = glite_jp_db_execstmt(ctx,qry,&s)) <= 0) { - if (rows == 0) { - err.code = ENOENT; - err.desc = "No files for this job"; - } - else { - err.code = EIO; - err.desc = "DB call fail retrieving job files"; - } - glite_jp_stack_error(ctx,&err); - goto cleanup; - } - - while ((rows = glite_jp_db_fetchrow(s,&file))) { - int l; - - if (rows < 0) { - err.code = EIO; - err.desc = "DB call fail retrieving job files"; - goto cleanup; - } - - dot = strchr(file,'.'); /* XXX: can class contain dot? */ - - if (dot) *dot = 0; - out = realloc(out,(nout+1) * sizeof *out); - if (!strcmp(file,class)) out[nout++] = dot ? dot+1 : NULL; - - free(file); - file = NULL; - } - -cleanup: - if (s) glite_jp_db_freestmt(&s); - free(qry); - free(file); - - if (ctx->error) { - int i; - for (i=0; out && out[i]; i++) free(out[i]); - free(out); - return -ctx->error->code; - } - - if (nout) *names_out = out; - return nout; -} - - -/** mark the job as sent to this feed */ -int glite_jppsbe_set_fed( - glite_jp_context_t ctx, - const char *feed, - const char *job -) -{ - char *stmt = NULL,*u = NULL; - int rows,ret; - glite_jp_error_t err; - memset(&err,0,sizeof err); - - if ((ret = jobid_unique_pathname(ctx,job,&u,NULL,0))) return ret; - - trio_asprintf(&stmt,"insert into fed_jobs(feedid,jobid) " - "values ('%|Ss','%|Ss')", feed,u); - free(u); - - if ((rows = glite_jp_db_execstmt(ctx,stmt,NULL)) < 0) { - err.source = __FUNCTION__; - err.code = EIO; - err.desc = "insert into fed_jobs"; - glite_jp_stack_error(ctx,&err); - goto cleanup; - } - - if (rows != 1) { - err.source = __FUNCTION__; - err.code = EIO; - err.desc = "inserted rows != 1"; - glite_jp_stack_error(ctx,&err); - } - -cleanup: - free(stmt); - return err.code; -} - - -/** check whether the job has been already sent to this feed */ -int glite_jppsbe_check_fed( - glite_jp_context_t ctx, - const char *feed, - const char *job, - int *result -) -{ - char *stmt = NULL,*u = NULL; - int rows,ret; - glite_jp_error_t err; - memset(&err,0,sizeof err); - - if ((ret = jobid_unique_pathname(ctx,job,&u,NULL,0))) return ret; - - trio_asprintf(&stmt,"select 'x' from fed_jobs " - "where jobid = '%|Ss' and feedid = '%|Ss'", - u,feed); - - free(u); - - if ((rows = glite_jp_db_execstmt(ctx,stmt,NULL)) < 0) { - err.source = __FUNCTION__; - err.code = EIO; - err.desc = "select from fed_jobs"; - glite_jp_stack_error(ctx,&err); - goto cleanup; - } - - *result = rows; - -cleanup: - free(stmt); - return err.code; -} - - -/** store the feed to database */ -int glite_jppsbe_store_feed( - glite_jp_context_t ctx, - struct jpfeed *feed -) -{ - char *stmt,*aux,*alist,*qlist,*e; - int i,rows; - glite_jp_error_t err; - - memset(&err,0,sizeof err); - - qlist = alist = stmt = aux = e = NULL; - - for (i=0; feed->attrs[i]; i++) { - char *e; - trio_asprintf(&aux,"%s%s%s", - alist ? alist : "", - alist ? "\n" : "", - e = edg_wll_LogEscape(feed->attrs[i])); - free(e); - free(alist); - alist = aux; - aux = NULL; - } - - for (i=0; feed->qry[i].attr; i++) { - char op,*e1,*e2 = NULL; - - /* XXX */ - assert(!feed->qry[i].binary); - - switch (feed->qry[i].op) { - case GLITE_JP_QUERYOP_EQUAL: op = '='; break; - case GLITE_JP_QUERYOP_UNEQUAL: op = '!'; break; - case GLITE_JP_QUERYOP_LESS: op = '<'; break; - case GLITE_JP_QUERYOP_GREATER: op = '>'; break; - case GLITE_JP_QUERYOP_EXISTS: op = 'E'; break; - default: abort(); /* XXX */ - } - - trio_asprintf(&aux,"%s%s%s\n%c\n%s", - qlist ? qlist : "", - qlist ? "\n" : "", - e1 = edg_wll_LogEscape(feed->qry[i].attr), - op, - op != 'E' ? e2 = edg_wll_LogEscape(feed->qry[i].value) : "E"); - free(e1); free(e2); - - free(qlist); - qlist = aux; - aux = NULL; - } - - trio_asprintf(&stmt,"insert into feeds(feedid,destination,expires,cols,query) " - "values ('%|Ss','%|Ss',%s,'%|Ss','%|Ss')", - feed->id,feed->destination, - e = glite_jp_db_timetodb(feed->expires), - alist,qlist); - - free(alist); free(qlist); free(e); - - if ((rows = glite_jp_db_execstmt(ctx,stmt,NULL)) < 0) { - err.source = __FUNCTION__; - err.code = EIO; - err.desc = "insert into fed_jobs"; - glite_jp_stack_error(ctx,&err); - goto cleanup; - } - - if (rows != 1) { - err.source = __FUNCTION__; - err.code = EIO; - err.desc = "inserted rows != 1"; - glite_jp_stack_error(ctx,&err); - } - -cleanup: - free(stmt); - return err.code; - -} - - -/** purge expired feeds */ -int glite_jppsbe_purge_feeds( - glite_jp_context_t ctx -) -{ - char *stmt = NULL,*feed = NULL; - char *expires = glite_jp_db_timetodb(time(NULL)); - glite_jp_error_t err; - glite_jp_db_stmt_t q = NULL; - int rows; - - memset(&err,0,sizeof err); - - trio_asprintf(&stmt,"select feedid from feeds where expires < %s",expires); - - if ((rows = glite_jp_db_execstmt(ctx, stmt, &q)) < 0) { - err.code = EIO; - err.desc = "select from feeds"; - glite_jp_stack_error(ctx,&err); - goto cleanup; - } - - while ((rows = glite_jp_db_fetchrow(q,&feed)) > 0) { - free(stmt); - trio_asprintf(&stmt,"delete from fed_jobs where feedid = '%|Ss'",feed); - if ((rows = glite_jp_db_execstmt(ctx, stmt, NULL)) < 0) { - err.code = EIO; - err.desc = "delete from fed_jobs"; - glite_jp_stack_error(ctx,&err); - goto cleanup; - } - } - - free(stmt); - trio_asprintf(&stmt,"delete from feeds where expires < %s",expires); - if ((rows = glite_jp_db_execstmt(ctx, stmt, NULL)) < 0) { - err.code = EIO; - err.desc = "select from feeds"; - glite_jp_stack_error(ctx,&err); - goto cleanup; - } - -cleanup: - glite_jp_db_freestmt(&q); - free(feed); - free(stmt); - free(expires); - return err.code; -} - - -/** read stored feed into context */ -int glite_jppsbe_read_feeds( - glite_jp_context_t ctx -) -{ - char *stmt,*res[5],*expires; - glite_jp_error_t err; - glite_jp_db_stmt_t q = NULL; - int rows; - - stmt = expires = NULL; - memset(&err,0,sizeof err); - memset(&res,0,sizeof res); - err.source = __FUNCTION__; - - expires = glite_jp_db_timetodb(time(NULL)); - trio_asprintf(&stmt,"select feedid,destination,expires,cols,query " - "from feeds " - "where expires > %s",expires); - free(expires); expires = NULL; - - if ((rows = glite_jp_db_execstmt(ctx, stmt, &q)) < 0) { - err.code = EIO; - err.desc = "select from feeds"; - glite_jp_stack_error(ctx,&err); - goto cleanup; - } - - while ((rows = glite_jp_db_fetchrow(q,res)) > 0) { - struct jpfeed *f = calloc(1,sizeof *f); - int n; - char *p; - - f->id = res[0]; res[0] = NULL; - f->destination = res[1]; res[1] = NULL; - f->expires = glite_jp_db_dbtotime(res[2]); free(res[2]); res[2] = NULL; - - n = 0; - for (p = strtok(res[3],"\n"); p; p = strtok(NULL,"\n")) { - f->attrs = realloc(f->attrs,(n+2) * sizeof *f->attrs); - f->attrs[n] = edg_wll_LogUnescape(p); - f->attrs[++n] = NULL; - } - - n = 0; - for (p = strtok(res[4],"\n"); p; p = strtok(NULL,"\n")) { - f->qry = realloc(f->qry,(n+2) * sizeof *f->qry); - memset(&f->qry[n],0,sizeof *f->qry); - f->qry[n].attr = edg_wll_LogUnescape(p); - p = strtok(NULL,"\n"); - switch (*p) { - case '=': f->qry[n].op = GLITE_JP_QUERYOP_EQUAL; break; - case '<': f->qry[n].op = GLITE_JP_QUERYOP_LESS; break; - case '>': f->qry[n].op = GLITE_JP_QUERYOP_GREATER; break; - case '!': f->qry[n].op = GLITE_JP_QUERYOP_UNEQUAL; break; - case 'E': f->qry[n].op = GLITE_JP_QUERYOP_EXISTS; break; - default: abort(); /* XXX: internal inconsistency */ - } - p = strtok(NULL,"\n"); - if (f->qry[n].op != GLITE_JP_QUERYOP_EXISTS) - f->qry[n].value = edg_wll_LogUnescape(p); - - memset(&f->qry[++n],0,sizeof *f->qry); - } - f->next = ctx->feeds; - ctx->feeds = f; - } - - if (rows < 0) { - err.code = EIO; - err.desc = "fetch from feeds"; - glite_jp_stack_error(ctx,&err); - goto cleanup; - } - -cleanup: - glite_jp_db_freestmt(&q); - free(res[0]); free(res[1]); free(res[2]); free(res[3]); free(res[4]); - return err.code; -} - -int glite_jppsbe_append_tag( - void *fpctx, - char *jobid, - glite_jp_attrval_t *attr -) -{ - void *file_be; - glite_jp_error_t err; - glite_jp_context_t ctx = fpctx; - memset(&err,0,sizeof err); - err.source = __FUNCTION__; - - if (glite_jppsbe_open_file(ctx,jobid,"tags",NULL, - O_RDWR|O_CREAT,&file_be) - // XXX: tags need reading to check magic number - ) { - err.code = EIO; - err.desc = "cannot open tags file"; - return glite_jp_stack_error(ctx,&err); - } - - if (tag_append(ctx,file_be,attr)) - { - err.code = EIO; - err.desc = "cannot append tag"; - return glite_jp_stack_error(ctx,&err); - } - - if (glite_jppsbe_close_file(ctx,file_be)) - { - err.code = EIO; - err.desc = "cannot close tags file"; - return glite_jp_stack_error(ctx,&err); - } - - return 0; -} - - -int glite_jppsbe_read_tag( - void *fpctx, - const char *jobid, - const char *attr, - glite_jp_attrval_t **attrval -) -{ - glite_jp_error_t err; - glite_jp_context_t ctx = fpctx; - struct tags_handle *h; - - memset(&err,0,sizeof err); - err.source = __FUNCTION__; - h = malloc(sizeof (*h)); - h->tags = NULL; - h->n = 0; - - if (glite_jppsbe_open_file(ctx,jobid,"tags",NULL, - O_RDONLY,&(h->bhandle)) - // XXX: tags need reading to check magic number - ) { - err.code = EIO; - err.desc = "cannot open tags file"; - return glite_jp_stack_error(ctx,&err); - } - - if (tag_attr(ctx,h,attr,attrval)){ - glite_jp_error_t *e; - err.code = EIO; - err.desc = "cannot read tag"; - glite_jp_stack_error(ctx,&err); - e = ctx->error; - ctx->error = NULL; - glite_jppsbe_close_file(ctx,h->bhandle); - ctx->error = e; - return err.code; - } - - if (glite_jppsbe_close_file(ctx,h->bhandle)) - { - err.code = EIO; - err.desc = "cannot close tags file"; - return glite_jp_stack_error(ctx,&err); - } - - return 0; -} - - - -/* XXX: -- no primary authorization yet -- no concurrency control yet -- partial success in pwrite,append -- "unique" part of jobid is assumed to be unique across bookkeeping servers -- repository versioning not fully implemented yet -*/ diff --git a/org.glite.jp.primary/src/sandbox_plugin.c b/org.glite.jp.primary/src/sandbox_plugin.c deleted file mode 100644 index 680e277..0000000 --- a/org.glite.jp.primary/src/sandbox_plugin.c +++ /dev/null @@ -1,261 +0,0 @@ -#include -#include -#include -#include -#include -#include - -#include -#include - -#include -#include - -#include "file_plugin.h" -#include "builtin_plugins.h" -#include "backend.h" - -#define ALLOC_CHUNK 3 - - -typedef struct _sb_handle { - void *bhandle; - TAR *t; - tartype_t *tt; - char **file_names; -} sb_handle; - -// Global data needed for read/write wrappers -static struct { - void *bhandle; - glite_jp_context_t ctx; - off_t offset; -} global_data; - - -//static int sandbox_append(void *,void *,int,...); -static int sandbox_open(void *,void *,const char *uri,void **); -static int sandbox_close(void *,void *); -static int sandbox_attr(void *,void *,const char *,glite_jp_attrval_t **); -static int sandbox_filecom(void *,void *); - -int init(glite_jp_context_t ctx, glite_jpps_fplug_data_t *data) -{ - data->fpctx = ctx; - global_data.ctx = ctx; - - data->uris = calloc(2,sizeof *data->uris); - data->uris[0] = strdup(GLITE_JP_FILETYPE_ISB); - - data->classes = calloc(2,sizeof *data->classes); - data->classes[0] = strdup("sandbox"); - - data->namespaces = calloc(5, sizeof *data->namespaces); - data->namespaces[0] = strdup(GLITE_JP_ISB_NS); - data->namespaces[1] = strdup(GLITE_JP_OSB_NS); - data->namespaces[2] = strdup(GLITE_JP_ISB_CONTENT_NS); - data->namespaces[3] = strdup(GLITE_JP_OSB_CONTENT_NS); - - data->ops.open = sandbox_open; - data->ops.close = sandbox_close; - data->ops.attr = sandbox_attr; - data->ops.filecom = sandbox_filecom; - - printf("sandbox_plugin: URI: \"%s\"\n",GLITE_JP_FILETYPE_ISB); - - return 0; -} - - -/** -* Wrappers for tar_open -*/ -static int my_open(const char *pathname, int flags, ...) { - // Do not open file, it is opened in ftp_backend - // returned fd does not matter, read/write/close does ftp_backend - return 12345; -} - -static int my_close(int fd) { - // Closed in ftp_backend - return 0; -} - -static ssize_t my_read(int fd, void *buf, size_t count) { - // wrapper around glite_jppsbe_pread - size_t r; - - if (glite_jppsbe_pread(global_data.ctx,global_data.bhandle,buf,count,global_data.offset,&r)) { - errno = global_data.ctx->error->code; - return -1; - } - - global_data.offset += r; - - return r; -} - -static ssize_t my_write(int fd, const void *buf, size_t count) { - // wrapper around glite_jppsbe_pwrite - // just stub, not needed here&now -} - - - -static int sandbox_open(void *fpctx,void *bhandle,const char *uri,void **handle) -{ - sb_handle *h = calloc(1,sizeof *h); - - - printf("sandbox_open() called\n"); - - h->bhandle = bhandle; - global_data.bhandle = bhandle; - global_data.offset = 0; - - h->tt = malloc(sizeof(*h->tt)); - h->tt->openfunc = my_open; - h->tt->closefunc = my_close; - h->tt->readfunc = my_read; - h->tt->writefunc = my_write; - - if (tar_open(&h->t, NULL /* not needed, opened in ftp_backend */, h->tt, O_RDONLY, 0, TAR_GNU) == -1) - printf("tar_open()\n"); //XXX: use glite_jp_stack_error - - *handle = h; - - return 0; -} - - -static int sandbox_close(void *fpctx,void *handle) -{ - int i; - sb_handle *h = handle; - - tar_close(h->t); - free(h->tt); - - for (i=0; h->file_names; i++) free(h->file_names[i]); - free(h->file_names); - - free(h); - - printf("sandbox_close() called\n"); - - return 0; -} - - -static int sandbox_attr(void *fpctx,void *handle,const char *attr,glite_jp_attrval_t **attrval) -{ - glite_jp_error_t err; - glite_jp_context_t ctx = fpctx; - glite_jp_attrval_t *out = NULL; - int i,nout = 0, count = 0; - sb_handle *h = handle; - - - printf("sandbox_attr() called\n"); - - memset(&err,0,sizeof err); - err.source = __FUNCTION__; - glite_jp_clear_error(ctx); - - *attrval = NULL; - - if (!strcmp(attr, GLITE_JP_ATTR_ISB_FILENAME)) { - while ((i = th_read(h->t)) == 0) - { - printf("-- %s\n", th_get_pathname(h->t)); - - if ( !(count % ALLOC_CHUNK) ) { - *attrval = realloc(*attrval, (count + ALLOC_CHUNK + 1) * sizeof(**attrval) ); - memset( (*attrval) + count, 0, (ALLOC_CHUNK + 1) * sizeof(**attrval)); - } - (*attrval)[count].name = strdup(GLITE_JP_ATTR_ISB_FILENAME); - (*attrval)[count].value = strdup(th_get_pathname(h->t)); - (*attrval)[count].origin = GLITE_JP_ATTR_ORIG_FILE; - (*attrval)[count].timestamp = th_get_mtime(h->t); - - count++; - - if (TH_ISREG(h->t) && tar_skip_regfile(h->t) != 0) - { - err.code = EIO; - err.desc = "tar_skip_regfile"; - return glite_jp_stack_error(ctx,&err); - } - } - } - else if (!strcmp(attr, GLITE_JP_ATTR_OSB_FILENAME)) { - printf("Namespace %s not implemented yet\n", GLITE_JP_ATTR_OSB_FILENAME); - } - else if (strstr(attr,GLITE_JP_OSB_CONTENT_NS)) { - printf("Namespace %s not implemented yet\n", GLITE_JP_OSB_CONTENT_NS); - } - else if (strstr(attr,GLITE_JP_ISB_CONTENT_NS)) { - char *fileName = (char *) attr + sizeof(GLITE_JP_ISB_CONTENT_NS); - - printf("untaring file: %s\n", fileName); - - while (th_read(h->t) == 0) - { - if ( !strcmp(fileName, th_get_pathname(h->t)) ) { - /* extract the file */ - int k; - size_t size; - char buf[T_BLOCKSIZE]; - char *value; - - - if (!TH_ISREG(h->t)) assert(0); // not a regular file - - size = th_get_size(h->t); - value = (char *) malloc(size * sizeof(char) + 1); - memset( value, 0, size * sizeof(char) + 1); - - for (i = 0; i < size; i += T_BLOCKSIZE) - { - k = tar_block_read(h->t, buf); - if (k == -1) - { - err.code = errno; - err.desc = "tar_block_read"; - return glite_jp_stack_error(ctx,&err); - } - - // tar_block_read calls glite_jppsbe_pread, which usually - // returns whole block (read from the middle of uploaded - // tar file - // so cut k in order to the last chunk had correct size - if (i + T_BLOCKSIZE > size) { - k = size - i; - } - - strncpy(value + i, buf, k); - } - *attrval = malloc(2 * sizeof(**attrval) ); - memset( (*attrval), 0, 2 * sizeof(**attrval)); - - (*attrval)[0].name = strdup(attr); - (*attrval)[0].value = value; - (*attrval)[0].origin = GLITE_JP_ATTR_ORIG_FILE; - (*attrval)[0].timestamp = th_get_mtime(h->t); - } - else if (TH_ISREG(h->t) && tar_skip_regfile(h->t) != 0) - { - err.code = EIO; - err.desc = "tar_skip_regfile"; - return glite_jp_stack_error(ctx,&err); - } - } - } - - return glite_jp_stack_error(ctx,&err); -} - -static int sandbox_filecom(void *fpctx,void *handle){ - return -1; -} - diff --git a/org.glite.jp.primary/src/simple_server.c b/org.glite.jp.primary/src/simple_server.c deleted file mode 100644 index 3bbb743..0000000 --- a/org.glite.jp.primary/src/simple_server.c +++ /dev/null @@ -1,59 +0,0 @@ -#include - -#include "glite/jp/types.h" -#include "glite/jp/context.h" - -#include "jpps_H.h" - -extern SOAP_NMAC struct Namespace jpis__namespaces[],jpps__namespaces[]; - -int main(int argc, char *argv[]) { - struct soap soap; - int i, m, s; // master and slave sockets - - glite_jp_context_t ctx; - - soap_init(&soap); - soap_set_namespaces(&soap, jpps__namespaces); - - glite_jp_init_context(&ctx); - - if (glite_jppsbe_init(ctx, &argc, argv)) { - /* XXX log */ - fputs(glite_jp_error_chain(ctx), stderr); - exit(1); - } - - soap.user = (void *) ctx; - - ctx->other_soap = soap_new(); - soap_init(ctx->other_soap); - soap_set_namespaces(ctx->other_soap,jpis__namespaces); - - srand48(time(NULL)); /* feed id generation */ - - m = soap_bind(&soap, NULL, 8901, 100); - if (m < 0) - soap_print_fault(&soap, stderr); - else - { - fprintf(stderr, "Socket connection successful: master socket = %d\n", m); - for (i = 1; ; i++) { - s = soap_accept(&soap); - if (s < 0) { - soap_print_fault(&soap, stderr); - break; - } - jpps__serve(&soap); // process RPC request - soap_destroy(&soap); // clean up class instances - soap_end(&soap); // clean up everything and close socket - glite_jp_run_deferred(ctx); - } - } - soap_done(&soap); // close master socket - - return 0; -} - -/* XXX: we don't use it */ -SOAP_NMAC struct Namespace namespaces[] = { {NULL,NULL} }; diff --git a/org.glite.jp.primary/src/soap_ops.c b/org.glite.jp.primary/src/soap_ops.c deleted file mode 100644 index e4dd2c2..0000000 --- a/org.glite.jp.primary/src/soap_ops.c +++ /dev/null @@ -1,514 +0,0 @@ -#include -#include -#include -#include - -#undef SOAP_FMAC1 -#define SOAP_FMAC1 static - -#include "glite/jp/types.h" -#include "glite/jp/context.h" -#include "glite/jp/attr.h" -#include "glite/jp/known_attr.h" - -#include "feed.h" -#include "attrs.h" - -#include "jptype_map.h" -#include "glite/security/glite_gscompat.h" - -#include "file_plugin.h" -#include "builtin_plugins.h" - -/* the same as ServerLib.c but without WITH_NOGLOBAL which breaks the soap_env_ctx trick */ -#define SOAP_FMAC3 static -#include "jpps_C.c" -#include "jpps_Server.c" - -#include "jpps_.nsmap" - -#include "soap_env_ctx.h" -#include "soap_env_ctx.c" - -#include "glite/jp/ws_fault.c" -#include "soap_util.c" - -#define err2fault(CTX, SOAP) glite_jp_server_err2fault((CTX), (SOAP)); - -#define CONTEXT_FROM_SOAP(soap,ctx) glite_jp_context_t ctx = (glite_jp_context_t) ((soap)->user) - -int glite_jpps_srv_init(glite_jp_context_t ctx) -{ - glite_jp_soap_env_ctx = &my_soap_env_ctx; - return 0; -} - -SOAP_FMAC5 int SOAP_FMAC6 __jpsrv__RegisterJob( - struct soap *soap, - struct _jpelem__RegisterJob *in, - struct _jpelem__RegisterJobResponse *empty) -{ - CONTEXT_FROM_SOAP(soap,ctx); - glite_jp_attrval_t owner_val[2]; - - printf("%s %s %s\n",__FUNCTION__,in->job,in->owner); - if (glite_jpps_authz(ctx,SOAP_TYPE___jpsrv__RegisterJob,in->job,in->owner) || - glite_jppsbe_register_job(ctx,in->job,in->owner)) - { - err2fault(ctx,soap); - return SOAP_FAULT; - } - - memset(owner_val, 0, 2 * sizeof(glite_jp_attrval_t)); - owner_val[0].name = GLITE_JP_ATTR_OWNER; - owner_val[0].value = in->owner; - owner_val[0].origin = GLITE_JP_ATTR_ORIG_SYSTEM; - owner_val[0].timestamp = time(NULL); - owner_val[0].origin_detail = NULL; - owner_val[1].name = NULL; - -/* XXX: errrors should be ingored but not silently */ - glite_jpps_match_attr(ctx,in->job,owner_val); - - return SOAP_OK; -} - - -SOAP_FMAC5 int SOAP_FMAC6 __jpsrv__StartUpload( - struct soap *soap, - struct _jpelem__StartUpload *in, - struct _jpelem__StartUploadResponse *out) -{ - CONTEXT_FROM_SOAP(soap,ctx); - char *destination; - time_t commit_before = in->commitBefore; - glite_jp_error_t err; - glite_jpps_fplug_data_t **pd = NULL; - int i; - - glite_jp_clear_error(ctx); - memset(&err,0,sizeof err); - - if (glite_jpps_authz(ctx,SOAP_TYPE___jpsrv__StartUpload,NULL,NULL)) { - err2fault(ctx,soap); - return SOAP_FAULT; - } - - switch (glite_jpps_fplug_lookup(ctx,in->class_,&pd)) { - case ENOENT: - err.code = ENOENT; - err.source = __FUNCTION__; - err.desc = "unknown file class"; - glite_jp_stack_error(ctx,&err); - err2fault(ctx,soap); - return SOAP_FAULT; - case 0: break; - default: - err2fault(ctx,soap); - return SOAP_FAULT; - } - - for (i=0; pd[0]->uris[i] && strcmp(pd[0]->uris[i],in->class_); i++); - assert(pd[0]->uris[i]); - - if (glite_jppsbe_start_upload(ctx,in->job,pd[0]->classes[i],in->name,in->contentType, - &destination,&commit_before)) - { - err2fault(ctx,soap); - free(pd); - return SOAP_FAULT; - } - - out->destination = soap_strdup(soap,destination); - free(destination); - out->commitBefore = commit_before; - - free(pd); - return SOAP_OK; -} - -SOAP_FMAC5 int SOAP_FMAC6 __jpsrv__CommitUpload( - struct soap *soap, - struct _jpelem__CommitUpload *in, - struct _jpelem__CommitUploadResponse *out) -{ - CONTEXT_FROM_SOAP(soap,ctx); - char *job,*class,*name; - - job = class = name = NULL; - - if (glite_jpps_authz(ctx,SOAP_TYPE___jpsrv__CommitUpload,NULL,NULL) || - glite_jppsbe_commit_upload(ctx,in->destination)) - { - err2fault(ctx,soap); - return SOAP_FAULT; - } - - /* XXX: should not fail when commit_upload was OK */ - assert(glite_jppsbe_destination_info(ctx,in->destination,&job,&class,&name) == 0); - - /* XXX: ignore errors but don't fail silenty */ - glite_jpps_match_file(ctx,job,class,name); - - // apply plugins to commited file - glite_jpps_fplug_data_t *pd; - int i, j; - void *beh, *ph; - if (ctx->plugins) - for (i = 0; ctx->plugins[i]; i++) { - pd = ctx->plugins[i]; - if (pd->classes) - for (j = 0; pd->classes[j]; j++) - if (strcmp(class, pd->classes[j]) == 0){ - if (! glite_jppsbe_open_file(ctx,job,class, name, O_RDONLY, &beh)) { - if (!pd->ops.open(pd->fpctx,beh,pd->uris[j],&ph)) { - pd->ops.filecom(pd->fpctx, ph); - pd->ops.close(pd->fpctx, ph); - } - glite_jppsbe_close_file(ctx,beh); - } - - } - } - - free(job); free(class); free(name); - - return SOAP_OK; -} - -SOAP_FMAC5 int SOAP_FMAC6 __jpsrv__RecordTag( - struct soap *soap, - struct _jpelem__RecordTag *in, - struct _jpelem__RecordTagResponse *out) -{ - CONTEXT_FROM_SOAP(soap,ctx); - void *file_be,*file_p; - glite_jp_attrval_t attr[2], meta[2]; - - file_be = file_p = NULL; - - memset(attr, 0, 2 * sizeof(glite_jp_attrval_t)); - memset(meta,0,sizeof meta); - meta[0].name = strdup(GLITE_JP_ATTR_OWNER); - - if (glite_jppsbe_get_job_metadata(ctx,in->jobid,meta)) { - goto err; - } - - if (glite_jpps_authz(ctx,SOAP_TYPE___jpsrv__RecordTag,in->jobid,meta[0].value)) { - goto err; - } - - attr[0].name = in->tag->name; - if (GSOAP_ISSTRING(in->tag->value)) { - attr[0].value = GSOAP_STRING(in->tag->value); - attr[0].binary = 0; - } - else { - attr[0].value = GSOAP_BLOB(in->tag->value)->__ptr; - attr[0].size = GSOAP_BLOB(in->tag->value)->__size; - attr[0].binary = 1; - } - attr[0].origin = GLITE_JP_ATTR_ORIG_USER; - attr[0].timestamp = time(NULL); - attr[0].origin_detail = NULL; /* XXX */ - attr[1].name = NULL; - - /*if (glite_jppsbe_open_file(ctx,in->jobid,"tags",NULL, - O_RDWR|O_CREAT,&file_be) - // XXX: tags need reading to check magic number - ) { - err2fault(ctx,soap); - return SOAP_FAULT; - } - - if (glite_jppsbe_close_file(ctx,file_be)) - { - err2fault(ctx,soap); - return SOAP_FAULT; - }*/ - glite_jppsbe_append_tag(ctx,in->jobid,attr); - - /*if (tag_append(ctx,file_be,attr)) - { - err2fault(ctx,soap); - return SOAP_FAULT; - }*/ - - /* XXX: ignore errors but don't fail silenty */ - glite_jpps_match_attr(ctx,in->jobid,attr); - - return SOAP_OK; -err: - glite_jp_attrval_free(meta,0); - err2fault(ctx,soap); - return SOAP_FAULT; -} - -static void s2jp_qval(const struct jptype__stringOrBlob *in, char **value, int *binary, size_t *size) -{ - if (GSOAP_ISSTRING(in)) { - *value = GSOAP_STRING(in); - *binary = 0; - *size = 0; - } - else { - assert(GSOAP_BLOB(in)); /* XXX: should report error instead */ - *value = GSOAP_BLOB(in)->__ptr; - *binary = 1; - *size = GSOAP_BLOB(in)->__size; - } -} - -static void s2jp_query(const struct jptype__primaryQuery *in, glite_jp_query_rec_t *out) -{ - int b; - - out->attr = in->attr; - - s2jp_qval(in->value,&out->value,&out->binary,&out->size); - switch (in->op) { - case EQUAL: out->op = GLITE_JP_QUERYOP_EQUAL; break; - case UNEQUAL: out->op = GLITE_JP_QUERYOP_UNEQUAL; break; - case LESS: out->op = GLITE_JP_QUERYOP_LESS; break; - case GREATER: out->op = GLITE_JP_QUERYOP_GREATER; break; - case WITHIN: - out->op = GLITE_JP_QUERYOP_WITHIN; - s2jp_qval(in->value2,&out->value2,&b,&out->size2); - assert(out->binary == b); /* XXX: report error instead */ - - break; - } - - if (in->origin) switch (*in->origin) { - case jptype__attrOrig__SYSTEM: out->origin = GLITE_JP_ATTR_ORIG_SYSTEM; break; - case jptype__attrOrig__USER: out->origin = GLITE_JP_ATTR_ORIG_USER; break; - case jptype__attrOrig__FILE_: out->origin = GLITE_JP_ATTR_ORIG_FILE; break; - } - else out->origin = GLITE_JP_ATTR_ORIG_ANY; -} - - -static int check_sane_feed(glite_jp_context_t ctx,struct _jpelem__FeedIndex *in) -{ - glite_jp_error_t err; - memset(&err,0,sizeof err); - err.source = __FUNCTION__; - err.code = EINVAL; - - if (!in->destination) { - err.desc = "destination required"; - return glite_jp_stack_error(ctx,&err); - } - - return 0; -} - - -SOAP_FMAC5 int SOAP_FMAC6 __jpsrv__FeedIndex( - struct soap *soap, - struct _jpelem__FeedIndex *in, - struct _jpelem__FeedIndexResponse *out) -{ - -/* deferred processing: return feed_id to the index server first, - * start feeding it afterwards -- not before the index server actually - * knows feed_id and is ready to accept the feed. - * - * Has to be done within the same server slave, - * passed through the context */ - - CONTEXT_FROM_SOAP(soap,ctx); - char *feed_id = NULL; - time_t expires = 0; - int ret = SOAP_OK; - - char const **attrs = calloc(in->__sizeattributes+1,sizeof *attrs); - glite_jp_query_rec_t *qry = calloc(in->__sizeconditions+1,sizeof *qry); - int i; - - glite_jp_clear_error(ctx); - - if (check_sane_feed(ctx,in)) { - err2fault(ctx,soap); - ret = SOAP_FAULT; - goto cleanup; - } - - memcpy(attrs,in->attributes,sizeof *attrs * in->__sizeattributes); - for (i = 0; i__sizeconditions; i++) s2jp_query(GLITE_SECURITY_GSOAP_LIST_GET(in->conditions, i),qry+i); - - if (in->history) { - if (glite_jpps_run_feed(ctx,in->destination,attrs,qry,in->continuous,&feed_id)) { - err2fault(ctx,soap); - ret = SOAP_FAULT; - goto cleanup; - } - } - - if (in->continuous) { - if (glite_jpps_register_feed(ctx,in->destination,attrs,qry,&feed_id,&expires)) { - err2fault(ctx,soap); - ret = SOAP_FAULT; - goto cleanup; - } - } - - if (!in->history && !in->continuous) { - glite_jp_error_t err; - memset(&err,0,sizeof err); - err.code = EINVAL; - err.source = __FUNCTION__; - err.desc = "at least one of and must be true"; - glite_jp_stack_error(ctx,&err); - err2fault(ctx,soap); - ret = SOAP_FAULT; - goto cleanup; - } - - out->feedExpires = expires; - out->feedId = soap_strdup(soap,feed_id); - -cleanup: - free(feed_id); - free(attrs); - free(qry); - - return ret; -} - -SOAP_FMAC5 int SOAP_FMAC6 __jpsrv__FeedIndexRefresh( - struct soap *soap, - struct _jpelem__FeedIndexRefresh *in, - struct _jpelem__FeedIndexRefreshResponse *out) -{ - fprintf(stderr,"%s: not implemented\n",__FUNCTION__); - abort(); -} - -SOAP_FMAC5 int SOAP_FMAC6 __jpsrv__GetJobFiles( - struct soap *soap, - struct _jpelem__GetJobFiles *in, - struct _jpelem__GetJobFilesResponse *out) -{ - CONTEXT_FROM_SOAP(soap,ctx); - char *url; - - int i,n; - glite_jp_error_t err; - void **pd; - struct jptype__jppsFile *f = NULL; - glite_jp_attrval_t meta[2]; - - memset(&err,0,sizeof err); - n = 0; - - memset(meta,0,sizeof meta); - meta[0].name = strdup(GLITE_JP_ATTR_OWNER); - - if (glite_jppsbe_get_job_metadata(ctx,in->jobid,meta)) { - goto err; - } - - if (glite_jpps_authz(ctx,SOAP_TYPE___jpsrv__GetJobFiles,in->jobid,meta[0].value)) { - goto err; - } - - memset(meta,0,sizeof meta); - meta[0].name = strdup(GLITE_JP_ATTR_OWNER); - - if (glite_jppsbe_get_job_metadata(ctx,in->jobid,meta)) { - goto err; - } - - if (glite_jpps_authz(ctx,SOAP_TYPE___jpsrv__GetJobFiles,in->jobid,meta[0].value)) { - goto err; - } - - for (pd = ctx->plugins; *pd; pd++) { - glite_jpps_fplug_data_t *plugin = *pd; - - for (i=0; plugin->uris[i]; i++) { - glite_jp_clear_error(ctx); - switch (glite_jppsbe_get_job_url(ctx,in->jobid,plugin->classes[i],NULL,&url)) { - case 0: - f = realloc(f,(n + 1) * sizeof *f); - f[n].class_ = soap_strdup(soap,plugin->uris[i]); -#warning FIXME: file name required in WSDL - f[n].name = NULL; - f[n].url = soap_strdup(soap,url); - n++; - free(url); - break; - case ENOENT: - break; - default: - err.code = ctx->error->code; - err.source = "jpsrv__GetJob()"; - err.desc = plugin->uris[i]; - glite_jp_stack_error(ctx,&err); - err2fault(ctx,soap); - glite_jp_clear_error(ctx); - return SOAP_FAULT; - } - } - } - - if (!n) { - glite_jp_clear_error(ctx); - err.code = ENOENT; - err.source = __FUNCTION__; - err.desc = "No file found for this job"; - glite_jp_stack_error(ctx,&err); - err2fault(ctx,soap); -// glite_jp_clear_error(ctx); - return SOAP_FAULT; - } - - GLITE_SECURITY_GSOAP_LIST_CREATE(soap, out, files, struct jptype__jppsFile, n); - for (i = 0; i < n; i++) memcpy(GLITE_SECURITY_GSOAP_LIST_GET(out->files, i), &f[i], sizeof(f[i])); - - return SOAP_OK; -err: - glite_jp_attrval_free(meta,0); - err2fault(ctx,soap); - return SOAP_FAULT; -} - -SOAP_FMAC5 int SOAP_FMAC6 __jpsrv__GetJobAttributes( - struct soap *soap, - struct _jpelem__GetJobAttributes *in, - struct _jpelem__GetJobAttributesResponse *out) -{ - glite_jp_attrval_t *attr, meta[2]; - int i,n; - - CONTEXT_FROM_SOAP(soap,ctx); - - memset(meta,0,sizeof meta); - meta[0].name = strdup(GLITE_JP_ATTR_OWNER); - - if (glite_jppsbe_get_job_metadata(ctx,in->jobid,meta)) { - goto err; - } - - if (glite_jpps_authz(ctx,SOAP_TYPE___jpsrv__GetJobAttributes,in->jobid,meta[0].value)) { - goto err; - } - - if (glite_jpps_get_attrs(ctx,in->jobid, - in->attributes, - in->__sizeattributes,&attr)) { - err2fault(ctx,soap); - return SOAP_FAULT; - } - - for (i=0; attr[i].name; i++); - out->__sizeattrValues = jp2s_attrValues(soap,attr,&out->attrValues,1); - - return SOAP_OK; -err: - glite_jp_attrval_free(meta,0); - err2fault(ctx,soap); - return SOAP_FAULT; -} diff --git a/org.glite.jp.primary/src/soap_util.c b/org.glite.jp.primary/src/soap_util.c deleted file mode 100644 index 5d6898d..0000000 --- a/org.glite.jp.primary/src/soap_util.c +++ /dev/null @@ -1,74 +0,0 @@ -static enum jptype__attrOrig jp2s_origin(glite_jp_attr_orig_t o) -{ - switch (o) { - case GLITE_JP_ATTR_ORIG_SYSTEM: return jptype__attrOrig__SYSTEM; - case GLITE_JP_ATTR_ORIG_USER: return jptype__attrOrig__USER; - case GLITE_JP_ATTR_ORIG_FILE: return jptype__attrOrig__FILE_; - default: abort(); /* XXX */ - } -} - -static int jp2s_attrValues( - struct soap *soap, - glite_jp_attrval_t *in, - GLITE_SECURITY_GSOAP_LIST_TYPE(jptype, attrValue) *outp, - int freeit) -{ - GLITE_SECURITY_GSOAP_LIST_TYPE(jptype, attrValue) out; - struct jptype__attrValue a; - int i,cnt; - - for (cnt=0; in[cnt].name; cnt++); - - GLITE_SECURITY_GSOAP_LIST_CREATE0(soap, out, cnt, struct jptype__attrValue, cnt); - for (i=0; in[i].name; i++) { - memset(&a, 0, sizeof a); - a.name = soap_strdup(soap,in[i].name); - if (freeit) free(in[i].name); - a.value = soap_malloc(soap,sizeof *a.value); - memset(a.value, 0, sizeof *a.value); - if (in[i].binary) { - GSOAP_SETBLOB(a.value, soap_malloc(soap,sizeof *GSOAP_BLOB(a.value))); - memset(GSOAP_BLOB(a.value),0,sizeof *GSOAP_BLOB(a.value)); - GSOAP_BLOB(a.value)->__ptr = soap_malloc(soap,in[i].size); - GSOAP_BLOB(a.value)->__size = in[i].size; - memcpy(GSOAP_BLOB(a.value)->__ptr,in[i].value,in[i].size); - } - else { - GSOAP_SETSTRING(a.value, soap_strdup(soap,in[i].value)); - } - - if (freeit) free(in[i].value); - a.origin = jp2s_origin(in[i].origin); - a.originDetail = in[i].origin_detail ? soap_strdup(soap,in[i].origin_detail) : NULL; - if (freeit) free(in[i].origin_detail); - a.timestamp = in[i].timestamp; - - memcpy(GLITE_SECURITY_GSOAP_LIST_GET(out, i), &a, sizeof a); - } - if (freeit) free(in); - - *outp = out; - return cnt; -} - -static void attrValues_free( - struct soap *soap, - GLITE_SECURITY_GSOAP_LIST_TYPE(jptype, attrValue) a, - int na) -{ - int i; - struct jptype__attrValue *ai; - - for (i=0; ivalue) && GSOAP_STRING(ai->value)) soap_dealloc(soap,GSOAP_STRING(ai->value)); - if (GSOAP_ISBLOB(ai->value) && GSOAP_BLOB(ai->value)) { - soap_dealloc(soap,GSOAP_BLOB(ai->value)->__ptr); - soap_dealloc(soap,GSOAP_BLOB(ai->value)); - } - soap_dealloc(soap,ai->value); - if (ai->originDetail) soap_dealloc(soap,ai->originDetail); - } - GLITE_SECURITY_GSOAP_LIST_DESTROY0(soap, a, na); -} diff --git a/org.glite.jp.primary/src/tags.c b/org.glite.jp.primary/src/tags.c deleted file mode 100644 index 1d4f4ae..0000000 --- a/org.glite.jp.primary/src/tags.c +++ /dev/null @@ -1,456 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include "tags.h" -#include "backend.h" - -/* magic name_len value_len binary sequence timestamp */ -#define HEADER "JP#TAG# %05u %012lu %c %05u %012lu#" -#define HEADER_SIZE 48 -#define TAGS_MAGIC 0x74c016f2 /* two middle digits encode version, i.e. 01 */ - - -/*int glite_jpps_tag_append( - glite_jp_context_t ctx, - void *handle, - const glite_jp_tagval_t *tag -) -{ - char hdr[HEADER_SIZE+1]; - glite_jp_error_t err; - - unsigned long vlen = tag->binary ? tag->size : - (tag->value ? strlen(tag->value) : 0); - int nlen; - - memset(&err,0,sizeof err); - err.source = "glite_jpps_tag_append()"; - - if (!tag->name) { - err.code = EINVAL; - err.desc = "tag name"; - return glite_jp_stack_error(ctx,&err); - } - - nlen = strlen(tag->name); - - assert(sprintf(hdr,HEADER,nlen,vlen, - tag->binary ? "B" : "S", - tag->sequence, tag->timestamp) == HEADER_SIZE); - - if (glite_jppsbe_append(ctx,handle,hdr,HEADER_SIZE)) { - err.code = EIO; - err.desc = "write tag header"; - return glite_jp_stack_error(ctx,&err); - } - - if (glite_jppsbe_append(ctx,handle,tag->name,nlen)) { - err.code = EIO; - err.desc = "write tag name"; - return glite_jp_stack_error(ctx,&err); - } - - if (glite_jppsbe_append(ctx,handle,tag->value,vlen)) { - err.code = EIO; - err.desc = "write tag value"; - return glite_jp_stack_error(ctx,&err); - } - - return 0; -} - -int glite_jpps_tagval_copy( - glite_jp_context_t ctx, - glite_jp_tagval_t *from, - glite_jp_tagval_t *to -) -{ - glite_jp_error_t err; - - glite_jp_clear_error(ctx); - memset(&err,0,sizeof err); - err.source = __FUNCTION__; - - to->name = strdup(from->name); - if (!to->name) { - err.code = ENOMEM; - return glite_jp_stack_error(ctx,&err); - } - to->sequence = from->sequence; - to->timestamp = from->timestamp; - to->binary = from->binary; - to->size = from->size; - to->value = (char *) malloc(to->size); - if (!to->value) { - free(to->name); - err.code = ENOMEM; - return glite_jp_stack_error(ctx,&err); - } - memcpy(from->value, to->value, to->size); - - return 0; -} - -int glite_jpps_tag_read( - glite_jp_context_t ctx, - void *handle, - off_t offset, - glite_jp_tagval_t *tagvalue, - size_t *shift -) -{ - char hdr[HEADER_SIZE+1]; - unsigned int nlen; - unsigned long vlen; - char binary; - unsigned sequence; - unsigned timestamp; - char * name = NULL; - char * value = NULL; - ssize_t ret; - glite_jp_error_t err; - - glite_jp_clear_error(ctx); - memset(&err,0,sizeof err); - err.source = __FUNCTION__; - - hdr[HEADER_SIZE] = '\0'; - if (glite_jppsbe_pread(ctx, handle, hdr, HEADER_SIZE, offset, &ret)) { - err.code = EIO; - err.desc = "Cannot read tag header"; - goto error_out; - } - if (ret == 0) { - err.code = ENOENT; - err.desc = "No more tags in the file"; - goto error_out; - } - // #define HEADER "JP#TAG# %05u %012lu %c %05u %012lu#" - if (sscanf(hdr, HEADER, &nlen, &vlen, &binary, &sequence, ×tamp) < 5) { - err.code = EILSEQ; - err.desc = "Incorrect tag header format"; - goto error_out; - } - name = (char*) malloc(nlen + 1); - if (!name) { - err.code = ENOMEM; - goto error_out; - } - name[nlen] = '\0'; - value = (char*) malloc(vlen + 1); - if (!value) { - err.code = ENOMEM; - goto error_out; - } - value[vlen] = '\0'; - if (glite_jppsbe_pread(ctx, handle, name, nlen, offset + HEADER_SIZE, &ret)) { - err.code = EIO; - err.desc = "Cannot read tag name"; - goto error_out; - } - if (glite_jppsbe_pread(ctx, handle, value, vlen, offset + HEADER_SIZE + nlen, &ret)) { - err.code = EIO; - err.desc = "Cannot read tag value"; - goto error_out; - } - - tagvalue->name = name; - tagvalue->sequence = sequence; - tagvalue->timestamp = timestamp; - tagvalue->binary = (binary == 'B') ? 1 : 0; - tagvalue->size = vlen; - tagvalue->value = value; - - *shift = HEADER_SIZE + nlen + vlen; - - return 0; -error_out: - free(name); - free(value); - return glite_jp_stack_error(ctx,&err); -}*/ - -/* -int glite_jpps_tag_read(glite_jp_context_t, void *, off_t, glite_jp_tagval_t *, size_t); -int glite_jpps_tag_readall(glite_jp_context_t, void *, glite_jp_tagval_t **); -*/ - -/*int glite_jpps_tag_readall( - glite_jp_context_t ctx, - void *handle, - glite_jp_tagval_t **tags_out -) -{ - glite_jp_tagval_t * tags = NULL; - void * newspace; - int ntags = 0; - int ntagspace = 0; - off_t offset = 0; - int ret; - size_t shift; - glite_jp_error_t err; - - glite_jp_clear_error(ctx); - memset(&err,0,sizeof err); - err.source = __FUNCTION__; - - ntagspace = 1; - tags = (glite_jp_tagval_t *) calloc(ntagspace + 1, sizeof(*tags)); - if (!tags) { - err.code = ENOMEM; - return glite_jp_stack_error(ctx,&err); - } - while (!(ret = glite_jpps_tag_read(ctx, handle, offset, &tags[ntags], &shift))) { - offset += shift; - ntags++; - if (ntagspace <= ntags) { - ntagspace += 1; - newspace = realloc(tags, (ntagspace + 1) * sizeof(*tags)); - if (!newspace) { - err.code = ENOMEM; - goto error_out; - } - tags = (glite_jp_tagval_t *) newspace; - } - } - if (ret == ENOENT) { - *tags_out = tags; - return 0; - } else { - err.code = EIO; - err.desc = "Error reading tag value"; - } - -error_out: - for (; ntags-- ;) { - free(tags[ntags].name); - free(tags[ntags].value); - } - free(tags); - return glite_jp_stack_error(ctx,&err); -}*/ - -int tag_append(void *fpctx,void *bhandle,glite_jp_attrval_t * tag) -{ - //va_list ap; - char *hdr,*rec; - glite_jp_context_t ctx = fpctx; - uint32_t magic,hlen,rlen,rlen_n; - size_t r; - glite_jp_error_t err; - - memset(&err,0,sizeof err); - err.source = __FUNCTION__; - glite_jp_clear_error(ctx); - - printf("tagappend: %s,%s\n",tag->name,tag->value); - - //assert(oper == GLITE_JP_FPLUG_TAGS_APPEND); - - if (glite_jppsbe_pread(ctx,bhandle,&magic,sizeof magic,0,&r)) { - err.code = EIO; - err.desc = "reading magic number"; - return glite_jp_stack_error(ctx,&err); - } - - if (r == 0) { - magic = htonl(TAGS_MAGIC); - if (glite_jppsbe_pwrite(ctx,bhandle,&magic,sizeof magic,0)) { - err.code = EIO; - err.desc = "writing magic number"; - return glite_jp_stack_error(ctx,&err); - } - } - else if (r != sizeof magic) { - err.code = EIO; - err.desc = "can't read magic number"; - return glite_jp_stack_error(ctx,&err); - } - else if (magic != htonl(TAGS_MAGIC)) { - err.code = EINVAL; - err.desc = "invalid magic number"; - return glite_jp_stack_error(ctx,&err); - } - -/* XXX: origin is always USER, not recorded */ - trio_asprintf(&hdr,"%ld %c", - tag->timestamp,tag->binary ? 'B' : 'S'); - - rlen = strlen(tag->name) + strlen(hdr) + 2 /* \0 after name and after hdr */ + - (r = tag->binary ? tag->size : (tag->value ? strlen(tag->value) : 0)); - - rlen_n = htonl(rlen); - - rec = malloc(rlen + sizeof rlen_n); - *((uint32_t *) rec) = rlen_n; - strcpy(rec + sizeof rlen_n,tag->name); - strcpy(rec + (hlen = sizeof rlen_n + strlen(tag->name) + 1),hdr); - - if (r) memcpy(rec + hlen + strlen(hdr) + 1,tag->value,r); - free(hdr); - -/* record format: - * - 4B length, net byte order - * - attr name, \0 - * - %ld %c \0 (timestamp, B/S) - * - value - */ - if (glite_jppsbe_append(ctx,bhandle,rec,rlen + sizeof rlen_n)) { - err.code = EIO; - err.desc = "writing tag record"; - free(rec); - return glite_jp_stack_error(ctx,&err); - } - - /* XXX: should add tag also to handle->tags, but it is never used - * currently */ - - return 0; -} - -int tag_attr(void *fpctx,void *handle,const char *attr,glite_jp_attrval_t **attrval) -{ - struct tags_handle *h = handle; - glite_jp_error_t err; - glite_jp_context_t ctx = fpctx; - glite_jp_attrval_t *out = NULL; - int i,nout = 0; - - memset(&err,0,sizeof err); - err.source = __FUNCTION__; - - if (!h->tags) tagsread(fpctx,handle); - - if (!h->tags) { - err.code = ENOENT; - err.desc = "no tags for this job"; - return glite_jp_stack_error(ctx,&err); - } - - for (i=0; in; i++) if (!strcmp(h->tags[i].name,attr)) { - out = realloc(out,(nout+2) * sizeof *out); - glite_jp_attrval_copy(out+nout,h->tags+i); - nout++; - memset(out+nout,0,sizeof *out); - } - - if (nout) { - *attrval = out; - return 0; - } - else { - err.code = ENOENT; - err.desc = "no value for this tag"; - return glite_jp_stack_error(ctx,&err); - } -} - -static int tagsread(void *fpctx,struct tags_handle *h) -{ - glite_jp_context_t ctx = fpctx; - uint32_t magic,rlen; - glite_jp_error_t err; - int r; - size_t off = sizeof rlen; - glite_jp_attrval_t *tp; - char *rp; - - memset(&err,0,sizeof err); - err.source = __FUNCTION__; - - glite_jp_clear_error(ctx); - -// read magic number - if (glite_jppsbe_pread(ctx,h->bhandle,&magic,sizeof magic,0,&r)) { - err.code = EIO; - err.desc = "reading magic number"; - return glite_jp_stack_error(ctx,&err); - } - - if (r != sizeof magic) { - err.code = EIO; - err.desc = "can't read magic number"; - return glite_jp_stack_error(ctx,&err); - } - else if (magic != htonl(TAGS_MAGIC)) { - err.code = EINVAL; - err.desc = "invalid magic number"; - return glite_jp_stack_error(ctx,&err); - } - - - while (1) { - char *rec,type; - int rd; - - // read record header - if (glite_jppsbe_pread(ctx,h->bhandle,&rlen,sizeof rlen,off,&r)) { - err.code = EIO; - err.desc = "reading record header"; - return glite_jp_stack_error(ctx,&err); - } - if (r == 0) break; - - if (r != sizeof rlen) { - err.code = EIO; - err.desc = "can't read record header"; - return glite_jp_stack_error(ctx,&err); - } - - off += r; - rec = malloc(rlen = ntohl(rlen)); - - // read whole record body thoroughly - for (rd=0; rdbhandle,rec+rd,rlen-rd,off+rd,&r)) { - err.code = EIO; - err.desc = "reading record body"; - free(rec); - return glite_jp_stack_error(ctx,&err); - } - - off += rlen; - - // parse the record - h->tags = realloc(h->tags,(h->n+2) * sizeof *h->tags); - tp = h->tags+h->n++; - memset(tp,0,sizeof *tp); - - tp->name = strdup(rec); - rp = rec + strlen(rec) + 1; - - sscanf(rp,"%ld %c",&tp->timestamp,&type); - rp += strlen(rp) + 1; - switch (type) { - int i; - - case 'B': tp->binary = 1; break; - case 'S': tp->binary = 0; break; - default: free(rec); - for (i=0; in; i++) - glite_jp_attrval_free(h->tags+i,0); - free(h->tags); - h->tags = NULL; - h->n = 0; - - err.code = EINVAL; - err.desc = "invalid attr type (B/S)"; - return glite_jp_stack_error(ctx,&err); - } - tp->value = malloc((r=rlen - (rp - rec)) + 1); - memcpy(tp->value,rp,r); - if (!tp->binary) tp->value[r] = 0; - tp->origin = GLITE_JP_ATTR_ORIG_USER; - - free(rec); - } - return 0; -} - diff --git a/org.glite.jp.primary/src/tags.h b/org.glite.jp.primary/src/tags.h deleted file mode 100644 index 7fd524f..0000000 --- a/org.glite.jp.primary/src/tags.h +++ /dev/null @@ -1,10 +0,0 @@ -struct tags_handle { - void *bhandle; - int n; - glite_jp_attrval_t *tags; -}; - -int tag_append(void *fpctx,void *bhandle,glite_jp_attrval_t * tag); -//int glite_jpps_tag_append(glite_jp_context_t,void *,const char *, const char *); -//int glite_jpps_tag_append(glite_jp_context_t,void *,const glite_jp_tagval_t *); -int tag_attr(void *fpctx,void *handle,const char *attr,glite_jp_attrval_t **attrval); diff --git a/org.glite.jp.primary/src/typemap.dat b/org.glite.jp.primary/src/typemap.dat deleted file mode 100644 index 72f515f..0000000 --- a/org.glite.jp.primary/src/typemap.dat +++ /dev/null @@ -1,3 +0,0 @@ -jpsrv = http://glite.org/wsdl/services/jp -jptype = http://glite.org/wsdl/types/jp -jpelem = http://glite.org/wsdl/elements/jp diff --git a/org.glite.jp.primary/src/utils.c b/org.glite.jp.primary/src/utils.c deleted file mode 100644 index 533e6d1..0000000 --- a/org.glite.jp.primary/src/utils.c +++ /dev/null @@ -1,129 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "glite/jp/types.h" -#include "glite/jp/context.h" -#include "glite/jp/strmd5.h" -#include "glite/jp/known_attr.h" -#include "glite/jp/attr.h" -#include "glite/jp/escape.h" - -#include "feed.h" -#include "tags.h" -#include "db.h" - -#include "utils.h" -#include "backend.h" - -/* - * realloc the line to double size if needed - * - * \return 0 if failed, did nothing - * \return 1 if success - */ -int check_realloc_line(char **line, size_t *maxlen, size_t len) { - void *tmp; - - if (len > *maxlen) { - *maxlen <<= 1; - tmp = realloc(*line, *maxlen); - if (!tmp) return 0; - *line = tmp; - } - - return 1; -} - -/* - * read next line from stream - * - * \return error code - */ -int glite_jppsbe_readline( - glite_jp_context_t ctx, - void *handle, - rl_buffer_t *buffer, - char **line -) -{ - size_t maxlen, len, i; - ssize_t nbytes; - int retval, z, end; - - maxlen = BUFSIZ; - i = 0; - len = 0; - *line = malloc(maxlen); - end = 0; - - do { - /* read next portion */ - if (buffer->pos >= buffer->size) { - buffer->pos = 0; - buffer->size = 0; - if ((retval = glite_jppsbe_pread(ctx, handle, buffer->buf, BUFSIZ, buffer->offset, &nbytes)) == 0) { - if (nbytes < 0) { - retval = EINVAL; - goto fail; - } else { - if (nbytes) { - buffer->size = (size_t)nbytes; - buffer->offset += nbytes; - } else end = 1; - } - } else goto fail; - } - - /* we have buffer->size - buffer->pos bytes */ - i = buffer->pos; - do { - if (i >= buffer->size) z = '\0'; - else { - z = buffer->buf[i]; - if (z == '\n') z = '\0'; - } - len++; - - if (!check_realloc_line(line, &maxlen, len)) { - retval = ENOMEM; - goto fail; - } - (*line)[len - 1] = z; - i++; - } while (z && i < buffer->size); - buffer->pos = i; - } while (len && (*line)[len - 1] != '\0'); - - if ((!len || !(*line)[0]) && end) { - free(*line); - *line = NULL; - } - - return 0; - -fail: - free(*line); - *line = NULL; - return retval; -} - -char* glite_jpps_get_namespace(const char* attr){ - char* namespace = strdup(attr); - char* colon = strrchr(namespace, ':'); - if (colon) - namespace[strrchr(namespace, ':') - namespace] = 0; - else - namespace[0] = 0; - return namespace; -} - diff --git a/org.glite.jp.primary/src/utils.h b/org.glite.jp.primary/src/utils.h deleted file mode 100644 index b350ada..0000000 --- a/org.glite.jp.primary/src/utils.h +++ /dev/null @@ -1,28 +0,0 @@ -#ifndef __GLITE_JP_UTILS -#define __GLITE_JP_UTILS - -#include -#include -#include - -#include "feed.h" - -typedef struct _rl_buffer_t { - char *buf; - size_t pos, size; - off_t offset; -} rl_buffer_t; - -int glite_jppsbe_readline( - glite_jp_context_t ctx, - void *handle, - rl_buffer_t *buffer, - char **line -); - -char* glite_jpps_get_namespace( - const char* attr -); - -#endif - diff --git a/org.glite.jp.server-common/Makefile b/org.glite.jp.server-common/Makefile deleted file mode 100644 index b120cb0..0000000 --- a/org.glite.jp.server-common/Makefile +++ /dev/null @@ -1,115 +0,0 @@ -# defaults -top_srcdir=. -builddir=build -top_builddir=${top_srcdir}/${builddir} -stagedir=. -distdir=. -globalprefix=glite -jpprefix=jp -package=glite-jp-server-common -version=0.0.0 -PREFIX=/opt/glite - -glite_location=/opt/glite -globus_prefix=/opt/globus -nothrflavour=gcc32 -thrflavour=gcc32pthr - -CC=gcc - --include Makefile.inc - - -VPATH=${top_srcdir}/src:${top_srcdir}/examples:${top_srcdir}/test:${top_srcdir}/project:${jpproject}:${stagedir}/interface - -DEBUG:=-g -O0 -W -Wall -DDEBUG -CPPFLAGS:=-I. -I${top_srcdir}/interface -I${top_srcdir}/src -I${stagedir}/include -I${mysql_prefix}/include -I${mysql_prefix}/include/mysql -CFLAGS:=${DEBUG} -D_GNU_SOURCE -LDFLAGS:=-L${stagedir}/lib - -offset=0 -version_info:=-version-info ${shell \ - perl -e '$$,=":"; @F=split "\\.","${version}"; print $$F[0]+$$F[1]+${offset},$$F[2],$$F[1]' } - - -COMPILE:=libtool --mode=compile ${CC} ${CPPFLAGS} ${CFLAGS} -LINK:=libtool --mode=link ${CC} -rpath ${stagedir}/lib ${LDFLAGS} -LIBLINK:=${LINK} ${version_info} -INSTALL:=libtool --mode=install install - -GLOBUS_LIBS:=-L${globus_prefix}/lib \ - -lglobus_common_${nothrflavour} \ - -lglobus_gssapi_gsi_${nothrflavour} - -STATICLIB:=libglite_jp_server_common.a -LTLIB:=libglite_jp_server_common.la - - -SRCS:=db.c -HDRS:=db.h -OBJS:=${SRCS:.c=.o} -LOBJS:=${OBJS:.o=.lo} - -archlib:=lib -host_cpu:=${shell uname -m} -ifeq (${host_cpu},x86_64) - archlib:=lib64 -endif - -ifneq (${mysql_prefix},/usr) - ifeq ($(shell test -f ${mysql_prefix}/${archlib}/libmysqlclient.a -o -f ${mysql_prefix}/${archlib}/libmysqlclient.so && echo ok),ok) - MYSQLIB := -L${mysql_prefix}/${archlib} -lmysqlclient -lz - else - MYSQLIB := -L${mysql_prefix}/${archlib}/mysql -lmysqlclient -lz - endif -else - MYSQLIB := -lmysqlclient -lz -endif - - -default all: compile examples - -compile: ${LTLIB} ${STATICLIB} - -${LTLIB} ${STATICLIB}: ${OBJS} - ${LIBLINK} ${version_info} -o $@ ${LOBJS} ${MYSQLIB} - -examples: db-test-int - -db-test-int: db-test-int.o - ${LINK} -o $@ $+ ${STATICLIB} ${MYSQLIB} -lglite_jp_common_${nothrflavour} ${GLOBUS_LIBS} - -check: - -echo nothing yet - -doc: - -stage: compile - $(MAKE) install PREFIX=${stagedir} - -dist: distsrc distbin - -distsrc: - mkdir -p ${top_srcdir}/${package}-${version} - cd ${top_srcdir} && GLOBIGNORE="${package}-${version}" && cp -Rf * ${package}-${version} - cd ${top_srcdir} && tar -czf ${distdir}/${package}-${version}_src.tar.gz --exclude-from=project/tar_exclude ${package}-${version} - rm -rf ${top_srcdir}/${package}-${version} - -distbin: - $(MAKE) install PREFIX=`pwd`/tmpbuilddir${stagedir} - save_dir=`pwd`; cd tmpbuilddir${stagedir} && tar -czf $$save_dir/${top_srcdir}/${distdir}/${package}-${version}_bin.tar.gz *; cd $$save_dir - rm -rf tmpbuilddir - -install: - -mkdir -p ${PREFIX}/lib ${PREFIX}/include/${globalprefix}/${jpprefix} - ${INSTALL} -m 755 ${LTLIB} ${PREFIX}/lib - for f in ${HDRS}; do \ - ${INSTALL} -m 644 ${top_srcdir}/interface/"$$f" ${PREFIX}/include/${globalprefix}/${jpprefix}; \ - done - -clean: - -%.o: %.c - ${COMPILE} -c $< -o $@ - -.PHONY: default all compile examples check doc stage dist distsrc distbin install clean diff --git a/org.glite.jp.server-common/build.xml b/org.glite.jp.server-common/build.xml deleted file mode 100755 index 33d20cf..0000000 --- a/org.glite.jp.server-common/build.xml +++ /dev/null @@ -1,101 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/org.glite.jp.server-common/examples/db-test-int.c b/org.glite.jp.server-common/examples/db-test-int.c deleted file mode 100644 index e58b5c2..0000000 --- a/org.glite.jp.server-common/examples/db-test-int.c +++ /dev/null @@ -1,112 +0,0 @@ -#include -#include - -#include "db.h" - - -static void print_err(glite_jp_context_t ctx) { - glite_jp_error_t *e; - - e = ctx->error; - while (e) { - printf("%s(%s)\n", e->desc, e->source); - e = e->reason; - } - printf("\n"); -} - - -int main() { - glite_jp_context_t ctx; - glite_jp_db_stmt_t jpstmt; - - glite_jp_init_context(&ctx); - - printf("connecting...\n"); - if (glite_jp_db_connect(ctx, "jpis/@localhost:jpis1") != 0) goto fail; - - // "trio" queries -{ - int nr, i; - char **res; - - printf("selecting...\n"); - if ((glite_jp_db_execstmt(ctx, "SELECT uniqueid, feedid, state, source, condition FROM feeds", &jpstmt)) == -1) goto fail; - - printf("fetching...\n"); - res = calloc(4, sizeof(char *)); - while ((nr = glite_jp_db_fetchrow(jpstmt, res)) > 0) { - printf("Result: n=%d, res=%p\n", nr, res); - i = 0; - if (res) while(i < nr) {printf("p=%p(%s)\n", res[i], res[i]);free(res[i]);i++;} - } - free(res); - printf("closing stmt...\n"); - glite_jp_db_freestmt(&jpstmt); -} - - // param queries -{ - char res_feedid[33]; - long int res_state; - char res_source[256]; - char res_condition[1024]; - unsigned long res_condition_length; - long int param_state; - - void *my_res, *my_param; - - glite_jp_db_create_params(&my_param, 1, GLITE_JP_DB_TYPE_INT, ¶m_state); - glite_jp_db_create_results(&my_res, 4, - GLITE_JP_DB_TYPE_VARCHAR, NULL, res_feedid, sizeof(res_feedid), NULL, - GLITE_JP_DB_TYPE_INT, NULL, &res_state, - GLITE_JP_DB_TYPE_VARCHAR, NULL, res_source, sizeof(res_source), NULL, - GLITE_JP_DB_TYPE_MEDIUMBLOB, NULL, res_condition, sizeof(res_condition), &res_condition_length - ); - printf("preparing...\n"); - if ((glite_jp_db_prepare(ctx, "SELECT feedid, state, source, condition FROM feeds WHERE state = ?", &jpstmt, my_param, my_res)) != 0) goto fail_close; - - param_state = 1; - printf("executing state %ld...\n", param_state); - if (glite_jp_db_execute(jpstmt) == -1) { - glite_jp_db_freestmt(&jpstmt); - goto fail_stmtclose; - } - printf("fetching...\n"); - while (glite_jp_db_fetch(jpstmt) == 0) { - printf("feedid:%s, state:%ld, source:%s, condition:%s\n", res_feedid, res_state, res_source, res_condition); - } - - param_state = 2; - printf("executing state %ld...\n", param_state); - if (glite_jp_db_execute(jpstmt) == -1) { - glite_jp_db_freestmt(&jpstmt); - goto fail_stmtclose; - } - printf("fetching...\n"); - while (glite_jp_db_fetch(jpstmt) == 0) { - printf("feedid:%s, state:%ld, source:%s, condition:%s\n", res_feedid, res_state, res_source, res_condition); - } -} - - printf("closing stmt...\n"); - glite_jp_db_freestmt(&jpstmt); - printf("closing...\n"); - glite_jp_db_close(ctx); - - glite_jp_free_context(ctx); - return 0; - -fail_stmtclose: - printf("closing stmt...\n"); - glite_jp_db_freestmt(&jpstmt); -fail_close: - printf("closing...\n"); - glite_jp_db_close(ctx); -fail: - printf("failed\n"); - print_err(ctx); - glite_jp_free_context(ctx); - - return 1; -} diff --git a/org.glite.jp.server-common/interface/db.h b/org.glite.jp.server-common/interface/db.h deleted file mode 100644 index d3ad2a8..0000000 --- a/org.glite.jp.server-common/interface/db.h +++ /dev/null @@ -1,255 +0,0 @@ -#ifndef _DB_H -#define _DB_H - -#ident "$Header$" - -#include -#include - -#ifdef __cplusplus -extern "C" { -#endif - -#include -#include - -typedef struct _glite_jp_db_stmt_t *glite_jp_db_stmt_t; - -typedef enum { - GLITE_JP_DB_TYPE_NULL = 0, - GLITE_JP_DB_TYPE_TINYINT = 1, - GLITE_JP_DB_TYPE_INT = 2, - GLITE_JP_DB_TYPE_TINYBLOB = 3, - GLITE_JP_DB_TYPE_TINYTEXT = 4, - GLITE_JP_DB_TYPE_BLOB = 5, - GLITE_JP_DB_TYPE_TEXT = 6, - GLITE_JP_DB_TYPE_MEDIUMBLOB = 7, - GLITE_JP_DB_TYPE_MEDIUMTEXT = 8, - GLITE_JP_DB_TYPE_LONGBLOB = 9, - GLITE_JP_DB_TYPE_LONGTEXT = 10, - GLITE_JP_DB_TYPE_VARCHAR = 11, - GLITE_JP_DB_TYPE_CHAR = 12, - GLITE_JP_DB_TYPE_DATE = 13, - GLITE_JP_DB_TYPE_TIME = 14, - GLITE_JP_DB_TYPE_DATETIME = 15, - GLITE_JP_DB_TYPE_TIMESTAMP = 16, - GLITE_JP_DB_TYPE_LAST = 17 -} glite_jp_db_type_t; - -/** - * Connect to the database. - * - * \param[inout] cxt context to work with - * \param[in] cs connect string user/password@host:database - * - \return JP error code - */ -int glite_jp_db_connect(glite_jp_context_t, const char *); - - -/** - * Close the connection to database. - * - * \param[inout] ctx context to work with - */ -void glite_jp_db_close(glite_jp_context_t); - - -/** - * Parse and execute SQL statement. - * - * \param[inout] ctx context to work with - * \param[in] txt SQL statement - * \param[out] stmt statement handle, usable for select only - * - * \return number of rows selected, created or affected by update, or -1 on error - */ -int glite_jp_db_execstmt(glite_jp_context_t, const char *, glite_jp_db_stmt_t *); - - -/** Fetch next row of select statement. - * All columns are returned as fresh allocated strings - * - * \param[inout] stmt statement from glite_jp_db_execstmt() - * \param[out] array of fetched values. - * As number of columns is fixed and known, - * expects allocated array of pointers here. - * - * \retval >0 number of fields of the retrieved row - * \retval 0 no more rows - * \retval -1 error - * - * Errors are stored in context passed to previous glite_jp_db_execstmt() - */ -int glite_jp_db_fetchrow(glite_jp_db_stmt_t, char **); - - -/** - * Retrieve column names of a query statement - * - * \param[inout] stmt statement - * \param[out] cols result set column names. Expects allocated array. - * - * \return 0 if OK, nonzero on error - */ -int glite_jp_db_querycolumns(glite_jp_db_stmt_t, char **); - - -/** - * Free the statement structure and destroy its parameters. - * - * \param[inout] stmt statement - */ -void glite_jp_db_freestmt(glite_jp_db_stmt_t *); - - -/** - * Convert time_t into database-specific time string. - * - * \param[in] t the converted time - * \return XXX: pointer to static area that is changed by subsequent calls - */ -char *glite_jp_db_timetodb(time_t); - - -/** - * Convert database-specific time string into time_t. - * - * \param[in] t the converted string - * - * \return result time - */ -time_t glite_jp_db_dbtotime(const char *); - - -/** - * Check database version. - * - * \param[inout] ctx context to work with - * - * \return JP error code - */ -int glite_jp_db_dbcheckversion(glite_jp_context_t); - - -/** - * Create and assign parameters for mysql prepared commands. - * - * \param[out] params internal structure array - * - * Variable parameters: - * always: - * glite_jp_db_type_t type DB item type - * then one of them: - * GLITE_JP_DB_TYPE_TINYINT: char *buffer - * GLITE_JP_DB_TYPE_INT: int *buffer - * GLITE_JP_DB_TYPE_*BLOB/TEXT: void *buffer, unsigned long *length - * GLITE_JP_DB_TYPE_[VAR]CHAR: char *buffer, unsigned long *length - * GLITE_JP_DB_TYPE_DATE: void **buffer - * GLITE_JP_DB_TYPE_TIME: void **buffer - * GLITE_JP_DB_TYPE_DATETIME: void **buffer - * GLITE_JP_DB_TYPE_TIMESTAMP: void **buffer - * GLITE_JP_DB_TYPE_NULL: - - */ -void glite_jp_db_create_params(void **params, int n, ...); - -/** - * Create and assign result variables for mysql prepared commands. - * - * \param[inout] result mysql bind strusture array - * - * Variable parameters: - * always: - * \param[in] glite_jp_db_type_t type DB item type - * \param[in] int *is_null pointer to is_null boolean or NULL - * then one of them: - * GLITE_JP_DB_TYPE_TINYINT: char *buffer - * GLITE_JP_DB_TYPE_INT: long int *buffer - * GLITE_JP_DB_TYPE_*BLOB/TEXT: void *buffer, unsigned long max_length, unsigned long *length - * GLITE_JP_DB_TYPE_[VAR]CHAR: char *buffer, unsigned long max_length, unsigned long *length - * GLITE_JP_DB_TYPE_DATE: void **buffer - * GLITE_JP_DB_TYPE_TIME: void **buffer - * GLITE_JP_DB_TYPE_DATETIME: void **buffer - * GLITE_JP_DB_TYPE_TIMESTAMP: void **buffer - */ -void glite_jp_db_create_results(void **results, int n, ...); - -/** - * Destroy prepared parameters. - */ -void glite_jp_db_destroy_params(void *params); - -/** - * Destroy prepared results. - */ -void glite_jp_db_destroy_results(void *results); - -#if 0 -void glite_jp_db_assign_param(MYSQL_BIND *param, enum enum_field_types type, ...); -void glite_jp_db_assign_result(MYSQL_BIND *result, enum enum_field_types type, my_bool *is_null, ...); -#endif - -/** - * Assign time_t to buffer. - */ -void glite_jp_db_set_time(void *buffer, const time_t time); - -/** - * Get the time from buffer. - */ -time_t glite_jp_db_get_time(const void *buffer); - -/** - * Rebind the parameters and/or results. - * - * \param[inout] jpstmt JP SQL statement to work with - * \param[inout] params mysql static structure with parameters or NULL - * \param[inout] cols mysql static structure with result buffer or NULL - * - * \return JP error code - */ -int glite_jp_db_rebind(glite_jp_db_stmt_t jpstmt, void *params, void *cols); - -/** - * Prepare the SQL statement. Use glite_jp_db_freestmt() to free it. - * - * \param[inout] ctx context to work with - * \param[in] sql SQL command - * \param[out] jpstmt returned JP SQL statement - * \param[inout] params mysql static structure with parameters or NULL - * \param[inout] cols mysql static structure with result buffer or NULL - * - * \return JP error code - */ -int glite_jp_db_prepare(glite_jp_context_t ctx, const char *sql, glite_jp_db_stmt_t *jpstmt, void *params, void *cols); - -/** - * Execute prepared SQL statement. - * - * \param[inout] jpstmt JP SQL statement - * - * \return number of affected rows, -1 on error - */ -int glite_jp_db_execute(glite_jp_db_stmt_t jpstmt); - -/** - * - * \param[inout] jpstmt JP SQL statement - * - * \return JP error code (ENODATA when no more row are available) - */ -int glite_jp_db_fetch(glite_jp_db_stmt_t jpstmt); - -/** - * - * \param[inout] jpstmt JP SQL statement - * - * \return value of autoincremented field after last insert/update - */ -long int glite_jp_db_lastid(glite_jp_db_stmt_t jpstmt); - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/org.glite.jp.server-common/project/build.number b/org.glite.jp.server-common/project/build.number deleted file mode 100644 index baeaebc..0000000 --- a/org.glite.jp.server-common/project/build.number +++ /dev/null @@ -1,2 +0,0 @@ -#Sat Oct 15 06:50:18 CEST 2005 -module.build=3 diff --git a/org.glite.jp.server-common/project/configure.properties.xml b/org.glite.jp.server-common/project/configure.properties.xml deleted file mode 100644 index 2fb0a4d..0000000 --- a/org.glite.jp.server-common/project/configure.properties.xml +++ /dev/null @@ -1,72 +0,0 @@ - - - - - - - - - - - -top_srcdir=.. -builddir=build -stagedir=${stage.abs.dir} -distdir=${dist.dir} -globalprefix=${global.prefix} -jpprefix=${subsystem.prefix} -package=${module.package.name} -PREFIX=${install.dir} -version=${module.version} -glite_location=${with.glite.location} -globus_prefix=${with.globus.prefix} -expat_prefix=${with.expat.prefix} -gsoap_prefix=${with.gsoap.prefix} -mysql_prefix=${with.mysql.prefix} -mysql_version=${ext.mysql.version} -thrflavour=${with.globus.thr.flavor} -nothrflavour=${with.globus.nothr.flavor} -cppunit=${with.cppunit.prefix} -jpproject=${subsystem.project.dir} -project=${component.project.dir} - - - diff --git a/org.glite.jp.server-common/project/properties.xml b/org.glite.jp.server-common/project/properties.xml deleted file mode 100755 index bd0829c..0000000 --- a/org.glite.jp.server-common/project/properties.xml +++ /dev/null @@ -1,56 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/org.glite.jp.server-common/project/tar_exclude b/org.glite.jp.server-common/project/tar_exclude deleted file mode 100644 index e1fcd1a..0000000 --- a/org.glite.jp.server-common/project/tar_exclude +++ /dev/null @@ -1,10 +0,0 @@ -tar_exclude -CVS -build.xml -build -build.properties -properties.xml -configure.properties.xml -.cvsignore -.project -.cdtproject diff --git a/org.glite.jp.server-common/project/version.properties b/org.glite.jp.server-common/project/version.properties deleted file mode 100644 index 46eb5a1..0000000 --- a/org.glite.jp.server-common/project/version.properties +++ /dev/null @@ -1,2 +0,0 @@ -module.version=1.2.0 -module.age=1 diff --git a/org.glite.jp.server-common/src/db.c b/org.glite.jp.server-common/src/db.c deleted file mode 100644 index 5f1b9f4..0000000 --- a/org.glite.jp.server-common/src/db.c +++ /dev/null @@ -1,673 +0,0 @@ -#ident "$Header$" - -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "glite/jp/types.h" -#include "glite/jp/context.h" - -#include "db.h" - - -#define GLITE_JP_DB_MYSQL_VERSION 40102 - -#if !defined(MYSQL_VERSION_ID) || MYSQL_VERSION_ID < GLITE_JP_DB_MYSQL_VERSION -#error required MySQL version 4.1.2 -#endif - -#define JP_ERR(CTX, CODE, DESC) jp_err((CTX), (CODE), (DESC), __FUNCTION__, __LINE__) -#define MY_ERR(CTX) my_err((CTX), __FUNCTION__, __LINE__) -#define MY_ERRSTMT(JPSTMT) my_errstmt((JPSTMT), __FUNCTION__, __LINE__) -#define MY_ISOKSTMT(JPSTMT, RETRY) my_isokstmt((JPSTMT), __FUNCTION__, __LINE__, (RETRY)) - - -typedef struct { - int n; - MYSQL_BIND params[1]; -} params_t; - -struct _glite_jp_db_stmt_t { - glite_jp_context_t ctx; - MYSQL_RES *result; - MYSQL_STMT *stmt; - params_t *params, *results; -}; - - -static int glite_to_mysql_type[] = { - MYSQL_TYPE_NULL, - MYSQL_TYPE_TINY, - MYSQL_TYPE_LONG, - MYSQL_TYPE_TINY_BLOB, - MYSQL_TYPE_TINY_BLOB, - MYSQL_TYPE_BLOB, - MYSQL_TYPE_BLOB, - MYSQL_TYPE_MEDIUM_BLOB, - MYSQL_TYPE_MEDIUM_BLOB, - MYSQL_TYPE_LONG_BLOB, - MYSQL_TYPE_LONG_BLOB, - MYSQL_TYPE_VAR_STRING, - MYSQL_TYPE_STRING, - MYSQL_TYPE_DATE, - MYSQL_TYPE_TIME, - MYSQL_TYPE_DATETIME, - MYSQL_TYPE_TIMESTAMP, -}; - - -static int jp_err(glite_jp_context_t ctx, int code, const char *desc, const char *source, int line) -{ - glite_jp_error_t err; - char *fullsource; - int ret; - - asprintf(&fullsource, "%s:%d", source, line); - memset(&err,0,sizeof err); - err.code = code; - err.source = fullsource; - err.desc = desc; - - ret = glite_jp_stack_error(ctx,&err); - free(fullsource); - return ret; -} - - -static int my_err(glite_jp_context_t ctx, const char *source, int line) -{ - return jp_err(ctx, EIO, mysql_error((MYSQL *)ctx->dbhandle), source, line); -} - - -static int my_errstmt(glite_jp_db_stmt_t jpstmt, const char *source, int line) { - return jp_err(jpstmt->ctx, EIO, mysql_stmt_error(jpstmt->stmt), source, line); -} - - -/* - * Error handle. - * - * \return -1 failed - * \return 0 retry - * \return 1 OK - */ -static int my_isokstmt(glite_jp_db_stmt_t jpstmt, const char *source, int line, int *retry) { - switch (mysql_stmt_errno(jpstmt->stmt)) { - case 0: - return 1; - break; - case ER_DUP_ENTRY: - jp_err(jpstmt->ctx, EEXIST, mysql_stmt_error(jpstmt->stmt), source, line); - return -1; - break; - case CR_SERVER_LOST: - if (*retry > 0) { - (*retry)--; - return 0; - } else - return -1; - break; - default: - my_errstmt(jpstmt, source, line); - return -1; - break; - } -} - - -int glite_jp_db_connect(glite_jp_context_t ctx,const char *cs) -{ - char *buf = NULL; - char *host,*user,*pw,*db; - char *slash,*at,*colon; - int ret; - - // needed for SQL result parameters - assert(sizeof(int) >= sizeof(my_bool)); - - glite_jp_clear_error(ctx); - - if (!cs) return JP_ERR(ctx, EINVAL, "connect string not specified"); - - if (!(ctx->dbhandle = (void *) mysql_init(NULL))) return JP_ERR(ctx, ENOMEM, NULL); - - mysql_options(ctx->dbhandle, MYSQL_READ_DEFAULT_FILE, "my"); - - host = user = pw = db = NULL; - - buf = strdup(cs); - slash = strchr(buf,'/'); - at = strrchr(buf,'@'); - colon = strrchr(buf,':'); - - if (!slash || !at || !colon) { - free(buf); - glite_jp_db_close(ctx); - return JP_ERR(ctx, EINVAL, "Invalid DB connect string"); - } - - *slash = *at = *colon = 0; - host = at+1; - user = buf; - pw = slash+1; - db = colon+1; - - if (!mysql_real_connect((MYSQL *) ctx->dbhandle,host,user,pw,db,0,NULL,CLIENT_FOUND_ROWS)) { - free(buf); - ret = MY_ERR(ctx); - glite_jp_db_close(ctx); - return ret; - } - free(buf); - - if ((ret = glite_jp_db_dbcheckversion(ctx)) != 0) { - glite_jp_db_close(ctx); - return ret; - } - - return 0; -} - - -void glite_jp_db_close(glite_jp_context_t ctx) -{ - if (ctx->dbhandle) { - mysql_close((MYSQL *) ctx->dbhandle); - ctx->dbhandle = NULL; - } -} - - -int glite_jp_db_execstmt(glite_jp_context_t ctx,const char *txt,glite_jp_db_stmt_t *stmt) -{ - int merr; - int retry_nr = 0; - int do_reconnect = 0; - - glite_jp_clear_error(ctx); - - if (stmt) { - *stmt = NULL; - } - - while (retry_nr == 0 || do_reconnect) { - do_reconnect = 0; - if (mysql_query((MYSQL *) ctx->dbhandle,txt)) { - /* error occured */ - switch (merr = mysql_errno((MYSQL *) ctx->dbhandle)) { - case 0: - break; - case ER_DUP_ENTRY: - JP_ERR(ctx, EEXIST, mysql_error((MYSQL *) ctx->dbhandle)); - return -1; - break; - case CR_SERVER_LOST: - if (retry_nr <= 0) - do_reconnect = 1; - break; - default: - MY_ERR(ctx); - return -1; - break; - } - } - retry_nr++; - } - - if (stmt) { - *stmt = malloc(sizeof(**stmt)); - if (!*stmt) { - JP_ERR(ctx, ENOMEM, NULL); - return -1; - } - memset(*stmt,0,sizeof(**stmt)); - (**stmt).ctx = ctx; - (**stmt).result = mysql_store_result((MYSQL *) ctx->dbhandle); - if (!(**stmt).result) { - if (mysql_errno((MYSQL *) ctx->dbhandle)) { - MY_ERR(ctx); - return -1; - } - } - } else { - MYSQL_RES *r = mysql_store_result((MYSQL *) ctx->dbhandle); - mysql_free_result(r); - } - - return mysql_affected_rows((MYSQL *) ctx->dbhandle); -} - - -int glite_jp_db_fetchrow(glite_jp_db_stmt_t stmt,char **res) -{ - MYSQL_ROW row; - glite_jp_context_t ctx = stmt->ctx; - int nr,i; - unsigned long *len; - - glite_jp_clear_error(ctx); - - if (!stmt->result) return 0; - - if (!(row = mysql_fetch_row(stmt->result))) { - if (mysql_errno((MYSQL *) ctx->dbhandle)) { - MY_ERR(ctx); - return -1; - } else return 0; - } - - nr = mysql_num_fields(stmt->result); - len = mysql_fetch_lengths(stmt->result); - for (i=0; iresult))) cols[i++] = f->name; - return i == 0; -} - - -void glite_jp_db_freestmt(glite_jp_db_stmt_t *stmt) -{ - if (*stmt) { - if ((**stmt).result) mysql_free_result((**stmt).result); - if ((*stmt)->stmt) mysql_stmt_close((*stmt)->stmt); - if ((*stmt)->params) glite_jp_db_destroy_params((*stmt)->params); - if ((*stmt)->results) glite_jp_db_destroy_results((*stmt)->results); - free(*stmt); - *stmt = NULL; - } -} - - -char *glite_jp_db_timetodb(time_t t) -{ - struct tm *tm = gmtime(&t); - char tbuf[256]; - - /* XXX: the very end of our days */ - if (!tm && t == (time_t) LONG_MAX) return strdup("9999-12-31 23:59:59"); - - sprintf(tbuf,"'%4d-%02d-%02d %02d:%02d:%02d'",tm->tm_year+1900,tm->tm_mon+1, - tm->tm_mday,tm->tm_hour,tm->tm_min,tm->tm_sec); - - return strdup(tbuf); -} - - -time_t glite_jp_db_dbtotime(const char *t) -{ - struct tm tm; - - memset(&tm,0,sizeof(tm)); - setenv("TZ","UTC",1); tzset(); - sscanf(t,"%4d-%02d-%02d %02d:%02d:%02d", - &tm.tm_year,&tm.tm_mon,&tm.tm_mday, - &tm.tm_hour,&tm.tm_min,&tm.tm_sec); - tm.tm_year -= 1900; - tm.tm_mon--; - - return mktime(&tm); -} - - -int glite_jp_db_dbcheckversion(glite_jp_context_t ctx) -{ - MYSQL *m = (MYSQL *) ctx->dbhandle; - const char *ver_s = mysql_get_server_info(m); - int major,minor,sub,version; - - glite_jp_clear_error(ctx); - - if (!ver_s || 3 != sscanf(ver_s,"%d.%d.%d",&major,&minor,&sub)) { - return JP_ERR(ctx, EINVAL, "problem checking MySQL version"); - } - - version = 10000*major + 100*minor + sub; - - if (version < GLITE_JP_DB_MYSQL_VERSION) { - char msg[300]; - - return JP_ERR(ctx, EINVAL, msg); - } - - return 0; -} - - -void glite_jp_db_create_params(void **params, int n, ...) { - params_t *myparams; - MYSQL_BIND *myparam; - MYSQL_TIME **mytime; - int i; - va_list ap; - glite_jp_db_type_t type; - - myparams = calloc(n, sizeof(params_t) + (n - 1) * sizeof(MYSQL_BIND)); - va_start(ap, n); - - for (i = 0; i < n; i++) { - myparam = myparams->params + i; - type = va_arg(ap, glite_jp_db_type_t); - - switch (type) { - case GLITE_JP_DB_TYPE_TINYINT: - myparam->buffer = va_arg(ap, char *); - break; - - case GLITE_JP_DB_TYPE_INT: - myparam->buffer = va_arg(ap, long int *); - break; - - case GLITE_JP_DB_TYPE_TINYBLOB: - case GLITE_JP_DB_TYPE_TINYTEXT: - case GLITE_JP_DB_TYPE_BLOB: - case GLITE_JP_DB_TYPE_TEXT: - case GLITE_JP_DB_TYPE_MEDIUMBLOB: - case GLITE_JP_DB_TYPE_MEDIUMTEXT: - case GLITE_JP_DB_TYPE_LONGBLOB: - case GLITE_JP_DB_TYPE_LONGTEXT: - myparam->buffer = va_arg(ap, void *); - myparam->length = va_arg(ap, unsigned long *); - break; - - case GLITE_JP_DB_TYPE_VARCHAR: - case GLITE_JP_DB_TYPE_CHAR: - myparam->buffer = va_arg(ap, char *); - myparam->length = va_arg(ap, unsigned long *); - break; - - case GLITE_JP_DB_TYPE_DATE: - case GLITE_JP_DB_TYPE_TIME: - case GLITE_JP_DB_TYPE_DATETIME: - case GLITE_JP_DB_TYPE_TIMESTAMP: - mytime = (MYSQL_TIME **)va_arg(ap, void **); - *mytime = calloc(1, sizeof(MYSQL_TIME)); - myparam->buffer = *mytime; - break; - - case GLITE_JP_DB_TYPE_NULL: - break; - - default: - assert("unimplemented parameter assign" == NULL); - break; - } - myparam->buffer_type = glite_to_mysql_type[type]; - } - myparams->n = n; - - va_end(ap); - *params = myparams; -} - - -void glite_jp_db_create_results(void **results, int n, ...) { - params_t *myresults; - MYSQL_BIND *myresult; - MYSQL_TIME **mytime; - va_list ap; - int i; - glite_jp_db_type_t type; - int *is_null; - - myresults = calloc(n, sizeof(params_t) + (n - 1) * sizeof(MYSQL_BIND)); - va_start(ap, n); - - for (i = 0; i < n; i++) { - myresult = myresults->params + i; - type = va_arg(ap, glite_jp_db_type_t); - is_null = va_arg(ap, int *); - myresult->is_null = (my_bool *)is_null; - if (is_null) *is_null = 0; - - switch(type) { - case GLITE_JP_DB_TYPE_TINYINT: - myresult->buffer = va_arg(ap, char *); - myresult->buffer_length = sizeof(char); - break; - - case GLITE_JP_DB_TYPE_INT: - myresult->buffer = va_arg(ap, long int *); - myresult->buffer_length = sizeof(long int); - break; - - case GLITE_JP_DB_TYPE_TINYBLOB: - case GLITE_JP_DB_TYPE_TINYTEXT: - case GLITE_JP_DB_TYPE_BLOB: - case GLITE_JP_DB_TYPE_TEXT: - case GLITE_JP_DB_TYPE_MEDIUMBLOB: - case GLITE_JP_DB_TYPE_MEDIUMTEXT: - case GLITE_JP_DB_TYPE_LONGBLOB: - case GLITE_JP_DB_TYPE_LONGTEXT: - myresult->buffer = va_arg(ap, void *); - myresult->buffer_length = va_arg(ap, unsigned long); - myresult->length = va_arg(ap, unsigned long *); - break; - - case GLITE_JP_DB_TYPE_VARCHAR: - case GLITE_JP_DB_TYPE_CHAR: - myresult->buffer = va_arg(ap, char *); - myresult->buffer_length = va_arg(ap, unsigned long); - myresult->length = va_arg(ap, unsigned long *); - break; - - case GLITE_JP_DB_TYPE_DATE: - case GLITE_JP_DB_TYPE_TIME: - case GLITE_JP_DB_TYPE_DATETIME: - case GLITE_JP_DB_TYPE_TIMESTAMP: - mytime = (MYSQL_TIME **)va_arg(ap, void **); - *mytime = calloc(1, sizeof(MYSQL_TIME)); - myresult->buffer = *mytime; - break; - - default: - assert("unimplemented result assign" == NULL); - } - myresult->buffer_type = glite_to_mysql_type[type]; - if (myresult->buffer && myresult->buffer_length) memset(myresult->buffer, 0, myresult->buffer_length); - } - myresults->n = n; - - va_end(ap); - *results = myresults; -} - - -static void glite_jp_db_destroy_respam(params_t *params) { - MYSQL_BIND *myparam; - int i; - enum enum_field_types type; - - for (i = 0; i < params->n; i++) { - myparam = params->params + i; - type = myparam->buffer_type; - if (type == MYSQL_TYPE_DATE || type == MYSQL_TYPE_TIME || type == MYSQL_TYPE_DATETIME || type == MYSQL_TYPE_TIMESTAMP) { - free(myparam->buffer); - myparam->buffer = NULL; - } - } - free(params); -} - - -void glite_jp_db_destroy_params(void *params) { - glite_jp_db_destroy_respam(params); -} - - -void glite_jp_db_destroy_results(void *results) { - glite_jp_db_destroy_respam(results); -} - - -void glite_jp_db_set_time(void *buffer, const time_t time) { - MYSQL_TIME *mybuffer; - struct tm tm; - - mybuffer = (MYSQL_TIME *)buffer; - gmtime_r(&time, &tm); - memset(mybuffer, 0, sizeof *mybuffer); - mybuffer->year = tm.tm_year + 1900; - mybuffer->month = tm.tm_mon + 1; - mybuffer->day = tm.tm_mday; - mybuffer->hour = tm.tm_hour; - mybuffer->minute = tm.tm_min; - mybuffer->second = tm.tm_sec; -} - - -time_t glite_jp_db_get_time(const void *buffer) { - MYSQL_TIME *mybuffer; - struct tm tm; - - mybuffer = (MYSQL_TIME *)buffer; - memset(&tm, 0, sizeof(tm)); - setenv("TZ","UTC",1); tzset(); - tm.tm_year = mybuffer->year - 1900; - tm.tm_mon = mybuffer->month - 1; - tm.tm_mday = mybuffer->day; - tm.tm_hour = mybuffer->hour; - tm.tm_min = mybuffer->minute; - tm.tm_sec = mybuffer->second; - - return mktime(&tm); -} - - -int glite_jp_db_rebind(glite_jp_db_stmt_t jpstmt, void *params, void *cols) { - if (jpstmt->params) { - glite_jp_db_destroy_params(jpstmt->params); - jpstmt->params = NULL; - } - if (jpstmt->results) { - glite_jp_db_destroy_results(jpstmt->results); - jpstmt->results = NULL; - } - if (params) { - jpstmt->params = (params_t *)params; - if (mysql_stmt_bind_param(jpstmt->stmt, jpstmt->params->params) != 0) return MY_ERRSTMT(jpstmt); - } - if (cols) { - jpstmt->results = (params_t *)cols; - if (mysql_stmt_bind_result(jpstmt->stmt, jpstmt->results->params) != 0) return MY_ERRSTMT(jpstmt); - } - - return 0; -} - - -int glite_jp_db_prepare(glite_jp_context_t ctx, const char *sql, glite_jp_db_stmt_t *jpstmt, void *params, void *cols) { - int ret, retry; - - glite_jp_clear_error(ctx); - - // init - *jpstmt = calloc(1, sizeof(struct _glite_jp_db_stmt_t)); - (*jpstmt)->ctx = ctx; - - // create the SQL command - if (((*jpstmt)->stmt = mysql_stmt_init((MYSQL *)ctx->dbhandle)) == NULL) { - ret = MY_ERRSTMT(*jpstmt); - goto failed; - } - - // prepare the SQL command - retry = 1; - do { - mysql_stmt_prepare((*jpstmt)->stmt, sql, strlen(sql)); - ret = MY_ISOKSTMT(*jpstmt, &retry); - } while (ret == 0); - if (ret == -1) goto failed; - - // parameters and results - if ((ret = glite_jp_db_rebind(*jpstmt, params, cols)) != 0) goto failed; - - return 0; - -failed: - if (params) glite_jp_db_destroy_params(params); - if (cols) glite_jp_db_destroy_params(cols); - glite_jp_db_freestmt(jpstmt); - return ctx->error->code; -} - - -int glite_jp_db_execute(glite_jp_db_stmt_t jpstmt) { - glite_jp_context_t ctx; - int ret, retry; - - ctx = jpstmt->ctx; - glite_jp_clear_error(ctx); - - // run - retry = 1; - do { - mysql_stmt_execute(jpstmt->stmt); - ret = MY_ISOKSTMT(jpstmt, &retry); - } while (ret == 0); - if (ret == -1) goto failed; - - // result - mysql_stmt_store_result(jpstmt->stmt); - if (mysql_stmt_errno(jpstmt->stmt)) { - MY_ERRSTMT(jpstmt); - goto failed; - } - - return mysql_stmt_affected_rows(jpstmt->stmt); - -failed: - return -1; -} - - -int glite_jp_db_fetch(glite_jp_db_stmt_t jpstmt) { - int ret, retry; - - glite_jp_clear_error(jpstmt->ctx); - - retry = 1; - do { - switch(mysql_stmt_fetch(jpstmt->stmt)) { - case 0: ret = 1; break; - case 1: ret = MY_ISOKSTMT(jpstmt, &retry); break; - case MYSQL_NO_DATA: JP_ERR(jpstmt->ctx, ENODATA, "no more rows"); ret = -1; break; - default: JP_ERR(jpstmt->ctx, EIO, "other fetch error"); ret = -1; break; - } - } while (ret == 0); - if (ret == -1) goto failed; - - return 0; - -failed: - return jpstmt->ctx->error->code; -} - - -long int glite_jp_db_lastid(glite_jp_db_stmt_t jpstmt) { - my_ulonglong i; - - glite_jp_clear_error(jpstmt->ctx); - i = mysql_stmt_insert_id(jpstmt->stmt); - assert(i < ((unsigned long int)-1) >> 1); - return (long int)i; -} diff --git a/org.glite.jp.ws-interface/.cvsignore b/org.glite.jp.ws-interface/.cvsignore deleted file mode 100755 index 1df717b..0000000 --- a/org.glite.jp.ws-interface/.cvsignore +++ /dev/null @@ -1,2 +0,0 @@ -.project -.cdtproject \ No newline at end of file diff --git a/org.glite.jp.ws-interface/LICENSE b/org.glite.jp.ws-interface/LICENSE deleted file mode 100755 index 01b973b..0000000 --- a/org.glite.jp.ws-interface/LICENSE +++ /dev/null @@ -1,69 +0,0 @@ -LICENSE file for EGEE Middleware -================================ - -Copyright (c) 2004 on behalf of the EU EGEE Project: -The European Organization for Nuclear Research (CERN), -Istituto Nazionale di Fisica Nucleare (INFN), Italy -Datamat Spa, Italy -Centre National de la Recherche Scientifique (CNRS), France -CS Systeme d'Information (CSSI), France -Royal Institute of Technology, Center for Parallel Computers (KTH-PDC), Sweden -Universiteit van Amsterdam (UvA), Netherlands -University of Helsinki (UH.HIP), Finlan -University of Bergen (UiB), Norway -Council for the Central Laboratory of the Research Councils (CCLRC), United Kingdom - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - -1. Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - -2. Redistributions in binary form must reproduce the above copyright -notice, this list of conditions and the following disclaimer in the -documentation and/or other materials provided with the distribution. - -3. The end-user documentation included with the redistribution, if -any, must include the following acknowledgment: "This product includes -software developed by The EU EGEE Project (http://cern.ch/eu-egee/)." -Alternatively, this acknowledgment may appear in the software itself, if -and wherever such third-party acknowledgments normally appear. - -4. The names EGEE and the EU EGEE Project must not be -used to endorse or promote products derived from this software without -prior written permission. For written permission, please contact -. - -5. You are under no obligation whatsoever to provide anyone with any -bug fixes, patches, or upgrades to the features, functionality or -performance of the Software ("Enhancements") that you may develop over -time; however, if you choose to provide your Enhancements to The EU -EGEE Project, or if you choose to otherwise publish or distribute your -Enhancements, in source code form without contemporaneously requiring -end users of The EU EGEE Proejct to enter into a separate written license -agreement for such Enhancements, then you hereby grant The EU EGEE Project -a non-exclusive, royalty-free perpetual license to install, use, copy, -modify, prepare derivative works, incorporate into the EGEE Middleware -or any other computer software, distribute, and sublicense your -Enhancements or derivative works thereof, in binary and source code -form (if any), whether developed by The EU EGEE Project or third parties. - -THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED -WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL PROJECT OR ITS CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR -BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE -OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN -IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -This software consists of voluntary contributions made by many -individuals on behalf of the EU EGEE Prject. For more information on The -EU EGEE Project, please see http://cern.ch/eu-egee/. For more information on -EGEE Middleware, please see http://egee-jra1.web.cern.ch/egee-jra1/ - - diff --git a/org.glite.jp.ws-interface/Makefile b/org.glite.jp.ws-interface/Makefile deleted file mode 100644 index 5bd2476..0000000 --- a/org.glite.jp.ws-interface/Makefile +++ /dev/null @@ -1,77 +0,0 @@ -# Default values -top_srcdir=. -builddir=build -top_builddir=${top_srcdir}/${builddir} -stagedir=. -distdir=. -globalprefix=glite -jpprefix=jp -package=glite-jp-ws-interface -version=0.0.0 -PREFIX=/opt/glite - --include Makefile.inc - -VPATH=${top_srcdir}/interface:${top_srcdir}/src -STAGETO=interface - -XSLTPROC=xsltproc --nonet -XMLLINT:=xmllint --nonet -TIDY:=tidy -i -q --show-warnings no --tidy-mark no --wrap 0 -docbookxls:=http://docbook.sourceforge.net/release/xsl/current/html/docbook.xsl - -WSDL=JobProvenancePS.wsdl JobProvenanceIS.wsdl JobProvenanceTypes.wsdl -WSDL_S=jpdev.wsdl -XSD=JobProvenanceTypes.xsd - -all compile: ${WSDL} ${XSD} JobProvenance.html ${WSDL_S} - -check: - @echo No unit test required for interface-only module. - -stage: ${WSDL} - $(MAKE) install PREFIX=${stagedir} DOSTAGE=yes - -dist: distsrc distbin - -distsrc: - mkdir -p ${top_srcdir}/${package}-${version} - cd ${top_srcdir} && GLOBIGNORE="${package}-${version}" && cp -Rf * ${package}-${version} - cd ${top_srcdir} && tar -czf ${distdir}/${package}-${version}_src.tar.gz --exclude-from=project/tar_exclude ${package}-${version} - rm -rf ${top_srcdir}/${package}-${version} - -distbin: - $(MAKE) install PREFIX=${top_srcdir}/tmpbuilddir - cd ${top_srcdir}/tmpbuilddir && tar -czf ${top_srcdir}/${distdir}/${package}-${version}_bin.tar.gz * - rm -rf ${top_srcdir}/tmpbuilddir - -install: - -mkdir -p ${PREFIX}/${STAGETO} - -mkdir -p ${PREFIX}/share/doc/${package}-${version} - -mkdir -p ${PREFIX}/include/${globalprefix}/${jpprefix} - install -m 644 ${top_srcdir}/LICENSE ${PREFIX}/share/doc/${package}-${version} - -install -m 644 JobProvenance.html ${PREFIX}/share/doc/${package}-${version} -# cd ${top_srcdir}/interface && install -m 644 ${WSDL} ${PREFIX}/${STAGETO} - install -m 644 ${WSDL} ${WSDL_S} ${XSD} ${PREFIX}/${STAGETO} - install -m 644 ${top_srcdir}/src/ws_fault.c ${PREFIX}/include/${globalprefix}/${jpprefix} - -clean: - rm -f *.h - -%.wsdl: %.xml puke-wsdl.xsl - ${XSLTPROC} ../src/puke-wsdl.xsl $< >$@ - -${TIDY} -xml -m $@ - -%.xsd: %.xml puke-schema.xsl - ${XSLTPROC} ../src/puke-schema.xsl $< >$@ - -${TIDY} -xml -m $@ - -JobProvenance.html: doc.xml JobProvenancePS.xml JobProvenanceIS.xml JobProvenanceTypes.xml puke-ug.xsl - -${XSLTPROC} --novalid ../src/puke-ug.xsl $< >doc-html.xml && \ - ${XSLTPROC} --stringparam chapter.autolabel 0 ${docbookxls} doc-html.xml >$@ - -${TIDY} -xml -m doc-html.xml - -${XMLLINT} --valid --noout doc-html.xml - -${TIDY} -asxhtml -m $@ - -jpdev.xml: jpdev.xml.sh - ${top_srcdir}/src/jpdev.sh $< > $@ diff --git a/org.glite.jp.ws-interface/build.xml b/org.glite.jp.ws-interface/build.xml deleted file mode 100644 index ae5d49b..0000000 --- a/org.glite.jp.ws-interface/build.xml +++ /dev/null @@ -1,120 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/org.glite.jp.ws-interface/project/build.number b/org.glite.jp.ws-interface/project/build.number deleted file mode 100644 index af547f8..0000000 --- a/org.glite.jp.ws-interface/project/build.number +++ /dev/null @@ -1,2 +0,0 @@ -#Sat Oct 15 06:46:41 CEST 2005 -module.build=36 diff --git a/org.glite.jp.ws-interface/project/build.properties b/org.glite.jp.ws-interface/project/build.properties deleted file mode 100755 index e69de29..0000000 diff --git a/org.glite.jp.ws-interface/project/configure.properties.xml b/org.glite.jp.ws-interface/project/configure.properties.xml deleted file mode 100644 index 4b08208..0000000 --- a/org.glite.jp.ws-interface/project/configure.properties.xml +++ /dev/null @@ -1,54 +0,0 @@ - - - - - - - - - -top_srcdir=.. -builddir=build -stagedir=${stage.abs.dir} -distdir=${dist.dir} -globalprefix=${global.prefix} -jpprefix=${subsystem.prefix} -package=${module.package.name} -PREFIX=${install.dir} -version=${module.version} -glite_location=${with.glite.location} - - - diff --git a/org.glite.jp.ws-interface/project/properties.xml b/org.glite.jp.ws-interface/project/properties.xml deleted file mode 100644 index 4ec8018..0000000 --- a/org.glite.jp.ws-interface/project/properties.xml +++ /dev/null @@ -1,73 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/org.glite.jp.ws-interface/project/tar_exclude b/org.glite.jp.ws-interface/project/tar_exclude deleted file mode 100644 index e69de29..0000000 diff --git a/org.glite.jp.ws-interface/project/version.properties b/org.glite.jp.ws-interface/project/version.properties deleted file mode 100755 index 1441742..0000000 --- a/org.glite.jp.ws-interface/project/version.properties +++ /dev/null @@ -1,2 +0,0 @@ -module.version=1.3.0 -module.age=1 diff --git a/org.glite.jp.ws-interface/src/JobProvenanceIS.xml b/org.glite.jp.ws-interface/src/JobProvenanceIS.xml deleted file mode 100644 index 0a62af8..0000000 --- a/org.glite.jp.ws-interface/src/JobProvenanceIS.xml +++ /dev/null @@ -1,104 +0,0 @@ - - - CVS revision: - - - - - - The Job Provenance (JP) Index Server is a volatile counterpart to the - permanent JP Primary Storage. Index servers are populated with subsets - of data from Primary storage(s) and indexed according to particular user needs. - - - - The interface to Index server contains three logical parts: administraive - (control), system and user. The administrative part is used by run-time index - server configuration tool, the system one allows Primary storage(s) to feed - data into the Index server, and the user one is available to users for queries. - - - - - - - - - - Called by JP primary storage as a response to FeedIndex request. - Updates information on jobs in index server, according to what JPPS - currently knows. - Id of the feed, as returned by JPPS FeedIndex operation. - Flag of completed batch feed. - Attributes per job. - - Any error. - - - - - User query to index server. - - Query conditions, similar to LB. - - - Set of attributes to be retrieved directly from index server (if any). - - - List of jobs matching the query. - - Any error. - - - - - Called by JP index serve admin tool to ask new primary storage server to feed it. - Updates information on PS in index server, according to what JPPS - currently knows. - - New feed IS URL, filter and query type. - - Any error. - - - Called by JP index serve admin tool to find out IS open feeds - - List of active feeds on IS. - - Any error. - - - Called by JP index serve admin tool to remove one feed session. - - ID of feed to be removed. - - Any error. - - - - - Internal operation used for parsing XML config file. - Not called at all, only forcing gSoap to generate XML parsers. - - List of attributes which will JPPS send to JPIS. - - - List of indexed attributes which will JPPS send to JPIS. - - - List of type plugins. - - - List of requested feeds. - - Any error. - - - - diff --git a/org.glite.jp.ws-interface/src/JobProvenancePS.xml b/org.glite.jp.ws-interface/src/JobProvenancePS.xml deleted file mode 100644 index 8a59640..0000000 --- a/org.glite.jp.ws-interface/src/JobProvenancePS.xml +++ /dev/null @@ -1,105 +0,0 @@ - - - CVS revision: - - - - - - The Job Provenance (JP) Primary Storage Service is responsible to keep the JP data - (definition of submitted jobs, execution conditions and environment, and important - points of the job life cycle) in a compact and economic form. - - - - The JP Primary storage, as described in section 8.4 of the - Architecture deliverable DJRA1.1 - provides public interfaces for data storing, retrieval based on basic metadata, - and registration of Index servers for incremental feed. - - - - Command interface to JP is completely covered by the WS interface covered here. - Bulk file transfers are done via specialised protocols, currently gsiftp only. - - - - - - - - Register job with the JP primary storage. - Jobid of the registered job. - Owner of the job (DN of X509 certificate). - Any error. - - - - Start uploading a file. - Jobid to which this file is related. - - Type of the file (URI). The server must have a plugin handing this type. - - Name of the file (used to distinguish among more files of the same type). - The client promisses to finish the upload before this time. - MIME type of the file. - URL where the client should upload the file. - Server's view on when the upload must be finished. - Any error. - - - - Confirm a successfully finished file apload. - Destination URL returned by StartUpload before. - Any error. - - - - Record an additional user tag. - Job to which the tag is added. - Name and value of the tag. - Any error. - - - - Request for feeding a JP Index server (issued by this server). - Endpoint of the listening index server. - Which attributes of jobs is the index server interested in. - Which jobs is the server interested in. - Data on jobs stored at PS in the past are required. - Data on jobs that will arrive in future are required. - Unique ID of the created feed session. - When the session expires. - Any error. - - - - Refresh an existing feed session. - Existing feed session ID to be refreshed. - New session expiration time. - Any error. - - - - Return URL's of files for a given single job. - The job. - List of the stored files. - Any error. - - - - Query concrete attributes of a given job. - The job. - Which attributes should be retrieved. - Values of the queried attributes. - Any error. - - - - diff --git a/org.glite.jp.ws-interface/src/JobProvenanceTypes.xml b/org.glite.jp.ws-interface/src/JobProvenanceTypes.xml deleted file mode 100644 index 9f4b364..0000000 --- a/org.glite.jp.ws-interface/src/JobProvenanceTypes.xml +++ /dev/null @@ -1,125 +0,0 @@ - - - - - CVS revision: - - - - - Operators used in queries. Most are self-explanatory. - - - - - The attribute is between two specified values. - The attribute exists (even having a NULL value). - - - - A single user-recorded value for a job attribute. - Name of the attribute, including namespace. - Value. - - - - - - - - - - - - A single condition on job. - Attribute name to query. - Operation. - Where the attribute value came from. - Value to compare the job attribute with. - Another value (for op = WITHIN). - - - - One session between IS and PS (aka feed) charactetristics. - URL of primary server. - Filter conditions. - Query type. - Query type - Unique ID of the feed session. - - - - JP primary storage file identification. - Type of the file (as set on StartUpload). - Name of the file (if there are more of the same type per job). - Where the file is stored on JP primary storage. - - - - Single value of an attribute. - Name of the attribute, including namespace. - String value. - When this value was recorded. - Where this value came from. - - - - - String value. - Binary value. - - - - Specification of attribute origin. - JP system value, e.g. job owner. - Explicitely stored by the user via RecordTag operation. - Coming from uploaded file. - - - - Information on a single job. - Used for both feeding JP index server from primary storage - and to answer user queries on index server. - ID of the job. - Job owner. - - Attribute values, required by query/feed and available right now. - - - User query only: which primary storage(s) have data on this job. - - - UpdateJobs only: this job no longer belongs to the feed. - Attribute values are those which caused the change. - - - - - Single query condition on a job. - Similarly to LB, these outer conditions are logically ANDed. - - Which attribute the condition refers to. - - - Specific attribute origin (if we do care). - - - List of conditions on attribute attr. - These conditions are logically ORed. - - - - - Single condition on an attribute. - Query operation. - Value to compare attribute with. - Value to compare attribute with. - - - - - - - diff --git a/org.glite.jp.ws-interface/src/doc.xml b/org.glite.jp.ws-interface/src/doc.xml deleted file mode 100644 index 78cb6a5..0000000 --- a/org.glite.jp.ws-interface/src/doc.xml +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/org.glite.jp.ws-interface/src/jpdev.sh b/org.glite.jp.ws-interface/src/jpdev.sh deleted file mode 100755 index a1b9602..0000000 --- a/org.glite.jp.ws-interface/src/jpdev.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/sh - -xmlcut() { - echo -e "\t" - echo - grep "<$2>" $(dirname $0)/JobProvenance$1.xml -A 1000 | grep "" -B 1000 | grep -v "<$2>\|" -} - -xmlmerge() { - xmlcut PS $1 - echo - xmlcut IS $1 -} - -DOC="$(xmlmerge doc)" -OPERATIONS="$(xmlmerge operations)" - -XML_TMPL=$(sed $(dirname $0)/$1 -e 's/"/\\"/g') -eval "XML_RESULT=\"${XML_TMPL}\"" -echo "$XML_RESULT" diff --git a/org.glite.jp.ws-interface/src/jpdev.xml.sh b/org.glite.jp.ws-interface/src/jpdev.xml.sh deleted file mode 100644 index 1925109..0000000 --- a/org.glite.jp.ws-interface/src/jpdev.xml.sh +++ /dev/null @@ -1,22 +0,0 @@ - - - CVS revision: - - - - -${DOC} - - - - - -${OPERATIONS} - - diff --git a/org.glite.jp.ws-interface/src/puke-schema.xsl b/org.glite.jp.ws-interface/src/puke-schema.xsl deleted file mode 100644 index fdbe9fb..0000000 --- a/org.glite.jp.ws-interface/src/puke-schema.xsl +++ /dev/null @@ -1,161 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - true - false - - - - - - - - - - : - - - - - - 0 - 1 - - - - - unbounded - 1 - - - - - - - - - - - - - - - : - - - - - unbounded - 1 - - - - - - - - - - - - - - - : - - - - - unbounded - 1 - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/org.glite.jp.ws-interface/src/puke-ug.xsl b/org.glite.jp.ws-interface/src/puke-ug.xsl deleted file mode 100644 index d3dbdd4..0000000 --- a/org.glite.jp.ws-interface/src/puke-ug.xsl +++ /dev/null @@ -1,170 +0,0 @@ - - - - - - - - - - - Job Provenance - - - Primary Storage -- Overview - - - - - Primary Storage -- Operations - - - - - - - - - Index Server -- Overview - - - - - Index Server -- Operations - - - - - - - - - JP Common Types - - - - - - - - - - - - - list of - - - - - - - - - - - - - - - - - - - <xsl:value-of select="@name"/> - - - Inputs: - - - - - - - N/A - - - - Outputs: - - - - - - - N/A - - - - - - - - - - <xsl:value-of select="@name"/> - - - - Structure (sequence complex type in WSDL) - Fields: ( type name description ) - - - Union (choice complex type in WSDL) - Fields: ( type name description ) - - - Enumeration (restriction of xsd:string in WSDL), - exactly one of the values must be specified. - - Values: - - - Flags (sequence of restricted xsd:string in WSDL), - any number of values can be specified together. - - Values: - - - - - - - - - list of - - - - - - - - - - - - - - - - - - - - (optional) - - - - - - - - - - - - - diff --git a/org.glite.jp.ws-interface/src/puke-wsdl.xsl b/org.glite.jp.ws-interface/src/puke-wsdl.xsl deleted file mode 100644 index ea7598e..0000000 --- a/org.glite.jp.ws-interface/src/puke-wsdl.xsl +++ /dev/null @@ -1,292 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - true - false - - - - - - - - - - : - - - - - - 0 - 1 - - - - - unbounded - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - : - - - - - unbounded - 1 - - - - - - - - - - - - - - - : - - - - - unbounded - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/org.glite.jp.ws-interface/src/ws_fault.c b/org.glite.jp.ws-interface/src/ws_fault.c deleted file mode 100644 index 1d62782..0000000 --- a/org.glite.jp.ws-interface/src/ws_fault.c +++ /dev/null @@ -1,143 +0,0 @@ -#ident "$Header: " - -#include -#include -#include -#include - -#ifndef UNUSED - #ifdef __GNUC__ - #define UNUSED __attribute__((unused)) - #else - #define UNUSED - #endif -#endif - -#define GSOAP_STRING(CHOICE) GLITE_SECURITY_GSOAP_CHOICE_GET(CHOICE, string, stringOrBlob, 1) -#define GSOAP_BLOB(CHOICE) GLITE_SECURITY_GSOAP_CHOICE_GET(CHOICE, blob, stringOrBlob, 1) -#define GSOAP_SETSTRING(CHOICE, VALUE) GLITE_SECURITY_GSOAP_CHOICE_SET(CHOICE, string, jptype, stringOrBlob, 1, VALUE) -#define GSOAP_SETBLOB(CHOICE, VALUE) GLITE_SECURITY_GSOAP_CHOICE_SET(CHOICE, blob, jptype, stringOrBlob, 1, VALUE) -#define GSOAP_ISSTRING(CHOICE) GLITE_SECURITY_GSOAP_CHOICE_ISTYPE(CHOICE, string, jptype, stringOrBlob, 1) -#define GSOAP_ISBLOB(CHOICE) GLITE_SECURITY_GSOAP_CHOICE_ISTYPE(CHOICE, blob, jptype, stringOrBlob, 1) - -#if GSOAP_VERSION >= 20709 - #define GFNUM SOAP_TYPE_jptype__genericFault -#else - #define GFNUM SOAP_TYPE__genericFault -#endif - -#ifndef dprintf -#define dprintf(FMT, ARGS...) printf(FMT, ##ARGS) -#endif - - -static int glite_jp_clientCheckFault(struct soap *soap, int err, const char *name, int toSyslog) UNUSED; -static struct jptype__genericFault* jp2s_error(struct soap *soap, const glite_jp_error_t *err) UNUSED; -static void glite_jp_server_err2fault(const glite_jp_context_t ctx,struct soap *soap) UNUSED; - - -static int glite_jp_clientCheckFault(struct soap *soap, int err, const char *name, int toSyslog) -{ - struct SOAP_ENV__Detail *detail; - struct jptype__genericFault *f; - char *reason,indent[200] = " "; - char *prefix; - int retval; - - if (name) asprintf(&prefix, "[%s] ", name); - else prefix = strdup(""); - retval = 0; - - switch(err) { - case SOAP_OK: - dprintf("%sOK\n", prefix); - break; - - case SOAP_FAULT: - case SOAP_SVR_FAULT: - retval = -1; - detail = GLITE_SECURITY_GSOAP_DETAIL(soap); - reason = GLITE_SECURITY_GSOAP_REASON(soap); - dprintf("%s%s\n", prefix, reason); - if (toSyslog) syslog(LOG_ERR, "%s", reason); - - if (!detail) break; - if (detail->__type != GFNUM && detail->__any) { - // compatibility with clients gSoaps < 2.7.9b - dprintf("%s%s%s\n", prefix, indent, detail->__any); - if (toSyslog) syslog(LOG_ERR, "%s", detail->__any); - - f = NULL; - } else { - // client is based on gSoap 2.7.9b - assert(detail->__type == GFNUM); -#if GSOAP_VERSION >= 20709 - f = (struct jptype__genericFault *)detail->fault; -#elif GSOAP_VERSION >= 20700 - f = ((struct _genericFault *)detail->fault)->jpelem__genericFault; -#else - f = ((struct _genericFault *)detail->value)->jpelem__genericFault; -#endif - } - - while (f) { - dprintf("%s%s%s: %s (%s)\n", - prefix, indent, - f->source, f->text, f->description); - if (toSyslog) syslog(LOG_ERR, "%s%s: %s (%s)", - reason, f->source, f->text, f->description); - f = f->reason; - strcat(indent," "); - } - break; - - default: - soap_print_fault(soap,stderr); - retval = -1; - } - - free(prefix); - return retval; -} - - -static struct jptype__genericFault* jp2s_error(struct soap *soap, const glite_jp_error_t *err) -{ - struct jptype__genericFault *ret = NULL; - if (err) { - ret = soap_malloc(soap,sizeof *ret); - memset(ret,0,sizeof *ret); - ret->code = err->code; - ret->source = soap_strdup(soap,err->source); - ret->text = soap_strdup(soap,strerror(err->code)); - ret->description = err->desc ? soap_strdup(soap,err->desc) : NULL; - ret->reason = jp2s_error(soap,err->reason); - } - return ret; -} - - -static void glite_jp_server_err2fault(const glite_jp_context_t ctx,struct soap *soap) -{ - struct SOAP_ENV__Detail *detail; - struct jptype__genericFault *item; -#if GSOAP_VERSION >= 20709 - struct jptype__genericFault *f; - item = f = jp2s_error(soap,ctx->error); -#else - struct _genericFault *f = soap_malloc(soap, sizeof *f); - item = f->jpelem__genericFault = jp2s_error(soap,ctx->error); -#endif - soap_receiver_fault(soap,"Oh, shit!",NULL); - // no error in JP context? - if (!item) return; - - detail = soap_faultdetail(soap); -#if GSOAP_VERSION >= 20700 - detail->fault = (void *)f; -#else - detail->value = (void *)f; -#endif - detail->__type = GFNUM; - detail->__any = NULL; -} diff --git a/org.glite.jp/.cvsignore b/org.glite.jp/.cvsignore deleted file mode 100644 index 3a4edf6..0000000 --- a/org.glite.jp/.cvsignore +++ /dev/null @@ -1 +0,0 @@ -.project diff --git a/org.glite.jp/build.xml b/org.glite.jp/build.xml deleted file mode 100644 index 7ffb4c0..0000000 --- a/org.glite.jp/build.xml +++ /dev/null @@ -1,410 +0,0 @@ - - - - - - - Ant build file to build the GLite Job Provenance Subsystem - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Preparing directories ... - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <project name="${subsystem.name}" type="post-subsystem" packageName="${global.prefix}-${subsystem.prefix}"/> - - - - diff --git a/org.glite.jp/doc/EGEElogoNEW.jpg b/org.glite.jp/doc/EGEElogoNEW.jpg deleted file mode 100644 index dcb20ac3b650d40acd1ecc826bab258849ee30a4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 15787 zcma*OV~{4n(kT2qV`Im*ZQHhO+p}Za+OchW$JUO$W80p)=e%FMH@<(jIy$1Fva>R? zDl@w?EBkx(dk26dEiNSv0D=GjrvEO$_XPl1)Xl`k3jhRw0sb=x_`U*=3z<3?n*mJw z{*3@Z0cc>L5HRon01O@gK(qw_&{qNgd==jtfDi!i|Gk0y-v;`>?f*ju0RsO)|K0x! z_$9dh)_@=n23c)&>)qJn30@>odXjKSkQNsje|&8lSE8h7E+oQ$=Fg$ zme@Uh{M&=rvNYM+ zgzTCtU%girR)lU8chL)VdD6#7Y6Hw^1zt>Nn+w8C_p1C4#7?2?p;FdSiRtT(@QZ^r zi&1B!SFj7!^h&iiem@=J>txJ#wJrmlvNg*IPOq~b!nrsZs6dq0^^nZ&U<{&qo75`q zrmARLU~WjCS}bVmr{>{S2q@2T;|eF=j>)UFF}XQBP^>Bs7<@5%Z7p|_$O})NTjJv&q~TXe2-AhM@ivS}j@-eGUAp-DK42d_#x-R!B4aD{d3n4F<7wMPkBC$J)O z@H1v{KujxPMqaO{gl3Ius;ZYIf%n+SR&xE!5U_6bYeCm{+J-hut>o%a)Scs~KePOLw%Jidr|r7>dv#CH{o?vbYM9j;a3P@Kq- zZq8)FsNf@u+2LK*H2E9nM4|cEQi-p0l&t%2Gok*gxgd5ei8_YYTX9!^;wG=S{hR(z5z7rc98~6wmbF5=1-scfqm|f2jHu&*JJ2KW|0z1TkjwFjqLBQ;HvnI zSK8AT*&j*0e0~i@OEx(wE2h_Rb+jnGE015BYrI!a%QaLj4gTyaoUJR;f4SXbeB*mI zJ;(!vEH-u0HL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r_p@a_PH_$*>v%H`N**}5b6b?K>!f|qChCQAg} zqUtYKKNk8fZti?+&}l{}PLnsk?x;m= z>!7G}1hdwuUToE^Yd04)>VrQ3yx+Afhx%eFo+mKpX>4TNLMtm{= zWn-+v!cvV?cRJg|Ko!6>uJS>jV8GqaKw{JZX%Mq2LNV*qboLh{kY-Z+@RDVc%VOAu z6(5p>--7}rzoV-uiL2=PR5zWT=ctGTRfKyulf{a55Co5A>@g>#fED#C)`{e$BB!HO@ zJaQ)DMAS8+rh;igqb~X?D+4GzGX_m0fFlrie{+tN!ipB%8Mla`ClyiwZplqkK;HF- zdomXP6BeHPaE-vT{IpG9_1c%i=RS^VNDHk13X!}rH5e83cx5)G5Rg=zpon4u04(!J zvSmc@W`ZMt3W1{Ar($2Nra5<|S23kZDaotT)T$;w1}CbW0ug-X83e-k?^M=>>PmlH zgLoIixI}?8pIy$nMeI;F6W&9ldzlal>jko3G`vg`Krw0F$90XC$9rA8Na~w#I=UYS z9qx1wPVVi4=isE#`K>QbTjQZxBa;uyi!9#=0u);YbP9Ily!zMi8dDTgS-A~PMP>p3 zlu$%!ZloB1zYueTwZqNO-+-;fI4vB=OyWNTSa7u7%`iw>eGHI0_AVslFfDb&;93-NK2ztjLcxxzO_1mcyj1*D>$ z+mEpcQIw{MNZ{K&xVuuAc17B1MIkG!2VkO+qDJb}$k_V*6AvZsV?>Rq>)qI|{J!BJ tJWFna+fC}20U>J)pg-3}vm-uu8&L705P78HbHD{ttMwbU*+A diff --git a/org.glite.jp/doc/copyright.tex b/org.glite.jp/doc/copyright.tex deleted file mode 100644 index d25979d..0000000 --- a/org.glite.jp/doc/copyright.tex +++ /dev/null @@ -1,24 +0,0 @@ -% -% Official text received on October 6, 2004 -% -\vfill{\bf Copyright }\copyright{\bf Members of the EGEE Collaboration. 2004. -See http://eu-egee.org/partners for details on the copyright holders. - -EGEE (``Enabling Grids for E-science in Europe'') is a project funded by -the European Union. For more information on the project, its partners -and contributors please see http://www.eu-egee.org. - -You are permitted to copy and distribute verbatim copies of this -document containing this copyright notice, but modifying this document -is not allowed. You are permitted to copy this document in whole or in -part into other documents if you attach the following reference to the -copied elements: ``Copyright }\copyright{\bf 2004. Members of the EGEE -Collaboration. http://www.eu-egee.org'' - -The information contained in this document represents the views of -EGEE as of the date they are published. EGEE does not guarantee that -any information contained herein is error-free, or up to date. - -EGEE MAKES NO WARRANTIES, EXPRESS, IMPLIED, OR STATUTORY, BY -PUBLISHING THIS DOCUMENT.} - diff --git a/org.glite.jp/doc/egee.cls b/org.glite.jp/doc/egee.cls deleted file mode 100644 index 4de47ce..0000000 --- a/org.glite.jp/doc/egee.cls +++ /dev/null @@ -1,522 +0,0 @@ -% egee.cls: -% -% $Id$ -% -% $Log$ -% Revision 1.1 2005/02/16 14:53:11 erwin -% template added -% -% Revision 1.6 2004/10/05 09:10:38 erwin -% changed title for delivery; remove subtitle from page header. -% -% Revision 1.5 2004/08/20 13:17:59 szamsu -% Loading the EGEE logo only once and reusing it later. -% -% Revision 1.4 2004/08/20 10:18:47 szamsu -% fixing overfull problem in page headers -% -% Revision 1.3 2004/08/03 14:32:00 hemmer -% Change IST logo to the new Information Society Infrastructures logo and ISTNumber -% -% Revision 1.2 2004/08/03 11:40:13 szamsu -% Removed 'compat2' option on geometry, because it has also specified -% 'scale{0.8,0.9}' for page size, which we define otherwise. Added the -% 'centering' and 'includeheadfoot' options, which were defined in -% 'compat2'. -% -% Revision 1.1 2004/07/13 09:44:13 erwin -% template for design document -% -% Revision 1.2 2004/06/25 10:41:40 erwin -% restructuring according to JRA2 template (intro & exec summary) -% modification of stylefile to remove trailing "." at section number -% changes in intro according to discussion (new figure, service table, ...) -% -% Revision 1.1 2004/06/24 14:26:44 erwin -% use EGEE style -% adjustment of top level structure (individual sections need to be adjusted accordingly) -% -% Revision 1.8 2004/06/03 09:56:11 diana -% updated the front page -% -% Revision 1.7 2004/05/26 09:38:55 leanne -% Removed DocumentLink in pdfinfo - it was causing errors -% -% Revision 1.6 2004/05/26 08:36:58 leanne -% Updated IST number in template -% -% Revision 1.5 2004/05/24 13:25:04 diana -% added template for egee latex documents -% -% Revision 1.4 2004/05/17 10:56:51 diana -% added compat2 option to geometry and hypertex option to hyperref to get logo and links back on the page -% -% Revision 1.3 2004/02/18 18:08:48 leanne -% Modified Document identifiers to mauch the EGEE Word templates -% -% Revision 1.2 2004/02/18 17:23:21 leanne -% Changed Work Package to Activity. Included definition of Document Link. -% -% Revision 1.1.1.1 2004/02/18 11:17:44 leanne -% Initial version of EGGE LaTeX Style files based on the EDG LaTeX Style -% -% -% Revision 1.0 2004/02/17 leanne -% Took the datagrid.cls file and modified it for the EGEE project -% Original Authors: -% Frohner Akos -% Diana Bosio -% Paul Millar -% Thanks are due to Norman Gray -% -\NeedsTeXFormat{LaTeX2e} -\ProvidesClass{egee}[2002/06/20 EGEE LaTeX Class] -\typeout{EGEE LaTeX class -- 2002/06/13 Rock Lobster!} -% -%% Notes: This class file tries, as largely as possible, to copy the Microsoft -%% Word template document EDMS 2098656 v2.2. Differences and notes are listed -%% below: -%% o The Word Template uses 11pt for the main body, but 12 point -%% occasionally. Any such occurrence of 12pt is mapped into 11pt in this -%% class-file. -%% o This class inherits 11pt article. In that class Huge=30pt and -%% LARGE=22pt, which matches the required point-size for the title page. -%% o The parskip in the Word doc is exactly 1.4mm (0.7mm above and below). -%% Here we've taken the liberty of adding some glue to make things fit -%% better. -%% o The Word Template shows all the (sub)sections on the contents page in -%% capitals and subsubsections in italics. The LateX class doesn't. - -%% Interface - example of an option, should we want to use these later. -%\newif\ifmonotitle\monotitlefalse - -%\DeclareOption{mono}{\monotitletrue} - -\DeclareOption*{\PassOptionsToClass{\CurrentOption}{article}} -\ProcessOptions - - -% Inherit! -\LoadClass[11pt]{article} - -% Necessary packages: -\RequirePackage{lastpage} -\RequirePackage{tabularx} -\RequirePackage{pslatex} -\RequirePackage{times} -\RequirePackage{verbatim} -\RequirePackage{geometry} -\RequirePackage{url} - -\usepackage[hang,bf,small]{caption} - -% -% We now define a new \if command to test for PDF being enabled. -% It is important because loading graphicx overrides the definition -% of \pdfoutput and sets it to true even when PDF is not enabled. -% Use \ifpdf instead of \ifx\pdfoutput\undefined hereafter. -% - -\newif\ifpdf -\ifx\pdfoutput\undefined - \pdffalse - % \typeout{PDF _not_ defined} -\else - \pdfoutput=1 - \pdftrue - % \typeout{PDF _is_ defined} -\fi - -\ifpdf - \usepackage[pdftex, - pdfpagemode={UseOutlines},bookmarks=true,bookmarksopen=true, - bookmarksopenlevel=0,bookmarksnumbered=true, - hypertexnames=false,colorlinks,linkcolor={blue}, - citecolor={blue},urlcolor={red}, - pdfstartview={FitV}]{hyperref} -\else - \usepackage[hypertex]{hyperref} -\fi - -\ifpdf - \usepackage[pdftex]{graphicx} - \pdfcompresslevel 9 - \pdfadjustspacing 1 -\else - \usepackage[dvips]{graphicx} -\fi - -\usepackage{color} - -\def\footsize{5mm} - -%% -%% PAGE GEOMETRY DEFINITIONS -%% -% From Template file -\geometry{centering,includeheadfoot} -\geometry{a4paper,top=12.5mm,headheight=12.5mm,headsep=5mm,foot=\footsize,footskip=13.3mm,bottom=12.5mm} -\geometry{right=25mm,left=25mm} - - - -% APM -- I don't think these are right, my impression is above is correct -%\geometry{a4paper,margin=0.98in,headheight=0.72in} - - -%% -%% PAGE COLOUR DEFINITIONS -%% -\definecolor{blue}{rgb}{0.1,0.1,0.5} -\definecolor{lightgrey}{gray}{0.65} - - -% paulm's prefered name ... -\def\bibname{References} - -\setlength{\parindent}{0pt} -\setlength{\parskip}{1.4mm plus 0.4mm minus 0.2mm} - -\def\@defaultfooter{ - \def\@oddfoot{\vbox to \footsize {% - {\color{blue}\hrule width \textwidth height 1pt depth 0pt}% - \vfil - \small\hbox to \textwidth{\ISTNumber% - \hfil - \hbox{\colorbox{yellow}{\MakeUppercase{\@Dissemination}}}% - \hfil - \hbox{\thepage/\pageref{LastPage}}}% - }% - }% -} - - -\def\ps@title{% - \@defaultfooter - \def\@oddhead{\hbox to \textwidth{\LargeEGEELogo\hfil\ISTLogo}} -} - -\def\ps@headings{% - \@defaultfooter - \def\@oddhead{\vbox to \headheight{% -%\hrule width \textwidth height 1pt\relax - \vbox to 0.75\headheight{% - \hbox to \textwidth{% - \hbox to 0pt{\EGEELogo\hss}% - \hfil - \hbox to 8cm{% - \vbox to 0.75\headheight{% - \vfil - \parbox{8cm}{% - \centering\color{blue}% - \textbf{\MakeUppercase{\@title}}% -%\ifx\@Subtitle\@empty\else -% \par\textbf{\scriptsize\@Subtitle}% -%\fi - }% - \vfil - }% - \hss}% - \hfil -%\hbox to 0pt{\vrule width 1pt height 10pt depth 0pt \hss}% -%% {\scriptsize\setlength{\parskip}{0pt}\setlength{\topsep}{0pt}% -%% % \vbox to 0.75\headheight{% -%% \parbox{4cm}{x% -%% \begin{flushright}% -%% \textit{Doc. Identifier}:\\ -%% \textbf{\@DocIdentifier}\\ -%% \vfil -%% \textit{Date}: \textbf{\@Date} -%% \end{flushright}% -%% }% -%% % }% -%% }% -\hbox to 0pt{\hss\vbox to 0.75\headheight{%\hrule -\tiny%\scriptsize -\parfillskip0pt -\leftskip 0pt plus 1fil -\parskip0ex -\textit{Doc.\ Identifier}: -\par -\textbf{\@DocIdentifier} -\vfil -\textit{Date}: \textbf{\@Date} -%\hrule -}}% -% \hbox to 4cm{\scriptsize -% \vbox to 0.75\headheight{% -% \parbox{4cm}{ -% \halign{\hfill####\cr -% \textit{Doc. Identifier}:\cr -% \textbf{\@DocIdentifier}\cr -% % \noalign{\vfil} -% \textit{Date}: \textbf{\@Date}\cr -% }}% -% \vfil -% }% -% }% - }% - }% -%\hrule width \textwidth height 1pt\relax - \vfil\vskip 2.5mm\relax - {\color{blue}\hrule width \textwidth height 1pt depth 0pt}% - }% - }% -} - -\pagestyle{headings} - -\setlength{\captionmargin}{1cm} - -% image file extensions respective to the output format -\ifpdf - \DeclareGraphicsExtensions{.jpg,.pdf,.png} - \pdfcompresslevel=9 -% \pdfinfo{ /Title (\@DocumentLink) } - \pdfinfo{ /Title (EGEE) } -\else - \DeclareGraphicsExtensions{.eps} -\fi - -\def\frontboxwidth{10.6cm}% - - - -%% -%% Define our title page -%% -\AtBeginDocument{ -\pagestyle{title}% -\hbox{}% Force top of page -\vfill -{\centering - \Huge\bf\textsf{\textcolor{blue}{EGEE}}\\[20mm]% - \LARGE\sc\textsf{\bf \@title}\\[5mm]% - \ifx\@Subtitle\@empty\else - \normalsize\textsf{\@Subtitle}\\[10mm]% - \fi - \ifx\@DeliverableId\@empty\else - \LARGE\sc\textsf{\bf \@DeliverableId}\\[5mm]% - \fi -}% -\vfill -\hbox to \textwidth{ - \hfil - \vbox{ - {\color{blue}\hrule width \frontboxwidth height 1mm depth 0pt} - \hbox to \frontboxwidth{\sf - \begin{tabularx}{\frontboxwidth}{l>{\raggedright\arraybackslash}X} - Document identifier: & \textbf{\@DocIdentifier}\\[3mm] - Date: & \textbf{\@Date}\\[3mm] - Activity:& \textbf{\@Activity}\\[3mm] - Lead Partner: & \textbf{\@LeadPartner}\\[3mm] - Document status: & \textbf{\@DocStatus}\\[3mm] - Document link:& \textbf{\@DocumentLink}\\[3mm] - \end{tabularx} - } - {\color{blue}\hrule width \frontboxwidth height 1mm depth 0pt} - } -} -\vfill -{\sf\underline{Abstract}: \@Abstract} -\vfill -\newpage % end of the first page -\pagestyle{headings} -\setcounter{tocdepth}{3} -} % End of AtBeginningDocument - - -% -% EGEE style small-capital section titles. -% -% The numbering is aligned with the WinWord style, -% although it is not common in the english typography... -% -\newcommand{\sectionbreak}{\newpage} -%\renewcommand{\thesection}{\arabic{section}.} -%\renewcommand{\thesubsection}{\thesection\arabic{subsection}.} -%\renewcommand{\thesubsubsection}{\thesubsection\arabic{subsubsection}.} - -\renewcommand\section{\@startsection {section}{1}{\z@}% - {-3.5ex \@plus -1ex \@minus -.2ex}% - {2.3ex \@plus.2ex}% - {\normalfont\Large\bfseries\sffamily\scshape}} - -\renewcommand\subsection{\@startsection{subsection}{2}{\z@}% - {-3.25ex\@plus -1ex \@minus -.2ex}% - {1.5ex \@plus .2ex}% - {\normalfont\large\bfseries\sffamily\scshape}} -\renewcommand\subsubsection{\@startsection{subsubsection}{3}{\z@}% - {-3.25ex\@plus -1ex \@minus -.2ex}% - {1.5ex \@plus .2ex}% - {\normalfont\normalsize\bfseries\sffamily\scshape}} - - - -%% APM NEED TO REDEFINE section -%\titleformat{\section}{\Large\bfseries\sffamily\scshape}{\thesection}{1em}{} -%\titlecontents{section} [2em] {\vspace*{4pt}} -% {\large \sc \bfseries \contentslabel{2em}} -% {\large \sc \bfseries \hspace*{-2em}} -% {\large \textbf{\titlerule*[1ex]{.}\contentspage}} [\vspace*{4pt}] - -%\titleformat{\subsection}{\large\bfseries\sffamily\scshape}{\thesubsection}{1em}{} -%\titlecontents{subsection} [5em] {} -% {\sc \contentslabel{3em}} -% {\sc \hspace*{-3em}} -% {\titlerule*[1ex]{.}\contentspage} - - -% -% common constants -% -\def\ISTNumber{INFSO-RI-508833} -\newsavebox{\@EGEELogo} -\savebox{\@EGEELogo}{\includegraphics[height=0.75\headheight]{EGEElogoNEW}} -\def\EGEELogo{\usebox{\@EGEELogo}} -\def\LargeEGEELogo{\includegraphics[height=\headheight]{EGEElogoNEW}} -\def\ISTLogo{\includegraphics[height=\headheight]{isi}} - -% -% parameters to be supplied by the author -% -\def\Subtitle#1{\gdef\@Subtitle{#1}} -\gdef\@Subtitle{\@latex@warning@no@line{No \noexpand\Subtitle given}} - -\def\DeliverableId#1{\gdef\@DeliverableId{#1}} -\gdef\@DeliverableId{\@latex@warning@no@line{No \noexpand\DeliverableId given}} - -\def\DocIdentifier#1{\gdef\@DocIdentifier{#1}} -\gdef\@DocIdentifier{\@latex@warning@no@line{No \noexpand\DocIdentifier given % - (e.g. EGEE-JRA1-TEC-edmsId-v0-1)}} - -\def\Date#1{\gdef\@Date{#1}} -\gdef\@Date{\@latex@warning@no@line{No \noexpand\Date given % - (e.g. 01/01/2004)}} - -\def\Activity#1{\gdef\@Activity{#1}} -\gdef\@Activity{\@latex@warning@no@line{No \noexpand\Activity given % - (e.g. JRA1 Middleware Engineering and Integration )}} - -\def\LeadPartner#1{\gdef\@LeadPartner{#1}} -\gdef\@LeadPartner{\@latex@warning@no@line{No \noexpand\LeadPartner given % - (e.g. CERN, RAL )}} - -\def\DocStatus#1{\gdef\@DocStatus{#1}} -\gdef\@DocStatus{\@latex@warning@no@line{No \noexpand\DocStatus given % - (e.g. DRAFT, WORKING, DELIVERED)}} - -\def\Dissemination#1{\gdef\@Dissemination{#1}} -\gdef\@Dissemination{\@latex@warning@no@line{No \noexpand\Dissemination given % - (e.g. PUBLIC, INTERNAL, ...)}} - -\def\DocumentLink#1{\gdef\@DocumentLink{#1}} -\gdef\@DocumentLink{\@latex@warning@no@line{No \noexpand\DocumentLink given % - (e.g. http://cern.ch)}} - -\long\def\Abstract#1{\gdef\@Abstract{#1}} -\gdef\@Abstract{\@latex@warning@no@line{No \noexpand\Abstract given}} - -%% -%% Define the abstract using an environment abstract - -% -% This will produce the mailto link in the PDF file -% -% -% We use the URL package, which does this nicely. The old way (\HTTP) was -% a bit buggy as it had problems with '~'s and '_'s -% -\urlstyle{sf} -\ifpdf - \newcommand{\Email}[1]{\href{mailto:#1}{<{#1}>}} - \newcommand{\HTTP}[1]{\href{#1}{\url{#1}}} -\else - \newcommand{\Email}[1]{\textsf{<{#1}>}} - \newcommand{\HTTP}[1]{\url{#1}} -\fi - - -% -% We now redifine \part and \section so that the table of contents -% has the sections/parts in upper case. -% -% Note: need to use \uppercase because \MakeUppercase is not robust -% -\def\@part[#1]#2{% - \ifnum \c@secnumdepth >\m@ne - \refstepcounter{part}% - \addcontentsline{toc}{part}{\thepart\hspace{1em}\uppercase{#1}}% - \else - \addcontentsline{toc}{part}{\uppercase{#1}}% - \fi - {\parindent \z@ \raggedright - \interlinepenalty \@M - \normalfont - \ifnum \c@secnumdepth >\m@ne - \Large\bfseries \partname\nobreakspace\thepart - \par\nobreak - \fi - \huge \bfseries #2% - \markboth{}{}\par}% - \nobreak - \vskip 3ex - \@afterheading} - -\def\@sect#1#2#3#4#5#6[#7]#8{% - \ifnum #2>\c@secnumdepth - \let\@svsec\@empty - \else - \refstepcounter{#1}% - \protected@edef\@svsec{\@seccntformat{#1}\relax}% - \fi - \@tempskipa #5\relax - \ifdim \@tempskipa>\z@ - \begingroup - #6{% - \@hangfrom{\hskip #3\relax\@svsec}% - \interlinepenalty \@M #8\@@par}% - \endgroup - \csname #1mark\endcsname{\uppercase{#7}}% - \addcontentsline{toc}{#1}{% - \ifnum #2>\c@secnumdepth \else - \protect\numberline{\csname the#1\endcsname}% - \fi - \texorpdfstring{\uppercase{#7}}{#7}}% - \else - \def\@svsechd{% - #6{\hskip #3\relax - \@svsec #8}% - \csname #1mark\endcsname{\uppercase{#7}}% - \addcontentsline{toc}{#1}{% - \ifnum #2>\c@secnumdepth \else - \protect\numberline{\csname the#1\endcsname}% - \fi - \texorpdfstring{\uppercase{#7}}{#7}}}% - \fi - \@xsect{#5}} - -% \addcontentsline{toc} expands to \contentsline{NAME} -% which in turn expands to \l@NAME. So, to specify -% the table of contents, we must define \l@chapter, \l@section, -% \l@subsection, ... ; to specify the list of figures, we must define -% \l@figure; and so on. Most of these can be defined with the -% \@dottedtocline command, which produces a contents line with dots -% between the title and the page number. It works as follows: -% -% \@dottedtocline{LEVEL}{INDENT}{NUMWIDTH} -% LEVEL : An entry is produced only if LEVEL < or = value of -% 'tocdepth' counter. Note, \chapter is level 0, \section -% is level 1, etc. -% INDENT : The indentation from the outer left margin of the start of -% the contents line. -% NUMWIDTH : The width of a box in which the section number is to go, -% if TITLE includes a \numberline command. -% - -\def\l@part{\@dottedtocline{1}{4em}{2.0em}} -\def\l@subsection{\@dottedtocline{2}{1.5em}{2.3em}} -\def\l@subsubsection{\@dottedtocline{3}{3.8em}{3.2em}} -\def\l@paragraph{\@dottedtocline{4}{7.0em}{4.1em}} -\def\l@subparagraph{\@dottedtocline{5}{10em}{5em}} - diff --git a/org.glite.jp/doc/frontmatter.tex b/org.glite.jp/doc/frontmatter.tex deleted file mode 100644 index 802bd05..0000000 --- a/org.glite.jp/doc/frontmatter.tex +++ /dev/null @@ -1,40 +0,0 @@ -\begin{center} -{\bf Delivery Slip} -\end{center} -\begin{tabularx}{\textwidth}{|l|l|l|X|X|} -\hline - & {\bf Name} & {\bf Partner} & {\bf Date} & {\bf Signature} \\ -\hline -{\bf From} & Ale\v s K\v{r}enek et al.& CESNET & Feb 20, 2006 & \\ -\hline -{\bf Reviewed by} & & & & \\ - -\hline -{\bf Approved by} & & & & \\ -\hline -\end{tabularx} - -\begin{center} -{\bf Document Change Log} -\end{center} - -\begin{tabularx}{\textwidth}{|l|l|X|X|} -\hline -{\bf Issue } & {\bf Date } & {\bf Comment } & {\bf Author } \\ \hline -Initial version & Feb 20, 2006 & & A. K\v{r}enek et al.\\ \hline -\hline -\end{tabularx} - -\begin{center} -{\bf Document Change Record} -\end{center} - -\begin{tabularx}{\textwidth}{|l|l|X|} -\hline -{\bf Issue } & {\bf Item } & {\bf Reason for Change } \\ \hline - - -\hline -\end{tabularx} - -\input{copyright} diff --git a/org.glite.jp/doc/install-guide/EGEElogoNEW.jpg b/org.glite.jp/doc/install-guide/EGEElogoNEW.jpg deleted file mode 100644 index dcb20ac3b650d40acd1ecc826bab258849ee30a4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 15787 zcma*OV~{4n(kT2qV`Im*ZQHhO+p}Za+OchW$JUO$W80p)=e%FMH@<(jIy$1Fva>R? zDl@w?EBkx(dk26dEiNSv0D=GjrvEO$_XPl1)Xl`k3jhRw0sb=x_`U*=3z<3?n*mJw z{*3@Z0cc>L5HRon01O@gK(qw_&{qNgd==jtfDi!i|Gk0y-v;`>?f*ju0RsO)|K0x! z_$9dh)_@=n23c)&>)qJn30@>odXjKSkQNsje|&8lSE8h7E+oQ$=Fg$ zme@Uh{M&=rvNYM+ zgzTCtU%girR)lU8chL)VdD6#7Y6Hw^1zt>Nn+w8C_p1C4#7?2?p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xBa;uyi!9#=0u);YbP9Ily!zMi8dDTgS-A~PMP>p3 zlu$%!ZloB1zYueTwZqNO-+-;fI4vB=OyWNTSa7u7%`iw>eGHI0_AVslFfDb&;93-NK2ztjLcxxzO_1mcyj1*D>$ z+mEpcQIw{MNZ{K&xVuuAc17B1MIkG!2VkO+qDJb}$k_V*6AvZsV?>Rq>)qI|{J!BJ tJWFna+fC}20U>J)pg-3}vm-uu8&L705P78HbHD{ttMwbU*+A diff --git a/org.glite.jp/doc/install-guide/LB-JP-interaction-details.cdr b/org.glite.jp/doc/install-guide/LB-JP-interaction-details.cdr deleted file mode 100755 index 463b561c26320684ccee980bb3a4da8767fbcb48..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 42198 zcmeHQ4SZD9mA}a(VfY9nfD-U)tPw*B5*Vnoq6{Bez^Ex8q7_U?G9(a^F&Qw{?oX-| z*=lQ6sGF%+VbzG0vh3Dv`HAa>`h|6BW48)T+ZB-3$PY9cFj+v}{?EPdzK=UEGZRUe z>HfHrGwO&VBd2%$sxl^>07T*vwh;rmU{5t4?K%d0eyR%r6?7$Cw)> z99XdqDI9}BE@Q6@7Qj*%I|39XFTf870m1+cKu9mZ4+sIm01ZHdUVtAE0)zn?fEs%N zen1Ei2510c=mq!zAwU?Q0jLu%zz+xk!T=2bEdTiN9Rh>_8i0iH0{nmwAPmp|B%l}I z2ZR7&fCeC;y#PNT1PB8(01d1CFhB#);Jg4oAOr{lGypn4?|%LX;X4e_0Hg#j zzz+xk!T=3Gitz&cfDj-I&;X2}2m!(X4FE=v zha?H{PZ-}CfRyhA_yHk67@z^jAYOnU5CVh&8i0)C1^59WKp3C_$Z%eO9}ohB0UCge z=>_-!AwU?Q0nh;QkXA^NF#l-yCZl@+en1Ei2510s1TVl32m!(X4M5J}1^59WKp3C_ z$YHzyKOh7M12h1>AP?|>5FiZD0H}aGWFgWDNuu!&h#?Q~fDj-I&;Vcnd4LCm0AYXz z08_{VJRk%J12h0Sf;_+jL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d$grXA|H0LUZpQW~{=ic(p7&ZAh|s8eYIse4*Xb8rza53SKyFq@$ORRMgPm7yetI~S(c7M%KH_F=ZKl7fc(pA3HGuPiR@oE&iy3y<^Qe90rVZs} znNfcCMdy{9Ukw!g+LL{fWJ}>@c7Ki52hrR7wJ-Kb(gd=owq|vCbxCz;xhHRK(HP+! zsy8-v1|XkKel`0?8lPF8>8(Vqj!Sz z#2d+$PTm-;59y7hC+?Pg;*I8B$xMAwQF!ALq*K)F@lQ%}|!|+D= z1kfO0oL&Pa7(0Js0kOP3P*WR}@2XL~Y;!kWHgfhU?eIOBth1k{9Xe@xnTl7-(#!5j zA}{Oux!ubG+mpx3X1|f@=w&~+Qmi5N#LLK*!VTv6T4aWEDyw%y9WDuH!bayYujnxot224a&ot0rW8MYYpFEba8n`GL;`Yh?L zn_|CpZ0xoUtqZ#jH$Kp*P57!ABUJoLTk+PxCrvtO3wj6n8OMm%dM`$>8Lu}x#fZS; z88Kso9CL7Pr*^a?QWp|0b#ds%PVFC-3^aBK-ku=8ta#n-mx-81IK_yq&*nMCi1w?# z%6GR#ixJnn+o4VIoBk$ago;=eCG8 zk7#(ZL;K~yY}U29Q~TsD^KQI~_iXCWM*q#EleS3fg%}ZdvlnATL)bA!u*sdiSn~)u z=6%<6YR_+t)P=-LUCf@|sa=h?HA-E~OORi-L4S#U>zGrF*xzjWrJP65lY75B82ib+ zEqgk&&$pTWCS!z(SIg2C^Alu?qPOg}NR}A!aw@-Q^%{or` zUmj)=ULPm%BA{{7%?=NM{>wuiU@U;@?Bk+$1n^Wwdxa*f> diff --git a/org.glite.jp/doc/install-guide/LB-JP-interaction-details.eps b/org.glite.jp/doc/install-guide/LB-JP-interaction-details.eps deleted file mode 100755 index 7c4ce5e..0000000 --- a/org.glite.jp/doc/install-guide/LB-JP-interaction-details.eps +++ /dev/null @@ -1,6931 +0,0 @@ -%!PS-Adobe-3.0 EPSF-3.0 -%%BoundingBox: 56.89361 563.43317 466.04636 802.11260 -%%Creator: CorelDRAW 8 -%%Title: C:\temp\LB-JP-interaction-details.eps -%%CreationDate: Sat Mar 18 16:57:54 2006 -%%DocumentProcessColors: Black -%%DocumentSuppliedResources: (atend) -%%EndComments -%%BeginProlog -/AutoFlatness false def -/AutoSteps 0 def -/CMYKMarks true def -/UseLevel 1 def -%Color profile: PROFILES.CCM - Obecný profil tiskárny CMYK - Žád. -%%BeginResource: procset wCorel8Dict 8.0 0 -/wCorel8Dict 300 dict def wCorel8Dict begin -% Copyright (c)1992-97 Corel Corporation -% All rights reserved. v8.0 r0.7 -/bd{bind def}bind def/ld{load def}bd/xd{exch def}bd/_ null def/rp{{pop}repeat} -bd/@cp/closepath ld/@gs/gsave ld/@gr/grestore ld/@np/newpath ld/Tl/translate ld -/$sv 0 def/@sv{/$sv save def}bd/@rs{$sv restore}bd/spg/showpage ld/showpage{} -bd currentscreen/@dsp xd/$dsp/@dsp def/$dsa xd/$dsf xd/$sdf false def/$SDF -false def/$Scra 0 def/SetScr/setscreen ld/setscreen{pop pop pop}bd/@ss{2 index -0 eq{$dsf 3 1 roll 4 -1 roll pop}if exch $Scra add exch load SetScr}bd -/SepMode_5 where{pop}{/SepMode_5 0 def}ifelse/CurrentInkName_5 where{pop} -{/CurrentInkName_5(Composite)def}ifelse/$ink_5 where{pop}{/$ink_5 -1 def} -ifelse/$c 0 def/$m 0 def/$y 0 def/$k 0 def/$t 1 def/$n _ def/$o 0 def/$fil 0 -def/$C 0 def/$M 0 def/$Y 0 def/$K 0 def/$T 1 def/$N _ def/$O 0 def/$PF false -def/s1c 0 def/s1m 0 def/s1y 0 def/s1k 0 def/s1t 0 def/s1n _ def/$bkg false def -/SK 0 def/SM 0 def/SY 0 def/SC 0 def/$op false def matrix currentmatrix/$ctm xd -/$ptm matrix def/$ttm matrix def/$stm matrix def/$ffpnt true def -/CorelDrawReencodeVect[16#0/grave 16#5/breve 16#6/dotaccent 16#8/ring -16#A/hungarumlaut 16#B/ogonek 16#C/caron 16#D/dotlessi 16#27/quotesingle -16#60/grave 16#7C/bar -16#82/quotesinglbase/florin/quotedblbase/ellipsis/dagger/daggerdbl -16#88/circumflex/perthousand/Scaron/guilsinglleft/OE -16#91/quoteleft/quoteright/quotedblleft/quotedblright/bullet/endash/emdash -16#98/tilde/trademark/scaron/guilsinglright/oe 16#9F/Ydieresis -16#A1/exclamdown/cent/sterling/currency/yen/brokenbar/section -16#a8/dieresis/copyright/ordfeminine/guillemotleft/logicalnot/minus/registered/macron -16#b0/degree/plusminus/twosuperior/threesuperior/acute/mu/paragraph/periodcentered -16#b8/cedilla/onesuperior/ordmasculine/guillemotright/onequarter/onehalf/threequarters/questiondown -16#c0/Agrave/Aacute/Acircumflex/Atilde/Adieresis/Aring/AE/Ccedilla -16#c8/Egrave/Eacute/Ecircumflex/Edieresis/Igrave/Iacute/Icircumflex/Idieresis -16#d0/Eth/Ntilde/Ograve/Oacute/Ocircumflex/Otilde/Odieresis/multiply -16#d8/Oslash/Ugrave/Uacute/Ucircumflex/Udieresis/Yacute/Thorn/germandbls -16#e0/agrave/aacute/acircumflex/atilde/adieresis/aring/ae/ccedilla -16#e8/egrave/eacute/ecircumflex/edieresis/igrave/iacute/icircumflex/idieresis -16#f0/eth/ntilde/ograve/oacute/ocircumflex/otilde/odieresis/divide -16#f8/oslash/ugrave/uacute/ucircumflex/udieresis/yacute/thorn/ydieresis]def -/L2?/languagelevel where{pop languagelevel 2 ge}{false}ifelse def -/@BeginSysCorelDict{systemdict/Corel30Dict known{systemdict/Corel30Dict get -exec}if systemdict/CorelLexDict known{1 systemdict/CorelLexDict get exec}if}bd -/@EndSysCorelDict{systemdict/Corel30Dict known{end}if/EndCorelLexDict where -{pop EndCorelLexDict}if}bd AutoFlatness{/@ifl{dup currentflat exch sub 10 gt{ -([Error: PathTooComplex; OffendingCommand: AnyPaintingOperator]\n)print flush -@np exit}{currentflat 2 add setflat}ifelse}bd/@fill/fill ld/fill{currentflat{ -{@fill}stopped{@ifl}{exit}ifelse}bind loop setflat}bd/@eofill/eofill ld/eofill -{currentflat{{@eofill}stopped{@ifl}{exit}ifelse}bind loop setflat}bd/@clip -/clip ld/clip{currentflat{{@clip}stopped{@ifl}{exit}ifelse}bind loop setflat} -bd/@eoclip/eoclip ld/eoclip{currentflat{{@eoclip}stopped{@ifl}{exit}ifelse} -bind loop setflat}bd/@stroke/stroke ld/stroke{currentflat{{@stroke}stopped -{@ifl}{exit}ifelse}bind loop setflat}bd}if L2?{/@ssa{true setstrokeadjust}bd}{ -/@ssa{}bd}ifelse/d/setdash ld/j/setlinejoin ld/J/setlinecap ld/M/setmiterlimit -ld/w/setlinewidth ld/O{/$o xd}bd/R{/$O xd}bd/W/eoclip ld/c/curveto ld/C/c ld/l -/lineto ld/L/l ld/rl/rlineto ld/m/moveto ld/n/newpath ld/N/newpath ld/P{11 rp} -bd/u{}bd/U{}bd/A{pop}bd/q/@gs ld/Q/@gr ld/&{}bd/@j{@sv @np}bd/@J{@rs}bd/g{1 -exch sub/$k xd/$c 0 def/$m 0 def/$y 0 def/$t 1 def/$n _ def/$fil 0 def}bd/G{1 -sub neg/$K xd _ 1 0 0 0/$C xd/$M xd/$Y xd/$T xd/$N xd}bd/k{1 index type -/stringtype eq{/$t xd/$n xd}{/$t 0 def/$n _ def}ifelse/$k xd/$y xd/$m xd/$c xd -/$fil 0 def}bd/K{1 index type/stringtype eq{/$T xd/$N xd}{/$T 0 def/$N _ def} -ifelse/$K xd/$Y xd/$M xd/$C xd}bd/x/k ld/X/K ld/sf{1 index type/stringtype eq{ -/s1t xd/s1n xd}{/s1t 0 def/s1n _ def}ifelse/s1k xd/s1y xd/s1m xd/s1c xd}bd/i{ -dup 0 ne{setflat}{pop}ifelse}bd/v{4 -2 roll 2 copy 6 -2 roll c}bd/V/v ld/y{2 -copy c}bd/Y/y ld/@w{matrix rotate/$ptm xd matrix scale $ptm dup concatmatrix -/$ptm xd 1 eq{$ptm exch dup concatmatrix/$ptm xd}if 1 w}bd/@g{1 eq dup/$sdf xd -{/$scp xd/$sca xd/$scf xd}if}bd/@G{1 eq dup/$SDF xd{/$SCP xd/$SCA xd/$SCF xd} -if}bd/@D{2 index 0 eq{$dsf 3 1 roll 4 -1 roll pop}if 3 copy exch $Scra add exch -load SetScr/$dsp xd/$dsa xd/$dsf xd}bd/$ngx{$SDF{$SCF SepMode_5 0 eq{$SCA} -{$dsa}ifelse $SCP @ss}if}bd/p{/$pm xd 7 rp/$pyf xd/$pxf xd/$pn xd/$fil 1 def} -bd/@MN{2 copy le{pop}{exch pop}ifelse}bd/@MX{2 copy ge{pop}{exch pop}ifelse}bd -/InRange{3 -1 roll @MN @MX}bd/@sqr{dup 0 rl dup 0 exch rl neg 0 rl @cp}bd -/currentscale{1 0 dtransform matrix defaultmatrix idtransform dup mul exch dup -mul add sqrt 0 1 dtransform matrix defaultmatrix idtransform dup mul exch dup -mul add sqrt}bd/@unscale{}bd/wDstChck{2 1 roll dup 3 -1 roll eq{1 add}if}bd -/@dot{dup mul exch dup mul add 1 exch sub}bd/@lin{exch pop abs 1 exch sub}bd -/cmyk2rgb{3{dup 5 -1 roll add 1 exch sub dup 0 lt{pop 0}if exch}repeat pop}bd -/rgb2cmyk{3{1 exch sub 3 1 roll}repeat 3 copy @MN @MN 3{dup 5 -1 roll sub neg -exch}repeat}bd/rgb2g{2 index .299 mul 2 index .587 mul add 1 index .114 mul add -4 1 roll pop pop pop}bd/WaldoColor_5 where{pop}{/SetRgb/setrgbcolor ld/GetRgb -/currentrgbcolor ld/SetGry/setgray ld/GetGry/currentgray ld/SetRgb2 systemdict -/setrgbcolor get def/GetRgb2 systemdict/currentrgbcolor get def/SetHsb -systemdict/sethsbcolor get def/GetHsb systemdict/currenthsbcolor get def -/rgb2hsb{SetRgb2 GetHsb}bd/hsb2rgb{3 -1 roll dup floor sub 3 1 roll SetHsb -GetRgb2}bd/setcmykcolor where{pop/SetCmyk_5/setcmykcolor ld}{/SetCmyk_5{ -cmyk2rgb SetRgb}bd}ifelse/currentcmykcolor where{pop/GetCmyk/currentcmykcolor -ld}{/GetCmyk{GetRgb rgb2cmyk}bd}ifelse/setoverprint where{pop}{/setoverprint{ -/$op xd}bd}ifelse/currentoverprint where{pop}{/currentoverprint{$op}bd}ifelse -/@tc_5{5 -1 roll dup 1 ge{pop}{4{dup 6 -1 roll mul exch}repeat pop}ifelse}bd -/@trp{exch pop 5 1 roll @tc_5}bd/setprocesscolor_5{SepMode_5 0 eq{SetCmyk_5}{0 -4 $ink_5 sub index exch pop 5 1 roll pop pop pop pop SepsColor true eq{$ink_5 3 -gt{1 sub neg SetGry}{0 0 0 4 $ink_5 roll SetCmyk_5}ifelse}{1 sub neg SetGry} -ifelse}ifelse}bd/findcmykcustomcolor where{pop}{/findcmykcustomcolor{5 array -astore}bd}ifelse/setcustomcolor where{pop}{/setcustomcolor{exch aload pop -SepMode_5 0 eq{pop @tc_5 setprocesscolor_5}{CurrentInkName_5 eq{4 index}{0} -ifelse 6 1 roll 5 rp 1 sub neg SetGry}ifelse}bd}ifelse/@scc_5{dup type -/booleantype eq{setoverprint}{1 eq setoverprint}ifelse dup _ eq{pop -setprocesscolor_5 pop}{findcmykcustomcolor exch setcustomcolor}ifelse SepMode_5 -0 eq{true}{GetGry 1 eq currentoverprint and not}ifelse}bd/colorimage where{pop -/ColorImage{colorimage}def}{/ColorImage{/ncolors xd pop/dataaq xd{dataaq -ncolors dup 3 eq{/$dat xd 0 1 $dat length 3 div 1 sub{dup 3 mul $dat 1 index -get 255 div $dat 2 index 1 add get 255 div $dat 3 index 2 add get 255 div rgb2g -255 mul cvi exch pop $dat 3 1 roll put}for $dat 0 $dat length 3 idiv -getinterval pop}{4 eq{/$dat xd 0 1 $dat length 4 div 1 sub{dup 4 mul $dat 1 -index get 255 div $dat 2 index 1 add get 255 div $dat 3 index 2 add get 255 div -$dat 4 index 3 add get 255 div cmyk2rgb rgb2g 255 mul cvi exch pop $dat 3 1 -roll put}for $dat 0 $dat length ncolors idiv getinterval}if}ifelse}image}bd -}ifelse/setcmykcolor{1 5 1 roll _ currentoverprint @scc_5/$ffpnt xd}bd -/currentcmykcolor{0 0 0 0}bd/setrgbcolor{rgb2cmyk setcmykcolor}bd -/currentrgbcolor{currentcmykcolor cmyk2rgb}bd/sethsbcolor{hsb2rgb setrgbcolor} -bd/currenthsbcolor{currentrgbcolor rgb2hsb}bd/setgray{dup dup setrgbcolor}bd -/currentgray{currentrgbcolor rgb2g}bd/InsideDCS false def/IMAGE systemdict -/image get def/image{InsideDCS{IMAGE}{/EPSDict where{pop SepMode_5 0 eq{IMAGE} -{dup type/dicttype eq{dup/ImageType get 1 ne{IMAGE}{dup dup/BitsPerComponent -get 8 eq exch/BitsPerComponent get 1 eq or currentcolorspace 0 get/DeviceGray -eq and{CurrentInkName_5(Black)eq{IMAGE}{dup/DataSource get/TCC xd/Height get -abs{TCC pop}repeat}ifelse}{IMAGE}ifelse}ifelse}{2 index 1 ne{CurrentInkName_5 -(Black)eq{IMAGE}{/TCC xd pop pop exch pop abs{TCC pop}repeat}ifelse}{IMAGE} -ifelse}ifelse}ifelse}{IMAGE}ifelse}ifelse}bd}ifelse/WaldoColor_5 true def/@sft -{$tllx $pxf add dup $tllx gt{$pwid sub}if/$tx xd $tury $pyf sub dup $tury lt -{$phei add}if/$ty xd}bd/@stb{pathbbox/$ury xd/$urx xd/$lly xd/$llx xd}bd/@ep{{ -cvx exec}forall}bd/@tp{@sv/$in true def 2 copy dup $lly le{/$in false def}if -$phei sub $ury ge{/$in false def}if dup $urx ge{/$in false def}if $pwid add -$llx le{/$in false def}if $in{@np 2 copy m $pwid 0 rl 0 $phei neg rl $pwid neg -0 rl 0 $phei rl clip @np $pn cvlit load aload pop 7 -1 roll 5 index sub 7 -1 -roll 3 index sub Tl matrix currentmatrix/$ctm xd @ep pop pop pop pop}{pop pop -}ifelse @rs}bd/@th{@sft 0 1 $tly 1 sub{dup $psx mul $tx add{dup $llx gt{$pwid -sub}{exit}ifelse}loop exch $phei mul $ty exch sub 0 1 $tlx 1 sub{$pwid mul 3 -copy 3 -1 roll add exch @tp pop}for pop pop}for}bd/@tv{@sft 0 1 $tlx 1 sub{dup -$pwid mul $tx add exch $psy mul $ty exch sub{dup $ury lt{$phei add}{exit} -ifelse}loop 0 1 $tly 1 sub{$phei mul 3 copy sub @tp pop}for pop pop}for}bd/$fm -0 def/wfill{1 $fm eq{fill}{eofill}ifelse}bd/wclip{1 $fm eq{clip}{eoclip}ifelse -}bd/@pf{@gs $ctm setmatrix $pm concat @stb wclip @sv Bburx Bbury $pm itransform -/$tury xd/$turx xd Bbllx Bblly $pm itransform/$tlly xd/$tllx xd newpath $tllx -$tlly m $tllx $tury l $turx $tury l $turx $tlly l $tllx $tlly m @cp pathbbox -@rs/$tury xd/$turx xd/$tlly xd/$tllx xd/$wid $turx $tllx sub def/$hei $tury -$tlly sub def @gs $vectpat{1 0 0 0 0 _ $o @scc_5{wfill}if}{$t $c $m $y $k $n $o -@scc_5{SepMode_5 0 eq $pfrg or{$tllx $tlly Tl $wid $hei scale <00> 8 1 false[8 -0 0 1 0 0]{}imagemask}{/$bkg true def}ifelse}if}ifelse @gr $wid 0 gt $hei 0 gt -and{$pn cvlit load aload pop/$pd xd 3 -1 roll sub/$phei xd exch sub/$pwid xd -$wid $pwid div ceiling 1 add/$tlx xd $hei $phei div ceiling 1 add/$tly xd $psx -0 eq{@tv}{@th}ifelse}if @gr @np/$bkg false def}bd/@Pf{@sv SepMode_5 0 eq $Psc 0 -ne or $ink_5 3 eq or{0 J 0 j[]0 d $t $c $m $y $k $n $o @scc_5 pop $ctm -setmatrix 72 1000 div dup matrix scale dup concat dup Bburx exch Bbury exch -itransform ceiling cvi/Bbury xd ceiling cvi/Bburx xd Bbllx exch Bblly exch -itransform floor cvi/Bblly xd floor cvi/Bbllx xd $Prm aload pop $Psn load exec -}{1 SetGry wfill}ifelse @rs @np}bd/F{matrix currentmatrix $sdf{$scf $sca $scp -@ss}if $fil 1 eq{@pf}{$fil 2 eq{@ff}{$fil 3 eq{@Pf}{$t $c $m $y $k $n $o @scc_5 -{wfill}{@np}ifelse}ifelse}ifelse}ifelse $sdf{$dsf $dsa $dsp @ss}if setmatrix} -bd/f{@cp F}bd/S{matrix currentmatrix $ctm setmatrix $SDF{$SCF $SCA $SCP @ss}if -$T $C $M $Y $K $N $O @scc_5{matrix currentmatrix $ptm concat stroke setmatrix} -{@np}ifelse $SDF{$dsf $dsa $dsp @ss}if setmatrix}bd/s{@cp S}bd/B{@gs F @gr S} -bd/b{@cp B}bd/_E{5 array astore exch cvlit xd}bd/@cc{currentfile $dat -readhexstring pop}bd/@sm{/$ctm $ctm currentmatrix def}bd/@E{/Bbury xd/Bburx xd -/Bblly xd/Bbllx xd}bd/@c{@cp}bd/@p{/$fil 1 def 1 eq dup/$vectpat xd{/$pfrg true -def}{@gs $t $c $m $y $k $n $o @scc_5/$pfrg xd @gr}ifelse/$pm xd/$psy xd/$psx xd -/$pyf xd/$pxf xd/$pn xd}bd/@P{/$fil 3 def/$Psn xd/$Psc xd array astore/$Prm xd -}bd/@ii{concat 3 index 3 index m 3 index 1 index l 2 copy l 1 index 3 index l 3 -index 3 index l clip pop pop pop pop}bd/tcc{@cc}def/@i{@sm @gs @ii 6 index 1 ne -{/$frg true def pop pop}{1 eq{s1t s1c s1m s1y s1k s1n $O @scc_5/$frg xd}{/$frg -false def}ifelse 1 eq{@gs $ctm setmatrix F @gr}if}ifelse @np/$ury xd/$urx xd -/$lly xd/$llx xd/$bts xd/$hei xd/$wid xd/$dat $wid $bts mul 8 div ceiling cvi -string def $bkg $frg or{$SDF{$SCF $SCA $SCP @ss}if $llx $lly Tl $urx $llx sub -$ury $lly sub scale $bkg{$t $c $m $y $k $n $o @scc_5 pop}if $wid $hei abs $bts -1 eq{$bkg}{$bts}ifelse[$wid 0 0 $hei neg 0 $hei 0 gt{$hei}{0}ifelse]/tcc load -$bts 1 eq{imagemask}{image}ifelse $SDF{$dsf $dsa $dsp @ss}if}{$hei abs{tcc pop} -repeat}ifelse @gr $ctm setmatrix}bd/@I{@sm @gs @ii @np/$ury xd/$urx xd/$lly xd -/$llx xd/$ncl xd/$bts xd/$hei xd/$wid xd/$dat $wid $bts mul $ncl mul 8 div -ceiling cvi string def $ngx $llx $lly Tl $urx $llx sub $ury $lly sub scale $wid -$hei abs $bts[$wid 0 0 $hei neg 0 $hei 0 gt{$hei}{0}ifelse]/@cc load false $ncl -ColorImage $SDF{$dsf $dsa $dsp @ss}if @gr $ctm setmatrix}bd/COMP 0 def -/MaskedImage false def L2?{/@I_2{@sm @gs @ii @np/$ury xd/$urx xd/$lly xd/$llx -xd/$ncl xd/$bts xd/$hei xd/$wid xd/$dat $wid $bts mul $ncl mul 8 div ceiling -cvi string def $ngx $ncl 1 eq{/DeviceGray}{$ncl 3 eq{/DeviceRGB}{/DeviceCMYK} -ifelse}ifelse setcolorspace $llx $lly Tl $urx $llx sub $ury $lly sub scale 8 -dict begin/ImageType 1 def/Width $wid def/Height $hei abs def/BitsPerComponent -$bts def/Decode $ncl 1 eq{[0 1]}{$ncl 3 eq{[0 1 0 1 0 1]}{[0 1 0 1 0 1 0 1]} -ifelse}ifelse def/ImageMatrix[$wid 0 0 $hei neg 0 $hei 0 gt{$hei}{0}ifelse]def -/DataSource currentfile/ASCII85Decode filter COMP 1 eq{/DCTDecode filter}{COMP -2 eq{/RunLengthDecode filter}if}ifelse def currentdict end image $SDF{$dsf $dsa -$dsp @ss}if @gr $ctm setmatrix}bd}{/@I_2{}bd}ifelse/@I_3{@sm @gs @ii @np/$ury -xd/$urx xd/$lly xd/$llx xd/$ncl xd/$bts xd/$hei xd/$wid xd/$dat $wid $bts mul -$ncl mul 8 div ceiling cvi string def $ngx $ncl 1 eq{/DeviceGray}{$ncl 3 eq -{/DeviceRGB}{/DeviceCMYK}ifelse}ifelse setcolorspace $llx $lly Tl $urx $llx sub -$ury $lly sub scale/ImageDataDict 8 dict def ImageDataDict begin/ImageType 1 -def/Width $wid def/Height $hei abs def/BitsPerComponent $bts def/Decode $ncl 1 -eq{[0 1]}{$ncl 3 eq{[0 1 0 1 0 1]}{[0 1 0 1 0 1 0 1]}ifelse}ifelse def -/ImageMatrix[$wid 0 0 $hei neg 0 $hei 0 gt{$hei}{0}ifelse]def/DataSource -currentfile/ASCII85Decode filter COMP 1 eq{/DCTDecode filter}{COMP 2 eq{ -/RunLengthDecode filter}if}ifelse def end/MaskedImageDict 7 dict def -MaskedImageDict begin/ImageType 3 def/InterleaveType 3 def/MaskDict -ImageMaskDict def/DataDict ImageDataDict def end MaskedImageDict image $SDF -{$dsf $dsa $dsp @ss}if @gr $ctm setmatrix}bd/@SetMask{/$mbts xd/$mhei xd/$mwid -xd/ImageMaskDict 8 dict def ImageMaskDict begin/ImageType 1 def/Width $mwid def -/Height $mhei abs def/BitsPerComponent $mbts def/DataSource maskstream def -/ImageMatrix[$mwid 0 0 $mhei neg 0 $mhei 0 gt{$mhei}{0}ifelse]def/Decode[1 0] -def end}bd/@B{@gs S @gr F}bd/@b{@cp @B}bd/@sep{CurrentInkName_5(Composite)eq -{/$ink_5 -1 def}{CurrentInkName_5(Cyan)eq{/$ink_5 0 def}{CurrentInkName_5 -(Magenta)eq{/$ink_5 1 def}{CurrentInkName_5(Yellow)eq{/$ink_5 2 def}{ -CurrentInkName_5(Black)eq{/$ink_5 3 def}{/$ink_5 4 def}ifelse}ifelse}ifelse} -ifelse}ifelse}bd/@whi{@gs -72000 dup m -72000 72000 l 72000 dup l 72000 -72000 -l @cp 1 SetGry fill @gr}bd/@neg{[{1 exch sub}/exec cvx currenttransfer/exec -cvx]cvx settransfer @whi}bd/deflevel 0 def/@sax{/deflevel deflevel 1 add def} -bd/@eax{/deflevel deflevel dup 0 gt{1 sub}if def deflevel 0 gt{/eax load}{eax} -ifelse}bd/eax{{exec}forall}bd/@rax{deflevel 0 eq{@rs @sv}if}bd/@daq{dup type -/arraytype eq{{}forall}if}bd/@BMP{/@cc xd UseLevel 3 eq MaskedImage true eq and -{7 -2 roll pop pop @I_3}{12 index 1 gt UseLevel 2 eq UseLevel 3 eq or and{7 -2 -roll pop pop @I_2}{11 index 1 eq{12 -1 roll pop @i}{7 -2 roll pop pop @I} -ifelse}ifelse}ifelse}bd systemdict/pdfmark known not{/pdfmark/cleartomark ld} -if -/z{exch findfont exch scalefont setfont}bd/ZB{9 dict dup begin 4 1 roll -/FontType 3 def/FontMatrix xd/FontBBox xd/Encoding 256 array def 0 1 255{ -Encoding exch/.notdef put}for/CharStrings 256 dict def CharStrings/.notdef{} -put/Metrics 256 dict def Metrics/.notdef 3 -1 roll put/BuildChar{exch dup -/$char exch/Encoding get 3 index get def dup/Metrics get $char get aload pop -setcachedevice begin Encoding exch get CharStrings exch get end exec}def end -definefont pop}bd/ZBAddChar{findfont begin dup 4 1 roll dup 6 1 roll Encoding 3 -1 roll put CharStrings 3 1 roll put Metrics 3 1 roll put end}bd/Z{findfont dup -maxlength 2 add dict exch dup{1 index/FID ne{3 index 3 1 roll put}{pop pop} -ifelse}forall pop dup dup/Encoding get 256 array copy dup/$fe xd/Encoding exch -put dup/Fontname 3 index put 3 -1 roll dup length 0 ne{0 exch{dup type 0 type -eq{exch pop}{$fe exch 2 index exch put 1 add}ifelse}forall pop}if dup 256 dict -dup/$met xd/Metrics exch put dup/FontMatrix get 0 get 1000 mul 1 exch div 3 -index length 256 eq{0 1 255{dup $fe exch get dup/.notdef eq{pop pop}{5 index 3 --1 roll get 2 index mul $met 3 1 roll put}ifelse}for}if pop definefont pop pop -}bd/@ftx{{currentpoint 3 -1 roll(0)dup 3 -1 roll 0 exch put dup @gs true -charpath $ctm setmatrix @@txt @gr @np stringwidth pop 3 -1 roll add exch m} -forall}bd/@ft{matrix currentmatrix exch $sdf{$scf $sca $scp @ss}if $fil 1 eq -{/@@txt/@pf ld @ftx}{$fil 2 eq{/@@txt/@ff ld @ftx}{$fil 3 eq{/@@txt/@Pf ld -@ftx}{$t $c $m $y $k $n $o @scc_5{show}{pop}ifelse}ifelse}ifelse}ifelse $sdf -{$dsf $dsa $dsp @ss}if setmatrix}bd/@st{matrix currentmatrix exch $SDF{$SCF -$SCA $SCP @ss}if $T $C $M $Y $K $N $O @scc_5{{currentpoint 3 -1 roll(0)dup 3 -1 -roll 0 exch put dup @gs true charpath $ctm setmatrix $ptm concat stroke @gr @np -stringwidth pop 3 -1 roll add exch m}forall}{pop}ifelse $SDF{$dsf $dsa $dsp -@ss}if setmatrix}bd/@te{@ft}bd/@tr{@st}bd/@ta{dup @gs @ft @gr @st}bd/@t@a{dup -@gs @st @gr @ft}bd/@tm{@sm concat}bd/e{/t{@te}def}bd/r{/t{@tr}def}bd/o{/t{pop} -def}bd/a{/t{@ta}def}bd/@a{/t{@t@a}def}bd/t{@te}def/T{@np $ctm setmatrix/$ttm -matrix def}bd/ddt{t}def/@t{/$stm $stm currentmatrix def 3 1 roll m $ttm concat -ddt $stm setmatrix}bd/@n{/$ttm exch matrix rotate def}bd/@s{}bd/@l{}bd -end -%%EndResource -%%EndProlog -%%BeginSetup -wCorel8Dict begin -@BeginSysCorelDict -2.6131 setmiterlimit -1.00 setflat -/$fst 128 def -%%EndSetup - -%%Page: 1 1 -%LogicalPage: 1 -%%BeginPageSetup -@sv -@sm -@sv -%%EndPageSetup -@rax %Note: Object -363.47216 703.76343 456.70649 745.20113 @E - 0 O 0 @g -0.00 0.00 0.00 0.50 k -/$fm 0 def -363.47216 745.20113 m -456.70649 745.20113 L -456.70649 703.76343 L -363.47216 703.76343 L -363.47216 745.20113 L -@c -F - -@rax %Note: Object -362.81792 577.71128 456.05225 619.14898 @E - 0 O 0 @g -0.00 0.00 0.00 0.50 k -/$fm 0 def -362.81792 619.14898 m -456.05225 619.14898 L -456.05225 577.71128 L -362.81792 577.71128 L -362.81792 619.14898 L -@c -F - -@rax %Note: Object -70.70428 707.90882 139.08699 749.34652 @E - 0 O 0 @g -0.00 0.00 0.00 0.50 k -/$fm 0 def -70.70428 749.34652 m -139.08699 749.34652 L -139.08699 707.90882 L -70.70428 707.90882 L -70.70428 749.34652 L -@c -F - -@rax %Note: Object -67.72422 711.88072 134.94161 753.24699 @E - 0 O 0 @g -0.00 0.00 0.00 0.00 k -0 J 0 j [] 0 d 0 R 0 @G -0.00 0.00 0.00 1.00 K -0 0.49890 0.49890 0.00000 @w -/$fm 0 def -67.72422 753.24699 m -134.94161 753.24699 L -134.94161 711.88072 L -67.72422 711.88072 L -67.72422 753.24699 L -@c -B - -@rax %Note: Object -71.61931 628.46674 140.00202 669.90444 @E - 0 O 0 @g -0.00 0.00 0.00 0.50 k -/$fm 0 def -71.61931 669.90444 m -140.00202 669.90444 L -140.00202 628.46674 L -71.61931 628.46674 L -71.61931 669.90444 L -@c -F - -@rax %Note: Object -68.63924 632.43865 135.85663 673.80491 @E - 0 O 0 @g -0.00 0.00 0.00 0.00 k -0 J 0 j [] 0 d 0 R 0 @G -0.00 0.00 0.00 1.00 K -0 0.49890 0.49890 0.00000 @w -/$fm 0 def -68.63924 673.80491 m -135.85663 673.80491 L -135.85663 632.43865 L -68.63924 632.43865 L -68.63924 673.80491 L -@c -B - -@rax %Note: Object -222.39298 642.48293 290.77569 683.92063 @E - 0 O 0 @g -0.00 0.00 0.00 0.50 k -/$fm 0 def -222.39298 683.92063 m -290.77569 683.92063 L -290.77569 642.48293 L -222.39298 642.48293 L -222.39298 683.92063 L -@c -F - -@rax %Note: Object -219.41291 646.45483 286.63030 687.82110 @E - 0 O 0 @g -0.00 0.00 0.00 0.00 k -0 J 0 j [] 0 d 0 R 0 @G -0.00 0.00 0.00 1.00 K -0 0.49890 0.49890 0.00000 @w -/$fm 0 def -219.41291 687.82110 m -286.63030 687.82110 L -286.63030 646.45483 L -219.41291 646.45483 L -219.41291 687.82110 L -@c -B - -@rax %Note: Object -360.49209 707.73534 453.56627 749.10161 @E - 0 O 0 @g -0.00 0.00 0.00 0.00 k -0 J 0 j [] 0 d 0 R 0 @G -0.00 0.00 0.00 1.00 K -0 0.49890 0.49890 0.00000 @w -/$fm 0 def -360.49209 749.10161 m -453.56627 749.10161 L -453.56627 707.73534 L -360.49209 707.73534 L -360.49209 749.10161 L -@c -B - -@rax %Note: Object -359.83786 581.68318 452.91203 623.04945 @E - 0 O 0 @g -0.00 0.00 0.00 0.00 k -0 J 0 j [] 0 d 0 R 0 @G -0.00 0.00 0.00 1.00 K -0 0.49890 0.49890 0.00000 @w -/$fm 0 def -359.83786 623.04945 m -452.91203 623.04945 L -452.91203 581.68318 L -359.83786 581.68318 L -359.83786 623.04945 L -@c -B - -@rax 228.57137 662.18854 279.64885 671.33367 @E -[0.00028346 0.00000000 0.00000000 0.00028346 254.04178598 664.17531429] @tm - 0 O 0 @g -0.00 0.00 0.00 1.00 k -e - -% FontChange:/_ArialCE 35278.00000 z -%CHAR: -89854 0 (J) @t --88837 7167 m --85821 7579 L --85744 5650 -85380 4327 -84739 3616 c --84092 2905 -83204 2552 -82069 2552 c --81229 2552 -80505 2740 -79900 3128 c --79288 3510 -78871 4033 -78641 4692 c --78412 5356 -78295 6409 -78295 7855 c --78295 25253 L --74955 25253 L --74955 8043 l --74955 5933 -75208 4292 -75719 3134 c --76231 1976 -77042 1094 -78148 482 c --79259 -123 -80558 -429 -82052 -429 c --84268 -429 -85962 206 -87143 1482 c --88319 2758 -88884 4651 -88837 7167 C -@c -F -%CHAR: -72215 0 (P) @t --69493 0 m --69493 25253 L --59968 25253 l --58292 25253 -57010 25171 -56128 25012 c --54888 24806 -53847 24412 -53006 23830 c --52171 23254 -51495 22437 -50984 21396 c --50472 20350 -50219 19203 -50219 17951 c --50219 15805 -50901 13982 -52265 12494 c --53635 11013 -56105 10266 -59674 10266 c --66153 10266 L --66153 0 L --69493 0 L -@c --66153 13247 m --59621 13247 l --57463 13247 -55928 13647 -55023 14452 c --54117 15258 -53665 16387 -53665 17845 c --53665 18903 -53929 19809 -54464 20561 c --54999 21314 -55699 21808 -56575 22049 c --57140 22196 -58174 22272 -59691 22272 c --66153 22272 L --66153 13247 L -@c -F -%CHAR: -39513 0 (i) @t --37173 21684 m --37173 25253 L --34068 25253 L --34068 21684 L --37173 21684 L -@c --37173 0 m --37173 18292 L --34068 18292 L --34068 0 L --37173 0 L -@c -F -%CHAR: -31681 0 (m) @t --29353 0 m --29353 18292 L --26583 18292 L --26583 15728 L --26007 16622 -25243 17345 -24290 17886 c --23338 18433 -22250 18709 -21033 18709 c --19681 18709 -18569 18427 -17705 17862 c --16835 17298 -16223 16516 -15871 15505 C --14418 17639 -12537 18709 -10220 18709 c --8403 18709 -7010 18203 -6034 17198 c --5058 16193 -4570 14646 -4570 12559 c --4570 0 L --7651 0 L --7651 11524 l --7651 12765 -7751 13658 -7951 14205 c --8156 14746 -8521 15187 -9044 15522 c --9573 15852 -10197 16022 -10908 16022 c --12196 16022 -13260 15593 -14113 14734 c --14959 13882 -15388 12512 -15388 10630 c --15388 0 L --18487 0 L --18487 11883 l --18487 13265 -18740 14299 -19246 14987 c --19751 15675 -20574 16022 -21727 16022 c --22597 16022 -23402 15793 -24143 15328 c --24884 14870 -25425 14199 -25754 13317 c --26089 12430 -26254 11154 -26254 9490 c --26254 0 L --29353 0 L -@c -F -%CHAR: -2294 0 (p) @t -34 -7009 m -34 18292 L -2857 18292 L -2857 15916 L -3521 16845 4274 17545 5114 18009 c -5949 18474 6966 18709 8160 18709 c -9724 18709 11100 18303 12293 17504 c -13493 16698 14392 15563 14998 14099 c -15610 12635 15915 11030 15915 9284 c -15915 7414 15580 5727 14904 4227 c -14234 2728 13258 1582 11976 782 c -10694 -12 9348 -412 7937 -412 c -6902 -412 5979 -194 5156 241 c -4332 676 3662 1229 3133 1893 C -3133 -7009 L -34 -7009 L -@c -2839 9043 m -2839 6691 3315 4951 4268 3822 c -5220 2699 6379 2134 7731 2134 c -9107 2134 10288 2716 11270 3886 c -12252 5051 12746 6856 12746 9302 c -12746 11636 12264 13376 11306 14540 c -10347 15699 9201 16281 7872 16281 c -6549 16281 5379 15663 4362 14429 c -3345 13194 2839 11395 2839 9043 c -@c -F -%CHAR: 17321 0 (o) @t -18491 9149 m -18491 12535 19432 15046 21319 16675 c -22889 18027 24806 18709 27069 18709 c -29586 18709 31644 17886 33237 16234 c -34837 14587 35630 12312 35630 9407 c -35630 7050 35278 5198 34572 3851 c -33866 2499 32837 1452 31491 706 c -30139 -41 28669 -412 27069 -412 c -24512 -412 22442 406 20861 2052 c -19279 3692 18491 6056 18491 9149 c -@c -21678 9149 m -21678 6803 22189 5051 23212 3886 c -24235 2716 25523 2134 27069 2134 c -28610 2134 29892 2722 30915 3892 c -31932 5062 32444 6850 32444 9249 c -32444 11512 31932 13229 30903 14393 c -29874 15558 28598 16140 27069 16140 c -25523 16140 24235 15558 23212 14399 c -22189 13241 21678 11489 21678 9149 c -@c -F -%CHAR: 36936 0 (r) @t -39229 0 m -39229 18292 L -42016 18292 L -42016 15522 L -42727 16816 43386 17674 43992 18086 c -44591 18497 45256 18709 45979 18709 c -47026 18709 48084 18374 49166 17710 C -48096 14829 L -47343 15281 46585 15505 45826 15505 c -45144 15505 44538 15299 43997 14893 c -43457 14482 43074 13917 42845 13194 c -42498 12094 42328 10889 42328 9578 c -42328 0 L -39229 0 L -@c -F -%CHAR: 48684 0 (t) @t -57780 2775 m -58227 35 L -57357 -147 56575 -241 55887 -241 c -54758 -241 53888 -65 53264 294 c -52647 647 52212 1117 51959 1699 c -51706 2275 51577 3498 51577 5356 c -51577 15881 L -49301 15881 L -49301 18292 L -51577 18292 L -51577 22825 L -54664 24683 L -54664 18292 L -57780 18292 L -57780 15881 L -54664 15881 L -54664 5186 l -54664 4298 54717 3734 54822 3481 c -54934 3228 55110 3028 55357 2875 c -55604 2728 55957 2652 56416 2652 c -56763 2652 57215 2693 57780 2775 C -@c -F -%CHAR: 58491 0 (e) @t -73337 5891 m -76542 5497 L -76036 3622 75101 2170 73737 1135 c -72367 106 70621 -412 68498 -412 c -65823 -412 63700 412 62136 2058 c -60567 3704 59785 6015 59785 8990 c -59785 12071 60578 14458 62160 16157 c -63747 17857 65799 18709 68328 18709 c -70774 18709 72773 17874 74319 16210 c -75871 14546 76647 12200 76647 9184 c -76647 8996 76642 8720 76630 8355 C -62989 8355 L -63101 6344 63671 4804 64694 3739 c -65717 2669 66987 2134 68516 2134 c -69651 2134 70621 2434 71426 3034 c -72232 3628 72867 4580 73337 5891 C -@c -63159 10907 m -73372 10907 L -73237 12441 72843 13600 72202 14364 c -71215 15558 69933 16157 68363 16157 c -66940 16157 65741 15681 64770 14729 c -63800 13776 63265 12500 63159 10907 C -@c -F -%CHAR: 78106 0 (r) @t -80399 0 m -80399 18292 L -83186 18292 L -83186 15522 L -83897 16816 84556 17674 85162 18086 c -85761 18497 86426 18709 87149 18709 c -88196 18709 89254 18374 90336 17710 C -89266 14829 L -88513 15281 87755 15505 86996 15505 c -86314 15505 85708 15299 85167 14893 c -84627 14482 84244 13917 84015 13194 c -83668 12094 83498 10889 83498 9578 c -83498 0 L -80399 0 L -@c -F -T -@rax 77.74526 649.46268 129.57279 658.60781 @E -[0.00028346 0.00000000 0.00000000 0.00028346 103.59070487 651.44945648] @tm - 0 O 0 @g -0.00 0.00 0.00 1.00 k -e - -% FontChange:/_ArialCE 35278.00000 z -%CHAR: -91177 0 (L) @t --88596 0 m --88596 25253 L --85250 25253 L --85250 2981 L --72815 2981 L --72815 0 L --88596 0 L -@c -F -%CHAR: -71562 0 (B) @t --68981 0 m --68981 25253 L --59503 25253 l --57574 25253 -56028 24994 -54864 24489 c --53694 23977 -52782 23189 -52124 22125 c --51465 21067 -51130 19956 -51130 18791 c --51130 17715 -51424 16698 -52012 15746 c --52594 14793 -53482 14023 -54664 13435 C --53135 12988 -51965 12224 -51142 11148 c --50319 10066 -49907 8790 -49907 7320 c --49907 6138 -50160 5039 -50660 4022 c --51160 3005 -51777 2223 -52512 1670 c --53247 1117 -54170 706 -55275 423 c --56381 141 -57739 0 -59350 0 c --68981 0 L -@c --65635 14640 m --60173 14640 l --58697 14640 -57633 14740 -56986 14934 c --56140 15187 -55499 15605 -55070 16193 c --54640 16781 -54423 17516 -54423 18397 c --54423 19232 -54623 19973 -55022 20608 c --55428 21249 -56004 21684 -56745 21919 c --57492 22155 -58774 22272 -60591 22272 c --65635 22272 L --65635 14640 L -@c --65635 2981 m --59350 2981 l --58268 2981 -57510 3022 -57075 3099 c --56304 3240 -55663 3469 -55146 3792 c --54629 4110 -54205 4580 -53870 5192 c --53541 5809 -53370 6515 -53370 7320 c --53370 8261 -53611 9078 -54094 9778 c --54576 10472 -55246 10960 -56104 11242 c --56957 11518 -58192 11659 -59797 11659 c --65635 11659 L --65635 2981 L -@c -F -%CHAR: -38225 0 (e) @t --23379 5891 m --20174 5497 L --20680 3622 -21615 2170 -22979 1135 c --24349 106 -26095 -412 -28218 -412 c --30893 -412 -33016 412 -34580 2058 c --36149 3704 -36931 6015 -36931 8990 c --36931 12071 -36138 14458 -34556 16157 c --32969 17857 -30917 18709 -28388 18709 c --25942 18709 -23943 17874 -22397 16210 c --20845 14546 -20069 12200 -20069 9184 c --20069 8996 -20074 8720 -20086 8355 C --33727 8355 L --33615 6344 -33045 4804 -32022 3739 c --30999 2669 -29729 2134 -28200 2134 c --27065 2134 -26095 2434 -25290 3034 c --24484 3628 -23849 4580 -23379 5891 C -@c --33557 10907 m --23344 10907 L --23479 12441 -23873 13600 -24514 14364 c --25501 15558 -26783 16157 -28353 16157 c --29776 16157 -30975 15681 -31946 14729 c --32916 13776 -33451 12500 -33557 10907 C -@c -F -%CHAR: -18610 0 (x) @t --18351 0 m --11666 9507 L --17852 18292 L --13977 18292 L --11166 14005 l --10643 13188 -10214 12506 -9896 11953 C --9391 12712 -8926 13382 -8497 13970 c --5416 18292 L --1712 18292 L --8032 9678 L --1230 0 L --5034 0 L --8791 5686 L --9790 7220 L --14594 0 L --18351 0 L -@c -F -%CHAR: -971 0 (p) @t -1357 -7009 m -1357 18292 L -4180 18292 L -4180 15916 L -4844 16845 5597 17545 6437 18009 c -7272 18474 8289 18709 9483 18709 c -11047 18709 12423 18303 13616 17504 c -14816 16698 15715 15563 16321 14099 c -16933 12635 17238 11030 17238 9284 c -17238 7414 16903 5727 16227 4227 c -15557 2728 14581 1582 13299 782 c -12017 -12 10671 -412 9260 -412 c -8225 -412 7302 -194 6479 241 c -5655 676 4985 1229 4456 1893 C -4456 -7009 L -1357 -7009 L -@c -4162 9043 m -4162 6691 4638 4951 5591 3822 c -6543 2699 7702 2134 9054 2134 c -10430 2134 11611 2716 12593 3886 c -13575 5051 14069 6856 14069 9302 c -14069 11636 13587 13376 12629 14540 c -11670 15699 10524 16281 9195 16281 c -7872 16281 6702 15663 5685 14429 c -4668 13194 4162 11395 4162 9043 c -@c -F -%CHAR: 18644 0 (o) @t -19814 9149 m -19814 12535 20755 15046 22642 16675 c -24212 18027 26129 18709 28392 18709 c -30909 18709 32967 17886 34560 16234 c -36160 14587 36953 12312 36953 9407 c -36953 7050 36601 5198 35895 3851 c -35189 2499 34160 1452 32814 706 c -31462 -41 29992 -412 28392 -412 c -25835 -412 23765 406 22184 2052 c -20602 3692 19814 6056 19814 9149 c -@c -23001 9149 m -23001 6803 23512 5051 24535 3886 c -25558 2716 26846 2134 28392 2134 c -29933 2134 31215 2722 32238 3892 c -33255 5062 33767 6850 33767 9249 c -33767 11512 33255 13229 32226 14393 c -31197 15558 29921 16140 28392 16140 c -26846 16140 25558 15558 24535 14399 c -23512 13241 23001 11489 23001 9149 c -@c -F -%CHAR: 38259 0 (r) @t -40552 0 m -40552 18292 L -43339 18292 L -43339 15522 L -44050 16816 44709 17674 45315 18086 c -45914 18497 46579 18709 47302 18709 c -48349 18709 49407 18374 50489 17710 C -49419 14829 L -48666 15281 47908 15505 47149 15505 c -46467 15505 45861 15299 45320 14893 c -44780 14482 44397 13917 44168 13194 c -43821 12094 43651 10889 43651 9578 c -43651 0 L -40552 0 L -@c -F -%CHAR: 50007 0 (t) @t -59103 2775 m -59550 35 L -58680 -147 57898 -241 57210 -241 c -56081 -241 55211 -65 54587 294 c -53970 647 53535 1117 53282 1699 c -53029 2275 52900 3498 52900 5356 c -52900 15881 L -50624 15881 L -50624 18292 L -52900 18292 L -52900 22825 L -55987 24683 L -55987 18292 L -59103 18292 L -59103 15881 L -55987 15881 L -55987 5186 l -55987 4298 56040 3734 56145 3481 c -56257 3228 56433 3028 56680 2875 c -56927 2728 57280 2652 57739 2652 c -58086 2652 58538 2693 59103 2775 C -@c -F -%CHAR: 59814 0 (e) @t -74660 5891 m -77865 5497 L -77359 3622 76424 2170 75060 1135 c -73690 106 71944 -412 69821 -412 c -67146 -412 65023 412 63459 2058 c -61890 3704 61108 6015 61108 8990 c -61108 12071 61901 14458 63483 16157 c -65070 17857 67122 18709 69651 18709 c -72097 18709 74096 17874 75642 16210 c -77194 14546 77970 12200 77970 9184 c -77970 8996 77965 8720 77953 8355 C -64312 8355 L -64424 6344 64994 4804 66017 3739 c -67040 2669 68310 2134 69839 2134 c -70974 2134 71944 2434 72749 3034 c -73555 3628 74190 4580 74660 5891 C -@c -64482 10907 m -74695 10907 L -74560 12441 74166 13600 73525 14364 c -72538 15558 71256 16157 69686 16157 c -68263 16157 67064 15681 66093 14729 c -65123 13776 64588 12500 64482 10907 C -@c -F -%CHAR: 79429 0 (r) @t -81722 0 m -81722 18292 L -84509 18292 L -84509 15522 L -85220 16816 85879 17674 86485 18086 c -87084 18497 87749 18709 88472 18709 c -89519 18709 90577 18374 91659 17710 C -90589 14829 L -89836 15281 89078 15505 88319 15505 c -87637 15505 87031 15299 86490 14893 c -85950 14482 85567 13917 85338 13194 c -84991 12094 84821 10889 84821 9578 c -84821 0 L -81722 0 L -@c -F -T -@rax 382.56463 719.49798 431.18674 738.76139 @E -[0.00028346 0.00000000 0.00000000 0.00028346 406.91989063 731.60302836] @tm - 0 O 0 @g -0.00 0.00 0.00 1.00 k -e - -% FontChange:/_ArialCE 35278.00000 z -%CHAR: -85920 0 (J) @t --84903 7167 m --81887 7579 L --81810 5650 -81446 4327 -80805 3616 c --80158 2905 -79270 2552 -78135 2552 c --77295 2552 -76571 2740 -75966 3128 c --75354 3510 -74937 4033 -74707 4692 c --74478 5356 -74361 6409 -74361 7855 c --74361 25253 L --71021 25253 L --71021 8043 l --71021 5933 -71274 4292 -71785 3134 c --72297 1976 -73108 1094 -74214 482 c --75325 -123 -76624 -429 -78118 -429 c --80334 -429 -82028 206 -83209 1482 c --84385 2758 -84950 4651 -84903 7167 C -@c -F -%CHAR: -68281 0 (P) @t --65559 0 m --65559 25253 L --56034 25253 l --54358 25253 -53076 25171 -52194 25012 c --50954 24806 -49913 24412 -49072 23830 c --48237 23254 -47561 22437 -47050 21396 c --46538 20350 -46285 19203 -46285 17951 c --46285 15805 -46967 13982 -48331 12494 c --49701 11013 -52171 10266 -55740 10266 c --62219 10266 L --62219 0 L --65559 0 L -@c --62219 13247 m --55687 13247 l --53529 13247 -51994 13647 -51089 14452 c --50183 15258 -49731 16387 -49731 17845 c --49731 18903 -49995 19809 -50530 20561 c --51065 21314 -51765 21808 -52641 22049 c --53206 22196 -54240 22272 -55757 22272 c --62219 22272 L --62219 13247 L -@c -F -%CHAR: -35579 0 (P) @t --32857 0 m --32857 25253 L --23332 25253 l --21656 25253 -20374 25171 -19492 25012 c --18252 24806 -17211 24412 -16370 23830 c --15535 23254 -14859 22437 -14348 21396 c --13836 20350 -13583 19203 -13583 17951 c --13583 15805 -14265 13982 -15629 12494 c --16999 11013 -19469 10266 -23038 10266 c --29517 10266 L --29517 0 L --32857 0 L -@c --29517 13247 m --22985 13247 l --20827 13247 -19292 13647 -18387 14452 c --17481 15258 -17029 16387 -17029 17845 c --17029 18903 -17293 19809 -17828 20561 c --18363 21314 -19063 21808 -19939 22049 c --20504 22196 -21538 22272 -23055 22272 c --29517 22272 L --29517 13247 L -@c -F -%CHAR: -12049 0 (r) @t --9756 0 m --9756 18292 L --6969 18292 L --6969 15522 L --6258 16816 -5599 17674 -4993 18086 c --4394 18497 -3729 18709 -3006 18709 c --1959 18709 -901 18374 181 17710 C --889 14829 L --1642 15281 -2400 15505 -3159 15505 c --3841 15505 -4447 15299 -4988 14893 c --5528 14482 -5911 13917 -6140 13194 c --6487 12094 -6657 10889 -6657 9578 c --6657 0 L --9756 0 L -@c -F -%CHAR: -301 0 (i) @t -2039 21684 m -2039 25253 L -5144 25253 L -5144 21684 L -2039 21684 L -@c -2039 0 m -2039 18292 L -5144 18292 L -5144 0 L -2039 0 L -@c -F -%CHAR: 7531 0 (m) @t -9859 0 m -9859 18292 L -12629 18292 L -12629 15728 L -13205 16622 13969 17345 14922 17886 c -15874 18433 16962 18709 18179 18709 c -19531 18709 20643 18427 21507 17862 c -22377 17298 22989 16516 23341 15505 C -24794 17639 26675 18709 28992 18709 c -30809 18709 32202 18203 33178 17198 c -34154 16193 34642 14646 34642 12559 c -34642 0 L -31561 0 L -31561 11524 l -31561 12765 31461 13658 31261 14205 c -31056 14746 30691 15187 30168 15522 c -29639 15852 29015 16022 28304 16022 c -27016 16022 25952 15593 25099 14734 c -24253 13882 23824 12512 23824 10630 c -23824 0 L -20725 0 L -20725 11883 l -20725 13265 20472 14299 19966 14987 c -19461 15675 18638 16022 17485 16022 c -16615 16022 15810 15793 15069 15328 c -14328 14870 13787 14199 13458 13317 c -13123 12430 12958 11154 12958 9490 c -12958 0 L -9859 0 L -@c -F -%CHAR: 36918 0 (a) @t -51182 2258 m -50030 1282 48924 594 47866 188 c -46802 -212 45661 -412 44444 -412 c -42433 -412 40893 76 39811 1058 c -38735 2040 38194 3298 38194 4821 c -38194 5721 38394 6538 38805 7279 c -39211 8020 39746 8614 40405 9061 c -41069 9507 41810 9848 42639 10078 c -43245 10236 44162 10395 45391 10542 c -47895 10842 49742 11195 50923 11612 C -50935 12036 50941 12306 50941 12418 c -50941 13682 50647 14576 50059 15087 c -49271 15793 48089 16140 46531 16140 c -45073 16140 43997 15887 43297 15375 c -42604 14864 42092 13958 41757 12659 C -38729 13076 L -39005 14370 39458 15422 40087 16216 c -40716 17016 41633 17633 42827 18062 c -44021 18492 45402 18709 46978 18709 c -48542 18709 49806 18521 50782 18156 c -51758 17786 52476 17327 52940 16769 c -53399 16210 53716 15511 53904 14658 c -54004 14129 54057 13176 54057 11800 c -54057 7667 l -54057 4780 54122 2957 54257 2199 c -54386 1435 54651 700 55039 0 C -51799 0 L -51482 641 51270 1393 51182 2258 C -@c -50923 9184 m -49794 8720 48107 8331 45861 8008 c -44585 7826 43680 7620 43156 7391 c -42627 7161 42216 6826 41933 6379 c -41645 5938 41498 5450 41498 4910 c -41498 4080 41816 3393 42439 2840 c -43062 2293 43979 2017 45185 2017 c -46378 2017 47443 2275 48372 2799 c -49301 3322 49988 4039 50424 4945 c -50759 5644 50923 6679 50923 8043 c -50923 9184 L -@c -F -%CHAR: 56533 0 (r) @t -58826 0 m -58826 18292 L -61613 18292 L -61613 15522 L -62324 16816 62983 17674 63589 18086 c -64188 18497 64853 18709 65576 18709 c -66623 18709 67681 18374 68763 17710 C -67693 14829 L -66940 15281 66182 15505 65423 15505 c -64741 15505 64135 15299 63594 14893 c -63054 14482 62671 13917 62442 13194 c -62095 12094 61925 10889 61925 9578 c -61925 0 L -58826 0 L -@c -F -%CHAR: 68281 0 (y) @t -70468 -7044 m -70121 -4133 L -70803 -4316 71391 -4410 71897 -4410 c -72585 -4410 73138 -4292 73549 -4063 c -73967 -3834 74302 -3516 74566 -3099 c -74766 -2793 75078 -2023 75513 -794 c -75572 -617 75666 -370 75789 -35 C -68851 18292 L -72191 18292 L -76001 7702 l -76489 6356 76936 4945 77324 3463 C -77683 4886 78106 6274 78600 7632 c -82510 18292 L -85608 18292 L -78653 -312 l -77906 -2322 77324 -3704 76912 -4463 c -76360 -5486 75731 -6232 75019 -6709 c -74302 -7185 73455 -7426 72467 -7426 c -71868 -7426 71203 -7297 70468 -7044 C -@c -F -%CHAR: -61773 -35278 (S) @t --60185 -27164 m --57034 -26888 L --56887 -28152 -56540 -29187 -55993 -29998 c --55446 -30809 -54600 -31462 -53453 -31962 c --52307 -32462 -51013 -32709 -49579 -32709 c --48303 -32709 -47180 -32520 -46204 -32144 c --45228 -31762 -44499 -31245 -44022 -30586 c --43546 -29922 -43305 -29204 -43305 -28422 c --43305 -27629 -43534 -26941 -43999 -26347 c --44457 -25753 -45216 -25259 -46268 -24859 c --46950 -24595 -48444 -24183 -50766 -23625 c --53083 -23066 -54712 -22543 -55641 -22049 c --56846 -21420 -57745 -20632 -58339 -19697 c --58927 -18762 -59221 -17715 -59221 -16551 c --59221 -15281 -58863 -14088 -58139 -12982 c --57416 -11871 -56358 -11030 -54970 -10454 c --53577 -9884 -52036 -9596 -50337 -9596 c --48461 -9596 -46815 -9895 -45380 -10501 c --43952 -11101 -42852 -11989 -42082 -13159 c --41318 -14329 -40900 -15658 -40841 -17139 C --44046 -17380 L --44222 -15787 -44804 -14576 -45798 -13764 c --46792 -12947 -48256 -12541 -50196 -12541 c --52219 -12541 -53688 -12912 -54617 -13653 c --55541 -14393 -56005 -15287 -56005 -16328 c --56005 -17239 -55676 -17986 -55023 -18568 c --54376 -19156 -52701 -19756 -49984 -20367 c --47268 -20985 -45404 -21520 -44393 -21978 c --42923 -22660 -41835 -23519 -41135 -24553 c --40436 -25594 -40089 -26794 -40089 -28146 c --40089 -29492 -40471 -30757 -41241 -31944 c --42011 -33132 -43117 -34055 -44557 -34719 c --45998 -35378 -47621 -35707 -49420 -35707 c --51707 -35707 -53624 -35378 -55164 -34708 c --56711 -34043 -57922 -33044 -58804 -31703 c --59680 -30368 -60144 -28852 -60185 -27164 C -@c -F -%CHAR: -38243 -35278 (t) @t --29147 -32503 m --28700 -35243 L --29570 -35425 -30352 -35519 -31040 -35519 c --32169 -35519 -33039 -35343 -33663 -34984 c --34280 -34631 -34715 -34161 -34968 -33579 c --35221 -33003 -35350 -31780 -35350 -29922 c --35350 -19397 L --37626 -19397 L --37626 -16986 L --35350 -16986 L --35350 -12453 L --32263 -10595 L --32263 -16986 L --29147 -16986 L --29147 -19397 L --32263 -19397 L --32263 -30092 l --32263 -30980 -32210 -31544 -32105 -31797 c --31993 -32050 -31817 -32250 -31570 -32403 c --31323 -32550 -30970 -32626 -30511 -32626 c --30164 -32626 -29712 -32585 -29147 -32503 C -@c -F -%CHAR: -28436 -35278 (o) @t --27266 -26129 m --27266 -22743 -26325 -20232 -24438 -18603 c --22868 -17251 -20951 -16569 -18688 -16569 c --16171 -16569 -14113 -17392 -12520 -19044 c --10920 -20691 -10127 -22966 -10127 -25871 c --10127 -28228 -10479 -30080 -11185 -31427 c --11891 -32779 -12920 -33826 -14266 -34572 c --15618 -35319 -17088 -35690 -18688 -35690 c --21245 -35690 -23315 -34872 -24896 -33226 c --26478 -31586 -27266 -29222 -27266 -26129 c -@c --24079 -26129 m --24079 -28475 -23568 -30227 -22545 -31392 c --21522 -32562 -20234 -33144 -18688 -33144 c --17147 -33144 -15865 -32556 -14842 -31386 c --13825 -30216 -13313 -28428 -13313 -26029 c --13313 -23766 -13825 -22049 -14854 -20885 c --15883 -19720 -17159 -19138 -18688 -19138 c --20234 -19138 -21522 -19720 -22545 -20879 c --23568 -22037 -24079 -23789 -24079 -26129 c -@c -F -%CHAR: -8821 -35278 (r) @t --6528 -35278 m --6528 -16986 L --3741 -16986 L --3741 -19756 L --3030 -18462 -2371 -17604 -1765 -17192 c --1166 -16781 -501 -16569 222 -16569 c -1269 -16569 2327 -16904 3409 -17568 C -2339 -20449 L -1586 -19997 828 -19773 69 -19773 c --613 -19773 -1219 -19979 -1760 -20385 c --2300 -20796 -2683 -21361 -2912 -22084 c --3259 -23184 -3429 -24389 -3429 -25700 c --3429 -35278 L --6528 -35278 L -@c -F -%CHAR: 2927 -35278 (a) @t -17191 -33020 m -16039 -33996 14933 -34684 13875 -35090 c -12811 -35490 11670 -35690 10453 -35690 c -8442 -35690 6902 -35202 5820 -34220 c -4744 -33238 4203 -31980 4203 -30457 c -4203 -29557 4403 -28740 4814 -27999 c -5220 -27258 5755 -26664 6414 -26217 c -7078 -25771 7819 -25430 8648 -25200 c -9254 -25042 10171 -24883 11400 -24736 c -13904 -24436 15751 -24083 16932 -23666 C -16944 -23242 16950 -22972 16950 -22860 c -16950 -21596 16656 -20702 16068 -20191 c -15280 -19485 14098 -19138 12540 -19138 c -11082 -19138 10006 -19391 9306 -19903 c -8613 -20414 8101 -21320 7766 -22619 C -4738 -22202 L -5014 -20908 5467 -19856 6096 -19062 c -6725 -18262 7642 -17645 8836 -17216 c -10030 -16786 11411 -16569 12987 -16569 c -14551 -16569 15815 -16757 16791 -17122 c -17767 -17492 18485 -17951 18949 -18509 c -19408 -19068 19725 -19767 19913 -20620 c -20013 -21149 20066 -22102 20066 -23478 c -20066 -27611 l -20066 -30498 20131 -32321 20266 -33079 c -20395 -33843 20660 -34578 21048 -35278 C -17808 -35278 L -17491 -34637 17279 -33885 17191 -33020 C -@c -16932 -26094 m -15803 -26558 14116 -26947 11870 -27270 c -10594 -27452 9689 -27658 9165 -27887 c -8636 -28117 8225 -28452 7942 -28899 c -7654 -29340 7507 -29828 7507 -30368 c -7507 -31198 7825 -31885 8448 -32438 c -9071 -32985 9988 -33261 11194 -33261 c -12387 -33261 13452 -33003 14381 -32479 c -15310 -31956 15997 -31239 16433 -30333 c -16768 -29634 16932 -28599 16932 -27235 c -16932 -26094 L -@c -F -%CHAR: 22542 -35278 (g) @t -24300 -36795 m -27316 -37242 L -27440 -38171 27793 -38847 28363 -39276 c -29133 -39847 30186 -40135 31514 -40135 c -32955 -40135 34060 -39847 34842 -39276 c -35624 -38700 36148 -37894 36424 -36866 c -36589 -36231 36659 -34908 36647 -32885 C -35295 -34478 33608 -35278 31585 -35278 c -29068 -35278 27122 -34373 25746 -32556 c -24371 -30745 23677 -28563 23677 -26029 c -23677 -24283 23994 -22672 24623 -21196 c -25258 -19720 26176 -18580 27375 -17774 c -28575 -16975 29986 -16569 31603 -16569 c -33760 -16569 35542 -17445 36941 -19191 C -36941 -16986 L -39805 -16986 L -39805 -32797 l -39805 -35643 39511 -37665 38935 -38853 c -38352 -40041 37435 -40981 36177 -41669 c -34919 -42357 33372 -42704 31532 -42704 c -29351 -42704 27587 -42210 26246 -41228 c -24900 -40246 24253 -38771 24300 -36795 C -@c -26864 -25806 m -26864 -28205 27340 -29957 28298 -31056 c -29251 -32162 30444 -32709 31879 -32709 c -33302 -32709 34495 -32162 35460 -31068 c -36424 -29969 36906 -28252 36906 -25906 c -36906 -23666 36412 -21978 35418 -20843 c -34425 -19709 33225 -19138 31826 -19138 c -30450 -19138 29280 -19697 28310 -20820 c -27346 -21937 26864 -23601 26864 -25806 c -@c -F -%CHAR: 42157 -35278 (e) @t -57003 -29387 m -60208 -29781 L -59702 -31656 58767 -33108 57403 -34143 c -56033 -35172 54287 -35690 52164 -35690 c -49489 -35690 47366 -34866 45802 -33220 c -44233 -31574 43451 -29263 43451 -26288 c -43451 -23207 44244 -20820 45826 -19121 c -47413 -17421 49465 -16569 51994 -16569 c -54440 -16569 56439 -17404 57985 -19068 c -59537 -20732 60313 -23078 60313 -26094 c -60313 -26282 60308 -26558 60296 -26923 C -46655 -26923 L -46767 -28934 47337 -30474 48360 -31539 c -49383 -32609 50653 -33144 52182 -33144 c -53317 -33144 54287 -32844 55092 -32244 c -55898 -31650 56533 -30698 57003 -29387 C -@c -46825 -24371 m -57038 -24371 L -56903 -22837 56509 -21678 55868 -20914 c -54881 -19720 53599 -19121 52029 -19121 c -50606 -19121 49407 -19597 48436 -20549 c -47466 -21502 46931 -22778 46825 -24371 C -@c -F -T -@rax 351.82772 790.85083 463.43735 802.11260 @E -[0.00028346 0.00000000 0.00000000 0.00028346 407.84965437 793.37675838] @tm - 0 O 0 @g -0.00 0.00 0.00 1.00 k -e - -% FontChange:/_ArialCE 42333.00000 z -%CHAR: -197633 0 (J) @t --196412 8601 m --192793 9095 L --192701 6780 -192264 5193 -191495 4339 c --190719 3485 -189653 3062 -188292 3062 c --187283 3062 -186415 3288 -185688 3754 c --184954 4212 -184453 4840 -184178 5630 c --183903 6428 -183762 7690 -183762 9426 c --183762 30303 L --179754 30303 L --179754 9652 l --179754 7119 -180058 5151 -180672 3761 c --181285 2371 -182259 1312 -183585 579 c --184919 -148 -186478 -515 -188270 -515 c --190930 -515 -192962 247 -194380 1778 c --195792 3309 -196469 5581 -196412 8601 C -@c -F -%CHAR: -176466 0 (o) @t --175062 10978 m --175062 15042 -173933 18055 -171668 20009 c --169784 21632 -167484 22451 -164768 22451 c --161748 22451 -159279 21463 -157367 19480 c --155448 17505 -154495 14774 -154495 11289 c --154495 8460 -154919 6237 -155765 4621 c --156612 2999 -157847 1743 -159462 847 c --161085 -49 -162849 -494 -164768 -494 c --167837 -494 -170321 487 -172219 2462 c --174117 4431 -175062 7267 -175062 10978 c -@c --171238 10978 m --171238 8163 -170624 6061 -169396 4664 c --168169 3260 -166624 2561 -164768 2561 c --162919 2561 -161381 3267 -160154 4671 c --158933 6075 -158319 8220 -158319 11098 c --158319 13815 -158933 15875 -160168 17272 c --161403 18669 -162934 19367 -164768 19367 c --166624 19367 -168169 18669 -169396 17279 c --170624 15889 -171238 13786 -171238 10978 c -@c -F -%CHAR: -152929 0 (b) @t --146706 0 m --150156 0 L --150156 30303 L --146438 30303 L --146438 19494 L --144865 21463 -142861 22451 -140427 22451 c --139072 22451 -137795 22175 -136588 21632 c --135382 21089 -134394 20320 -133611 19339 c --132835 18351 -132221 17166 -131784 15769 c --131339 14379 -131120 12890 -131120 11310 c --131120 7542 -132052 4635 -133914 2582 c --135770 529 -138007 -494 -140610 -494 c --143199 -494 -145231 586 -146706 2752 C --146706 0 L -@c --146748 11141 m --146748 8509 -146389 6611 -145676 5440 c --144505 3521 -142917 2561 -140921 2561 c --139291 2561 -137887 3267 -136701 4685 c --135516 6096 -134923 8198 -134923 11000 c --134923 13864 -135495 15981 -136631 17342 c --137767 18704 -139143 19389 -140751 19389 c --142381 19389 -143785 18683 -144970 17272 c --146156 15861 -146748 13815 -146748 11141 c -@c -F -%CHAR: -117623 0 (P) @t --114356 0 m --114356 30303 L --102926 30303 l --100916 30303 -99377 30205 -98319 30014 c --96830 29767 -95582 29294 -94573 28596 c --93571 27905 -92759 26924 -92146 25675 c --91532 24419 -91228 23043 -91228 21540 c --91228 18965 -92047 16778 -93684 14993 c --95328 13215 -98291 12319 -102574 12319 c --110349 12319 L --110349 0 L --114356 0 L -@c --110349 15896 m --102510 15896 l --99921 15896 -98079 16376 -96993 17342 c --95906 18309 -95363 19664 -95363 21413 c --95363 22683 -95680 23770 -96322 24673 c --96964 25576 -97804 26169 -98855 26458 c --99533 26635 -100774 26726 -102595 26726 c --110349 26726 L --110349 15896 L -@c -F -%CHAR: -89387 0 (r) @t --86635 0 m --86635 21950 L --83291 21950 L --83291 18627 L --82437 20179 -81647 21209 -80920 21703 c --80201 22197 -79403 22451 -78536 22451 c --77280 22451 -76010 22048 -74712 21251 C --75996 17794 L --76899 18337 -77809 18605 -78719 18605 c --79538 18605 -80264 18358 -80913 17872 c --81562 17378 -82021 16700 -82296 15833 c --82712 14513 -82917 13067 -82917 11493 c --82917 0 L --86635 0 L -@c -F -%CHAR: -75290 0 (o) @t --73886 10978 m --73886 15042 -72757 18055 -70492 20009 c --68608 21632 -66308 22451 -63592 22451 c --60572 22451 -58103 21463 -56191 19480 c --54272 17505 -53319 14774 -53319 11289 c --53319 8460 -53743 6237 -54589 4621 c --55436 2999 -56671 1743 -58286 847 c --59909 -49 -61673 -494 -63592 -494 c --66661 -494 -69145 487 -71043 2462 c --72941 4431 -73886 7267 -73886 10978 c -@c --70062 10978 m --70062 8163 -69448 6061 -68220 4664 c --66993 3260 -65448 2561 -63592 2561 c --61743 2561 -60205 3267 -58978 4671 c --57757 6075 -57143 8220 -57143 11098 c --57143 13815 -57757 15875 -58992 17272 c --60227 18669 -61758 19367 -63592 19367 c --65448 19367 -66993 18669 -68220 17279 c --69448 15889 -70062 13786 -70062 10978 c -@c -F -%CHAR: -51753 0 (v) @t --42863 0 m --51217 21950 L --47287 21950 L --42574 8805 l --42066 7387 -41600 5913 -41170 4381 C --40838 5539 -40380 6929 -39787 8558 c --34904 21950 L --31080 21950 L --39392 0 L --42863 0 L -@c -F -%CHAR: -30586 0 (e) @t --12771 7070 m --8926 6597 L --9532 4346 -10654 2603 -12291 1362 c --13935 127 -16031 -494 -18578 -494 c --21788 -494 -24335 494 -26212 2469 c --28095 4445 -29034 7218 -29034 10788 c --29034 14485 -28081 17349 -26183 19389 c --24278 21428 -21816 22451 -18782 22451 c --15847 22451 -13448 21449 -11593 19452 c --9730 17455 -8799 14640 -8799 11021 c --8799 10795 -8806 10463 -8820 10026 C --25189 10026 L --25054 7613 -24370 5764 -23142 4487 c --21915 3203 -20391 2561 -18556 2561 c --17195 2561 -16031 2921 -15064 3641 c --14097 4353 -13335 5496 -12771 7070 C -@c --24984 13088 m --12729 13088 L --12891 14929 -13364 16319 -14133 17237 c --15318 18669 -16856 19389 -18740 19389 c --20447 19389 -21887 18817 -23051 17674 c --24215 16531 -24857 15000 -24984 13088 C -@c -F -%CHAR: -7049 0 (n) @t --4255 0 m --4255 21950 L --911 21950 L --911 18831 L -705 21244 3033 22451 6074 22451 c -7401 22451 8614 22211 9722 21738 c -10837 21258 11662 20637 12213 19861 c -12770 19092 13151 18175 13377 17117 c -13511 16425 13581 15219 13581 13497 c -13581 0 L -9856 0 L -9856 13356 l -9856 14866 9715 16002 9426 16757 c -9136 17505 8621 18104 7887 18549 c -7147 19000 6286 19226 5291 19226 c -3704 19226 2342 18718 1185 17716 c -35 16707 -537 14802 -537 11987 c --537 0 L --4255 0 L -@c -F -%CHAR: 16488 0 (a) @t -33605 2709 m -32222 1538 30895 713 29625 226 c -28348 -254 26980 -494 25519 -494 c -23106 -494 21258 92 19959 1270 c -18668 2448 18019 3958 18019 5786 c -18019 6865 18259 7846 18753 8735 c -19240 9624 19882 10336 20672 10873 c -21469 11409 22358 11818 23353 12093 c -24080 12284 25180 12474 26655 12651 c -29661 13010 31876 13434 33294 13935 C -33308 14443 33315 14767 33315 14901 c -33315 16418 32963 17491 32257 18104 c -31312 18951 29893 19367 28024 19367 c -26274 19367 24983 19064 24143 18450 c -23311 17836 22697 16750 22295 15190 C -18661 15691 L -18993 17244 19536 18507 20291 19459 c -21046 20419 22147 21159 23579 21674 c -25011 22190 26669 22451 28560 22451 c -30437 22451 31954 22225 33125 21787 c -34296 21343 35157 20793 35714 20122 c -36265 19452 36646 18612 36871 17589 c -36991 16954 37055 15811 37055 14160 c -37055 9200 l -37055 5736 37132 3549 37295 2639 c -37450 1722 37767 840 38233 0 C -34345 0 L -33964 769 33710 1672 33605 2709 C -@c -33294 11021 m -31940 10463 29915 9998 27219 9610 c -25688 9391 24602 9144 23974 8869 c -23339 8594 22845 8191 22506 7655 c -22161 7126 21984 6540 21984 5891 c -21984 4897 22365 4071 23113 3408 c -23861 2752 24962 2420 26408 2420 c -27840 2420 29117 2730 30232 3358 c -31347 3986 32172 4847 32694 5934 c -33097 6773 33294 8015 33294 9652 c -33294 11021 L -@c -F -%CHAR: 40025 0 (n) @t -42819 0 m -42819 21950 L -46163 21950 L -46163 18831 L -47779 21244 50107 22451 53148 22451 c -54475 22451 55688 22211 56796 21738 c -57911 21258 58736 20637 59287 19861 c -59844 19092 60225 18175 60451 17117 c -60585 16425 60655 15219 60655 13497 c -60655 0 L -56930 0 L -56930 13356 l -56930 14866 56789 16002 56500 16757 c -56210 17505 55695 18104 54961 18549 c -54221 19000 53360 19226 52365 19226 c -50778 19226 49416 18718 48259 17716 c -47109 16707 46537 14802 46537 11987 c -46537 0 L -42819 0 L -@c -F -%CHAR: 63562 0 (c) @t -80679 8043 m -84333 7563 L -83938 5045 82915 3069 81264 1644 c -79620 219 77595 -494 75197 -494 c -72198 -494 69778 487 67958 2448 c -66130 4410 65213 7225 65213 10894 c -65213 13264 65608 15339 66391 17117 c -67181 18895 68374 20228 69983 21117 c -71584 22006 73334 22451 75218 22451 c -77602 22451 79557 21844 81067 20637 c -82584 19431 83557 17723 83988 15501 C -80368 14944 L -80022 16418 79416 17526 78541 18274 c -77666 19015 76608 19389 75366 19389 c -73489 19389 71965 18718 70794 17371 c -69623 16030 69037 13906 69037 11000 c -69037 8050 69602 5905 70737 4565 c -71866 3231 73341 2561 75161 2561 c -76622 2561 77835 3013 78816 3909 c -79797 4805 80418 6181 80679 8043 C -@c -F -%CHAR: 84729 0 (e) @t -102544 7070 m -106389 6597 L -105783 4346 104661 2603 103024 1362 c -101380 127 99284 -494 96737 -494 c -93527 -494 90980 494 89103 2469 c -87220 4445 86281 7218 86281 10788 c -86281 14485 87234 17349 89132 19389 c -91037 21428 93499 22451 96533 22451 c -99468 22451 101867 21449 103722 19452 c -105585 17455 106516 14640 106516 11021 c -106516 10795 106509 10463 106495 10026 C -90126 10026 L -90261 7613 90945 5764 92173 4487 c -93400 3203 94924 2561 96759 2561 c -98120 2561 99284 2921 100251 3641 c -101218 4353 101980 5496 102544 7070 C -@c -90331 13088 m -102586 13088 L -102424 14929 101951 16319 101182 17237 c -99997 18669 98459 19389 96575 19389 c -94868 19389 93428 18817 92264 17674 c -91100 16531 90458 15000 90331 13088 C -@c -F -%CHAR: 120035 0 (\050) @t -129934 -8911 m -127881 -6322 126145 -3288 124727 183 c -123309 3662 122596 7253 122596 10978 c -122596 14259 123125 17399 124191 20405 c -125432 23890 127344 27361 129934 30818 C -132601 30818 L -130936 27954 129835 25908 129299 24680 c -128452 22782 127796 20793 127309 18725 c -126717 16150 126420 13561 126420 10957 c -126420 4325 128480 -2293 132601 -8911 C -129934 -8911 L -@c -F -%CHAR: 134132 0 (J) @t -135353 8601 m -138972 9095 L -139064 6780 139501 5193 140270 4339 c -141046 3485 142112 3062 143473 3062 c -144482 3062 145350 3288 146077 3754 c -146811 4212 147312 4840 147587 5630 c -147862 6428 148003 7690 148003 9426 c -148003 30303 L -152011 30303 L -152011 9652 l -152011 7119 151707 5151 151093 3761 c -150480 2371 149506 1312 148180 579 c -146846 -148 145287 -515 143495 -515 c -140835 -515 138803 247 137385 1778 c -135973 3309 135296 5581 135353 8601 C -@c -F -%CHAR: 155299 0 (P) @t -158566 0 m -158566 30303 L -169996 30303 l -172006 30303 173545 30205 174603 30014 c -176092 29767 177340 29294 178349 28596 c -179351 27905 180163 26924 180776 25675 c -181390 24419 181694 23043 181694 21540 c -181694 18965 180875 16778 179238 14993 c -177594 13215 174631 12319 170348 12319 c -162573 12319 L -162573 0 L -158566 0 L -@c -162573 15896 m -170412 15896 l -173001 15896 174843 16376 175929 17342 c -177016 18309 177559 19664 177559 21413 c -177559 22683 177242 23770 176600 24673 c -175958 25576 175118 26169 174067 26458 c -173389 26635 172148 26726 170327 26726 c -162573 26726 L -162573 15896 L -@c -F -%CHAR: 183535 0 (\051) @t -188763 -8911 m -186096 -8911 L -190217 -2293 192277 4325 192277 10957 c -192277 13547 191980 16115 191388 18669 c -190922 20729 190266 22719 189426 24617 c -188890 25858 187782 27926 186096 30818 C -188763 30818 L -191352 27361 193272 23890 194513 20405 c -195572 17399 196101 14259 196101 10978 c -196101 7253 195388 3662 193963 183 c -192538 -3288 190802 -6322 188763 -8911 C -@c -F -T -@rax 104.34898 790.20680 256.66186 801.46857 @E -[0.00028346 0.00000000 0.00000000 0.00028346 180.72254457 792.73272691] @tm - 0 O 0 @g -0.00 0.00 0.00 1.00 k -e - -% FontChange:/_ArialCE 42333.00000 z -%CHAR: -269429 0 (L) @t --266332 0 m --266332 30303 L --262317 30303 L --262317 3577 L --247395 3577 L --247395 0 L --266332 0 L -@c -F -%CHAR: -245892 0 (o) @t --244488 10978 m --244488 15042 -243359 18055 -241094 20009 c --239210 21632 -236910 22451 -234194 22451 c --231174 22451 -228705 21463 -226793 19480 c --224874 17505 -223921 14774 -223921 11289 c --223921 8460 -224345 6237 -225191 4621 c --226038 2999 -227273 1743 -228888 847 c --230511 -49 -232275 -494 -234194 -494 c --237263 -494 -239747 487 -241645 2462 c --243543 4431 -244488 7267 -244488 10978 c -@c --240664 10978 m --240664 8163 -240050 6061 -238822 4664 c --237595 3260 -236050 2561 -234194 2561 c --232345 2561 -230807 3267 -229580 4671 c --228359 6075 -227745 8220 -227745 11098 c --227745 13815 -228359 15875 -229594 17272 c --230829 18669 -232360 19367 -234194 19367 c --236050 19367 -237595 18669 -238822 17279 c --240050 15889 -240664 13786 -240664 10978 c -@c -F -%CHAR: -222355 0 (g) @t --220245 -1820 m --216626 -2357 L --216478 -3471 -216054 -4283 -215370 -4798 c --214446 -5482 -213183 -5828 -211588 -5828 c --209860 -5828 -208533 -5482 -207595 -4798 c --206657 -4106 -206029 -3140 -205697 -1905 c --205499 -1143 -205415 444 -205429 2872 C --207052 960 -209077 0 -211504 0 c --214523 0 -216859 1087 -218510 3267 c --220161 5440 -220993 8057 -220993 11098 c --220993 13194 -220612 15127 -219857 16898 c --219095 18669 -217995 20038 -216555 21004 c --215116 21964 -213423 22451 -211482 22451 c --208893 22451 -206755 21399 -205076 19304 C --205076 21950 L --201640 21950 L --201640 2977 l --201640 -437 -201993 -2865 -202684 -4290 c --203383 -5715 -204483 -6844 -205993 -7669 c --207503 -8495 -209359 -8911 -211567 -8911 c --214185 -8911 -216301 -8318 -217910 -7140 c --219526 -5962 -220302 -4191 -220245 -1820 C -@c --217169 11366 m --217169 8488 -216598 6385 -215448 5066 c --214305 3739 -212872 3083 -211151 3083 c --209443 3083 -208011 3739 -206854 5052 c --205697 6371 -205118 8431 -205118 11246 c --205118 13935 -205711 15960 -206903 17321 c --208096 18683 -209535 19367 -211214 19367 c --212865 19367 -214269 18697 -215434 17349 c --216591 16009 -217169 14012 -217169 11366 c -@c -F -%CHAR: -198818 0 (g) @t --196708 -1820 m --193089 -2357 L --192941 -3471 -192517 -4283 -191833 -4798 c --190909 -5482 -189646 -5828 -188051 -5828 c --186323 -5828 -184996 -5482 -184058 -4798 c --183120 -4106 -182492 -3140 -182160 -1905 c --181962 -1143 -181878 444 -181892 2872 C --183515 960 -185540 0 -187967 0 c --190986 0 -193322 1087 -194973 3267 c --196624 5440 -197456 8057 -197456 11098 c --197456 13194 -197075 15127 -196320 16898 c --195558 18669 -194458 20038 -193018 21004 c --191579 21964 -189886 22451 -187945 22451 c --185356 22451 -183218 21399 -181539 19304 C --181539 21950 L --178103 21950 L --178103 2977 l --178103 -437 -178456 -2865 -179147 -4290 c --179846 -5715 -180946 -6844 -182456 -7669 c --183966 -8495 -185822 -8911 -188030 -8911 c --190648 -8911 -192764 -8318 -194373 -7140 c --195989 -5962 -196765 -4191 -196708 -1820 C -@c --193632 11366 m --193632 8488 -193061 6385 -191911 5066 c --190768 3739 -189335 3083 -187614 3083 c --185906 3083 -184474 3739 -183317 5052 c --182160 6371 -181581 8431 -181581 11246 c --181581 13935 -182174 15960 -183366 17321 c --184559 18683 -185998 19367 -187677 19367 c --189328 19367 -190732 18697 -191897 17349 c --193054 16009 -193632 14012 -193632 11366 c -@c -F -%CHAR: -175281 0 (i) @t --172473 26021 m --172473 30303 L --168748 30303 L --168748 26021 L --172473 26021 L -@c --172473 0 m --172473 21950 L --168748 21950 L --168748 0 L --172473 0 L -@c -F -%CHAR: -165883 0 (n) @t --163089 0 m --163089 21950 L --159745 21950 L --159745 18831 L --158129 21244 -155801 22451 -152760 22451 c --151433 22451 -150220 22211 -149112 21738 c --147997 21258 -147172 20637 -146621 19861 c --146064 19092 -145683 18175 -145457 17117 c --145323 16425 -145253 15219 -145253 13497 c --145253 0 L --148978 0 L --148978 13356 l --148978 14866 -149119 16002 -149408 16757 c --149698 17505 -150213 18104 -150947 18549 c --151687 19000 -152548 19226 -153543 19226 c --155130 19226 -156492 18718 -157649 17716 c --158799 16707 -159371 14802 -159371 11987 c --159371 0 L --163089 0 L -@c -F -%CHAR: -142346 0 (g) @t --140236 -1820 m --136617 -2357 L --136469 -3471 -136045 -4283 -135361 -4798 c --134437 -5482 -133174 -5828 -131579 -5828 c --129851 -5828 -128524 -5482 -127586 -4798 c --126648 -4106 -126020 -3140 -125688 -1905 c --125490 -1143 -125406 444 -125420 2872 C --127043 960 -129068 0 -131495 0 c --134514 0 -136850 1087 -138501 3267 c --140152 5440 -140984 8057 -140984 11098 c --140984 13194 -140603 15127 -139848 16898 c --139086 18669 -137986 20038 -136546 21004 c --135107 21964 -133414 22451 -131473 22451 c --128884 22451 -126746 21399 -125067 19304 C --125067 21950 L --121631 21950 L --121631 2977 l --121631 -437 -121984 -2865 -122675 -4290 c --123374 -5715 -124474 -6844 -125984 -7669 c --127494 -8495 -129350 -8911 -131558 -8911 c --134176 -8911 -136292 -8318 -137901 -7140 c --139517 -5962 -140293 -4191 -140236 -1820 C -@c --137160 11366 m --137160 8488 -136589 6385 -135439 5066 c --134296 3739 -132863 3083 -131142 3083 c --129434 3083 -128002 3739 -126845 5052 c --125688 6371 -125109 8431 -125109 11246 c --125109 13935 -125702 15960 -126894 17321 c --128087 18683 -129526 19367 -131205 19367 c --132856 19367 -134260 18697 -135425 17349 c --136582 16009 -137160 14012 -137160 11366 c -@c -F -%CHAR: -107040 0 (&) @t --86925 3577 m --88152 2208 -89493 1185 -90939 508 c --92386 -176 -93952 -515 -95631 -515 c --98729 -515 -101191 529 -103011 2625 c --104486 4332 -105220 6244 -105220 8354 c --105220 10223 -104620 11917 -103413 13427 c --102207 14936 -100408 16263 -98009 17406 C --99371 18972 -100281 20249 -100732 21230 c --101191 22204 -101417 23149 -101417 24059 c --101417 25880 -100704 27460 -99279 28808 c --97854 30148 -96055 30818 -93896 30818 c --91828 30818 -90135 30183 -88816 28920 c --87503 27651 -86847 26127 -86847 24349 c --86847 21470 -88752 19008 -92569 16968 C --87136 10047 L --86516 11261 -86029 12665 -85690 14259 C --81824 13434 L --82487 10788 -83376 8615 -84512 6907 C --83115 5059 -81541 3507 -79778 2251 C --82275 -706 L --83778 261 -85330 1686 -86925 3577 C -@c --94495 19367 m --92880 20320 -91835 21152 -91363 21872 c --90883 22585 -90650 23375 -90650 24250 c --90650 25280 -90975 26127 -91631 26776 c --92287 27432 -93098 27763 -94079 27763 c --95088 27763 -95921 27439 -96591 26790 c --97261 26141 -97593 25350 -97593 24412 c --97593 23946 -97473 23452 -97233 22930 c --96993 22415 -96626 21872 -96146 21293 c --94495 19367 L -@c --89260 6512 m --96083 14965 L --98094 13765 -99455 12651 -100154 11627 c --100859 10597 -101212 9581 -101212 8579 c --101212 7352 -100718 6075 -99745 4755 c --98764 3429 -97381 2773 -95589 2773 c --94474 2773 -93317 3119 -92125 3817 c --90932 4508 -89980 5412 -89260 6512 C -@c -F -%CHAR: -67035 0 (B) @t --63938 0 m --63938 30303 L --52564 30303 l --50250 30303 -48394 29993 -46997 29386 c --45593 28772 -44500 27827 -43710 26550 c --42919 25280 -42517 23946 -42517 22549 c --42517 21258 -42870 20038 -43575 18895 c --44274 17752 -45339 16827 -46757 16122 C --44923 15586 -43519 14668 -42531 13377 c --41543 12079 -41050 10548 -41050 8784 c --41050 7366 -41353 6047 -41953 4826 c --42552 3605 -43293 2667 -44175 2004 c --45057 1341 -46165 847 -47491 508 c --48818 169 -50448 0 -52381 0 c --63938 0 L -@c --59923 17568 m --53368 17568 l --51598 17568 -50321 17688 -49544 17921 c --48528 18224 -47759 18725 -47244 19431 c --46729 20136 -46468 21018 -46468 22077 c --46468 23079 -46708 23968 -47188 24730 c --47675 25499 -48366 26021 -49255 26303 c --50151 26585 -51689 26726 -53869 26726 c --59923 26726 L --59923 17568 L -@c --59923 3577 m --52381 3577 l --51083 3577 -50172 3627 -49650 3718 c --48726 3888 -47957 4163 -47336 4551 c --46715 4932 -46207 5496 -45805 6230 c --45410 6971 -45205 7817 -45205 8784 c --45205 9913 -45495 10894 -46073 11733 c --46652 12566 -47456 13151 -48486 13490 c --49509 13822 -50991 13991 -52917 13991 c --59923 13991 L --59923 3577 L -@c -F -%CHAR: -38799 0 (o) @t --37395 10978 m --37395 15042 -36266 18055 -34001 20009 c --32117 21632 -29817 22451 -27101 22451 c --24081 22451 -21612 21463 -19700 19480 c --17781 17505 -16828 14774 -16828 11289 c --16828 8460 -17252 6237 -18098 4621 c --18945 2999 -20180 1743 -21795 847 c --23418 -49 -25182 -494 -27101 -494 c --30170 -494 -32654 487 -34552 2462 c --36450 4431 -37395 7267 -37395 10978 c -@c --33571 10978 m --33571 8163 -32957 6061 -31729 4664 c --30502 3260 -28957 2561 -27101 2561 c --25252 2561 -23714 3267 -22487 4671 c --21266 6075 -20652 8220 -20652 11098 c --20652 13815 -21266 15875 -22501 17272 c --23736 18669 -25267 19367 -27101 19367 c --28957 19367 -30502 18669 -31729 17279 c --32957 15889 -33571 13786 -33571 10978 c -@c -F -%CHAR: -15262 0 (o) @t --13858 10978 m --13858 15042 -12729 18055 -10464 20009 c --8580 21632 -6280 22451 -3564 22451 c --544 22451 1925 21463 3837 19480 c -5756 17505 6709 14774 6709 11289 c -6709 8460 6285 6237 5439 4621 c -4592 2999 3357 1743 1742 847 c -119 -49 -1645 -494 -3564 -494 c --6633 -494 -9117 487 -11015 2462 c --12913 4431 -13858 7267 -13858 10978 c -@c --10034 10978 m --10034 8163 -9420 6061 -8192 4664 c --6965 3260 -5420 2561 -3564 2561 c --1715 2561 -177 3267 1050 4671 c -2271 6075 2885 8220 2885 11098 c -2885 13815 2271 15875 1036 17272 c --199 18669 -1730 19367 -3564 19367 c --5420 19367 -6965 18669 -8192 17279 c --9420 15889 -10034 13786 -10034 10978 c -@c -F -%CHAR: 8275 0 (k) @t -11083 0 m -11083 30303 L -14808 30303 L -14808 13024 L -23614 21950 L -28426 21950 L -20037 13808 L -29279 0 L -24686 0 L -17433 11225 L -14808 8699 L -14808 0 L -11083 0 L -@c -F -%CHAR: 29442 0 (k) @t -32250 0 m -32250 30303 L -35975 30303 L -35975 13024 L -44781 21950 L -49593 21950 L -41204 13808 L -50446 0 L -45853 0 L -38600 11225 L -35975 8699 L -35975 0 L -32250 0 L -@c -F -%CHAR: 50609 0 (e) @t -68424 7070 m -72269 6597 L -71663 4346 70541 2603 68904 1362 c -67260 127 65164 -494 62617 -494 c -59407 -494 56860 494 54983 2469 c -53100 4445 52161 7218 52161 10788 c -52161 14485 53114 17349 55012 19389 c -56917 21428 59379 22451 62413 22451 c -65348 22451 67747 21449 69602 19452 c -71465 17455 72396 14640 72396 11021 c -72396 10795 72389 10463 72375 10026 C -56006 10026 L -56141 7613 56825 5764 58053 4487 c -59280 3203 60804 2561 62639 2561 c -64000 2561 65164 2921 66131 3641 c -67098 4353 67860 5496 68424 7070 C -@c -56211 13088 m -68466 13088 L -68304 14929 67831 16319 67062 17237 c -65877 18669 64339 19389 62455 19389 c -60748 19389 59308 18817 58144 17674 c -56980 16531 56338 15000 56211 13088 C -@c -F -%CHAR: 74146 0 (e) @t -91961 7070 m -95806 6597 L -95200 4346 94078 2603 92441 1362 c -90797 127 88701 -494 86154 -494 c -82944 -494 80397 494 78520 2469 c -76637 4445 75698 7218 75698 10788 c -75698 14485 76651 17349 78549 19389 c -80454 21428 82916 22451 85950 22451 c -88885 22451 91284 21449 93139 19452 c -95002 17455 95933 14640 95933 11021 c -95933 10795 95926 10463 95912 10026 C -79543 10026 L -79678 7613 80362 5764 81590 4487 c -82817 3203 84341 2561 86176 2561 c -87537 2561 88701 2921 89668 3641 c -90635 4353 91397 5496 91961 7070 C -@c -79748 13088 m -92003 13088 L -91841 14929 91368 16319 90599 17237 c -89414 18669 87876 19389 85992 19389 c -84285 19389 82845 18817 81681 17674 c -80517 16531 79875 15000 79748 13088 C -@c -F -%CHAR: 97683 0 (p) @t -100477 -8410 m -100477 21950 L -103864 21950 L -103864 19099 L -104661 20214 105564 21054 106573 21611 c -107575 22168 108795 22451 110228 22451 c -112104 22451 113755 21964 115188 21004 c -116627 20038 117707 18676 118433 16919 c -119167 15162 119534 13236 119534 11141 c -119534 8897 119132 6872 118320 5073 c -117516 3274 116345 1898 114807 938 c -113269 -14 111653 -494 109960 -494 c -108718 -494 107610 -233 106622 289 c -105635 811 104830 1475 104195 2272 C -104195 -8410 L -100477 -8410 L -@c -103842 10851 m -103842 8029 104414 5941 105557 4586 c -106700 3238 108090 2561 109713 2561 c -111364 2561 112782 3260 113960 4664 c -115138 6061 115731 8227 115731 11162 c -115731 13963 115152 16051 114002 17448 c -112852 18838 111477 19537 109882 19537 c -108294 19537 106890 18796 105670 17314 c -104449 15833 103842 13674 103842 10851 c -@c -F -%CHAR: 121220 0 (i) @t -124028 26021 m -124028 30303 L -127753 30303 L -127753 26021 L -124028 26021 L -@c -124028 0 m -124028 21950 L -127753 21950 L -127753 0 L -124028 0 L -@c -F -%CHAR: 130618 0 (n) @t -133412 0 m -133412 21950 L -136756 21950 L -136756 18831 L -138372 21244 140700 22451 143741 22451 c -145068 22451 146281 22211 147389 21738 c -148504 21258 149329 20637 149880 19861 c -150437 19092 150818 18175 151044 17117 c -151178 16425 151248 15219 151248 13497 c -151248 0 L -147523 0 L -147523 13356 l -147523 14866 147382 16002 147093 16757 c -146803 17505 146288 18104 145554 18549 c -144814 19000 143953 19226 142958 19226 c -141371 19226 140009 18718 138852 17716 c -137702 16707 137130 14802 137130 11987 c -137130 0 L -133412 0 L -@c -F -%CHAR: 154155 0 (g) @t -156265 -1820 m -159884 -2357 L -160032 -3471 160456 -4283 161140 -4798 c -162064 -5482 163327 -5828 164922 -5828 c -166650 -5828 167977 -5482 168915 -4798 c -169853 -4106 170481 -3140 170813 -1905 c -171011 -1143 171095 444 171081 2872 C -169458 960 167433 0 165006 0 c -161987 0 159651 1087 158000 3267 c -156349 5440 155517 8057 155517 11098 c -155517 13194 155898 15127 156653 16898 c -157415 18669 158515 20038 159955 21004 c -161394 21964 163087 22451 165028 22451 c -167617 22451 169755 21399 171434 19304 C -171434 21950 L -174870 21950 L -174870 2977 l -174870 -437 174517 -2865 173826 -4290 c -173127 -5715 172027 -6844 170517 -7669 c -169007 -8495 167151 -8911 164943 -8911 c -162325 -8911 160209 -8318 158600 -7140 c -156984 -5962 156208 -4191 156265 -1820 C -@c -159341 11366 m -159341 8488 159912 6385 161062 5066 c -162205 3739 163638 3083 165359 3083 c -167067 3083 168499 3739 169656 5052 c -170813 6371 171392 8431 171392 11246 c -171392 13935 170799 15960 169607 17321 c -168414 18683 166975 19367 165296 19367 c -163645 19367 162241 18697 161076 17349 c -159919 16009 159341 14012 159341 11366 c -@c -F -%CHAR: 189461 0 (\050) @t -199360 -8911 m -197307 -6322 195571 -3288 194153 183 c -192735 3662 192022 7253 192022 10978 c -192022 14259 192551 17399 193617 20405 c -194858 23890 196770 27361 199360 30818 C -202027 30818 L -200362 27954 199261 25908 198725 24680 c -197878 22782 197222 20793 196735 18725 c -196143 16150 195846 13561 195846 10957 c -195846 4325 197906 -2293 202027 -8911 C -199360 -8911 L -@c -F -%CHAR: 203558 0 (L) @t -206655 0 m -206655 30303 L -210670 30303 L -210670 3577 L -225592 3577 L -225592 0 L -206655 0 L -@c -F -%CHAR: 227095 0 (B) @t -230192 0 m -230192 30303 L -241566 30303 l -243880 30303 245736 29993 247133 29386 c -248537 28772 249630 27827 250420 26550 c -251211 25280 251613 23946 251613 22549 c -251613 21258 251260 20038 250555 18895 c -249856 17752 248791 16827 247373 16122 C -249207 15586 250611 14668 251599 13377 c -252587 12079 253080 10548 253080 8784 c -253080 7366 252777 6047 252177 4826 c -251578 3605 250837 2667 249955 2004 c -249073 1341 247965 847 246639 508 c -245312 169 243682 0 241749 0 c -230192 0 L -@c -234207 17568 m -240762 17568 l -242532 17568 243809 17688 244586 17921 c -245602 18224 246371 18725 246886 19431 c -247401 20136 247662 21018 247662 22077 c -247662 23079 247422 23968 246942 24730 c -246455 25499 245764 26021 244875 26303 c -243979 26585 242441 26726 240261 26726 c -234207 26726 L -234207 17568 L -@c -234207 3577 m -241749 3577 l -243047 3577 243958 3627 244480 3718 c -245404 3888 246173 4163 246794 4551 c -247415 4932 247923 5496 248325 6230 c -248720 6971 248925 7817 248925 8784 c -248925 9913 248635 10894 248057 11733 c -247478 12566 246674 13151 245644 13490 c -244621 13822 243139 13991 241213 13991 c -234207 13991 L -234207 3577 L -@c -F -%CHAR: 255331 0 (\051) @t -260559 -8911 m -257892 -8911 L -262013 -2293 264073 4325 264073 10957 c -264073 13547 263776 16115 263184 18669 c -262718 20729 262062 22719 261222 24617 c -260686 25858 259578 27926 257892 30818 C -260559 30818 L -263148 27361 265068 23890 266309 20405 c -267368 17399 267897 14259 267897 10978 c -267897 7253 267184 3662 265759 183 c -264334 -3288 262598 -6322 260559 -8911 C -@c -F -T -@rax 61.18186 683.53512 92.87858 698.94850 @E -[0.00028346 0.00000000 0.00000000 0.00028346 77.18966647 693.12441559] @tm - 0 O 0 @g -0.00 0.00 0.00 1.00 k -e - -% FontChange:/_ArialCE 28222.00000 z -%CHAR: -17244 0 (\050) @t --10645 -5941 m --12014 -4214 -13171 -2192 -14116 122 c --15061 2441 -15537 4835 -15537 7319 c --15537 9506 -15184 11599 -14474 13603 c --13646 15927 -12371 18241 -10645 20546 C --8867 20546 L --9977 18636 -10711 17272 -11068 16453 c --11633 15188 -12070 13862 -12395 12484 c --12790 10767 -12987 9040 -12987 7305 c --12987 2883 -11614 -1529 -8867 -5941 C --10645 -5941 L -@c -F -%CHAR: -7846 0 (1) @t -2667 0 m -188 0 L -188 15804 L --410 15235 -1190 14666 -2159 14097 c --3133 13528 -4003 13100 -4775 12817 C --4775 15212 L --3387 15865 -2173 16656 -1134 17582 c --99 18514 639 19412 1072 20287 C -2667 20287 L -2667 0 L -@c -F -%CHAR: 7845 0 (\051) @t -11330 -5941 m -9552 -5941 L -12299 -1529 13673 2883 13673 7305 c -13673 9031 13475 10743 13080 12446 c -12770 13819 12332 15146 11773 16411 c -11415 17239 10677 18617 9552 20546 C -11330 20546 L -13057 18241 14336 15927 15164 13603 c -15869 11599 16222 9506 16222 7319 c -16222 4835 15747 2441 14797 122 c -13847 -2192 12690 -4214 11330 -5941 C -@c -F -%CHAR: -56472 -28222 (L) @t --54407 -28222 m --54407 -8020 L --51731 -8020 L --51731 -25837 L --41782 -25837 L --41782 -28222 L --54407 -28222 L -@c -F -%CHAR: -40781 -28222 (B) @t --38716 -28222 m --38716 -8020 L --31134 -8020 l --29591 -8020 -28354 -8227 -27423 -8631 c --26487 -9040 -25757 -9671 -25231 -10522 c --24704 -11369 -24436 -12258 -24436 -13189 c --24436 -14050 -24671 -14864 -25141 -15626 c --25607 -16388 -26317 -17004 -27263 -17474 C --26040 -17832 -25104 -18443 -24445 -19304 c --23787 -20169 -23457 -21190 -23457 -22366 c --23457 -23311 -23660 -24191 -24059 -25005 c --24459 -25818 -24953 -26444 -25541 -26886 c --26129 -27328 -26868 -27658 -27752 -27883 c --28636 -28109 -29723 -28222 -31011 -28222 c --38716 -28222 L -@c --36040 -16510 m --31670 -16510 l --30489 -16510 -29638 -16430 -29121 -16275 c --28443 -16072 -27931 -15738 -27587 -15268 c --27244 -14798 -27070 -14210 -27070 -13504 c --27070 -12836 -27230 -12244 -27550 -11736 c --27874 -11223 -28335 -10875 -28928 -10687 c --29525 -10499 -30551 -10405 -32004 -10405 c --36040 -10405 L --36040 -16510 L -@c --36040 -25837 m --31011 -25837 l --30146 -25837 -29539 -25804 -29191 -25743 c --28575 -25630 -28062 -25447 -27648 -25188 c --27234 -24934 -26896 -24558 -26628 -24069 c --26364 -23575 -26228 -23010 -26228 -22366 c --26228 -21613 -26421 -20960 -26806 -20400 c --27192 -19845 -27728 -19454 -28415 -19229 c --29097 -19008 -30085 -18895 -31369 -18895 c --36040 -18895 L --36040 -25837 L -@c -F -%CHAR: -14111 -28222 (d) @t --2756 -28222 m --2756 -26373 L --3683 -27827 -5047 -28551 -6849 -28551 c --8015 -28551 -9087 -28231 -10066 -27587 c --11044 -26947 -11801 -26049 -12342 -24892 c --12879 -23739 -13147 -22418 -13147 -20917 c --13147 -19459 -12902 -18133 -12418 -16943 c --11928 -15753 -11199 -14840 -10226 -14210 c --9252 -13575 -8161 -13255 -6957 -13255 c --6077 -13255 -5292 -13443 -4605 -13815 c --3913 -14186 -3354 -14671 -2921 -15268 C --2921 -8020 L --456 -8020 L --456 -28222 L --2756 -28222 L -@c --10597 -20917 m --10597 -22794 -10202 -24196 -9412 -25122 c --8622 -26049 -7690 -26515 -6613 -26515 c --5532 -26515 -4610 -26068 -3852 -25183 c --3095 -24299 -2714 -22944 -2714 -21124 c --2714 -19120 -3100 -17653 -3871 -16717 c --4643 -15776 -5593 -15310 -6726 -15310 c --7827 -15310 -8749 -15762 -9487 -16660 c --10226 -17559 -10597 -18979 -10597 -20917 c -@c -F -%CHAR: 1580 -28222 (u) @t -13033 -28222 m -13033 -26072 L -11890 -27728 10343 -28551 8386 -28551 c -7525 -28551 6716 -28387 5969 -28057 c -5221 -27728 4666 -27309 4303 -26811 c -3937 -26308 3683 -25696 3537 -24972 c -3438 -24483 3386 -23711 3386 -22653 c -3386 -13589 L -5865 -13589 L -5865 -21703 l -5865 -23001 5917 -23871 6016 -24323 c -6175 -24976 6505 -25484 7008 -25861 c -7516 -26232 8142 -26416 8885 -26416 c -9628 -26416 10324 -26228 10978 -25847 c -11632 -25466 12093 -24944 12361 -24290 c -12634 -23631 12770 -22676 12770 -21430 c -12770 -13589 L -15249 -13589 L -15249 -28222 L -13033 -28222 L -@c -F -%CHAR: 17271 -28222 (m) @t -19134 -28222 m -19134 -13589 L -21349 -13589 L -21349 -15640 L -21810 -14925 22422 -14346 23184 -13913 c -23946 -13476 24816 -13255 25789 -13255 c -26871 -13255 27760 -13481 28452 -13932 c -29148 -14384 29637 -15009 29919 -15818 C -31081 -14111 32586 -13255 34439 -13255 c -35893 -13255 37008 -13659 37788 -14464 c -38569 -15268 38960 -16505 38960 -18175 c -38960 -28222 L -36495 -28222 L -36495 -19003 l -36495 -18010 36415 -17295 36255 -16858 c -36090 -16425 35799 -16072 35380 -15804 c -34957 -15541 34458 -15405 33889 -15405 c -32859 -15405 32008 -15748 31326 -16435 c -30648 -17117 30305 -18213 30305 -19718 c -30305 -28222 L -27826 -28222 L -27826 -18716 l -27826 -17611 27624 -16783 27219 -16232 c -26815 -15682 26156 -15405 25234 -15405 c -24538 -15405 23894 -15588 23301 -15960 c -22708 -16326 22276 -16863 22012 -17568 c -21744 -18278 21612 -19299 21612 -20630 c -21612 -28222 L -19134 -28222 L -@c -F -%CHAR: 40780 -28222 (p) @t -42643 -33829 m -42643 -13589 L -44900 -13589 L -44900 -15489 L -45432 -14746 46034 -14186 46707 -13815 c -47375 -13443 48188 -13255 49143 -13255 c -50394 -13255 51495 -13579 52450 -14219 c -53409 -14864 54129 -15771 54613 -16943 c -55103 -18114 55347 -19398 55347 -20795 c -55347 -22291 55079 -23641 54538 -24840 c -54002 -26039 53221 -26957 52196 -27596 c -51170 -28231 50093 -28551 48964 -28551 c -48137 -28551 47398 -28377 46740 -28029 c -46081 -27681 45545 -27239 45121 -26707 C -45121 -33829 L -42643 -33829 L -@c -44886 -20988 m -44886 -22869 45267 -24262 46029 -25165 c -46791 -26063 47718 -26515 48800 -26515 c -49900 -26515 50846 -26049 51631 -25113 c -52417 -24182 52812 -22738 52812 -20781 c -52812 -18913 52426 -17521 51660 -16590 c -50893 -15663 49976 -15198 48913 -15198 c -47854 -15198 46918 -15691 46105 -16679 c -45291 -17667 44886 -19106 44886 -20988 c -@c -F -T -@rax 152.97392 719.68365 211.35260 735.19172 @E -[0.00028346 0.00000000 0.00000000 0.00028346 182.31731617 729.36762686] @tm - 0 O 0 @g -0.00 0.00 0.00 1.00 k -e - -% FontChange:/_ArialCE 28222.00000 z -%CHAR: -17244 0 (\050) @t --10645 -5941 m --12014 -4214 -13171 -2192 -14116 122 c --15061 2441 -15537 4835 -15537 7319 c --15537 9506 -15184 11599 -14474 13603 c --13646 15927 -12371 18241 -10645 20546 C --8867 20546 L --9977 18636 -10711 17272 -11068 16453 c --11633 15188 -12070 13862 -12395 12484 c --12790 10767 -12987 9040 -12987 7305 c --12987 2883 -11614 -1529 -8867 -5941 C --10645 -5941 L -@c -F -%CHAR: -7846 0 (2) @t -6364 2385 m -6364 0 L --6990 0 L --7009 597 -6915 1171 -6703 1722 c --6364 2634 -5819 3528 -5071 4412 c --4318 5292 -3236 6312 -1825 7469 c -371 9271 1858 10696 2629 11750 c -3400 12799 3786 13796 3786 14732 c -3786 15715 3433 16543 2733 17220 c -2027 17893 1110 18231 -19 18231 c --1214 18231 -2169 17874 -2884 17154 c --3603 16439 -3965 15447 -3975 14182 C --6524 14440 L --6350 16345 -5692 17794 -4553 18791 c --3415 19788 -1882 20287 37 20287 c -1975 20287 3509 19746 4638 18674 c -5771 17596 6336 16265 6336 14675 c -6336 13866 6171 13071 5837 12291 c -5508 11510 4957 10687 4191 9826 c -3424 8960 2149 7775 367 6270 c --1120 5019 -2075 4172 -2498 3725 c --2921 3283 -3269 2836 -3547 2385 C -6364 2385 L -@c -F -%CHAR: 7845 0 (\051) @t -11330 -5941 m -9552 -5941 L -12299 -1529 13673 2883 13673 7305 c -13673 9031 13475 10743 13080 12446 c -12770 13819 12332 15146 11773 16411 c -11415 17239 10677 18617 9552 20546 C -11330 20546 L -13057 18241 14336 15927 15164 13603 c -15869 11599 16222 9506 16222 7319 c -16222 4835 15747 2441 14797 122 c -13847 -2192 12690 -4214 11330 -5941 C -@c -F -%CHAR: -103517 -28222 (J) @t --102703 -22488 m --100290 -22159 L --100229 -23702 -99938 -24760 -99425 -25329 c --98907 -25898 -98197 -26181 -97289 -26181 c --96617 -26181 -96038 -26030 -95554 -25720 c --95065 -25414 -94731 -24995 -94547 -24468 c --94364 -23937 -94270 -23095 -94270 -21938 c --94270 -8020 L --91598 -8020 L --91598 -21787 l --91598 -23476 -91800 -24788 -92209 -25715 c --92619 -26642 -93268 -27347 -94152 -27836 c --95041 -28321 -96081 -28565 -97275 -28565 c --99049 -28565 -100403 -28057 -101349 -27037 c --102289 -26016 -102741 -24501 -102703 -22488 C -@c -F -%CHAR: -89406 -28222 (o) @t --88470 -20903 m --88470 -18194 -87717 -16185 -86208 -14882 c --84952 -13801 -83418 -13255 -81607 -13255 c --79594 -13255 -77948 -13913 -76673 -15235 c --75394 -16552 -74759 -18373 -74759 -20696 c --74759 -22582 -75041 -24064 -75605 -25141 c --76170 -26223 -76993 -27060 -78070 -27658 c --79152 -28255 -80328 -28551 -81607 -28551 c --83653 -28551 -85309 -27897 -86574 -26580 c --87840 -25268 -88470 -23377 -88470 -20903 c -@c --85921 -20903 m --85921 -22780 -85511 -24182 -84693 -25113 c --83874 -26049 -82844 -26515 -81607 -26515 c --80375 -26515 -79350 -26044 -78531 -25108 c --77717 -24172 -77308 -22742 -77308 -20823 c --77308 -19012 -77717 -17639 -78541 -16707 c --79364 -15776 -80384 -15310 -81607 -15310 c --82844 -15310 -83874 -15776 -84693 -16703 c --85511 -17629 -85921 -19031 -85921 -20903 c -@c -F -%CHAR: -73715 -28222 (b) @t --69566 -28222 m --71866 -28222 L --71866 -8020 L --69388 -8020 L --69388 -15226 L --68339 -13913 -67003 -13255 -65380 -13255 c --64477 -13255 -63626 -13438 -62821 -13801 c --62017 -14163 -61358 -14675 -60836 -15329 c --60319 -15988 -59910 -16778 -59618 -17709 c --59322 -18636 -59176 -19628 -59176 -20682 c --59176 -23194 -59797 -25132 -61039 -26500 c --62276 -27869 -63767 -28551 -65502 -28551 c --67229 -28551 -68583 -27832 -69566 -26388 C --69566 -28222 L -@c --69595 -20795 m --69595 -22549 -69355 -23815 -68880 -24595 c --68099 -25875 -67040 -26515 -65709 -26515 c --64623 -26515 -63687 -26044 -62897 -25099 c --62106 -24158 -61711 -22756 -61711 -20889 c --61711 -18979 -62092 -17568 -62850 -16660 c --63607 -15753 -64524 -15296 -65596 -15296 c --66683 -15296 -67619 -15767 -68409 -16707 c --69199 -17648 -69595 -19012 -69595 -20795 c -@c -F -%CHAR: -50178 -28222 (r) @t --48344 -28222 m --48344 -13589 L --46114 -13589 L --46114 -15804 L --45545 -14770 -45018 -14083 -44534 -13754 c --44054 -13424 -43522 -13255 -42944 -13255 c --42107 -13255 -41260 -13523 -40394 -14055 C --41250 -16359 L --41853 -15997 -42459 -15818 -43066 -15818 c --43612 -15818 -44096 -15983 -44529 -16308 c --44962 -16637 -45267 -17088 -45451 -17667 c --45728 -18547 -45865 -19511 -45865 -20560 c --45865 -28222 L --48344 -28222 L -@c -F -%CHAR: -40780 -28222 (e) @t --28903 -23509 m --26340 -23824 L --26744 -25325 -27492 -26486 -28583 -27314 c --29679 -28137 -31076 -28551 -32774 -28551 c --34915 -28551 -36613 -27893 -37864 -26576 c --39120 -25259 -39745 -23410 -39745 -21030 c --39745 -18565 -39110 -16656 -37845 -15296 c --36575 -13937 -34933 -13255 -32911 -13255 c --30954 -13255 -29355 -13923 -28118 -15254 c --26876 -16585 -26255 -18462 -26255 -20875 c --26255 -21025 -26260 -21246 -26269 -21538 C --37182 -21538 L --37092 -23147 -36636 -24379 -35818 -25230 c --34999 -26087 -33983 -26515 -32760 -26515 c --31852 -26515 -31076 -26275 -30432 -25795 c --29788 -25320 -29280 -24558 -28903 -23509 C -@c --37045 -19497 m --28875 -19497 L --28983 -18269 -29298 -17342 -29811 -16731 c --30601 -15776 -31627 -15296 -32883 -15296 c --34021 -15296 -34980 -15677 -35756 -16439 c --36533 -17201 -36961 -18222 -37045 -19497 C -@c -F -%CHAR: -25089 -28222 (g) @t --23683 -29436 m --21270 -29793 L --21171 -30536 -20889 -31077 -20432 -31420 c --19816 -31877 -18974 -32107 -17911 -32107 c --16759 -32107 -15875 -31877 -15249 -31420 c --14623 -30960 -14205 -30315 -13984 -29492 c --13852 -28984 -13795 -27926 -13805 -26308 C --14887 -27582 -16237 -28222 -17855 -28222 c --19868 -28222 -21425 -27498 -22526 -26044 c --23626 -24595 -24181 -22850 -24181 -20823 c --24181 -19426 -23927 -18137 -23424 -16957 c --22916 -15776 -22182 -14864 -21223 -14219 c --20263 -13579 -19134 -13255 -17841 -13255 c --16114 -13255 -14689 -13956 -13570 -15353 C --13570 -13589 L --11279 -13589 L --11279 -26237 l --11279 -28514 -11514 -30132 -11975 -31082 c --12441 -32032 -13175 -32785 -14181 -33335 c --15188 -33885 -16425 -34163 -17897 -34163 c --19642 -34163 -21053 -33768 -22126 -32982 c --23203 -32197 -23720 -31016 -23683 -29436 C -@c --21632 -20644 m --21632 -22563 -21251 -23965 -20484 -24845 c --19722 -25729 -18767 -26166 -17620 -26166 c --16481 -26166 -15526 -25729 -14755 -24854 c --13984 -23975 -13598 -22601 -13598 -20724 c --13598 -18932 -13993 -17582 -14788 -16674 c --15583 -15767 -16542 -15310 -17662 -15310 c --18763 -15310 -19699 -15757 -20475 -16656 c --21246 -17549 -21632 -18881 -21632 -20644 c -@c -F -%CHAR: -9398 -28222 (i) @t --7526 -10875 m --7526 -8020 L --5042 -8020 L --5042 -10875 L --7526 -10875 L -@c --7526 -28222 m --7526 -13589 L --5042 -13589 L --5042 -28222 L --7526 -28222 L -@c -F -%CHAR: -3133 -28222 (s) @t --2263 -23852 m -188 -23467 L -324 -24450 710 -25202 1340 -25729 c -1966 -26251 2845 -26515 3979 -26515 c -5117 -26515 5964 -26279 6514 -25818 c -7065 -25353 7342 -24807 7342 -24186 c -7342 -23622 7097 -23184 6608 -22860 c -6270 -22639 5423 -22361 4073 -22023 c -2257 -21562 992 -21166 291 -20828 c --410 -20494 -946 -20028 -1308 -19436 c --1670 -18843 -1854 -18189 -1854 -17474 c --1854 -16820 -1703 -16218 -1402 -15663 c --1106 -15103 -697 -14643 -184 -14276 c -202 -13993 729 -13749 1392 -13551 c -2060 -13354 2775 -13255 3537 -13255 c -4684 -13255 5691 -13424 6561 -13754 c -7431 -14083 8071 -14530 8485 -15094 c -8899 -15663 9181 -16416 9336 -17361 C -6914 -17695 L -6801 -16943 6481 -16355 5954 -15931 c -5428 -15508 4680 -15296 3716 -15296 c -2577 -15296 1764 -15484 1279 -15861 c -790 -16237 545 -16679 545 -17182 c -545 -17507 649 -17794 851 -18053 c -1053 -18321 1368 -18537 1801 -18716 c -2050 -18805 2780 -19017 3993 -19346 c -5748 -19817 6970 -20198 7662 -20499 c -8358 -20795 8904 -21232 9299 -21801 c -9694 -22371 9891 -23076 9891 -23923 c -9891 -24751 9647 -25527 9167 -26261 c -8683 -26990 7986 -27554 7079 -27954 c -6171 -28354 5141 -28551 3993 -28551 c -2088 -28551 639 -28156 -358 -27366 c --1355 -26576 -1990 -25405 -2263 -23852 C -@c -F -%CHAR: 10978 -28222 (t) @t -18255 -26002 m -18612 -28194 L -17916 -28340 17290 -28415 16740 -28415 c -15837 -28415 15141 -28274 14642 -27987 c -14148 -27705 13800 -27328 13598 -26863 c -13396 -26402 13292 -25423 13292 -23937 c -13292 -15517 L -11472 -15517 L -11472 -13589 L -13292 -13589 L -13292 -9962 L -15762 -8476 L -15762 -13589 L -18255 -13589 L -18255 -15517 L -15762 -15517 L -15762 -24073 l -15762 -24784 15804 -25235 15889 -25437 c -15978 -25640 16119 -25800 16317 -25922 c -16514 -26039 16796 -26101 17163 -26101 c -17441 -26101 17803 -26068 18255 -26002 C -@c -F -%CHAR: 18824 -28222 (r) @t -20658 -28222 m -20658 -13589 L -22888 -13589 L -22888 -15804 L -23457 -14770 23984 -14083 24468 -13754 c -24948 -13424 25480 -13255 26058 -13255 c -26895 -13255 27742 -13523 28608 -14055 C -27752 -16359 L -27149 -15997 26543 -15818 25936 -15818 c -25390 -15818 24906 -15983 24473 -16308 c -24040 -16637 23735 -17088 23551 -17667 c -23274 -18547 23137 -19511 23137 -20560 c -23137 -28222 L -20658 -28222 L -@c -F -%CHAR: 28222 -28222 (a) @t -39633 -26416 m -38711 -27197 37827 -27747 36980 -28071 c -36129 -28391 35216 -28551 34243 -28551 c -32634 -28551 31402 -28161 30536 -27375 c -29675 -26590 29243 -25583 29243 -24365 c -29243 -23645 29403 -22992 29732 -22399 c -30056 -21806 30484 -21331 31011 -20974 c -31543 -20616 32135 -20343 32799 -20160 c -33283 -20033 34017 -19906 35000 -19788 c -37004 -19548 38481 -19266 39426 -18932 C -39436 -18594 39440 -18377 39440 -18288 c -39440 -17277 39205 -16562 38735 -16152 c -38104 -15588 37159 -15310 35912 -15310 c -34746 -15310 33885 -15513 33325 -15922 c -32770 -16331 32361 -17055 32093 -18095 C -29671 -17761 L -29892 -16726 30254 -15884 30757 -15249 c -31261 -14610 31994 -14116 32949 -13772 c -33904 -13429 35009 -13255 36270 -13255 c -37521 -13255 38532 -13405 39313 -13697 c -40094 -13993 40668 -14360 41039 -14807 c -41406 -15254 41660 -15814 41811 -16496 c -41891 -16919 41933 -17681 41933 -18782 c -41933 -22088 l -41933 -24398 41985 -25856 42093 -26463 c -42197 -27074 42408 -27662 42719 -28222 C -40127 -28222 L -39873 -27709 39704 -27107 39633 -26416 C -@c -39426 -20875 m -38523 -21246 37173 -21557 35376 -21816 c -34356 -21961 33631 -22126 33213 -22309 c -32789 -22493 32460 -22761 32234 -23119 c -32004 -23471 31886 -23862 31886 -24294 c -31886 -24958 32140 -25508 32639 -25950 c -33137 -26388 33871 -26609 34835 -26609 c -35790 -26609 36642 -26402 37385 -25983 c -38128 -25564 38678 -24991 39026 -24266 c -39294 -23706 39426 -22879 39426 -21787 c -39426 -20875 L -@c -F -%CHAR: 43913 -28222 (t) @t -51190 -26002 m -51547 -28194 L -50851 -28340 50225 -28415 49675 -28415 c -48772 -28415 48076 -28274 47577 -27987 c -47083 -27705 46735 -27328 46533 -26863 c -46331 -26402 46227 -25423 46227 -23937 c -46227 -15517 L -44407 -15517 L -44407 -13589 L -46227 -13589 L -46227 -9962 L -48697 -8476 L -48697 -13589 L -51190 -13589 L -51190 -15517 L -48697 -15517 L -48697 -24073 l -48697 -24784 48739 -25235 48824 -25437 c -48913 -25640 49054 -25800 49252 -25922 c -49449 -26039 49731 -26101 50098 -26101 c -50376 -26101 50738 -26068 51190 -26002 C -@c -F -%CHAR: 51759 -28222 (i) @t -53631 -10875 m -53631 -8020 L -56115 -8020 L -56115 -10875 L -53631 -10875 L -@c -53631 -28222 m -53631 -13589 L -56115 -13589 L -56115 -28222 L -53631 -28222 L -@c -F -%CHAR: 58024 -28222 (o) @t -58960 -20903 m -58960 -18194 59713 -16185 61222 -14882 c -62478 -13801 64012 -13255 65823 -13255 c -67836 -13255 69482 -13913 70757 -15235 c -72036 -16552 72671 -18373 72671 -20696 c -72671 -22582 72389 -24064 71825 -25141 c -71260 -26223 70437 -27060 69360 -27658 c -68278 -28255 67102 -28551 65823 -28551 c -63777 -28551 62121 -27897 60856 -26580 c -59590 -25268 58960 -23377 58960 -20903 c -@c -61509 -20903 m -61509 -22780 61919 -24182 62737 -25113 c -63556 -26049 64586 -26515 65823 -26515 c -67055 -26515 68080 -26044 68899 -25108 c -69713 -24172 70122 -22742 70122 -20823 c -70122 -19012 69713 -17639 68889 -16707 c -68066 -15776 67046 -15310 65823 -15310 c -64586 -15310 63556 -15776 62737 -16703 c -61919 -17629 61509 -19031 61509 -20903 c -@c -F -%CHAR: 73715 -28222 (n) @t -75578 -28222 m -75578 -13589 L -77807 -13589 L -77807 -15668 L -78884 -14059 80437 -13255 82464 -13255 c -83348 -13255 84157 -13415 84896 -13730 c -85639 -14050 86189 -14464 86556 -14981 c -86928 -15494 87182 -16105 87332 -16811 c -87421 -17272 87469 -18076 87469 -19224 c -87469 -28222 L -84985 -28222 L -84985 -19318 l -84985 -18311 84891 -17554 84698 -17051 c -84505 -16552 84162 -16152 83673 -15856 c -83179 -15555 82605 -15405 81942 -15405 c -80883 -15405 79976 -15743 79204 -16411 c -78437 -17084 78056 -18354 78056 -20230 c -78056 -28222 L -75578 -28222 L -@c -F -%CHAR: 89406 -28222 (s) @t -90276 -23852 m -92727 -23467 L -92863 -24450 93249 -25202 93879 -25729 c -94505 -26251 95384 -26515 96518 -26515 c -97656 -26515 98503 -26279 99053 -25818 c -99604 -25353 99881 -24807 99881 -24186 c -99881 -23622 99636 -23184 99147 -22860 c -98809 -22639 97962 -22361 96612 -22023 c -94796 -21562 93531 -21166 92830 -20828 c -92129 -20494 91593 -20028 91231 -19436 c -90869 -18843 90685 -18189 90685 -17474 c -90685 -16820 90836 -16218 91137 -15663 c -91433 -15103 91842 -14643 92355 -14276 c -92741 -13993 93268 -13749 93931 -13551 c -94599 -13354 95314 -13255 96076 -13255 c -97223 -13255 98230 -13424 99100 -13754 c -99970 -14083 100610 -14530 101024 -15094 c -101438 -15663 101720 -16416 101875 -17361 C -99453 -17695 L -99340 -16943 99020 -16355 98493 -15931 c -97967 -15508 97219 -15296 96255 -15296 c -95116 -15296 94303 -15484 93818 -15861 c -93329 -16237 93084 -16679 93084 -17182 c -93084 -17507 93188 -17794 93390 -18053 c -93592 -18321 93907 -18537 94340 -18716 c -94589 -18805 95319 -19017 96532 -19346 c -98287 -19817 99509 -20198 100201 -20499 c -100897 -20795 101443 -21232 101838 -21801 c -102233 -22371 102430 -23076 102430 -23923 c -102430 -24751 102186 -25527 101706 -26261 c -101222 -26990 100525 -27554 99618 -27954 c -98710 -28354 97680 -28551 96532 -28551 c -94627 -28551 93178 -28156 92181 -27366 c -91184 -26576 90549 -25405 90276 -23852 C -@c -F -T -@rax 280.53468 711.58025 338.91335 727.08831 @E -[0.00028346 0.00000000 0.00000000 0.00028346 309.87806740 721.26422558] @tm - 0 O 0 @g -0.00 0.00 0.00 1.00 k -e - -% FontChange:/_ArialCE 28222.00000 z -%CHAR: -17244 0 (\050) @t --10645 -5941 m --12014 -4214 -13171 -2192 -14116 122 c --15061 2441 -15537 4835 -15537 7319 c --15537 9506 -15184 11599 -14474 13603 c --13646 15927 -12371 18241 -10645 20546 C --8867 20546 L --9977 18636 -10711 17272 -11068 16453 c --11633 15188 -12070 13862 -12395 12484 c --12790 10767 -12987 9040 -12987 7305 c --12987 2883 -11614 -1529 -8867 -5941 C --10645 -5941 L -@c -F -%CHAR: -7846 0 (4) @t -1274 0 m -1274 4835 L --7489 4835 L --7489 7112 L -1731 20202 L -3758 20202 L -3758 7112 L -6486 7112 L -6486 4835 L -3758 4835 L -3758 0 L -1274 0 L -@c -1274 7112 m -1274 16218 L --5047 7112 L -1274 7112 L -@c -F -%CHAR: 7845 0 (\051) @t -11330 -5941 m -9552 -5941 L -12299 -1529 13673 2883 13673 7305 c -13673 9031 13475 10743 13080 12446 c -12770 13819 12332 15146 11773 16411 c -11415 17239 10677 18617 9552 20546 C -11330 20546 L -13057 18241 14336 15927 15164 13603 c -15869 11599 16222 9506 16222 7319 c -16222 4835 15747 2441 14797 122 c -13847 -2192 12690 -4214 11330 -5941 C -@c -F -%CHAR: -103517 -28222 (J) @t --102703 -22488 m --100290 -22159 L --100229 -23702 -99938 -24760 -99425 -25329 c --98907 -25898 -98197 -26181 -97289 -26181 c --96617 -26181 -96038 -26030 -95554 -25720 c --95065 -25414 -94731 -24995 -94547 -24468 c --94364 -23937 -94270 -23095 -94270 -21938 c --94270 -8020 L --91598 -8020 L --91598 -21787 l --91598 -23476 -91800 -24788 -92209 -25715 c --92619 -26642 -93268 -27347 -94152 -27836 c --95041 -28321 -96081 -28565 -97275 -28565 c --99049 -28565 -100403 -28057 -101349 -27037 c --102289 -26016 -102741 -24501 -102703 -22488 C -@c -F -%CHAR: -89406 -28222 (o) @t --88470 -20903 m --88470 -18194 -87717 -16185 -86208 -14882 c --84952 -13801 -83418 -13255 -81607 -13255 c --79594 -13255 -77948 -13913 -76673 -15235 c --75394 -16552 -74759 -18373 -74759 -20696 c --74759 -22582 -75041 -24064 -75605 -25141 c --76170 -26223 -76993 -27060 -78070 -27658 c --79152 -28255 -80328 -28551 -81607 -28551 c --83653 -28551 -85309 -27897 -86574 -26580 c --87840 -25268 -88470 -23377 -88470 -20903 c -@c --85921 -20903 m --85921 -22780 -85511 -24182 -84693 -25113 c --83874 -26049 -82844 -26515 -81607 -26515 c --80375 -26515 -79350 -26044 -78531 -25108 c --77717 -24172 -77308 -22742 -77308 -20823 c --77308 -19012 -77717 -17639 -78541 -16707 c --79364 -15776 -80384 -15310 -81607 -15310 c --82844 -15310 -83874 -15776 -84693 -16703 c --85511 -17629 -85921 -19031 -85921 -20903 c -@c -F -%CHAR: -73715 -28222 (b) @t --69566 -28222 m --71866 -28222 L --71866 -8020 L --69388 -8020 L --69388 -15226 L --68339 -13913 -67003 -13255 -65380 -13255 c --64477 -13255 -63626 -13438 -62821 -13801 c --62017 -14163 -61358 -14675 -60836 -15329 c --60319 -15988 -59910 -16778 -59618 -17709 c --59322 -18636 -59176 -19628 -59176 -20682 c --59176 -23194 -59797 -25132 -61039 -26500 c --62276 -27869 -63767 -28551 -65502 -28551 c --67229 -28551 -68583 -27832 -69566 -26388 C --69566 -28222 L -@c --69595 -20795 m --69595 -22549 -69355 -23815 -68880 -24595 c --68099 -25875 -67040 -26515 -65709 -26515 c --64623 -26515 -63687 -26044 -62897 -25099 c --62106 -24158 -61711 -22756 -61711 -20889 c --61711 -18979 -62092 -17568 -62850 -16660 c --63607 -15753 -64524 -15296 -65596 -15296 c --66683 -15296 -67619 -15767 -68409 -16707 c --69199 -17648 -69595 -19012 -69595 -20795 c -@c -F -%CHAR: -50178 -28222 (r) @t --48344 -28222 m --48344 -13589 L --46114 -13589 L --46114 -15804 L --45545 -14770 -45018 -14083 -44534 -13754 c --44054 -13424 -43522 -13255 -42944 -13255 c --42107 -13255 -41260 -13523 -40394 -14055 C --41250 -16359 L --41853 -15997 -42459 -15818 -43066 -15818 c --43612 -15818 -44096 -15983 -44529 -16308 c --44962 -16637 -45267 -17088 -45451 -17667 c --45728 -18547 -45865 -19511 -45865 -20560 c --45865 -28222 L --48344 -28222 L -@c -F -%CHAR: -40780 -28222 (e) @t --28903 -23509 m --26340 -23824 L --26744 -25325 -27492 -26486 -28583 -27314 c --29679 -28137 -31076 -28551 -32774 -28551 c --34915 -28551 -36613 -27893 -37864 -26576 c --39120 -25259 -39745 -23410 -39745 -21030 c --39745 -18565 -39110 -16656 -37845 -15296 c --36575 -13937 -34933 -13255 -32911 -13255 c --30954 -13255 -29355 -13923 -28118 -15254 c --26876 -16585 -26255 -18462 -26255 -20875 c --26255 -21025 -26260 -21246 -26269 -21538 C --37182 -21538 L --37092 -23147 -36636 -24379 -35818 -25230 c --34999 -26087 -33983 -26515 -32760 -26515 c --31852 -26515 -31076 -26275 -30432 -25795 c --29788 -25320 -29280 -24558 -28903 -23509 C -@c --37045 -19497 m --28875 -19497 L --28983 -18269 -29298 -17342 -29811 -16731 c --30601 -15776 -31627 -15296 -32883 -15296 c --34021 -15296 -34980 -15677 -35756 -16439 c --36533 -17201 -36961 -18222 -37045 -19497 C -@c -F -%CHAR: -25089 -28222 (g) @t --23683 -29436 m --21270 -29793 L --21171 -30536 -20889 -31077 -20432 -31420 c --19816 -31877 -18974 -32107 -17911 -32107 c --16759 -32107 -15875 -31877 -15249 -31420 c --14623 -30960 -14205 -30315 -13984 -29492 c --13852 -28984 -13795 -27926 -13805 -26308 C --14887 -27582 -16237 -28222 -17855 -28222 c --19868 -28222 -21425 -27498 -22526 -26044 c --23626 -24595 -24181 -22850 -24181 -20823 c --24181 -19426 -23927 -18137 -23424 -16957 c --22916 -15776 -22182 -14864 -21223 -14219 c --20263 -13579 -19134 -13255 -17841 -13255 c --16114 -13255 -14689 -13956 -13570 -15353 C --13570 -13589 L --11279 -13589 L --11279 -26237 l --11279 -28514 -11514 -30132 -11975 -31082 c --12441 -32032 -13175 -32785 -14181 -33335 c --15188 -33885 -16425 -34163 -17897 -34163 c --19642 -34163 -21053 -33768 -22126 -32982 c --23203 -32197 -23720 -31016 -23683 -29436 C -@c --21632 -20644 m --21632 -22563 -21251 -23965 -20484 -24845 c --19722 -25729 -18767 -26166 -17620 -26166 c --16481 -26166 -15526 -25729 -14755 -24854 c --13984 -23975 -13598 -22601 -13598 -20724 c --13598 -18932 -13993 -17582 -14788 -16674 c --15583 -15767 -16542 -15310 -17662 -15310 c --18763 -15310 -19699 -15757 -20475 -16656 c --21246 -17549 -21632 -18881 -21632 -20644 c -@c -F -%CHAR: -9398 -28222 (i) @t --7526 -10875 m --7526 -8020 L --5042 -8020 L --5042 -10875 L --7526 -10875 L -@c --7526 -28222 m --7526 -13589 L --5042 -13589 L --5042 -28222 L --7526 -28222 L -@c -F -%CHAR: -3133 -28222 (s) @t --2263 -23852 m -188 -23467 L -324 -24450 710 -25202 1340 -25729 c -1966 -26251 2845 -26515 3979 -26515 c -5117 -26515 5964 -26279 6514 -25818 c -7065 -25353 7342 -24807 7342 -24186 c -7342 -23622 7097 -23184 6608 -22860 c -6270 -22639 5423 -22361 4073 -22023 c -2257 -21562 992 -21166 291 -20828 c --410 -20494 -946 -20028 -1308 -19436 c --1670 -18843 -1854 -18189 -1854 -17474 c --1854 -16820 -1703 -16218 -1402 -15663 c --1106 -15103 -697 -14643 -184 -14276 c -202 -13993 729 -13749 1392 -13551 c -2060 -13354 2775 -13255 3537 -13255 c -4684 -13255 5691 -13424 6561 -13754 c -7431 -14083 8071 -14530 8485 -15094 c -8899 -15663 9181 -16416 9336 -17361 C -6914 -17695 L -6801 -16943 6481 -16355 5954 -15931 c -5428 -15508 4680 -15296 3716 -15296 c -2577 -15296 1764 -15484 1279 -15861 c -790 -16237 545 -16679 545 -17182 c -545 -17507 649 -17794 851 -18053 c -1053 -18321 1368 -18537 1801 -18716 c -2050 -18805 2780 -19017 3993 -19346 c -5748 -19817 6970 -20198 7662 -20499 c -8358 -20795 8904 -21232 9299 -21801 c -9694 -22371 9891 -23076 9891 -23923 c -9891 -24751 9647 -25527 9167 -26261 c -8683 -26990 7986 -27554 7079 -27954 c -6171 -28354 5141 -28551 3993 -28551 c -2088 -28551 639 -28156 -358 -27366 c --1355 -26576 -1990 -25405 -2263 -23852 C -@c -F -%CHAR: 10978 -28222 (t) @t -18255 -26002 m -18612 -28194 L -17916 -28340 17290 -28415 16740 -28415 c -15837 -28415 15141 -28274 14642 -27987 c -14148 -27705 13800 -27328 13598 -26863 c -13396 -26402 13292 -25423 13292 -23937 c -13292 -15517 L -11472 -15517 L -11472 -13589 L -13292 -13589 L -13292 -9962 L -15762 -8476 L -15762 -13589 L -18255 -13589 L -18255 -15517 L -15762 -15517 L -15762 -24073 l -15762 -24784 15804 -25235 15889 -25437 c -15978 -25640 16119 -25800 16317 -25922 c -16514 -26039 16796 -26101 17163 -26101 c -17441 -26101 17803 -26068 18255 -26002 C -@c -F -%CHAR: 18824 -28222 (r) @t -20658 -28222 m -20658 -13589 L -22888 -13589 L -22888 -15804 L -23457 -14770 23984 -14083 24468 -13754 c -24948 -13424 25480 -13255 26058 -13255 c -26895 -13255 27742 -13523 28608 -14055 C -27752 -16359 L -27149 -15997 26543 -15818 25936 -15818 c -25390 -15818 24906 -15983 24473 -16308 c -24040 -16637 23735 -17088 23551 -17667 c -23274 -18547 23137 -19511 23137 -20560 c -23137 -28222 L -20658 -28222 L -@c -F -%CHAR: 28222 -28222 (a) @t -39633 -26416 m -38711 -27197 37827 -27747 36980 -28071 c -36129 -28391 35216 -28551 34243 -28551 c -32634 -28551 31402 -28161 30536 -27375 c -29675 -26590 29243 -25583 29243 -24365 c -29243 -23645 29403 -22992 29732 -22399 c -30056 -21806 30484 -21331 31011 -20974 c -31543 -20616 32135 -20343 32799 -20160 c -33283 -20033 34017 -19906 35000 -19788 c -37004 -19548 38481 -19266 39426 -18932 C -39436 -18594 39440 -18377 39440 -18288 c -39440 -17277 39205 -16562 38735 -16152 c -38104 -15588 37159 -15310 35912 -15310 c -34746 -15310 33885 -15513 33325 -15922 c -32770 -16331 32361 -17055 32093 -18095 C -29671 -17761 L -29892 -16726 30254 -15884 30757 -15249 c -31261 -14610 31994 -14116 32949 -13772 c -33904 -13429 35009 -13255 36270 -13255 c -37521 -13255 38532 -13405 39313 -13697 c -40094 -13993 40668 -14360 41039 -14807 c -41406 -15254 41660 -15814 41811 -16496 c -41891 -16919 41933 -17681 41933 -18782 c -41933 -22088 l -41933 -24398 41985 -25856 42093 -26463 c -42197 -27074 42408 -27662 42719 -28222 C -40127 -28222 L -39873 -27709 39704 -27107 39633 -26416 C -@c -39426 -20875 m -38523 -21246 37173 -21557 35376 -21816 c -34356 -21961 33631 -22126 33213 -22309 c -32789 -22493 32460 -22761 32234 -23119 c -32004 -23471 31886 -23862 31886 -24294 c -31886 -24958 32140 -25508 32639 -25950 c -33137 -26388 33871 -26609 34835 -26609 c -35790 -26609 36642 -26402 37385 -25983 c -38128 -25564 38678 -24991 39026 -24266 c -39294 -23706 39426 -22879 39426 -21787 c -39426 -20875 L -@c -F -%CHAR: 43913 -28222 (t) @t -51190 -26002 m -51547 -28194 L -50851 -28340 50225 -28415 49675 -28415 c -48772 -28415 48076 -28274 47577 -27987 c -47083 -27705 46735 -27328 46533 -26863 c -46331 -26402 46227 -25423 46227 -23937 c -46227 -15517 L -44407 -15517 L -44407 -13589 L -46227 -13589 L -46227 -9962 L -48697 -8476 L -48697 -13589 L -51190 -13589 L -51190 -15517 L -48697 -15517 L -48697 -24073 l -48697 -24784 48739 -25235 48824 -25437 c -48913 -25640 49054 -25800 49252 -25922 c -49449 -26039 49731 -26101 50098 -26101 c -50376 -26101 50738 -26068 51190 -26002 C -@c -F -%CHAR: 51759 -28222 (i) @t -53631 -10875 m -53631 -8020 L -56115 -8020 L -56115 -10875 L -53631 -10875 L -@c -53631 -28222 m -53631 -13589 L -56115 -13589 L -56115 -28222 L -53631 -28222 L -@c -F -%CHAR: 58024 -28222 (o) @t -58960 -20903 m -58960 -18194 59713 -16185 61222 -14882 c -62478 -13801 64012 -13255 65823 -13255 c -67836 -13255 69482 -13913 70757 -15235 c -72036 -16552 72671 -18373 72671 -20696 c -72671 -22582 72389 -24064 71825 -25141 c -71260 -26223 70437 -27060 69360 -27658 c -68278 -28255 67102 -28551 65823 -28551 c -63777 -28551 62121 -27897 60856 -26580 c -59590 -25268 58960 -23377 58960 -20903 c -@c -61509 -20903 m -61509 -22780 61919 -24182 62737 -25113 c -63556 -26049 64586 -26515 65823 -26515 c -67055 -26515 68080 -26044 68899 -25108 c -69713 -24172 70122 -22742 70122 -20823 c -70122 -19012 69713 -17639 68889 -16707 c -68066 -15776 67046 -15310 65823 -15310 c -64586 -15310 63556 -15776 62737 -16703 c -61919 -17629 61509 -19031 61509 -20903 c -@c -F -%CHAR: 73715 -28222 (n) @t -75578 -28222 m -75578 -13589 L -77807 -13589 L -77807 -15668 L -78884 -14059 80437 -13255 82464 -13255 c -83348 -13255 84157 -13415 84896 -13730 c -85639 -14050 86189 -14464 86556 -14981 c -86928 -15494 87182 -16105 87332 -16811 c -87421 -17272 87469 -18076 87469 -19224 c -87469 -28222 L -84985 -28222 L -84985 -19318 l -84985 -18311 84891 -17554 84698 -17051 c -84505 -16552 84162 -16152 83673 -15856 c -83179 -15555 82605 -15405 81942 -15405 c -80883 -15405 79976 -15743 79204 -16411 c -78437 -17084 78056 -18354 78056 -20230 c -78056 -28222 L -75578 -28222 L -@c -F -%CHAR: 89406 -28222 (s) @t -90276 -23852 m -92727 -23467 L -92863 -24450 93249 -25202 93879 -25729 c -94505 -26251 95384 -26515 96518 -26515 c -97656 -26515 98503 -26279 99053 -25818 c -99604 -25353 99881 -24807 99881 -24186 c -99881 -23622 99636 -23184 99147 -22860 c -98809 -22639 97962 -22361 96612 -22023 c -94796 -21562 93531 -21166 92830 -20828 c -92129 -20494 91593 -20028 91231 -19436 c -90869 -18843 90685 -18189 90685 -17474 c -90685 -16820 90836 -16218 91137 -15663 c -91433 -15103 91842 -14643 92355 -14276 c -92741 -13993 93268 -13749 93931 -13551 c -94599 -13354 95314 -13255 96076 -13255 c -97223 -13255 98230 -13424 99100 -13754 c -99970 -14083 100610 -14530 101024 -15094 c -101438 -15663 101720 -16416 101875 -17361 C -99453 -17695 L -99340 -16943 99020 -16355 98493 -15931 c -97967 -15508 97219 -15296 96255 -15296 c -95116 -15296 94303 -15484 93818 -15861 c -93329 -16237 93084 -16679 93084 -17182 c -93084 -17507 93188 -17794 93390 -18053 c -93592 -18321 93907 -18537 94340 -18716 c -94589 -18805 95319 -19017 96532 -19346 c -98287 -19817 99509 -20198 100201 -20499 c -100897 -20795 101443 -21232 101838 -21801 c -102233 -22371 102430 -23076 102430 -23923 c -102430 -24751 102186 -25527 101706 -26261 c -101222 -26990 100525 -27554 99618 -27954 c -98710 -28354 97680 -28551 96532 -28551 c -94627 -28551 93178 -28156 92181 -27366 c -91184 -26576 90549 -25405 90276 -23852 C -@c -F -T -@rax 156.50306 660.68107 192.21024 676.09446 @E -[0.00028346 0.00000000 0.00000000 0.00028346 174.51070228 670.27036918] @tm - 0 O 0 @g -0.00 0.00 0.00 1.00 k -e - -% FontChange:/_ArialCE 28222.00000 z -%CHAR: -17244 0 (\050) @t --10645 -5941 m --12014 -4214 -13171 -2192 -14116 122 c --15061 2441 -15537 4835 -15537 7319 c --15537 9506 -15184 11599 -14474 13603 c --13646 15927 -12371 18241 -10645 20546 C --8867 20546 L --9977 18636 -10711 17272 -11068 16453 c --11633 15188 -12070 13862 -12395 12484 c --12790 10767 -12987 9040 -12987 7305 c --12987 2883 -11614 -1529 -8867 -5941 C --10645 -5941 L -@c -F -%CHAR: -7846 0 (3) @t --6661 5334 m --4182 5663 L --3895 4257 -3410 3246 -2728 2625 c --2042 2004 -1209 1693 -226 1693 c -940 1693 1928 2098 2733 2907 c -3532 3716 3937 4718 3937 5913 c -3937 7051 3565 7992 2822 8730 c -2074 9468 1129 9840 -19 9840 c --489 9840 -1073 9746 -1769 9563 C --1491 11740 L --1327 11722 -1195 11712 -1092 11712 c --38 11712 912 11990 1759 12540 c -2606 13090 3029 13942 3029 15089 c -3029 15997 2718 16754 2102 17347 c -1486 17944 691 18246 -283 18246 c --1247 18246 -2051 17940 -2691 17338 c --3335 16731 -3749 15818 -3933 14605 C --6411 15047 L --6110 16712 -5419 18001 -4346 18913 c --3269 19826 -1933 20287 -334 20287 c -766 20287 1782 20047 2709 19577 c -3636 19102 4346 18457 4840 17639 c -5329 16820 5578 15955 5578 15033 c -5578 14163 5343 13368 4873 12648 c -4402 11933 3711 11364 2794 10941 C -3988 10668 4915 10094 5578 9224 c -6237 8358 6566 7272 6566 5969 c -6566 4205 5926 2709 4638 1482 c -3353 254 1726 -357 -240 -357 c --2013 -357 -3486 169 -4657 1228 c --5828 2281 -6496 3650 -6661 5334 C -@c -F -%CHAR: 7845 0 (\051) @t -11330 -5941 m -9552 -5941 L -12299 -1529 13673 2883 13673 7305 c -13673 9031 13475 10743 13080 12446 c -12770 13819 12332 15146 11773 16411 c -11415 17239 10677 18617 9552 20546 C -11330 20546 L -13057 18241 14336 15927 15164 13603 c -15869 11599 16222 9506 16222 7319 c -16222 4835 15747 2441 14797 122 c -13847 -2192 12690 -4214 11330 -5941 C -@c -F -%CHAR: -63527 -28222 (L) @t --61462 -28222 m --61462 -8020 L --58786 -8020 L --58786 -25837 L --48837 -25837 L --48837 -28222 L --61462 -28222 L -@c -F -%CHAR: -47836 -28222 (B) @t --45771 -28222 m --45771 -8020 L --38189 -8020 l --36646 -8020 -35409 -8227 -34478 -8631 c --33542 -9040 -32812 -9671 -32286 -10522 c --31759 -11369 -31491 -12258 -31491 -13189 c --31491 -14050 -31726 -14864 -32196 -15626 c --32662 -16388 -33372 -17004 -34318 -17474 C --33095 -17832 -32159 -18443 -31500 -19304 c --30842 -20169 -30512 -21190 -30512 -22366 c --30512 -23311 -30715 -24191 -31114 -25005 c --31514 -25818 -32008 -26444 -32596 -26886 c --33184 -27328 -33923 -27658 -34807 -27883 c --35691 -28109 -36778 -28222 -38066 -28222 c --45771 -28222 L -@c --43095 -16510 m --38725 -16510 l --37544 -16510 -36693 -16430 -36176 -16275 c --35498 -16072 -34986 -15738 -34642 -15268 c --34299 -14798 -34125 -14210 -34125 -13504 c --34125 -12836 -34285 -12244 -34605 -11736 c --34929 -11223 -35390 -10875 -35983 -10687 c --36580 -10499 -37606 -10405 -39059 -10405 c --43095 -10405 L --43095 -16510 L -@c --43095 -25837 m --38066 -25837 l --37201 -25837 -36594 -25804 -36246 -25743 c --35630 -25630 -35117 -25447 -34703 -25188 c --34289 -24934 -33951 -24558 -33683 -24069 c --33419 -23575 -33283 -23010 -33283 -22366 c --33283 -21613 -33476 -20960 -33861 -20400 c --34247 -19845 -34783 -19454 -35470 -19229 c --36152 -19008 -37140 -18895 -38424 -18895 c --43095 -18895 L --43095 -25837 L -@c -F -%CHAR: -21166 -28222 (d) @t --9811 -28222 m --9811 -26373 L --10738 -27827 -12102 -28551 -13904 -28551 c --15070 -28551 -16142 -28231 -17121 -27587 c --18099 -26947 -18856 -26049 -19397 -24892 c --19934 -23739 -20202 -22418 -20202 -20917 c --20202 -19459 -19957 -18133 -19473 -16943 c --18983 -15753 -18254 -14840 -17281 -14210 c --16307 -13575 -15216 -13255 -14012 -13255 c --13132 -13255 -12347 -13443 -11660 -13815 c --10968 -14186 -10409 -14671 -9976 -15268 C --9976 -8020 L --7511 -8020 L --7511 -28222 L --9811 -28222 L -@c --17652 -20917 m --17652 -22794 -17257 -24196 -16467 -25122 c --15677 -26049 -14745 -26515 -13668 -26515 c --12587 -26515 -11665 -26068 -10907 -25183 c --10150 -24299 -9769 -22944 -9769 -21124 c --9769 -19120 -10155 -17653 -10926 -16717 c --11698 -15776 -12648 -15310 -13781 -15310 c --14882 -15310 -15804 -15762 -16542 -16660 c --17281 -17559 -17652 -18979 -17652 -20917 c -@c -F -%CHAR: -5475 -28222 (u) @t -5978 -28222 m -5978 -26072 L -4835 -27728 3288 -28551 1331 -28551 c -470 -28551 -339 -28387 -1086 -28057 c --1834 -27728 -2389 -27309 -2752 -26811 c --3118 -26308 -3372 -25696 -3518 -24972 c --3617 -24483 -3669 -23711 -3669 -22653 c --3669 -13589 L --1190 -13589 L --1190 -21703 l --1190 -23001 -1138 -23871 -1039 -24323 c --880 -24976 -550 -25484 -47 -25861 c -461 -26232 1087 -26416 1830 -26416 c -2573 -26416 3269 -26228 3923 -25847 c -4577 -25466 5038 -24944 5306 -24290 c -5579 -23631 5715 -22676 5715 -21430 c -5715 -13589 L -8194 -13589 L -8194 -28222 L -5978 -28222 L -@c -F -%CHAR: 10216 -28222 (m) @t -12079 -28222 m -12079 -13589 L -14294 -13589 L -14294 -15640 L -14755 -14925 15367 -14346 16129 -13913 c -16891 -13476 17761 -13255 18734 -13255 c -19816 -13255 20705 -13481 21397 -13932 c -22093 -14384 22582 -15009 22864 -15818 C -24026 -14111 25531 -13255 27384 -13255 c -28838 -13255 29953 -13659 30733 -14464 c -31514 -15268 31905 -16505 31905 -18175 c -31905 -28222 L -29440 -28222 L -29440 -19003 l -29440 -18010 29360 -17295 29200 -16858 c -29035 -16425 28744 -16072 28325 -15804 c -27902 -15541 27403 -15405 26834 -15405 c -25804 -15405 24953 -15748 24271 -16435 c -23593 -17117 23250 -18213 23250 -19718 c -23250 -28222 L -20771 -28222 L -20771 -18716 l -20771 -17611 20569 -16783 20164 -16232 c -19760 -15682 19101 -15405 18179 -15405 c -17483 -15405 16839 -15588 16246 -15960 c -15653 -16326 15221 -16863 14957 -17568 c -14689 -18278 14557 -19299 14557 -20630 c -14557 -28222 L -12079 -28222 L -@c -F -%CHAR: 33725 -28222 (p) @t -35588 -33829 m -35588 -13589 L -37845 -13589 L -37845 -15489 L -38377 -14746 38979 -14186 39652 -13815 c -40320 -13443 41133 -13255 42088 -13255 c -43339 -13255 44440 -13579 45395 -14219 c -46354 -14864 47074 -15771 47558 -16943 c -48048 -18114 48292 -19398 48292 -20795 c -48292 -22291 48024 -23641 47483 -24840 c -46947 -26039 46166 -26957 45141 -27596 c -44115 -28231 43038 -28551 41909 -28551 c -41082 -28551 40343 -28377 39685 -28029 c -39026 -27681 38490 -27239 38066 -26707 C -38066 -33829 L -35588 -33829 L -@c -37831 -20988 m -37831 -22869 38212 -24262 38974 -25165 c -39736 -26063 40663 -26515 41745 -26515 c -42845 -26515 43791 -26049 44576 -25113 c -45362 -24182 45757 -22738 45757 -20781 c -45757 -18913 45371 -17521 44605 -16590 c -43838 -15663 42921 -15198 41858 -15198 c -40799 -15198 39863 -15691 39050 -16679 c -38236 -17667 37831 -19106 37831 -20988 c -@c -F -%CHAR: 49416 -28222 (s) @t -50286 -23852 m -52737 -23467 L -52873 -24450 53259 -25202 53889 -25729 c -54515 -26251 55394 -26515 56528 -26515 c -57666 -26515 58513 -26279 59063 -25818 c -59614 -25353 59891 -24807 59891 -24186 c -59891 -23622 59646 -23184 59157 -22860 c -58819 -22639 57972 -22361 56622 -22023 c -54806 -21562 53541 -21166 52840 -20828 c -52139 -20494 51603 -20028 51241 -19436 c -50879 -18843 50695 -18189 50695 -17474 c -50695 -16820 50846 -16218 51147 -15663 c -51443 -15103 51852 -14643 52365 -14276 c -52751 -13993 53278 -13749 53941 -13551 c -54609 -13354 55324 -13255 56086 -13255 c -57233 -13255 58240 -13424 59110 -13754 c -59980 -14083 60620 -14530 61034 -15094 c -61448 -15663 61730 -16416 61885 -17361 C -59463 -17695 L -59350 -16943 59030 -16355 58503 -15931 c -57977 -15508 57229 -15296 56265 -15296 c -55126 -15296 54313 -15484 53828 -15861 c -53339 -16237 53094 -16679 53094 -17182 c -53094 -17507 53198 -17794 53400 -18053 c -53602 -18321 53917 -18537 54350 -18716 c -54599 -18805 55329 -19017 56542 -19346 c -58297 -19817 59519 -20198 60211 -20499 c -60907 -20795 61453 -21232 61848 -21801 c -62243 -22371 62440 -23076 62440 -23923 c -62440 -24751 62196 -25527 61716 -26261 c -61232 -26990 60535 -27554 59628 -27954 c -58720 -28354 57690 -28551 56542 -28551 c -54637 -28551 53188 -28156 52191 -27366 c -51194 -26576 50559 -25405 50286 -23852 C -@c -F -T -@rax 301.71118 615.44466 337.41836 630.85805 @E -[0.00028346 0.00000000 0.00000000 0.00028346 319.71882295 625.03396139] @tm - 0 O 0 @g -0.00 0.00 0.00 1.00 k -e - -% FontChange:/_ArialCE 28222.00000 z -%CHAR: -17244 0 (\050) @t --10645 -5941 m --12014 -4214 -13171 -2192 -14116 122 c --15061 2441 -15537 4835 -15537 7319 c --15537 9506 -15184 11599 -14474 13603 c --13646 15927 -12371 18241 -10645 20546 C --8867 20546 L --9977 18636 -10711 17272 -11068 16453 c --11633 15188 -12070 13862 -12395 12484 c --12790 10767 -12987 9040 -12987 7305 c --12987 2883 -11614 -1529 -8867 -5941 C --10645 -5941 L -@c -F -%CHAR: -7846 0 (5) @t --6675 5292 m --4069 5513 L --3876 4243 -3429 3293 -2728 2653 c --2023 2013 -1176 1693 -184 1693 c -1011 1693 2022 2145 2845 3043 c -3673 3946 4087 5141 4087 6627 c -4087 8043 3692 9158 2897 9976 c -2102 10795 1063 11204 -226 11204 c --1026 11204 -1745 11021 -2390 10659 c --3034 10296 -3537 9826 -3904 9247 C --6233 9548 L --4276 19925 L -5771 19925 L -5771 17554 L --2291 17554 L --3382 12126 L --2169 12973 -894 13396 437 13396 c -2201 13396 3687 12785 4901 11562 c -6114 10339 6721 8768 6721 6849 c -6721 5019 6185 3438 5122 2107 c -3824 475 2055 -343 -184 -343 c --2023 -343 -3523 169 -4685 1199 c --5847 2230 -6510 3594 -6675 5292 C -@c -F -%CHAR: 7845 0 (\051) @t -11330 -5941 m -9552 -5941 L -12299 -1529 13673 2883 13673 7305 c -13673 9031 13475 10743 13080 12446 c -12770 13819 12332 15146 11773 16411 c -11415 17239 10677 18617 9552 20546 C -11330 20546 L -13057 18241 14336 15927 15164 13603 c -15869 11599 16222 9506 16222 7319 c -16222 4835 15747 2441 14797 122 c -13847 -2192 12690 -4214 11330 -5941 C -@c -F -%CHAR: -63527 -28222 (L) @t --61462 -28222 m --61462 -8020 L --58786 -8020 L --58786 -25837 L --48837 -25837 L --48837 -28222 L --61462 -28222 L -@c -F -%CHAR: -47836 -28222 (B) @t --45771 -28222 m --45771 -8020 L --38189 -8020 l --36646 -8020 -35409 -8227 -34478 -8631 c --33542 -9040 -32812 -9671 -32286 -10522 c --31759 -11369 -31491 -12258 -31491 -13189 c --31491 -14050 -31726 -14864 -32196 -15626 c --32662 -16388 -33372 -17004 -34318 -17474 C --33095 -17832 -32159 -18443 -31500 -19304 c --30842 -20169 -30512 -21190 -30512 -22366 c --30512 -23311 -30715 -24191 -31114 -25005 c --31514 -25818 -32008 -26444 -32596 -26886 c --33184 -27328 -33923 -27658 -34807 -27883 c --35691 -28109 -36778 -28222 -38066 -28222 c --45771 -28222 L -@c --43095 -16510 m --38725 -16510 l --37544 -16510 -36693 -16430 -36176 -16275 c --35498 -16072 -34986 -15738 -34642 -15268 c --34299 -14798 -34125 -14210 -34125 -13504 c --34125 -12836 -34285 -12244 -34605 -11736 c --34929 -11223 -35390 -10875 -35983 -10687 c --36580 -10499 -37606 -10405 -39059 -10405 c --43095 -10405 L --43095 -16510 L -@c --43095 -25837 m --38066 -25837 l --37201 -25837 -36594 -25804 -36246 -25743 c --35630 -25630 -35117 -25447 -34703 -25188 c --34289 -24934 -33951 -24558 -33683 -24069 c --33419 -23575 -33283 -23010 -33283 -22366 c --33283 -21613 -33476 -20960 -33861 -20400 c --34247 -19845 -34783 -19454 -35470 -19229 c --36152 -19008 -37140 -18895 -38424 -18895 c --43095 -18895 L --43095 -25837 L -@c -F -%CHAR: -21166 -28222 (d) @t --9811 -28222 m --9811 -26373 L --10738 -27827 -12102 -28551 -13904 -28551 c --15070 -28551 -16142 -28231 -17121 -27587 c --18099 -26947 -18856 -26049 -19397 -24892 c --19934 -23739 -20202 -22418 -20202 -20917 c --20202 -19459 -19957 -18133 -19473 -16943 c --18983 -15753 -18254 -14840 -17281 -14210 c --16307 -13575 -15216 -13255 -14012 -13255 c --13132 -13255 -12347 -13443 -11660 -13815 c --10968 -14186 -10409 -14671 -9976 -15268 C --9976 -8020 L --7511 -8020 L --7511 -28222 L --9811 -28222 L -@c --17652 -20917 m --17652 -22794 -17257 -24196 -16467 -25122 c --15677 -26049 -14745 -26515 -13668 -26515 c --12587 -26515 -11665 -26068 -10907 -25183 c --10150 -24299 -9769 -22944 -9769 -21124 c --9769 -19120 -10155 -17653 -10926 -16717 c --11698 -15776 -12648 -15310 -13781 -15310 c --14882 -15310 -15804 -15762 -16542 -16660 c --17281 -17559 -17652 -18979 -17652 -20917 c -@c -F -%CHAR: -5475 -28222 (u) @t -5978 -28222 m -5978 -26072 L -4835 -27728 3288 -28551 1331 -28551 c -470 -28551 -339 -28387 -1086 -28057 c --1834 -27728 -2389 -27309 -2752 -26811 c --3118 -26308 -3372 -25696 -3518 -24972 c --3617 -24483 -3669 -23711 -3669 -22653 c --3669 -13589 L --1190 -13589 L --1190 -21703 l --1190 -23001 -1138 -23871 -1039 -24323 c --880 -24976 -550 -25484 -47 -25861 c -461 -26232 1087 -26416 1830 -26416 c -2573 -26416 3269 -26228 3923 -25847 c -4577 -25466 5038 -24944 5306 -24290 c -5579 -23631 5715 -22676 5715 -21430 c -5715 -13589 L -8194 -13589 L -8194 -28222 L -5978 -28222 L -@c -F -%CHAR: 10216 -28222 (m) @t -12079 -28222 m -12079 -13589 L -14294 -13589 L -14294 -15640 L -14755 -14925 15367 -14346 16129 -13913 c -16891 -13476 17761 -13255 18734 -13255 c -19816 -13255 20705 -13481 21397 -13932 c -22093 -14384 22582 -15009 22864 -15818 C -24026 -14111 25531 -13255 27384 -13255 c -28838 -13255 29953 -13659 30733 -14464 c -31514 -15268 31905 -16505 31905 -18175 c -31905 -28222 L -29440 -28222 L -29440 -19003 l -29440 -18010 29360 -17295 29200 -16858 c -29035 -16425 28744 -16072 28325 -15804 c -27902 -15541 27403 -15405 26834 -15405 c -25804 -15405 24953 -15748 24271 -16435 c -23593 -17117 23250 -18213 23250 -19718 c -23250 -28222 L -20771 -28222 L -20771 -18716 l -20771 -17611 20569 -16783 20164 -16232 c -19760 -15682 19101 -15405 18179 -15405 c -17483 -15405 16839 -15588 16246 -15960 c -15653 -16326 15221 -16863 14957 -17568 c -14689 -18278 14557 -19299 14557 -20630 c -14557 -28222 L -12079 -28222 L -@c -F -%CHAR: 33725 -28222 (p) @t -35588 -33829 m -35588 -13589 L -37845 -13589 L -37845 -15489 L -38377 -14746 38979 -14186 39652 -13815 c -40320 -13443 41133 -13255 42088 -13255 c -43339 -13255 44440 -13579 45395 -14219 c -46354 -14864 47074 -15771 47558 -16943 c -48048 -18114 48292 -19398 48292 -20795 c -48292 -22291 48024 -23641 47483 -24840 c -46947 -26039 46166 -26957 45141 -27596 c -44115 -28231 43038 -28551 41909 -28551 c -41082 -28551 40343 -28377 39685 -28029 c -39026 -27681 38490 -27239 38066 -26707 C -38066 -33829 L -35588 -33829 L -@c -37831 -20988 m -37831 -22869 38212 -24262 38974 -25165 c -39736 -26063 40663 -26515 41745 -26515 c -42845 -26515 43791 -26049 44576 -25113 c -45362 -24182 45757 -22738 45757 -20781 c -45757 -18913 45371 -17521 44605 -16590 c -43838 -15663 42921 -15198 41858 -15198 c -40799 -15198 39863 -15691 39050 -16679 c -38236 -17667 37831 -19106 37831 -20988 c -@c -F -%CHAR: 49416 -28222 (s) @t -50286 -23852 m -52737 -23467 L -52873 -24450 53259 -25202 53889 -25729 c -54515 -26251 55394 -26515 56528 -26515 c -57666 -26515 58513 -26279 59063 -25818 c -59614 -25353 59891 -24807 59891 -24186 c -59891 -23622 59646 -23184 59157 -22860 c -58819 -22639 57972 -22361 56622 -22023 c -54806 -21562 53541 -21166 52840 -20828 c -52139 -20494 51603 -20028 51241 -19436 c -50879 -18843 50695 -18189 50695 -17474 c -50695 -16820 50846 -16218 51147 -15663 c -51443 -15103 51852 -14643 52365 -14276 c -52751 -13993 53278 -13749 53941 -13551 c -54609 -13354 55324 -13255 56086 -13255 c -57233 -13255 58240 -13424 59110 -13754 c -59980 -14083 60620 -14530 61034 -15094 c -61448 -15663 61730 -16416 61885 -17361 C -59463 -17695 L -59350 -16943 59030 -16355 58503 -15931 c -57977 -15508 57229 -15296 56265 -15296 c -55126 -15296 54313 -15484 53828 -15861 c -53339 -16237 53094 -16679 53094 -17182 c -53094 -17507 53198 -17794 53400 -18053 c -53602 -18321 53917 -18537 54350 -18716 c -54599 -18805 55329 -19017 56542 -19346 c -58297 -19817 59519 -20198 60211 -20499 c -60907 -20795 61453 -21232 61848 -21801 c -62243 -22371 62440 -23076 62440 -23923 c -62440 -24751 62196 -25527 61716 -26261 c -61232 -26990 60535 -27554 59628 -27954 c -58720 -28354 57690 -28551 56542 -28551 c -54637 -28551 53188 -28156 52191 -27366 c -51194 -26576 50559 -25405 50286 -23852 C -@c -F -T -@rax 382.65676 594.39770 431.53370 611.79449 @E -[0.00028346 0.00000000 0.00000000 0.00028346 407.30200085 604.51452907] @tm - 0 O 0 @g -0.00 0.00 0.00 1.00 k -e - -% FontChange:/_ArialCE 35278.00000 z -%CHAR: -86943 0 (J) @t --85926 7167 m --82910 7579 L --82833 5650 -82469 4327 -81828 3616 c --81181 2905 -80293 2552 -79158 2552 c --78318 2552 -77594 2740 -76989 3128 c --76377 3510 -75960 4033 -75730 4692 c --75501 5356 -75384 6409 -75384 7855 c --75384 25253 L --72044 25253 L --72044 8043 l --72044 5933 -72297 4292 -72808 3134 c --73320 1976 -74131 1094 -75237 482 c --76348 -123 -77647 -429 -79141 -429 c --81357 -429 -83051 206 -84232 1482 c --85408 2758 -85973 4651 -85926 7167 C -@c -F -%CHAR: -69304 0 (P) @t --66582 0 m --66582 25253 L --57057 25253 l --55381 25253 -54099 25171 -53217 25012 c --51977 24806 -50936 24412 -50095 23830 c --49260 23254 -48584 22437 -48073 21396 c --47561 20350 -47308 19203 -47308 17951 c --47308 15805 -47990 13982 -49354 12494 c --50724 11013 -53194 10266 -56763 10266 c --63242 10266 L --63242 0 L --66582 0 L -@c --63242 13247 m --56710 13247 l --54552 13247 -53017 13647 -52112 14452 c --51206 15258 -50754 16387 -50754 17845 c --50754 18903 -51018 19809 -51553 20561 c --52088 21314 -52788 21808 -53664 22049 c --54229 22196 -55263 22272 -56780 22272 c --63242 22272 L --63242 13247 L -@c -F -%CHAR: -36602 0 (S) @t --35014 8114 m --31863 8390 L --31716 7126 -31369 6091 -30822 5280 c --30275 4469 -29429 3816 -28282 3316 c --27136 2816 -25842 2569 -24408 2569 c --23132 2569 -22009 2758 -21033 3134 c --20057 3516 -19328 4033 -18851 4692 c --18375 5356 -18134 6074 -18134 6856 c --18134 7649 -18363 8337 -18828 8931 c --19286 9525 -20045 10019 -21097 10419 c --21779 10683 -23273 11095 -25595 11653 c --27912 12212 -29541 12735 -30470 13229 c --31675 13858 -32574 14646 -33168 15581 c --33756 16516 -34050 17563 -34050 18727 c --34050 19997 -33692 21190 -32968 22296 c --32245 23407 -31187 24248 -29799 24824 c --28406 25394 -26865 25682 -25166 25682 c --23290 25682 -21644 25383 -20209 24777 c --18781 24177 -17681 23289 -16911 22119 c --16147 20949 -15729 19620 -15670 18139 C --18875 17898 L --19051 19491 -19633 20702 -20627 21514 c --21621 22331 -23085 22737 -25025 22737 c --27048 22737 -28517 22366 -29446 21625 c --30370 20885 -30834 19991 -30834 18950 c --30834 18039 -30505 17292 -29852 16710 c --29205 16122 -27530 15522 -24813 14911 c --22097 14293 -20233 13758 -19222 13300 c --17752 12618 -16664 11759 -15964 10725 c --15265 9684 -14918 8484 -14918 7132 c --14918 5786 -15300 4521 -16070 3334 c --16840 2146 -17946 1223 -19386 559 c --20827 -100 -22450 -429 -24249 -429 c --26536 -429 -28453 -100 -29993 570 c --31540 1235 -32751 2234 -33633 3575 c --34509 4910 -34973 6426 -35014 8114 C -@c -F -%CHAR: -13072 0 (t) @t --3976 2775 m --3529 35 L --4399 -147 -5181 -241 -5869 -241 c --6998 -241 -7868 -65 -8492 294 c --9109 647 -9544 1117 -9797 1699 c --10050 2275 -10179 3498 -10179 5356 c --10179 15881 L --12455 15881 L --12455 18292 L --10179 18292 L --10179 22825 L --7092 24683 L --7092 18292 L --3976 18292 L --3976 15881 L --7092 15881 L --7092 5186 l --7092 4298 -7039 3734 -6934 3481 c --6822 3228 -6646 3028 -6399 2875 c --6152 2728 -5799 2652 -5340 2652 c --4993 2652 -4541 2693 -3976 2775 C -@c -F -%CHAR: -3265 0 (o) @t --2095 9149 m --2095 12535 -1154 15046 733 16675 c -2303 18027 4220 18709 6483 18709 c -9000 18709 11058 17886 12651 16234 c -14251 14587 15044 12312 15044 9407 c -15044 7050 14692 5198 13986 3851 c -13280 2499 12251 1452 10905 706 c -9553 -41 8083 -412 6483 -412 c -3926 -412 1856 406 275 2052 c --1307 3692 -2095 6056 -2095 9149 c -@c -1092 9149 m -1092 6803 1603 5051 2626 3886 c -3649 2716 4937 2134 6483 2134 c -8024 2134 9306 2722 10329 3892 c -11346 5062 11858 6850 11858 9249 c -11858 11512 11346 13229 10317 14393 c -9288 15558 8012 16140 6483 16140 c -4937 16140 3649 15558 2626 14399 c -1603 13241 1092 11489 1092 9149 c -@c -F -%CHAR: 16350 0 (r) @t -18643 0 m -18643 18292 L -21430 18292 L -21430 15522 L -22141 16816 22800 17674 23406 18086 c -24005 18497 24670 18709 25393 18709 c -26440 18709 27498 18374 28580 17710 C -27510 14829 L -26757 15281 25999 15505 25240 15505 c -24558 15505 23952 15299 23411 14893 c -22871 14482 22488 13917 22259 13194 c -21912 12094 21742 10889 21742 9578 c -21742 0 L -18643 0 L -@c -F -%CHAR: 28098 0 (a) @t -42362 2258 m -41210 1282 40104 594 39046 188 c -37982 -212 36841 -412 35624 -412 c -33613 -412 32073 76 30991 1058 c -29915 2040 29374 3298 29374 4821 c -29374 5721 29574 6538 29985 7279 c -30391 8020 30926 8614 31585 9061 c -32249 9507 32990 9848 33819 10078 c -34425 10236 35342 10395 36571 10542 c -39075 10842 40922 11195 42103 11612 C -42115 12036 42121 12306 42121 12418 c -42121 13682 41827 14576 41239 15087 c -40451 15793 39269 16140 37711 16140 c -36253 16140 35177 15887 34477 15375 c -33784 14864 33272 13958 32937 12659 C -29909 13076 L -30185 14370 30638 15422 31267 16216 c -31896 17016 32813 17633 34007 18062 c -35201 18492 36582 18709 38158 18709 c -39722 18709 40986 18521 41962 18156 c -42938 17786 43656 17327 44120 16769 c -44579 16210 44896 15511 45084 14658 c -45184 14129 45237 13176 45237 11800 c -45237 7667 l -45237 4780 45302 2957 45437 2199 c -45566 1435 45831 700 46219 0 C -42979 0 L -42662 641 42450 1393 42362 2258 C -@c -42103 9184 m -40974 8720 39287 8331 37041 8008 c -35765 7826 34860 7620 34336 7391 c -33807 7161 33396 6826 33113 6379 c -32825 5938 32678 5450 32678 4910 c -32678 4080 32996 3393 33619 2840 c -34242 2293 35159 2017 36365 2017 c -37558 2017 38623 2275 39552 2799 c -40481 3322 41168 4039 41604 4945 c -41939 5644 42103 6679 42103 8043 c -42103 9184 L -@c -F -%CHAR: 47713 0 (g) @t -49471 -1517 m -52487 -1964 L -52611 -2893 52964 -3569 53534 -3998 c -54304 -4569 55357 -4857 56685 -4857 c -58126 -4857 59231 -4569 60013 -3998 c -60795 -3422 61319 -2616 61595 -1588 c -61760 -953 61830 370 61818 2393 C -60466 800 58779 0 56756 0 c -54239 0 52293 905 50917 2722 c -49542 4533 48848 6715 48848 9249 c -48848 10995 49165 12606 49794 14082 c -50429 15558 51347 16698 52546 17504 c -53746 18303 55157 18709 56774 18709 c -58931 18709 60713 17833 62112 16087 C -62112 18292 L -64976 18292 L -64976 2481 l -64976 -365 64682 -2387 64106 -3575 c -63523 -4763 62606 -5703 61348 -6391 c -60090 -7079 58543 -7426 56703 -7426 c -54522 -7426 52758 -6932 51417 -5950 c -50071 -4968 49424 -3493 49471 -1517 C -@c -52035 9472 m -52035 7073 52511 5321 53469 4222 c -54422 3116 55615 2569 57050 2569 c -58473 2569 59666 3116 60631 4210 c -61595 5309 62077 7026 62077 9372 c -62077 11612 61583 13300 60589 14435 c -59596 15569 58396 16140 56997 16140 c -55621 16140 54451 15581 53481 14458 c -52517 13341 52035 11677 52035 9472 c -@c -F -%CHAR: 67328 0 (e) @t -82174 5891 m -85379 5497 L -84873 3622 83938 2170 82574 1135 c -81204 106 79458 -412 77335 -412 c -74660 -412 72537 412 70973 2058 c -69404 3704 68622 6015 68622 8990 c -68622 12071 69415 14458 70997 16157 c -72584 17857 74636 18709 77165 18709 c -79611 18709 81610 17874 83156 16210 c -84708 14546 85484 12200 85484 9184 c -85484 8996 85479 8720 85467 8355 C -71826 8355 L -71938 6344 72508 4804 73531 3739 c -74554 2669 75824 2134 77353 2134 c -78488 2134 79458 2434 80263 3034 c -81069 3628 81704 4580 82174 5891 C -@c -71996 10907 m -82209 10907 L -82074 12441 81680 13600 81039 14364 c -80052 15558 78770 16157 77200 16157 c -75777 16157 74578 15681 73607 14729 c -72637 13776 72102 12500 71996 10907 C -@c -F -%CHAR: -68634 -35278 (B) @t --66053 -35278 m --66053 -10025 L --56575 -10025 l --54646 -10025 -53100 -10284 -51936 -10789 c --50766 -11301 -49854 -12089 -49196 -13153 c --48537 -14211 -48202 -15322 -48202 -16487 c --48202 -17563 -48496 -18580 -49084 -19532 c --49666 -20485 -50554 -21255 -51736 -21843 C --50207 -22290 -49037 -23054 -48214 -24130 c --47391 -25212 -46979 -26488 -46979 -27958 c --46979 -29140 -47232 -30239 -47732 -31256 c --48232 -32273 -48849 -33055 -49584 -33608 c --50319 -34161 -51242 -34572 -52347 -34855 c --53453 -35137 -54811 -35278 -56422 -35278 c --66053 -35278 L -@c --62707 -20638 m --57245 -20638 l --55769 -20638 -54705 -20538 -54058 -20344 c --53212 -20091 -52571 -19673 -52142 -19085 c --51712 -18497 -51495 -17762 -51495 -16881 c --51495 -16046 -51695 -15305 -52094 -14670 c --52500 -14029 -53076 -13594 -53817 -13359 c --54564 -13123 -55846 -13006 -57663 -13006 c --62707 -13006 L --62707 -20638 L -@c --62707 -32297 m --56422 -32297 l --55340 -32297 -54582 -32256 -54147 -32179 c --53376 -32038 -52735 -31809 -52218 -31486 c --51701 -31168 -51277 -30698 -50942 -30086 c --50613 -29469 -50442 -28763 -50442 -27958 c --50442 -27017 -50683 -26200 -51166 -25500 c --51648 -24806 -52318 -24318 -53176 -24036 c --54029 -23760 -55264 -23619 -56869 -23619 c --62707 -23619 L --62707 -32297 L -@c -F -%CHAR: -45104 -35278 (a) @t --30840 -33020 m --31992 -33996 -33098 -34684 -34156 -35090 c --35220 -35490 -36361 -35690 -37578 -35690 c --39589 -35690 -41129 -35202 -42211 -34220 c --43287 -33238 -43828 -31980 -43828 -30457 c --43828 -29557 -43628 -28740 -43217 -27999 c --42811 -27258 -42276 -26664 -41617 -26217 c --40953 -25771 -40212 -25430 -39383 -25200 c --38777 -25042 -37860 -24883 -36631 -24736 c --34127 -24436 -32280 -24083 -31099 -23666 C --31087 -23242 -31081 -22972 -31081 -22860 c --31081 -21596 -31375 -20702 -31963 -20191 c --32751 -19485 -33933 -19138 -35491 -19138 c --36949 -19138 -38025 -19391 -38725 -19903 c --39418 -20414 -39930 -21320 -40265 -22619 C --43293 -22202 L --43017 -20908 -42564 -19856 -41935 -19062 c --41306 -18262 -40389 -17645 -39195 -17216 c --38001 -16786 -36620 -16569 -35044 -16569 c --33480 -16569 -32216 -16757 -31240 -17122 c --30264 -17492 -29546 -17951 -29082 -18509 c --28623 -19068 -28306 -19767 -28118 -20620 c --28018 -21149 -27965 -22102 -27965 -23478 c --27965 -27611 l --27965 -30498 -27900 -32321 -27765 -33079 c --27636 -33843 -27371 -34578 -26983 -35278 C --30223 -35278 L --30540 -34637 -30752 -33885 -30840 -33020 C -@c --31099 -26094 m --32228 -26558 -33915 -26947 -36161 -27270 c --37437 -27452 -38342 -27658 -38866 -27887 c --39395 -28117 -39806 -28452 -40089 -28899 c --40377 -29340 -40524 -29828 -40524 -30368 c --40524 -31198 -40206 -31885 -39583 -32438 c --38960 -32985 -38043 -33261 -36837 -33261 c --35644 -33261 -34579 -33003 -33650 -32479 c --32721 -31956 -32034 -31239 -31598 -30333 c --31263 -29634 -31099 -28599 -31099 -27235 c --31099 -26094 L -@c -F -%CHAR: -25489 -35278 (c) @t --11225 -28575 m --8179 -28975 L --8509 -31074 -9361 -32720 -10737 -33908 c --12107 -35096 -13794 -35690 -15793 -35690 c --18292 -35690 -20309 -34872 -21826 -33238 c --23349 -31603 -24113 -29257 -24113 -26200 c --24113 -24224 -23784 -22496 -23131 -21014 c --22473 -19532 -21479 -18421 -20139 -17680 c --18804 -16939 -17346 -16569 -15776 -16569 c --13788 -16569 -12160 -17075 -10902 -18080 c --9637 -19085 -8826 -20508 -8467 -22360 C --11484 -22825 L --11772 -21596 -12277 -20673 -13006 -20050 c --13736 -19432 -14617 -19121 -15652 -19121 c --17216 -19121 -18486 -19679 -19462 -20802 c --20438 -21919 -20926 -23689 -20926 -26112 c --20926 -28569 -20456 -30357 -19509 -31474 c --18569 -32585 -17340 -33144 -15823 -33144 c --14606 -33144 -13594 -32767 -12777 -32021 c --11960 -31274 -11442 -30127 -11225 -28575 C -@c -F -%CHAR: -7850 -35278 (k) @t --5510 -35278 m --5510 -10025 L --2405 -10025 L --2405 -24424 L -4932 -16986 L -8942 -16986 L -1951 -23771 L -9654 -35278 L -5826 -35278 L --218 -25923 L --2405 -28028 L --2405 -35278 L --5510 -35278 L -@c -F -%CHAR: 9789 -35278 (e) @t -24635 -29387 m -27840 -29781 L -27334 -31656 26399 -33108 25035 -34143 c -23665 -35172 21919 -35690 19796 -35690 c -17121 -35690 14998 -34866 13434 -33220 c -11865 -31574 11083 -29263 11083 -26288 c -11083 -23207 11876 -20820 13458 -19121 c -15045 -17421 17097 -16569 19626 -16569 c -22072 -16569 24071 -17404 25617 -19068 c -27169 -20732 27945 -23078 27945 -26094 c -27945 -26282 27940 -26558 27928 -26923 C -14287 -26923 L -14399 -28934 14969 -30474 15992 -31539 c -17015 -32609 18285 -33144 19814 -33144 c -20949 -33144 21919 -32844 22724 -32244 c -23530 -31650 24165 -30698 24635 -29387 C -@c -14457 -24371 m -24670 -24371 L -24535 -22837 24141 -21678 23500 -20914 c -22513 -19720 21231 -19121 19661 -19121 c -18238 -19121 17039 -19597 16068 -20549 c -15098 -21502 14563 -22778 14457 -24371 C -@c -F -%CHAR: 29404 -35278 (n) @t -31732 -35278 m -31732 -16986 L -34519 -16986 L -34519 -19585 L -35866 -17574 37806 -16569 40340 -16569 c -41446 -16569 42457 -16769 43380 -17163 c -44309 -17563 44997 -18080 45455 -18727 c -45920 -19368 46237 -20132 46426 -21014 c -46537 -21590 46596 -22596 46596 -24030 c -46596 -35278 L -43492 -35278 L -43492 -24148 l -43492 -22890 43374 -21943 43133 -21314 c -42892 -20691 42463 -20191 41851 -19820 c -41234 -19444 40517 -19256 39688 -19256 c -38365 -19256 37230 -19679 36266 -20514 c -35307 -21355 34831 -22942 34831 -25288 c -34831 -35278 L -31732 -35278 L -@c -F -%CHAR: 49019 -35278 (d) @t -63213 -35278 m -63213 -32967 L -62054 -34784 60349 -35690 58097 -35690 c -56639 -35690 55298 -35290 54076 -34484 c -52853 -33685 51906 -32562 51230 -31115 c -50559 -29675 50224 -28022 50224 -26147 c -50224 -24324 50530 -22666 51136 -21179 c -51747 -19691 52659 -18550 53876 -17762 c -55093 -16969 56457 -16569 57962 -16569 c -59061 -16569 60043 -16804 60902 -17269 c -61766 -17733 62466 -18339 63007 -19085 C -63007 -10025 L -66088 -10025 L -66088 -35278 L -63213 -35278 L -@c -53411 -26147 m -53411 -28493 53905 -30245 54893 -31403 c -55881 -32562 57045 -33144 58391 -33144 c -59744 -33144 60896 -32585 61843 -31480 c -62789 -30374 63265 -28681 63265 -26406 c -63265 -23901 62783 -22066 61819 -20896 c -60855 -19720 59667 -19138 58250 -19138 c -56874 -19138 55722 -19703 54799 -20826 c -53876 -21949 53411 -23724 53411 -26147 c -@c -F -T -@rax %Note: Object -395.69272 623.18154 395.88661 699.87118 @E -0 J 0 j [] 0 d 0 R 0 @G -0.00 0.00 0.00 1.00 K -0 0.86740 0.86740 0.00000 @w -/$fm 0 def -395.88661 623.18154 m -395.70151 696.32504 L -S -@j -0.00 0.00 0.00 1.00 K -0.00 0.00 0.00 1.00 k -0 @g -0 @G -[] 0 d 0 J 0 j -0 R 0 O -0 1.00800 1.00800 0 @w -395.69272 699.87118 m -392.68658 692.80753 L -394.70003 693.82063 396.71603 693.82573 398.73458 692.82283 C -395.69272 699.87118 L -f -@J - -@rax %Note: Object -134.59124 671.16926 219.25757 730.50123 @E -0 J 0 j [] 0 d 0 R 0 @G -0.00 0.00 0.00 1.00 K -0 0.86740 0.86740 0.00000 @w -/$fm 0 def -134.59124 730.50123 m -216.35376 673.20425 L -S -@j -0.00 0.00 0.00 1.00 K -0.00 0.00 0.00 1.00 k -0 @g -0 @G -[] 0 d 0 J 0 j -0 R 0 O -0 1.00800 1.00800 0 @w -219.25757 671.16926 m -215.21452 677.69518 L -214.88315 675.46573 213.72605 673.81455 211.74378 672.74220 C -219.25757 671.16926 L -f -@J - -@rax %Note: Object -136.59307 651.30520 219.68844 661.19981 @E -0 J 0 j [] 0 d 0 R 0 @G -0.00 0.00 0.00 1.00 K -0 0.86740 0.86740 0.00000 @w -/$fm 0 def -136.59307 651.30520 m -216.16724 660.78057 L -S -@j -0.00 0.00 0.00 1.00 K -0.00 0.00 0.00 1.00 k -0 @g -0 @G -[] 0 d 0 J 0 j -0 R 0 O -0 1.00800 1.00800 0 @w -219.68844 661.19981 m -212.32431 663.36831 L -213.56362 661.48554 213.80202 659.48372 213.03950 657.36283 C -219.68844 661.19981 L -f -@J - -@rax %Note: Object -101.73090 673.77430 102.05065 710.31912 @E -0 J 0 j [] 0 d 0 R 0 @G -0.00 0.00 0.00 1.00 K -0 0.86740 0.86740 0.00000 @w -/$fm 0 def -101.73090 710.31912 m -102.01975 677.32016 L -S -@j -0.00 0.00 0.00 1.00 K -0.00 0.00 0.00 1.00 k -0 @g -0 @G -[] 0 d 0 J 0 j -0 R 0 O -0 1.00800 1.00800 0 @w -102.05065 673.77430 m -105.01285 680.85638 L -103.00564 679.83080 100.98964 679.81323 98.96513 680.80365 C -102.05065 673.77430 L -f -@J - -@rax %Note: Object -288.02268 613.96441 360.04876 659.56365 @E -0 J 0 j [] 0 d 0 R 0 @G -0.00 0.00 0.00 1.00 K -0 0.86740 0.86740 0.00000 @w -/$fm 0 def -288.02268 659.56365 m -357.05282 615.86107 L -S -@j -0.00 0.00 0.00 1.00 K -0.00 0.00 0.00 1.00 k -0 @g -0 @G -[] 0 d 0 J 0 j -0 R 0 O -0 1.00800 1.00800 0 @w -360.04876 613.96441 m -355.70466 620.29361 L -355.47789 618.05112 354.39959 616.34778 352.46948 615.18359 C -360.04876 613.96441 L -f -@J - -@rax %Note: Object -286.85027 669.79106 359.39452 719.53569 @E -0 J 0 j [] 0 d 0 R 0 @G -0.00 0.00 0.00 1.00 K -0 0.86740 0.86740 0.00000 @w -/$fm 0 def -286.85027 669.79106 m -356.47002 717.53046 L -S -@j -0.00 0.00 0.00 1.00 K -0.00 0.00 0.00 1.00 k -0 @g -0 @G -[] 0 d 0 J 0 j -0 R 0 O -0 1.00800 1.00800 0 @w -359.39452 719.53569 m -351.86513 718.03928 L -353.83663 716.94680 354.97672 715.28400 355.28542 713.05143 C -359.39452 719.53569 L -f -@J - -@rax %Note: Object -385.89761 699.03213 407.50072 710.32195 @E - 0 O 0 @g -0.00 0.00 0.00 0.50 k -/$fm 0 def -385.89761 710.32224 m -407.50072 710.32224 L -407.50072 699.03213 L -385.89761 699.03213 L -385.89761 710.32224 L -@c -F - -@rax %Note: Object -384.95622 700.11496 406.19055 711.38494 @E - 0 O 0 @g -0.00 0.00 0.00 0.00 k -0 J 0 j [] 0 d 0 R 0 @G -0.00 0.00 0.00 1.00 K -0 0.49890 0.49890 0.00000 @w -/$fm 0 def -384.95622 711.38494 m -406.19112 711.38494 L -406.19112 700.11411 L -384.95622 700.11411 L -384.95622 711.38494 L -@c -B - -@rax %Note: Object -363.47216 703.76343 456.70649 745.20113 @E - 0 O 0 @g -0.00 0.00 0.00 0.50 k -/$fm 0 def -363.47216 745.20113 m -456.70649 745.20113 L -456.70649 703.76343 L -363.47216 703.76343 L -363.47216 745.20113 L -@c -F - -@rax %Note: Object -360.49209 707.73534 453.56627 749.10161 @E - 0 O 0 @g -0.00 0.00 0.00 0.00 k -0 J 0 j [] 0 d 0 R 0 @G -0.00 0.00 0.00 1.00 K -0 0.49890 0.49890 0.00000 @w -/$fm 0 def -360.49209 749.10161 m -453.56627 749.10161 L -453.56627 707.73534 L -360.49209 707.73534 L -360.49209 749.10161 L -@c -B - -@rax 370.79915 721.48620 442.62680 738.88299 @E -[0.00028346 0.00000000 0.00000000 0.00028346 406.91989063 731.60302836] @tm - 0 O 0 @g -0.00 0.00 0.00 1.00 k -e - -% FontChange:/_ArialCE 35278.00000 z -%CHAR: -127426 0 (P) @t --124704 0 m --124704 25253 L --115179 25253 l --113503 25253 -112221 25171 -111339 25012 c --110099 24806 -109058 24412 -108217 23830 c --107382 23254 -106706 22437 -106195 21396 c --105683 20350 -105430 19203 -105430 17951 c --105430 15805 -106112 13982 -107476 12494 c --108846 11013 -111316 10266 -114885 10266 c --121364 10266 L --121364 0 L --124704 0 L -@c --121364 13247 m --114832 13247 l --112674 13247 -111139 13647 -110234 14452 c --109328 15258 -108876 16387 -108876 17845 c --108876 18903 -109140 19809 -109675 20561 c --110210 21314 -110910 21808 -111786 22049 c --112351 22196 -113385 22272 -114902 22272 c --121364 22272 L --121364 13247 L -@c -F -%CHAR: -103896 0 (r) @t --101603 0 m --101603 18292 L --98816 18292 L --98816 15522 L --98105 16816 -97446 17674 -96840 18086 c --96241 18497 -95576 18709 -94853 18709 c --93806 18709 -92748 18374 -91666 17710 C --92736 14829 L --93489 15281 -94247 15505 -95006 15505 c --95688 15505 -96294 15299 -96835 14893 c --97375 14482 -97758 13917 -97987 13194 c --98334 12094 -98504 10889 -98504 9578 c --98504 0 L --101603 0 L -@c -F -%CHAR: -92148 0 (i) @t --89808 21684 m --89808 25253 L --86703 25253 L --86703 21684 L --89808 21684 L -@c --89808 0 m --89808 18292 L --86703 18292 L --86703 0 L --89808 0 L -@c -F -%CHAR: -84316 0 (m) @t --81988 0 m --81988 18292 L --79218 18292 L --79218 15728 L --78642 16622 -77878 17345 -76925 17886 c --75973 18433 -74885 18709 -73668 18709 c --72316 18709 -71204 18427 -70340 17862 c --69470 17298 -68858 16516 -68506 15505 C --67053 17639 -65172 18709 -62855 18709 c --61038 18709 -59645 18203 -58669 17198 c --57693 16193 -57205 14646 -57205 12559 c --57205 0 L --60286 0 L --60286 11524 l --60286 12765 -60386 13658 -60586 14205 c --60791 14746 -61156 15187 -61679 15522 c --62208 15852 -62832 16022 -63543 16022 c --64831 16022 -65895 15593 -66748 14734 c --67594 13882 -68023 12512 -68023 10630 c --68023 0 L --71122 0 L --71122 11883 l --71122 13265 -71375 14299 -71881 14987 c --72386 15675 -73209 16022 -74362 16022 c --75232 16022 -76037 15793 -76778 15328 c --77519 14870 -78060 14199 -78389 13317 c --78724 12430 -78889 11154 -78889 9490 c --78889 0 L --81988 0 L -@c -F -%CHAR: -54929 0 (a) @t --40665 2258 m --41817 1282 -42923 594 -43981 188 c --45045 -212 -46186 -412 -47403 -412 c --49414 -412 -50954 76 -52036 1058 c --53112 2040 -53653 3298 -53653 4821 c --53653 5721 -53453 6538 -53042 7279 c --52636 8020 -52101 8614 -51442 9061 c --50778 9507 -50037 9848 -49208 10078 c --48602 10236 -47685 10395 -46456 10542 c --43952 10842 -42105 11195 -40924 11612 C --40912 12036 -40906 12306 -40906 12418 c --40906 13682 -41200 14576 -41788 15087 c --42576 15793 -43758 16140 -45316 16140 c --46774 16140 -47850 15887 -48550 15375 c --49243 14864 -49755 13958 -50090 12659 C --53118 13076 L --52842 14370 -52389 15422 -51760 16216 c --51131 17016 -50214 17633 -49020 18062 c --47826 18492 -46445 18709 -44869 18709 c --43305 18709 -42041 18521 -41065 18156 c --40089 17786 -39371 17327 -38907 16769 c --38448 16210 -38131 15511 -37943 14658 c --37843 14129 -37790 13176 -37790 11800 c --37790 7667 l --37790 4780 -37725 2957 -37590 2199 c --37461 1435 -37196 700 -36808 0 C --40048 0 L --40365 641 -40577 1393 -40665 2258 C -@c --40924 9184 m --42053 8720 -43740 8331 -45986 8008 c --47262 7826 -48167 7620 -48691 7391 c --49220 7161 -49631 6826 -49914 6379 c --50202 5938 -50349 5450 -50349 4910 c --50349 4080 -50031 3393 -49408 2840 c --48785 2293 -47868 2017 -46662 2017 c --45469 2017 -44404 2275 -43475 2799 c --42546 3322 -41859 4039 -41423 4945 c --41088 5644 -40924 6679 -40924 8043 c --40924 9184 L -@c -F -%CHAR: -35314 0 (r) @t --33021 0 m --33021 18292 L --30234 18292 L --30234 15522 L --29523 16816 -28864 17674 -28258 18086 c --27659 18497 -26994 18709 -26271 18709 c --25224 18709 -24166 18374 -23084 17710 C --24154 14829 L --24907 15281 -25665 15505 -26424 15505 c --27106 15505 -27712 15299 -28253 14893 c --28793 14482 -29176 13917 -29405 13194 c --29752 12094 -29922 10889 -29922 9578 c --29922 0 L --33021 0 L -@c -F -%CHAR: -23566 0 (y) @t --21379 -7044 m --21726 -4133 L --21044 -4316 -20456 -4410 -19950 -4410 c --19262 -4410 -18709 -4292 -18298 -4063 c --17880 -3834 -17545 -3516 -17281 -3099 c --17081 -2793 -16769 -2023 -16334 -794 c --16275 -617 -16181 -370 -16058 -35 C --22996 18292 L --19656 18292 L --15846 7702 l --15358 6356 -14911 4945 -14523 3463 C --14164 4886 -13741 6274 -13247 7632 c --9337 18292 L --6239 18292 L --13194 -312 l --13941 -2322 -14523 -3704 -14935 -4463 c --15487 -5486 -16116 -6232 -16828 -6709 c --17545 -7185 -18392 -7426 -19380 -7426 c --19979 -7426 -20644 -7297 -21379 -7044 C -@c -F -%CHAR: 3880 0 (S) @t -5468 8114 m -8619 8390 L -8766 7126 9113 6091 9660 5280 c -10207 4469 11053 3816 12200 3316 c -13346 2816 14640 2569 16074 2569 c -17350 2569 18473 2758 19449 3134 c -20425 3516 21154 4033 21631 4692 c -22107 5356 22348 6074 22348 6856 c -22348 7649 22119 8337 21654 8931 c -21196 9525 20437 10019 19385 10419 c -18703 10683 17209 11095 14887 11653 c -12570 12212 10941 12735 10012 13229 c -8807 13858 7908 14646 7314 15581 c -6726 16516 6432 17563 6432 18727 c -6432 19997 6790 21190 7514 22296 c -8237 23407 9295 24248 10683 24824 c -12076 25394 13617 25682 15316 25682 c -17192 25682 18838 25383 20273 24777 c -21701 24177 22801 23289 23571 22119 c -24335 20949 24753 19620 24812 18139 C -21607 17898 L -21431 19491 20849 20702 19855 21514 c -18861 22331 17397 22737 15457 22737 c -13434 22737 11965 22366 11036 21625 c -10112 20885 9648 19991 9648 18950 c -9648 18039 9977 17292 10630 16710 c -11277 16122 12952 15522 15669 14911 c -18385 14293 20249 13758 21260 13300 c -22730 12618 23818 11759 24518 10725 c -25217 9684 25564 8484 25564 7132 c -25564 5786 25182 4521 24412 3334 c -23642 2146 22536 1223 21096 559 c -19655 -100 18032 -429 16233 -429 c -13946 -429 12029 -100 10489 570 c -8942 1235 7731 2234 6849 3575 c -5973 4910 5509 6426 5468 8114 C -@c -F -%CHAR: 27410 0 (t) @t -36506 2775 m -36953 35 L -36083 -147 35301 -241 34613 -241 c -33484 -241 32614 -65 31990 294 c -31373 647 30938 1117 30685 1699 c -30432 2275 30303 3498 30303 5356 c -30303 15881 L -28027 15881 L -28027 18292 L -30303 18292 L -30303 22825 L -33390 24683 L -33390 18292 L -36506 18292 L -36506 15881 L -33390 15881 L -33390 5186 l -33390 4298 33443 3734 33548 3481 c -33660 3228 33836 3028 34083 2875 c -34330 2728 34683 2652 35142 2652 c -35489 2652 35941 2693 36506 2775 C -@c -F -%CHAR: 37217 0 (o) @t -38387 9149 m -38387 12535 39328 15046 41215 16675 c -42785 18027 44702 18709 46965 18709 c -49482 18709 51540 17886 53133 16234 c -54733 14587 55526 12312 55526 9407 c -55526 7050 55174 5198 54468 3851 c -53762 2499 52733 1452 51387 706 c -50035 -41 48565 -412 46965 -412 c -44408 -412 42338 406 40757 2052 c -39175 3692 38387 6056 38387 9149 c -@c -41574 9149 m -41574 6803 42085 5051 43108 3886 c -44131 2716 45419 2134 46965 2134 c -48506 2134 49788 2722 50811 3892 c -51828 5062 52340 6850 52340 9249 c -52340 11512 51828 13229 50799 14393 c -49770 15558 48494 16140 46965 16140 c -45419 16140 44131 15558 43108 14399 c -42085 13241 41574 11489 41574 9149 c -@c -F -%CHAR: 56832 0 (r) @t -59125 0 m -59125 18292 L -61912 18292 L -61912 15522 L -62623 16816 63282 17674 63888 18086 c -64487 18497 65152 18709 65875 18709 c -66922 18709 67980 18374 69062 17710 C -67992 14829 L -67239 15281 66481 15505 65722 15505 c -65040 15505 64434 15299 63893 14893 c -63353 14482 62970 13917 62741 13194 c -62394 12094 62224 10889 62224 9578 c -62224 0 L -59125 0 L -@c -F -%CHAR: 68580 0 (a) @t -82844 2258 m -81692 1282 80586 594 79528 188 c -78464 -212 77323 -412 76106 -412 c -74095 -412 72555 76 71473 1058 c -70397 2040 69856 3298 69856 4821 c -69856 5721 70056 6538 70467 7279 c -70873 8020 71408 8614 72067 9061 c -72731 9507 73472 9848 74301 10078 c -74907 10236 75824 10395 77053 10542 c -79557 10842 81404 11195 82585 11612 C -82597 12036 82603 12306 82603 12418 c -82603 13682 82309 14576 81721 15087 c -80933 15793 79751 16140 78193 16140 c -76735 16140 75659 15887 74959 15375 c -74266 14864 73754 13958 73419 12659 C -70391 13076 L -70667 14370 71120 15422 71749 16216 c -72378 17016 73295 17633 74489 18062 c -75683 18492 77064 18709 78640 18709 c -80204 18709 81468 18521 82444 18156 c -83420 17786 84138 17327 84602 16769 c -85061 16210 85378 15511 85566 14658 c -85666 14129 85719 13176 85719 11800 c -85719 7667 l -85719 4780 85784 2957 85919 2199 c -86048 1435 86313 700 86701 0 C -83461 0 L -83144 641 82932 1393 82844 2258 C -@c -82585 9184 m -81456 8720 79769 8331 77523 8008 c -76247 7826 75342 7620 74818 7391 c -74289 7161 73878 6826 73595 6379 c -73307 5938 73160 5450 73160 4910 c -73160 4080 73478 3393 74101 2840 c -74724 2293 75641 2017 76847 2017 c -78040 2017 79105 2275 80034 2799 c -80963 3322 81650 4039 82086 4945 c -82421 5644 82585 6679 82585 8043 c -82585 9184 L -@c -F -%CHAR: 88195 0 (g) @t -89953 -1517 m -92969 -1964 L -93093 -2893 93446 -3569 94016 -3998 c -94786 -4569 95839 -4857 97167 -4857 c -98608 -4857 99713 -4569 100495 -3998 c -101277 -3422 101801 -2616 102077 -1588 c -102242 -953 102312 370 102300 2393 C -100948 800 99261 0 97238 0 c -94721 0 92775 905 91399 2722 c -90024 4533 89330 6715 89330 9249 c -89330 10995 89647 12606 90276 14082 c -90911 15558 91829 16698 93028 17504 c -94228 18303 95639 18709 97256 18709 c -99413 18709 101195 17833 102594 16087 C -102594 18292 L -105458 18292 L -105458 2481 l -105458 -365 105164 -2387 104588 -3575 c -104005 -4763 103088 -5703 101830 -6391 c -100572 -7079 99025 -7426 97185 -7426 c -95004 -7426 93240 -6932 91899 -5950 c -90553 -4968 89906 -3493 89953 -1517 C -@c -92517 9472 m -92517 7073 92993 5321 93951 4222 c -94904 3116 96097 2569 97532 2569 c -98955 2569 100148 3116 101113 4210 c -102077 5309 102559 7026 102559 9372 c -102559 11612 102065 13300 101071 14435 c -100078 15569 98878 16140 97479 16140 c -96103 16140 94933 15581 93963 14458 c -92999 13341 92517 11677 92517 9472 c -@c -F -%CHAR: 107810 0 (e) @t -122656 5891 m -125861 5497 L -125355 3622 124420 2170 123056 1135 c -121686 106 119940 -412 117817 -412 c -115142 -412 113019 412 111455 2058 c -109886 3704 109104 6015 109104 8990 c -109104 12071 109897 14458 111479 16157 c -113066 17857 115118 18709 117647 18709 c -120093 18709 122092 17874 123638 16210 c -125190 14546 125966 12200 125966 9184 c -125966 8996 125961 8720 125949 8355 C -112308 8355 L -112420 6344 112990 4804 114013 3739 c -115036 2669 116306 2134 117835 2134 c -118970 2134 119940 2434 120745 3034 c -121551 3628 122186 4580 122656 5891 C -@c -112478 10907 m -122691 10907 L -122556 12441 122162 13600 121521 14364 c -120534 15558 119252 16157 117682 16157 c -116259 16157 115060 15681 114089 14729 c -113119 13776 112584 12500 112478 10907 C -@c -F -%CHAR: -70593 -35278 (f) @t --67530 -35278 m --67530 -19397 L --70264 -19397 L --70264 -16986 L --67530 -16986 L --67530 -15040 l --67530 -13811 -67418 -12894 -67200 -12300 c --66901 -11495 -66377 -10842 -65625 -10342 c --64872 -9843 -63820 -9596 -62461 -9596 c --61591 -9596 -60627 -9696 -59569 -9907 C --60033 -12612 L --60674 -12494 -61285 -12435 -61862 -12435 c --62802 -12435 -63467 -12635 -63855 -13041 c --64249 -13441 -64443 -14194 -64443 -15299 c --64443 -16986 L --60880 -16986 L --60880 -19397 L --64443 -19397 L --64443 -35278 L --67530 -35278 L -@c -F -%CHAR: -60786 -35278 (r) @t --58493 -35278 m --58493 -16986 L --55706 -16986 L --55706 -19756 L --54995 -18462 -54336 -17604 -53730 -17192 c --53131 -16781 -52466 -16569 -51743 -16569 c --50696 -16569 -49638 -16904 -48556 -17568 C --49626 -20449 L --50379 -19997 -51137 -19773 -51896 -19773 c --52578 -19773 -53184 -19979 -53725 -20385 c --54265 -20796 -54648 -21361 -54877 -22084 c --55224 -23184 -55394 -24389 -55394 -25700 c --55394 -35278 L --58493 -35278 L -@c -F -%CHAR: -49038 -35278 (o) @t --47868 -26129 m --47868 -22743 -46927 -20232 -45040 -18603 c --43470 -17251 -41553 -16569 -39290 -16569 c --36773 -16569 -34715 -17392 -33122 -19044 c --31522 -20691 -30729 -22966 -30729 -25871 c --30729 -28228 -31081 -30080 -31787 -31427 c --32493 -32779 -33522 -33826 -34868 -34572 c --36220 -35319 -37690 -35690 -39290 -35690 c --41847 -35690 -43917 -34872 -45498 -33226 c --47080 -31586 -47868 -29222 -47868 -26129 c -@c --44681 -26129 m --44681 -28475 -44170 -30227 -43147 -31392 c --42124 -32562 -40836 -33144 -39290 -33144 c --37749 -33144 -36467 -32556 -35444 -31386 c --34427 -30216 -33915 -28428 -33915 -26029 c --33915 -23766 -34427 -22049 -35456 -20885 c --36485 -19720 -37761 -19138 -39290 -19138 c --40836 -19138 -42124 -19720 -43147 -20879 c --44170 -22037 -44681 -23789 -44681 -26129 c -@c -F -%CHAR: -29423 -35278 (n) @t --27095 -35278 m --27095 -16986 L --24308 -16986 L --24308 -19585 L --22961 -17574 -21021 -16569 -18487 -16569 c --17381 -16569 -16370 -16769 -15447 -17163 c --14518 -17563 -13830 -18080 -13372 -18727 c --12907 -19368 -12590 -20132 -12401 -21014 c --12290 -21590 -12231 -22596 -12231 -24030 c --12231 -35278 L --15335 -35278 L --15335 -24148 l --15335 -22890 -15453 -21943 -15694 -21314 c --15935 -20691 -16364 -20191 -16976 -19820 c --17593 -19444 -18310 -19256 -19139 -19256 c --20462 -19256 -21597 -19679 -22561 -20514 c --23520 -21355 -23996 -22942 -23996 -25288 c --23996 -35278 L --27095 -35278 L -@c -F -%CHAR: -9808 -35278 (t) @t --712 -32503 m --265 -35243 L --1135 -35425 -1917 -35519 -2605 -35519 c --3734 -35519 -4604 -35343 -5228 -34984 c --5845 -34631 -6280 -34161 -6533 -33579 c --6786 -33003 -6915 -31780 -6915 -29922 c --6915 -19397 L --9191 -19397 L --9191 -16986 L --6915 -16986 L --6915 -12453 L --3828 -10595 L --3828 -16986 L --712 -16986 L --712 -19397 L --3828 -19397 L --3828 -30092 l --3828 -30980 -3775 -31544 -3670 -31797 c --3558 -32050 -3382 -32250 -3135 -32403 c --2888 -32550 -2535 -32626 -2076 -32626 c --1729 -32626 -1277 -32585 -712 -32503 C -@c -F -%CHAR: -1 -35278 (-) @t -1116 -27699 m -1116 -24583 L -10647 -24583 L -10647 -27699 L -1116 -27699 L -@c -F -%CHAR: 11747 -35278 (e) @t -26593 -29387 m -29798 -29781 L -29292 -31656 28357 -33108 26993 -34143 c -25623 -35172 23877 -35690 21754 -35690 c -19079 -35690 16956 -34866 15392 -33220 c -13823 -31574 13041 -29263 13041 -26288 c -13041 -23207 13834 -20820 15416 -19121 c -17003 -17421 19055 -16569 21584 -16569 c -24030 -16569 26029 -17404 27575 -19068 c -29127 -20732 29903 -23078 29903 -26094 c -29903 -26282 29898 -26558 29886 -26923 C -16245 -26923 L -16357 -28934 16927 -30474 17950 -31539 c -18973 -32609 20243 -33144 21772 -33144 c -22907 -33144 23877 -32844 24682 -32244 c -25488 -31650 26123 -30698 26593 -29387 C -@c -16415 -24371 m -26628 -24371 L -26493 -22837 26099 -21678 25458 -20914 c -24471 -19720 23189 -19121 21619 -19121 c -20196 -19121 18997 -19597 18026 -20549 c -17056 -21502 16521 -22778 16415 -24371 C -@c -F -%CHAR: 31362 -35278 (n) @t -33690 -35278 m -33690 -16986 L -36477 -16986 L -36477 -19585 L -37824 -17574 39764 -16569 42298 -16569 c -43404 -16569 44415 -16769 45338 -17163 c -46267 -17563 46955 -18080 47413 -18727 c -47878 -19368 48195 -20132 48384 -21014 c -48495 -21590 48554 -22596 48554 -24030 c -48554 -35278 L -45450 -35278 L -45450 -24148 l -45450 -22890 45332 -21943 45091 -21314 c -44850 -20691 44421 -20191 43809 -19820 c -43192 -19444 42475 -19256 41646 -19256 c -40323 -19256 39188 -19679 38224 -20514 c -37265 -21355 36789 -22942 36789 -25288 c -36789 -35278 L -33690 -35278 L -@c -F -%CHAR: 50977 -35278 (d) @t -65171 -35278 m -65171 -32967 L -64012 -34784 62307 -35690 60055 -35690 c -58597 -35690 57256 -35290 56034 -34484 c -54811 -33685 53864 -32562 53188 -31115 c -52517 -29675 52182 -28022 52182 -26147 c -52182 -24324 52488 -22666 53094 -21179 c -53705 -19691 54617 -18550 55834 -17762 c -57051 -16969 58415 -16569 59920 -16569 c -61019 -16569 62001 -16804 62860 -17269 c -63724 -17733 64424 -18339 64965 -19085 C -64965 -10025 L -68046 -10025 L -68046 -35278 L -65171 -35278 L -@c -55369 -26147 m -55369 -28493 55863 -30245 56851 -31403 c -57839 -32562 59003 -33144 60349 -33144 c -61702 -33144 62854 -32585 63801 -31480 c -64747 -30374 65223 -28681 65223 -26406 c -65223 -23901 64741 -22066 63777 -20896 c -62813 -19720 61625 -19138 60208 -19138 c -58832 -19138 57680 -19703 56757 -20826 c -55834 -21949 55369 -23724 55369 -26147 c -@c -F -T -@rax 364.10003 760.56917 450.19757 769.95411 @E -[0.00028346 0.00000000 0.00000000 0.00028346 407.35557565 762.67414533] @tm - 0 O 0 @g -0.00 0.00 0.00 1.00 k -e - -% FontChange:/_ArialCE 35278.00000 z -%CHAR: -152596 0 (J) @t --151579 7167 m --148563 7579 L --148486 5650 -148122 4327 -147481 3616 c --146834 2905 -145946 2552 -144811 2552 c --143971 2552 -143247 2740 -142642 3128 c --142030 3510 -141613 4033 -141383 4692 c --141154 5356 -141037 6409 -141037 7855 c --141037 25253 L --137697 25253 L --137697 8043 l --137697 5933 -137950 4292 -138461 3134 c --138973 1976 -139784 1094 -140890 482 c --142001 -123 -143300 -429 -144794 -429 c --147010 -429 -148704 206 -149885 1482 c --151061 2758 -151626 4651 -151579 7167 C -@c -F -%CHAR: -134957 0 (P) @t --132235 0 m --132235 25253 L --122710 25253 l --121034 25253 -119752 25171 -118870 25012 c --117630 24806 -116589 24412 -115748 23830 c --114913 23254 -114237 22437 -113726 21396 c --113214 20350 -112961 19203 -112961 17951 c --112961 15805 -113643 13982 -115007 12494 c --116377 11013 -118847 10266 -122416 10266 c --128895 10266 L --128895 0 L --132235 0 L -@c --128895 13247 m --122363 13247 l --120205 13247 -118670 13647 -117765 14452 c --116859 15258 -116407 16387 -116407 17845 c --116407 18903 -116671 19809 -117206 20561 c --117741 21314 -118441 21808 -119317 22049 c --119882 22196 -120916 22272 -122433 22272 c --128895 22272 L --128895 13247 L -@c -F -%CHAR: -102255 0 (P) @t --99533 0 m --99533 25253 L --90008 25253 l --88332 25253 -87050 25171 -86168 25012 c --84928 24806 -83887 24412 -83046 23830 c --82211 23254 -81535 22437 -81024 21396 c --80512 20350 -80259 19203 -80259 17951 c --80259 15805 -80941 13982 -82305 12494 c --83675 11013 -86145 10266 -89714 10266 c --96193 10266 L --96193 0 L --99533 0 L -@c --96193 13247 m --89661 13247 l --87503 13247 -85968 13647 -85063 14452 c --84157 15258 -83705 16387 -83705 17845 c --83705 18903 -83969 19809 -84504 20561 c --85039 21314 -85739 21808 -86615 22049 c --87180 22196 -88214 22272 -89731 22272 c --96193 22272 L --96193 13247 L -@c -F -%CHAR: -78725 0 (r) @t --76432 0 m --76432 18292 L --73645 18292 L --73645 15522 L --72934 16816 -72275 17674 -71669 18086 c --71070 18497 -70405 18709 -69682 18709 c --68635 18709 -67577 18374 -66495 17710 C --67565 14829 L --68318 15281 -69076 15505 -69835 15505 c --70517 15505 -71123 15299 -71664 14893 c --72204 14482 -72587 13917 -72816 13194 c --73163 12094 -73333 10889 -73333 9578 c --73333 0 L --76432 0 L -@c -F -%CHAR: -66977 0 (i) @t --64637 21684 m --64637 25253 L --61532 25253 L --61532 21684 L --64637 21684 L -@c --64637 0 m --64637 18292 L --61532 18292 L --61532 0 L --64637 0 L -@c -F -%CHAR: -59145 0 (m) @t --56817 0 m --56817 18292 L --54047 18292 L --54047 15728 L --53471 16622 -52707 17345 -51754 17886 c --50802 18433 -49714 18709 -48497 18709 c --47145 18709 -46033 18427 -45169 17862 c --44299 17298 -43687 16516 -43335 15505 C --41882 17639 -40001 18709 -37684 18709 c --35867 18709 -34474 18203 -33498 17198 c --32522 16193 -32034 14646 -32034 12559 c --32034 0 L --35115 0 L --35115 11524 l --35115 12765 -35215 13658 -35415 14205 c --35620 14746 -35985 15187 -36508 15522 c --37037 15852 -37661 16022 -38372 16022 c --39660 16022 -40724 15593 -41577 14734 c --42423 13882 -42852 12512 -42852 10630 c --42852 0 L --45951 0 L --45951 11883 l --45951 13265 -46204 14299 -46710 14987 c --47215 15675 -48038 16022 -49191 16022 c --50061 16022 -50866 15793 -51607 15328 c --52348 14870 -52889 14199 -53218 13317 c --53553 12430 -53718 11154 -53718 9490 c --53718 0 L --56817 0 L -@c -F -%CHAR: -29758 0 (a) @t --15494 2258 m --16646 1282 -17752 594 -18810 188 c --19874 -212 -21015 -412 -22232 -412 c --24243 -412 -25783 76 -26865 1058 c --27941 2040 -28482 3298 -28482 4821 c --28482 5721 -28282 6538 -27871 7279 c --27465 8020 -26930 8614 -26271 9061 c --25607 9507 -24866 9848 -24037 10078 c --23431 10236 -22514 10395 -21285 10542 c --18781 10842 -16934 11195 -15753 11612 C --15741 12036 -15735 12306 -15735 12418 c --15735 13682 -16029 14576 -16617 15087 c --17405 15793 -18587 16140 -20145 16140 c --21603 16140 -22679 15887 -23379 15375 c --24072 14864 -24584 13958 -24919 12659 C --27947 13076 L --27671 14370 -27218 15422 -26589 16216 c --25960 17016 -25043 17633 -23849 18062 c --22655 18492 -21274 18709 -19698 18709 c --18134 18709 -16870 18521 -15894 18156 c --14918 17786 -14200 17327 -13736 16769 c --13277 16210 -12960 15511 -12772 14658 c --12672 14129 -12619 13176 -12619 11800 c --12619 7667 l --12619 4780 -12554 2957 -12419 2199 c --12290 1435 -12025 700 -11637 0 C --14877 0 L --15194 641 -15406 1393 -15494 2258 C -@c --15753 9184 m --16882 8720 -18569 8331 -20815 8008 c --22091 7826 -22996 7620 -23520 7391 c --24049 7161 -24460 6826 -24743 6379 c --25031 5938 -25178 5450 -25178 4910 c --25178 4080 -24860 3393 -24237 2840 c --23614 2293 -22697 2017 -21491 2017 c --20298 2017 -19233 2275 -18304 2799 c --17375 3322 -16688 4039 -16252 4945 c --15917 5644 -15753 6679 -15753 8043 c --15753 9184 L -@c -F -%CHAR: -10143 0 (r) @t --7850 0 m --7850 18292 L --5063 18292 L --5063 15522 L --4352 16816 -3693 17674 -3087 18086 c --2488 18497 -1823 18709 -1100 18709 c --53 18709 1005 18374 2087 17710 C -1017 14829 L -264 15281 -494 15505 -1253 15505 c --1935 15505 -2541 15299 -3082 14893 c --3622 14482 -4005 13917 -4234 13194 c --4581 12094 -4751 10889 -4751 9578 c --4751 0 L --7850 0 L -@c -F -%CHAR: 1605 0 (y) @t -3792 -7044 m -3445 -4133 L -4127 -4316 4715 -4410 5221 -4410 c -5909 -4410 6462 -4292 6873 -4063 c -7291 -3834 7626 -3516 7890 -3099 c -8090 -2793 8402 -2023 8837 -794 c -8896 -617 8990 -370 9113 -35 C -2175 18292 L -5515 18292 L -9325 7702 l -9813 6356 10260 4945 10648 3463 C -11007 4886 11430 6274 11924 7632 c -15834 18292 L -18932 18292 L -11977 -312 l -11230 -2322 10648 -3704 10236 -4463 c -9684 -5486 9055 -6232 8343 -6709 c -7626 -7185 6779 -7426 5791 -7426 c -5192 -7426 4527 -7297 3792 -7044 C -@c -F -%CHAR: 29051 0 (S) @t -30639 8114 m -33790 8390 L -33937 7126 34284 6091 34831 5280 c -35378 4469 36224 3816 37371 3316 c -38517 2816 39811 2569 41245 2569 c -42521 2569 43644 2758 44620 3134 c -45596 3516 46325 4033 46802 4692 c -47278 5356 47519 6074 47519 6856 c -47519 7649 47290 8337 46825 8931 c -46367 9525 45608 10019 44556 10419 c -43874 10683 42380 11095 40058 11653 c -37741 12212 36112 12735 35183 13229 c -33978 13858 33079 14646 32485 15581 c -31897 16516 31603 17563 31603 18727 c -31603 19997 31961 21190 32685 22296 c -33408 23407 34466 24248 35854 24824 c -37247 25394 38788 25682 40487 25682 c -42363 25682 44009 25383 45444 24777 c -46872 24177 47972 23289 48742 22119 c -49506 20949 49924 19620 49983 18139 C -46778 17898 L -46602 19491 46020 20702 45026 21514 c -44032 22331 42568 22737 40628 22737 c -38605 22737 37136 22366 36207 21625 c -35283 20885 34819 19991 34819 18950 c -34819 18039 35148 17292 35801 16710 c -36448 16122 38123 15522 40840 14911 c -43556 14293 45420 13758 46431 13300 c -47901 12618 48989 11759 49689 10725 c -50388 9684 50735 8484 50735 7132 c -50735 5786 50353 4521 49583 3334 c -48813 2146 47707 1223 46267 559 c -44826 -100 43203 -429 41404 -429 c -39117 -429 37200 -100 35660 570 c -34113 1235 32902 2234 32020 3575 c -31144 4910 30680 6426 30639 8114 C -@c -F -%CHAR: 52581 0 (t) @t -61677 2775 m -62124 35 L -61254 -147 60472 -241 59784 -241 c -58655 -241 57785 -65 57161 294 c -56544 647 56109 1117 55856 1699 c -55603 2275 55474 3498 55474 5356 c -55474 15881 L -53198 15881 L -53198 18292 L -55474 18292 L -55474 22825 L -58561 24683 L -58561 18292 L -61677 18292 L -61677 15881 L -58561 15881 L -58561 5186 l -58561 4298 58614 3734 58719 3481 c -58831 3228 59007 3028 59254 2875 c -59501 2728 59854 2652 60313 2652 c -60660 2652 61112 2693 61677 2775 C -@c -F -%CHAR: 62388 0 (o) @t -63558 9149 m -63558 12535 64499 15046 66386 16675 c -67956 18027 69873 18709 72136 18709 c -74653 18709 76711 17886 78304 16234 c -79904 14587 80697 12312 80697 9407 c -80697 7050 80345 5198 79639 3851 c -78933 2499 77904 1452 76558 706 c -75206 -41 73736 -412 72136 -412 c -69579 -412 67509 406 65928 2052 c -64346 3692 63558 6056 63558 9149 c -@c -66745 9149 m -66745 6803 67256 5051 68279 3886 c -69302 2716 70590 2134 72136 2134 c -73677 2134 74959 2722 75982 3892 c -76999 5062 77511 6850 77511 9249 c -77511 11512 76999 13229 75970 14393 c -74941 15558 73665 16140 72136 16140 c -70590 16140 69302 15558 68279 14399 c -67256 13241 66745 11489 66745 9149 c -@c -F -%CHAR: 82003 0 (r) @t -84296 0 m -84296 18292 L -87083 18292 L -87083 15522 L -87794 16816 88453 17674 89059 18086 c -89658 18497 90323 18709 91046 18709 c -92093 18709 93151 18374 94233 17710 C -93163 14829 L -92410 15281 91652 15505 90893 15505 c -90211 15505 89605 15299 89064 14893 c -88524 14482 88141 13917 87912 13194 c -87565 12094 87395 10889 87395 9578 c -87395 0 L -84296 0 L -@c -F -%CHAR: 93751 0 (a) @t -108015 2258 m -106863 1282 105757 594 104699 188 c -103635 -212 102494 -412 101277 -412 c -99266 -412 97726 76 96644 1058 c -95568 2040 95027 3298 95027 4821 c -95027 5721 95227 6538 95638 7279 c -96044 8020 96579 8614 97238 9061 c -97902 9507 98643 9848 99472 10078 c -100078 10236 100995 10395 102224 10542 c -104728 10842 106575 11195 107756 11612 C -107768 12036 107774 12306 107774 12418 c -107774 13682 107480 14576 106892 15087 c -106104 15793 104922 16140 103364 16140 c -101906 16140 100830 15887 100130 15375 c -99437 14864 98925 13958 98590 12659 C -95562 13076 L -95838 14370 96291 15422 96920 16216 c -97549 17016 98466 17633 99660 18062 c -100854 18492 102235 18709 103811 18709 c -105375 18709 106639 18521 107615 18156 c -108591 17786 109309 17327 109773 16769 c -110232 16210 110549 15511 110737 14658 c -110837 14129 110890 13176 110890 11800 c -110890 7667 l -110890 4780 110955 2957 111090 2199 c -111219 1435 111484 700 111872 0 C -108632 0 L -108315 641 108103 1393 108015 2258 C -@c -107756 9184 m -106627 8720 104940 8331 102694 8008 c -101418 7826 100513 7620 99989 7391 c -99460 7161 99049 6826 98766 6379 c -98478 5938 98331 5450 98331 4910 c -98331 4080 98649 3393 99272 2840 c -99895 2293 100812 2017 102018 2017 c -103211 2017 104276 2275 105205 2799 c -106134 3322 106821 4039 107257 4945 c -107592 5644 107756 6679 107756 8043 c -107756 9184 L -@c -F -%CHAR: 113366 0 (g) @t -115124 -1517 m -118140 -1964 L -118264 -2893 118617 -3569 119187 -3998 c -119957 -4569 121010 -4857 122338 -4857 c -123779 -4857 124884 -4569 125666 -3998 c -126448 -3422 126972 -2616 127248 -1588 c -127413 -953 127483 370 127471 2393 C -126119 800 124432 0 122409 0 c -119892 0 117946 905 116570 2722 c -115195 4533 114501 6715 114501 9249 c -114501 10995 114818 12606 115447 14082 c -116082 15558 117000 16698 118199 17504 c -119399 18303 120810 18709 122427 18709 c -124584 18709 126366 17833 127765 16087 C -127765 18292 L -130629 18292 L -130629 2481 l -130629 -365 130335 -2387 129759 -3575 c -129176 -4763 128259 -5703 127001 -6391 c -125743 -7079 124196 -7426 122356 -7426 c -120175 -7426 118411 -6932 117070 -5950 c -115724 -4968 115077 -3493 115124 -1517 C -@c -117688 9472 m -117688 7073 118164 5321 119122 4222 c -120075 3116 121268 2569 122703 2569 c -124126 2569 125319 3116 126284 4210 c -127248 5309 127730 7026 127730 9372 c -127730 11612 127236 13300 126242 14435 c -125249 15569 124049 16140 122650 16140 c -121274 16140 120104 15581 119134 14458 c -118170 13341 117688 11677 117688 9472 c -@c -F -%CHAR: 132981 0 (e) @t -147827 5891 m -151032 5497 L -150526 3622 149591 2170 148227 1135 c -146857 106 145111 -412 142988 -412 c -140313 -412 138190 412 136626 2058 c -135057 3704 134275 6015 134275 8990 c -134275 12071 135068 14458 136650 16157 c -138237 17857 140289 18709 142818 18709 c -145264 18709 147263 17874 148809 16210 c -150361 14546 151137 12200 151137 9184 c -151137 8996 151132 8720 151120 8355 C -137479 8355 L -137591 6344 138161 4804 139184 3739 c -140207 2669 141477 2134 143006 2134 c -144141 2134 145111 2434 145916 3034 c -146722 3628 147357 4580 147827 5891 C -@c -137649 10907 m -147862 10907 L -147727 12441 147333 13600 146692 14364 c -145705 15558 144423 16157 142853 16157 c -141430 16157 140231 15681 139260 14729 c -138290 13776 137755 12500 137649 10907 C -@c -F -T -@rax 401.58879 657.52299 431.04161 671.34274 @E -[0.00028346 0.00000000 0.00000000 0.00028346 416.48058319 665.61616463] @tm - 0 O 0 @g -0.00 0.00 0.00 1.00 k -e - -% FontChange:/_ArialCE 28222.00000 z -%CHAR: -52535 0 (R) @t --50315 0 m --50315 20202 L --41359 20202 l --39558 20202 -38189 20019 -37253 19657 c --36317 19294 -35569 18655 -35004 17738 c --34445 16816 -34167 15800 -34167 14690 c --34167 13255 -34628 12051 -35559 11068 c --36486 10085 -37921 9459 -39859 9191 C --39148 8852 -38612 8518 -38245 8184 c --37464 7469 -36726 6571 -36025 5499 c --32511 0 L --35875 0 L --38546 4205 l --39327 5414 -39972 6345 -40480 6985 c --40983 7629 -41434 8081 -41834 8335 c --42234 8594 -42638 8772 -43052 8876 c --43358 8937 -43852 8970 -44543 8970 c --47643 8970 L --47643 0 L --50315 0 L -@c --47643 11284 m --41895 11284 l --40677 11284 -39718 11411 -39031 11665 c --38339 11919 -37817 12324 -37460 12879 c --37102 13434 -36924 14036 -36924 14690 c --36924 15644 -37267 16430 -37963 17046 c --38654 17662 -39750 17968 -41251 17968 c --47643 17968 L --47643 11284 L -@c -F -%CHAR: -32159 0 (e) @t --20282 4713 m --17719 4398 L --18123 2897 -18871 1736 -19962 908 c --21058 85 -22455 -329 -24153 -329 c --26294 -329 -27992 329 -29243 1646 c --30499 2963 -31124 4812 -31124 7192 c --31124 9657 -30489 11566 -29224 12926 c --27954 14285 -26312 14967 -24290 14967 c --22333 14967 -20734 14299 -19497 12968 c --18255 11637 -17634 9760 -17634 7347 c --17634 7197 -17639 6976 -17648 6684 C --28561 6684 L --28471 5075 -28015 3843 -27197 2992 c --26378 2135 -25362 1707 -24139 1707 c --23231 1707 -22455 1947 -21811 2427 c --21167 2902 -20659 3664 -20282 4713 C -@c --28424 8725 m --20254 8725 L --20362 9953 -20677 10880 -21190 11491 c --21980 12446 -23006 12926 -24262 12926 c --25400 12926 -26359 12545 -27135 11783 c --27912 11021 -28340 10000 -28424 8725 C -@c -F -%CHAR: -16468 0 (t) @t --9191 2220 m --8834 28 L --9530 -118 -10156 -193 -10706 -193 c --11609 -193 -12305 -52 -12804 235 c --13298 517 -13646 894 -13848 1359 c --14050 1820 -14154 2799 -14154 4285 c --14154 12705 L --15974 12705 L --15974 14633 L --14154 14633 L --14154 18260 L --11684 19746 L --11684 14633 L --9191 14633 L --9191 12705 L --11684 12705 L --11684 4149 l --11684 3438 -11642 2987 -11557 2785 c --11468 2582 -11327 2422 -11129 2300 c --10932 2183 -10650 2121 -10283 2121 c --10005 2121 -9643 2154 -9191 2220 C -@c -F -%CHAR: -8622 0 (r) @t --6788 0 m --6788 14633 L --4558 14633 L --4558 12418 L --3989 13452 -3462 14139 -2978 14468 c --2498 14798 -1966 14967 -1388 14967 c --551 14967 296 14699 1162 14167 C -306 11863 L --297 12225 -903 12404 -1510 12404 c --2056 12404 -2540 12239 -2973 11914 c --3406 11585 -3711 11134 -3895 10555 c --4172 9675 -4309 8711 -4309 7662 c --4309 0 L --6788 0 L -@c -F -%CHAR: 776 0 (i) @t -2648 17347 m -2648 20202 L -5132 20202 L -5132 17347 L -2648 17347 L -@c -2648 0 m -2648 14633 L -5132 14633 L -5132 0 L -2648 0 L -@c -F -%CHAR: 7041 0 (e) @t -18918 4713 m -21481 4398 L -21077 2897 20329 1736 19238 908 c -18142 85 16745 -329 15047 -329 c -12906 -329 11208 329 9957 1646 c -8701 2963 8076 4812 8076 7192 c -8076 9657 8711 11566 9976 12926 c -11246 14285 12888 14967 14910 14967 c -16867 14967 18466 14299 19703 12968 c -20945 11637 21566 9760 21566 7347 c -21566 7197 21561 6976 21552 6684 C -10639 6684 L -10729 5075 11185 3843 12003 2992 c -12822 2135 13838 1707 15061 1707 c -15969 1707 16745 1947 17389 2427 c -18033 2902 18541 3664 18918 4713 C -@c -10776 8725 m -18946 8725 L -18838 9953 18523 10880 18010 11491 c -17220 12446 16194 12926 14938 12926 c -13800 12926 12841 12545 12065 11783 c -11288 11021 10860 10000 10776 8725 C -@c -F -%CHAR: 22732 0 (v) @t -28659 0 m -23089 14633 L -25709 14633 L -28851 5870 l -29190 4925 29501 3942 29788 2921 C -30009 3692 30314 4619 30709 5706 c -33964 14633 L -36514 14633 L -30973 0 L -28659 0 L -@c -F -%CHAR: 36843 0 (e) @t -48720 4713 m -51283 4398 L -50879 2897 50131 1736 49040 908 c -47944 85 46547 -329 44849 -329 c -42708 -329 41010 329 39759 1646 c -38503 2963 37878 4812 37878 7192 c -37878 9657 38513 11566 39778 12926 c -41048 14285 42690 14967 44712 14967 c -46669 14967 48268 14299 49505 12968 c -50747 11637 51368 9760 51368 7347 c -51368 7197 51363 6976 51354 6684 C -40441 6684 L -40531 5075 40987 3843 41805 2992 c -42624 2135 43640 1707 44863 1707 c -45771 1707 46547 1947 47191 2427 c -47835 2902 48343 3664 48720 4713 C -@c -40578 8725 m -48748 8725 L -48640 9953 48325 10880 47812 11491 c -47022 12446 45996 12926 44740 12926 c -43602 12926 42643 12545 41867 11783 c -41090 11021 40662 10000 40578 8725 C -@c -F -%CHAR: -51745 -28222 (r) @t --49911 -28222 m --49911 -13589 L --47681 -13589 L --47681 -15804 L --47112 -14770 -46585 -14083 -46101 -13754 c --45621 -13424 -45089 -13255 -44511 -13255 c --43674 -13255 -42827 -13523 -41961 -14055 C --42817 -16359 L --43420 -15997 -44026 -15818 -44633 -15818 c --45179 -15818 -45663 -15983 -46096 -16308 c --46529 -16637 -46834 -17088 -47018 -17667 c --47295 -18547 -47432 -19511 -47432 -20560 c --47432 -28222 L --49911 -28222 L -@c -F -%CHAR: -42347 -28222 (a) @t --30936 -26416 m --31858 -27197 -32742 -27747 -33589 -28071 c --34440 -28391 -35353 -28551 -36326 -28551 c --37935 -28551 -39167 -28161 -40033 -27375 c --40894 -26590 -41326 -25583 -41326 -24365 c --41326 -23645 -41166 -22992 -40837 -22399 c --40513 -21806 -40085 -21331 -39558 -20974 c --39026 -20616 -38434 -20343 -37770 -20160 c --37286 -20033 -36552 -19906 -35569 -19788 c --33565 -19548 -32088 -19266 -31143 -18932 C --31133 -18594 -31129 -18377 -31129 -18288 c --31129 -17277 -31364 -16562 -31834 -16152 c --32465 -15588 -33410 -15310 -34657 -15310 c --35823 -15310 -36684 -15513 -37244 -15922 c --37799 -16331 -38208 -17055 -38476 -18095 C --40898 -17761 L --40677 -16726 -40315 -15884 -39812 -15249 c --39308 -14610 -38575 -14116 -37620 -13772 c --36665 -13429 -35560 -13255 -34299 -13255 c --33048 -13255 -32037 -13405 -31256 -13697 c --30475 -13993 -29901 -14360 -29530 -14807 c --29163 -15254 -28909 -15814 -28758 -16496 c --28678 -16919 -28636 -17681 -28636 -18782 c --28636 -22088 l --28636 -24398 -28584 -25856 -28476 -26463 c --28372 -27074 -28161 -27662 -27850 -28222 C --30442 -28222 L --30696 -27709 -30865 -27107 -30936 -26416 C -@c --31143 -20875 m --32046 -21246 -33396 -21557 -35193 -21816 c --36213 -21961 -36938 -22126 -37356 -22309 c --37780 -22493 -38109 -22761 -38335 -23119 c --38565 -23471 -38683 -23862 -38683 -24294 c --38683 -24958 -38429 -25508 -37930 -25950 c --37432 -26388 -36698 -26609 -35734 -26609 c --34779 -26609 -33927 -26402 -33184 -25983 c --32441 -25564 -31891 -24991 -31543 -24266 c --31275 -23706 -31143 -22879 -31143 -21787 c --31143 -20875 L -@c -F -%CHAR: -26656 -28222 (w) @t --22093 -28222 m --26571 -13589 L --24008 -13589 L --21680 -22037 L --20814 -25179 L --20776 -25019 -20522 -24012 -20057 -22159 c --17728 -13589 L --15179 -13589 L --12987 -22074 L --12253 -24873 L --11416 -22046 L --8909 -13589 L --6496 -13589 L --11073 -28222 L --13646 -28222 L --15974 -19459 L --16543 -16961 L --19502 -28222 L --22093 -28222 L -@c -F -%CHAR: 1566 -28222 (f) @t -4017 -28222 m -4017 -15517 L -1829 -15517 L -1829 -13589 L -4017 -13589 L -4017 -12032 l -4017 -11049 4106 -10315 4280 -9840 c -4520 -9196 4939 -8674 5541 -8274 c -6143 -7874 6985 -7676 8071 -7676 c -8767 -7676 9539 -7756 10385 -7926 C -10014 -10089 L -9501 -9995 9012 -9948 8551 -9948 c -7798 -9948 7267 -10108 6956 -10433 c -6641 -10753 6486 -11355 6486 -12239 c -6486 -13589 L -9336 -13589 L -9336 -15517 L -6486 -15517 L -6486 -28222 L -4017 -28222 L -@c -F -%CHAR: 9412 -28222 (i) @t -11284 -10875 m -11284 -8020 L -13768 -8020 L -13768 -10875 L -11284 -10875 L -@c -11284 -28222 m -11284 -13589 L -13768 -13589 L -13768 -28222 L -11284 -28222 L -@c -F -%CHAR: 15677 -28222 (l) @t -17483 -28222 m -17483 -8020 L -19962 -8020 L -19962 -28222 L -17483 -28222 L -@c -F -%CHAR: 21942 -28222 (e) @t -33819 -23509 m -36382 -23824 L -35978 -25325 35230 -26486 34139 -27314 c -33043 -28137 31646 -28551 29948 -28551 c -27807 -28551 26109 -27893 24858 -26576 c -23602 -25259 22977 -23410 22977 -21030 c -22977 -18565 23612 -16656 24877 -15296 c -26147 -13937 27789 -13255 29811 -13255 c -31768 -13255 33367 -13923 34604 -15254 c -35846 -16585 36467 -18462 36467 -20875 c -36467 -21025 36462 -21246 36453 -21538 C -25540 -21538 L -25630 -23147 26086 -24379 26904 -25230 c -27723 -26087 28739 -26515 29962 -26515 c -30870 -26515 31646 -26275 32290 -25795 c -32934 -25320 33442 -24558 33819 -23509 C -@c -25677 -19497 m -33847 -19497 L -33739 -18269 33424 -17342 32911 -16731 c -32121 -15776 31095 -15296 29839 -15296 c -28701 -15296 27742 -15677 26966 -16439 c -26189 -17201 25761 -18222 25677 -19497 C -@c -F -%CHAR: 37633 -28222 (s) @t -38503 -23852 m -40954 -23467 L -41090 -24450 41476 -25202 42106 -25729 c -42732 -26251 43611 -26515 44745 -26515 c -45883 -26515 46730 -26279 47280 -25818 c -47831 -25353 48108 -24807 48108 -24186 c -48108 -23622 47863 -23184 47374 -22860 c -47036 -22639 46189 -22361 44839 -22023 c -43023 -21562 41758 -21166 41057 -20828 c -40356 -20494 39820 -20028 39458 -19436 c -39096 -18843 38912 -18189 38912 -17474 c -38912 -16820 39063 -16218 39364 -15663 c -39660 -15103 40069 -14643 40582 -14276 c -40968 -13993 41495 -13749 42158 -13551 c -42826 -13354 43541 -13255 44303 -13255 c -45450 -13255 46457 -13424 47327 -13754 c -48197 -14083 48837 -14530 49251 -15094 c -49665 -15663 49947 -16416 50102 -17361 C -47680 -17695 L -47567 -16943 47247 -16355 46720 -15931 c -46194 -15508 45446 -15296 44482 -15296 c -43343 -15296 42530 -15484 42045 -15861 c -41556 -16237 41311 -16679 41311 -17182 c -41311 -17507 41415 -17794 41617 -18053 c -41819 -18321 42134 -18537 42567 -18716 c -42816 -18805 43546 -19017 44759 -19346 c -46514 -19817 47736 -20198 48428 -20499 c -49124 -20795 49670 -21232 50065 -21801 c -50460 -22371 50657 -23076 50657 -23923 c -50657 -24751 50413 -25527 49933 -26261 c -49449 -26990 48752 -27554 47845 -27954 c -46937 -28354 45907 -28551 44759 -28551 c -42854 -28551 41405 -28156 40408 -27366 c -39411 -26576 38776 -25405 38503 -23852 C -@c -F -T -@rax %Note: Object -362.81792 577.71128 456.05225 619.14898 @E - 0 O 0 @g -0.00 0.00 0.00 0.50 k -/$fm 0 def -362.81792 619.14898 m -456.05225 619.14898 L -456.05225 577.71128 L -362.81792 577.71128 L -362.81792 619.14898 L -@c -F - -@rax %Note: Object -359.83786 581.68318 452.91203 623.04945 @E - 0 O 0 @g -0.00 0.00 0.00 0.00 k -0 J 0 j [] 0 d 0 R 0 @G -0.00 0.00 0.00 1.00 K -0 0.49890 0.49890 0.00000 @w -/$fm 0 def -359.83786 623.04945 m -452.91203 623.04945 L -452.91203 581.68318 L -359.83786 581.68318 L -359.83786 623.04945 L -@c -B - -@rax 370.77279 593.58076 442.60044 610.97754 @E -[0.00028346 0.00000000 0.00000000 0.00028346 406.89352842 603.69758422] @tm - 0 O 0 @g -0.00 0.00 0.00 1.00 k -e - -% FontChange:/_ArialCE 35278.00000 z -%CHAR: -127426 0 (P) @t --124704 0 m --124704 25253 L --115179 25253 l --113503 25253 -112221 25171 -111339 25012 c --110099 24806 -109058 24412 -108217 23830 c --107382 23254 -106706 22437 -106195 21396 c --105683 20350 -105430 19203 -105430 17951 c --105430 15805 -106112 13982 -107476 12494 c --108846 11013 -111316 10266 -114885 10266 c --121364 10266 L --121364 0 L --124704 0 L -@c --121364 13247 m --114832 13247 l --112674 13247 -111139 13647 -110234 14452 c --109328 15258 -108876 16387 -108876 17845 c --108876 18903 -109140 19809 -109675 20561 c --110210 21314 -110910 21808 -111786 22049 c --112351 22196 -113385 22272 -114902 22272 c --121364 22272 L --121364 13247 L -@c -F -%CHAR: -103896 0 (r) @t --101603 0 m --101603 18292 L --98816 18292 L --98816 15522 L --98105 16816 -97446 17674 -96840 18086 c --96241 18497 -95576 18709 -94853 18709 c --93806 18709 -92748 18374 -91666 17710 C --92736 14829 L --93489 15281 -94247 15505 -95006 15505 c --95688 15505 -96294 15299 -96835 14893 c --97375 14482 -97758 13917 -97987 13194 c --98334 12094 -98504 10889 -98504 9578 c --98504 0 L --101603 0 L -@c -F -%CHAR: -92148 0 (i) @t --89808 21684 m --89808 25253 L --86703 25253 L --86703 21684 L --89808 21684 L -@c --89808 0 m --89808 18292 L --86703 18292 L --86703 0 L --89808 0 L -@c -F -%CHAR: -84316 0 (m) @t --81988 0 m --81988 18292 L --79218 18292 L --79218 15728 L --78642 16622 -77878 17345 -76925 17886 c --75973 18433 -74885 18709 -73668 18709 c --72316 18709 -71204 18427 -70340 17862 c --69470 17298 -68858 16516 -68506 15505 C --67053 17639 -65172 18709 -62855 18709 c --61038 18709 -59645 18203 -58669 17198 c --57693 16193 -57205 14646 -57205 12559 c --57205 0 L --60286 0 L --60286 11524 l --60286 12765 -60386 13658 -60586 14205 c --60791 14746 -61156 15187 -61679 15522 c --62208 15852 -62832 16022 -63543 16022 c --64831 16022 -65895 15593 -66748 14734 c --67594 13882 -68023 12512 -68023 10630 c --68023 0 L --71122 0 L --71122 11883 l --71122 13265 -71375 14299 -71881 14987 c --72386 15675 -73209 16022 -74362 16022 c --75232 16022 -76037 15793 -76778 15328 c --77519 14870 -78060 14199 -78389 13317 c --78724 12430 -78889 11154 -78889 9490 c --78889 0 L --81988 0 L -@c -F -%CHAR: -54929 0 (a) @t --40665 2258 m --41817 1282 -42923 594 -43981 188 c --45045 -212 -46186 -412 -47403 -412 c --49414 -412 -50954 76 -52036 1058 c --53112 2040 -53653 3298 -53653 4821 c --53653 5721 -53453 6538 -53042 7279 c --52636 8020 -52101 8614 -51442 9061 c --50778 9507 -50037 9848 -49208 10078 c --48602 10236 -47685 10395 -46456 10542 c --43952 10842 -42105 11195 -40924 11612 C --40912 12036 -40906 12306 -40906 12418 c --40906 13682 -41200 14576 -41788 15087 c --42576 15793 -43758 16140 -45316 16140 c --46774 16140 -47850 15887 -48550 15375 c --49243 14864 -49755 13958 -50090 12659 C --53118 13076 L --52842 14370 -52389 15422 -51760 16216 c --51131 17016 -50214 17633 -49020 18062 c --47826 18492 -46445 18709 -44869 18709 c --43305 18709 -42041 18521 -41065 18156 c --40089 17786 -39371 17327 -38907 16769 c --38448 16210 -38131 15511 -37943 14658 c --37843 14129 -37790 13176 -37790 11800 c --37790 7667 l --37790 4780 -37725 2957 -37590 2199 c --37461 1435 -37196 700 -36808 0 C --40048 0 L --40365 641 -40577 1393 -40665 2258 C -@c --40924 9184 m --42053 8720 -43740 8331 -45986 8008 c --47262 7826 -48167 7620 -48691 7391 c --49220 7161 -49631 6826 -49914 6379 c --50202 5938 -50349 5450 -50349 4910 c --50349 4080 -50031 3393 -49408 2840 c --48785 2293 -47868 2017 -46662 2017 c --45469 2017 -44404 2275 -43475 2799 c --42546 3322 -41859 4039 -41423 4945 c --41088 5644 -40924 6679 -40924 8043 c --40924 9184 L -@c -F -%CHAR: -35314 0 (r) @t --33021 0 m --33021 18292 L --30234 18292 L --30234 15522 L --29523 16816 -28864 17674 -28258 18086 c --27659 18497 -26994 18709 -26271 18709 c --25224 18709 -24166 18374 -23084 17710 C --24154 14829 L --24907 15281 -25665 15505 -26424 15505 c --27106 15505 -27712 15299 -28253 14893 c --28793 14482 -29176 13917 -29405 13194 c --29752 12094 -29922 10889 -29922 9578 c --29922 0 L --33021 0 L -@c -F -%CHAR: -23566 0 (y) @t --21379 -7044 m --21726 -4133 L --21044 -4316 -20456 -4410 -19950 -4410 c --19262 -4410 -18709 -4292 -18298 -4063 c --17880 -3834 -17545 -3516 -17281 -3099 c --17081 -2793 -16769 -2023 -16334 -794 c --16275 -617 -16181 -370 -16058 -35 C --22996 18292 L --19656 18292 L --15846 7702 l --15358 6356 -14911 4945 -14523 3463 C --14164 4886 -13741 6274 -13247 7632 c --9337 18292 L --6239 18292 L --13194 -312 l --13941 -2322 -14523 -3704 -14935 -4463 c --15487 -5486 -16116 -6232 -16828 -6709 c --17545 -7185 -18392 -7426 -19380 -7426 c --19979 -7426 -20644 -7297 -21379 -7044 C -@c -F -%CHAR: 3880 0 (S) @t -5468 8114 m -8619 8390 L -8766 7126 9113 6091 9660 5280 c -10207 4469 11053 3816 12200 3316 c -13346 2816 14640 2569 16074 2569 c -17350 2569 18473 2758 19449 3134 c -20425 3516 21154 4033 21631 4692 c -22107 5356 22348 6074 22348 6856 c -22348 7649 22119 8337 21654 8931 c -21196 9525 20437 10019 19385 10419 c -18703 10683 17209 11095 14887 11653 c -12570 12212 10941 12735 10012 13229 c -8807 13858 7908 14646 7314 15581 c -6726 16516 6432 17563 6432 18727 c -6432 19997 6790 21190 7514 22296 c -8237 23407 9295 24248 10683 24824 c -12076 25394 13617 25682 15316 25682 c -17192 25682 18838 25383 20273 24777 c -21701 24177 22801 23289 23571 22119 c -24335 20949 24753 19620 24812 18139 C -21607 17898 L -21431 19491 20849 20702 19855 21514 c -18861 22331 17397 22737 15457 22737 c -13434 22737 11965 22366 11036 21625 c -10112 20885 9648 19991 9648 18950 c -9648 18039 9977 17292 10630 16710 c -11277 16122 12952 15522 15669 14911 c -18385 14293 20249 13758 21260 13300 c -22730 12618 23818 11759 24518 10725 c -25217 9684 25564 8484 25564 7132 c -25564 5786 25182 4521 24412 3334 c -23642 2146 22536 1223 21096 559 c -19655 -100 18032 -429 16233 -429 c -13946 -429 12029 -100 10489 570 c -8942 1235 7731 2234 6849 3575 c -5973 4910 5509 6426 5468 8114 C -@c -F -%CHAR: 27410 0 (t) @t -36506 2775 m -36953 35 L -36083 -147 35301 -241 34613 -241 c -33484 -241 32614 -65 31990 294 c -31373 647 30938 1117 30685 1699 c -30432 2275 30303 3498 30303 5356 c -30303 15881 L -28027 15881 L -28027 18292 L -30303 18292 L -30303 22825 L -33390 24683 L -33390 18292 L -36506 18292 L -36506 15881 L -33390 15881 L -33390 5186 l -33390 4298 33443 3734 33548 3481 c -33660 3228 33836 3028 34083 2875 c -34330 2728 34683 2652 35142 2652 c -35489 2652 35941 2693 36506 2775 C -@c -F -%CHAR: 37217 0 (o) @t -38387 9149 m -38387 12535 39328 15046 41215 16675 c -42785 18027 44702 18709 46965 18709 c -49482 18709 51540 17886 53133 16234 c -54733 14587 55526 12312 55526 9407 c -55526 7050 55174 5198 54468 3851 c -53762 2499 52733 1452 51387 706 c -50035 -41 48565 -412 46965 -412 c -44408 -412 42338 406 40757 2052 c -39175 3692 38387 6056 38387 9149 c -@c -41574 9149 m -41574 6803 42085 5051 43108 3886 c -44131 2716 45419 2134 46965 2134 c -48506 2134 49788 2722 50811 3892 c -51828 5062 52340 6850 52340 9249 c -52340 11512 51828 13229 50799 14393 c -49770 15558 48494 16140 46965 16140 c -45419 16140 44131 15558 43108 14399 c -42085 13241 41574 11489 41574 9149 c -@c -F -%CHAR: 56832 0 (r) @t -59125 0 m -59125 18292 L -61912 18292 L -61912 15522 L -62623 16816 63282 17674 63888 18086 c -64487 18497 65152 18709 65875 18709 c -66922 18709 67980 18374 69062 17710 C -67992 14829 L -67239 15281 66481 15505 65722 15505 c -65040 15505 64434 15299 63893 14893 c -63353 14482 62970 13917 62741 13194 c -62394 12094 62224 10889 62224 9578 c -62224 0 L -59125 0 L -@c -F -%CHAR: 68580 0 (a) @t -82844 2258 m -81692 1282 80586 594 79528 188 c -78464 -212 77323 -412 76106 -412 c -74095 -412 72555 76 71473 1058 c -70397 2040 69856 3298 69856 4821 c -69856 5721 70056 6538 70467 7279 c -70873 8020 71408 8614 72067 9061 c -72731 9507 73472 9848 74301 10078 c -74907 10236 75824 10395 77053 10542 c -79557 10842 81404 11195 82585 11612 C -82597 12036 82603 12306 82603 12418 c -82603 13682 82309 14576 81721 15087 c -80933 15793 79751 16140 78193 16140 c -76735 16140 75659 15887 74959 15375 c -74266 14864 73754 13958 73419 12659 C -70391 13076 L -70667 14370 71120 15422 71749 16216 c -72378 17016 73295 17633 74489 18062 c -75683 18492 77064 18709 78640 18709 c -80204 18709 81468 18521 82444 18156 c -83420 17786 84138 17327 84602 16769 c -85061 16210 85378 15511 85566 14658 c -85666 14129 85719 13176 85719 11800 c -85719 7667 l -85719 4780 85784 2957 85919 2199 c -86048 1435 86313 700 86701 0 C -83461 0 L -83144 641 82932 1393 82844 2258 C -@c -82585 9184 m -81456 8720 79769 8331 77523 8008 c -76247 7826 75342 7620 74818 7391 c -74289 7161 73878 6826 73595 6379 c -73307 5938 73160 5450 73160 4910 c -73160 4080 73478 3393 74101 2840 c -74724 2293 75641 2017 76847 2017 c -78040 2017 79105 2275 80034 2799 c -80963 3322 81650 4039 82086 4945 c -82421 5644 82585 6679 82585 8043 c -82585 9184 L -@c -F -%CHAR: 88195 0 (g) @t -89953 -1517 m -92969 -1964 L -93093 -2893 93446 -3569 94016 -3998 c -94786 -4569 95839 -4857 97167 -4857 c -98608 -4857 99713 -4569 100495 -3998 c -101277 -3422 101801 -2616 102077 -1588 c -102242 -953 102312 370 102300 2393 C -100948 800 99261 0 97238 0 c -94721 0 92775 905 91399 2722 c -90024 4533 89330 6715 89330 9249 c -89330 10995 89647 12606 90276 14082 c -90911 15558 91829 16698 93028 17504 c -94228 18303 95639 18709 97256 18709 c -99413 18709 101195 17833 102594 16087 C -102594 18292 L -105458 18292 L -105458 2481 l -105458 -365 105164 -2387 104588 -3575 c -104005 -4763 103088 -5703 101830 -6391 c -100572 -7079 99025 -7426 97185 -7426 c -95004 -7426 93240 -6932 91899 -5950 c -90553 -4968 89906 -3493 89953 -1517 C -@c -92517 9472 m -92517 7073 92993 5321 93951 4222 c -94904 3116 96097 2569 97532 2569 c -98955 2569 100148 3116 101113 4210 c -102077 5309 102559 7026 102559 9372 c -102559 11612 102065 13300 101071 14435 c -100078 15569 98878 16140 97479 16140 c -96103 16140 94933 15581 93963 14458 c -92999 13341 92517 11677 92517 9472 c -@c -F -%CHAR: 107810 0 (e) @t -122656 5891 m -125861 5497 L -125355 3622 124420 2170 123056 1135 c -121686 106 119940 -412 117817 -412 c -115142 -412 113019 412 111455 2058 c -109886 3704 109104 6015 109104 8990 c -109104 12071 109897 14458 111479 16157 c -113066 17857 115118 18709 117647 18709 c -120093 18709 122092 17874 123638 16210 c -125190 14546 125966 12200 125966 9184 c -125966 8996 125961 8720 125949 8355 C -112308 8355 L -112420 6344 112990 4804 114013 3739 c -115036 2669 116306 2134 117835 2134 c -118970 2134 119940 2434 120745 3034 c -121551 3628 122186 4580 122656 5891 C -@c -112478 10907 m -122691 10907 L -122556 12441 122162 13600 121521 14364 c -120534 15558 119252 16157 117682 16157 c -116259 16157 115060 15681 114089 14729 c -113119 13776 112584 12500 112478 10907 C -@c -F -%CHAR: -72551 -35278 (b) @t --67365 -35278 m --70240 -35278 L --70240 -10025 L --67142 -10025 L --67142 -19032 L --65831 -17392 -64161 -16569 -62132 -16569 c --61003 -16569 -59939 -16798 -58934 -17251 c --57928 -17704 -57105 -18345 -56452 -19162 c --55806 -19985 -55294 -20973 -54930 -22137 c --54559 -23295 -54377 -24536 -54377 -25853 c --54377 -28993 -55153 -31415 -56705 -33126 c --58252 -34837 -60116 -35690 -62285 -35690 c --64443 -35690 -66136 -34790 -67365 -32985 C --67365 -35278 L -@c --67400 -25994 m --67400 -28187 -67101 -29769 -66507 -30745 c --65531 -32344 -64208 -33144 -62544 -33144 c --61186 -33144 -60016 -32556 -59028 -31374 c --58040 -30198 -57546 -28446 -57546 -26112 c --57546 -23724 -58022 -21961 -58969 -20826 c --59916 -19691 -61062 -19121 -62403 -19121 c --63761 -19121 -64931 -19709 -65919 -20885 c --66907 -22061 -67400 -23766 -67400 -25994 c -@c -F -%CHAR: -52936 -35278 (a) @t --38672 -33020 m --39824 -33996 -40930 -34684 -41988 -35090 c --43052 -35490 -44193 -35690 -45410 -35690 c --47421 -35690 -48961 -35202 -50043 -34220 c --51119 -33238 -51660 -31980 -51660 -30457 c --51660 -29557 -51460 -28740 -51049 -27999 c --50643 -27258 -50108 -26664 -49449 -26217 c --48785 -25771 -48044 -25430 -47215 -25200 c --46609 -25042 -45692 -24883 -44463 -24736 c --41959 -24436 -40112 -24083 -38931 -23666 C --38919 -23242 -38913 -22972 -38913 -22860 c --38913 -21596 -39207 -20702 -39795 -20191 c --40583 -19485 -41765 -19138 -43323 -19138 c --44781 -19138 -45857 -19391 -46557 -19903 c --47250 -20414 -47762 -21320 -48097 -22619 C --51125 -22202 L --50849 -20908 -50396 -19856 -49767 -19062 c --49138 -18262 -48221 -17645 -47027 -17216 c --45833 -16786 -44452 -16569 -42876 -16569 c --41312 -16569 -40048 -16757 -39072 -17122 c --38096 -17492 -37378 -17951 -36914 -18509 c --36455 -19068 -36138 -19767 -35950 -20620 c --35850 -21149 -35797 -22102 -35797 -23478 c --35797 -27611 l --35797 -30498 -35732 -32321 -35597 -33079 c --35468 -33843 -35203 -34578 -34815 -35278 C --38055 -35278 L --38372 -34637 -38584 -33885 -38672 -33020 C -@c --38931 -26094 m --40060 -26558 -41747 -26947 -43993 -27270 c --45269 -27452 -46174 -27658 -46698 -27887 c --47227 -28117 -47638 -28452 -47921 -28899 c --48209 -29340 -48356 -29828 -48356 -30368 c --48356 -31198 -48038 -31885 -47415 -32438 c --46792 -32985 -45875 -33261 -44669 -33261 c --43476 -33261 -42411 -33003 -41482 -32479 c --40553 -31956 -39866 -31239 -39430 -30333 c --39095 -29634 -38931 -28599 -38931 -27235 c --38931 -26094 L -@c -F -%CHAR: -33321 -35278 (c) @t --19057 -28575 m --16011 -28975 L --16341 -31074 -17193 -32720 -18569 -33908 c --19939 -35096 -21626 -35690 -23625 -35690 c --26124 -35690 -28141 -34872 -29658 -33238 c --31181 -31603 -31945 -29257 -31945 -26200 c --31945 -24224 -31616 -22496 -30963 -21014 c --30305 -19532 -29311 -18421 -27971 -17680 c --26636 -16939 -25178 -16569 -23608 -16569 c --21620 -16569 -19992 -17075 -18734 -18080 c --17469 -19085 -16658 -20508 -16299 -22360 C --19316 -22825 L --19604 -21596 -20109 -20673 -20838 -20050 c --21568 -19432 -22449 -19121 -23484 -19121 c --25048 -19121 -26318 -19679 -27294 -20802 c --28270 -21919 -28758 -23689 -28758 -26112 c --28758 -28569 -28288 -30357 -27341 -31474 c --26401 -32585 -25172 -33144 -23655 -33144 c --22438 -33144 -21426 -32767 -20609 -32021 c --19792 -31274 -19274 -30127 -19057 -28575 C -@c -F -%CHAR: -15682 -35278 (k) @t --13342 -35278 m --13342 -10025 L --10237 -10025 L --10237 -24424 L --2900 -16986 L -1110 -16986 L --5881 -23771 L -1822 -35278 L --2006 -35278 L --8050 -25923 L --10237 -28028 L --10237 -35278 L --13342 -35278 L -@c -F -%CHAR: 1957 -35278 (-) @t -3074 -27699 m -3074 -24583 L -12605 -24583 L -12605 -27699 L -3074 -27699 L -@c -F -%CHAR: 13705 -35278 (e) @t -28551 -29387 m -31756 -29781 L -31250 -31656 30315 -33108 28951 -34143 c -27581 -35172 25835 -35690 23712 -35690 c -21037 -35690 18914 -34866 17350 -33220 c -15781 -31574 14999 -29263 14999 -26288 c -14999 -23207 15792 -20820 17374 -19121 c -18961 -17421 21013 -16569 23542 -16569 c -25988 -16569 27987 -17404 29533 -19068 c -31085 -20732 31861 -23078 31861 -26094 c -31861 -26282 31856 -26558 31844 -26923 C -18203 -26923 L -18315 -28934 18885 -30474 19908 -31539 c -20931 -32609 22201 -33144 23730 -33144 c -24865 -33144 25835 -32844 26640 -32244 c -27446 -31650 28081 -30698 28551 -29387 C -@c -18373 -24371 m -28586 -24371 L -28451 -22837 28057 -21678 27416 -20914 c -26429 -19720 25147 -19121 23577 -19121 c -22154 -19121 20955 -19597 19984 -20549 c -19014 -21502 18479 -22778 18373 -24371 C -@c -F -%CHAR: 33320 -35278 (n) @t -35648 -35278 m -35648 -16986 L -38435 -16986 L -38435 -19585 L -39782 -17574 41722 -16569 44256 -16569 c -45362 -16569 46373 -16769 47296 -17163 c -48225 -17563 48913 -18080 49371 -18727 c -49836 -19368 50153 -20132 50342 -21014 c -50453 -21590 50512 -22596 50512 -24030 c -50512 -35278 L -47408 -35278 L -47408 -24148 l -47408 -22890 47290 -21943 47049 -21314 c -46808 -20691 46379 -20191 45767 -19820 c -45150 -19444 44433 -19256 43604 -19256 c -42281 -19256 41146 -19679 40182 -20514 c -39223 -21355 38747 -22942 38747 -25288 c -38747 -35278 L -35648 -35278 L -@c -F -%CHAR: 52935 -35278 (d) @t -67129 -35278 m -67129 -32967 L -65970 -34784 64265 -35690 62013 -35690 c -60555 -35690 59214 -35290 57992 -34484 c -56769 -33685 55822 -32562 55146 -31115 c -54475 -29675 54140 -28022 54140 -26147 c -54140 -24324 54446 -22666 55052 -21179 c -55663 -19691 56575 -18550 57792 -17762 c -59009 -16969 60373 -16569 61878 -16569 c -62977 -16569 63959 -16804 64818 -17269 c -65682 -17733 66382 -18339 66923 -19085 C -66923 -10025 L -70004 -10025 L -70004 -35278 L -67129 -35278 L -@c -57327 -26147 m -57327 -28493 57821 -30245 58809 -31403 c -59797 -32562 60961 -33144 62307 -33144 c -63660 -33144 64812 -32585 65759 -31480 c -66705 -30374 67181 -28681 67181 -26406 c -67181 -23901 66699 -22066 65735 -20896 c -64771 -19720 63583 -19138 62166 -19138 c -60790 -19138 59638 -19703 58715 -20826 c -57792 -21949 57327 -23724 57327 -26147 c -@c -F -T -@rax %Note: Object -389.39924 702.30643 411.00236 713.59625 @E - 0 O 0 @g -0.00 0.00 0.00 0.50 k -/$fm 0 def -389.39924 713.59654 m -411.00236 713.59654 L -411.00236 702.30643 L -389.39924 702.30643 L -389.39924 713.59654 L -@c -F - -@rax %Note: Object -388.45786 703.38926 409.69219 714.65924 @E - 0 O 0 @g -0.00 0.00 0.00 0.00 k -0 J 0 j [] 0 d 0 R 0 @G -0.00 0.00 0.00 1.00 K -0 0.49890 0.49890 0.00000 @w -/$fm 0 def -388.45786 714.65924 m -409.69276 714.65924 L -409.69276 703.38841 L -388.45786 703.38841 L -388.45786 714.65924 L -@c -B - -@rax %Note: Object -387.64828 700.86472 409.25140 712.15455 @E - 0 O 0 @g -0.00 0.00 0.00 0.50 k -/$fm 0 def -387.64828 712.15483 m -409.25140 712.15483 L -409.25140 700.86472 L -387.64828 700.86472 L -387.64828 712.15483 L -@c -F - -@rax %Note: Object -386.70690 701.94756 407.94123 713.21754 @E - 0 O 0 @g -0.00 0.00 0.00 0.00 k -0 J 0 j [] 0 d 0 R 0 @G -0.00 0.00 0.00 1.00 K -0 0.49890 0.49890 0.00000 @w -/$fm 0 def -386.70690 713.21754 m -407.94180 713.21754 L -407.94180 701.94671 L -386.70690 701.94671 L -386.70690 713.21754 L -@c -B - -@rax %Note: Object -385.89761 699.03213 407.50072 710.32195 @E - 0 O 0 @g -0.00 0.00 0.00 0.50 k -/$fm 0 def -385.89761 710.32224 m -407.50072 710.32224 L -407.50072 699.03213 L -385.89761 699.03213 L -385.89761 710.32224 L -@c -F - -@rax %Note: Object -384.95622 700.11496 406.19055 711.38494 @E - 0 O 0 @g -0.00 0.00 0.00 0.00 k -0 J 0 j [] 0 d 0 R 0 @G -0.00 0.00 0.00 1.00 K -0 0.49890 0.49890 0.00000 @w -/$fm 0 def -384.95622 711.38494 m -406.19112 711.38494 L -406.19112 700.11411 L -384.95622 700.11411 L -384.95622 711.38494 L -@c -B - -@rax %Note: Object -395.69272 623.18154 395.88661 699.87118 @E -0 J 0 j [] 0 d 0 R 0 @G -0.00 0.00 0.00 1.00 K -0 0.86740 0.86740 0.00000 @w -/$fm 0 def -395.88661 623.18154 m -395.70151 696.32504 L -S -@j -0.00 0.00 0.00 1.00 K -0.00 0.00 0.00 1.00 k -0 @g -0 @G -[] 0 d 0 J 0 j -0 R 0 O -0 1.00800 1.00800 0 @w -395.69272 699.87118 m -392.68658 692.80753 L -394.70003 693.82063 396.71603 693.82573 398.73458 692.82283 C -395.69272 699.87118 L -f -@J - -@rax %Note: Object -345.43928 563.54088 465.93865 777.17197 @E -0 J 0 j [] 0 d 0 R 0 @G -0.00 0.00 0.00 1.00 K -0 0.21543 0.21543 0.00000 @w -/$fm 0 def -345.43928 777.17197 m -465.93865 777.17197 L -465.93865 563.54088 L -345.43928 563.54088 L -345.43928 777.17197 L -@c -S - -@rax %Note: Object -57.00132 603.24321 299.45509 777.75250 @E -0 J 0 j [] 0 d 0 R 0 @G -0.00 0.00 0.00 1.00 K -0 0.21543 0.21543 0.00000 @w -/$fm 0 def -57.00132 777.75250 m -299.45509 777.75250 L -299.45509 603.24321 L -57.00132 603.24321 L -57.00132 777.75250 L -@c -S - -@rax 80.30693 729.26731 123.23424 736.54243 @E -[0.00028346 0.00000000 0.00000000 0.00028346 101.70226400 729.38406781] @tm - 0 O 0 @g -0.00 0.00 0.00 1.00 k -e - -% FontChange:/_ArialCE 35278.00000 z -%CHAR: -75478 0 (L) @t --72897 0 m --72897 25253 L --69551 25253 L --69551 2981 L --57116 2981 L --57116 0 L --72897 0 L -@c -F -%CHAR: -55863 0 (B) @t --53282 0 m --53282 25253 L --43804 25253 l --41875 25253 -40329 24994 -39165 24489 c --37995 23977 -37083 23189 -36425 22125 c --35766 21067 -35431 19956 -35431 18791 c --35431 17715 -35725 16698 -36313 15746 c --36895 14793 -37783 14023 -38965 13435 C --37436 12988 -36266 12224 -35443 11148 c --34620 10066 -34208 8790 -34208 7320 c --34208 6138 -34461 5039 -34961 4022 c --35461 3005 -36078 2223 -36813 1670 c --37548 1117 -38471 706 -39576 423 c --40682 141 -42040 0 -43651 0 c --53282 0 L -@c --49936 14640 m --44474 14640 l --42998 14640 -41934 14740 -41287 14934 c --40441 15187 -39800 15605 -39371 16193 c --38941 16781 -38724 17516 -38724 18397 c --38724 19232 -38924 19973 -39323 20608 c --39729 21249 -40305 21684 -41046 21919 c --41793 22155 -43075 22272 -44892 22272 c --49936 22272 L --49936 14640 L -@c --49936 2981 m --43651 2981 l --42569 2981 -41811 3022 -41376 3099 c --40605 3240 -39964 3469 -39447 3792 c --38930 4110 -38506 4580 -38171 5192 c --37842 5809 -37671 6515 -37671 7320 c --37671 8261 -37912 9078 -38395 9778 c --38877 10472 -39547 10960 -40405 11242 c --41258 11518 -42493 11659 -44098 11659 c --49936 11659 L --49936 2981 L -@c -F -%CHAR: -22526 0 (s) @t --21438 5462 m --18375 5944 L --18204 4715 -17722 3775 -16934 3116 c --16152 2464 -15053 2134 -13636 2134 c --12213 2134 -11155 2428 -10467 3005 c --9779 3587 -9432 4269 -9432 5045 c --9432 5750 -9738 6297 -10349 6703 c --10773 6979 -11831 7326 -13518 7749 c --15788 8326 -17370 8820 -18246 9243 c --19122 9660 -19792 10242 -20245 10983 c --20697 11724 -20927 12541 -20927 13435 c --20927 14252 -20739 15005 -20362 15699 c --19992 16398 -19480 16975 -18839 17433 c --18357 17786 -17699 18092 -16870 18339 c --16035 18586 -15141 18709 -14189 18709 c --12754 18709 -11496 18497 -10408 18086 c --9320 17674 -8521 17116 -8003 16410 c --7486 15699 -7133 14758 -6939 13576 C --9967 13159 L --10108 14099 -10508 14834 -11166 15364 c --11825 15893 -12760 16157 -13965 16157 c --15388 16157 -16405 15922 -17011 15452 c --17622 14981 -17928 14429 -17928 13800 c --17928 13394 -17799 13035 -17546 12712 c --17293 12377 -16899 12106 -16358 11883 c --16047 11771 -15135 11507 -13618 11095 c --11425 10507 -9896 10031 -9032 9654 c --8162 9284 -7480 8737 -6986 8026 c --6492 7314 -6245 6432 -6245 5374 c --6245 4339 -6551 3369 -7151 2452 c --7756 1540 -8626 835 -9761 335 c --10896 -165 -12184 -412 -13618 -412 c --16000 -412 -17811 82 -19057 1070 c --20303 2058 -21097 3522 -21438 5462 C -@c -F -%CHAR: -4887 0 (e) @t -9959 5891 m -13164 5497 L -12658 3622 11723 2170 10359 1135 c -8989 106 7243 -412 5120 -412 c -2445 -412 322 412 -1242 2058 c --2811 3704 -3593 6015 -3593 8990 c --3593 12071 -2800 14458 -1218 16157 c -369 17857 2421 18709 4950 18709 c -7396 18709 9395 17874 10941 16210 c -12493 14546 13269 12200 13269 9184 c -13269 8996 13264 8720 13252 8355 C --389 8355 L --277 6344 293 4804 1316 3739 c -2339 2669 3609 2134 5138 2134 c -6273 2134 7243 2434 8048 3034 c -8854 3628 9489 4580 9959 5891 C -@c --219 10907 m -9994 10907 L -9859 12441 9465 13600 8824 14364 c -7837 15558 6555 16157 4985 16157 c -3562 16157 2363 15681 1392 14729 c -422 13776 -113 12500 -219 10907 C -@c -F -%CHAR: 14728 0 (r) @t -17021 0 m -17021 18292 L -19808 18292 L -19808 15522 L -20519 16816 21178 17674 21784 18086 c -22383 18497 23048 18709 23771 18709 c -24818 18709 25876 18374 26958 17710 C -25888 14829 L -25135 15281 24377 15505 23618 15505 c -22936 15505 22330 15299 21789 14893 c -21249 14482 20866 13917 20637 13194 c -20290 12094 20120 10889 20120 9578 c -20120 0 L -17021 0 L -@c -F -%CHAR: 26476 0 (v) @t -33884 0 m -26923 18292 L -30198 18292 L -34125 7338 l -34549 6156 34937 4927 35296 3651 C -35572 4616 35954 5774 36448 7132 c -40517 18292 L -43703 18292 L -36777 0 L -33884 0 L -@c -F -%CHAR: 44115 0 (e) @t -58961 5891 m -62166 5497 L -61660 3622 60725 2170 59361 1135 c -57991 106 56245 -412 54122 -412 c -51447 -412 49324 412 47760 2058 c -46191 3704 45409 6015 45409 8990 c -45409 12071 46202 14458 47784 16157 c -49371 17857 51423 18709 53952 18709 c -56398 18709 58397 17874 59943 16210 c -61495 14546 62271 12200 62271 9184 c -62271 8996 62266 8720 62254 8355 C -48613 8355 L -48725 6344 49295 4804 50318 3739 c -51341 2669 52611 2134 54140 2134 c -55275 2134 56245 2434 57050 3034 c -57856 3628 58491 4580 58961 5891 C -@c -48783 10907 m -58996 10907 L -58861 12441 58467 13600 57826 14364 c -56839 15558 55557 16157 53987 16157 c -52564 16157 51365 15681 50394 14729 c -49424 13776 48889 12500 48783 10907 C -@c -F -%CHAR: 63730 0 (r) @t -66023 0 m -66023 18292 L -68810 18292 L -68810 15522 L -69521 16816 70180 17674 70786 18086 c -71385 18497 72050 18709 72773 18709 c -73820 18709 74878 18374 75960 17710 C -74890 14829 L -74137 15281 73379 15505 72620 15505 c -71938 15505 71332 15299 70791 14893 c -70251 14482 69868 13917 69639 13194 c -69292 12094 69122 10889 69122 9578 c -69122 0 L -66023 0 L -@c -F -T -%%PageTrailer -@rs -@rs -%%Trailer -@EndSysCorelDict -end -%%DocumentSuppliedResources: procset wCorel8Dict -%%EOF diff --git a/org.glite.jp/doc/install-guide/LB-JP-interaction-details.pdf b/org.glite.jp/doc/install-guide/LB-JP-interaction-details.pdf deleted file mode 100644 index 3241d856dca9bb163dde0ad68d95179d08ab0e80..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 72334 zcmV(@K-Rw{P((&8F)lL-CCBWKq6#%2Fd%PYY6?6&FHB`_XLM*FHXtw{QZGhnY;M|TModQS>f z8G*RTKQfB)yd{ZFe=o!_afM(Mkc_@mWy ztC+`k40W|C<-519HuCpK<3}rZ0G|)zI|qDvl!*|aAg&xNKU26YoGkk|y|C1j67h3)3Mq91= z1fU-Lr1#T>{9dyk zM_MEJ&tCLDX!9Ru9@ijyoD2UIL+al>fBm~KX{@mTGrs57Zy`zsBJ%^$J=5NLGP^Ji>?c1^Y)#l znm6>8pUfRU_wR{5N4>b0@x9n$b$N|G>51u4EpGlISnJn;U|ze5*= zB0dlr2L_tX19B49NYm3`&9Gj8Ia|FfAW)2Ggyt#geT(AkKRTX8!WO@NGRiM&D_wbg(aNO7^cLW$2L<9;u0>ZGeD$U@V0zH>E^gur77RJXc+-Vn zQVR3?4=Vj850BRTsl{NEq}v$tEja8ipxXcb;|-jUgFB*eFj&z0$D97doVot-9(Q>R zjrG2KWA3YFGq3)M(VJ(7sj$GsO(5u8q~_0!8fz|sHgkXE6wFY?t?Q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q*N z|EvFRo&Ygp6GM==ippP(f7AXKCowZwz;83Ne|wSmw-7gPmjGwDzkrsx2}s)=fkYvl z{XKk9AUSbqQLwlmZrZp+pga&hnz(2PXevm6!7^Y;aXE2$X&EVLoZJxM^8bncG)4Fe zXdwLIUYcfVmbgEC0Adgilown;L&44t1^4!~volZ^(K8Y8zy;SI=KOmk5f?ZL=HZ1D zh5I4}|Cv#+Kim}n2FU}!{~RD0X=zDmkSpk4n5?)g?(R=1$mbtSP8t`)-^c&LWMpv_ z^&gnDr2KziI0ans{Fk0MF1G(+D=YWkW5`M1^8U9T${#l&xc{FeV(t+N2g!rP%n%4% zG5pR9NKDtq6#@F47F=2CYJzM9+7}pk_f>lN^6x&c$Q+K$7yNI;{&yWAQ80hhpP`YJ P082^%czLyq?*je@toEPF diff --git a/org.glite.jp/doc/install-guide/LB-JP-interaction-guide.tex b/org.glite.jp/doc/install-guide/LB-JP-interaction-guide.tex deleted file mode 100644 index dc27de7..0000000 --- a/org.glite.jp/doc/install-guide/LB-JP-interaction-guide.tex +++ /dev/null @@ -1,105 +0,0 @@ -\documentclass{egee} -\usepackage{comment,alltt} - -\def\LB{L\&B} - -\title{gLite Logging and Bookkeeping and Job Provenance Interaction Guide} -\author{CESNET EGEE JRA1 team} -\DocIdentifier{EGEE-JRA1-??} -\Date{\today} -\Activity{JRA1: Middleware Engineering and Integration} -\DocStatus{DRAFT} -\Dissemination{PUBLIC} -\DocumentLink{} -\Abstract{This guide is - intended as a detailed technical guide to the Job Provenance (JP) - deployment process. - It is focused on Logging and Bookkeeping (LB) interaction with JP. - For description of deployment modules please refer to the "gLite - install guide" document. -} - - -\def\todo#1{\textbf{TODO:} #1} - -\begin{document} - - -%\input{frontmatter} -%\newpage -%\tableofcontents -%\newpage - -\section{Logging and Bookeeping (LB) and Job Provenance (JP)} -On fig.~\ref{fig:LB-JP-interactions} are depicted data flows between -LB and JP services. These flows are numbered and you can use this -numbers to find additional information about each flow in -table~\ref{tab:LB-JP-interactions}. - -\begin{figure}[htpb] - \centering - \includegraphics[width=0.9\hsize]{LB-JP-interaction-details} - \caption{LB to JP interactions detail overview} - \label{fig:LB-JP-interactions} -\end{figure} - -\begin{table}[htpb] - \centering - \begin{tabular}{|c|p{3cm}|l|p{9cm}|} - \hline - &spool directory&initiated by&description\\ - \hline - \hline - 1&lb.export.dump, - lb.export.dump.keep&lb-exporter& - Export of LB job records into spool directory. It uses glite-lb-purge utility. LB-exporter reads this spool directory in a regular manner and implement next processing of LB dumps. Optionally it can keep handled dumps in lb.export.dump.keep.\\ - \hline - 2&lb.export.jpreg&LB server&When new job come to the LB server - it stores its - registration into the spool directory. It is responsibility of - JP-importer process to handle such registrations.\\ - \hline - 3&lb.export.jpdump, - lb.export.jobs, - lb.export.jobs.keep&lb-exporter& - LB-exporter do its processing of LB dumps (they are in per job form) and passes on it to the JP-importer using the spool directory lb.export.jpdump and temporary storage lb.export.jobs. It can keep the job files for futher usage.\\ - \hline - 4&none&jp-importer&JP importer handles registrations received from LB - server and sends it to the JP primary server front-end (using its WS - interface).\\ - \hline - 5&none&jp-importer&JP importer handles LB dumps received from LB - exporter and sends it to the JP primary server back-end using its - gridftp interface.\\ - \hline - \end{tabular} - \caption{LB to JP data flows description} - \label{tab:LB-JP-interactions} -\end{table} - - -Notes: -\begin{itemize} - \item Only JP Primary Storage (JPPS) server is involved in described - data flows. JP Index Servers are not part of this picture (they are - feeded via corresponding JPPS). - \item Only flows number 4 and 5 are designed to be inter-host. All - the other interactions assume the components are on the same host and - do use access to a shared filesystem. - \item Data flow number 1 use glite-lb-purge utility (see its - documentation) and passes to it argument from lb.export.purgeargs - clause of the deployment configuration file. This argument contain - the timeouts controlling after how long period of time a job - staying in a terminal state is to be purged from the LB server. - \item The LB exporter have a feature to store LB job event dumps in a - directory for further handling (e.g. for job statistic tool). This behaviour - is controled by lb.export.jobs.keep deployment config file clause (leave - this clause empty if you don't use dumps for futher handling). - \item The LB exporter also have a feature to keep all handled LB - dumps (in glite-lb-purge format) in filesystem. This feature is - controlled by lb.export.dump.keep. - \item LB exporter is not a deamon, it's periodic invocation is - provided by cron deamon. -\end{itemize} - -\end{document} diff --git a/org.glite.jp/doc/install-guide/README b/org.glite.jp/doc/install-guide/README deleted file mode 100644 index e285129..0000000 --- a/org.glite.jp/doc/install-guide/README +++ /dev/null @@ -1,6 +0,0 @@ -See LB-JP interaction guide in this directory (LaTeX) for description -of details of JP installation process and LB-JP interaction internals. - -See also deployment modules: org.glite.deployment.jpps and -org.glite.deployment.lb and gLite installation guide -(new chapters for JP and LB temporarily stored here). diff --git a/org.glite.jp/doc/install-guide/copyright.tex b/org.glite.jp/doc/install-guide/copyright.tex deleted file mode 100644 index d25979d..0000000 --- a/org.glite.jp/doc/install-guide/copyright.tex +++ /dev/null @@ -1,24 +0,0 @@ -% -% Official text received on October 6, 2004 -% -\vfill{\bf Copyright }\copyright{\bf Members of the EGEE Collaboration. 2004. -See http://eu-egee.org/partners for details on the copyright holders. - -EGEE (``Enabling Grids for E-science in Europe'') is a project funded by -the European Union. For more information on the project, its partners -and contributors please see http://www.eu-egee.org. - -You are permitted to copy and distribute verbatim copies of this -document containing this copyright notice, but modifying this document -is not allowed. You are permitted to copy this document in whole or in -part into other documents if you attach the following reference to the -copied elements: ``Copyright }\copyright{\bf 2004. Members of the EGEE -Collaboration. http://www.eu-egee.org'' - -The information contained in this document represents the views of -EGEE as of the date they are published. EGEE does not guarantee that -any information contained herein is error-free, or up to date. - -EGEE MAKES NO WARRANTIES, EXPRESS, IMPLIED, OR STATUTORY, BY -PUBLISHING THIS DOCUMENT.} - diff --git a/org.glite.jp/doc/install-guide/egee.cls b/org.glite.jp/doc/install-guide/egee.cls deleted file mode 100644 index 0b58d5d..0000000 --- a/org.glite.jp/doc/install-guide/egee.cls +++ /dev/null @@ -1,529 +0,0 @@ -% egee.cls: -% -% $Id$ -% -% $Log$ -% Revision 1.1 2006/02/21 13:40:43 jsitera -% Testplan moved to LaTeX (structure only). -% TODO: -% - Move chapter 3 (PS-IS interaction) from .txt to .tex -% - Remove .txt version -% - Move chapter IS query test from org.glite.jp.index/doc/README -% -% Revision 1.1 2005/02/16 14:53:11 erwin -% template added -% -% Revision 1.6 2004/10/05 09:10:38 erwin -% changed title for delivery; remove subtitle from page header. -% -% Revision 1.5 2004/08/20 13:17:59 szamsu -% Loading the EGEE logo only once and reusing it later. -% -% Revision 1.4 2004/08/20 10:18:47 szamsu -% fixing overfull problem in page headers -% -% Revision 1.3 2004/08/03 14:32:00 hemmer -% Change IST logo to the new Information Society Infrastructures logo and ISTNumber -% -% Revision 1.2 2004/08/03 11:40:13 szamsu -% Removed 'compat2' option on geometry, because it has also specified -% 'scale{0.8,0.9}' for page size, which we define otherwise. Added the -% 'centering' and 'includeheadfoot' options, which were defined in -% 'compat2'. -% -% Revision 1.1 2004/07/13 09:44:13 erwin -% template for design document -% -% Revision 1.2 2004/06/25 10:41:40 erwin -% restructuring according to JRA2 template (intro & exec summary) -% modification of stylefile to remove trailing "." at section number -% changes in intro according to discussion (new figure, service table, ...) -% -% Revision 1.1 2004/06/24 14:26:44 erwin -% use EGEE style -% adjustment of top level structure (individual sections need to be adjusted accordingly) -% -% Revision 1.8 2004/06/03 09:56:11 diana -% updated the front page -% -% Revision 1.7 2004/05/26 09:38:55 leanne -% Removed DocumentLink in pdfinfo - it was causing errors -% -% Revision 1.6 2004/05/26 08:36:58 leanne -% Updated IST number in template -% -% Revision 1.5 2004/05/24 13:25:04 diana -% added template for egee latex documents -% -% Revision 1.4 2004/05/17 10:56:51 diana -% added compat2 option to geometry and hypertex option to hyperref to get logo and links back on the page -% -% Revision 1.3 2004/02/18 18:08:48 leanne -% Modified Document identifiers to mauch the EGEE Word templates -% -% Revision 1.2 2004/02/18 17:23:21 leanne -% Changed Work Package to Activity. Included definition of Document Link. -% -% Revision 1.1.1.1 2004/02/18 11:17:44 leanne -% Initial version of EGGE LaTeX Style files based on the EDG LaTeX Style -% -% -% Revision 1.0 2004/02/17 leanne -% Took the datagrid.cls file and modified it for the EGEE project -% Original Authors: -% Frohner Akos -% Diana Bosio -% Paul Millar -% Thanks are due to Norman Gray -% -\NeedsTeXFormat{LaTeX2e} -\ProvidesClass{egee}[2002/06/20 EGEE LaTeX Class] -\typeout{EGEE LaTeX class -- 2002/06/13 Rock Lobster!} -% -%% Notes: This class file tries, as largely as possible, to copy the Microsoft -%% Word template document EDMS 2098656 v2.2. Differences and notes are listed -%% below: -%% o The Word Template uses 11pt for the main body, but 12 point -%% occasionally. Any such occurrence of 12pt is mapped into 11pt in this -%% class-file. -%% o This class inherits 11pt article. In that class Huge=30pt and -%% LARGE=22pt, which matches the required point-size for the title page. -%% o The parskip in the Word doc is exactly 1.4mm (0.7mm above and below). -%% Here we've taken the liberty of adding some glue to make things fit -%% better. -%% o The Word Template shows all the (sub)sections on the contents page in -%% capitals and subsubsections in italics. The LateX class doesn't. - -%% Interface - example of an option, should we want to use these later. -%\newif\ifmonotitle\monotitlefalse - -%\DeclareOption{mono}{\monotitletrue} - -\DeclareOption*{\PassOptionsToClass{\CurrentOption}{article}} -\ProcessOptions - - -% Inherit! -\LoadClass[11pt]{article} - -% Necessary packages: -\RequirePackage{lastpage} -\RequirePackage{tabularx} -\RequirePackage{pslatex} -\RequirePackage{times} -\RequirePackage{verbatim} -\RequirePackage{geometry} -\RequirePackage{url} - -\usepackage[hang,bf,small]{caption} - -% -% We now define a new \if command to test for PDF being enabled. -% It is important because loading graphicx overrides the definition -% of \pdfoutput and sets it to true even when PDF is not enabled. -% Use \ifpdf instead of \ifx\pdfoutput\undefined hereafter. -% - -\newif\ifpdf -\ifx\pdfoutput\undefined - \pdffalse - % \typeout{PDF _not_ defined} -\else - \pdfoutput=1 - \pdftrue - % \typeout{PDF _is_ defined} -\fi - -\ifpdf - \usepackage[pdftex, - pdfpagemode={UseOutlines},bookmarks=true,bookmarksopen=true, - bookmarksopenlevel=0,bookmarksnumbered=true, - hypertexnames=false,colorlinks,linkcolor={blue}, - citecolor={blue},urlcolor={red}, - pdfstartview={FitV}]{hyperref} -\else - \usepackage[hypertex]{hyperref} -\fi - -\ifpdf - \usepackage[pdftex]{graphicx} - \pdfcompresslevel 9 - \pdfadjustspacing 1 -\else - \usepackage[dvips]{graphicx} -\fi - -\usepackage{color} - -\def\footsize{5mm} - -%% -%% PAGE GEOMETRY DEFINITIONS -%% -% From Template file -\geometry{centering,includeheadfoot} -\geometry{a4paper,top=12.5mm,headheight=12.5mm,headsep=5mm,foot=\footsize,footskip=13.3mm,bottom=12.5mm} -\geometry{right=25mm,left=25mm} - - - -% APM -- I don't think these are right, my impression is above is correct -%\geometry{a4paper,margin=0.98in,headheight=0.72in} - - -%% -%% PAGE COLOUR DEFINITIONS -%% -\definecolor{blue}{rgb}{0.1,0.1,0.5} -\definecolor{lightgrey}{gray}{0.65} - - -% paulm's prefered name ... -\def\bibname{References} - -\setlength{\parindent}{0pt} -\setlength{\parskip}{1.4mm plus 0.4mm minus 0.2mm} - -\def\@defaultfooter{ - \def\@oddfoot{\vbox to \footsize {% - {\color{blue}\hrule width \textwidth height 1pt depth 0pt}% - \vfil - \small\hbox to \textwidth{\ISTNumber% - \hfil - \hbox{\colorbox{yellow}{\MakeUppercase{\@Dissemination}}}% - \hfil - \hbox{\thepage/\pageref{LastPage}}}% - }% - }% -} - - -\def\ps@title{% - \@defaultfooter - \def\@oddhead{\hbox to \textwidth{\LargeEGEELogo\hfil\ISTLogo}} -} - -\def\ps@headings{% - \@defaultfooter - \def\@oddhead{\vbox to \headheight{% -%\hrule width \textwidth height 1pt\relax - \vbox to 0.75\headheight{% - \hbox to \textwidth{% - \hbox to 0pt{\EGEELogo\hss}% - \hfil - \hbox to 8cm{% - \vbox to 0.75\headheight{% - \vfil - \parbox{8cm}{% - \centering\color{blue}% - \textbf{\MakeUppercase{\@title}}% -%\ifx\@Subtitle\@empty\else -% \par\textbf{\scriptsize\@Subtitle}% -%\fi - }% - \vfil - }% - \hss}% - \hfil -%\hbox to 0pt{\vrule width 1pt height 10pt depth 0pt \hss}% -%% {\scriptsize\setlength{\parskip}{0pt}\setlength{\topsep}{0pt}% -%% % \vbox to 0.75\headheight{% -%% \parbox{4cm}{x% -%% \begin{flushright}% -%% \textit{Doc. Identifier}:\\ -%% \textbf{\@DocIdentifier}\\ -%% \vfil -%% \textit{Date}: \textbf{\@Date} -%% \end{flushright}% -%% }% -%% % }% -%% }% -\hbox to 0pt{\hss\vbox to 0.75\headheight{%\hrule -\tiny%\scriptsize -\parfillskip0pt -\leftskip 0pt plus 1fil -\parskip0ex -\textit{Doc.\ Identifier}: -\par -\textbf{\@DocIdentifier} -\vfil -\textit{Date}: \textbf{\@Date} -%\hrule -}}% -% \hbox to 4cm{\scriptsize -% \vbox to 0.75\headheight{% -% \parbox{4cm}{ -% \halign{\hfill####\cr -% \textit{Doc. Identifier}:\cr -% \textbf{\@DocIdentifier}\cr -% % \noalign{\vfil} -% \textit{Date}: \textbf{\@Date}\cr -% }}% -% \vfil -% }% -% }% - }% - }% -%\hrule width \textwidth height 1pt\relax - \vfil\vskip 2.5mm\relax - {\color{blue}\hrule width \textwidth height 1pt depth 0pt}% - }% - }% -} - -\pagestyle{headings} - -\setlength{\captionmargin}{1cm} - -% image file extensions respective to the output format -\ifpdf - \DeclareGraphicsExtensions{.jpg,.pdf,.png} - \pdfcompresslevel=9 -% \pdfinfo{ /Title (\@DocumentLink) } - \pdfinfo{ /Title (EGEE) } -\else - \DeclareGraphicsExtensions{.eps} -\fi - -\def\frontboxwidth{10.6cm}% - - - -%% -%% Define our title page -%% -\AtBeginDocument{ -\pagestyle{title}% -\hbox{}% Force top of page -\vfill -{\centering - \Huge\bf\textsf{\textcolor{blue}{EGEE}}\\[20mm]% - \LARGE\sc\textsf{\bf \@title}\\[5mm]% - \ifx\@Subtitle\@empty\else - \normalsize\textsf{\@Subtitle}\\[10mm]% - \fi - \ifx\@DeliverableId\@empty\else - \LARGE\sc\textsf{\bf \@DeliverableId}\\[5mm]% - \fi -}% -\vfill -\hbox to \textwidth{ - \hfil - \vbox{ - {\color{blue}\hrule width \frontboxwidth height 1mm depth 0pt} - \hbox to \frontboxwidth{\sf - \begin{tabularx}{\frontboxwidth}{l>{\raggedright\arraybackslash}X} - Document identifier: & \textbf{\@DocIdentifier}\\[3mm] - Date: & \textbf{\@Date}\\[3mm] - Activity:& \textbf{\@Activity}\\[3mm] - Lead Partner: & \textbf{\@LeadPartner}\\[3mm] - Document status: & \textbf{\@DocStatus}\\[3mm] - Document link:& \textbf{\@DocumentLink}\\[3mm] - \end{tabularx} - } - {\color{blue}\hrule width \frontboxwidth height 1mm depth 0pt} - } -} -\vfill -{\sf\underline{Abstract}: \@Abstract} -\vfill -\newpage % end of the first page -\pagestyle{headings} -\setcounter{tocdepth}{3} -} % End of AtBeginningDocument - - -% -% EGEE style small-capital section titles. -% -% The numbering is aligned with the WinWord style, -% although it is not common in the english typography... -% -\newcommand{\sectionbreak}{\newpage} -%\renewcommand{\thesection}{\arabic{section}.} -%\renewcommand{\thesubsection}{\thesection\arabic{subsection}.} -%\renewcommand{\thesubsubsection}{\thesubsection\arabic{subsubsection}.} - -\renewcommand\section{\@startsection {section}{1}{\z@}% - {-3.5ex \@plus -1ex \@minus -.2ex}% - {2.3ex \@plus.2ex}% - {\normalfont\Large\bfseries\sffamily\scshape}} - -\renewcommand\subsection{\@startsection{subsection}{2}{\z@}% - {-3.25ex\@plus -1ex \@minus -.2ex}% - {1.5ex \@plus .2ex}% - {\normalfont\large\bfseries\sffamily\scshape}} -\renewcommand\subsubsection{\@startsection{subsubsection}{3}{\z@}% - {-3.25ex\@plus -1ex \@minus -.2ex}% - {1.5ex \@plus .2ex}% - {\normalfont\normalsize\bfseries\sffamily\scshape}} - - - -%% APM NEED TO REDEFINE section -%\titleformat{\section}{\Large\bfseries\sffamily\scshape}{\thesection}{1em}{} -%\titlecontents{section} [2em] {\vspace*{4pt}} -% {\large \sc \bfseries \contentslabel{2em}} -% {\large \sc \bfseries \hspace*{-2em}} -% {\large \textbf{\titlerule*[1ex]{.}\contentspage}} [\vspace*{4pt}] - -%\titleformat{\subsection}{\large\bfseries\sffamily\scshape}{\thesubsection}{1em}{} -%\titlecontents{subsection} [5em] {} -% {\sc \contentslabel{3em}} -% {\sc \hspace*{-3em}} -% {\titlerule*[1ex]{.}\contentspage} - - -% -% common constants -% -\def\ISTNumber{INFSO-RI-508833} -\newsavebox{\@EGEELogo} -\savebox{\@EGEELogo}{\includegraphics[height=0.75\headheight]{EGEElogoNEW}} -\def\EGEELogo{\usebox{\@EGEELogo}} -\def\LargeEGEELogo{\includegraphics[height=\headheight]{EGEElogoNEW}} -\def\ISTLogo{\includegraphics[height=\headheight]{isi}} - -% -% parameters to be supplied by the author -% -\def\Subtitle#1{\gdef\@Subtitle{#1}} -\gdef\@Subtitle{\@latex@warning@no@line{No \noexpand\Subtitle given}} - -\def\DeliverableId#1{\gdef\@DeliverableId{#1}} -\gdef\@DeliverableId{\@latex@warning@no@line{No \noexpand\DeliverableId given}} - -\def\DocIdentifier#1{\gdef\@DocIdentifier{#1}} -\gdef\@DocIdentifier{\@latex@warning@no@line{No \noexpand\DocIdentifier given % - (e.g. EGEE-JRA1-TEC-edmsId-v0-1)}} - -\def\Date#1{\gdef\@Date{#1}} -\gdef\@Date{\@latex@warning@no@line{No \noexpand\Date given % - (e.g. 01/01/2004)}} - -\def\Activity#1{\gdef\@Activity{#1}} -\gdef\@Activity{\@latex@warning@no@line{No \noexpand\Activity given % - (e.g. JRA1 Middleware Engineering and Integration )}} - -\def\LeadPartner#1{\gdef\@LeadPartner{#1}} -\gdef\@LeadPartner{\@latex@warning@no@line{No \noexpand\LeadPartner given % - (e.g. CERN, RAL )}} - -\def\DocStatus#1{\gdef\@DocStatus{#1}} -\gdef\@DocStatus{\@latex@warning@no@line{No \noexpand\DocStatus given % - (e.g. DRAFT, WORKING, DELIVERED)}} - -\def\Dissemination#1{\gdef\@Dissemination{#1}} -\gdef\@Dissemination{\@latex@warning@no@line{No \noexpand\Dissemination given % - (e.g. PUBLIC, INTERNAL, ...)}} - -\def\DocumentLink#1{\gdef\@DocumentLink{#1}} -\gdef\@DocumentLink{\@latex@warning@no@line{No \noexpand\DocumentLink given % - (e.g. http://cern.ch)}} - -\long\def\Abstract#1{\gdef\@Abstract{#1}} -\gdef\@Abstract{\@latex@warning@no@line{No \noexpand\Abstract given}} - -%% -%% Define the abstract using an environment abstract - -% -% This will produce the mailto link in the PDF file -% -% -% We use the URL package, which does this nicely. The old way (\HTTP) was -% a bit buggy as it had problems with '~'s and '_'s -% -\urlstyle{sf} -\ifpdf - \newcommand{\Email}[1]{\href{mailto:#1}{<{#1}>}} - \newcommand{\HTTP}[1]{\href{#1}{\url{#1}}} -\else - \newcommand{\Email}[1]{\textsf{<{#1}>}} - \newcommand{\HTTP}[1]{\url{#1}} -\fi - - -% -% We now redifine \part and \section so that the table of contents -% has the sections/parts in upper case. -% -% Note: need to use \uppercase because \MakeUppercase is not robust -% -\def\@part[#1]#2{% - \ifnum \c@secnumdepth >\m@ne - \refstepcounter{part}% - \addcontentsline{toc}{part}{\thepart\hspace{1em}\uppercase{#1}}% - \else - \addcontentsline{toc}{part}{\uppercase{#1}}% - \fi - {\parindent \z@ \raggedright - \interlinepenalty \@M - \normalfont - \ifnum \c@secnumdepth >\m@ne - \Large\bfseries \partname\nobreakspace\thepart - \par\nobreak - \fi - \huge \bfseries #2% - \markboth{}{}\par}% - \nobreak - \vskip 3ex - \@afterheading} - -\def\@sect#1#2#3#4#5#6[#7]#8{% - \ifnum #2>\c@secnumdepth - \let\@svsec\@empty - \else - \refstepcounter{#1}% - \protected@edef\@svsec{\@seccntformat{#1}\relax}% - \fi - \@tempskipa #5\relax - \ifdim \@tempskipa>\z@ - \begingroup - #6{% - \@hangfrom{\hskip #3\relax\@svsec}% - \interlinepenalty \@M #8\@@par}% - \endgroup - \csname #1mark\endcsname{\uppercase{#7}}% - \addcontentsline{toc}{#1}{% - \ifnum #2>\c@secnumdepth \else - \protect\numberline{\csname the#1\endcsname}% - \fi - \texorpdfstring{\uppercase{#7}}{#7}}% - \else - \def\@svsechd{% - #6{\hskip #3\relax - \@svsec #8}% - \csname #1mark\endcsname{\uppercase{#7}}% - \addcontentsline{toc}{#1}{% - \ifnum #2>\c@secnumdepth \else - \protect\numberline{\csname the#1\endcsname}% - \fi - \texorpdfstring{\uppercase{#7}}{#7}}}% - \fi - \@xsect{#5}} - -% \addcontentsline{toc} expands to \contentsline{NAME} -% which in turn expands to \l@NAME. So, to specify -% the table of contents, we must define \l@chapter, \l@section, -% \l@subsection, ... ; to specify the list of figures, we must define -% \l@figure; and so on. Most of these can be defined with the -% \@dottedtocline command, which produces a contents line with dots -% between the title and the page number. It works as follows: -% -% \@dottedtocline{LEVEL}{INDENT}{NUMWIDTH} -% LEVEL : An entry is produced only if LEVEL < or = value of -% 'tocdepth' counter. Note, \chapter is level 0, \section -% is level 1, etc. -% INDENT : The indentation from the outer left margin of the start of -% the contents line. -% NUMWIDTH : The width of a box in which the section number is to go, -% if TITLE includes a \numberline command. -% - -\def\l@part{\@dottedtocline{1}{4em}{2.0em}} -\def\l@subsection{\@dottedtocline{2}{1.5em}{2.3em}} -\def\l@subsubsection{\@dottedtocline{3}{3.8em}{3.2em}} -\def\l@paragraph{\@dottedtocline{4}{7.0em}{4.1em}} -\def\l@subparagraph{\@dottedtocline{5}{10em}{5em}} - diff --git a/org.glite.jp/doc/install-guide/glite_installation_guide_JP.doc b/org.glite.jp/doc/install-guide/glite_installation_guide_JP.doc deleted file mode 100755 index a69f348fed7878f61698927cb17da7abf62fdbb4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 349184 zcmeF42S60Z`}dcQAXc!KRWV`#dp8OySYpL)jC#NUr@-OeAz@A4uoTpPc)6bpR)=$6SL6#~6@uh5kH^nEKRmv5 z{ql11>*U{q`gnozP*vK4+eUljzqKDNRoCqZzB-c`UYq^hu1J5(`ddu$Tg%hh&u{ICblh`Tp2Nerehv82Rv3ypTQEpq`8$ns zaYW+sN`=1={P_k8!UcZwE6#(_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ir#``cL8zN_qBhu)HQUHPgjw{@kX6s(eF^!$62e>oB_@w@U@V|Uzt zlrIJi6j4sww|1r~IpZ_s=;+ zPUBF^iaGrXS4&t|IoT*vjgqNU{uHBY$@+3cSIBYIRjM_}k<^>; z?tC97A;t2aQVCO)x&EE8ahMi)FJ_CFq^*U~S38+EQ9;qa>7ticl45LS1MG zO`#>a{(1-0z{w~EP_O^kcMG|iZBr_B1EK! z644??#EKzesE8BsB0(gIB#|tJiQytej1Z|JO{9wqktwpoNRcgaM6Spa`JzBbqY_C= zZHh#(kj5R7n%a~JX<#8~tSu$0w&W9SNo#GnRVYoTMV+V@4WdyriDuCvTE%EFMvN70 zqFr=|abmo9MNAMA#UwFVOc7JXtKv2Bx|k;35Yt7cm?370Sz@-BBj$>EV!l`)7K%mU zO|e)k5lh7~@s?OF-WDswf3L1?RCskk_vuw?b=@d8`OsKdSk>U>%YDC1|M)q_f3J=D LpSArD?}7gXNC0X* diff --git a/org.glite.jp/doc/install-guide/glite_installation_guide_LB.doc b/org.glite.jp/doc/install-guide/glite_installation_guide_LB.doc deleted file mode 100755 index 8dcc46478bdbdd959e2078be3b1d0c79a8868be9..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 174080 zcmeFa2|QL`*EfDH^E?x!j8Q@v%RCQ>GGvxAm3byAQHhd>G$%AlB9%f>C`v`<(uimf z86p|qwXZ`_*VV84d7k&a-~Z?ToIc;{9OtaP*4k^Yz4zMt?0tG#!~QlSZ*D90%b|i% zViS|}7|o3PlyGfEn7YA+VH9wQ{+yVcoSeFgMWGA03Ag_D`2T04{*B12_Pj04@MGfCn%Kzzg65%mvH?@B`)p761eQf&d|a zFhB$#3Rnmb1Be3_0Tu%!080Rp04abp0O`66&N2X5fE+*`pa4(=EC;LrC;^lKDgaf0 z8bBSO0nh|!0ki=+09}9{Kp$WLFa)dw7y(uRi~%Nq)qphsQ-B%39AE)h3$O%O0jvQw z09$|^z#iZLSO;(ftOslWI02jiE&!A#H#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a/org.glite.jp/doc/install-guide/isi.png b/org.glite.jp/doc/install-guide/isi.png deleted file mode 100644 index c6766f4747f68096fdb89f45dfefa9e125068556..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 83835 zcmV)wK$O3UP)00009a7bBm000XT z000XT0n*)m`~Uy|33NqRbVF}#ZDnqB004<9jRpV!AOJ~3K~#90)LREol*^VLz3=UN zzO-+*wzg`kZtbhPuWH}kV8E=HbGTx{9Iok_5fw9FjzmEa5JeOPBq&JEQG!U4Bw>IV z!oV=hFp0@C`~82zFa$>#eYd<_U4QlTf4ckY)2C0LbN(KN_7_Pyo$e#aj8ig<)&@K+ zME%66u8*G-m;%@8=<~_bZ)2E=Q(eYRaQb1KgV`kKnR7jsEWfv4vA6l`J7$xe%_g~k z26@61*9lWxkjGC(b_V_E@s7wSqms~AZuED#o$lhAVQU||cD?_MId>*aa|J#OK?q3Z za>b^=W!Cf1I4`eJCQ}JTvcfm)h{!T;pPaj1uY!UL6O-QMfqKK(taZ$f;skgOFgz0d>wu_hI^fkig4B?A@8I=bPhC==fSFlOIPj9H} z>D|^k;$1meC{ok#l?98jp7pQmS&Vg5fw2}(txAPgOIP^1dt`nR+>Kiv>uWUKt%~Ll z3TO}R5va5}5)LxMg=N?t8Fl3h>49ef!JR8I9KQ#6dQ0FUMAZ%M<| zmVQqH3qJ|2#p?U|8Wk@GKqaY@F&5y8V*V4AJ9Y=@W%sYw&h3o|Vc1&(C7NGJOZ*?V z>w36tZNi>u%M@bo1W7>#EeQ&R8fV);y*pGoYZra;Oq7XmH*V>Hg5#IU zW{!A{8BZMwI6MuHO=Re@iV9A_8}_^E_O!G*7uWOyhr?#i_e2vt4I1t{7`lF=KRUrF zJz=UV&M>pdE~CwyMw?M5HfZK7xN9QZeTPEP9(F=`MH{a}ER`yx-OBE6C66a5ecRg5 z(8*+W;ONJ|kO#m5gL85l8XG%1J0&8KtfrP*S=rXnA+D%s>zTHh!@Nazqod2wiBhFe zYqT0VtJTywj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-quide/JP-interactions.cdr b/org.glite.jp/doc/users-quide/JP-interactions.cdr deleted file mode 100755 index 80db3f8bf5a2bf193412d82c2e2ed043b4527ad1..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 49340 zcmeHw3wTw<)%GMO3E>h6H@S#$DHCqI@#R{^#*UjZd|^pxVJu_J>lrs;YR146#u8D&hGiKP zBRDAZXY8%>B(WIA_JKty4des)K>-j45i7kG>{ME2L(VJM2*uxK9C<2 z0C5lrOau8qeoz3!LDWea$OrO+0w4|oSN!wg*AEJSIEa)<1NlIHPyob1q+lAz2l9gg zAPyp>(?C9u9~1y_5Dg>^_O*kKX`@gUASJARovN z3V=9>43h@(f&8EVh=a&jX&@iS4+?-dhzytp@`3!I0EmOgsA(V{$PWsDI0%BE4{72T z{{r~sAToX$$OrO+0w4||hopggAU`Mo;vjNT8psFog90E9BFCkHd>}t40OBBWW*W!` z@`C~(4nhOyLslV80^%RXFF8F8-j45n$3l zK9C<20C5n0pbz*UKPUj=AnbrX7uK zKFALWfH(*pK_Bozeoz3!LFgP^fDiJ60w4~el$4aj`t<3;Qc_abuwld4*s)_-Mn(pk zIddkPH*X#*FE3|{7cXW@mMmc_R;*y_*RN-rHf>_>z4sp5x^*ktxpOBwbm)*NPY7+L zpKa&TISZV#z&Q(?v%onE{QqHrUAx7=OvQumIu-i@7)*FJGbYlpuF@j*?w{61^&b)(AB3hw?kX~#J`5`UPtPbi!hzO}Z z+BL@m_3laZ8p`@qp*aI^*I#g5#MkfmkL_P`I)J2ldmEA8M)KXP;~4A?_c~(e<`2nl zl7xIW>xyw1ZR`Kj91oCuvoqCF>aVj=wpXne`nwp>(XPJUXk-k6b_$k@`i>D-9kNOzn3y+S?)KuwWIJE5%89`!-&qnlrvhP0`#Zxp`+ zgg#n5!BdLLZtDk#>ei3&uT6hcQ-3HpsbHY9Ku-Yuiiyp2aTxfV3-3XI5`sm#}sR3s7^iHW<-s~Mr54robn}V z8=X;xWC)3-STiH!@7`tj;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nXRh5g}Y2gZ-j$9+A8{#WhCE_)mM`ov;?o@Ii%{1ZRm%_aKkw+mjx9XO5B${n z0;A6NE<4OG+hx^LzKCyy7_sGrR*Vr<^nSNJ8P_7ij;4p3N2oDxzy2s+ySk|@6kpk5 z{OF_nI{Y;_Ws4~h!e#jyCoZF99??*1;Zn^b=*ysg-Vy%Gpewc<=HITf@TOvf&ezMz z7gHnTi-xsMUqnlcc)if_g^CgMWzcWdh4+R2cLkI$biQ6zzQ~A>FUJ2N^1e{ERuQQ= ze}5p<{96AKuJVP>*UQQmH%G`98`ejsFT#B>m%e;q|4X{+?^;hIzVUah$0JV!)0%%t zw-fSu8V<$?5Y=`2OS<&;tmz!3_o@DZb+|q|>K&ro+&*WZu6>;9FIJBuzA;XcMMUH5 z4)TKN;dTmWAc*!k$3@>D7b%y 8 1 false[8 -0 0 1 0 0]{}imagemask}{/$bkg true def}ifelse}if}ifelse @gr $wid 0 gt $hei 0 gt -and{$pn cvlit load aload pop/$pd xd 3 -1 roll sub/$phei xd exch sub/$pwid xd -$wid $pwid div ceiling 1 add/$tlx xd $hei $phei div ceiling 1 add/$tly xd $psx -0 eq{@tv}{@th}ifelse}if @gr @np/$bkg false def}bd/@Pf{@sv SepMode_5 0 eq $Psc 0 -ne or $ink_5 3 eq or{0 J 0 j[]0 d $t $c $m $y $k $n $o @scc_5 pop $ctm -setmatrix 72 1000 div dup matrix scale dup concat dup Bburx exch Bbury exch -itransform ceiling cvi/Bbury xd ceiling cvi/Bburx xd Bbllx exch Bblly exch -itransform floor cvi/Bblly xd floor cvi/Bbllx xd $Prm aload pop $Psn load exec -}{1 SetGry wfill}ifelse @rs @np}bd/F{matrix currentmatrix $sdf{$scf $sca $scp -@ss}if $fil 1 eq{@pf}{$fil 2 eq{@ff}{$fil 3 eq{@Pf}{$t $c $m $y $k $n $o @scc_5 -{wfill}{@np}ifelse}ifelse}ifelse}ifelse $sdf{$dsf $dsa $dsp @ss}if setmatrix} -bd/f{@cp F}bd/S{matrix currentmatrix $ctm setmatrix $SDF{$SCF $SCA $SCP @ss}if -$T $C $M $Y $K $N $O @scc_5{matrix currentmatrix $ptm concat stroke setmatrix} -{@np}ifelse $SDF{$dsf $dsa $dsp @ss}if setmatrix}bd/s{@cp S}bd/B{@gs F @gr S} -bd/b{@cp B}bd/_E{5 array astore exch cvlit xd}bd/@cc{currentfile $dat -readhexstring pop}bd/@sm{/$ctm $ctm currentmatrix def}bd/@E{/Bbury xd/Bburx xd -/Bblly xd/Bbllx xd}bd/@c{@cp}bd/@p{/$fil 1 def 1 eq dup/$vectpat xd{/$pfrg true -def}{@gs $t $c $m $y $k $n $o @scc_5/$pfrg xd @gr}ifelse/$pm xd/$psy xd/$psx xd -/$pyf xd/$pxf xd/$pn xd}bd/@P{/$fil 3 def/$Psn xd/$Psc xd array astore/$Prm xd -}bd/@ii{concat 3 index 3 index m 3 index 1 index l 2 copy l 1 index 3 index l 3 -index 3 index l clip pop pop pop pop}bd/tcc{@cc}def/@i{@sm @gs @ii 6 index 1 ne -{/$frg true def pop pop}{1 eq{s1t s1c s1m s1y s1k s1n $O @scc_5/$frg xd}{/$frg -false def}ifelse 1 eq{@gs $ctm setmatrix F @gr}if}ifelse @np/$ury xd/$urx xd -/$lly xd/$llx xd/$bts xd/$hei xd/$wid xd/$dat $wid $bts mul 8 div ceiling cvi -string def $bkg $frg or{$SDF{$SCF $SCA $SCP @ss}if $llx $lly Tl $urx $llx sub -$ury $lly sub scale $bkg{$t $c $m $y $k $n $o @scc_5 pop}if $wid $hei abs $bts -1 eq{$bkg}{$bts}ifelse[$wid 0 0 $hei neg 0 $hei 0 gt{$hei}{0}ifelse]/tcc load -$bts 1 eq{imagemask}{image}ifelse $SDF{$dsf $dsa $dsp @ss}if}{$hei abs{tcc pop} -repeat}ifelse @gr $ctm setmatrix}bd/@I{@sm @gs @ii @np/$ury xd/$urx xd/$lly xd -/$llx xd/$ncl xd/$bts xd/$hei xd/$wid xd/$dat $wid $bts mul $ncl mul 8 div -ceiling cvi string def $ngx $llx $lly Tl $urx $llx sub $ury $lly sub scale $wid -$hei abs $bts[$wid 0 0 $hei neg 0 $hei 0 gt{$hei}{0}ifelse]/@cc load false $ncl -ColorImage $SDF{$dsf $dsa $dsp @ss}if @gr $ctm setmatrix}bd/COMP 0 def -/MaskedImage false def L2?{/@I_2{@sm @gs @ii @np/$ury xd/$urx xd/$lly xd/$llx -xd/$ncl xd/$bts xd/$hei xd/$wid xd/$dat $wid $bts mul $ncl mul 8 div ceiling -cvi string def $ngx $ncl 1 eq{/DeviceGray}{$ncl 3 eq{/DeviceRGB}{/DeviceCMYK} -ifelse}ifelse setcolorspace $llx $lly Tl $urx $llx sub $ury $lly sub scale 8 -dict begin/ImageType 1 def/Width $wid def/Height $hei abs def/BitsPerComponent -$bts def/Decode $ncl 1 eq{[0 1]}{$ncl 3 eq{[0 1 0 1 0 1]}{[0 1 0 1 0 1 0 1]} -ifelse}ifelse def/ImageMatrix[$wid 0 0 $hei neg 0 $hei 0 gt{$hei}{0}ifelse]def -/DataSource currentfile/ASCII85Decode filter COMP 1 eq{/DCTDecode filter}{COMP -2 eq{/RunLengthDecode filter}if}ifelse def currentdict end image $SDF{$dsf $dsa -$dsp @ss}if @gr $ctm setmatrix}bd}{/@I_2{}bd}ifelse/@I_3{@sm @gs @ii @np/$ury -xd/$urx xd/$lly xd/$llx xd/$ncl xd/$bts xd/$hei xd/$wid xd/$dat $wid $bts mul -$ncl mul 8 div ceiling cvi string def $ngx $ncl 1 eq{/DeviceGray}{$ncl 3 eq -{/DeviceRGB}{/DeviceCMYK}ifelse}ifelse setcolorspace $llx $lly Tl $urx $llx sub -$ury $lly sub scale/ImageDataDict 8 dict def ImageDataDict begin/ImageType 1 -def/Width $wid def/Height $hei abs def/BitsPerComponent $bts def/Decode $ncl 1 -eq{[0 1]}{$ncl 3 eq{[0 1 0 1 0 1]}{[0 1 0 1 0 1 0 1]}ifelse}ifelse def -/ImageMatrix[$wid 0 0 $hei neg 0 $hei 0 gt{$hei}{0}ifelse]def/DataSource -currentfile/ASCII85Decode filter COMP 1 eq{/DCTDecode filter}{COMP 2 eq{ -/RunLengthDecode filter}if}ifelse def end/MaskedImageDict 7 dict def -MaskedImageDict begin/ImageType 3 def/InterleaveType 3 def/MaskDict -ImageMaskDict def/DataDict ImageDataDict def end MaskedImageDict image $SDF -{$dsf $dsa $dsp @ss}if @gr $ctm setmatrix}bd/@SetMask{/$mbts xd/$mhei xd/$mwid -xd/ImageMaskDict 8 dict def ImageMaskDict begin/ImageType 1 def/Width $mwid def -/Height $mhei abs def/BitsPerComponent $mbts def/DataSource maskstream def -/ImageMatrix[$mwid 0 0 $mhei neg 0 $mhei 0 gt{$mhei}{0}ifelse]def/Decode[1 0] -def end}bd/@B{@gs S @gr F}bd/@b{@cp @B}bd/@sep{CurrentInkName_5(Composite)eq -{/$ink_5 -1 def}{CurrentInkName_5(Cyan)eq{/$ink_5 0 def}{CurrentInkName_5 -(Magenta)eq{/$ink_5 1 def}{CurrentInkName_5(Yellow)eq{/$ink_5 2 def}{ -CurrentInkName_5(Black)eq{/$ink_5 3 def}{/$ink_5 4 def}ifelse}ifelse}ifelse} -ifelse}ifelse}bd/@whi{@gs -72000 dup m -72000 72000 l 72000 dup l 72000 -72000 -l @cp 1 SetGry fill @gr}bd/@neg{[{1 exch sub}/exec cvx currenttransfer/exec -cvx]cvx settransfer @whi}bd/deflevel 0 def/@sax{/deflevel deflevel 1 add def} -bd/@eax{/deflevel deflevel dup 0 gt{1 sub}if def deflevel 0 gt{/eax load}{eax} -ifelse}bd/eax{{exec}forall}bd/@rax{deflevel 0 eq{@rs @sv}if}bd/@daq{dup type -/arraytype eq{{}forall}if}bd/@BMP{/@cc xd UseLevel 3 eq MaskedImage true eq and -{7 -2 roll pop pop @I_3}{12 index 1 gt UseLevel 2 eq UseLevel 3 eq or and{7 -2 -roll pop pop @I_2}{11 index 1 eq{12 -1 roll pop @i}{7 -2 roll pop pop @I} -ifelse}ifelse}ifelse}bd systemdict/pdfmark known not{/pdfmark/cleartomark ld} -if -/z{exch findfont exch scalefont setfont}bd/ZB{9 dict dup begin 4 1 roll -/FontType 3 def/FontMatrix xd/FontBBox xd/Encoding 256 array def 0 1 255{ -Encoding exch/.notdef put}for/CharStrings 256 dict def CharStrings/.notdef{} -put/Metrics 256 dict def Metrics/.notdef 3 -1 roll put/BuildChar{exch dup -/$char exch/Encoding get 3 index get def dup/Metrics get $char get aload pop -setcachedevice begin Encoding exch get CharStrings exch get end exec}def end -definefont pop}bd/ZBAddChar{findfont begin dup 4 1 roll dup 6 1 roll Encoding 3 -1 roll put CharStrings 3 1 roll put Metrics 3 1 roll put end}bd/Z{findfont dup -maxlength 2 add dict exch dup{1 index/FID ne{3 index 3 1 roll put}{pop pop} -ifelse}forall pop dup dup/Encoding get 256 array copy dup/$fe xd/Encoding exch -put dup/Fontname 3 index put 3 -1 roll dup length 0 ne{0 exch{dup type 0 type -eq{exch pop}{$fe exch 2 index exch put 1 add}ifelse}forall pop}if dup 256 dict -dup/$met xd/Metrics exch put dup/FontMatrix get 0 get 1000 mul 1 exch div 3 -index length 256 eq{0 1 255{dup $fe exch get dup/.notdef eq{pop pop}{5 index 3 --1 roll get 2 index mul $met 3 1 roll put}ifelse}for}if pop definefont pop pop -}bd/@ftx{{currentpoint 3 -1 roll(0)dup 3 -1 roll 0 exch put dup @gs true -charpath $ctm setmatrix @@txt @gr @np stringwidth pop 3 -1 roll add exch m} -forall}bd/@ft{matrix currentmatrix exch $sdf{$scf $sca $scp @ss}if $fil 1 eq -{/@@txt/@pf ld @ftx}{$fil 2 eq{/@@txt/@ff ld @ftx}{$fil 3 eq{/@@txt/@Pf ld -@ftx}{$t $c $m $y $k $n $o @scc_5{show}{pop}ifelse}ifelse}ifelse}ifelse $sdf -{$dsf $dsa $dsp @ss}if setmatrix}bd/@st{matrix currentmatrix exch $SDF{$SCF -$SCA $SCP @ss}if $T $C $M $Y $K $N $O @scc_5{{currentpoint 3 -1 roll(0)dup 3 -1 -roll 0 exch put dup @gs true charpath $ctm setmatrix $ptm concat stroke @gr @np -stringwidth pop 3 -1 roll add exch m}forall}{pop}ifelse $SDF{$dsf $dsa $dsp -@ss}if setmatrix}bd/@te{@ft}bd/@tr{@st}bd/@ta{dup @gs @ft @gr @st}bd/@t@a{dup -@gs @st @gr @ft}bd/@tm{@sm concat}bd/e{/t{@te}def}bd/r{/t{@tr}def}bd/o{/t{pop} -def}bd/a{/t{@ta}def}bd/@a{/t{@t@a}def}bd/t{@te}def/T{@np $ctm setmatrix/$ttm -matrix def}bd/ddt{t}def/@t{/$stm $stm currentmatrix def 3 1 roll m $ttm concat -ddt $stm setmatrix}bd/@n{/$ttm exch matrix rotate def}bd/@s{}bd/@l{}bd -end -%%EndResource -%%EndProlog -%%BeginSetup -wCorel8Dict begin -@BeginSysCorelDict -2.6131 setmiterlimit -1.00 setflat -/$fst 128 def -%%EndSetup - -%%Page: 1 1 -%LogicalPage: 1 -%%BeginPageSetup -@sv -@sm -@sv -%%EndPageSetup -@rax %Note: Object -363.47216 703.76343 456.70649 745.20113 @E - 0 O 0 @g -0.00 0.00 0.00 0.50 k -/$fm 0 def -363.47216 745.20113 m -456.70649 745.20113 L -456.70649 703.76343 L -363.47216 703.76343 L -363.47216 745.20113 L -@c -F - -@rax %Note: Object -362.81792 577.71128 456.05225 619.14898 @E - 0 O 0 @g -0.00 0.00 0.00 0.50 k -/$fm 0 def -362.81792 619.14898 m -456.05225 619.14898 L -456.05225 577.71128 L -362.81792 577.71128 L -362.81792 619.14898 L -@c -F - -@rax %Note: Object -70.70428 707.90882 139.08699 749.34652 @E - 0 O 0 @g -0.00 0.00 0.00 0.50 k -/$fm 0 def -70.70428 749.34652 m -139.08699 749.34652 L -139.08699 707.90882 L -70.70428 707.90882 L -70.70428 749.34652 L -@c -F - -@rax %Note: Object -67.72422 711.88072 134.94161 753.24699 @E - 0 O 0 @g -0.00 0.00 0.00 0.00 k -0 J 0 j [] 0 d 0 R 0 @G -0.00 0.00 0.00 1.00 K -0 0.49890 0.49890 0.00000 @w -/$fm 0 def -67.72422 753.24699 m -134.94161 753.24699 L -134.94161 711.88072 L -67.72422 711.88072 L -67.72422 753.24699 L -@c -B - -@rax %Note: Object -71.60457 578.22945 139.98728 619.66715 @E - 0 O 0 @g -0.00 0.00 0.00 0.50 k -/$fm 0 def -71.60457 619.66715 m -139.98728 619.66715 L -139.98728 578.22945 L -71.60457 578.22945 L -71.60457 619.66715 L -@c -F - -@rax %Note: Object -68.62450 582.20135 135.84189 623.56762 @E - 0 O 0 @g -0.00 0.00 0.00 0.00 k -0 J 0 j [] 0 d 0 R 0 @G -0.00 0.00 0.00 1.00 K -0 0.49890 0.49890 0.00000 @w -/$fm 0 def -68.62450 623.56762 m -135.84189 623.56762 L -135.84189 582.20135 L -68.62450 582.20135 L -68.62450 623.56762 L -@c -B - -@rax %Note: Object --45.63865 645.97408 22.74406 687.41178 @E - 0 O 0 @g -0.00 0.00 0.00 0.50 k -/$fm 0 def --45.63865 687.41178 m -22.74406 687.41178 L -22.74406 645.97408 L --45.63865 645.97408 L --45.63865 687.41178 L -@c -F - -@rax %Note: Object --48.61871 649.94598 18.59868 691.31225 @E - 0 O 0 @g -0.00 0.00 0.00 0.00 k -0 J 0 j [] 0 d 0 R 0 @G -0.00 0.00 0.00 1.00 K -0 0.49890 0.49890 0.00000 @w -/$fm 0 def --48.61871 691.31225 m -18.59868 691.31225 L -18.59868 649.94598 L --48.61871 649.94598 L --48.61871 691.31225 L -@c -B - -@rax %Note: Object -222.39298 642.48293 290.77569 683.92063 @E - 0 O 0 @g -0.00 0.00 0.00 0.50 k -/$fm 0 def -222.39298 683.92063 m -290.77569 683.92063 L -290.77569 642.48293 L -222.39298 642.48293 L -222.39298 683.92063 L -@c -F - -@rax %Note: Object -219.41291 646.45483 286.63030 687.82110 @E - 0 O 0 @g -0.00 0.00 0.00 0.00 k -0 J 0 j [] 0 d 0 R 0 @G -0.00 0.00 0.00 1.00 K -0 0.49890 0.49890 0.00000 @w -/$fm 0 def -219.41291 687.82110 m -286.63030 687.82110 L -286.63030 646.45483 L -219.41291 646.45483 L -219.41291 687.82110 L -@c -B - -@rax %Note: Object -255.79417 800.80498 308.98290 828.60208 @E - 0 O 0 @g -0.00 0.00 0.00 0.50 k -/$fm 0 def -255.79417 828.60236 m -308.98290 828.60236 L -308.98290 800.80498 L -255.79417 800.80498 L -255.79417 828.60236 L -@c -F - -@rax %Note: Object -253.47628 803.46926 305.75877 831.21902 @E - 0 O 0 @g -0.00 0.00 0.00 0.00 k -0 J 0 j [] 0 d 0 R 0 @G -0.00 0.00 0.00 1.00 K -0 0.49890 0.49890 0.00000 @w -/$fm 0 def -253.47628 831.21902 m -305.75877 831.21902 L -305.75877 803.46926 L -253.47628 803.46926 L -253.47628 831.21902 L -@c -B - -@rax %Note: Object -360.49209 707.73534 453.56627 749.10161 @E - 0 O 0 @g -0.00 0.00 0.00 0.00 k -0 J 0 j [] 0 d 0 R 0 @G -0.00 0.00 0.00 1.00 K -0 0.49890 0.49890 0.00000 @w -/$fm 0 def -360.49209 749.10161 m -453.56627 749.10161 L -453.56627 707.73534 L -360.49209 707.73534 L -360.49209 749.10161 L -@c -B - -@rax %Note: Object -359.83786 581.68318 452.91203 623.04945 @E - 0 O 0 @g -0.00 0.00 0.00 0.00 k -0 J 0 j [] 0 d 0 R 0 @G -0.00 0.00 0.00 1.00 K -0 0.49890 0.49890 0.00000 @w -/$fm 0 def -359.83786 623.04945 m -452.91203 623.04945 L -452.91203 581.68318 L -359.83786 581.68318 L -359.83786 623.04945 L -@c -B - -@rax -36.53717 662.27839 1.95987 679.55357 @E -[0.00028346 0.00000000 0.00000000 0.00028346 -17.08185764 672.39521950] @tm - 0 O 0 @g -0.00 0.00 0.00 1.00 k -e - -% FontChange:/_ArialCE 35278.00000 z -%CHAR: -37237 0 (U) @t --17946 25253 m --14600 25253 L --14600 10660 l --14600 8126 -14888 6109 -15465 4616 c --16041 3122 -17076 1911 -18575 976 c --20074 35 -22038 -429 -24472 -429 c --26836 -429 -28776 -24 -30275 794 c --31781 1605 -32857 2787 -33498 4333 c --34144 5880 -34462 7985 -34462 10660 c --34462 25253 L --31122 25253 L --31122 10677 l --31122 8484 -30916 6867 -30511 5833 c --30105 4792 -29399 3992 -28412 3428 c --27418 2863 -26201 2581 -24766 2581 c --22309 2581 -20556 3140 -19510 4257 c --18469 5368 -17946 7508 -17946 10677 c --17946 25253 L -@c -F -%CHAR: -11766 0 (s) @t --10678 5462 m --7615 5944 L --7444 4715 -6962 3775 -6174 3116 c --5392 2464 -4293 2134 -2876 2134 c --1453 2134 -395 2428 293 3005 c -981 3587 1328 4269 1328 5045 c -1328 5750 1022 6297 411 6703 c --13 6979 -1071 7326 -2758 7749 c --5028 8326 -6610 8820 -7486 9243 c --8362 9660 -9032 10242 -9485 10983 c --9937 11724 -10167 12541 -10167 13435 c --10167 14252 -9979 15005 -9602 15699 c --9232 16398 -8720 16975 -8079 17433 c --7597 17786 -6939 18092 -6110 18339 c --5275 18586 -4381 18709 -3429 18709 c --1994 18709 -736 18497 352 18086 c -1440 17674 2239 17116 2757 16410 c -3274 15699 3627 14758 3821 13576 C -793 13159 L -652 14099 252 14834 -406 15364 c --1065 15893 -2000 16157 -3205 16157 c --4628 16157 -5645 15922 -6251 15452 c --6862 14981 -7168 14429 -7168 13800 c --7168 13394 -7039 13035 -6786 12712 c --6533 12377 -6139 12106 -5598 11883 c --5287 11771 -4375 11507 -2858 11095 c --665 10507 864 10031 1728 9654 c -2598 9284 3280 8737 3774 8026 c -4268 7314 4515 6432 4515 5374 c -4515 4339 4209 3369 3609 2452 c -3004 1540 2134 835 999 335 c --136 -165 -1424 -412 -2858 -412 c --5240 -412 -7051 82 -8297 1070 c --9543 2058 -10337 3522 -10678 5462 C -@c -F -%CHAR: 5873 0 (e) @t -20719 5891 m -23924 5497 L -23418 3622 22483 2170 21119 1135 c -19749 106 18003 -412 15880 -412 c -13205 -412 11082 412 9518 2058 c -7949 3704 7167 6015 7167 8990 c -7167 12071 7960 14458 9542 16157 c -11129 17857 13181 18709 15710 18709 c -18156 18709 20155 17874 21701 16210 c -23253 14546 24029 12200 24029 9184 c -24029 8996 24024 8720 24012 8355 C -10371 8355 L -10483 6344 11053 4804 12076 3739 c -13099 2669 14369 2134 15898 2134 c -17033 2134 18003 2434 18808 3034 c -19614 3628 20249 4580 20719 5891 C -@c -10541 10907 m -20754 10907 L -20619 12441 20225 13600 19584 14364 c -18597 15558 17315 16157 15745 16157 c -14322 16157 13123 15681 12152 14729 c -11182 13776 10647 12500 10541 10907 C -@c -F -%CHAR: 25488 0 (r) @t -27781 0 m -27781 18292 L -30568 18292 L -30568 15522 L -31279 16816 31938 17674 32544 18086 c -33143 18497 33808 18709 34531 18709 c -35578 18709 36636 18374 37718 17710 C -36648 14829 L -35895 15281 35137 15505 34378 15505 c -33696 15505 33090 15299 32549 14893 c -32009 14482 31626 13917 31397 13194 c -31050 12094 30880 10889 30880 9578 c -30880 0 L -27781 0 L -@c -F -%CHAR: -68634 -35278 (I) @t --65341 -35278 m --65341 -10025 L --62002 -10025 L --62002 -35278 L --65341 -35278 L -@c -F -%CHAR: -58827 -35278 (n) @t --56499 -35278 m --56499 -16986 L --53712 -16986 L --53712 -19585 L --52365 -17574 -50425 -16569 -47891 -16569 c --46785 -16569 -45774 -16769 -44851 -17163 c --43922 -17563 -43234 -18080 -42776 -18727 c --42311 -19368 -41994 -20132 -41805 -21014 c --41694 -21590 -41635 -22596 -41635 -24030 c --41635 -35278 L --44739 -35278 L --44739 -24148 l --44739 -22890 -44857 -21943 -45098 -21314 c --45339 -20691 -45768 -20191 -46380 -19820 c --46997 -19444 -47714 -19256 -48543 -19256 c --49866 -19256 -51001 -19679 -51965 -20514 c --52924 -21355 -53400 -22942 -53400 -25288 c --53400 -35278 L --56499 -35278 L -@c -F -%CHAR: -39212 -35278 (t) @t --30116 -32503 m --29669 -35243 L --30539 -35425 -31321 -35519 -32009 -35519 c --33138 -35519 -34008 -35343 -34632 -34984 c --35249 -34631 -35684 -34161 -35937 -33579 c --36190 -33003 -36319 -31780 -36319 -29922 c --36319 -19397 L --38595 -19397 L --38595 -16986 L --36319 -16986 L --36319 -12453 L --33232 -10595 L --33232 -16986 L --30116 -16986 L --30116 -19397 L --33232 -19397 L --33232 -30092 l --33232 -30980 -33179 -31544 -33074 -31797 c --32962 -32050 -32786 -32250 -32539 -32403 c --32292 -32550 -31939 -32626 -31480 -32626 c --31133 -32626 -30681 -32585 -30116 -32503 C -@c -F -%CHAR: -29405 -35278 (e) @t --14559 -29387 m --11354 -29781 L --11860 -31656 -12795 -33108 -14159 -34143 c --15529 -35172 -17275 -35690 -19398 -35690 c --22073 -35690 -24196 -34866 -25760 -33220 c --27329 -31574 -28111 -29263 -28111 -26288 c --28111 -23207 -27318 -20820 -25736 -19121 c --24149 -17421 -22097 -16569 -19568 -16569 c --17122 -16569 -15123 -17404 -13577 -19068 c --12025 -20732 -11249 -23078 -11249 -26094 c --11249 -26282 -11254 -26558 -11266 -26923 C --24907 -26923 L --24795 -28934 -24225 -30474 -23202 -31539 c --22179 -32609 -20909 -33144 -19380 -33144 c --18245 -33144 -17275 -32844 -16470 -32244 c --15664 -31650 -15029 -30698 -14559 -29387 C -@c --24737 -24371 m --14524 -24371 L --14659 -22837 -15053 -21678 -15694 -20914 c --16681 -19720 -17963 -19121 -19533 -19121 c --20956 -19121 -22155 -19597 -23126 -20549 c --24096 -21502 -24631 -22778 -24737 -24371 C -@c -F -%CHAR: -9790 -35278 (r) @t --7497 -35278 m --7497 -16986 L --4710 -16986 L --4710 -19756 L --3999 -18462 -3340 -17604 -2734 -17192 c --2135 -16781 -1470 -16569 -747 -16569 c -300 -16569 1358 -16904 2440 -17568 C -1370 -20449 L -617 -19997 -141 -19773 -900 -19773 c --1582 -19773 -2188 -19979 -2729 -20385 c --3269 -20796 -3652 -21361 -3881 -22084 c --4228 -23184 -4398 -24389 -4398 -25700 c --4398 -35278 L --7497 -35278 L -@c -F -%CHAR: 1958 -35278 (f) @t -5021 -35278 m -5021 -19397 L -2287 -19397 L -2287 -16986 L -5021 -16986 L -5021 -15040 l -5021 -13811 5133 -12894 5351 -12300 c -5650 -11495 6174 -10842 6926 -10342 c -7679 -9843 8731 -9596 10090 -9596 c -10960 -9596 11924 -9696 12982 -9907 C -12518 -12612 L -11877 -12494 11266 -12435 10689 -12435 c -9749 -12435 9084 -12635 8696 -13041 c -8302 -13441 8108 -14194 8108 -15299 c -8108 -16986 L -11671 -16986 L -11671 -19397 L -8108 -19397 L -8108 -35278 L -5021 -35278 L -@c -F -%CHAR: 11765 -35278 (a) @t -26029 -33020 m -24877 -33996 23771 -34684 22713 -35090 c -21649 -35490 20508 -35690 19291 -35690 c -17280 -35690 15740 -35202 14658 -34220 c -13582 -33238 13041 -31980 13041 -30457 c -13041 -29557 13241 -28740 13652 -27999 c -14058 -27258 14593 -26664 15252 -26217 c -15916 -25771 16657 -25430 17486 -25200 c -18092 -25042 19009 -24883 20238 -24736 c -22742 -24436 24589 -24083 25770 -23666 C -25782 -23242 25788 -22972 25788 -22860 c -25788 -21596 25494 -20702 24906 -20191 c -24118 -19485 22936 -19138 21378 -19138 c -19920 -19138 18844 -19391 18144 -19903 c -17451 -20414 16939 -21320 16604 -22619 C -13576 -22202 L -13852 -20908 14305 -19856 14934 -19062 c -15563 -18262 16480 -17645 17674 -17216 c -18868 -16786 20249 -16569 21825 -16569 c -23389 -16569 24653 -16757 25629 -17122 c -26605 -17492 27323 -17951 27787 -18509 c -28246 -19068 28563 -19767 28751 -20620 c -28851 -21149 28904 -22102 28904 -23478 c -28904 -27611 l -28904 -30498 28969 -32321 29104 -33079 c -29233 -33843 29498 -34578 29886 -35278 C -26646 -35278 L -26329 -34637 26117 -33885 26029 -33020 C -@c -25770 -26094 m -24641 -26558 22954 -26947 20708 -27270 c -19432 -27452 18527 -27658 18003 -27887 c -17474 -28117 17063 -28452 16780 -28899 c -16492 -29340 16345 -29828 16345 -30368 c -16345 -31198 16663 -31885 17286 -32438 c -17909 -32985 18826 -33261 20032 -33261 c -21225 -33261 22290 -33003 23219 -32479 c -24148 -31956 24835 -31239 25271 -30333 c -25606 -29634 25770 -28599 25770 -27235 c -25770 -26094 L -@c -F -%CHAR: 31380 -35278 (c) @t -45644 -28575 m -48690 -28975 L -48360 -31074 47508 -32720 46132 -33908 c -44762 -35096 43075 -35690 41076 -35690 c -38577 -35690 36560 -34872 35043 -33238 c -33520 -31603 32756 -29257 32756 -26200 c -32756 -24224 33085 -22496 33738 -21014 c -34396 -19532 35390 -18421 36730 -17680 c -38065 -16939 39523 -16569 41093 -16569 c -43081 -16569 44709 -17075 45967 -18080 c -47232 -19085 48043 -20508 48402 -22360 C -45385 -22825 L -45097 -21596 44592 -20673 43863 -20050 c -43133 -19432 42252 -19121 41217 -19121 c -39653 -19121 38383 -19679 37407 -20802 c -36431 -21919 35943 -23689 35943 -26112 c -35943 -28569 36413 -30357 37360 -31474 c -38300 -32585 39529 -33144 41046 -33144 c -42263 -33144 43275 -32767 44092 -32021 c -44909 -31274 45427 -30127 45644 -28575 C -@c -F -%CHAR: 49019 -35278 (e) @t -63865 -29387 m -67070 -29781 L -66564 -31656 65629 -33108 64265 -34143 c -62895 -35172 61149 -35690 59026 -35690 c -56351 -35690 54228 -34866 52664 -33220 c -51095 -31574 50313 -29263 50313 -26288 c -50313 -23207 51106 -20820 52688 -19121 c -54275 -17421 56327 -16569 58856 -16569 c -61302 -16569 63301 -17404 64847 -19068 c -66399 -20732 67175 -23078 67175 -26094 c -67175 -26282 67170 -26558 67158 -26923 C -53517 -26923 L -53629 -28934 54199 -30474 55222 -31539 c -56245 -32609 57515 -33144 59044 -33144 c -60179 -33144 61149 -32844 61954 -32244 c -62760 -31650 63395 -30698 63865 -29387 C -@c -53687 -24371 m -63900 -24371 L -63765 -22837 63371 -21678 62730 -20914 c -61743 -19720 60461 -19121 58891 -19121 c -57468 -19121 56269 -19597 55298 -20549 c -54328 -21502 53793 -22778 53687 -24371 C -@c -F -T -@rax 75.19550 724.32312 122.87991 741.71991 @E -[0.00028346 0.00000000 0.00000000 0.00028346 99.37105148 734.43994164] @tm - 0 O 0 @g -0.00 0.00 0.00 1.00 k -e - -% FontChange:/_ArialCE 35278.00000 z -%CHAR: -85286 0 (C) @t --64548 8855 m --61203 8008 L --61903 5268 -63167 3175 -64984 1729 c --66806 288 -69029 -429 -71663 -429 c --74385 -429 -76596 123 -78301 1229 c --80006 2340 -81305 3945 -82193 6044 c --83081 8149 -83528 10407 -83528 12818 c --83528 15446 -83028 17739 -82023 19697 c --81017 21655 -79589 23142 -77731 24160 c --75879 25177 -73838 25682 -71610 25682 c --69082 25682 -66959 25042 -65236 23754 c --63514 22466 -62314 20661 -61638 18327 C --64925 17551 L --65513 19391 -66359 20726 -67476 21567 c --68588 22407 -69987 22825 -71680 22825 c --73621 22825 -75238 22360 -76543 21431 c --77848 20497 -78765 19250 -79289 17680 c --79818 16116 -80082 14499 -80082 12835 c --80082 10683 -79771 8814 -79148 7208 c --78519 5609 -77548 4410 -76225 3616 c --74903 2822 -73474 2428 -71933 2428 c --70064 2428 -68482 2969 -67183 4045 c --65883 5127 -65007 6732 -64548 8855 C -@c -F -%CHAR: -59815 0 (o) @t --58645 9149 m --58645 12535 -57704 15046 -55817 16675 c --54247 18027 -52330 18709 -50067 18709 c --47550 18709 -45492 17886 -43899 16234 c --42299 14587 -41506 12312 -41506 9407 c --41506 7050 -41858 5198 -42564 3851 c --43270 2499 -44299 1452 -45645 706 c --46997 -41 -48467 -412 -50067 -412 c --52624 -412 -54694 406 -56275 2052 c --57857 3692 -58645 6056 -58645 9149 c -@c --55458 9149 m --55458 6803 -54947 5051 -53924 3886 c --52901 2716 -51613 2134 -50067 2134 c --48526 2134 -47244 2722 -46221 3892 c --45204 5062 -44692 6850 -44692 9249 c --44692 11512 -45204 13229 -46233 14393 c --47262 15558 -48538 16140 -50067 16140 c --51613 16140 -52901 15558 -53924 14399 c --54947 13241 -55458 11489 -55458 9149 c -@c -F -%CHAR: -40200 0 (m) @t --37872 0 m --37872 18292 L --35102 18292 L --35102 15728 L --34526 16622 -33762 17345 -32809 17886 c --31857 18433 -30769 18709 -29552 18709 c --28200 18709 -27088 18427 -26224 17862 c --25354 17298 -24742 16516 -24390 15505 C --22937 17639 -21056 18709 -18739 18709 c --16922 18709 -15529 18203 -14553 17198 c --13577 16193 -13089 14646 -13089 12559 c --13089 0 L --16170 0 L --16170 11524 l --16170 12765 -16270 13658 -16470 14205 c --16675 14746 -17040 15187 -17563 15522 c --18092 15852 -18716 16022 -19427 16022 c --20715 16022 -21779 15593 -22632 14734 c --23478 13882 -23907 12512 -23907 10630 c --23907 0 L --27006 0 L --27006 11883 l --27006 13265 -27259 14299 -27765 14987 c --28270 15675 -29093 16022 -30246 16022 c --31116 16022 -31921 15793 -32662 15328 c --33403 14870 -33944 14199 -34273 13317 c --34608 12430 -34773 11154 -34773 9490 c --34773 0 L --37872 0 L -@c -F -%CHAR: -10813 0 (p) @t --8485 -7009 m --8485 18292 L --5662 18292 L --5662 15916 L --4998 16845 -4245 17545 -3405 18009 c --2570 18474 -1553 18709 -359 18709 c -1205 18709 2581 18303 3774 17504 c -4974 16698 5873 15563 6479 14099 c -7091 12635 7396 11030 7396 9284 c -7396 7414 7061 5727 6385 4227 c -5715 2728 4739 1582 3457 782 c -2175 -12 829 -412 -582 -412 c --1617 -412 -2540 -194 -3363 241 c --4187 676 -4857 1229 -5386 1893 C --5386 -7009 L --8485 -7009 L -@c --5680 9043 m --5680 6691 -5204 4951 -4251 3822 c --3299 2699 -2140 2134 -788 2134 c -588 2134 1769 2716 2751 3886 c -3733 5051 4227 6856 4227 9302 c -4227 11636 3745 13376 2787 14540 c -1828 15699 682 16281 -647 16281 c --1970 16281 -3140 15663 -4157 14429 c --5174 13194 -5680 11395 -5680 9043 c -@c -F -%CHAR: 8802 0 (u) @t -23119 0 m -23119 2687 L -21690 617 19756 -412 17310 -412 c -16234 -412 15223 -206 14288 206 c -13353 617 12659 1141 12206 1764 c -11748 2393 11430 3157 11248 4063 c -11124 4674 11060 5639 11060 6962 c -11060 18292 L -14158 18292 L -14158 8149 l -14158 6526 14223 5439 14347 4874 c -14546 4057 14958 3422 15587 2952 c -16222 2487 17004 2258 17933 2258 c -18862 2258 19732 2493 20550 2969 c -21367 3445 21943 4098 22278 4915 c -22619 5739 22790 6932 22790 8490 c -22790 18292 L -25888 18292 L -25888 0 L -23119 0 L -@c -F -%CHAR: 28417 0 (t) @t -37513 2775 m -37960 35 L -37090 -147 36308 -241 35620 -241 c -34491 -241 33621 -65 32997 294 c -32380 647 31945 1117 31692 1699 c -31439 2275 31310 3498 31310 5356 c -31310 15881 L -29034 15881 L -29034 18292 L -31310 18292 L -31310 22825 L -34397 24683 L -34397 18292 L -37513 18292 L -37513 15881 L -34397 15881 L -34397 5186 l -34397 4298 34450 3734 34555 3481 c -34667 3228 34843 3028 35090 2875 c -35337 2728 35690 2652 36149 2652 c -36496 2652 36948 2693 37513 2775 C -@c -F -%CHAR: 38224 0 (i) @t -40564 21684 m -40564 25253 L -43669 25253 L -43669 21684 L -40564 21684 L -@c -40564 0 m -40564 18292 L -43669 18292 L -43669 0 L -40564 0 L -@c -F -%CHAR: 46056 0 (n) @t -48384 0 m -48384 18292 L -51171 18292 L -51171 15693 L -52518 17704 54458 18709 56992 18709 c -58098 18709 59109 18509 60032 18115 c -60961 17715 61649 17198 62107 16551 c -62572 15910 62889 15146 63078 14264 c -63189 13688 63248 12682 63248 11248 c -63248 0 L -60144 0 L -60144 11130 l -60144 12388 60026 13335 59785 13964 c -59544 14587 59115 15087 58503 15458 c -57886 15834 57169 16022 56340 16022 c -55017 16022 53882 15599 52918 14764 c -51959 13923 51483 12336 51483 9990 c -51483 0 L -48384 0 L -@c -F -%CHAR: 65671 0 (g) @t -67429 -1517 m -70445 -1964 L -70569 -2893 70922 -3569 71492 -3998 c -72262 -4569 73315 -4857 74643 -4857 c -76084 -4857 77189 -4569 77971 -3998 c -78753 -3422 79277 -2616 79553 -1588 c -79718 -953 79788 370 79776 2393 C -78424 800 76737 0 74714 0 c -72197 0 70251 905 68875 2722 c -67500 4533 66806 6715 66806 9249 c -66806 10995 67123 12606 67752 14082 c -68387 15558 69305 16698 70504 17504 c -71704 18303 73115 18709 74732 18709 c -76889 18709 78671 17833 80070 16087 C -80070 18292 L -82934 18292 L -82934 2481 l -82934 -365 82640 -2387 82064 -3575 c -81481 -4763 80564 -5703 79306 -6391 c -78048 -7079 76501 -7426 74661 -7426 c -72480 -7426 70716 -6932 69375 -5950 c -68029 -4968 67382 -3493 67429 -1517 C -@c -69993 9472 m -69993 7073 70469 5321 71427 4222 c -72380 3116 73573 2569 75008 2569 c -76431 2569 77624 3116 78589 4210 c -79553 5309 80035 7026 80035 9372 c -80035 11612 79541 13300 78547 14435 c -77554 15569 76354 16140 74955 16140 c -73579 16140 72409 15581 71439 14458 c -70475 13341 69993 11677 69993 9472 c -@c -F -%CHAR: -64701 -35278 (E) @t --61908 -35278 m --61908 -10025 L --43652 -10025 L --43652 -13006 L --58569 -13006 L --58569 -20738 L --44598 -20738 L --44598 -23701 L --58569 -23701 L --58569 -32297 L --43064 -32297 L --43064 -35278 L --61908 -35278 L -@c -F -%CHAR: -41171 -35278 (l) @t --38913 -35278 m --38913 -10025 L --35815 -10025 L --35815 -35278 L --38913 -35278 L -@c -F -%CHAR: -33339 -35278 (e) @t --18493 -29387 m --15288 -29781 L --15794 -31656 -16729 -33108 -18093 -34143 c --19463 -35172 -21209 -35690 -23332 -35690 c --26007 -35690 -28130 -34866 -29694 -33220 c --31263 -31574 -32045 -29263 -32045 -26288 c --32045 -23207 -31252 -20820 -29670 -19121 c --28083 -17421 -26031 -16569 -23502 -16569 c --21056 -16569 -19057 -17404 -17511 -19068 c --15959 -20732 -15183 -23078 -15183 -26094 c --15183 -26282 -15188 -26558 -15200 -26923 C --28841 -26923 L --28729 -28934 -28159 -30474 -27136 -31539 c --26113 -32609 -24843 -33144 -23314 -33144 c --22179 -33144 -21209 -32844 -20404 -32244 c --19598 -31650 -18963 -30698 -18493 -29387 C -@c --28671 -24371 m --18458 -24371 L --18593 -22837 -18987 -21678 -19628 -20914 c --20615 -19720 -21897 -19121 -23467 -19121 c --24890 -19121 -26089 -19597 -27060 -20549 c --28030 -21502 -28565 -22778 -28671 -24371 C -@c -F -%CHAR: -13724 -35278 (m) @t --11396 -35278 m --11396 -16986 L --8626 -16986 L --8626 -19550 L --8050 -18656 -7286 -17933 -6333 -17392 c --5381 -16845 -4293 -16569 -3076 -16569 c --1724 -16569 -612 -16851 252 -17416 c -1122 -17980 1734 -18762 2086 -19773 C -3539 -17639 5420 -16569 7737 -16569 c -9554 -16569 10947 -17075 11923 -18080 c -12899 -19085 13387 -20632 13387 -22719 c -13387 -35278 L -10306 -35278 L -10306 -23754 l -10306 -22513 10206 -21620 10006 -21073 c -9801 -20532 9436 -20091 8913 -19756 c -8384 -19426 7760 -19256 7049 -19256 c -5761 -19256 4697 -19685 3844 -20544 c -2998 -21396 2569 -22766 2569 -24648 c -2569 -35278 L --530 -35278 L --530 -23395 l --530 -22013 -783 -20979 -1289 -20291 c --1794 -19603 -2617 -19256 -3770 -19256 c --4640 -19256 -5445 -19485 -6186 -19950 c --6927 -20408 -7468 -21079 -7797 -21961 c --8132 -22848 -8297 -24124 -8297 -25788 c --8297 -35278 L --11396 -35278 L -@c -F -%CHAR: 15663 -35278 (e) @t -30509 -29387 m -33714 -29781 L -33208 -31656 32273 -33108 30909 -34143 c -29539 -35172 27793 -35690 25670 -35690 c -22995 -35690 20872 -34866 19308 -33220 c -17739 -31574 16957 -29263 16957 -26288 c -16957 -23207 17750 -20820 19332 -19121 c -20919 -17421 22971 -16569 25500 -16569 c -27946 -16569 29945 -17404 31491 -19068 c -33043 -20732 33819 -23078 33819 -26094 c -33819 -26282 33814 -26558 33802 -26923 C -20161 -26923 L -20273 -28934 20843 -30474 21866 -31539 c -22889 -32609 24159 -33144 25688 -33144 c -26823 -33144 27793 -32844 28598 -32244 c -29404 -31650 30039 -30698 30509 -29387 C -@c -20331 -24371 m -30544 -24371 L -30409 -22837 30015 -21678 29374 -20914 c -28387 -19720 27105 -19121 25535 -19121 c -24112 -19121 22913 -19597 21942 -20549 c -20972 -21502 20437 -22778 20331 -24371 C -@c -F -%CHAR: 35278 -35278 (n) @t -37606 -35278 m -37606 -16986 L -40393 -16986 L -40393 -19585 L -41740 -17574 43680 -16569 46214 -16569 c -47320 -16569 48331 -16769 49254 -17163 c -50183 -17563 50871 -18080 51329 -18727 c -51794 -19368 52111 -20132 52300 -21014 c -52411 -21590 52470 -22596 52470 -24030 c -52470 -35278 L -49366 -35278 L -49366 -24148 l -49366 -22890 49248 -21943 49007 -21314 c -48766 -20691 48337 -20191 47725 -19820 c -47108 -19444 46391 -19256 45562 -19256 c -44239 -19256 43104 -19679 42140 -20514 c -41181 -21355 40705 -22942 40705 -25288 c -40705 -35278 L -37606 -35278 L -@c -F -%CHAR: 54893 -35278 (t) @t -63989 -32503 m -64436 -35243 L -63566 -35425 62784 -35519 62096 -35519 c -60967 -35519 60097 -35343 59473 -34984 c -58856 -34631 58421 -34161 58168 -33579 c -57915 -33003 57786 -31780 57786 -29922 c -57786 -19397 L -55510 -19397 L -55510 -16986 L -57786 -16986 L -57786 -12453 L -60873 -10595 L -60873 -16986 L -63989 -16986 L -63989 -19397 L -60873 -19397 L -60873 -30092 l -60873 -30980 60926 -31544 61031 -31797 c -61143 -32050 61319 -32250 61566 -32403 c -61813 -32550 62166 -32626 62625 -32626 c -62972 -32626 63424 -32585 63989 -32503 C -@c -F -T -@rax 225.78123 656.90901 282.92570 676.29402 @E -[0.00028346 0.00000000 0.00000000 0.00028346 254.68695131 669.01405427] @tm - 0 O 0 @g -0.00 0.00 0.00 1.00 k -e - -% FontChange:/_ArialCE 35278.00000 z -%CHAR: -79430 0 (L) @t --76849 0 m --76849 25253 L --73503 25253 L --73503 2981 L --61068 2981 L --61068 0 L --76849 0 L -@c -F -%CHAR: -59815 0 (o) @t --58645 9149 m --58645 12535 -57704 15046 -55817 16675 c --54247 18027 -52330 18709 -50067 18709 c --47550 18709 -45492 17886 -43899 16234 c --42299 14587 -41506 12312 -41506 9407 c --41506 7050 -41858 5198 -42564 3851 c --43270 2499 -44299 1452 -45645 706 c --46997 -41 -48467 -412 -50067 -412 c --52624 -412 -54694 406 -56275 2052 c --57857 3692 -58645 6056 -58645 9149 c -@c --55458 9149 m --55458 6803 -54947 5051 -53924 3886 c --52901 2716 -51613 2134 -50067 2134 c --48526 2134 -47244 2722 -46221 3892 c --45204 5062 -44692 6850 -44692 9249 c --44692 11512 -45204 13229 -46233 14393 c --47262 15558 -48538 16140 -50067 16140 c --51613 16140 -52901 15558 -53924 14399 c --54947 13241 -55458 11489 -55458 9149 c -@c -F -%CHAR: -40200 0 (g) @t --38442 -1517 m --35426 -1964 L --35302 -2893 -34949 -3569 -34379 -3998 c --33609 -4569 -32556 -4857 -31228 -4857 c --29787 -4857 -28682 -4569 -27900 -3998 c --27118 -3422 -26594 -2616 -26318 -1588 c --26153 -953 -26083 370 -26095 2393 C --27447 800 -29134 0 -31157 0 c --33674 0 -35620 905 -36996 2722 c --38371 4533 -39065 6715 -39065 9249 c --39065 10995 -38748 12606 -38119 14082 c --37484 15558 -36566 16698 -35367 17504 c --34167 18303 -32756 18709 -31139 18709 c --28982 18709 -27200 17833 -25801 16087 C --25801 18292 L --22937 18292 L --22937 2481 l --22937 -365 -23231 -2387 -23807 -3575 c --24390 -4763 -25307 -5703 -26565 -6391 c --27823 -7079 -29370 -7426 -31210 -7426 c --33391 -7426 -35155 -6932 -36496 -5950 c --37842 -4968 -38489 -3493 -38442 -1517 C -@c --35878 9472 m --35878 7073 -35402 5321 -34444 4222 c --33491 3116 -32298 2569 -30863 2569 c --29440 2569 -28247 3116 -27282 4210 c --26318 5309 -25836 7026 -25836 9372 c --25836 11612 -26330 13300 -27324 14435 c --28317 15569 -29517 16140 -30916 16140 c --32292 16140 -33462 15581 -34432 14458 c --35396 13341 -35878 11677 -35878 9472 c -@c -F -%CHAR: -20585 0 (g) @t --18827 -1517 m --15811 -1964 L --15687 -2893 -15334 -3569 -14764 -3998 c --13994 -4569 -12941 -4857 -11613 -4857 c --10172 -4857 -9067 -4569 -8285 -3998 c --7503 -3422 -6979 -2616 -6703 -1588 c --6538 -953 -6468 370 -6480 2393 C --7832 800 -9519 0 -11542 0 c --14059 0 -16005 905 -17381 2722 c --18756 4533 -19450 6715 -19450 9249 c --19450 10995 -19133 12606 -18504 14082 c --17869 15558 -16951 16698 -15752 17504 c --14552 18303 -13141 18709 -11524 18709 c --9367 18709 -7585 17833 -6186 16087 C --6186 18292 L --3322 18292 L --3322 2481 l --3322 -365 -3616 -2387 -4192 -3575 c --4775 -4763 -5692 -5703 -6950 -6391 c --8208 -7079 -9755 -7426 -11595 -7426 c --13776 -7426 -15540 -6932 -16881 -5950 c --18227 -4968 -18874 -3493 -18827 -1517 C -@c --16263 9472 m --16263 7073 -15787 5321 -14829 4222 c --13876 3116 -12683 2569 -11248 2569 c --9825 2569 -8632 3116 -7667 4210 c --6703 5309 -6221 7026 -6221 9372 c --6221 11612 -6715 13300 -7709 14435 c --8702 15569 -9902 16140 -11301 16140 c --12677 16140 -13847 15581 -14817 14458 c --15781 13341 -16263 11677 -16263 9472 c -@c -F -%CHAR: -970 0 (i) @t -1370 21684 m -1370 25253 L -4475 25253 L -4475 21684 L -1370 21684 L -@c -1370 0 m -1370 18292 L -4475 18292 L -4475 0 L -1370 0 L -@c -F -%CHAR: 6862 0 (n) @t -9190 0 m -9190 18292 L -11977 18292 L -11977 15693 L -13324 17704 15264 18709 17798 18709 c -18904 18709 19915 18509 20838 18115 c -21767 17715 22455 17198 22913 16551 c -23378 15910 23695 15146 23884 14264 c -23995 13688 24054 12682 24054 11248 c -24054 0 L -20950 0 L -20950 11130 l -20950 12388 20832 13335 20591 13964 c -20350 14587 19921 15087 19309 15458 c -18692 15834 17975 16022 17146 16022 c -15823 16022 14688 15599 13724 14764 c -12765 13923 12289 12336 12289 9990 c -12289 0 L -9190 0 L -@c -F -%CHAR: 26477 0 (g) @t -28235 -1517 m -31251 -1964 L -31375 -2893 31728 -3569 32298 -3998 c -33068 -4569 34121 -4857 35449 -4857 c -36890 -4857 37995 -4569 38777 -3998 c -39559 -3422 40083 -2616 40359 -1588 c -40524 -953 40594 370 40582 2393 C -39230 800 37543 0 35520 0 c -33003 0 31057 905 29681 2722 c -28306 4533 27612 6715 27612 9249 c -27612 10995 27929 12606 28558 14082 c -29193 15558 30111 16698 31310 17504 c -32510 18303 33921 18709 35538 18709 c -37695 18709 39477 17833 40876 16087 C -40876 18292 L -43740 18292 L -43740 2481 l -43740 -365 43446 -2387 42870 -3575 c -42287 -4763 41370 -5703 40112 -6391 c -38854 -7079 37307 -7426 35467 -7426 c -33286 -7426 31522 -6932 30181 -5950 c -28835 -4968 28188 -3493 28235 -1517 C -@c -30799 9472 m -30799 7073 31275 5321 32233 4222 c -33186 3116 34379 2569 35814 2569 c -37237 2569 38430 3116 39395 4210 c -40359 5309 40841 7026 40841 9372 c -40841 11612 40347 13300 39353 14435 c -38360 15569 37160 16140 35761 16140 c -34385 16140 33215 15581 32245 14458 c -31281 13341 30799 11677 30799 9472 c -@c -F -%CHAR: 55899 0 (&) @t -72662 2981 m -71639 1840 70522 988 69316 423 c -68111 -147 66806 -429 65406 -429 c -62825 -429 60773 441 59256 2187 c -58027 3610 57416 5204 57416 6962 c -57416 8520 57916 9931 58921 11189 c -59927 12447 61426 13553 63425 14505 C -62290 15810 61532 16875 61155 17692 c -60773 18503 60585 19291 60585 20050 c -60585 21567 61179 22884 62367 24007 c -63554 25124 65054 25682 66853 25682 c -68576 25682 69987 25153 71086 24101 c -72180 23042 72727 21772 72727 20291 c -72727 17892 71139 15840 67958 14141 C -72486 8373 L -73003 9384 73409 10554 73691 11883 C -76913 11195 L -76360 8990 75619 7179 74673 5756 C -75837 4216 77148 2922 78618 1876 C -76537 -588 L -75284 218 73991 1405 72662 2981 C -@c -66353 16140 m -67699 16933 68570 17627 68964 18227 c -69363 18821 69557 19479 69557 20208 c -69557 21067 69287 21772 68740 22313 c -68193 22860 67517 23136 66700 23136 c -65859 23136 65165 22866 64607 22325 c -64048 21784 63772 21126 63772 20344 c -63772 19956 63872 19544 64072 19109 c -64272 18680 64577 18227 64977 17745 c -66353 16140 L -@c -70716 5427 m -65030 12471 L -63354 11471 62220 10542 61638 9690 c -61050 8831 60756 7985 60756 7150 c -60756 6127 61167 5062 61979 3963 c -62796 2858 63948 2311 65442 2311 c -66371 2311 67335 2599 68329 3181 c -69322 3757 70116 4510 70716 5427 C -@c -F -%CHAR: -101973 -35278 (B) @t --99392 -35278 m --99392 -10025 L --89914 -10025 l --87985 -10025 -86439 -10284 -85275 -10789 c --84105 -11301 -83193 -12089 -82535 -13153 c --81876 -14211 -81541 -15322 -81541 -16487 c --81541 -17563 -81835 -18580 -82423 -19532 c --83005 -20485 -83893 -21255 -85075 -21843 C --83546 -22290 -82376 -23054 -81553 -24130 c --80730 -25212 -80318 -26488 -80318 -27958 c --80318 -29140 -80571 -30239 -81071 -31256 c --81571 -32273 -82188 -33055 -82923 -33608 c --83658 -34161 -84581 -34572 -85686 -34855 c --86792 -35137 -88150 -35278 -89761 -35278 c --99392 -35278 L -@c --96046 -20638 m --90584 -20638 l --89108 -20638 -88044 -20538 -87397 -20344 c --86551 -20091 -85910 -19673 -85481 -19085 c --85051 -18497 -84834 -17762 -84834 -16881 c --84834 -16046 -85034 -15305 -85433 -14670 c --85839 -14029 -86415 -13594 -87156 -13359 c --87903 -13123 -89185 -13006 -91002 -13006 c --96046 -13006 L --96046 -20638 L -@c --96046 -32297 m --89761 -32297 l --88679 -32297 -87921 -32256 -87486 -32179 c --86715 -32038 -86074 -31809 -85557 -31486 c --85040 -31168 -84616 -30698 -84281 -30086 c --83952 -29469 -83781 -28763 -83781 -27958 c --83781 -27017 -84022 -26200 -84505 -25500 c --84987 -24806 -85657 -24318 -86515 -24036 c --87368 -23760 -88603 -23619 -90208 -23619 c --96046 -23619 L --96046 -32297 L -@c -F -%CHAR: -78443 -35278 (o) @t --77273 -26129 m --77273 -22743 -76332 -20232 -74445 -18603 c --72875 -17251 -70958 -16569 -68695 -16569 c --66178 -16569 -64120 -17392 -62527 -19044 c --60927 -20691 -60134 -22966 -60134 -25871 c --60134 -28228 -60486 -30080 -61192 -31427 c --61898 -32779 -62927 -33826 -64273 -34572 c --65625 -35319 -67095 -35690 -68695 -35690 c --71252 -35690 -73322 -34872 -74903 -33226 c --76485 -31586 -77273 -29222 -77273 -26129 c -@c --74086 -26129 m --74086 -28475 -73575 -30227 -72552 -31392 c --71529 -32562 -70241 -33144 -68695 -33144 c --67154 -33144 -65872 -32556 -64849 -31386 c --63832 -30216 -63320 -28428 -63320 -26029 c --63320 -23766 -63832 -22049 -64861 -20885 c --65890 -19720 -67166 -19138 -68695 -19138 c --70241 -19138 -71529 -19720 -72552 -20879 c --73575 -22037 -74086 -23789 -74086 -26129 c -@c -F -%CHAR: -58828 -35278 (o) @t --57658 -26129 m --57658 -22743 -56717 -20232 -54830 -18603 c --53260 -17251 -51343 -16569 -49080 -16569 c --46563 -16569 -44505 -17392 -42912 -19044 c --41312 -20691 -40519 -22966 -40519 -25871 c --40519 -28228 -40871 -30080 -41577 -31427 c --42283 -32779 -43312 -33826 -44658 -34572 c --46010 -35319 -47480 -35690 -49080 -35690 c --51637 -35690 -53707 -34872 -55288 -33226 c --56870 -31586 -57658 -29222 -57658 -26129 c -@c --54471 -26129 m --54471 -28475 -53960 -30227 -52937 -31392 c --51914 -32562 -50626 -33144 -49080 -33144 c --47539 -33144 -46257 -32556 -45234 -31386 c --44217 -30216 -43705 -28428 -43705 -26029 c --43705 -23766 -44217 -22049 -45246 -20885 c --46275 -19720 -47551 -19138 -49080 -19138 c --50626 -19138 -51914 -19720 -52937 -20879 c --53960 -22037 -54471 -23789 -54471 -26129 c -@c -F -%CHAR: -39213 -35278 (k) @t --36873 -35278 m --36873 -10025 L --33768 -10025 L --33768 -24424 L --26431 -16986 L --22421 -16986 L --29412 -23771 L --21709 -35278 L --25537 -35278 L --31581 -25923 L --33768 -28028 L --33768 -35278 L --36873 -35278 L -@c -F -%CHAR: -21574 -35278 (k) @t --19234 -35278 m --19234 -10025 L --16129 -10025 L --16129 -24424 L --8792 -16986 L --4782 -16986 L --11773 -23771 L --4070 -35278 L --7898 -35278 L --13942 -25923 L --16129 -28028 L --16129 -35278 L --19234 -35278 L -@c -F -%CHAR: -3935 -35278 (e) @t -10911 -29387 m -14116 -29781 L -13610 -31656 12675 -33108 11311 -34143 c -9941 -35172 8195 -35690 6072 -35690 c -3397 -35690 1274 -34866 -290 -33220 c --1859 -31574 -2641 -29263 -2641 -26288 c --2641 -23207 -1848 -20820 -266 -19121 c -1321 -17421 3373 -16569 5902 -16569 c -8348 -16569 10347 -17404 11893 -19068 c -13445 -20732 14221 -23078 14221 -26094 c -14221 -26282 14216 -26558 14204 -26923 C -563 -26923 L -675 -28934 1245 -30474 2268 -31539 c -3291 -32609 4561 -33144 6090 -33144 c -7225 -33144 8195 -32844 9000 -32244 c -9806 -31650 10441 -30698 10911 -29387 C -@c -733 -24371 m -10946 -24371 L -10811 -22837 10417 -21678 9776 -20914 c -8789 -19720 7507 -19121 5937 -19121 c -4514 -19121 3315 -19597 2344 -20549 c -1374 -21502 839 -22778 733 -24371 C -@c -F -%CHAR: 15680 -35278 (e) @t -30526 -29387 m -33731 -29781 L -33225 -31656 32290 -33108 30926 -34143 c -29556 -35172 27810 -35690 25687 -35690 c -23012 -35690 20889 -34866 19325 -33220 c -17756 -31574 16974 -29263 16974 -26288 c -16974 -23207 17767 -20820 19349 -19121 c -20936 -17421 22988 -16569 25517 -16569 c -27963 -16569 29962 -17404 31508 -19068 c -33060 -20732 33836 -23078 33836 -26094 c -33836 -26282 33831 -26558 33819 -26923 C -20178 -26923 L -20290 -28934 20860 -30474 21883 -31539 c -22906 -32609 24176 -33144 25705 -33144 c -26840 -33144 27810 -32844 28615 -32244 c -29421 -31650 30056 -30698 30526 -29387 C -@c -20348 -24371 m -30561 -24371 L -30426 -22837 30032 -21678 29391 -20914 c -28404 -19720 27122 -19121 25552 -19121 c -24129 -19121 22930 -19597 21959 -20549 c -20989 -21502 20454 -22778 20348 -24371 C -@c -F -%CHAR: 35295 -35278 (p) @t -37623 -42287 m -37623 -16986 L -40446 -16986 L -40446 -19362 L -41110 -18433 41863 -17733 42703 -17269 c -43538 -16804 44555 -16569 45749 -16569 c -47313 -16569 48689 -16975 49882 -17774 c -51082 -18580 51981 -19715 52587 -21179 c -53199 -22643 53504 -24248 53504 -25994 c -53504 -27864 53169 -29551 52493 -31051 c -51823 -32550 50847 -33696 49565 -34496 c -48283 -35290 46937 -35690 45526 -35690 c -44491 -35690 43568 -35472 42745 -35037 c -41921 -34602 41251 -34049 40722 -33385 C -40722 -42287 L -37623 -42287 L -@c -40428 -26235 m -40428 -28587 40904 -30327 41857 -31456 c -42809 -32579 43968 -33144 45320 -33144 c -46696 -33144 47877 -32562 48859 -31392 c -49841 -30227 50335 -28422 50335 -25976 c -50335 -23642 49853 -21902 48895 -20738 c -47936 -19579 46790 -18997 45461 -18997 c -44138 -18997 42968 -19615 41951 -20849 c -40934 -22084 40428 -23883 40428 -26235 c -@c -F -%CHAR: 54910 -35278 (i) @t -57250 -13594 m -57250 -10025 L -60355 -10025 L -60355 -13594 L -57250 -13594 L -@c -57250 -35278 m -57250 -16986 L -60355 -16986 L -60355 -35278 L -57250 -35278 L -@c -F -%CHAR: 62742 -35278 (n) @t -65070 -35278 m -65070 -16986 L -67857 -16986 L -67857 -19585 L -69204 -17574 71144 -16569 73678 -16569 c -74784 -16569 75795 -16769 76718 -17163 c -77647 -17563 78335 -18080 78793 -18727 c -79258 -19368 79575 -20132 79764 -21014 c -79875 -21590 79934 -22596 79934 -24030 c -79934 -35278 L -76830 -35278 L -76830 -24148 l -76830 -22890 76712 -21943 76471 -21314 c -76230 -20691 75801 -20191 75189 -19820 c -74572 -19444 73855 -19256 73026 -19256 c -71703 -19256 70568 -19679 69604 -20514 c -68645 -21355 68169 -22942 68169 -25288 c -68169 -35278 L -65070 -35278 L -@c -F -%CHAR: 82357 -35278 (g) @t -84115 -36795 m -87131 -37242 L -87255 -38171 87608 -38847 88178 -39276 c -88948 -39847 90001 -40135 91329 -40135 c -92770 -40135 93875 -39847 94657 -39276 c -95439 -38700 95963 -37894 96239 -36866 c -96404 -36231 96474 -34908 96462 -32885 C -95110 -34478 93423 -35278 91400 -35278 c -88883 -35278 86937 -34373 85561 -32556 c -84186 -30745 83492 -28563 83492 -26029 c -83492 -24283 83809 -22672 84438 -21196 c -85073 -19720 85991 -18580 87190 -17774 c -88390 -16975 89801 -16569 91418 -16569 c -93575 -16569 95357 -17445 96756 -19191 C -96756 -16986 L -99620 -16986 L -99620 -32797 l -99620 -35643 99326 -37665 98750 -38853 c -98167 -40041 97250 -40981 95992 -41669 c -94734 -42357 93187 -42704 91347 -42704 c -89166 -42704 87402 -42210 86061 -41228 c -84715 -40246 84068 -38771 84115 -36795 C -@c -86679 -25806 m -86679 -28205 87155 -29957 88113 -31056 c -89066 -32162 90259 -32709 91694 -32709 c -93117 -32709 94310 -32162 95275 -31068 c -96239 -29969 96721 -28252 96721 -25906 c -96721 -23666 96227 -21978 95233 -20843 c -94240 -19709 93040 -19138 91641 -19138 c -90265 -19138 89095 -19697 88125 -20820 c -87161 -21937 86679 -23601 86679 -25806 c -@c -F -T -@rax 82.87313 592.65553 124.20227 611.91893 @E -[0.00028346 0.00000000 0.00000000 0.00028346 103.89854738 604.76057630] @tm - 0 O 0 @g -0.00 0.00 0.00 1.00 k -e - -% FontChange:/_ArialCE 35278.00000 z -%CHAR: -74173 0 (W) @t --67041 0 m --73744 25253 L --70316 25253 L --66471 8702 l --66059 6967 -65706 5245 -65406 3534 C --64760 6232 -64383 7785 -64266 8202 c --59462 25253 L --55429 25253 L --51813 12471 l --50907 9302 -50255 6321 -49849 3534 C --49531 5127 -49108 6962 -48591 9025 c --44634 25253 L --41270 25253 L --48197 0 L --51419 0 L --56740 19238 l --57187 20849 -57451 21837 -57534 22202 C --57798 21043 -58045 20056 -58274 19238 c --63631 0 L --67041 0 L -@c -F -%CHAR: -41506 0 (o) @t --40336 9149 m --40336 12535 -39395 15046 -37508 16675 c --35938 18027 -34021 18709 -31758 18709 c --29241 18709 -27183 17886 -25590 16234 c --23990 14587 -23197 12312 -23197 9407 c --23197 7050 -23549 5198 -24255 3851 c --24961 2499 -25990 1452 -27336 706 c --28688 -41 -30158 -412 -31758 -412 c --34315 -412 -36385 406 -37966 2052 c --39548 3692 -40336 6056 -40336 9149 c -@c --37149 9149 m --37149 6803 -36638 5051 -35615 3886 c --34592 2716 -33304 2134 -31758 2134 c --30217 2134 -28935 2722 -27912 3892 c --26895 5062 -26383 6850 -26383 9249 c --26383 11512 -26895 13229 -27924 14393 c --28953 15558 -30229 16140 -31758 16140 c --33304 16140 -34592 15558 -35615 14399 c --36638 13241 -37149 11489 -37149 9149 c -@c -F -%CHAR: -21891 0 (r) @t --19598 0 m --19598 18292 L --16811 18292 L --16811 15522 L --16100 16816 -15441 17674 -14835 18086 c --14236 18497 -13571 18709 -12848 18709 c --11801 18709 -10743 18374 -9661 17710 C --10731 14829 L --11484 15281 -12242 15505 -13001 15505 c --13683 15505 -14289 15299 -14830 14893 c --15370 14482 -15753 13917 -15982 13194 c --16329 12094 -16499 10889 -16499 9578 c --16499 0 L --19598 0 L -@c -F -%CHAR: -10143 0 (k) @t --7803 0 m --7803 25253 L --4698 25253 L --4698 10854 L -2639 18292 L -6649 18292 L --342 11507 L -7361 0 L -3533 0 L --2511 9355 L --4698 7250 L --4698 0 L --7803 0 L -@c -F -%CHAR: 7496 0 (l) @t -9754 0 m -9754 25253 L -12852 25253 L -12852 0 L -9754 0 L -@c -F -%CHAR: 15328 0 (o) @t -16498 9149 m -16498 12535 17439 15046 19326 16675 c -20896 18027 22813 18709 25076 18709 c -27593 18709 29651 17886 31244 16234 c -32844 14587 33637 12312 33637 9407 c -33637 7050 33285 5198 32579 3851 c -31873 2499 30844 1452 29498 706 c -28146 -41 26676 -412 25076 -412 c -22519 -412 20449 406 18868 2052 c -17286 3692 16498 6056 16498 9149 c -@c -19685 9149 m -19685 6803 20196 5051 21219 3886 c -22242 2716 23530 2134 25076 2134 c -26617 2134 27899 2722 28922 3892 c -29939 5062 30451 6850 30451 9249 c -30451 11512 29939 13229 28910 14393 c -27881 15558 26605 16140 25076 16140 c -23530 16140 22242 15558 21219 14399 c -20196 13241 19685 11489 19685 9149 c -@c -F -%CHAR: 34943 0 (a) @t -49207 2258 m -48055 1282 46949 594 45891 188 c -44827 -212 43686 -412 42469 -412 c -40458 -412 38918 76 37836 1058 c -36760 2040 36219 3298 36219 4821 c -36219 5721 36419 6538 36830 7279 c -37236 8020 37771 8614 38430 9061 c -39094 9507 39835 9848 40664 10078 c -41270 10236 42187 10395 43416 10542 c -45920 10842 47767 11195 48948 11612 C -48960 12036 48966 12306 48966 12418 c -48966 13682 48672 14576 48084 15087 c -47296 15793 46114 16140 44556 16140 c -43098 16140 42022 15887 41322 15375 c -40629 14864 40117 13958 39782 12659 C -36754 13076 L -37030 14370 37483 15422 38112 16216 c -38741 17016 39658 17633 40852 18062 c -42046 18492 43427 18709 45003 18709 c -46567 18709 47831 18521 48807 18156 c -49783 17786 50501 17327 50965 16769 c -51424 16210 51741 15511 51929 14658 c -52029 14129 52082 13176 52082 11800 c -52082 7667 l -52082 4780 52147 2957 52282 2199 c -52411 1435 52676 700 53064 0 C -49824 0 L -49507 641 49295 1393 49207 2258 C -@c -48948 9184 m -47819 8720 46132 8331 43886 8008 c -42610 7826 41705 7620 41181 7391 c -40652 7161 40241 6826 39958 6379 c -39670 5938 39523 5450 39523 4910 c -39523 4080 39841 3393 40464 2840 c -41087 2293 42004 2017 43210 2017 c -44403 2017 45468 2275 46397 2799 c -47326 3322 48013 4039 48449 4945 c -48784 5644 48948 6679 48948 8043 c -48948 9184 L -@c -F -%CHAR: 54558 0 (d) @t -68752 0 m -68752 2311 L -67593 494 65888 -412 63636 -412 c -62178 -412 60837 -12 59615 794 c -58392 1593 57445 2716 56769 4163 c -56098 5603 55763 7256 55763 9131 c -55763 10954 56069 12612 56675 14099 c -57286 15587 58198 16728 59415 17516 c -60632 18309 61996 18709 63501 18709 c -64600 18709 65582 18474 66441 18009 c -67305 17545 68005 16939 68546 16193 C -68546 25253 L -71627 25253 L -71627 0 L -68752 0 L -@c -58950 9131 m -58950 6785 59444 5033 60432 3875 c -61420 2716 62584 2134 63930 2134 c -65283 2134 66435 2693 67382 3798 c -68328 4904 68804 6597 68804 8872 c -68804 11377 68322 13212 67358 14382 c -66394 15558 65206 16140 63789 16140 c -62413 16140 61261 15575 60338 14452 c -59415 13329 58950 11554 58950 9131 c -@c -F -%CHAR: -69605 -35278 (M) @t --66989 -35278 m --66989 -10025 L --61956 -10025 L --55982 -27905 l --55429 -29569 -55023 -30815 -54776 -31644 C --54488 -30727 -54042 -29375 -53430 -27593 c --47386 -10025 L --42888 -10025 L --42888 -35278 L --46110 -35278 L --46110 -14141 L --53448 -35278 L --56464 -35278 L --63766 -13782 L --63766 -35278 L --66989 -35278 L -@c -F -%CHAR: -40218 -35278 (a) @t --25954 -33020 m --27106 -33996 -28212 -34684 -29270 -35090 c --30334 -35490 -31475 -35690 -32692 -35690 c --34703 -35690 -36243 -35202 -37325 -34220 c --38401 -33238 -38942 -31980 -38942 -30457 c --38942 -29557 -38742 -28740 -38331 -27999 c --37925 -27258 -37390 -26664 -36731 -26217 c --36067 -25771 -35326 -25430 -34497 -25200 c --33891 -25042 -32974 -24883 -31745 -24736 c --29241 -24436 -27394 -24083 -26213 -23666 C --26201 -23242 -26195 -22972 -26195 -22860 c --26195 -21596 -26489 -20702 -27077 -20191 c --27865 -19485 -29047 -19138 -30605 -19138 c --32063 -19138 -33139 -19391 -33839 -19903 c --34532 -20414 -35044 -21320 -35379 -22619 C --38407 -22202 L --38131 -20908 -37678 -19856 -37049 -19062 c --36420 -18262 -35503 -17645 -34309 -17216 c --33115 -16786 -31734 -16569 -30158 -16569 c --28594 -16569 -27330 -16757 -26354 -17122 c --25378 -17492 -24660 -17951 -24196 -18509 c --23737 -19068 -23420 -19767 -23232 -20620 c --23132 -21149 -23079 -22102 -23079 -23478 c --23079 -27611 l --23079 -30498 -23014 -32321 -22879 -33079 c --22750 -33843 -22485 -34578 -22097 -35278 C --25337 -35278 L --25654 -34637 -25866 -33885 -25954 -33020 C -@c --26213 -26094 m --27342 -26558 -29029 -26947 -31275 -27270 c --32551 -27452 -33456 -27658 -33980 -27887 c --34509 -28117 -34920 -28452 -35203 -28899 c --35491 -29340 -35638 -29828 -35638 -30368 c --35638 -31198 -35320 -31885 -34697 -32438 c --34074 -32985 -33157 -33261 -31951 -33261 c --30758 -33261 -29693 -33003 -28764 -32479 c --27835 -31956 -27148 -31239 -26712 -30333 c --26377 -29634 -26213 -28599 -26213 -27235 c --26213 -26094 L -@c -F -%CHAR: -20603 -35278 (n) @t --18275 -35278 m --18275 -16986 L --15488 -16986 L --15488 -19585 L --14141 -17574 -12201 -16569 -9667 -16569 c --8561 -16569 -7550 -16769 -6627 -17163 c --5698 -17563 -5010 -18080 -4552 -18727 c --4087 -19368 -3770 -20132 -3581 -21014 c --3470 -21590 -3411 -22596 -3411 -24030 c --3411 -35278 L --6515 -35278 L --6515 -24148 l --6515 -22890 -6633 -21943 -6874 -21314 c --7115 -20691 -7544 -20191 -8156 -19820 c --8773 -19444 -9490 -19256 -10319 -19256 c --11642 -19256 -12777 -19679 -13741 -20514 c --14700 -21355 -15176 -22942 -15176 -25288 c --15176 -35278 L --18275 -35278 L -@c -F -%CHAR: -988 -35278 (a) @t -13276 -33020 m -12124 -33996 11018 -34684 9960 -35090 c -8896 -35490 7755 -35690 6538 -35690 c -4527 -35690 2987 -35202 1905 -34220 c -829 -33238 288 -31980 288 -30457 c -288 -29557 488 -28740 899 -27999 c -1305 -27258 1840 -26664 2499 -26217 c -3163 -25771 3904 -25430 4733 -25200 c -5339 -25042 6256 -24883 7485 -24736 c -9989 -24436 11836 -24083 13017 -23666 C -13029 -23242 13035 -22972 13035 -22860 c -13035 -21596 12741 -20702 12153 -20191 c -11365 -19485 10183 -19138 8625 -19138 c -7167 -19138 6091 -19391 5391 -19903 c -4698 -20414 4186 -21320 3851 -22619 C -823 -22202 L -1099 -20908 1552 -19856 2181 -19062 c -2810 -18262 3727 -17645 4921 -17216 c -6115 -16786 7496 -16569 9072 -16569 c -10636 -16569 11900 -16757 12876 -17122 c -13852 -17492 14570 -17951 15034 -18509 c -15493 -19068 15810 -19767 15998 -20620 c -16098 -21149 16151 -22102 16151 -23478 c -16151 -27611 l -16151 -30498 16216 -32321 16351 -33079 c -16480 -33843 16745 -34578 17133 -35278 C -13893 -35278 L -13576 -34637 13364 -33885 13276 -33020 C -@c -13017 -26094 m -11888 -26558 10201 -26947 7955 -27270 c -6679 -27452 5774 -27658 5250 -27887 c -4721 -28117 4310 -28452 4027 -28899 c -3739 -29340 3592 -29828 3592 -30368 c -3592 -31198 3910 -31885 4533 -32438 c -5156 -32985 6073 -33261 7279 -33261 c -8472 -33261 9537 -33003 10466 -32479 c -11395 -31956 12082 -31239 12518 -30333 c -12853 -29634 13017 -28599 13017 -27235 c -13017 -26094 L -@c -F -%CHAR: 18627 -35278 (g) @t -20385 -36795 m -23401 -37242 L -23525 -38171 23878 -38847 24448 -39276 c -25218 -39847 26271 -40135 27599 -40135 c -29040 -40135 30145 -39847 30927 -39276 c -31709 -38700 32233 -37894 32509 -36866 c -32674 -36231 32744 -34908 32732 -32885 C -31380 -34478 29693 -35278 27670 -35278 c -25153 -35278 23207 -34373 21831 -32556 c -20456 -30745 19762 -28563 19762 -26029 c -19762 -24283 20079 -22672 20708 -21196 c -21343 -19720 22261 -18580 23460 -17774 c -24660 -16975 26071 -16569 27688 -16569 c -29845 -16569 31627 -17445 33026 -19191 C -33026 -16986 L -35890 -16986 L -35890 -32797 l -35890 -35643 35596 -37665 35020 -38853 c -34437 -40041 33520 -40981 32262 -41669 c -31004 -42357 29457 -42704 27617 -42704 c -25436 -42704 23672 -42210 22331 -41228 c -20985 -40246 20338 -38771 20385 -36795 C -@c -22949 -25806 m -22949 -28205 23425 -29957 24383 -31056 c -25336 -32162 26529 -32709 27964 -32709 c -29387 -32709 30580 -32162 31545 -31068 c -32509 -29969 32991 -28252 32991 -25906 c -32991 -23666 32497 -21978 31503 -20843 c -30510 -19709 29310 -19138 27911 -19138 c -26535 -19138 25365 -19697 24395 -20820 c -23431 -21937 22949 -23601 22949 -25806 c -@c -F -%CHAR: 38242 -35278 (e) @t -53088 -29387 m -56293 -29781 L -55787 -31656 54852 -33108 53488 -34143 c -52118 -35172 50372 -35690 48249 -35690 c -45574 -35690 43451 -34866 41887 -33220 c -40318 -31574 39536 -29263 39536 -26288 c -39536 -23207 40329 -20820 41911 -19121 c -43498 -17421 45550 -16569 48079 -16569 c -50525 -16569 52524 -17404 54070 -19068 c -55622 -20732 56398 -23078 56398 -26094 c -56398 -26282 56393 -26558 56381 -26923 C -42740 -26923 L -42852 -28934 43422 -30474 44445 -31539 c -45468 -32609 46738 -33144 48267 -33144 c -49402 -33144 50372 -32844 51177 -32244 c -51983 -31650 52618 -30698 53088 -29387 C -@c -42910 -24371 m -53123 -24371 L -52988 -22837 52594 -21678 51953 -20914 c -50966 -19720 49684 -19121 48114 -19121 c -46691 -19121 45492 -19597 44521 -20549 c -43551 -21502 43016 -22778 42910 -24371 C -@c -F -%CHAR: 57857 -35278 (r) @t -60150 -35278 m -60150 -16986 L -62937 -16986 L -62937 -19756 L -63648 -18462 64307 -17604 64913 -17192 c -65512 -16781 66177 -16569 66900 -16569 c -67947 -16569 69005 -16904 70087 -17568 C -69017 -20449 L -68264 -19997 67506 -19773 66747 -19773 c -66065 -19773 65459 -19979 64918 -20385 c -64378 -20796 63995 -21361 63766 -22084 c -63419 -23184 63249 -24389 63249 -25700 c -63249 -35278 L -60150 -35278 L -@c -F -T -@rax 269.90419 813.32674 291.15128 820.60668 @E -[0.00028346 0.00000000 0.00000000 0.00028346 280.45954880 813.44831670] @tm - 0 O 0 @g -0.00 0.00 0.00 1.00 k -e - -% FontChange:/_ArialCE 35278.00000 z -%CHAR: -37237 0 (U) @t --17946 25253 m --14600 25253 L --14600 10660 l --14600 8126 -14888 6109 -15465 4616 c --16041 3122 -17076 1911 -18575 976 c --20074 35 -22038 -429 -24472 -429 c --26836 -429 -28776 -24 -30275 794 c --31781 1605 -32857 2787 -33498 4333 c --34144 5880 -34462 7985 -34462 10660 c --34462 25253 L --31122 25253 L --31122 10677 l --31122 8484 -30916 6867 -30511 5833 c --30105 4792 -29399 3992 -28412 3428 c --27418 2863 -26201 2581 -24766 2581 c --22309 2581 -20556 3140 -19510 4257 c --18469 5368 -17946 7508 -17946 10677 c --17946 25253 L -@c -F -%CHAR: -11766 0 (s) @t --10678 5462 m --7615 5944 L --7444 4715 -6962 3775 -6174 3116 c --5392 2464 -4293 2134 -2876 2134 c --1453 2134 -395 2428 293 3005 c -981 3587 1328 4269 1328 5045 c -1328 5750 1022 6297 411 6703 c --13 6979 -1071 7326 -2758 7749 c --5028 8326 -6610 8820 -7486 9243 c --8362 9660 -9032 10242 -9485 10983 c --9937 11724 -10167 12541 -10167 13435 c --10167 14252 -9979 15005 -9602 15699 c --9232 16398 -8720 16975 -8079 17433 c --7597 17786 -6939 18092 -6110 18339 c --5275 18586 -4381 18709 -3429 18709 c --1994 18709 -736 18497 352 18086 c -1440 17674 2239 17116 2757 16410 c -3274 15699 3627 14758 3821 13576 C -793 13159 L -652 14099 252 14834 -406 15364 c --1065 15893 -2000 16157 -3205 16157 c --4628 16157 -5645 15922 -6251 15452 c --6862 14981 -7168 14429 -7168 13800 c --7168 13394 -7039 13035 -6786 12712 c --6533 12377 -6139 12106 -5598 11883 c --5287 11771 -4375 11507 -2858 11095 c --665 10507 864 10031 1728 9654 c -2598 9284 3280 8737 3774 8026 c -4268 7314 4515 6432 4515 5374 c -4515 4339 4209 3369 3609 2452 c -3004 1540 2134 835 999 335 c --136 -165 -1424 -412 -2858 -412 c --5240 -412 -7051 82 -8297 1070 c --9543 2058 -10337 3522 -10678 5462 C -@c -F -%CHAR: 5873 0 (e) @t -20719 5891 m -23924 5497 L -23418 3622 22483 2170 21119 1135 c -19749 106 18003 -412 15880 -412 c -13205 -412 11082 412 9518 2058 c -7949 3704 7167 6015 7167 8990 c -7167 12071 7960 14458 9542 16157 c -11129 17857 13181 18709 15710 18709 c -18156 18709 20155 17874 21701 16210 c -23253 14546 24029 12200 24029 9184 c -24029 8996 24024 8720 24012 8355 C -10371 8355 L -10483 6344 11053 4804 12076 3739 c -13099 2669 14369 2134 15898 2134 c -17033 2134 18003 2434 18808 3034 c -19614 3628 20249 4580 20719 5891 C -@c -10541 10907 m -20754 10907 L -20619 12441 20225 13600 19584 14364 c -18597 15558 17315 16157 15745 16157 c -14322 16157 13123 15681 12152 14729 c -11182 13776 10647 12500 10541 10907 C -@c -F -%CHAR: 25488 0 (r) @t -27781 0 m -27781 18292 L -30568 18292 L -30568 15522 L -31279 16816 31938 17674 32544 18086 c -33143 18497 33808 18709 34531 18709 c -35578 18709 36636 18374 37718 17710 C -36648 14829 L -35895 15281 35137 15505 34378 15505 c -33696 15505 33090 15299 32549 14893 c -32009 14482 31626 13917 31397 13194 c -31050 12094 30880 10889 30880 9578 c -30880 0 L -27781 0 L -@c -F -T -@rax 26.29984 798.37625 94.49206 809.63802 @E -[0.00028346 0.00000000 0.00000000 0.00028346 60.64412377 800.90217543] @tm - 0 O 0 @g -0.00 0.00 0.00 1.00 k -e - -% FontChange:/_ArialCE 42333.00000 z -%CHAR: -121159 0 (J) @t --119938 8601 m --116319 9095 L --116227 6780 -115790 5193 -115021 4339 c --114245 3485 -113179 3062 -111818 3062 c --110809 3062 -109941 3288 -109214 3754 c --108480 4212 -107979 4840 -107704 5630 c --107429 6428 -107288 7690 -107288 9426 c --107288 30303 L --103280 30303 L --103280 9652 l --103280 7119 -103584 5151 -104198 3761 c --104811 2371 -105785 1312 -107111 579 c --108445 -148 -110004 -515 -111796 -515 c --114456 -515 -116488 247 -117906 1778 c --119318 3309 -119995 5581 -119938 8601 C -@c -F -%CHAR: -99992 0 (o) @t --98588 10978 m --98588 15042 -97459 18055 -95194 20009 c --93310 21632 -91010 22451 -88294 22451 c --85274 22451 -82805 21463 -80893 19480 c --78974 17505 -78021 14774 -78021 11289 c --78021 8460 -78445 6237 -79291 4621 c --80138 2999 -81373 1743 -82988 847 c --84611 -49 -86375 -494 -88294 -494 c --91363 -494 -93847 487 -95745 2462 c --97643 4431 -98588 7267 -98588 10978 c -@c --94764 10978 m --94764 8163 -94150 6061 -92922 4664 c --91695 3260 -90150 2561 -88294 2561 c --86445 2561 -84907 3267 -83680 4671 c --82459 6075 -81845 8220 -81845 11098 c --81845 13815 -82459 15875 -83694 17272 c --84929 18669 -86460 19367 -88294 19367 c --90150 19367 -91695 18669 -92922 17279 c --94150 15889 -94764 13786 -94764 10978 c -@c -F -%CHAR: -76455 0 (b) @t --70232 0 m --73682 0 L --73682 30303 L --69964 30303 L --69964 19494 L --68391 21463 -66387 22451 -63953 22451 c --62598 22451 -61321 22175 -60114 21632 c --58908 21089 -57920 20320 -57137 19339 c --56361 18351 -55747 17166 -55310 15769 c --54865 14379 -54646 12890 -54646 11310 c --54646 7542 -55578 4635 -57440 2582 c --59296 529 -61533 -494 -64136 -494 c --66725 -494 -68757 586 -70232 2752 C --70232 0 L -@c --70274 11141 m --70274 8509 -69915 6611 -69202 5440 c --68031 3521 -66443 2561 -64447 2561 c --62817 2561 -61413 3267 -60227 4685 c --59042 6096 -58449 8198 -58449 11000 c --58449 13864 -59021 15981 -60157 17342 c --61293 18704 -62669 19389 -64277 19389 c --65907 19389 -67311 18683 -68496 17272 c --69682 15861 -70274 13815 -70274 11141 c -@c -F -%CHAR: -41149 0 (l) @t --38440 0 m --38440 30303 L --34721 30303 L --34721 0 L --38440 0 L -@c -F -%CHAR: -31751 0 (i) @t --28943 26021 m --28943 30303 L --25218 30303 L --25218 26021 L --28943 26021 L -@c --28943 0 m --28943 21950 L --25218 21950 L --25218 0 L --28943 0 L -@c -F -%CHAR: -22353 0 (f) @t --18677 0 m --18677 19057 L --21958 19057 L --21958 21950 L --18677 21950 L --18677 24285 l --18677 25760 -18543 26860 -18282 27573 c --17922 28539 -17294 29323 -16391 29922 c --15488 30522 -14225 30818 -12595 30818 c --11551 30818 -10394 30698 -9124 30444 C --9681 27199 L --10450 27340 -11184 27411 -11876 27411 c --13004 27411 -13802 27171 -14267 26684 c --14740 26204 -14973 25301 -14973 23975 c --14973 21950 L --10697 21950 L --10697 19057 L --14973 19057 L --14973 0 L --18677 0 L -@c -F -%CHAR: -10584 0 (e) @t -7231 7070 m -11076 6597 L -10470 4346 9348 2603 7711 1362 c -6067 127 3971 -494 1424 -494 c --1786 -494 -4333 494 -6210 2469 c --8093 4445 -9032 7218 -9032 10788 c --9032 14485 -8079 17349 -6181 19389 c --4276 21428 -1814 22451 1220 22451 c -4155 22451 6554 21449 8409 19452 c -10272 17455 11203 14640 11203 11021 c -11203 10795 11196 10463 11182 10026 C --5187 10026 L --5052 7613 -4368 5764 -3140 4487 c --1913 3203 -389 2561 1446 2561 c -2807 2561 3971 2921 4938 3641 c -5905 4353 6667 5496 7231 7070 C -@c --4982 13088 m -7273 13088 L -7111 14929 6638 16319 5869 17237 c -4684 18669 3146 19389 1262 19389 c --445 19389 -1885 18817 -3049 17674 c --4213 16531 -4855 15000 -4982 13088 C -@c -F -%CHAR: 24722 0 (c) @t -41839 8043 m -45493 7563 L -45098 5045 44075 3069 42424 1644 c -40780 219 38755 -494 36357 -494 c -33358 -494 30938 487 29118 2448 c -27290 4410 26373 7225 26373 10894 c -26373 13264 26768 15339 27551 17117 c -28341 18895 29534 20228 31143 21117 c -32744 22006 34494 22451 36378 22451 c -38762 22451 40717 21844 42227 20637 c -43744 19431 44717 17723 45148 15501 C -41528 14944 L -41182 16418 40576 17526 39701 18274 c -38826 19015 37768 19389 36526 19389 c -34649 19389 33125 18718 31954 17371 c -30783 16030 30197 13906 30197 11000 c -30197 8050 30762 5905 31897 4565 c -33026 3231 34501 2561 36321 2561 c -37782 2561 38995 3013 39976 3909 c -40957 4805 41578 6181 41839 8043 C -@c -F -%CHAR: 45889 0 (y) @t -48514 -8452 m -48097 -4960 L -48916 -5179 49621 -5292 50228 -5292 c -51054 -5292 51717 -5151 52211 -4875 c -52712 -4600 53114 -4219 53431 -3718 c -53671 -3351 54045 -2427 54567 -952 c -54638 -741 54751 -444 54899 -42 C -46573 21950 L -50581 21950 L -55153 9243 l -55738 7627 56275 5934 56740 4156 C -57171 5863 57679 7528 58271 9158 c -62963 21950 L -66682 21950 L -58335 -374 l -57439 -2787 56740 -4445 56246 -5355 c -55583 -6583 54828 -7479 53975 -8050 c -53114 -8622 52098 -8911 50913 -8911 c -50193 -8911 49396 -8756 48514 -8452 C -@c -F -%CHAR: 67056 0 (c) @t -84173 8043 m -87827 7563 L -87432 5045 86409 3069 84758 1644 c -83114 219 81089 -494 78691 -494 c -75692 -494 73272 487 71452 2448 c -69624 4410 68707 7225 68707 10894 c -68707 13264 69102 15339 69885 17117 c -70675 18895 71868 20228 73477 21117 c -75078 22006 76828 22451 78712 22451 c -81096 22451 83051 21844 84561 20637 c -86078 19431 87051 17723 87482 15501 C -83862 14944 L -83516 16418 82910 17526 82035 18274 c -81160 19015 80102 19389 78860 19389 c -76983 19389 75459 18718 74288 17371 c -73117 16030 72531 13906 72531 11000 c -72531 8050 73096 5905 74231 4565 c -75360 3231 76835 2561 78655 2561 c -80116 2561 81329 3013 82310 3909 c -83291 4805 83912 6181 84173 8043 C -@c -F -%CHAR: 88223 0 (l) @t -90932 0 m -90932 30303 L -94651 30303 L -94651 0 L -90932 0 L -@c -F -%CHAR: 97621 0 (e) @t -115436 7070 m -119281 6597 L -118675 4346 117553 2603 115916 1362 c -114272 127 112176 -494 109629 -494 c -106419 -494 103872 494 101995 2469 c -100112 4445 99173 7218 99173 10788 c -99173 14485 100126 17349 102024 19389 c -103929 21428 106391 22451 109425 22451 c -112360 22451 114759 21449 116614 19452 c -118477 17455 119408 14640 119408 11021 c -119408 10795 119401 10463 119387 10026 C -103018 10026 L -103153 7613 103837 5764 105065 4487 c -106292 3203 107816 2561 109651 2561 c -111012 2561 112176 2921 113143 3641 c -114110 4353 114872 5496 115436 7070 C -@c -103223 13088 m -115478 13088 L -115316 14929 114843 16319 114074 17237 c -112889 18669 111351 19389 109467 19389 c -107760 19389 106320 18817 105156 17674 c -103992 16531 103350 15000 103223 13088 C -@c -F -T -@rax 26.29984 798.37625 94.49206 809.63802 @E -[0.00028346 0.00000000 0.00000000 0.00028346 60.64412377 800.90217543] @tm -0 J 0 j [] 0 d 0 R 0 @G -0.00 0.00 0.00 0.20 K -0 0.21543 0.21543 0.00000 @w -r - -% FontChange:/_ArialCE 42333.00000 z -%CHAR: -121159 0 (J) @t --119938 8601 m --116319 9095 L --116227 6780 -115790 5193 -115021 4339 c --114245 3485 -113179 3062 -111818 3062 c --110809 3062 -109941 3288 -109214 3754 c --108480 4212 -107979 4840 -107704 5630 c --107429 6428 -107288 7690 -107288 9426 c --107288 30303 L --103280 30303 L --103280 9652 l --103280 7119 -103584 5151 -104198 3761 c --104811 2371 -105785 1312 -107111 579 c --108445 -148 -110004 -515 -111796 -515 c --114456 -515 -116488 247 -117906 1778 c --119318 3309 -119995 5581 -119938 8601 C -@c -S -%CHAR: -99992 0 (o) @t --98588 10978 m --98588 15042 -97459 18055 -95194 20009 c --93310 21632 -91010 22451 -88294 22451 c --85274 22451 -82805 21463 -80893 19480 c --78974 17505 -78021 14774 -78021 11289 c --78021 8460 -78445 6237 -79291 4621 c --80138 2999 -81373 1743 -82988 847 c --84611 -49 -86375 -494 -88294 -494 c --91363 -494 -93847 487 -95745 2462 c --97643 4431 -98588 7267 -98588 10978 c -@c --94764 10978 m --94764 8163 -94150 6061 -92922 4664 c --91695 3260 -90150 2561 -88294 2561 c --86445 2561 -84907 3267 -83680 4671 c --82459 6075 -81845 8220 -81845 11098 c --81845 13815 -82459 15875 -83694 17272 c --84929 18669 -86460 19367 -88294 19367 c --90150 19367 -91695 18669 -92922 17279 c --94150 15889 -94764 13786 -94764 10978 c -@c -S -%CHAR: -76455 0 (b) @t --70232 0 m --73682 0 L --73682 30303 L --69964 30303 L --69964 19494 L --68391 21463 -66387 22451 -63953 22451 c --62598 22451 -61321 22175 -60114 21632 c --58908 21089 -57920 20320 -57137 19339 c --56361 18351 -55747 17166 -55310 15769 c --54865 14379 -54646 12890 -54646 11310 c --54646 7542 -55578 4635 -57440 2582 c --59296 529 -61533 -494 -64136 -494 c --66725 -494 -68757 586 -70232 2752 C --70232 0 L -@c --70274 11141 m --70274 8509 -69915 6611 -69202 5440 c --68031 3521 -66443 2561 -64447 2561 c --62817 2561 -61413 3267 -60227 4685 c --59042 6096 -58449 8198 -58449 11000 c --58449 13864 -59021 15981 -60157 17342 c --61293 18704 -62669 19389 -64277 19389 c --65907 19389 -67311 18683 -68496 17272 c --69682 15861 -70274 13815 -70274 11141 c -@c -S -%CHAR: -41149 0 (l) @t --38440 0 m --38440 30303 L --34721 30303 L --34721 0 L --38440 0 L -@c -S -%CHAR: -31751 0 (i) @t --28943 26021 m --28943 30303 L --25218 30303 L --25218 26021 L --28943 26021 L -@c --28943 0 m --28943 21950 L --25218 21950 L --25218 0 L --28943 0 L -@c -S -%CHAR: -22353 0 (f) @t --18677 0 m --18677 19057 L --21958 19057 L --21958 21950 L --18677 21950 L --18677 24285 l --18677 25760 -18543 26860 -18282 27573 c --17922 28539 -17294 29323 -16391 29922 c --15488 30522 -14225 30818 -12595 30818 c --11551 30818 -10394 30698 -9124 30444 C --9681 27199 L --10450 27340 -11184 27411 -11876 27411 c --13004 27411 -13802 27171 -14267 26684 c --14740 26204 -14973 25301 -14973 23975 c --14973 21950 L --10697 21950 L --10697 19057 L --14973 19057 L --14973 0 L --18677 0 L -@c -S -%CHAR: -10584 0 (e) @t -7231 7070 m -11076 6597 L -10470 4346 9348 2603 7711 1362 c -6067 127 3971 -494 1424 -494 c --1786 -494 -4333 494 -6210 2469 c --8093 4445 -9032 7218 -9032 10788 c --9032 14485 -8079 17349 -6181 19389 c --4276 21428 -1814 22451 1220 22451 c -4155 22451 6554 21449 8409 19452 c -10272 17455 11203 14640 11203 11021 c -11203 10795 11196 10463 11182 10026 C --5187 10026 L --5052 7613 -4368 5764 -3140 4487 c --1913 3203 -389 2561 1446 2561 c -2807 2561 3971 2921 4938 3641 c -5905 4353 6667 5496 7231 7070 C -@c --4982 13088 m -7273 13088 L -7111 14929 6638 16319 5869 17237 c -4684 18669 3146 19389 1262 19389 c --445 19389 -1885 18817 -3049 17674 c --4213 16531 -4855 15000 -4982 13088 C -@c -S -%CHAR: 24722 0 (c) @t -41839 8043 m -45493 7563 L -45098 5045 44075 3069 42424 1644 c -40780 219 38755 -494 36357 -494 c -33358 -494 30938 487 29118 2448 c -27290 4410 26373 7225 26373 10894 c -26373 13264 26768 15339 27551 17117 c -28341 18895 29534 20228 31143 21117 c -32744 22006 34494 22451 36378 22451 c -38762 22451 40717 21844 42227 20637 c -43744 19431 44717 17723 45148 15501 C -41528 14944 L -41182 16418 40576 17526 39701 18274 c -38826 19015 37768 19389 36526 19389 c -34649 19389 33125 18718 31954 17371 c -30783 16030 30197 13906 30197 11000 c -30197 8050 30762 5905 31897 4565 c -33026 3231 34501 2561 36321 2561 c -37782 2561 38995 3013 39976 3909 c -40957 4805 41578 6181 41839 8043 C -@c -S -%CHAR: 45889 0 (y) @t -48514 -8452 m -48097 -4960 L -48916 -5179 49621 -5292 50228 -5292 c -51054 -5292 51717 -5151 52211 -4875 c -52712 -4600 53114 -4219 53431 -3718 c -53671 -3351 54045 -2427 54567 -952 c -54638 -741 54751 -444 54899 -42 C -46573 21950 L -50581 21950 L -55153 9243 l -55738 7627 56275 5934 56740 4156 C -57171 5863 57679 7528 58271 9158 c -62963 21950 L -66682 21950 L -58335 -374 l -57439 -2787 56740 -4445 56246 -5355 c -55583 -6583 54828 -7479 53975 -8050 c -53114 -8622 52098 -8911 50913 -8911 c -50193 -8911 49396 -8756 48514 -8452 C -@c -S -%CHAR: 67056 0 (c) @t -84173 8043 m -87827 7563 L -87432 5045 86409 3069 84758 1644 c -83114 219 81089 -494 78691 -494 c -75692 -494 73272 487 71452 2448 c -69624 4410 68707 7225 68707 10894 c -68707 13264 69102 15339 69885 17117 c -70675 18895 71868 20228 73477 21117 c -75078 22006 76828 22451 78712 22451 c -81096 22451 83051 21844 84561 20637 c -86078 19431 87051 17723 87482 15501 C -83862 14944 L -83516 16418 82910 17526 82035 18274 c -81160 19015 80102 19389 78860 19389 c -76983 19389 75459 18718 74288 17371 c -73117 16030 72531 13906 72531 11000 c -72531 8050 73096 5905 74231 4565 c -75360 3231 76835 2561 78655 2561 c -80116 2561 81329 3013 82310 3909 c -83291 4805 83912 6181 84173 8043 C -@c -S -%CHAR: 88223 0 (l) @t -90932 0 m -90932 30303 L -94651 30303 L -94651 0 L -90932 0 L -@c -S -%CHAR: 97621 0 (e) @t -115436 7070 m -119281 6597 L -118675 4346 117553 2603 115916 1362 c -114272 127 112176 -494 109629 -494 c -106419 -494 103872 494 101995 2469 c -100112 4445 99173 7218 99173 10788 c -99173 14485 100126 17349 102024 19389 c -103929 21428 106391 22451 109425 22451 c -112360 22451 114759 21449 116614 19452 c -118477 17455 119408 14640 119408 11021 c -119408 10795 119401 10463 119387 10026 C -103018 10026 L -103153 7613 103837 5764 105065 4487 c -106292 3203 107816 2561 109651 2561 c -111012 2561 112176 2921 113143 3641 c -114110 4353 114872 5496 115436 7070 C -@c -103223 13088 m -115478 13088 L -115316 14929 114843 16319 114074 17237 c -112889 18669 111351 19389 109467 19389 c -107760 19389 106320 18817 105156 17674 c -103992 16531 103350 15000 103223 13088 C -@c -S -T -@rax 2.97723 609.45080 30.91776 616.11222 @E -[0.00028346 0.00000000 0.00000000 0.00028346 16.98151119 609.56019817] @tm - 0 O 0 @g -0.00 0.00 0.00 1.00 k -e - -% FontChange:/_ArialCE 31750.00000 z -%CHAR: -49404 0 (S) @t --47975 7303 m --45139 7551 L --45007 6414 -44694 5482 -44202 4752 c --43710 4022 -42948 3434 -41916 2985 c --40884 2535 -39720 2312 -38429 2312 c --37281 2312 -36270 2482 -35392 2820 c --34513 3164 -33857 3630 -33428 4223 c --33000 4821 -32783 5466 -32783 6170 c --32783 6884 -32989 7504 -33407 8038 c --33820 8573 -34503 9017 -35450 9377 c --36064 9615 -37408 9985 -39498 10488 c --41583 10991 -43049 11462 -43885 11906 c --44970 12472 -45779 13182 -46314 14023 c --46843 14864 -47107 15806 -47107 16854 c --47107 17997 -46785 19071 -46134 20066 c --45483 21066 -44530 21823 -43282 22341 c --42027 22855 -40641 23114 -39112 23114 c --37424 23114 -35942 22844 -34651 22299 c --33365 21759 -32375 20960 -31682 19907 c --30994 18854 -30619 17658 -30566 16325 C --33450 16108 L --33608 17542 -34132 18632 -35027 19362 c --35921 20098 -37238 20463 -38985 20463 c --40805 20463 -42128 20130 -42964 19463 c --43795 18796 -44213 17992 -44213 17055 c --44213 16235 -43917 15563 -43329 15039 c --42747 14510 -41239 13970 -38794 13420 c --36349 12864 -34672 12383 -33762 11970 c --32439 11356 -31460 10583 -30830 9652 c --30201 8715 -29888 7636 -29888 6419 c --29888 5207 -30232 4069 -30925 3000 c --31619 1931 -32614 1101 -33910 503 c --35206 -90 -36667 -386 -38286 -386 c --40345 -386 -42070 -90 -43456 513 c --44848 1111 -45938 2011 -46732 3217 c --47520 4419 -47938 5784 -47975 7303 C -@c -F -%CHAR: -28227 0 (u) @t --15342 0 m --15342 2418 L --16628 556 -18369 -370 -20570 -370 c --21538 -370 -22448 -185 -23290 185 c --24131 556 -24756 1027 -25163 1588 c --25576 2154 -25862 2842 -26026 3657 c --26137 4207 -26195 5075 -26195 6265 c --26195 16462 L --23406 16462 L --23406 7334 l --23406 5874 -23348 4895 -23237 4387 c --23057 3651 -22687 3080 -22120 2656 c --21549 2238 -20845 2032 -20009 2032 c --19173 2032 -18390 2244 -17654 2672 c --16919 3101 -16400 3688 -16098 4424 c --15792 5165 -15638 6239 -15638 7641 c --15638 16462 L --12849 16462 L --12849 0 L --15342 0 L -@c -F -%CHAR: -10574 0 (b) @t --5907 0 m --8494 0 L --8494 22728 L --5706 22728 L --5706 14621 L --4526 16097 -3023 16838 -1197 16838 c --181 16838 777 16632 1682 16224 c -2586 15817 3327 15240 3915 14504 c -4497 13764 4957 12875 5285 11827 c -5619 10784 5783 9668 5783 8483 c -5783 5657 5084 3477 3687 1937 c -2295 397 618 -370 -1335 -370 c --3277 -370 -4801 439 -5907 2064 C --5907 0 L -@c --5938 8356 m --5938 6382 -5669 4958 -5134 4080 c --4256 2641 -3065 1921 -1568 1921 c --345 1921 708 2450 1597 3514 c -2486 4572 2930 6149 2930 8250 c -2930 10398 2502 11986 1650 13007 c -798 14028 -234 14542 -1441 14542 c --2663 14542 -3716 14012 -4605 12954 c --5494 11896 -5938 10361 -5938 8356 c -@c -F -%CHAR: 7079 0 (m) @t -9175 0 m -9175 16462 L -11667 16462 L -11667 14155 L -12185 14960 12873 15610 13731 16097 c -14588 16589 15567 16838 16662 16838 c -17879 16838 18879 16584 19657 16076 c -20440 15568 20991 14864 21308 13954 C -22615 15875 24309 16838 26394 16838 c -28029 16838 29283 16383 30161 15478 c -31040 14573 31479 13182 31479 11303 c -31479 0 L -28706 0 L -28706 10372 l -28706 11488 28616 12293 28436 12785 c -28251 13272 27923 13668 27452 13970 c -26976 14266 26415 14420 25774 14420 c -24616 14420 23658 14034 22891 13261 c -22129 12494 21742 11261 21742 9567 c -21742 0 L -18954 0 L -18954 10694 l -18954 11938 18726 12869 18271 13488 c -17816 14108 17075 14420 16038 14420 c -15255 14420 14530 14213 13863 13795 c -13196 13383 12709 12779 12413 11986 c -12111 11187 11963 10038 11963 8541 c -11963 0 L -9175 0 L -@c -F -%CHAR: 33527 0 (i) @t -35633 19516 m -35633 22728 L -38427 22728 L -38427 19516 L -35633 19516 L -@c -35633 0 m -35633 16462 L -38427 16462 L -38427 0 L -35633 0 L -@c -F -%CHAR: 40576 0 (t) @t -48762 2498 m -49164 32 L -48381 -132 47677 -217 47058 -217 c -46042 -217 45259 -58 44698 265 c -44143 582 43751 1005 43523 1529 c -43296 2048 43180 3149 43180 4821 c -43180 14293 L -41132 14293 L -41132 16462 L -43180 16462 L -43180 20542 L -45958 22214 L -45958 16462 L -48762 16462 L -48762 14293 L -45958 14293 L -45958 4667 l -45958 3868 46005 3360 46101 3133 c -46201 2905 46360 2725 46582 2588 c -46804 2455 47122 2387 47535 2387 c -47847 2387 48254 2424 48762 2498 C -@c -F -T -@rax 2.97723 609.45080 30.91776 616.11222 @E -[0.00028346 0.00000000 0.00000000 0.00028346 16.98151119 609.56019817] @tm -0 J 0 j [] 0 d 0 R 0 @G -0.00 0.00 0.00 0.20 K -0 0.21543 0.21543 0.00000 @w -r - -% FontChange:/_ArialCE 31750.00000 z -%CHAR: -49404 0 (S) @t --47975 7303 m --45139 7551 L --45007 6414 -44694 5482 -44202 4752 c --43710 4022 -42948 3434 -41916 2985 c --40884 2535 -39720 2312 -38429 2312 c --37281 2312 -36270 2482 -35392 2820 c --34513 3164 -33857 3630 -33428 4223 c --33000 4821 -32783 5466 -32783 6170 c --32783 6884 -32989 7504 -33407 8038 c --33820 8573 -34503 9017 -35450 9377 c --36064 9615 -37408 9985 -39498 10488 c --41583 10991 -43049 11462 -43885 11906 c --44970 12472 -45779 13182 -46314 14023 c --46843 14864 -47107 15806 -47107 16854 c --47107 17997 -46785 19071 -46134 20066 c --45483 21066 -44530 21823 -43282 22341 c --42027 22855 -40641 23114 -39112 23114 c --37424 23114 -35942 22844 -34651 22299 c --33365 21759 -32375 20960 -31682 19907 c --30994 18854 -30619 17658 -30566 16325 C --33450 16108 L --33608 17542 -34132 18632 -35027 19362 c --35921 20098 -37238 20463 -38985 20463 c --40805 20463 -42128 20130 -42964 19463 c --43795 18796 -44213 17992 -44213 17055 c --44213 16235 -43917 15563 -43329 15039 c --42747 14510 -41239 13970 -38794 13420 c --36349 12864 -34672 12383 -33762 11970 c --32439 11356 -31460 10583 -30830 9652 c --30201 8715 -29888 7636 -29888 6419 c --29888 5207 -30232 4069 -30925 3000 c --31619 1931 -32614 1101 -33910 503 c --35206 -90 -36667 -386 -38286 -386 c --40345 -386 -42070 -90 -43456 513 c --44848 1111 -45938 2011 -46732 3217 c --47520 4419 -47938 5784 -47975 7303 C -@c -S -%CHAR: -28227 0 (u) @t --15342 0 m --15342 2418 L --16628 556 -18369 -370 -20570 -370 c --21538 -370 -22448 -185 -23290 185 c --24131 556 -24756 1027 -25163 1588 c --25576 2154 -25862 2842 -26026 3657 c --26137 4207 -26195 5075 -26195 6265 c --26195 16462 L --23406 16462 L --23406 7334 l --23406 5874 -23348 4895 -23237 4387 c --23057 3651 -22687 3080 -22120 2656 c --21549 2238 -20845 2032 -20009 2032 c --19173 2032 -18390 2244 -17654 2672 c --16919 3101 -16400 3688 -16098 4424 c --15792 5165 -15638 6239 -15638 7641 c --15638 16462 L --12849 16462 L --12849 0 L --15342 0 L -@c -S -%CHAR: -10574 0 (b) @t --5907 0 m --8494 0 L --8494 22728 L --5706 22728 L --5706 14621 L --4526 16097 -3023 16838 -1197 16838 c --181 16838 777 16632 1682 16224 c -2586 15817 3327 15240 3915 14504 c -4497 13764 4957 12875 5285 11827 c -5619 10784 5783 9668 5783 8483 c -5783 5657 5084 3477 3687 1937 c -2295 397 618 -370 -1335 -370 c --3277 -370 -4801 439 -5907 2064 C --5907 0 L -@c --5938 8356 m --5938 6382 -5669 4958 -5134 4080 c --4256 2641 -3065 1921 -1568 1921 c --345 1921 708 2450 1597 3514 c -2486 4572 2930 6149 2930 8250 c -2930 10398 2502 11986 1650 13007 c -798 14028 -234 14542 -1441 14542 c --2663 14542 -3716 14012 -4605 12954 c --5494 11896 -5938 10361 -5938 8356 c -@c -S -%CHAR: 7079 0 (m) @t -9175 0 m -9175 16462 L -11667 16462 L -11667 14155 L -12185 14960 12873 15610 13731 16097 c -14588 16589 15567 16838 16662 16838 c -17879 16838 18879 16584 19657 16076 c -20440 15568 20991 14864 21308 13954 C -22615 15875 24309 16838 26394 16838 c -28029 16838 29283 16383 30161 15478 c -31040 14573 31479 13182 31479 11303 c -31479 0 L -28706 0 L -28706 10372 l -28706 11488 28616 12293 28436 12785 c -28251 13272 27923 13668 27452 13970 c -26976 14266 26415 14420 25774 14420 c -24616 14420 23658 14034 22891 13261 c -22129 12494 21742 11261 21742 9567 c -21742 0 L -18954 0 L -18954 10694 l -18954 11938 18726 12869 18271 13488 c -17816 14108 17075 14420 16038 14420 c -15255 14420 14530 14213 13863 13795 c -13196 13383 12709 12779 12413 11986 c -12111 11187 11963 10038 11963 8541 c -11963 0 L -9175 0 L -@c -S -%CHAR: 33527 0 (i) @t -35633 19516 m -35633 22728 L -38427 22728 L -38427 19516 L -35633 19516 L -@c -35633 0 m -35633 16462 L -38427 16462 L -38427 0 L -35633 0 L -@c -S -%CHAR: 40576 0 (t) @t -48762 2498 m -49164 32 L -48381 -132 47677 -217 47058 -217 c -46042 -217 45259 -58 44698 265 c -44143 582 43751 1005 43523 1529 c -43296 2048 43180 3149 43180 4821 c -43180 14293 L -41132 14293 L -41132 16462 L -43180 16462 L -43180 20542 L -45958 22214 L -45958 16462 L -48762 16462 L -48762 14293 L -45958 14293 L -45958 4667 l -45958 3868 46005 3360 46101 3133 c -46201 2905 46360 2725 46582 2588 c -46804 2455 47122 2387 47535 2387 c -47847 2387 48254 2424 48762 2498 C -@c -S -T -@rax 67.09465 665.79562 95.03518 672.45704 @E -[0.00028346 0.00000000 0.00000000 0.00028346 81.09892617 665.90501501] @tm - 0 O 0 @g -0.00 0.00 0.00 1.00 k -e - -% FontChange:/_ArialCE 31750.00000 z -%CHAR: -49404 0 (S) @t --47975 7303 m --45139 7551 L --45007 6414 -44694 5482 -44202 4752 c --43710 4022 -42948 3434 -41916 2985 c --40884 2535 -39720 2312 -38429 2312 c --37281 2312 -36270 2482 -35392 2820 c --34513 3164 -33857 3630 -33428 4223 c --33000 4821 -32783 5466 -32783 6170 c --32783 6884 -32989 7504 -33407 8038 c --33820 8573 -34503 9017 -35450 9377 c --36064 9615 -37408 9985 -39498 10488 c --41583 10991 -43049 11462 -43885 11906 c --44970 12472 -45779 13182 -46314 14023 c --46843 14864 -47107 15806 -47107 16854 c --47107 17997 -46785 19071 -46134 20066 c --45483 21066 -44530 21823 -43282 22341 c --42027 22855 -40641 23114 -39112 23114 c --37424 23114 -35942 22844 -34651 22299 c --33365 21759 -32375 20960 -31682 19907 c --30994 18854 -30619 17658 -30566 16325 C --33450 16108 L --33608 17542 -34132 18632 -35027 19362 c --35921 20098 -37238 20463 -38985 20463 c --40805 20463 -42128 20130 -42964 19463 c --43795 18796 -44213 17992 -44213 17055 c --44213 16235 -43917 15563 -43329 15039 c --42747 14510 -41239 13970 -38794 13420 c --36349 12864 -34672 12383 -33762 11970 c --32439 11356 -31460 10583 -30830 9652 c --30201 8715 -29888 7636 -29888 6419 c --29888 5207 -30232 4069 -30925 3000 c --31619 1931 -32614 1101 -33910 503 c --35206 -90 -36667 -386 -38286 -386 c --40345 -386 -42070 -90 -43456 513 c --44848 1111 -45938 2011 -46732 3217 c --47520 4419 -47938 5784 -47975 7303 C -@c -F -%CHAR: -28227 0 (u) @t --15342 0 m --15342 2418 L --16628 556 -18369 -370 -20570 -370 c --21538 -370 -22448 -185 -23290 185 c --24131 556 -24756 1027 -25163 1588 c --25576 2154 -25862 2842 -26026 3657 c --26137 4207 -26195 5075 -26195 6265 c --26195 16462 L --23406 16462 L --23406 7334 l --23406 5874 -23348 4895 -23237 4387 c --23057 3651 -22687 3080 -22120 2656 c --21549 2238 -20845 2032 -20009 2032 c --19173 2032 -18390 2244 -17654 2672 c --16919 3101 -16400 3688 -16098 4424 c --15792 5165 -15638 6239 -15638 7641 c --15638 16462 L --12849 16462 L --12849 0 L --15342 0 L -@c -F -%CHAR: -10574 0 (b) @t --5907 0 m --8494 0 L --8494 22728 L --5706 22728 L --5706 14621 L --4526 16097 -3023 16838 -1197 16838 c --181 16838 777 16632 1682 16224 c -2586 15817 3327 15240 3915 14504 c -4497 13764 4957 12875 5285 11827 c -5619 10784 5783 9668 5783 8483 c -5783 5657 5084 3477 3687 1937 c -2295 397 618 -370 -1335 -370 c --3277 -370 -4801 439 -5907 2064 C --5907 0 L -@c --5938 8356 m --5938 6382 -5669 4958 -5134 4080 c --4256 2641 -3065 1921 -1568 1921 c --345 1921 708 2450 1597 3514 c -2486 4572 2930 6149 2930 8250 c -2930 10398 2502 11986 1650 13007 c -798 14028 -234 14542 -1441 14542 c --2663 14542 -3716 14012 -4605 12954 c --5494 11896 -5938 10361 -5938 8356 c -@c -F -%CHAR: 7079 0 (m) @t -9175 0 m -9175 16462 L -11667 16462 L -11667 14155 L -12185 14960 12873 15610 13731 16097 c -14588 16589 15567 16838 16662 16838 c -17879 16838 18879 16584 19657 16076 c -20440 15568 20991 14864 21308 13954 C -22615 15875 24309 16838 26394 16838 c -28029 16838 29283 16383 30161 15478 c -31040 14573 31479 13182 31479 11303 c -31479 0 L -28706 0 L -28706 10372 l -28706 11488 28616 12293 28436 12785 c -28251 13272 27923 13668 27452 13970 c -26976 14266 26415 14420 25774 14420 c -24616 14420 23658 14034 22891 13261 c -22129 12494 21742 11261 21742 9567 c -21742 0 L -18954 0 L -18954 10694 l -18954 11938 18726 12869 18271 13488 c -17816 14108 17075 14420 16038 14420 c -15255 14420 14530 14213 13863 13795 c -13196 13383 12709 12779 12413 11986 c -12111 11187 11963 10038 11963 8541 c -11963 0 L -9175 0 L -@c -F -%CHAR: 33527 0 (i) @t -35633 19516 m -35633 22728 L -38427 22728 L -38427 19516 L -35633 19516 L -@c -35633 0 m -35633 16462 L -38427 16462 L -38427 0 L -35633 0 L -@c -F -%CHAR: 40576 0 (t) @t -48762 2498 m -49164 32 L -48381 -132 47677 -217 47058 -217 c -46042 -217 45259 -58 44698 265 c -44143 582 43751 1005 43523 1529 c -43296 2048 43180 3149 43180 4821 c -43180 14293 L -41132 14293 L -41132 16462 L -43180 16462 L -43180 20542 L -45958 22214 L -45958 16462 L -48762 16462 L -48762 14293 L -45958 14293 L -45958 4667 l -45958 3868 46005 3360 46101 3133 c -46201 2905 46360 2725 46582 2588 c -46804 2455 47122 2387 47535 2387 c -47847 2387 48254 2424 48762 2498 C -@c -F -T -@rax 67.09465 665.79562 95.03518 672.45704 @E -[0.00028346 0.00000000 0.00000000 0.00028346 81.09892617 665.90501501] @tm -0 J 0 j [] 0 d 0 R 0 @G -0.00 0.00 0.00 0.20 K -0 0.21543 0.21543 0.00000 @w -r - -% FontChange:/_ArialCE 31750.00000 z -%CHAR: -49404 0 (S) @t --47975 7303 m --45139 7551 L --45007 6414 -44694 5482 -44202 4752 c --43710 4022 -42948 3434 -41916 2985 c --40884 2535 -39720 2312 -38429 2312 c --37281 2312 -36270 2482 -35392 2820 c --34513 3164 -33857 3630 -33428 4223 c --33000 4821 -32783 5466 -32783 6170 c --32783 6884 -32989 7504 -33407 8038 c --33820 8573 -34503 9017 -35450 9377 c --36064 9615 -37408 9985 -39498 10488 c --41583 10991 -43049 11462 -43885 11906 c --44970 12472 -45779 13182 -46314 14023 c --46843 14864 -47107 15806 -47107 16854 c --47107 17997 -46785 19071 -46134 20066 c --45483 21066 -44530 21823 -43282 22341 c --42027 22855 -40641 23114 -39112 23114 c --37424 23114 -35942 22844 -34651 22299 c --33365 21759 -32375 20960 -31682 19907 c --30994 18854 -30619 17658 -30566 16325 C --33450 16108 L --33608 17542 -34132 18632 -35027 19362 c --35921 20098 -37238 20463 -38985 20463 c --40805 20463 -42128 20130 -42964 19463 c --43795 18796 -44213 17992 -44213 17055 c --44213 16235 -43917 15563 -43329 15039 c --42747 14510 -41239 13970 -38794 13420 c --36349 12864 -34672 12383 -33762 11970 c --32439 11356 -31460 10583 -30830 9652 c --30201 8715 -29888 7636 -29888 6419 c --29888 5207 -30232 4069 -30925 3000 c --31619 1931 -32614 1101 -33910 503 c --35206 -90 -36667 -386 -38286 -386 c --40345 -386 -42070 -90 -43456 513 c --44848 1111 -45938 2011 -46732 3217 c --47520 4419 -47938 5784 -47975 7303 C -@c -S -%CHAR: -28227 0 (u) @t --15342 0 m --15342 2418 L --16628 556 -18369 -370 -20570 -370 c --21538 -370 -22448 -185 -23290 185 c --24131 556 -24756 1027 -25163 1588 c --25576 2154 -25862 2842 -26026 3657 c --26137 4207 -26195 5075 -26195 6265 c --26195 16462 L --23406 16462 L --23406 7334 l --23406 5874 -23348 4895 -23237 4387 c --23057 3651 -22687 3080 -22120 2656 c --21549 2238 -20845 2032 -20009 2032 c --19173 2032 -18390 2244 -17654 2672 c --16919 3101 -16400 3688 -16098 4424 c --15792 5165 -15638 6239 -15638 7641 c --15638 16462 L --12849 16462 L --12849 0 L --15342 0 L -@c -S -%CHAR: -10574 0 (b) @t --5907 0 m --8494 0 L --8494 22728 L --5706 22728 L --5706 14621 L --4526 16097 -3023 16838 -1197 16838 c --181 16838 777 16632 1682 16224 c -2586 15817 3327 15240 3915 14504 c -4497 13764 4957 12875 5285 11827 c -5619 10784 5783 9668 5783 8483 c -5783 5657 5084 3477 3687 1937 c -2295 397 618 -370 -1335 -370 c --3277 -370 -4801 439 -5907 2064 C --5907 0 L -@c --5938 8356 m --5938 6382 -5669 4958 -5134 4080 c --4256 2641 -3065 1921 -1568 1921 c --345 1921 708 2450 1597 3514 c -2486 4572 2930 6149 2930 8250 c -2930 10398 2502 11986 1650 13007 c -798 14028 -234 14542 -1441 14542 c --2663 14542 -3716 14012 -4605 12954 c --5494 11896 -5938 10361 -5938 8356 c -@c -S -%CHAR: 7079 0 (m) @t -9175 0 m -9175 16462 L -11667 16462 L -11667 14155 L -12185 14960 12873 15610 13731 16097 c -14588 16589 15567 16838 16662 16838 c -17879 16838 18879 16584 19657 16076 c -20440 15568 20991 14864 21308 13954 C -22615 15875 24309 16838 26394 16838 c -28029 16838 29283 16383 30161 15478 c -31040 14573 31479 13182 31479 11303 c -31479 0 L -28706 0 L -28706 10372 l -28706 11488 28616 12293 28436 12785 c -28251 13272 27923 13668 27452 13970 c -26976 14266 26415 14420 25774 14420 c -24616 14420 23658 14034 22891 13261 c -22129 12494 21742 11261 21742 9567 c -21742 0 L -18954 0 L -18954 10694 l -18954 11938 18726 12869 18271 13488 c -17816 14108 17075 14420 16038 14420 c -15255 14420 14530 14213 13863 13795 c -13196 13383 12709 12779 12413 11986 c -12111 11187 11963 10038 11963 8541 c -11963 0 L -9175 0 L -@c -S -%CHAR: 33527 0 (i) @t -35633 19516 m -35633 22728 L -38427 22728 L -38427 19516 L -35633 19516 L -@c -35633 0 m -35633 16462 L -38427 16462 L -38427 0 L -35633 0 L -@c -S -%CHAR: 40576 0 (t) @t -48762 2498 m -49164 32 L -48381 -132 47677 -217 47058 -217 c -46042 -217 45259 -58 44698 265 c -44143 582 43751 1005 43523 1529 c -43296 2048 43180 3149 43180 4821 c -43180 14293 L -41132 14293 L -41132 16462 L -43180 16462 L -43180 20542 L -45958 22214 L -45958 16462 L -48762 16462 L -48762 14293 L -45958 14293 L -45958 4667 l -45958 3868 46005 3360 46101 3133 c -46201 2905 46360 2725 46582 2588 c -46804 2455 47122 2387 47535 2387 c -47847 2387 48254 2424 48762 2498 C -@c -S -T -@rax 382.56463 719.49798 431.18674 738.76139 @E -[0.00028346 0.00000000 0.00000000 0.00028346 406.91989063 731.60302836] @tm - 0 O 0 @g -0.00 0.00 0.00 1.00 k -e - -% FontChange:/_ArialCE 35278.00000 z -%CHAR: -85920 0 (J) @t --84903 7167 m --81887 7579 L --81810 5650 -81446 4327 -80805 3616 c --80158 2905 -79270 2552 -78135 2552 c --77295 2552 -76571 2740 -75966 3128 c --75354 3510 -74937 4033 -74707 4692 c --74478 5356 -74361 6409 -74361 7855 c --74361 25253 L --71021 25253 L --71021 8043 l --71021 5933 -71274 4292 -71785 3134 c --72297 1976 -73108 1094 -74214 482 c --75325 -123 -76624 -429 -78118 -429 c --80334 -429 -82028 206 -83209 1482 c --84385 2758 -84950 4651 -84903 7167 C -@c -F -%CHAR: -68281 0 (P) @t --65559 0 m --65559 25253 L --56034 25253 l --54358 25253 -53076 25171 -52194 25012 c --50954 24806 -49913 24412 -49072 23830 c --48237 23254 -47561 22437 -47050 21396 c --46538 20350 -46285 19203 -46285 17951 c --46285 15805 -46967 13982 -48331 12494 c --49701 11013 -52171 10266 -55740 10266 c --62219 10266 L --62219 0 L --65559 0 L -@c --62219 13247 m --55687 13247 l --53529 13247 -51994 13647 -51089 14452 c --50183 15258 -49731 16387 -49731 17845 c --49731 18903 -49995 19809 -50530 20561 c --51065 21314 -51765 21808 -52641 22049 c --53206 22196 -54240 22272 -55757 22272 c --62219 22272 L --62219 13247 L -@c -F -%CHAR: -35579 0 (P) @t --32857 0 m --32857 25253 L --23332 25253 l --21656 25253 -20374 25171 -19492 25012 c --18252 24806 -17211 24412 -16370 23830 c --15535 23254 -14859 22437 -14348 21396 c --13836 20350 -13583 19203 -13583 17951 c --13583 15805 -14265 13982 -15629 12494 c --16999 11013 -19469 10266 -23038 10266 c --29517 10266 L --29517 0 L --32857 0 L -@c --29517 13247 m --22985 13247 l --20827 13247 -19292 13647 -18387 14452 c --17481 15258 -17029 16387 -17029 17845 c --17029 18903 -17293 19809 -17828 20561 c --18363 21314 -19063 21808 -19939 22049 c --20504 22196 -21538 22272 -23055 22272 c --29517 22272 L --29517 13247 L -@c -F -%CHAR: -12049 0 (r) @t --9756 0 m --9756 18292 L --6969 18292 L --6969 15522 L --6258 16816 -5599 17674 -4993 18086 c --4394 18497 -3729 18709 -3006 18709 c --1959 18709 -901 18374 181 17710 C --889 14829 L --1642 15281 -2400 15505 -3159 15505 c --3841 15505 -4447 15299 -4988 14893 c --5528 14482 -5911 13917 -6140 13194 c --6487 12094 -6657 10889 -6657 9578 c --6657 0 L --9756 0 L -@c -F -%CHAR: -301 0 (i) @t -2039 21684 m -2039 25253 L -5144 25253 L -5144 21684 L -2039 21684 L -@c -2039 0 m -2039 18292 L -5144 18292 L -5144 0 L -2039 0 L -@c -F -%CHAR: 7531 0 (m) @t -9859 0 m -9859 18292 L -12629 18292 L -12629 15728 L -13205 16622 13969 17345 14922 17886 c -15874 18433 16962 18709 18179 18709 c -19531 18709 20643 18427 21507 17862 c -22377 17298 22989 16516 23341 15505 C -24794 17639 26675 18709 28992 18709 c -30809 18709 32202 18203 33178 17198 c -34154 16193 34642 14646 34642 12559 c -34642 0 L -31561 0 L -31561 11524 l -31561 12765 31461 13658 31261 14205 c -31056 14746 30691 15187 30168 15522 c -29639 15852 29015 16022 28304 16022 c -27016 16022 25952 15593 25099 14734 c -24253 13882 23824 12512 23824 10630 c -23824 0 L -20725 0 L -20725 11883 l -20725 13265 20472 14299 19966 14987 c -19461 15675 18638 16022 17485 16022 c -16615 16022 15810 15793 15069 15328 c -14328 14870 13787 14199 13458 13317 c -13123 12430 12958 11154 12958 9490 c -12958 0 L -9859 0 L -@c -F -%CHAR: 36918 0 (a) @t -51182 2258 m -50030 1282 48924 594 47866 188 c -46802 -212 45661 -412 44444 -412 c -42433 -412 40893 76 39811 1058 c -38735 2040 38194 3298 38194 4821 c -38194 5721 38394 6538 38805 7279 c -39211 8020 39746 8614 40405 9061 c -41069 9507 41810 9848 42639 10078 c -43245 10236 44162 10395 45391 10542 c -47895 10842 49742 11195 50923 11612 C -50935 12036 50941 12306 50941 12418 c -50941 13682 50647 14576 50059 15087 c -49271 15793 48089 16140 46531 16140 c -45073 16140 43997 15887 43297 15375 c -42604 14864 42092 13958 41757 12659 C -38729 13076 L -39005 14370 39458 15422 40087 16216 c -40716 17016 41633 17633 42827 18062 c -44021 18492 45402 18709 46978 18709 c -48542 18709 49806 18521 50782 18156 c -51758 17786 52476 17327 52940 16769 c -53399 16210 53716 15511 53904 14658 c -54004 14129 54057 13176 54057 11800 c -54057 7667 l -54057 4780 54122 2957 54257 2199 c -54386 1435 54651 700 55039 0 C -51799 0 L -51482 641 51270 1393 51182 2258 C -@c -50923 9184 m -49794 8720 48107 8331 45861 8008 c -44585 7826 43680 7620 43156 7391 c -42627 7161 42216 6826 41933 6379 c -41645 5938 41498 5450 41498 4910 c -41498 4080 41816 3393 42439 2840 c -43062 2293 43979 2017 45185 2017 c -46378 2017 47443 2275 48372 2799 c -49301 3322 49988 4039 50424 4945 c -50759 5644 50923 6679 50923 8043 c -50923 9184 L -@c -F -%CHAR: 56533 0 (r) @t -58826 0 m -58826 18292 L -61613 18292 L -61613 15522 L -62324 16816 62983 17674 63589 18086 c -64188 18497 64853 18709 65576 18709 c -66623 18709 67681 18374 68763 17710 C -67693 14829 L -66940 15281 66182 15505 65423 15505 c -64741 15505 64135 15299 63594 14893 c -63054 14482 62671 13917 62442 13194 c -62095 12094 61925 10889 61925 9578 c -61925 0 L -58826 0 L -@c -F -%CHAR: 68281 0 (y) @t -70468 -7044 m -70121 -4133 L -70803 -4316 71391 -4410 71897 -4410 c -72585 -4410 73138 -4292 73549 -4063 c -73967 -3834 74302 -3516 74566 -3099 c -74766 -2793 75078 -2023 75513 -794 c -75572 -617 75666 -370 75789 -35 C -68851 18292 L -72191 18292 L -76001 7702 l -76489 6356 76936 4945 77324 3463 C -77683 4886 78106 6274 78600 7632 c -82510 18292 L -85608 18292 L -78653 -312 l -77906 -2322 77324 -3704 76912 -4463 c -76360 -5486 75731 -6232 75019 -6709 c -74302 -7185 73455 -7426 72467 -7426 c -71868 -7426 71203 -7297 70468 -7044 C -@c -F -%CHAR: -61773 -35278 (S) @t --60185 -27164 m --57034 -26888 L --56887 -28152 -56540 -29187 -55993 -29998 c --55446 -30809 -54600 -31462 -53453 -31962 c --52307 -32462 -51013 -32709 -49579 -32709 c --48303 -32709 -47180 -32520 -46204 -32144 c --45228 -31762 -44499 -31245 -44022 -30586 c --43546 -29922 -43305 -29204 -43305 -28422 c --43305 -27629 -43534 -26941 -43999 -26347 c --44457 -25753 -45216 -25259 -46268 -24859 c --46950 -24595 -48444 -24183 -50766 -23625 c --53083 -23066 -54712 -22543 -55641 -22049 c --56846 -21420 -57745 -20632 -58339 -19697 c --58927 -18762 -59221 -17715 -59221 -16551 c --59221 -15281 -58863 -14088 -58139 -12982 c --57416 -11871 -56358 -11030 -54970 -10454 c --53577 -9884 -52036 -9596 -50337 -9596 c --48461 -9596 -46815 -9895 -45380 -10501 c --43952 -11101 -42852 -11989 -42082 -13159 c --41318 -14329 -40900 -15658 -40841 -17139 C --44046 -17380 L --44222 -15787 -44804 -14576 -45798 -13764 c --46792 -12947 -48256 -12541 -50196 -12541 c --52219 -12541 -53688 -12912 -54617 -13653 c --55541 -14393 -56005 -15287 -56005 -16328 c --56005 -17239 -55676 -17986 -55023 -18568 c --54376 -19156 -52701 -19756 -49984 -20367 c --47268 -20985 -45404 -21520 -44393 -21978 c --42923 -22660 -41835 -23519 -41135 -24553 c --40436 -25594 -40089 -26794 -40089 -28146 c --40089 -29492 -40471 -30757 -41241 -31944 c --42011 -33132 -43117 -34055 -44557 -34719 c --45998 -35378 -47621 -35707 -49420 -35707 c --51707 -35707 -53624 -35378 -55164 -34708 c --56711 -34043 -57922 -33044 -58804 -31703 c --59680 -30368 -60144 -28852 -60185 -27164 C -@c -F -%CHAR: -38243 -35278 (t) @t --29147 -32503 m --28700 -35243 L --29570 -35425 -30352 -35519 -31040 -35519 c --32169 -35519 -33039 -35343 -33663 -34984 c --34280 -34631 -34715 -34161 -34968 -33579 c --35221 -33003 -35350 -31780 -35350 -29922 c --35350 -19397 L --37626 -19397 L --37626 -16986 L --35350 -16986 L --35350 -12453 L --32263 -10595 L --32263 -16986 L --29147 -16986 L --29147 -19397 L --32263 -19397 L --32263 -30092 l --32263 -30980 -32210 -31544 -32105 -31797 c --31993 -32050 -31817 -32250 -31570 -32403 c --31323 -32550 -30970 -32626 -30511 -32626 c --30164 -32626 -29712 -32585 -29147 -32503 C -@c -F -%CHAR: -28436 -35278 (o) @t --27266 -26129 m --27266 -22743 -26325 -20232 -24438 -18603 c --22868 -17251 -20951 -16569 -18688 -16569 c --16171 -16569 -14113 -17392 -12520 -19044 c --10920 -20691 -10127 -22966 -10127 -25871 c --10127 -28228 -10479 -30080 -11185 -31427 c --11891 -32779 -12920 -33826 -14266 -34572 c --15618 -35319 -17088 -35690 -18688 -35690 c --21245 -35690 -23315 -34872 -24896 -33226 c --26478 -31586 -27266 -29222 -27266 -26129 c -@c --24079 -26129 m --24079 -28475 -23568 -30227 -22545 -31392 c --21522 -32562 -20234 -33144 -18688 -33144 c --17147 -33144 -15865 -32556 -14842 -31386 c --13825 -30216 -13313 -28428 -13313 -26029 c --13313 -23766 -13825 -22049 -14854 -20885 c --15883 -19720 -17159 -19138 -18688 -19138 c --20234 -19138 -21522 -19720 -22545 -20879 c --23568 -22037 -24079 -23789 -24079 -26129 c -@c -F -%CHAR: -8821 -35278 (r) @t --6528 -35278 m --6528 -16986 L --3741 -16986 L --3741 -19756 L --3030 -18462 -2371 -17604 -1765 -17192 c --1166 -16781 -501 -16569 222 -16569 c -1269 -16569 2327 -16904 3409 -17568 C -2339 -20449 L -1586 -19997 828 -19773 69 -19773 c --613 -19773 -1219 -19979 -1760 -20385 c --2300 -20796 -2683 -21361 -2912 -22084 c --3259 -23184 -3429 -24389 -3429 -25700 c --3429 -35278 L --6528 -35278 L -@c -F -%CHAR: 2927 -35278 (a) @t -17191 -33020 m -16039 -33996 14933 -34684 13875 -35090 c -12811 -35490 11670 -35690 10453 -35690 c -8442 -35690 6902 -35202 5820 -34220 c -4744 -33238 4203 -31980 4203 -30457 c -4203 -29557 4403 -28740 4814 -27999 c -5220 -27258 5755 -26664 6414 -26217 c -7078 -25771 7819 -25430 8648 -25200 c -9254 -25042 10171 -24883 11400 -24736 c -13904 -24436 15751 -24083 16932 -23666 C -16944 -23242 16950 -22972 16950 -22860 c -16950 -21596 16656 -20702 16068 -20191 c -15280 -19485 14098 -19138 12540 -19138 c -11082 -19138 10006 -19391 9306 -19903 c -8613 -20414 8101 -21320 7766 -22619 C -4738 -22202 L -5014 -20908 5467 -19856 6096 -19062 c -6725 -18262 7642 -17645 8836 -17216 c -10030 -16786 11411 -16569 12987 -16569 c -14551 -16569 15815 -16757 16791 -17122 c -17767 -17492 18485 -17951 18949 -18509 c -19408 -19068 19725 -19767 19913 -20620 c -20013 -21149 20066 -22102 20066 -23478 c -20066 -27611 l -20066 -30498 20131 -32321 20266 -33079 c -20395 -33843 20660 -34578 21048 -35278 C -17808 -35278 L -17491 -34637 17279 -33885 17191 -33020 C -@c -16932 -26094 m -15803 -26558 14116 -26947 11870 -27270 c -10594 -27452 9689 -27658 9165 -27887 c -8636 -28117 8225 -28452 7942 -28899 c -7654 -29340 7507 -29828 7507 -30368 c -7507 -31198 7825 -31885 8448 -32438 c -9071 -32985 9988 -33261 11194 -33261 c -12387 -33261 13452 -33003 14381 -32479 c -15310 -31956 15997 -31239 16433 -30333 c -16768 -29634 16932 -28599 16932 -27235 c -16932 -26094 L -@c -F -%CHAR: 22542 -35278 (g) @t -24300 -36795 m -27316 -37242 L -27440 -38171 27793 -38847 28363 -39276 c -29133 -39847 30186 -40135 31514 -40135 c -32955 -40135 34060 -39847 34842 -39276 c -35624 -38700 36148 -37894 36424 -36866 c -36589 -36231 36659 -34908 36647 -32885 C -35295 -34478 33608 -35278 31585 -35278 c -29068 -35278 27122 -34373 25746 -32556 c -24371 -30745 23677 -28563 23677 -26029 c -23677 -24283 23994 -22672 24623 -21196 c -25258 -19720 26176 -18580 27375 -17774 c -28575 -16975 29986 -16569 31603 -16569 c -33760 -16569 35542 -17445 36941 -19191 C -36941 -16986 L -39805 -16986 L -39805 -32797 l -39805 -35643 39511 -37665 38935 -38853 c -38352 -40041 37435 -40981 36177 -41669 c -34919 -42357 33372 -42704 31532 -42704 c -29351 -42704 27587 -42210 26246 -41228 c -24900 -40246 24253 -38771 24300 -36795 C -@c -26864 -25806 m -26864 -28205 27340 -29957 28298 -31056 c -29251 -32162 30444 -32709 31879 -32709 c -33302 -32709 34495 -32162 35460 -31068 c -36424 -29969 36906 -28252 36906 -25906 c -36906 -23666 36412 -21978 35418 -20843 c -34425 -19709 33225 -19138 31826 -19138 c -30450 -19138 29280 -19697 28310 -20820 c -27346 -21937 26864 -23601 26864 -25806 c -@c -F -%CHAR: 42157 -35278 (e) @t -57003 -29387 m -60208 -29781 L -59702 -31656 58767 -33108 57403 -34143 c -56033 -35172 54287 -35690 52164 -35690 c -49489 -35690 47366 -34866 45802 -33220 c -44233 -31574 43451 -29263 43451 -26288 c -43451 -23207 44244 -20820 45826 -19121 c -47413 -17421 49465 -16569 51994 -16569 c -54440 -16569 56439 -17404 57985 -19068 c -59537 -20732 60313 -23078 60313 -26094 c -60313 -26282 60308 -26558 60296 -26923 C -46655 -26923 L -46767 -28934 47337 -30474 48360 -31539 c -49383 -32609 50653 -33144 52182 -33144 c -53317 -33144 54287 -32844 55092 -32244 c -55898 -31650 56533 -30698 57003 -29387 C -@c -46825 -24371 m -57038 -24371 L -56903 -22837 56509 -21678 55868 -20914 c -54881 -19720 53599 -19121 52029 -19121 c -50606 -19121 49407 -19597 48436 -20549 c -47466 -21502 46931 -22778 46825 -24371 C -@c -F -T -@rax 351.82772 790.85083 463.43735 802.11260 @E -[0.00028346 0.00000000 0.00000000 0.00028346 407.84965437 793.37675838] @tm - 0 O 0 @g -0.00 0.00 0.00 1.00 k -e - -% FontChange:/_ArialCE 42333.00000 z -%CHAR: -197633 0 (J) @t --196412 8601 m --192793 9095 L --192701 6780 -192264 5193 -191495 4339 c --190719 3485 -189653 3062 -188292 3062 c --187283 3062 -186415 3288 -185688 3754 c --184954 4212 -184453 4840 -184178 5630 c --183903 6428 -183762 7690 -183762 9426 c --183762 30303 L --179754 30303 L --179754 9652 l --179754 7119 -180058 5151 -180672 3761 c --181285 2371 -182259 1312 -183585 579 c --184919 -148 -186478 -515 -188270 -515 c --190930 -515 -192962 247 -194380 1778 c --195792 3309 -196469 5581 -196412 8601 C -@c -F -%CHAR: -176466 0 (o) @t --175062 10978 m --175062 15042 -173933 18055 -171668 20009 c --169784 21632 -167484 22451 -164768 22451 c --161748 22451 -159279 21463 -157367 19480 c --155448 17505 -154495 14774 -154495 11289 c --154495 8460 -154919 6237 -155765 4621 c --156612 2999 -157847 1743 -159462 847 c --161085 -49 -162849 -494 -164768 -494 c --167837 -494 -170321 487 -172219 2462 c --174117 4431 -175062 7267 -175062 10978 c -@c --171238 10978 m --171238 8163 -170624 6061 -169396 4664 c --168169 3260 -166624 2561 -164768 2561 c --162919 2561 -161381 3267 -160154 4671 c --158933 6075 -158319 8220 -158319 11098 c --158319 13815 -158933 15875 -160168 17272 c --161403 18669 -162934 19367 -164768 19367 c --166624 19367 -168169 18669 -169396 17279 c --170624 15889 -171238 13786 -171238 10978 c -@c -F -%CHAR: -152929 0 (b) @t --146706 0 m --150156 0 L --150156 30303 L --146438 30303 L --146438 19494 L --144865 21463 -142861 22451 -140427 22451 c --139072 22451 -137795 22175 -136588 21632 c --135382 21089 -134394 20320 -133611 19339 c --132835 18351 -132221 17166 -131784 15769 c --131339 14379 -131120 12890 -131120 11310 c --131120 7542 -132052 4635 -133914 2582 c --135770 529 -138007 -494 -140610 -494 c --143199 -494 -145231 586 -146706 2752 C --146706 0 L -@c --146748 11141 m --146748 8509 -146389 6611 -145676 5440 c --144505 3521 -142917 2561 -140921 2561 c --139291 2561 -137887 3267 -136701 4685 c --135516 6096 -134923 8198 -134923 11000 c --134923 13864 -135495 15981 -136631 17342 c --137767 18704 -139143 19389 -140751 19389 c --142381 19389 -143785 18683 -144970 17272 c --146156 15861 -146748 13815 -146748 11141 c -@c -F -%CHAR: -117623 0 (P) @t --114356 0 m --114356 30303 L --102926 30303 l --100916 30303 -99377 30205 -98319 30014 c --96830 29767 -95582 29294 -94573 28596 c --93571 27905 -92759 26924 -92146 25675 c --91532 24419 -91228 23043 -91228 21540 c --91228 18965 -92047 16778 -93684 14993 c --95328 13215 -98291 12319 -102574 12319 c --110349 12319 L --110349 0 L --114356 0 L -@c --110349 15896 m --102510 15896 l --99921 15896 -98079 16376 -96993 17342 c --95906 18309 -95363 19664 -95363 21413 c --95363 22683 -95680 23770 -96322 24673 c --96964 25576 -97804 26169 -98855 26458 c --99533 26635 -100774 26726 -102595 26726 c --110349 26726 L --110349 15896 L -@c -F -%CHAR: -89387 0 (r) @t --86635 0 m --86635 21950 L --83291 21950 L --83291 18627 L --82437 20179 -81647 21209 -80920 21703 c --80201 22197 -79403 22451 -78536 22451 c --77280 22451 -76010 22048 -74712 21251 C --75996 17794 L --76899 18337 -77809 18605 -78719 18605 c --79538 18605 -80264 18358 -80913 17872 c --81562 17378 -82021 16700 -82296 15833 c --82712 14513 -82917 13067 -82917 11493 c --82917 0 L --86635 0 L -@c -F -%CHAR: -75290 0 (o) @t --73886 10978 m --73886 15042 -72757 18055 -70492 20009 c --68608 21632 -66308 22451 -63592 22451 c --60572 22451 -58103 21463 -56191 19480 c --54272 17505 -53319 14774 -53319 11289 c --53319 8460 -53743 6237 -54589 4621 c --55436 2999 -56671 1743 -58286 847 c --59909 -49 -61673 -494 -63592 -494 c --66661 -494 -69145 487 -71043 2462 c --72941 4431 -73886 7267 -73886 10978 c -@c --70062 10978 m --70062 8163 -69448 6061 -68220 4664 c --66993 3260 -65448 2561 -63592 2561 c --61743 2561 -60205 3267 -58978 4671 c --57757 6075 -57143 8220 -57143 11098 c --57143 13815 -57757 15875 -58992 17272 c --60227 18669 -61758 19367 -63592 19367 c --65448 19367 -66993 18669 -68220 17279 c --69448 15889 -70062 13786 -70062 10978 c -@c -F -%CHAR: -51753 0 (v) @t --42863 0 m --51217 21950 L --47287 21950 L --42574 8805 l --42066 7387 -41600 5913 -41170 4381 C --40838 5539 -40380 6929 -39787 8558 c --34904 21950 L --31080 21950 L --39392 0 L --42863 0 L -@c -F -%CHAR: -30586 0 (e) @t --12771 7070 m --8926 6597 L --9532 4346 -10654 2603 -12291 1362 c --13935 127 -16031 -494 -18578 -494 c --21788 -494 -24335 494 -26212 2469 c --28095 4445 -29034 7218 -29034 10788 c --29034 14485 -28081 17349 -26183 19389 c --24278 21428 -21816 22451 -18782 22451 c --15847 22451 -13448 21449 -11593 19452 c --9730 17455 -8799 14640 -8799 11021 c --8799 10795 -8806 10463 -8820 10026 C --25189 10026 L --25054 7613 -24370 5764 -23142 4487 c --21915 3203 -20391 2561 -18556 2561 c --17195 2561 -16031 2921 -15064 3641 c --14097 4353 -13335 5496 -12771 7070 C -@c --24984 13088 m --12729 13088 L --12891 14929 -13364 16319 -14133 17237 c --15318 18669 -16856 19389 -18740 19389 c --20447 19389 -21887 18817 -23051 17674 c --24215 16531 -24857 15000 -24984 13088 C -@c -F -%CHAR: -7049 0 (n) @t --4255 0 m --4255 21950 L --911 21950 L --911 18831 L -705 21244 3033 22451 6074 22451 c -7401 22451 8614 22211 9722 21738 c -10837 21258 11662 20637 12213 19861 c -12770 19092 13151 18175 13377 17117 c -13511 16425 13581 15219 13581 13497 c -13581 0 L -9856 0 L -9856 13356 l -9856 14866 9715 16002 9426 16757 c -9136 17505 8621 18104 7887 18549 c -7147 19000 6286 19226 5291 19226 c -3704 19226 2342 18718 1185 17716 c -35 16707 -537 14802 -537 11987 c --537 0 L --4255 0 L -@c -F -%CHAR: 16488 0 (a) @t -33605 2709 m -32222 1538 30895 713 29625 226 c -28348 -254 26980 -494 25519 -494 c -23106 -494 21258 92 19959 1270 c -18668 2448 18019 3958 18019 5786 c -18019 6865 18259 7846 18753 8735 c -19240 9624 19882 10336 20672 10873 c -21469 11409 22358 11818 23353 12093 c -24080 12284 25180 12474 26655 12651 c -29661 13010 31876 13434 33294 13935 C -33308 14443 33315 14767 33315 14901 c -33315 16418 32963 17491 32257 18104 c -31312 18951 29893 19367 28024 19367 c -26274 19367 24983 19064 24143 18450 c -23311 17836 22697 16750 22295 15190 C -18661 15691 L -18993 17244 19536 18507 20291 19459 c -21046 20419 22147 21159 23579 21674 c -25011 22190 26669 22451 28560 22451 c -30437 22451 31954 22225 33125 21787 c -34296 21343 35157 20793 35714 20122 c -36265 19452 36646 18612 36871 17589 c -36991 16954 37055 15811 37055 14160 c -37055 9200 l -37055 5736 37132 3549 37295 2639 c -37450 1722 37767 840 38233 0 C -34345 0 L -33964 769 33710 1672 33605 2709 C -@c -33294 11021 m -31940 10463 29915 9998 27219 9610 c -25688 9391 24602 9144 23974 8869 c -23339 8594 22845 8191 22506 7655 c -22161 7126 21984 6540 21984 5891 c -21984 4897 22365 4071 23113 3408 c -23861 2752 24962 2420 26408 2420 c -27840 2420 29117 2730 30232 3358 c -31347 3986 32172 4847 32694 5934 c -33097 6773 33294 8015 33294 9652 c -33294 11021 L -@c -F -%CHAR: 40025 0 (n) @t -42819 0 m -42819 21950 L -46163 21950 L -46163 18831 L -47779 21244 50107 22451 53148 22451 c -54475 22451 55688 22211 56796 21738 c -57911 21258 58736 20637 59287 19861 c -59844 19092 60225 18175 60451 17117 c -60585 16425 60655 15219 60655 13497 c -60655 0 L -56930 0 L -56930 13356 l -56930 14866 56789 16002 56500 16757 c -56210 17505 55695 18104 54961 18549 c -54221 19000 53360 19226 52365 19226 c -50778 19226 49416 18718 48259 17716 c -47109 16707 46537 14802 46537 11987 c -46537 0 L -42819 0 L -@c -F -%CHAR: 63562 0 (c) @t -80679 8043 m -84333 7563 L -83938 5045 82915 3069 81264 1644 c -79620 219 77595 -494 75197 -494 c -72198 -494 69778 487 67958 2448 c -66130 4410 65213 7225 65213 10894 c -65213 13264 65608 15339 66391 17117 c -67181 18895 68374 20228 69983 21117 c -71584 22006 73334 22451 75218 22451 c -77602 22451 79557 21844 81067 20637 c -82584 19431 83557 17723 83988 15501 C -80368 14944 L -80022 16418 79416 17526 78541 18274 c -77666 19015 76608 19389 75366 19389 c -73489 19389 71965 18718 70794 17371 c -69623 16030 69037 13906 69037 11000 c -69037 8050 69602 5905 70737 4565 c -71866 3231 73341 2561 75161 2561 c -76622 2561 77835 3013 78816 3909 c -79797 4805 80418 6181 80679 8043 C -@c -F -%CHAR: 84729 0 (e) @t -102544 7070 m -106389 6597 L -105783 4346 104661 2603 103024 1362 c -101380 127 99284 -494 96737 -494 c -93527 -494 90980 494 89103 2469 c -87220 4445 86281 7218 86281 10788 c -86281 14485 87234 17349 89132 19389 c -91037 21428 93499 22451 96533 22451 c -99468 22451 101867 21449 103722 19452 c -105585 17455 106516 14640 106516 11021 c -106516 10795 106509 10463 106495 10026 C -90126 10026 L -90261 7613 90945 5764 92173 4487 c -93400 3203 94924 2561 96759 2561 c -98120 2561 99284 2921 100251 3641 c -101218 4353 101980 5496 102544 7070 C -@c -90331 13088 m -102586 13088 L -102424 14929 101951 16319 101182 17237 c -99997 18669 98459 19389 96575 19389 c -94868 19389 93428 18817 92264 17674 c -91100 16531 90458 15000 90331 13088 C -@c -F -%CHAR: 120035 0 (\050) @t -129934 -8911 m -127881 -6322 126145 -3288 124727 183 c -123309 3662 122596 7253 122596 10978 c -122596 14259 123125 17399 124191 20405 c -125432 23890 127344 27361 129934 30818 C -132601 30818 L -130936 27954 129835 25908 129299 24680 c -128452 22782 127796 20793 127309 18725 c -126717 16150 126420 13561 126420 10957 c -126420 4325 128480 -2293 132601 -8911 C -129934 -8911 L -@c -F -%CHAR: 134132 0 (J) @t -135353 8601 m -138972 9095 L -139064 6780 139501 5193 140270 4339 c -141046 3485 142112 3062 143473 3062 c -144482 3062 145350 3288 146077 3754 c -146811 4212 147312 4840 147587 5630 c -147862 6428 148003 7690 148003 9426 c -148003 30303 L -152011 30303 L -152011 9652 l -152011 7119 151707 5151 151093 3761 c -150480 2371 149506 1312 148180 579 c -146846 -148 145287 -515 143495 -515 c -140835 -515 138803 247 137385 1778 c -135973 3309 135296 5581 135353 8601 C -@c -F -%CHAR: 155299 0 (P) @t -158566 0 m -158566 30303 L -169996 30303 l -172006 30303 173545 30205 174603 30014 c -176092 29767 177340 29294 178349 28596 c -179351 27905 180163 26924 180776 25675 c -181390 24419 181694 23043 181694 21540 c -181694 18965 180875 16778 179238 14993 c -177594 13215 174631 12319 170348 12319 c -162573 12319 L -162573 0 L -158566 0 L -@c -162573 15896 m -170412 15896 l -173001 15896 174843 16376 175929 17342 c -177016 18309 177559 19664 177559 21413 c -177559 22683 177242 23770 176600 24673 c -175958 25576 175118 26169 174067 26458 c -173389 26635 172148 26726 170327 26726 c -162573 26726 L -162573 15896 L -@c -F -%CHAR: 183535 0 (\051) @t -188763 -8911 m -186096 -8911 L -190217 -2293 192277 4325 192277 10957 c -192277 13547 191980 16115 191388 18669 c -190922 20729 190266 22719 189426 24617 c -188890 25858 187782 27926 186096 30818 C -188763 30818 L -191352 27361 193272 23890 194513 20405 c -195572 17399 196101 14259 196101 10978 c -196101 7253 195388 3662 193963 183 c -192538 -3288 190802 -6322 188763 -8911 C -@c -F -T -@rax 200.30400 736.93757 286.18384 742.85490 @E -[0.00028346 0.00000000 0.00000000 0.00028346 243.42320369 737.03080768] @tm - 0 O 0 @g -0.00 0.00 0.00 1.00 k -e - -% FontChange:/_ArialCE 28222.00000 z -%CHAR: -152115 0 (R) @t --149895 0 m --149895 20202 L --140939 20202 l --139138 20202 -137769 20019 -136833 19657 c --135897 19294 -135149 18655 -134584 17738 c --134025 16816 -133747 15800 -133747 14690 c --133747 13255 -134208 12051 -135139 11068 c --136066 10085 -137501 9459 -139439 9191 C --138728 8852 -138192 8518 -137825 8184 c --137044 7469 -136306 6571 -135605 5499 c --132091 0 L --135455 0 L --138126 4205 l --138907 5414 -139552 6345 -140060 6985 c --140563 7629 -141014 8081 -141414 8335 c --141814 8594 -142218 8772 -142632 8876 c --142938 8937 -143432 8970 -144123 8970 c --147223 8970 L --147223 0 L --149895 0 L -@c --147223 11284 m --141475 11284 l --140257 11284 -139298 11411 -138611 11665 c --137919 11919 -137397 12324 -137040 12879 c --136682 13434 -136504 14036 -136504 14690 c --136504 15644 -136847 16430 -137543 17046 c --138234 17662 -139330 17968 -140831 17968 c --147223 17968 L --147223 11284 L -@c -F -%CHAR: -131739 0 (e) @t --119862 4713 m --117299 4398 L --117703 2897 -118451 1736 -119542 908 c --120638 85 -122035 -329 -123733 -329 c --125874 -329 -127572 329 -128823 1646 c --130079 2963 -130704 4812 -130704 7192 c --130704 9657 -130069 11566 -128804 12926 c --127534 14285 -125892 14967 -123870 14967 c --121913 14967 -120314 14299 -119077 12968 c --117835 11637 -117214 9760 -117214 7347 c --117214 7197 -117219 6976 -117228 6684 C --128141 6684 L --128051 5075 -127595 3843 -126777 2992 c --125958 2135 -124942 1707 -123719 1707 c --122811 1707 -122035 1947 -121391 2427 c --120747 2902 -120239 3664 -119862 4713 C -@c --128004 8725 m --119834 8725 L --119942 9953 -120257 10880 -120770 11491 c --121560 12446 -122586 12926 -123842 12926 c --124980 12926 -125939 12545 -126715 11783 c --127492 11021 -127920 10000 -128004 8725 C -@c -F -%CHAR: -116048 0 (c) @t --104637 5362 m --102200 5042 L --102464 3363 -103146 2046 -104247 1096 c --105342 146 -106692 -329 -108292 -329 c --110291 -329 -111904 325 -113118 1632 c --114336 2940 -114947 4817 -114947 7262 c --114947 8843 -114684 10226 -114162 11411 c --113635 12596 -112840 13485 -111768 14078 c --110700 14671 -109533 14967 -108278 14967 c --106688 14967 -105385 14563 -104378 13758 c --103367 12954 -102718 11816 -102431 10334 C --104844 9962 L --105074 10945 -105479 11684 -106062 12182 c --106645 12676 -107351 12926 -108179 12926 c --109430 12926 -110446 12479 -111227 11580 c --112008 10687 -112398 9271 -112398 7333 c --112398 5367 -112022 3937 -111264 3043 c --110512 2154 -109529 1707 -108315 1707 c --107342 1707 -106532 2008 -105879 2606 c --105225 3203 -104811 4120 -104637 5362 C -@c -F -%CHAR: -101937 0 (o) @t --101001 7319 m --101001 10028 -100248 12037 -98739 13340 c --97483 14421 -95949 14967 -94138 14967 c --92125 14967 -90479 14309 -89204 12987 c --87925 11670 -87290 9849 -87290 7526 c --87290 5640 -87572 4158 -88136 3081 c --88701 1999 -89524 1162 -90601 564 c --91683 -33 -92859 -329 -94138 -329 c --96184 -329 -97840 325 -99105 1642 c --100371 2954 -101001 4845 -101001 7319 c -@c --98452 7319 m --98452 5442 -98042 4040 -97224 3109 c --96405 2173 -95375 1707 -94138 1707 c --92906 1707 -91881 2178 -91062 3114 c --90248 4050 -89839 5480 -89839 7399 c --89839 9210 -90248 10583 -91072 11515 c --91895 12446 -92915 12912 -94138 12912 c --95375 12912 -96405 12446 -97224 11519 c --98042 10593 -98452 9191 -98452 7319 c -@c -F -%CHAR: -86246 0 (r) @t --84412 0 m --84412 14633 L --82182 14633 L --82182 12418 L --81613 13452 -81086 14139 -80602 14468 c --80122 14798 -79590 14967 -79012 14967 c --78175 14967 -77328 14699 -76462 14167 C --77318 11863 L --77921 12225 -78527 12404 -79134 12404 c --79680 12404 -80164 12239 -80597 11914 c --81030 11585 -81335 11134 -81519 10555 c --81796 9675 -81933 8711 -81933 7662 c --81933 0 L --84412 0 L -@c -F -%CHAR: -76848 0 (d) @t --65493 0 m --65493 1849 L --66420 395 -67784 -329 -69586 -329 c --70752 -329 -71824 -9 -72803 635 c --73781 1275 -74538 2173 -75079 3330 c --75616 4483 -75884 5804 -75884 7305 c --75884 8763 -75639 10089 -75155 11279 c --74665 12469 -73936 13382 -72963 14012 c --71989 14647 -70898 14967 -69694 14967 c --68814 14967 -68029 14779 -67342 14407 c --66650 14036 -66091 13551 -65658 12954 C --65658 20202 L --63193 20202 L --63193 0 L --65493 0 L -@c --73334 7305 m --73334 5428 -72939 4026 -72149 3100 c --71359 2173 -70427 1707 -69350 1707 c --68269 1707 -67347 2154 -66589 3039 c --65832 3923 -65451 5278 -65451 7098 c --65451 9102 -65837 10569 -66608 11505 c --67380 12446 -68330 12912 -69463 12912 c --70564 12912 -71486 12460 -72224 11562 c --72963 10663 -73334 9243 -73334 7305 c -@c -F -%CHAR: -53311 0 (\223) @t --49506 16811 m --49506 13932 L --52168 13932 L --52168 16204 l --52168 17436 -52022 18325 -51726 18881 c --51340 19614 -50729 20169 -49891 20546 C --49289 19581 L --49793 19370 -50164 19055 -50404 18636 c --50644 18222 -50776 17611 -50804 16811 C --49506 16811 L -@c --45235 16811 m --45235 13932 L --47897 13932 L --47897 16204 l --47897 17436 -47747 18325 -47455 18881 c --47069 19614 -46458 20169 -45621 20546 C --45014 19581 L --45522 19370 -45893 19055 -46133 18636 c --46368 18222 -46505 17611 -46533 16811 C --45235 16811 L -@c -F -%CHAR: -43913 0 (m) @t --42050 0 m --42050 14633 L --39835 14633 L --39835 12582 L --39374 13297 -38762 13876 -38000 14309 c --37238 14746 -36368 14967 -35395 14967 c --34313 14967 -33424 14741 -32732 14290 c --32036 13838 -31547 13213 -31265 12404 C --30103 14111 -28598 14967 -26745 14967 c --25291 14967 -24176 14563 -23396 13758 c --22615 12954 -22224 11717 -22224 10047 c --22224 0 L --24689 0 L --24689 9219 l --24689 10212 -24769 10927 -24929 11364 c --25094 11797 -25385 12150 -25804 12418 c --26227 12681 -26726 12817 -27295 12817 c --28325 12817 -29176 12474 -29858 11787 c --30536 11105 -30879 10009 -30879 8504 c --30879 0 L --33358 0 L --33358 9506 l --33358 10611 -33560 11439 -33965 11990 c --34369 12540 -35028 12817 -35950 12817 c --36646 12817 -37290 12634 -37883 12262 c --38476 11896 -38908 11359 -39172 10654 c --39440 9944 -39572 8923 -39572 7592 c --39572 0 L --42050 0 L -@c -F -%CHAR: -20404 0 (e) @t --8527 4713 m --5964 4398 L --6368 2897 -7116 1736 -8207 908 c --9303 85 -10700 -329 -12398 -329 c --14539 -329 -16237 329 -17488 1646 c --18744 2963 -19369 4812 -19369 7192 c --19369 9657 -18734 11566 -17469 12926 c --16199 14285 -14557 14967 -12535 14967 c --10578 14967 -8979 14299 -7742 12968 c --6500 11637 -5879 9760 -5879 7347 c --5879 7197 -5884 6976 -5893 6684 C --16806 6684 L --16716 5075 -16260 3843 -15442 2992 c --14623 2135 -13607 1707 -12384 1707 c --11476 1707 -10700 1947 -10056 2427 c --9412 2902 -8904 3664 -8527 4713 C -@c --16669 8725 m --8499 8725 L --8607 9953 -8922 10880 -9435 11491 c --10225 12446 -11251 12926 -12507 12926 c --13645 12926 -14604 12545 -15380 11783 c --16157 11021 -16585 10000 -16669 8725 C -@c -F -%CHAR: -4713 0 (a) @t -6698 1806 m -5776 1025 4892 475 4045 151 c -3194 -169 2281 -329 1308 -329 c --301 -329 -1533 61 -2399 847 c --3260 1632 -3692 2639 -3692 3857 c --3692 4577 -3532 5230 -3203 5823 c --2879 6416 -2451 6891 -1924 7248 c --1392 7606 -800 7879 -136 8062 c -348 8189 1082 8316 2065 8434 c -4069 8674 5546 8956 6491 9290 C -6501 9628 6505 9845 6505 9934 c -6505 10945 6270 11660 5800 12070 c -5169 12634 4224 12912 2977 12912 c -1811 12912 950 12709 390 12300 c --165 11891 -574 11167 -842 10127 C --3264 10461 L --3043 11496 -2681 12338 -2178 12973 c --1674 13612 -941 14106 14 14450 c -969 14793 2074 14967 3335 14967 c -4586 14967 5597 14817 6378 14525 c -7159 14229 7733 13862 8104 13415 c -8471 12968 8725 12408 8876 11726 c -8956 11303 8998 10541 8998 9440 c -8998 6134 l -8998 3824 9050 2366 9158 1759 c -9262 1148 9473 560 9784 0 C -7192 0 L -6938 513 6769 1115 6698 1806 C -@c -6491 7347 m -5588 6976 4238 6665 2441 6406 c -1421 6261 696 6096 278 5913 c --146 5729 -475 5461 -701 5103 c --931 4751 -1049 4360 -1049 3928 c --1049 3264 -795 2714 -296 2272 c -202 1834 936 1613 1900 1613 c -2855 1613 3707 1820 4450 2239 c -5193 2658 5743 3231 6091 3956 c -6359 4516 6491 5343 6491 6435 c -6491 7347 L -@c -F -%CHAR: 10978 0 (s) @t -11848 4370 m -14299 4755 L -14435 3772 14821 3020 15451 2493 c -16077 1971 16956 1707 18090 1707 c -19228 1707 20075 1943 20625 2404 c -21176 2869 21453 3415 21453 4036 c -21453 4600 21208 5038 20719 5362 c -20381 5583 19534 5861 18184 6199 c -16368 6660 15103 7056 14402 7394 c -13701 7728 13165 8194 12803 8786 c -12441 9379 12257 10033 12257 10748 c -12257 11402 12408 12004 12709 12559 c -13005 13119 13414 13579 13927 13946 c -14313 14229 14840 14473 15503 14671 c -16171 14868 16886 14967 17648 14967 c -18795 14967 19802 14798 20672 14468 c -21542 14139 22182 13692 22596 13128 c -23010 12559 23292 11806 23447 10861 C -21025 10527 L -20912 11279 20592 11867 20065 12291 c -19539 12714 18791 12926 17827 12926 c -16688 12926 15875 12738 15390 12361 c -14901 11985 14656 11543 14656 11040 c -14656 10715 14760 10428 14962 10169 c -15164 9901 15479 9685 15912 9506 c -16161 9417 16891 9205 18104 8876 c -19859 8405 21081 8024 21773 7723 c -22469 7427 23015 6990 23410 6421 c -23805 5851 24002 5146 24002 4299 c -24002 3471 23758 2695 23278 1961 c -22794 1232 22097 668 21190 268 c -20282 -132 19252 -329 18104 -329 c -16199 -329 14750 66 13753 856 c -12756 1646 12121 2817 11848 4370 C -@c -F -%CHAR: 25089 0 (u) @t -36542 0 m -36542 2150 L -35399 494 33852 -329 31895 -329 c -31034 -329 30225 -165 29478 165 c -28730 494 28175 913 27812 1411 c -27446 1914 27192 2526 27046 3250 c -26947 3739 26895 4511 26895 5569 c -26895 14633 L -29374 14633 L -29374 6519 l -29374 5221 29426 4351 29525 3899 c -29684 3246 30014 2738 30517 2361 c -31025 1990 31651 1806 32394 1806 c -33137 1806 33833 1994 34487 2375 c -35141 2756 35602 3278 35870 3932 c -36143 4591 36279 5546 36279 6792 c -36279 14633 L -38758 14633 L -38758 0 L -36542 0 L -@c -F -%CHAR: 40780 0 (r) @t -42614 0 m -42614 14633 L -44844 14633 L -44844 12418 L -45413 13452 45940 14139 46424 14468 c -46904 14798 47436 14967 48014 14967 c -48851 14967 49698 14699 50564 14167 C -49708 11863 L -49105 12225 48499 12404 47892 12404 c -47346 12404 46862 12239 46429 11914 c -45996 11585 45691 11134 45507 10555 c -45230 9675 45093 8711 45093 7662 c -45093 0 L -42614 0 L -@c -F -%CHAR: 50178 0 (e) @t -62055 4713 m -64618 4398 L -64214 2897 63466 1736 62375 908 c -61279 85 59882 -329 58184 -329 c -56043 -329 54345 329 53094 1646 c -51838 2963 51213 4812 51213 7192 c -51213 9657 51848 11566 53113 12926 c -54383 14285 56025 14967 58047 14967 c -60004 14967 61603 14299 62840 12968 c -64082 11637 64703 9760 64703 7347 c -64703 7197 64698 6976 64689 6684 C -53776 6684 L -53866 5075 54322 3843 55140 2992 c -55959 2135 56975 1707 58198 1707 c -59106 1707 59882 1947 60526 2427 c -61170 2902 61678 3664 62055 4713 C -@c -53913 8725 m -62083 8725 L -61975 9953 61660 10880 61147 11491 c -60357 12446 59331 12926 58075 12926 c -56937 12926 55978 12545 55202 11783 c -54425 11021 53997 10000 53913 8725 C -@c -F -%CHAR: 65869 0 (m) @t -67732 0 m -67732 14633 L -69947 14633 L -69947 12582 L -70408 13297 71020 13876 71782 14309 c -72544 14746 73414 14967 74387 14967 c -75469 14967 76358 14741 77050 14290 c -77746 13838 78235 13213 78517 12404 C -79679 14111 81184 14967 83037 14967 c -84491 14967 85606 14563 86386 13758 c -87167 12954 87558 11717 87558 10047 c -87558 0 L -85093 0 L -85093 9219 l -85093 10212 85013 10927 84853 11364 c -84688 11797 84397 12150 83978 12418 c -83555 12681 83056 12817 82487 12817 c -81457 12817 80606 12474 79924 11787 c -79246 11105 78903 10009 78903 8504 c -78903 0 L -76424 0 L -76424 9506 l -76424 10611 76222 11439 75817 11990 c -75413 12540 74754 12817 73832 12817 c -73136 12817 72492 12634 71899 12262 c -71306 11896 70874 11359 70610 10654 c -70342 9944 70210 8923 70210 7592 c -70210 0 L -67732 0 L -@c -F -%CHAR: 89378 0 (e) @t -101255 4713 m -103818 4398 L -103414 2897 102666 1736 101575 908 c -100479 85 99082 -329 97384 -329 c -95243 -329 93545 329 92294 1646 c -91038 2963 90413 4812 90413 7192 c -90413 9657 91048 11566 92313 12926 c -93583 14285 95225 14967 97247 14967 c -99204 14967 100803 14299 102040 12968 c -103282 11637 103903 9760 103903 7347 c -103903 7197 103898 6976 103889 6684 C -92976 6684 L -93066 5075 93522 3843 94340 2992 c -95159 2135 96175 1707 97398 1707 c -98306 1707 99082 1947 99726 2427 c -100370 2902 100878 3664 101255 4713 C -@c -93113 8725 m -101283 8725 L -101175 9953 100860 10880 100347 11491 c -99557 12446 98531 12926 97275 12926 c -96137 12926 95178 12545 94402 11783 c -93625 11021 93197 10000 93113 8725 C -@c -F -%CHAR: 105069 0 (n) @t -106932 0 m -106932 14633 L -109161 14633 L -109161 12554 L -110238 14163 111791 14967 113818 14967 c -114702 14967 115511 14807 116250 14492 c -116993 14172 117543 13758 117910 13241 c -118282 12728 118536 12117 118686 11411 c -118775 10950 118823 10146 118823 8998 c -118823 0 L -116339 0 L -116339 8904 l -116339 9911 116245 10668 116052 11171 c -115859 11670 115516 12070 115027 12366 c -114533 12667 113959 12817 113296 12817 c -112237 12817 111330 12479 110558 11811 c -109791 11138 109410 9868 109410 7992 c -109410 0 L -106932 0 L -@c -F -%CHAR: 120760 0 (t) @t -128037 2220 m -128394 28 L -127698 -118 127072 -193 126522 -193 c -125619 -193 124923 -52 124424 235 c -123930 517 123582 894 123380 1359 c -123178 1820 123074 2799 123074 4285 c -123074 12705 L -121254 12705 L -121254 14633 L -123074 14633 L -123074 18260 L -125544 19746 L -125544 14633 L -128037 14633 L -128037 12705 L -125544 12705 L -125544 4149 l -125544 3438 125586 2987 125671 2785 c -125760 2582 125901 2422 126099 2300 c -126296 2183 126578 2121 126945 2121 c -127223 2121 127585 2154 128037 2220 C -@c -F -%CHAR: 128606 0 (s) @t -129476 4370 m -131927 4755 L -132063 3772 132449 3020 133079 2493 c -133705 1971 134584 1707 135718 1707 c -136856 1707 137703 1943 138253 2404 c -138804 2869 139081 3415 139081 4036 c -139081 4600 138836 5038 138347 5362 c -138009 5583 137162 5861 135812 6199 c -133996 6660 132731 7056 132030 7394 c -131329 7728 130793 8194 130431 8786 c -130069 9379 129885 10033 129885 10748 c -129885 11402 130036 12004 130337 12559 c -130633 13119 131042 13579 131555 13946 c -131941 14229 132468 14473 133131 14671 c -133799 14868 134514 14967 135276 14967 c -136423 14967 137430 14798 138300 14468 c -139170 14139 139810 13692 140224 13128 c -140638 12559 140920 11806 141075 10861 C -138653 10527 L -138540 11279 138220 11867 137693 12291 c -137167 12714 136419 12926 135455 12926 c -134316 12926 133503 12738 133018 12361 c -132529 11985 132284 11543 132284 11040 c -132284 10715 132388 10428 132590 10169 c -132792 9901 133107 9685 133540 9506 c -133789 9417 134519 9205 135732 8876 c -137487 8405 138709 8024 139401 7723 c -140097 7427 140643 6990 141038 6421 c -141433 5851 141630 5146 141630 4299 c -141630 3471 141386 2695 140906 1961 c -140422 1232 139725 668 138818 268 c -137910 -132 136880 -329 135732 -329 c -133827 -329 132378 66 131381 856 c -130384 1646 129749 2817 129476 4370 C -@c -F -%CHAR: 142717 0 (\224) @t -143916 17531 m -143916 20409 L -146574 20409 L -146574 18133 l -146574 16905 146433 16016 146151 15475 c -145756 14732 145139 14172 144302 13796 C -143695 14774 L -144189 14976 144561 15292 144805 15729 c -145050 16167 145182 16764 145210 17531 C -143916 17531 L -@c -148187 17531 m -148187 20409 L -150850 20409 L -150850 18133 l -150850 16905 150704 16016 150422 15475 c -150026 14732 149410 14172 148573 13796 C -147966 14774 L -148465 14976 148832 15292 149076 15729 c -149321 16167 149457 16764 149481 17531 C -148187 17531 L -@c -F -T -@rax 215.93849 604.20756 273.68617 611.52350 @E -[0.00028346 0.00000000 0.00000000 0.00028346 244.84166033 605.79692272] @tm - 0 O 0 @g -0.00 0.00 0.00 1.00 k -e - -% FontChange:/_ArialCE 28222.00000 z -%CHAR: -101964 0 (U) @t --86531 20202 m --83855 20202 L --83855 8528 l --83855 6500 -84085 4887 -84546 3692 c --85007 2498 -85835 1529 -87035 781 c --88234 28 -89805 -343 -91752 -343 c --93643 -343 -95195 -19 -96395 635 c --97599 1284 -98460 2230 -98972 3467 c --99490 4704 -99744 6388 -99744 8528 c --99744 20202 L --97072 20202 L --97072 8542 l --97072 6787 -96908 5494 -96583 4666 c --96258 3833 -95694 3194 -94904 2742 c --94109 2291 -93135 2065 -91988 2065 c --90021 2065 -88620 2512 -87782 3405 c --86950 4294 -86531 6007 -86531 8542 c --86531 20202 L -@c -F -%CHAR: -81588 0 (p) @t --79725 -5607 m --79725 14633 L --77468 14633 L --77468 12733 L --76936 13476 -76334 14036 -75661 14407 c --74993 14779 -74180 14967 -73225 14967 c --71974 14967 -70873 14643 -69918 14003 c --68959 13358 -68239 12451 -67755 11279 c --67265 10108 -67021 8824 -67021 7427 c --67021 5931 -67289 4581 -67830 3382 c --68366 2183 -69147 1265 -70172 626 c --71198 -9 -72275 -329 -73404 -329 c --74231 -329 -74970 -155 -75628 193 c --76287 541 -76823 983 -77247 1515 C --77247 -5607 L --79725 -5607 L -@c --77482 7234 m --77482 5353 -77101 3960 -76339 3057 c --75577 2159 -74650 1707 -73568 1707 c --72468 1707 -71522 2173 -70737 3109 c --69951 4040 -69556 5484 -69556 7441 c --69556 9309 -69942 10701 -70708 11632 c --71475 12559 -72392 13024 -73455 13024 c --74514 13024 -75450 12531 -76263 11543 c --77077 10555 -77482 9116 -77482 7234 c -@c -F -%CHAR: -65897 0 (l) @t --64091 0 m --64091 20202 L --61612 20202 L --61612 0 L --64091 0 L -@c -F -%CHAR: -59632 0 (o) @t --58696 7319 m --58696 10028 -57943 12037 -56434 13340 c --55178 14421 -53644 14967 -51833 14967 c --49820 14967 -48174 14309 -46899 12987 c --45620 11670 -44985 9849 -44985 7526 c --44985 5640 -45267 4158 -45831 3081 c --46396 1999 -47219 1162 -48296 564 c --49378 -33 -50554 -329 -51833 -329 c --53879 -329 -55535 325 -56800 1642 c --58066 2954 -58696 4845 -58696 7319 c -@c --56147 7319 m --56147 5442 -55737 4040 -54919 3109 c --54100 2173 -53070 1707 -51833 1707 c --50601 1707 -49576 2178 -48757 3114 c --47943 4050 -47534 5480 -47534 7399 c --47534 9210 -47943 10583 -48767 11515 c --49590 12446 -50610 12912 -51833 12912 c --53070 12912 -54100 12446 -54919 11519 c --55737 10593 -56147 9191 -56147 7319 c -@c -F -%CHAR: -43941 0 (a) @t --32530 1806 m --33452 1025 -34336 475 -35183 151 c --36034 -169 -36947 -329 -37920 -329 c --39529 -329 -40761 61 -41627 847 c --42488 1632 -42920 2639 -42920 3857 c --42920 4577 -42760 5230 -42431 5823 c --42107 6416 -41679 6891 -41152 7248 c --40620 7606 -40028 7879 -39364 8062 c --38880 8189 -38146 8316 -37163 8434 c --35159 8674 -33682 8956 -32737 9290 C --32727 9628 -32723 9845 -32723 9934 c --32723 10945 -32958 11660 -33428 12070 c --34059 12634 -35004 12912 -36251 12912 c --37417 12912 -38278 12709 -38838 12300 c --39393 11891 -39802 11167 -40070 10127 C --42492 10461 L --42271 11496 -41909 12338 -41406 12973 c --40902 13612 -40169 14106 -39214 14450 c --38259 14793 -37154 14967 -35893 14967 c --34642 14967 -33631 14817 -32850 14525 c --32069 14229 -31495 13862 -31124 13415 c --30757 12968 -30503 12408 -30352 11726 c --30272 11303 -30230 10541 -30230 9440 c --30230 6134 l --30230 3824 -30178 2366 -30070 1759 c --29966 1148 -29755 560 -29444 0 C --32036 0 L --32290 513 -32459 1115 -32530 1806 C -@c --32737 7347 m --33640 6976 -34990 6665 -36787 6406 c --37807 6261 -38532 6096 -38950 5913 c --39374 5729 -39703 5461 -39929 5103 c --40159 4751 -40277 4360 -40277 3928 c --40277 3264 -40023 2714 -39524 2272 c --39026 1834 -38292 1613 -37328 1613 c --36373 1613 -35521 1820 -34778 2239 c --34035 2658 -33485 3231 -33137 3956 c --32869 4516 -32737 5343 -32737 6435 c --32737 7347 L -@c -F -%CHAR: -28250 0 (d) @t --16895 0 m --16895 1849 L --17822 395 -19186 -329 -20988 -329 c --22154 -329 -23226 -9 -24205 635 c --25183 1275 -25940 2173 -26481 3330 c --27018 4483 -27286 5804 -27286 7305 c --27286 8763 -27041 10089 -26557 11279 c --26067 12469 -25338 13382 -24365 14012 c --23391 14647 -22300 14967 -21096 14967 c --20216 14967 -19431 14779 -18744 14407 c --18052 14036 -17493 13551 -17060 12954 C --17060 20202 L --14595 20202 L --14595 0 L --16895 0 L -@c --24736 7305 m --24736 5428 -24341 4026 -23551 3100 c --22761 2173 -21829 1707 -20752 1707 c --19671 1707 -18749 2154 -17991 3039 c --17234 3923 -16853 5278 -16853 7098 c --16853 9102 -17239 10569 -18010 11505 c --18782 12446 -19732 12912 -20865 12912 c --21966 12912 -22888 12460 -23626 11562 c --24365 10663 -24736 9243 -24736 7305 c -@c -F -%CHAR: -4713 0 (s) @t --3843 4370 m --1392 4755 L --1256 3772 -870 3020 -240 2493 c -386 1971 1265 1707 2399 1707 c -3537 1707 4384 1943 4934 2404 c -5485 2869 5762 3415 5762 4036 c -5762 4600 5517 5038 5028 5362 c -4690 5583 3843 5861 2493 6199 c -677 6660 -588 7056 -1289 7394 c --1990 7728 -2526 8194 -2888 8786 c --3250 9379 -3434 10033 -3434 10748 c --3434 11402 -3283 12004 -2982 12559 c --2686 13119 -2277 13579 -1764 13946 c --1378 14229 -851 14473 -188 14671 c -480 14868 1195 14967 1957 14967 c -3104 14967 4111 14798 4981 14468 c -5851 14139 6491 13692 6905 13128 c -7319 12559 7601 11806 7756 10861 C -5334 10527 L -5221 11279 4901 11867 4374 12291 c -3848 12714 3100 12926 2136 12926 c -997 12926 184 12738 -301 12361 c --790 11985 -1035 11543 -1035 11040 c --1035 10715 -931 10428 -729 10169 c --527 9901 -212 9685 221 9506 c -470 9417 1200 9205 2413 8876 c -4168 8405 5390 8024 6082 7723 c -6778 7427 7324 6990 7719 6421 c -8114 5851 8311 5146 8311 4299 c -8311 3471 8067 2695 7587 1961 c -7103 1232 6406 668 5499 268 c -4591 -132 3561 -329 2413 -329 c -508 -329 -941 66 -1938 856 c --2935 1646 -3570 2817 -3843 4370 C -@c -F -%CHAR: 9398 0 (a) @t -20809 1806 m -19887 1025 19003 475 18156 151 c -17305 -169 16392 -329 15419 -329 c -13810 -329 12578 61 11712 847 c -10851 1632 10419 2639 10419 3857 c -10419 4577 10579 5230 10908 5823 c -11232 6416 11660 6891 12187 7248 c -12719 7606 13311 7879 13975 8062 c -14459 8189 15193 8316 16176 8434 c -18180 8674 19657 8956 20602 9290 C -20612 9628 20616 9845 20616 9934 c -20616 10945 20381 11660 19911 12070 c -19280 12634 18335 12912 17088 12912 c -15922 12912 15061 12709 14501 12300 c -13946 11891 13537 11167 13269 10127 C -10847 10461 L -11068 11496 11430 12338 11933 12973 c -12437 13612 13170 14106 14125 14450 c -15080 14793 16185 14967 17446 14967 c -18697 14967 19708 14817 20489 14525 c -21270 14229 21844 13862 22215 13415 c -22582 12968 22836 12408 22987 11726 c -23067 11303 23109 10541 23109 9440 c -23109 6134 l -23109 3824 23161 2366 23269 1759 c -23373 1148 23584 560 23895 0 C -21303 0 L -21049 513 20880 1115 20809 1806 C -@c -20602 7347 m -19699 6976 18349 6665 16552 6406 c -15532 6261 14807 6096 14389 5913 c -13965 5729 13636 5461 13410 5103 c -13180 4751 13062 4360 13062 3928 c -13062 3264 13316 2714 13815 2272 c -14313 1834 15047 1613 16011 1613 c -16966 1613 17818 1820 18561 2239 c -19304 2658 19854 3231 20202 3956 c -20470 4516 20602 5343 20602 6435 c -20602 7347 L -@c -F -%CHAR: 25089 0 (n) @t -26952 0 m -26952 14633 L -29181 14633 L -29181 12554 L -30258 14163 31811 14967 33838 14967 c -34722 14967 35531 14807 36270 14492 c -37013 14172 37563 13758 37930 13241 c -38302 12728 38556 12117 38706 11411 c -38795 10950 38843 10146 38843 8998 c -38843 0 L -36359 0 L -36359 8904 l -36359 9911 36265 10668 36072 11171 c -35879 11670 35536 12070 35047 12366 c -34553 12667 33979 12817 33316 12817 c -32257 12817 31350 12479 30578 11811 c -29811 11138 29430 9868 29430 7992 c -29430 0 L -26952 0 L -@c -F -%CHAR: 40780 0 (d) @t -52135 0 m -52135 1849 L -51208 395 49844 -329 48042 -329 c -46876 -329 45804 -9 44825 635 c -43847 1275 43090 2173 42549 3330 c -42012 4483 41744 5804 41744 7305 c -41744 8763 41989 10089 42473 11279 c -42963 12469 43692 13382 44665 14012 c -45639 14647 46730 14967 47934 14967 c -48814 14967 49599 14779 50286 14407 c -50978 14036 51537 13551 51970 12954 C -51970 20202 L -54435 20202 L -54435 0 L -52135 0 L -@c -44294 7305 m -44294 5428 44689 4026 45479 3100 c -46269 2173 47201 1707 48278 1707 c -49359 1707 50281 2154 51039 3039 c -51796 3923 52177 5278 52177 7098 c -52177 9102 51791 10569 51020 11505 c -50248 12446 49298 12912 48165 12912 c -47064 12912 46142 12460 45404 11562 c -44665 10663 44294 9243 44294 7305 c -@c -F -%CHAR: 56471 0 (b) @t -60620 0 m -58320 0 L -58320 20202 L -60798 20202 L -60798 12996 L -61847 14309 63183 14967 64806 14967 c -65709 14967 66560 14784 67365 14421 c -68169 14059 68828 13547 69350 12893 c -69867 12234 70276 11444 70568 10513 c -70864 9586 71010 8594 71010 7540 c -71010 5028 70389 3090 69147 1722 c -67910 353 66419 -329 64684 -329 c -62957 -329 61603 390 60620 1834 C -60620 0 L -@c -60591 7427 m -60591 5673 60831 4407 61306 3627 c -62087 2347 63146 1707 64477 1707 c -65563 1707 66499 2178 67289 3123 c -68080 4064 68475 5466 68475 7333 c -68475 9243 68094 10654 67336 11562 c -66579 12469 65662 12926 64590 12926 c -63503 12926 62567 12455 61777 11515 c -60987 10574 60591 9210 60591 7427 c -@c -F -%CHAR: 72162 0 (o) @t -73098 7319 m -73098 10028 73851 12037 75360 13340 c -76616 14421 78150 14967 79961 14967 c -81974 14967 83620 14309 84895 12987 c -86174 11670 86809 9849 86809 7526 c -86809 5640 86527 4158 85963 3081 c -85398 1999 84575 1162 83498 564 c -82416 -33 81240 -329 79961 -329 c -77915 -329 76259 325 74994 1642 c -73728 2954 73098 4845 73098 7319 c -@c -75647 7319 m -75647 5442 76057 4040 76875 3109 c -77694 2173 78724 1707 79961 1707 c -81193 1707 82218 2178 83037 3114 c -83851 4050 84260 5480 84260 7399 c -84260 9210 83851 10583 83027 11515 c -82204 12446 81184 12912 79961 12912 c -78724 12912 77694 12446 76875 11519 c -76057 10593 75647 9191 75647 7319 c -@c -F -%CHAR: 87853 0 (x) @t -88060 0 m -93408 7606 L -88460 14633 L -91559 14633 L -93808 11204 l -94226 10550 94570 10005 94824 9563 C -95228 10169 95600 10706 95943 11176 c -98408 14633 L -101371 14633 L -96315 7742 L -101757 0 L -98714 0 L -95708 4548 L -94909 5776 L -91066 0 L -88060 0 L -@c -F -T -@rax 288.28772 623.01657 319.98444 638.33244 @E -[0.00028346 0.00000000 0.00000000 0.00028346 304.29551643 632.60586662] @tm - 0 O 0 @g -0.00 0.00 0.00 1.00 k -e - -% FontChange:/_ArialCE 28222.00000 z -%CHAR: -44703 0 (U) @t --29270 20202 m --26594 20202 L --26594 8528 l --26594 6500 -26824 4887 -27285 3692 c --27746 2498 -28574 1529 -29774 781 c --30973 28 -32544 -343 -34491 -343 c --36382 -343 -37934 -19 -39134 635 c --40338 1284 -41199 2230 -41711 3467 c --42229 4704 -42483 6388 -42483 8528 c --42483 20202 L --39811 20202 L --39811 8542 l --39811 6787 -39647 5494 -39322 4666 c --38997 3833 -38433 3194 -37643 2742 c --36848 2291 -35874 2065 -34727 2065 c --32760 2065 -31359 2512 -30521 3405 c --29689 4294 -29270 6007 -29270 8542 c --29270 20202 L -@c -F -%CHAR: -24327 0 (p) @t --22464 -5607 m --22464 14633 L --20207 14633 L --20207 12733 L --19675 13476 -19073 14036 -18400 14407 c --17732 14779 -16919 14967 -15964 14967 c --14713 14967 -13612 14643 -12657 14003 c --11698 13358 -10978 12451 -10494 11279 c --10004 10108 -9760 8824 -9760 7427 c --9760 5931 -10028 4581 -10569 3382 c --11105 2183 -11886 1265 -12911 626 c --13937 -9 -15014 -329 -16143 -329 c --16970 -329 -17709 -155 -18367 193 c --19026 541 -19562 983 -19986 1515 C --19986 -5607 L --22464 -5607 L -@c --20221 7234 m --20221 5353 -19840 3960 -19078 3057 c --18316 2159 -17389 1707 -16307 1707 c --15207 1707 -14261 2173 -13476 3109 c --12690 4040 -12295 5484 -12295 7441 c --12295 9309 -12681 10701 -13447 11632 c --14214 12559 -15131 13024 -16194 13024 c --17253 13024 -18189 12531 -19002 11543 c --19816 10555 -20221 9116 -20221 7234 c -@c -F -%CHAR: -8636 0 (l) @t --6830 0 m --6830 20202 L --4351 20202 L --4351 0 L --6830 0 L -@c -F -%CHAR: -2371 0 (o) @t --1435 7319 m --1435 10028 -682 12037 827 13340 c -2083 14421 3617 14967 5428 14967 c -7441 14967 9087 14309 10362 12987 c -11641 11670 12276 9849 12276 7526 c -12276 5640 11994 4158 11430 3081 c -10865 1999 10042 1162 8965 564 c -7883 -33 6707 -329 5428 -329 c -3382 -329 1726 325 461 1642 c --805 2954 -1435 4845 -1435 7319 c -@c -1114 7319 m -1114 5442 1524 4040 2342 3109 c -3161 2173 4191 1707 5428 1707 c -6660 1707 7685 2178 8504 3114 c -9318 4050 9727 5480 9727 7399 c -9727 9210 9318 10583 8494 11515 c -7671 12446 6651 12912 5428 12912 c -4191 12912 3161 12446 2342 11519 c -1524 10593 1114 9191 1114 7319 c -@c -F -%CHAR: 13320 0 (a) @t -24731 1806 m -23809 1025 22925 475 22078 151 c -21227 -169 20314 -329 19341 -329 c -17732 -329 16500 61 15634 847 c -14773 1632 14341 2639 14341 3857 c -14341 4577 14501 5230 14830 5823 c -15154 6416 15582 6891 16109 7248 c -16641 7606 17233 7879 17897 8062 c -18381 8189 19115 8316 20098 8434 c -22102 8674 23579 8956 24524 9290 C -24534 9628 24538 9845 24538 9934 c -24538 10945 24303 11660 23833 12070 c -23202 12634 22257 12912 21010 12912 c -19844 12912 18983 12709 18423 12300 c -17868 11891 17459 11167 17191 10127 C -14769 10461 L -14990 11496 15352 12338 15855 12973 c -16359 13612 17092 14106 18047 14450 c -19002 14793 20107 14967 21368 14967 c -22619 14967 23630 14817 24411 14525 c -25192 14229 25766 13862 26137 13415 c -26504 12968 26758 12408 26909 11726 c -26989 11303 27031 10541 27031 9440 c -27031 6134 l -27031 3824 27083 2366 27191 1759 c -27295 1148 27506 560 27817 0 C -25225 0 L -24971 513 24802 1115 24731 1806 C -@c -24524 7347 m -23621 6976 22271 6665 20474 6406 c -19454 6261 18729 6096 18311 5913 c -17887 5729 17558 5461 17332 5103 c -17102 4751 16984 4360 16984 3928 c -16984 3264 17238 2714 17737 2272 c -18235 1834 18969 1613 19933 1613 c -20888 1613 21740 1820 22483 2239 c -23226 2658 23776 3231 24124 3956 c -24392 4516 24524 5343 24524 6435 c -24524 7347 L -@c -F -%CHAR: 29011 0 (d) @t -40366 0 m -40366 1849 L -39439 395 38075 -329 36273 -329 c -35107 -329 34035 -9 33056 635 c -32078 1275 31321 2173 30780 3330 c -30243 4483 29975 5804 29975 7305 c -29975 8763 30220 10089 30704 11279 c -31194 12469 31923 13382 32896 14012 c -33870 14647 34961 14967 36165 14967 c -37045 14967 37830 14779 38517 14407 c -39209 14036 39768 13551 40201 12954 C -40201 20202 L -42666 20202 L -42666 0 L -40366 0 L -@c -32525 7305 m -32525 5428 32920 4026 33710 3100 c -34500 2173 35432 1707 36509 1707 c -37590 1707 38512 2154 39270 3039 c -40027 3923 40408 5278 40408 7098 c -40408 9102 40022 10569 39251 11505 c -38479 12446 37529 12912 36396 12912 c -35295 12912 34373 12460 33635 11562 c -32896 10663 32525 9243 32525 7305 c -@c -F -%CHAR: -56472 -28222 (L) @t --54407 -28222 m --54407 -8020 L --51731 -8020 L --51731 -25837 L --41782 -25837 L --41782 -28222 L --54407 -28222 L -@c -F -%CHAR: -40781 -28222 (B) @t --38716 -28222 m --38716 -8020 L --31134 -8020 l --29591 -8020 -28354 -8227 -27423 -8631 c --26487 -9040 -25757 -9671 -25231 -10522 c --24704 -11369 -24436 -12258 -24436 -13189 c --24436 -14050 -24671 -14864 -25141 -15626 c --25607 -16388 -26317 -17004 -27263 -17474 C --26040 -17832 -25104 -18443 -24445 -19304 c --23787 -20169 -23457 -21190 -23457 -22366 c --23457 -23311 -23660 -24191 -24059 -25005 c --24459 -25818 -24953 -26444 -25541 -26886 c --26129 -27328 -26868 -27658 -27752 -27883 c --28636 -28109 -29723 -28222 -31011 -28222 c --38716 -28222 L -@c --36040 -16510 m --31670 -16510 l --30489 -16510 -29638 -16430 -29121 -16275 c --28443 -16072 -27931 -15738 -27587 -15268 c --27244 -14798 -27070 -14210 -27070 -13504 c --27070 -12836 -27230 -12244 -27550 -11736 c --27874 -11223 -28335 -10875 -28928 -10687 c --29525 -10499 -30551 -10405 -32004 -10405 c --36040 -10405 L --36040 -16510 L -@c --36040 -25837 m --31011 -25837 l --30146 -25837 -29539 -25804 -29191 -25743 c --28575 -25630 -28062 -25447 -27648 -25188 c --27234 -24934 -26896 -24558 -26628 -24069 c --26364 -23575 -26228 -23010 -26228 -22366 c --26228 -21613 -26421 -20960 -26806 -20400 c --27192 -19845 -27728 -19454 -28415 -19229 c --29097 -19008 -30085 -18895 -31369 -18895 c --36040 -18895 L --36040 -25837 L -@c -F -%CHAR: -14111 -28222 (d) @t --2756 -28222 m --2756 -26373 L --3683 -27827 -5047 -28551 -6849 -28551 c --8015 -28551 -9087 -28231 -10066 -27587 c --11044 -26947 -11801 -26049 -12342 -24892 c --12879 -23739 -13147 -22418 -13147 -20917 c --13147 -19459 -12902 -18133 -12418 -16943 c --11928 -15753 -11199 -14840 -10226 -14210 c --9252 -13575 -8161 -13255 -6957 -13255 c --6077 -13255 -5292 -13443 -4605 -13815 c --3913 -14186 -3354 -14671 -2921 -15268 C --2921 -8020 L --456 -8020 L --456 -28222 L --2756 -28222 L -@c --10597 -20917 m --10597 -22794 -10202 -24196 -9412 -25122 c --8622 -26049 -7690 -26515 -6613 -26515 c --5532 -26515 -4610 -26068 -3852 -25183 c --3095 -24299 -2714 -22944 -2714 -21124 c --2714 -19120 -3100 -17653 -3871 -16717 c --4643 -15776 -5593 -15310 -6726 -15310 c --7827 -15310 -8749 -15762 -9487 -16660 c --10226 -17559 -10597 -18979 -10597 -20917 c -@c -F -%CHAR: 1580 -28222 (u) @t -13033 -28222 m -13033 -26072 L -11890 -27728 10343 -28551 8386 -28551 c -7525 -28551 6716 -28387 5969 -28057 c -5221 -27728 4666 -27309 4303 -26811 c -3937 -26308 3683 -25696 3537 -24972 c -3438 -24483 3386 -23711 3386 -22653 c -3386 -13589 L -5865 -13589 L -5865 -21703 l -5865 -23001 5917 -23871 6016 -24323 c -6175 -24976 6505 -25484 7008 -25861 c -7516 -26232 8142 -26416 8885 -26416 c -9628 -26416 10324 -26228 10978 -25847 c -11632 -25466 12093 -24944 12361 -24290 c -12634 -23631 12770 -22676 12770 -21430 c -12770 -13589 L -15249 -13589 L -15249 -28222 L -13033 -28222 L -@c -F -%CHAR: 17271 -28222 (m) @t -19134 -28222 m -19134 -13589 L -21349 -13589 L -21349 -15640 L -21810 -14925 22422 -14346 23184 -13913 c -23946 -13476 24816 -13255 25789 -13255 c -26871 -13255 27760 -13481 28452 -13932 c -29148 -14384 29637 -15009 29919 -15818 C -31081 -14111 32586 -13255 34439 -13255 c -35893 -13255 37008 -13659 37788 -14464 c -38569 -15268 38960 -16505 38960 -18175 c -38960 -28222 L -36495 -28222 L -36495 -19003 l -36495 -18010 36415 -17295 36255 -16858 c -36090 -16425 35799 -16072 35380 -15804 c -34957 -15541 34458 -15405 33889 -15405 c -32859 -15405 32008 -15748 31326 -16435 c -30648 -17117 30305 -18213 30305 -19718 c -30305 -28222 L -27826 -28222 L -27826 -18716 l -27826 -17611 27624 -16783 27219 -16232 c -26815 -15682 26156 -15405 25234 -15405 c -24538 -15405 23894 -15588 23301 -15960 c -22708 -16326 22276 -16863 22012 -17568 c -21744 -18278 21612 -19299 21612 -20630 c -21612 -28222 L -19134 -28222 L -@c -F -%CHAR: 40780 -28222 (p) @t -42643 -33829 m -42643 -13589 L -44900 -13589 L -44900 -15489 L -45432 -14746 46034 -14186 46707 -13815 c -47375 -13443 48188 -13255 49143 -13255 c -50394 -13255 51495 -13579 52450 -14219 c -53409 -14864 54129 -15771 54613 -16943 c -55103 -18114 55347 -19398 55347 -20795 c -55347 -22291 55079 -23641 54538 -24840 c -54002 -26039 53221 -26957 52196 -27596 c -51170 -28231 50093 -28551 48964 -28551 c -48137 -28551 47398 -28377 46740 -28029 c -46081 -27681 45545 -27239 45121 -26707 C -45121 -33829 L -42643 -33829 L -@c -44886 -20988 m -44886 -22869 45267 -24262 46029 -25165 c -46791 -26063 47718 -26515 48800 -26515 c -49900 -26515 50846 -26049 51631 -25113 c -52417 -24182 52812 -22738 52812 -20781 c -52812 -18913 52426 -17521 51660 -16590 c -50893 -15663 49976 -15198 48913 -15198 c -47854 -15198 46918 -15691 46105 -16679 c -45291 -17667 44886 -19106 44886 -20988 c -@c -F -T -@rax 301.07367 694.47288 330.96643 709.88343 @E -[0.00028346 0.00000000 0.00000000 0.00028346 315.96546876 704.15685613] @tm - 0 O 0 @g -0.00 0.00 0.00 1.00 k -e - -% FontChange:/_ArialCE 28222.00000 z -%CHAR: -52535 0 (R) @t --50315 0 m --50315 20202 L --41359 20202 l --39558 20202 -38189 20019 -37253 19657 c --36317 19294 -35569 18655 -35004 17738 c --34445 16816 -34167 15800 -34167 14690 c --34167 13255 -34628 12051 -35559 11068 c --36486 10085 -37921 9459 -39859 9191 C --39148 8852 -38612 8518 -38245 8184 c --37464 7469 -36726 6571 -36025 5499 c --32511 0 L --35875 0 L --38546 4205 l --39327 5414 -39972 6345 -40480 6985 c --40983 7629 -41434 8081 -41834 8335 c --42234 8594 -42638 8772 -43052 8876 c --43358 8937 -43852 8970 -44543 8970 c --47643 8970 L --47643 0 L --50315 0 L -@c --47643 11284 m --41895 11284 l --40677 11284 -39718 11411 -39031 11665 c --38339 11919 -37817 12324 -37460 12879 c --37102 13434 -36924 14036 -36924 14690 c --36924 15644 -37267 16430 -37963 17046 c --38654 17662 -39750 17968 -41251 17968 c --47643 17968 L --47643 11284 L -@c -F -%CHAR: -32159 0 (e) @t --20282 4713 m --17719 4398 L --18123 2897 -18871 1736 -19962 908 c --21058 85 -22455 -329 -24153 -329 c --26294 -329 -27992 329 -29243 1646 c --30499 2963 -31124 4812 -31124 7192 c --31124 9657 -30489 11566 -29224 12926 c --27954 14285 -26312 14967 -24290 14967 c --22333 14967 -20734 14299 -19497 12968 c --18255 11637 -17634 9760 -17634 7347 c --17634 7197 -17639 6976 -17648 6684 C --28561 6684 L --28471 5075 -28015 3843 -27197 2992 c --26378 2135 -25362 1707 -24139 1707 c --23231 1707 -22455 1947 -21811 2427 c --21167 2902 -20659 3664 -20282 4713 C -@c --28424 8725 m --20254 8725 L --20362 9953 -20677 10880 -21190 11491 c --21980 12446 -23006 12926 -24262 12926 c --25400 12926 -26359 12545 -27135 11783 c --27912 11021 -28340 10000 -28424 8725 C -@c -F -%CHAR: -16468 0 (g) @t --15062 -1214 m --12649 -1571 L --12550 -2314 -12268 -2855 -11811 -3198 c --11195 -3655 -10353 -3885 -9290 -3885 c --8138 -3885 -7254 -3655 -6628 -3198 c --6002 -2738 -5584 -2093 -5363 -1270 c --5231 -762 -5174 296 -5184 1914 C --6266 640 -7616 0 -9234 0 c --11247 0 -12804 724 -13905 2178 c --15005 3627 -15560 5372 -15560 7399 c --15560 8796 -15306 10085 -14803 11265 c --14295 12446 -13561 13358 -12602 14003 c --11642 14643 -10513 14967 -9220 14967 c --7493 14967 -6068 14266 -4949 12869 C --4949 14633 L --2658 14633 L --2658 1985 l --2658 -292 -2893 -1910 -3354 -2860 c --3820 -3810 -4554 -4563 -5560 -5113 c --6567 -5663 -7804 -5941 -9276 -5941 c --11021 -5941 -12432 -5546 -13505 -4760 c --14582 -3975 -15099 -2794 -15062 -1214 C -@c --13011 7578 m --13011 5659 -12630 4257 -11863 3377 c --11101 2493 -10146 2056 -8999 2056 c --7860 2056 -6905 2493 -6134 3368 c --5363 4247 -4977 5621 -4977 7498 c --4977 9290 -5372 10640 -6167 11548 c --6962 12455 -7921 12912 -9041 12912 c --10142 12912 -11078 12465 -11854 11566 c --12625 10673 -13011 9341 -13011 7578 c -@c -F -%CHAR: -777 0 (i) @t -1095 17347 m -1095 20202 L -3579 20202 L -3579 17347 L -1095 17347 L -@c -1095 0 m -1095 14633 L -3579 14633 L -3579 0 L -1095 0 L -@c -F -%CHAR: 5488 0 (s) @t -6358 4370 m -8809 4755 L -8945 3772 9331 3020 9961 2493 c -10587 1971 11466 1707 12600 1707 c -13738 1707 14585 1943 15135 2404 c -15686 2869 15963 3415 15963 4036 c -15963 4600 15718 5038 15229 5362 c -14891 5583 14044 5861 12694 6199 c -10878 6660 9613 7056 8912 7394 c -8211 7728 7675 8194 7313 8786 c -6951 9379 6767 10033 6767 10748 c -6767 11402 6918 12004 7219 12559 c -7515 13119 7924 13579 8437 13946 c -8823 14229 9350 14473 10013 14671 c -10681 14868 11396 14967 12158 14967 c -13305 14967 14312 14798 15182 14468 c -16052 14139 16692 13692 17106 13128 c -17520 12559 17802 11806 17957 10861 C -15535 10527 L -15422 11279 15102 11867 14575 12291 c -14049 12714 13301 12926 12337 12926 c -11198 12926 10385 12738 9900 12361 c -9411 11985 9166 11543 9166 11040 c -9166 10715 9270 10428 9472 10169 c -9674 9901 9989 9685 10422 9506 c -10671 9417 11401 9205 12614 8876 c -14369 8405 15591 8024 16283 7723 c -16979 7427 17525 6990 17920 6421 c -18315 5851 18512 5146 18512 4299 c -18512 3471 18268 2695 17788 1961 c -17304 1232 16607 668 15700 268 c -14792 -132 13762 -329 12614 -329 c -10709 -329 9260 66 8263 856 c -7266 1646 6631 2817 6358 4370 C -@c -F -%CHAR: 19599 0 (t) @t -26876 2220 m -27233 28 L -26537 -118 25911 -193 25361 -193 c -24458 -193 23762 -52 23263 235 c -22769 517 22421 894 22219 1359 c -22017 1820 21913 2799 21913 4285 c -21913 12705 L -20093 12705 L -20093 14633 L -21913 14633 L -21913 18260 L -24383 19746 L -24383 14633 L -26876 14633 L -26876 12705 L -24383 12705 L -24383 4149 l -24383 3438 24425 2987 24510 2785 c -24599 2582 24740 2422 24938 2300 c -25135 2183 25417 2121 25784 2121 c -26062 2121 26424 2154 26876 2220 C -@c -F -%CHAR: 27445 0 (e) @t -39322 4713 m -41885 4398 L -41481 2897 40733 1736 39642 908 c -38546 85 37149 -329 35451 -329 c -33310 -329 31612 329 30361 1646 c -29105 2963 28480 4812 28480 7192 c -28480 9657 29115 11566 30380 12926 c -31650 14285 33292 14967 35314 14967 c -37271 14967 38870 14299 40107 12968 c -41349 11637 41970 9760 41970 7347 c -41970 7197 41965 6976 41956 6684 C -31043 6684 L -31133 5075 31589 3843 32407 2992 c -33226 2135 34242 1707 35465 1707 c -36373 1707 37149 1947 37793 2427 c -38437 2902 38945 3664 39322 4713 C -@c -31180 8725 m -39350 8725 L -39242 9953 38927 10880 38414 11491 c -37624 12446 36598 12926 35342 12926 c -34204 12926 33245 12545 32469 11783 c -31692 11021 31264 10000 31180 8725 C -@c -F -%CHAR: 43136 0 (r) @t -44970 0 m -44970 14633 L -47200 14633 L -47200 12418 L -47769 13452 48296 14139 48780 14468 c -49260 14798 49792 14967 50370 14967 c -51207 14967 52054 14699 52920 14167 C -52064 11863 L -51461 12225 50855 12404 50248 12404 c -49702 12404 49218 12239 48785 11914 c -48352 11585 48047 11134 47863 10555 c -47586 9675 47449 8711 47449 7662 c -47449 0 L -44970 0 L -@c -F -%CHAR: -14901 -28222 (j) @t --13052 -10898 m --13052 -8020 L --10574 -8020 L --10574 -10898 L --13052 -10898 L -@c --16195 -33899 m --15729 -31792 L --15230 -31919 -14840 -31985 -14558 -31985 c --14050 -31985 -13673 -31816 -13429 -31482 c --13179 -31148 -13052 -30306 -13052 -28965 c --13052 -13589 L --10574 -13589 L --10574 -29022 l --10574 -30823 -10809 -32074 -11274 -32785 c --11872 -33702 -12864 -34163 -14252 -34163 c --14925 -34163 -15574 -34073 -16195 -33899 C -@c -F -%CHAR: -8636 -28222 (o) @t --7700 -20903 m --7700 -18194 -6947 -16185 -5438 -14882 c --4182 -13801 -2648 -13255 -837 -13255 c -1176 -13255 2822 -13913 4097 -15235 c -5376 -16552 6011 -18373 6011 -20696 c -6011 -22582 5729 -24064 5165 -25141 c -4600 -26223 3777 -27060 2700 -27658 c -1618 -28255 442 -28551 -837 -28551 c --2883 -28551 -4539 -27897 -5804 -26580 c --7070 -25268 -7700 -23377 -7700 -20903 c -@c --5151 -20903 m --5151 -22780 -4741 -24182 -3923 -25113 c --3104 -26049 -2074 -26515 -837 -26515 c -395 -26515 1420 -26044 2239 -25108 c -3053 -24172 3462 -22742 3462 -20823 c -3462 -19012 3053 -17639 2229 -16707 c -1406 -15776 386 -15310 -837 -15310 c --2074 -15310 -3104 -15776 -3923 -16703 c --4741 -17629 -5151 -19031 -5151 -20903 c -@c -F -%CHAR: 7055 -28222 (b) @t -11204 -28222 m -8904 -28222 L -8904 -8020 L -11382 -8020 L -11382 -15226 L -12431 -13913 13767 -13255 15390 -13255 c -16293 -13255 17144 -13438 17949 -13801 c -18753 -14163 19412 -14675 19934 -15329 c -20451 -15988 20860 -16778 21152 -17709 c -21448 -18636 21594 -19628 21594 -20682 c -21594 -23194 20973 -25132 19731 -26500 c -18494 -27869 17003 -28551 15268 -28551 c -13541 -28551 12187 -27832 11204 -26388 C -11204 -28222 L -@c -11175 -20795 m -11175 -22549 11415 -23815 11890 -24595 c -12671 -25875 13730 -26515 15061 -26515 c -16147 -26515 17083 -26044 17873 -25099 c -18664 -24158 19059 -22756 19059 -20889 c -19059 -18979 18678 -17568 17920 -16660 c -17163 -15753 16246 -15296 15174 -15296 c -14087 -15296 13151 -15767 12361 -16707 c -11571 -17648 11175 -19012 11175 -20795 c -@c -F -T -@rax 276.08173 768.25644 307.78639 783.66699 @E -[0.00028346 0.00000000 0.00000000 0.00028346 292.10540664 777.94041249] @tm - 0 O 0 @g -0.00 0.00 0.00 1.00 k -e - -% FontChange:/_ArialCE 28222.00000 z -%CHAR: -56486 0 (A) @t --56528 0 m --48767 20202 L --45889 20202 L --37620 0 L --40668 0 L --43024 6119 L --51472 6119 L --53687 0 L --56528 0 L -@c --50700 8297 m --43847 8297 L --45959 13890 l --46599 15588 -47079 16985 -47389 18081 C --47648 16783 -48010 15499 -48480 14219 c --50700 8297 L -@c -F -%CHAR: -37662 0 (n) @t --35799 0 m --35799 14633 L --33570 14633 L --33570 12554 L --32493 14163 -30940 14967 -28913 14967 c --28029 14967 -27220 14807 -26481 14492 c --25738 14172 -25188 13758 -24821 13241 c --24449 12728 -24195 12117 -24045 11411 c --23956 10950 -23908 10146 -23908 8998 c --23908 0 L --26392 0 L --26392 8904 l --26392 9911 -26486 10668 -26679 11171 c --26872 11670 -27215 12070 -27704 12366 c --28198 12667 -28772 12817 -29435 12817 c --30494 12817 -31401 12479 -32173 11811 c --32940 11138 -33321 9868 -33321 7992 c --33321 0 L --35799 0 L -@c -F -%CHAR: -21971 0 (n) @t --20108 0 m --20108 14633 L --17879 14633 L --17879 12554 L --16802 14163 -15249 14967 -13222 14967 c --12338 14967 -11529 14807 -10790 14492 c --10047 14172 -9497 13758 -9130 13241 c --8758 12728 -8504 12117 -8354 11411 c --8265 10950 -8217 10146 -8217 8998 c --8217 0 L --10701 0 L --10701 8904 l --10701 9911 -10795 10668 -10988 11171 c --11181 11670 -11524 12070 -12013 12366 c --12507 12667 -13081 12817 -13744 12817 c --14803 12817 -15710 12479 -16482 11811 c --17249 11138 -17630 9868 -17630 7992 c --17630 0 L --20108 0 L -@c -F -%CHAR: -6280 0 (o) @t --5344 7319 m --5344 10028 -4591 12037 -3082 13340 c --1826 14421 -292 14967 1519 14967 c -3532 14967 5178 14309 6453 12987 c -7732 11670 8367 9849 8367 7526 c -8367 5640 8085 4158 7521 3081 c -6956 1999 6133 1162 5056 564 c -3974 -33 2798 -329 1519 -329 c --527 -329 -2183 325 -3448 1642 c --4714 2954 -5344 4845 -5344 7319 c -@c --2795 7319 m --2795 5442 -2385 4040 -1567 3109 c --748 2173 282 1707 1519 1707 c -2751 1707 3776 2178 4595 3114 c -5409 4050 5818 5480 5818 7399 c -5818 9210 5409 10583 4585 11515 c -3762 12446 2742 12912 1519 12912 c -282 12912 -748 12446 -1567 11519 c --2385 10593 -2795 9191 -2795 7319 c -@c -F -%CHAR: 9411 0 (t) @t -16688 2220 m -17045 28 L -16349 -118 15723 -193 15173 -193 c -14270 -193 13574 -52 13075 235 c -12581 517 12233 894 12031 1359 c -11829 1820 11725 2799 11725 4285 c -11725 12705 L -9905 12705 L -9905 14633 L -11725 14633 L -11725 18260 L -14195 19746 L -14195 14633 L -16688 14633 L -16688 12705 L -14195 12705 L -14195 4149 l -14195 3438 14237 2987 14322 2785 c -14411 2582 14552 2422 14750 2300 c -14947 2183 15229 2121 15596 2121 c -15874 2121 16236 2154 16688 2220 C -@c -F -%CHAR: 17257 0 (a) @t -28668 1806 m -27746 1025 26862 475 26015 151 c -25164 -169 24251 -329 23278 -329 c -21669 -329 20437 61 19571 847 c -18710 1632 18278 2639 18278 3857 c -18278 4577 18438 5230 18767 5823 c -19091 6416 19519 6891 20046 7248 c -20578 7606 21170 7879 21834 8062 c -22318 8189 23052 8316 24035 8434 c -26039 8674 27516 8956 28461 9290 C -28471 9628 28475 9845 28475 9934 c -28475 10945 28240 11660 27770 12070 c -27139 12634 26194 12912 24947 12912 c -23781 12912 22920 12709 22360 12300 c -21805 11891 21396 11167 21128 10127 C -18706 10461 L -18927 11496 19289 12338 19792 12973 c -20296 13612 21029 14106 21984 14450 c -22939 14793 24044 14967 25305 14967 c -26556 14967 27567 14817 28348 14525 c -29129 14229 29703 13862 30074 13415 c -30441 12968 30695 12408 30846 11726 c -30926 11303 30968 10541 30968 9440 c -30968 6134 l -30968 3824 31020 2366 31128 1759 c -31232 1148 31443 560 31754 0 C -29162 0 L -28908 513 28739 1115 28668 1806 C -@c -28461 7347 m -27558 6976 26208 6665 24411 6406 c -23391 6261 22666 6096 22248 5913 c -21824 5729 21495 5461 21269 5103 c -21039 4751 20921 4360 20921 3928 c -20921 3264 21175 2714 21674 2272 c -22172 1834 22906 1613 23870 1613 c -24825 1613 25677 1820 26420 2239 c -27163 2658 27713 3231 28061 3956 c -28329 4516 28461 5343 28461 6435 c -28461 7347 L -@c -F -%CHAR: 32948 0 (t) @t -40225 2220 m -40582 28 L -39886 -118 39260 -193 38710 -193 c -37807 -193 37111 -52 36612 235 c -36118 517 35770 894 35568 1359 c -35366 1820 35262 2799 35262 4285 c -35262 12705 L -33442 12705 L -33442 14633 L -35262 14633 L -35262 18260 L -37732 19746 L -37732 14633 L -40225 14633 L -40225 12705 L -37732 12705 L -37732 4149 l -37732 3438 37774 2987 37859 2785 c -37948 2582 38089 2422 38287 2300 c -38484 2183 38766 2121 39133 2121 c -39411 2121 39773 2154 40225 2220 C -@c -F -%CHAR: 40794 0 (e) @t -52671 4713 m -55234 4398 L -54830 2897 54082 1736 52991 908 c -51895 85 50498 -329 48800 -329 c -46659 -329 44961 329 43710 1646 c -42454 2963 41829 4812 41829 7192 c -41829 9657 42464 11566 43729 12926 c -44999 14285 46641 14967 48663 14967 c -50620 14967 52219 14299 53456 12968 c -54698 11637 55319 9760 55319 7347 c -55319 7197 55314 6976 55305 6684 C -44392 6684 L -44482 5075 44938 3843 45756 2992 c -46575 2135 47591 1707 48814 1707 c -49722 1707 50498 1947 51142 2427 c -51786 2902 52294 3664 52671 4713 C -@c -44529 8725 m -52699 8725 L -52591 9953 52276 10880 51763 11491 c -50973 12446 49947 12926 48691 12926 c -47553 12926 46594 12545 45818 11783 c -45041 11021 44613 10000 44529 8725 C -@c -F -%CHAR: -18824 -28222 (j) @t --16975 -10898 m --16975 -8020 L --14497 -8020 L --14497 -10898 L --16975 -10898 L -@c --20118 -33899 m --19652 -31792 L --19153 -31919 -18763 -31985 -18481 -31985 c --17973 -31985 -17596 -31816 -17352 -31482 c --17102 -31148 -16975 -30306 -16975 -28965 c --16975 -13589 L --14497 -13589 L --14497 -29022 l --14497 -30823 -14732 -32074 -15197 -32785 c --15795 -33702 -16787 -34163 -18175 -34163 c --18848 -34163 -19497 -34073 -20118 -33899 C -@c -F -%CHAR: -12559 -28222 (o) @t --11623 -20903 m --11623 -18194 -10870 -16185 -9361 -14882 c --8105 -13801 -6571 -13255 -4760 -13255 c --2747 -13255 -1101 -13913 174 -15235 c -1453 -16552 2088 -18373 2088 -20696 c -2088 -22582 1806 -24064 1242 -25141 c -677 -26223 -146 -27060 -1223 -27658 c --2305 -28255 -3481 -28551 -4760 -28551 c --6806 -28551 -8462 -27897 -9727 -26580 c --10993 -25268 -11623 -23377 -11623 -20903 c -@c --9074 -20903 m --9074 -22780 -8664 -24182 -7846 -25113 c --7027 -26049 -5997 -26515 -4760 -26515 c --3528 -26515 -2503 -26044 -1684 -25108 c --870 -24172 -461 -22742 -461 -20823 c --461 -19012 -870 -17639 -1694 -16707 c --2517 -15776 -3537 -15310 -4760 -15310 c --5997 -15310 -7027 -15776 -7846 -16703 c --8664 -17629 -9074 -19031 -9074 -20903 c -@c -F -%CHAR: 3132 -28222 (b) @t -7281 -28222 m -4981 -28222 L -4981 -8020 L -7459 -8020 L -7459 -15226 L -8508 -13913 9844 -13255 11467 -13255 c -12370 -13255 13221 -13438 14026 -13801 c -14830 -14163 15489 -14675 16011 -15329 c -16528 -15988 16937 -16778 17229 -17709 c -17525 -18636 17671 -19628 17671 -20682 c -17671 -23194 17050 -25132 15808 -26500 c -14571 -27869 13080 -28551 11345 -28551 c -9618 -28551 8264 -27832 7281 -26388 C -7281 -28222 L -@c -7252 -20795 m -7252 -22549 7492 -23815 7967 -24595 c -8748 -25875 9807 -26515 11138 -26515 c -12224 -26515 13160 -26044 13950 -25099 c -14741 -24158 15136 -22756 15136 -20889 c -15136 -18979 14755 -17568 13997 -16660 c -13240 -15753 12323 -15296 11251 -15296 c -10164 -15296 9228 -15767 8438 -16707 c -7648 -17648 7252 -19012 7252 -20795 c -@c -F -T -@rax 382.65676 594.39770 431.53370 611.79449 @E -[0.00028346 0.00000000 0.00000000 0.00028346 407.30200085 604.51452907] @tm - 0 O 0 @g -0.00 0.00 0.00 1.00 k -e - -% FontChange:/_ArialCE 35278.00000 z -%CHAR: -86943 0 (J) @t --85926 7167 m --82910 7579 L --82833 5650 -82469 4327 -81828 3616 c --81181 2905 -80293 2552 -79158 2552 c --78318 2552 -77594 2740 -76989 3128 c --76377 3510 -75960 4033 -75730 4692 c --75501 5356 -75384 6409 -75384 7855 c --75384 25253 L --72044 25253 L --72044 8043 l --72044 5933 -72297 4292 -72808 3134 c --73320 1976 -74131 1094 -75237 482 c --76348 -123 -77647 -429 -79141 -429 c --81357 -429 -83051 206 -84232 1482 c --85408 2758 -85973 4651 -85926 7167 C -@c -F -%CHAR: -69304 0 (P) @t --66582 0 m --66582 25253 L --57057 25253 l --55381 25253 -54099 25171 -53217 25012 c --51977 24806 -50936 24412 -50095 23830 c --49260 23254 -48584 22437 -48073 21396 c --47561 20350 -47308 19203 -47308 17951 c --47308 15805 -47990 13982 -49354 12494 c --50724 11013 -53194 10266 -56763 10266 c --63242 10266 L --63242 0 L --66582 0 L -@c --63242 13247 m --56710 13247 l --54552 13247 -53017 13647 -52112 14452 c --51206 15258 -50754 16387 -50754 17845 c --50754 18903 -51018 19809 -51553 20561 c --52088 21314 -52788 21808 -53664 22049 c --54229 22196 -55263 22272 -56780 22272 c --63242 22272 L --63242 13247 L -@c -F -%CHAR: -36602 0 (S) @t --35014 8114 m --31863 8390 L --31716 7126 -31369 6091 -30822 5280 c --30275 4469 -29429 3816 -28282 3316 c --27136 2816 -25842 2569 -24408 2569 c --23132 2569 -22009 2758 -21033 3134 c --20057 3516 -19328 4033 -18851 4692 c --18375 5356 -18134 6074 -18134 6856 c --18134 7649 -18363 8337 -18828 8931 c --19286 9525 -20045 10019 -21097 10419 c --21779 10683 -23273 11095 -25595 11653 c --27912 12212 -29541 12735 -30470 13229 c --31675 13858 -32574 14646 -33168 15581 c --33756 16516 -34050 17563 -34050 18727 c --34050 19997 -33692 21190 -32968 22296 c --32245 23407 -31187 24248 -29799 24824 c --28406 25394 -26865 25682 -25166 25682 c --23290 25682 -21644 25383 -20209 24777 c --18781 24177 -17681 23289 -16911 22119 c --16147 20949 -15729 19620 -15670 18139 C --18875 17898 L --19051 19491 -19633 20702 -20627 21514 c --21621 22331 -23085 22737 -25025 22737 c --27048 22737 -28517 22366 -29446 21625 c --30370 20885 -30834 19991 -30834 18950 c --30834 18039 -30505 17292 -29852 16710 c --29205 16122 -27530 15522 -24813 14911 c --22097 14293 -20233 13758 -19222 13300 c --17752 12618 -16664 11759 -15964 10725 c --15265 9684 -14918 8484 -14918 7132 c --14918 5786 -15300 4521 -16070 3334 c --16840 2146 -17946 1223 -19386 559 c --20827 -100 -22450 -429 -24249 -429 c --26536 -429 -28453 -100 -29993 570 c --31540 1235 -32751 2234 -33633 3575 c --34509 4910 -34973 6426 -35014 8114 C -@c -F -%CHAR: -13072 0 (t) @t --3976 2775 m --3529 35 L --4399 -147 -5181 -241 -5869 -241 c --6998 -241 -7868 -65 -8492 294 c --9109 647 -9544 1117 -9797 1699 c --10050 2275 -10179 3498 -10179 5356 c --10179 15881 L --12455 15881 L --12455 18292 L --10179 18292 L --10179 22825 L --7092 24683 L --7092 18292 L --3976 18292 L --3976 15881 L --7092 15881 L --7092 5186 l --7092 4298 -7039 3734 -6934 3481 c --6822 3228 -6646 3028 -6399 2875 c --6152 2728 -5799 2652 -5340 2652 c --4993 2652 -4541 2693 -3976 2775 C -@c -F -%CHAR: -3265 0 (o) @t --2095 9149 m --2095 12535 -1154 15046 733 16675 c -2303 18027 4220 18709 6483 18709 c -9000 18709 11058 17886 12651 16234 c -14251 14587 15044 12312 15044 9407 c -15044 7050 14692 5198 13986 3851 c -13280 2499 12251 1452 10905 706 c -9553 -41 8083 -412 6483 -412 c -3926 -412 1856 406 275 2052 c --1307 3692 -2095 6056 -2095 9149 c -@c -1092 9149 m -1092 6803 1603 5051 2626 3886 c -3649 2716 4937 2134 6483 2134 c -8024 2134 9306 2722 10329 3892 c -11346 5062 11858 6850 11858 9249 c -11858 11512 11346 13229 10317 14393 c -9288 15558 8012 16140 6483 16140 c -4937 16140 3649 15558 2626 14399 c -1603 13241 1092 11489 1092 9149 c -@c -F -%CHAR: 16350 0 (r) @t -18643 0 m -18643 18292 L -21430 18292 L -21430 15522 L -22141 16816 22800 17674 23406 18086 c -24005 18497 24670 18709 25393 18709 c -26440 18709 27498 18374 28580 17710 C -27510 14829 L -26757 15281 25999 15505 25240 15505 c -24558 15505 23952 15299 23411 14893 c -22871 14482 22488 13917 22259 13194 c -21912 12094 21742 10889 21742 9578 c -21742 0 L -18643 0 L -@c -F -%CHAR: 28098 0 (a) @t -42362 2258 m -41210 1282 40104 594 39046 188 c -37982 -212 36841 -412 35624 -412 c -33613 -412 32073 76 30991 1058 c -29915 2040 29374 3298 29374 4821 c -29374 5721 29574 6538 29985 7279 c -30391 8020 30926 8614 31585 9061 c -32249 9507 32990 9848 33819 10078 c -34425 10236 35342 10395 36571 10542 c -39075 10842 40922 11195 42103 11612 C -42115 12036 42121 12306 42121 12418 c -42121 13682 41827 14576 41239 15087 c -40451 15793 39269 16140 37711 16140 c -36253 16140 35177 15887 34477 15375 c -33784 14864 33272 13958 32937 12659 C -29909 13076 L -30185 14370 30638 15422 31267 16216 c -31896 17016 32813 17633 34007 18062 c -35201 18492 36582 18709 38158 18709 c -39722 18709 40986 18521 41962 18156 c -42938 17786 43656 17327 44120 16769 c -44579 16210 44896 15511 45084 14658 c -45184 14129 45237 13176 45237 11800 c -45237 7667 l -45237 4780 45302 2957 45437 2199 c -45566 1435 45831 700 46219 0 C -42979 0 L -42662 641 42450 1393 42362 2258 C -@c -42103 9184 m -40974 8720 39287 8331 37041 8008 c -35765 7826 34860 7620 34336 7391 c -33807 7161 33396 6826 33113 6379 c -32825 5938 32678 5450 32678 4910 c -32678 4080 32996 3393 33619 2840 c -34242 2293 35159 2017 36365 2017 c -37558 2017 38623 2275 39552 2799 c -40481 3322 41168 4039 41604 4945 c -41939 5644 42103 6679 42103 8043 c -42103 9184 L -@c -F -%CHAR: 47713 0 (g) @t -49471 -1517 m -52487 -1964 L -52611 -2893 52964 -3569 53534 -3998 c -54304 -4569 55357 -4857 56685 -4857 c -58126 -4857 59231 -4569 60013 -3998 c -60795 -3422 61319 -2616 61595 -1588 c -61760 -953 61830 370 61818 2393 C -60466 800 58779 0 56756 0 c -54239 0 52293 905 50917 2722 c -49542 4533 48848 6715 48848 9249 c -48848 10995 49165 12606 49794 14082 c -50429 15558 51347 16698 52546 17504 c -53746 18303 55157 18709 56774 18709 c -58931 18709 60713 17833 62112 16087 C -62112 18292 L -64976 18292 L -64976 2481 l -64976 -365 64682 -2387 64106 -3575 c -63523 -4763 62606 -5703 61348 -6391 c -60090 -7079 58543 -7426 56703 -7426 c -54522 -7426 52758 -6932 51417 -5950 c -50071 -4968 49424 -3493 49471 -1517 C -@c -52035 9472 m -52035 7073 52511 5321 53469 4222 c -54422 3116 55615 2569 57050 2569 c -58473 2569 59666 3116 60631 4210 c -61595 5309 62077 7026 62077 9372 c -62077 11612 61583 13300 60589 14435 c -59596 15569 58396 16140 56997 16140 c -55621 16140 54451 15581 53481 14458 c -52517 13341 52035 11677 52035 9472 c -@c -F -%CHAR: 67328 0 (e) @t -82174 5891 m -85379 5497 L -84873 3622 83938 2170 82574 1135 c -81204 106 79458 -412 77335 -412 c -74660 -412 72537 412 70973 2058 c -69404 3704 68622 6015 68622 8990 c -68622 12071 69415 14458 70997 16157 c -72584 17857 74636 18709 77165 18709 c -79611 18709 81610 17874 83156 16210 c -84708 14546 85484 12200 85484 9184 c -85484 8996 85479 8720 85467 8355 C -71826 8355 L -71938 6344 72508 4804 73531 3739 c -74554 2669 75824 2134 77353 2134 c -78488 2134 79458 2434 80263 3034 c -81069 3628 81704 4580 82174 5891 C -@c -71996 10907 m -82209 10907 L -82074 12441 81680 13600 81039 14364 c -80052 15558 78770 16157 77200 16157 c -75777 16157 74578 15681 73607 14729 c -72637 13776 72102 12500 71996 10907 C -@c -F -%CHAR: -68634 -35278 (B) @t --66053 -35278 m --66053 -10025 L --56575 -10025 l --54646 -10025 -53100 -10284 -51936 -10789 c --50766 -11301 -49854 -12089 -49196 -13153 c --48537 -14211 -48202 -15322 -48202 -16487 c --48202 -17563 -48496 -18580 -49084 -19532 c --49666 -20485 -50554 -21255 -51736 -21843 C --50207 -22290 -49037 -23054 -48214 -24130 c --47391 -25212 -46979 -26488 -46979 -27958 c --46979 -29140 -47232 -30239 -47732 -31256 c --48232 -32273 -48849 -33055 -49584 -33608 c --50319 -34161 -51242 -34572 -52347 -34855 c --53453 -35137 -54811 -35278 -56422 -35278 c --66053 -35278 L -@c --62707 -20638 m --57245 -20638 l --55769 -20638 -54705 -20538 -54058 -20344 c --53212 -20091 -52571 -19673 -52142 -19085 c --51712 -18497 -51495 -17762 -51495 -16881 c --51495 -16046 -51695 -15305 -52094 -14670 c --52500 -14029 -53076 -13594 -53817 -13359 c --54564 -13123 -55846 -13006 -57663 -13006 c --62707 -13006 L --62707 -20638 L -@c --62707 -32297 m --56422 -32297 l --55340 -32297 -54582 -32256 -54147 -32179 c --53376 -32038 -52735 -31809 -52218 -31486 c --51701 -31168 -51277 -30698 -50942 -30086 c --50613 -29469 -50442 -28763 -50442 -27958 c --50442 -27017 -50683 -26200 -51166 -25500 c --51648 -24806 -52318 -24318 -53176 -24036 c --54029 -23760 -55264 -23619 -56869 -23619 c --62707 -23619 L --62707 -32297 L -@c -F -%CHAR: -45104 -35278 (a) @t --30840 -33020 m --31992 -33996 -33098 -34684 -34156 -35090 c --35220 -35490 -36361 -35690 -37578 -35690 c --39589 -35690 -41129 -35202 -42211 -34220 c --43287 -33238 -43828 -31980 -43828 -30457 c --43828 -29557 -43628 -28740 -43217 -27999 c --42811 -27258 -42276 -26664 -41617 -26217 c --40953 -25771 -40212 -25430 -39383 -25200 c --38777 -25042 -37860 -24883 -36631 -24736 c --34127 -24436 -32280 -24083 -31099 -23666 C --31087 -23242 -31081 -22972 -31081 -22860 c --31081 -21596 -31375 -20702 -31963 -20191 c --32751 -19485 -33933 -19138 -35491 -19138 c --36949 -19138 -38025 -19391 -38725 -19903 c --39418 -20414 -39930 -21320 -40265 -22619 C --43293 -22202 L --43017 -20908 -42564 -19856 -41935 -19062 c --41306 -18262 -40389 -17645 -39195 -17216 c --38001 -16786 -36620 -16569 -35044 -16569 c --33480 -16569 -32216 -16757 -31240 -17122 c --30264 -17492 -29546 -17951 -29082 -18509 c --28623 -19068 -28306 -19767 -28118 -20620 c --28018 -21149 -27965 -22102 -27965 -23478 c --27965 -27611 l --27965 -30498 -27900 -32321 -27765 -33079 c --27636 -33843 -27371 -34578 -26983 -35278 C --30223 -35278 L --30540 -34637 -30752 -33885 -30840 -33020 C -@c --31099 -26094 m --32228 -26558 -33915 -26947 -36161 -27270 c --37437 -27452 -38342 -27658 -38866 -27887 c --39395 -28117 -39806 -28452 -40089 -28899 c --40377 -29340 -40524 -29828 -40524 -30368 c --40524 -31198 -40206 -31885 -39583 -32438 c --38960 -32985 -38043 -33261 -36837 -33261 c --35644 -33261 -34579 -33003 -33650 -32479 c --32721 -31956 -32034 -31239 -31598 -30333 c --31263 -29634 -31099 -28599 -31099 -27235 c --31099 -26094 L -@c -F -%CHAR: -25489 -35278 (c) @t --11225 -28575 m --8179 -28975 L --8509 -31074 -9361 -32720 -10737 -33908 c --12107 -35096 -13794 -35690 -15793 -35690 c --18292 -35690 -20309 -34872 -21826 -33238 c --23349 -31603 -24113 -29257 -24113 -26200 c --24113 -24224 -23784 -22496 -23131 -21014 c --22473 -19532 -21479 -18421 -20139 -17680 c --18804 -16939 -17346 -16569 -15776 -16569 c --13788 -16569 -12160 -17075 -10902 -18080 c --9637 -19085 -8826 -20508 -8467 -22360 C --11484 -22825 L --11772 -21596 -12277 -20673 -13006 -20050 c --13736 -19432 -14617 -19121 -15652 -19121 c --17216 -19121 -18486 -19679 -19462 -20802 c --20438 -21919 -20926 -23689 -20926 -26112 c --20926 -28569 -20456 -30357 -19509 -31474 c --18569 -32585 -17340 -33144 -15823 -33144 c --14606 -33144 -13594 -32767 -12777 -32021 c --11960 -31274 -11442 -30127 -11225 -28575 C -@c -F -%CHAR: -7850 -35278 (k) @t --5510 -35278 m --5510 -10025 L --2405 -10025 L --2405 -24424 L -4932 -16986 L -8942 -16986 L -1951 -23771 L -9654 -35278 L -5826 -35278 L --218 -25923 L --2405 -28028 L --2405 -35278 L --5510 -35278 L -@c -F -%CHAR: 9789 -35278 (e) @t -24635 -29387 m -27840 -29781 L -27334 -31656 26399 -33108 25035 -34143 c -23665 -35172 21919 -35690 19796 -35690 c -17121 -35690 14998 -34866 13434 -33220 c -11865 -31574 11083 -29263 11083 -26288 c -11083 -23207 11876 -20820 13458 -19121 c -15045 -17421 17097 -16569 19626 -16569 c -22072 -16569 24071 -17404 25617 -19068 c -27169 -20732 27945 -23078 27945 -26094 c -27945 -26282 27940 -26558 27928 -26923 C -14287 -26923 L -14399 -28934 14969 -30474 15992 -31539 c -17015 -32609 18285 -33144 19814 -33144 c -20949 -33144 21919 -32844 22724 -32244 c -23530 -31650 24165 -30698 24635 -29387 C -@c -14457 -24371 m -24670 -24371 L -24535 -22837 24141 -21678 23500 -20914 c -22513 -19720 21231 -19121 19661 -19121 c -18238 -19121 17039 -19597 16068 -20549 c -15098 -21502 14563 -22778 14457 -24371 C -@c -F -%CHAR: 29404 -35278 (n) @t -31732 -35278 m -31732 -16986 L -34519 -16986 L -34519 -19585 L -35866 -17574 37806 -16569 40340 -16569 c -41446 -16569 42457 -16769 43380 -17163 c -44309 -17563 44997 -18080 45455 -18727 c -45920 -19368 46237 -20132 46426 -21014 c -46537 -21590 46596 -22596 46596 -24030 c -46596 -35278 L -43492 -35278 L -43492 -24148 l -43492 -22890 43374 -21943 43133 -21314 c -42892 -20691 42463 -20191 41851 -19820 c -41234 -19444 40517 -19256 39688 -19256 c -38365 -19256 37230 -19679 36266 -20514 c -35307 -21355 34831 -22942 34831 -25288 c -34831 -35278 L -31732 -35278 L -@c -F -%CHAR: 49019 -35278 (d) @t -63213 -35278 m -63213 -32967 L -62054 -34784 60349 -35690 58097 -35690 c -56639 -35690 55298 -35290 54076 -34484 c -52853 -33685 51906 -32562 51230 -31115 c -50559 -29675 50224 -28022 50224 -26147 c -50224 -24324 50530 -22666 51136 -21179 c -51747 -19691 52659 -18550 53876 -17762 c -55093 -16969 56457 -16569 57962 -16569 c -59061 -16569 60043 -16804 60902 -17269 c -61766 -17733 62466 -18339 63007 -19085 C -63007 -10025 L -66088 -10025 L -66088 -35278 L -63213 -35278 L -@c -53411 -26147 m -53411 -28493 53905 -30245 54893 -31403 c -55881 -32562 57045 -33144 58391 -33144 c -59744 -33144 60896 -32585 61843 -31480 c -62789 -30374 63265 -28681 63265 -26406 c -63265 -23901 62783 -22066 61819 -20896 c -60855 -19720 59667 -19138 58250 -19138 c -56874 -19138 55722 -19703 54799 -20826 c -53876 -21949 53411 -23724 53411 -26147 c -@c -F -T -@rax %Note: Object --57.30066 508.03710 175.32595 823.60460 @E -0 J 0 j [] 0 d 0 R 0 @G -0.00 0.00 0.00 0.20 K -0 0.79994 7.99937 46.08092 @w -/$fm 0 def -59.01279 823.60460 m -123.07578 823.60460 175.32595 752.72513 175.32595 665.82085 c -175.32595 578.91657 123.07578 508.03710 59.01279 508.03710 c --5.05049 508.03710 -57.30066 578.91657 -57.30066 665.82085 c --57.30066 752.72513 -5.05049 823.60460 59.01279 823.60460 c -@c -S - -@rax %Note: Object -184.68624 675.40706 219.40384 688.36139 @E -0 J 0 j [] 0 d 0 R 0 @G -0.00 0.00 0.00 0.40 K -0 1.43433 1.43433 0.00000 @w -/$fm 0 def -184.68624 688.36139 m -214.69408 677.16425 L -S -@j -0.00 0.00 0.00 0.40 K -0.00 0.00 0.00 0.40 k -0 @g -0 @G -[] 0 d 0 J 0 j -0 R 0 O -0 1.42894 1.42894 0 @w -219.40384 675.40706 m -211.53090 682.92028 L -211.87077 679.74321 210.87156 677.06561 208.53383 674.88746 C -219.40384 675.40706 L -f -@J - -@rax %Note: Object -185.58652 665.42513 218.74961 665.42627 @E -0 J 0 j [] 0 d 0 R 0 @G -0.00 0.00 0.00 0.40 K -0 1.43433 1.43433 0.00000 @w -/$fm 0 def -185.58652 665.42570 m -213.70365 665.42570 L -S -@j -0.00 0.00 0.00 0.40 K -0.00 0.00 0.00 0.40 k -0 @g -0 @G -[] 0 d 0 J 0 j -0 R 0 O -0 1.43433 1.43433 0 @w -218.74961 665.42570 m -208.70929 669.72869 L -210.14362 666.86003 210.14362 663.99137 208.70929 661.12271 C -218.74961 665.42570 L -f -@J - -@rax %Note: Object -183.37776 643.52636 219.64989 654.40800 @E -0 J 0 j [] 0 d 0 R 0 @G -0.00 0.00 0.00 0.40 K -0 1.43433 1.43433 0.00000 @w -/$fm 0 def -183.37776 643.52636 m -214.82447 652.96035 L -S -@j -0.00 0.00 0.00 0.40 K -0.00 0.00 0.00 0.40 k -0 @g -0 @G -[] 0 d 0 J 0 j -0 R 0 O -0 1.43206 1.43206 0 @w -219.64989 654.40800 m -208.81361 655.64249 L -211.00847 653.31071 211.83137 650.56734 211.28258 647.41238 C -219.64989 654.40800 L -f -@J - -@rax %Note: Object -395.69272 623.18154 395.88661 699.87118 @E -0 J 0 j [] 0 d 0 R 0 @G -0.00 0.00 0.00 1.00 K -0 0.86740 0.86740 0.00000 @w -/$fm 0 def -395.88661 623.18154 m -395.70151 696.32504 L -S -@j -0.00 0.00 0.00 1.00 K -0.00 0.00 0.00 1.00 k -0 @g -0 @G -[] 0 d 0 J 0 j -0 R 0 O -0 1.00800 1.00800 0 @w -395.69272 699.87118 m -392.68658 692.80753 L -394.70003 693.82063 396.71603 693.82573 398.73458 692.82283 C -395.69272 699.87118 L -f -@J - -@rax %Note: Object -134.59124 730.30734 360.32088 730.50123 @E -0 J 0 j [] 0 d 0 R 0 @G -0.00 0.00 0.00 1.00 K -0 0.86740 0.86740 0.00000 @w -/$fm 0 def -134.59124 730.50123 m -356.77474 730.31017 L -S -@j -0.00 0.00 0.00 1.00 K -0.00 0.00 0.00 1.00 k -0 @g -0 @G -[] 0 d 0 J 0 j -0 R 0 O -0 1.00800 1.00800 0 @w -360.32088 730.30734 m -353.26743 733.33729 L -354.27373 731.32044 354.27203 729.30444 353.26233 727.28929 C -360.32088 730.30734 L -f -@J - -@rax %Note: Object -135.81581 600.43408 359.66665 600.62797 @E -0 J 0 j [] 0 d 0 R 0 @G -0.00 0.00 0.00 1.00 K -0 0.86740 0.86740 0.00000 @w -/$fm 0 def -135.81581 600.62797 m -356.12050 600.43691 L -S -@j -0.00 0.00 0.00 1.00 K -0.00 0.00 0.00 1.00 k -0 @g -0 @G -[] 0 d 0 J 0 j -0 R 0 O -0 1.00800 1.00800 0 @w -359.66665 600.43408 m -352.61320 603.46431 L -353.61950 601.44718 353.61780 599.43118 352.60809 597.41631 C -359.66665 600.43408 L -f -@J - -@rax %Note: Object -288.02268 613.96441 360.04876 659.56365 @E -0 J 0 j [] 0 d 0 R 0 @G -0.00 0.00 0.00 1.00 K -0 0.86740 0.86740 0.00000 @w -/$fm 0 def -288.02268 659.56365 m -357.05282 615.86107 L -S -@j -0.00 0.00 0.00 1.00 K -0.00 0.00 0.00 1.00 k -0 @g -0 @G -[] 0 d 0 J 0 j -0 R 0 O -0 1.00800 1.00800 0 @w -360.04876 613.96441 m -355.70466 620.29361 L -355.47789 618.05112 354.39959 616.34778 352.46948 615.18359 C -360.04876 613.96441 L -f -@J - -@rax %Note: Object -291.51383 740.26261 359.91269 802.44340 @E -0 J 0 j [] 0 d 0 R 0 @G -0.00 0.00 0.00 1.00 K -0 0.86740 0.86740 0.00000 @w -/$fm 0 def -291.51383 802.44340 m -357.28894 742.64797 L -S -@j -0.00 0.00 0.00 1.00 K -0.00 0.00 0.00 1.00 k -0 @g -0 @G -[] 0 d 0 J 0 j -0 R 0 O -0 1.00800 1.00800 0 @w -359.91269 740.26261 m -356.72570 747.24661 L -356.11569 745.07669 354.75959 743.58510 352.65742 742.77128 C -359.91269 740.26261 L -f -@J - -@rax %Note: Object -286.85027 669.79106 359.39452 719.53569 @E -0 J 0 j [] 0 d 0 R 0 @G -0.00 0.00 0.00 1.00 K -0 0.86740 0.86740 0.00000 @w -/$fm 0 def -286.85027 669.79106 m -356.47002 717.53046 L -S -@j -0.00 0.00 0.00 1.00 K -0.00 0.00 0.00 1.00 k -0 @g -0 @G -[] 0 d 0 J 0 j -0 R 0 O -0 1.00800 1.00800 0 @w -359.39452 719.53569 m -351.86513 718.03928 L -353.83663 716.94680 354.97672 715.28400 355.28542 713.05143 C -359.39452 719.53569 L -f -@J - -@rax %Note: Object -102.40611 622.66337 102.40724 709.71647 @E -0 J 0 j [] 0 d 0 R 0 @G -0.00 0.00 0.00 0.40 K -0 1.43433 1.43433 0.00000 @w -/$fm 0 def -102.40668 622.66337 m -102.40668 704.67052 L -S -@j -0.00 0.00 0.00 0.40 K -0.00 0.00 0.00 0.40 k -0 @g -0 @G -[] 0 d 0 J 0 j -0 R 0 O -0 1.43433 1.43433 0 @w -102.40668 709.71647 m -98.10369 699.67616 L -100.97235 701.11049 103.84101 701.11049 106.70967 699.67616 C -102.40668 709.71647 L -f -@J - -@rax %Note: Object --9.13663 602.31855 68.07118 646.36328 @E -0 J 0 j [] 0 d 0 R 0 @G -0.00 0.00 0.00 0.40 K -0 1.43433 1.43433 0.00000 @w -/$fm 0 def --9.13663 646.36328 m -63.70129 604.81134 L -S -@j -0.00 0.00 0.00 0.40 K -0.00 0.00 0.00 0.40 k -0 @g -0 @G -[] 0 d 0 J 0 j -0 R 0 O -0 1.43008 1.43008 0 @w -68.07118 602.31855 m -61.50189 611.00532 L -61.32671 607.81238 59.90967 605.32809 57.25020 603.55247 C -68.07118 602.31855 L -f -@J - -@rax %Note: Object -385.89761 699.03213 407.50072 710.32195 @E - 0 O 0 @g -0.00 0.00 0.00 0.50 k -/$fm 0 def -385.89761 710.32224 m -407.50072 710.32224 L -407.50072 699.03213 L -385.89761 699.03213 L -385.89761 710.32224 L -@c -F - -@rax %Note: Object -384.95622 700.11496 406.19055 711.38494 @E - 0 O 0 @g -0.00 0.00 0.00 0.00 k -0 J 0 j [] 0 d 0 R 0 @G -0.00 0.00 0.00 1.00 K -0 0.49890 0.49890 0.00000 @w -/$fm 0 def -384.95622 711.38494 m -406.19112 711.38494 L -406.19112 700.11411 L -384.95622 700.11411 L -384.95622 711.38494 L -@c -B - -@rax %Note: Object -363.47216 703.76343 456.70649 745.20113 @E - 0 O 0 @g -0.00 0.00 0.00 0.50 k -/$fm 0 def -363.47216 745.20113 m -456.70649 745.20113 L -456.70649 703.76343 L -363.47216 703.76343 L -363.47216 745.20113 L -@c -F - -@rax %Note: Object -360.49209 707.73534 453.56627 749.10161 @E - 0 O 0 @g -0.00 0.00 0.00 0.00 k -0 J 0 j [] 0 d 0 R 0 @G -0.00 0.00 0.00 1.00 K -0 0.49890 0.49890 0.00000 @w -/$fm 0 def -360.49209 749.10161 m -453.56627 749.10161 L -453.56627 707.73534 L -360.49209 707.73534 L -360.49209 749.10161 L -@c -B - -@rax 370.79915 721.48620 442.62680 738.88299 @E -[0.00028346 0.00000000 0.00000000 0.00028346 406.91989063 731.60302836] @tm - 0 O 0 @g -0.00 0.00 0.00 1.00 k -e - -% FontChange:/_ArialCE 35278.00000 z -%CHAR: -127426 0 (P) @t --124704 0 m --124704 25253 L --115179 25253 l --113503 25253 -112221 25171 -111339 25012 c --110099 24806 -109058 24412 -108217 23830 c --107382 23254 -106706 22437 -106195 21396 c --105683 20350 -105430 19203 -105430 17951 c --105430 15805 -106112 13982 -107476 12494 c --108846 11013 -111316 10266 -114885 10266 c --121364 10266 L --121364 0 L --124704 0 L -@c --121364 13247 m --114832 13247 l --112674 13247 -111139 13647 -110234 14452 c --109328 15258 -108876 16387 -108876 17845 c --108876 18903 -109140 19809 -109675 20561 c --110210 21314 -110910 21808 -111786 22049 c --112351 22196 -113385 22272 -114902 22272 c --121364 22272 L --121364 13247 L -@c -F -%CHAR: -103896 0 (r) @t --101603 0 m --101603 18292 L --98816 18292 L --98816 15522 L --98105 16816 -97446 17674 -96840 18086 c --96241 18497 -95576 18709 -94853 18709 c --93806 18709 -92748 18374 -91666 17710 C --92736 14829 L --93489 15281 -94247 15505 -95006 15505 c --95688 15505 -96294 15299 -96835 14893 c --97375 14482 -97758 13917 -97987 13194 c --98334 12094 -98504 10889 -98504 9578 c --98504 0 L --101603 0 L -@c -F -%CHAR: -92148 0 (i) @t --89808 21684 m --89808 25253 L --86703 25253 L --86703 21684 L --89808 21684 L -@c --89808 0 m --89808 18292 L --86703 18292 L --86703 0 L --89808 0 L -@c -F -%CHAR: -84316 0 (m) @t --81988 0 m --81988 18292 L --79218 18292 L --79218 15728 L --78642 16622 -77878 17345 -76925 17886 c --75973 18433 -74885 18709 -73668 18709 c --72316 18709 -71204 18427 -70340 17862 c --69470 17298 -68858 16516 -68506 15505 C --67053 17639 -65172 18709 -62855 18709 c --61038 18709 -59645 18203 -58669 17198 c --57693 16193 -57205 14646 -57205 12559 c --57205 0 L --60286 0 L --60286 11524 l --60286 12765 -60386 13658 -60586 14205 c --60791 14746 -61156 15187 -61679 15522 c --62208 15852 -62832 16022 -63543 16022 c --64831 16022 -65895 15593 -66748 14734 c --67594 13882 -68023 12512 -68023 10630 c --68023 0 L --71122 0 L --71122 11883 l --71122 13265 -71375 14299 -71881 14987 c --72386 15675 -73209 16022 -74362 16022 c --75232 16022 -76037 15793 -76778 15328 c --77519 14870 -78060 14199 -78389 13317 c --78724 12430 -78889 11154 -78889 9490 c --78889 0 L --81988 0 L -@c -F -%CHAR: -54929 0 (a) @t --40665 2258 m --41817 1282 -42923 594 -43981 188 c --45045 -212 -46186 -412 -47403 -412 c --49414 -412 -50954 76 -52036 1058 c --53112 2040 -53653 3298 -53653 4821 c --53653 5721 -53453 6538 -53042 7279 c --52636 8020 -52101 8614 -51442 9061 c --50778 9507 -50037 9848 -49208 10078 c --48602 10236 -47685 10395 -46456 10542 c --43952 10842 -42105 11195 -40924 11612 C --40912 12036 -40906 12306 -40906 12418 c --40906 13682 -41200 14576 -41788 15087 c --42576 15793 -43758 16140 -45316 16140 c --46774 16140 -47850 15887 -48550 15375 c --49243 14864 -49755 13958 -50090 12659 C --53118 13076 L --52842 14370 -52389 15422 -51760 16216 c --51131 17016 -50214 17633 -49020 18062 c --47826 18492 -46445 18709 -44869 18709 c --43305 18709 -42041 18521 -41065 18156 c --40089 17786 -39371 17327 -38907 16769 c --38448 16210 -38131 15511 -37943 14658 c --37843 14129 -37790 13176 -37790 11800 c --37790 7667 l --37790 4780 -37725 2957 -37590 2199 c --37461 1435 -37196 700 -36808 0 C --40048 0 L --40365 641 -40577 1393 -40665 2258 C -@c --40924 9184 m --42053 8720 -43740 8331 -45986 8008 c --47262 7826 -48167 7620 -48691 7391 c --49220 7161 -49631 6826 -49914 6379 c --50202 5938 -50349 5450 -50349 4910 c --50349 4080 -50031 3393 -49408 2840 c --48785 2293 -47868 2017 -46662 2017 c --45469 2017 -44404 2275 -43475 2799 c --42546 3322 -41859 4039 -41423 4945 c --41088 5644 -40924 6679 -40924 8043 c --40924 9184 L -@c -F -%CHAR: -35314 0 (r) @t --33021 0 m --33021 18292 L --30234 18292 L --30234 15522 L --29523 16816 -28864 17674 -28258 18086 c --27659 18497 -26994 18709 -26271 18709 c --25224 18709 -24166 18374 -23084 17710 C --24154 14829 L --24907 15281 -25665 15505 -26424 15505 c --27106 15505 -27712 15299 -28253 14893 c --28793 14482 -29176 13917 -29405 13194 c --29752 12094 -29922 10889 -29922 9578 c --29922 0 L --33021 0 L -@c -F -%CHAR: -23566 0 (y) @t --21379 -7044 m --21726 -4133 L --21044 -4316 -20456 -4410 -19950 -4410 c --19262 -4410 -18709 -4292 -18298 -4063 c --17880 -3834 -17545 -3516 -17281 -3099 c --17081 -2793 -16769 -2023 -16334 -794 c --16275 -617 -16181 -370 -16058 -35 C --22996 18292 L --19656 18292 L --15846 7702 l --15358 6356 -14911 4945 -14523 3463 C --14164 4886 -13741 6274 -13247 7632 c --9337 18292 L --6239 18292 L --13194 -312 l --13941 -2322 -14523 -3704 -14935 -4463 c --15487 -5486 -16116 -6232 -16828 -6709 c --17545 -7185 -18392 -7426 -19380 -7426 c --19979 -7426 -20644 -7297 -21379 -7044 C -@c -F -%CHAR: 3880 0 (S) @t -5468 8114 m -8619 8390 L -8766 7126 9113 6091 9660 5280 c -10207 4469 11053 3816 12200 3316 c -13346 2816 14640 2569 16074 2569 c -17350 2569 18473 2758 19449 3134 c -20425 3516 21154 4033 21631 4692 c -22107 5356 22348 6074 22348 6856 c -22348 7649 22119 8337 21654 8931 c -21196 9525 20437 10019 19385 10419 c -18703 10683 17209 11095 14887 11653 c -12570 12212 10941 12735 10012 13229 c -8807 13858 7908 14646 7314 15581 c -6726 16516 6432 17563 6432 18727 c -6432 19997 6790 21190 7514 22296 c -8237 23407 9295 24248 10683 24824 c -12076 25394 13617 25682 15316 25682 c -17192 25682 18838 25383 20273 24777 c -21701 24177 22801 23289 23571 22119 c -24335 20949 24753 19620 24812 18139 C -21607 17898 L -21431 19491 20849 20702 19855 21514 c -18861 22331 17397 22737 15457 22737 c -13434 22737 11965 22366 11036 21625 c -10112 20885 9648 19991 9648 18950 c -9648 18039 9977 17292 10630 16710 c -11277 16122 12952 15522 15669 14911 c -18385 14293 20249 13758 21260 13300 c -22730 12618 23818 11759 24518 10725 c -25217 9684 25564 8484 25564 7132 c -25564 5786 25182 4521 24412 3334 c -23642 2146 22536 1223 21096 559 c -19655 -100 18032 -429 16233 -429 c -13946 -429 12029 -100 10489 570 c -8942 1235 7731 2234 6849 3575 c -5973 4910 5509 6426 5468 8114 C -@c -F -%CHAR: 27410 0 (t) @t -36506 2775 m -36953 35 L -36083 -147 35301 -241 34613 -241 c -33484 -241 32614 -65 31990 294 c -31373 647 30938 1117 30685 1699 c -30432 2275 30303 3498 30303 5356 c -30303 15881 L -28027 15881 L -28027 18292 L -30303 18292 L -30303 22825 L -33390 24683 L -33390 18292 L -36506 18292 L -36506 15881 L -33390 15881 L -33390 5186 l -33390 4298 33443 3734 33548 3481 c -33660 3228 33836 3028 34083 2875 c -34330 2728 34683 2652 35142 2652 c -35489 2652 35941 2693 36506 2775 C -@c -F -%CHAR: 37217 0 (o) @t -38387 9149 m -38387 12535 39328 15046 41215 16675 c -42785 18027 44702 18709 46965 18709 c -49482 18709 51540 17886 53133 16234 c -54733 14587 55526 12312 55526 9407 c -55526 7050 55174 5198 54468 3851 c -53762 2499 52733 1452 51387 706 c -50035 -41 48565 -412 46965 -412 c -44408 -412 42338 406 40757 2052 c -39175 3692 38387 6056 38387 9149 c -@c -41574 9149 m -41574 6803 42085 5051 43108 3886 c -44131 2716 45419 2134 46965 2134 c -48506 2134 49788 2722 50811 3892 c -51828 5062 52340 6850 52340 9249 c -52340 11512 51828 13229 50799 14393 c -49770 15558 48494 16140 46965 16140 c -45419 16140 44131 15558 43108 14399 c -42085 13241 41574 11489 41574 9149 c -@c -F -%CHAR: 56832 0 (r) @t -59125 0 m -59125 18292 L -61912 18292 L -61912 15522 L -62623 16816 63282 17674 63888 18086 c -64487 18497 65152 18709 65875 18709 c -66922 18709 67980 18374 69062 17710 C -67992 14829 L -67239 15281 66481 15505 65722 15505 c -65040 15505 64434 15299 63893 14893 c -63353 14482 62970 13917 62741 13194 c -62394 12094 62224 10889 62224 9578 c -62224 0 L -59125 0 L -@c -F -%CHAR: 68580 0 (a) @t -82844 2258 m -81692 1282 80586 594 79528 188 c -78464 -212 77323 -412 76106 -412 c -74095 -412 72555 76 71473 1058 c -70397 2040 69856 3298 69856 4821 c -69856 5721 70056 6538 70467 7279 c -70873 8020 71408 8614 72067 9061 c -72731 9507 73472 9848 74301 10078 c -74907 10236 75824 10395 77053 10542 c -79557 10842 81404 11195 82585 11612 C -82597 12036 82603 12306 82603 12418 c -82603 13682 82309 14576 81721 15087 c -80933 15793 79751 16140 78193 16140 c -76735 16140 75659 15887 74959 15375 c -74266 14864 73754 13958 73419 12659 C -70391 13076 L -70667 14370 71120 15422 71749 16216 c -72378 17016 73295 17633 74489 18062 c -75683 18492 77064 18709 78640 18709 c -80204 18709 81468 18521 82444 18156 c -83420 17786 84138 17327 84602 16769 c -85061 16210 85378 15511 85566 14658 c -85666 14129 85719 13176 85719 11800 c -85719 7667 l -85719 4780 85784 2957 85919 2199 c -86048 1435 86313 700 86701 0 C -83461 0 L -83144 641 82932 1393 82844 2258 C -@c -82585 9184 m -81456 8720 79769 8331 77523 8008 c -76247 7826 75342 7620 74818 7391 c -74289 7161 73878 6826 73595 6379 c -73307 5938 73160 5450 73160 4910 c -73160 4080 73478 3393 74101 2840 c -74724 2293 75641 2017 76847 2017 c -78040 2017 79105 2275 80034 2799 c -80963 3322 81650 4039 82086 4945 c -82421 5644 82585 6679 82585 8043 c -82585 9184 L -@c -F -%CHAR: 88195 0 (g) @t -89953 -1517 m -92969 -1964 L -93093 -2893 93446 -3569 94016 -3998 c -94786 -4569 95839 -4857 97167 -4857 c -98608 -4857 99713 -4569 100495 -3998 c -101277 -3422 101801 -2616 102077 -1588 c -102242 -953 102312 370 102300 2393 C -100948 800 99261 0 97238 0 c -94721 0 92775 905 91399 2722 c -90024 4533 89330 6715 89330 9249 c -89330 10995 89647 12606 90276 14082 c -90911 15558 91829 16698 93028 17504 c -94228 18303 95639 18709 97256 18709 c -99413 18709 101195 17833 102594 16087 C -102594 18292 L -105458 18292 L -105458 2481 l -105458 -365 105164 -2387 104588 -3575 c -104005 -4763 103088 -5703 101830 -6391 c -100572 -7079 99025 -7426 97185 -7426 c -95004 -7426 93240 -6932 91899 -5950 c -90553 -4968 89906 -3493 89953 -1517 C -@c -92517 9472 m -92517 7073 92993 5321 93951 4222 c -94904 3116 96097 2569 97532 2569 c -98955 2569 100148 3116 101113 4210 c -102077 5309 102559 7026 102559 9372 c -102559 11612 102065 13300 101071 14435 c -100078 15569 98878 16140 97479 16140 c -96103 16140 94933 15581 93963 14458 c -92999 13341 92517 11677 92517 9472 c -@c -F -%CHAR: 107810 0 (e) @t -122656 5891 m -125861 5497 L -125355 3622 124420 2170 123056 1135 c -121686 106 119940 -412 117817 -412 c -115142 -412 113019 412 111455 2058 c -109886 3704 109104 6015 109104 8990 c -109104 12071 109897 14458 111479 16157 c -113066 17857 115118 18709 117647 18709 c -120093 18709 122092 17874 123638 16210 c -125190 14546 125966 12200 125966 9184 c -125966 8996 125961 8720 125949 8355 C -112308 8355 L -112420 6344 112990 4804 114013 3739 c -115036 2669 116306 2134 117835 2134 c -118970 2134 119940 2434 120745 3034 c -121551 3628 122186 4580 122656 5891 C -@c -112478 10907 m -122691 10907 L -122556 12441 122162 13600 121521 14364 c -120534 15558 119252 16157 117682 16157 c -116259 16157 115060 15681 114089 14729 c -113119 13776 112584 12500 112478 10907 C -@c -F -%CHAR: -70593 -35278 (f) @t --67530 -35278 m --67530 -19397 L --70264 -19397 L --70264 -16986 L --67530 -16986 L --67530 -15040 l --67530 -13811 -67418 -12894 -67200 -12300 c --66901 -11495 -66377 -10842 -65625 -10342 c --64872 -9843 -63820 -9596 -62461 -9596 c --61591 -9596 -60627 -9696 -59569 -9907 C --60033 -12612 L --60674 -12494 -61285 -12435 -61862 -12435 c --62802 -12435 -63467 -12635 -63855 -13041 c --64249 -13441 -64443 -14194 -64443 -15299 c --64443 -16986 L --60880 -16986 L --60880 -19397 L --64443 -19397 L --64443 -35278 L --67530 -35278 L -@c -F -%CHAR: -60786 -35278 (r) @t --58493 -35278 m --58493 -16986 L --55706 -16986 L --55706 -19756 L --54995 -18462 -54336 -17604 -53730 -17192 c --53131 -16781 -52466 -16569 -51743 -16569 c --50696 -16569 -49638 -16904 -48556 -17568 C --49626 -20449 L --50379 -19997 -51137 -19773 -51896 -19773 c --52578 -19773 -53184 -19979 -53725 -20385 c --54265 -20796 -54648 -21361 -54877 -22084 c --55224 -23184 -55394 -24389 -55394 -25700 c --55394 -35278 L --58493 -35278 L -@c -F -%CHAR: -49038 -35278 (o) @t --47868 -26129 m --47868 -22743 -46927 -20232 -45040 -18603 c --43470 -17251 -41553 -16569 -39290 -16569 c --36773 -16569 -34715 -17392 -33122 -19044 c --31522 -20691 -30729 -22966 -30729 -25871 c --30729 -28228 -31081 -30080 -31787 -31427 c --32493 -32779 -33522 -33826 -34868 -34572 c --36220 -35319 -37690 -35690 -39290 -35690 c --41847 -35690 -43917 -34872 -45498 -33226 c --47080 -31586 -47868 -29222 -47868 -26129 c -@c --44681 -26129 m --44681 -28475 -44170 -30227 -43147 -31392 c --42124 -32562 -40836 -33144 -39290 -33144 c --37749 -33144 -36467 -32556 -35444 -31386 c --34427 -30216 -33915 -28428 -33915 -26029 c --33915 -23766 -34427 -22049 -35456 -20885 c --36485 -19720 -37761 -19138 -39290 -19138 c --40836 -19138 -42124 -19720 -43147 -20879 c --44170 -22037 -44681 -23789 -44681 -26129 c -@c -F -%CHAR: -29423 -35278 (n) @t --27095 -35278 m --27095 -16986 L --24308 -16986 L --24308 -19585 L --22961 -17574 -21021 -16569 -18487 -16569 c --17381 -16569 -16370 -16769 -15447 -17163 c --14518 -17563 -13830 -18080 -13372 -18727 c --12907 -19368 -12590 -20132 -12401 -21014 c --12290 -21590 -12231 -22596 -12231 -24030 c --12231 -35278 L --15335 -35278 L --15335 -24148 l --15335 -22890 -15453 -21943 -15694 -21314 c --15935 -20691 -16364 -20191 -16976 -19820 c --17593 -19444 -18310 -19256 -19139 -19256 c --20462 -19256 -21597 -19679 -22561 -20514 c --23520 -21355 -23996 -22942 -23996 -25288 c --23996 -35278 L --27095 -35278 L -@c -F -%CHAR: -9808 -35278 (t) @t --712 -32503 m --265 -35243 L --1135 -35425 -1917 -35519 -2605 -35519 c --3734 -35519 -4604 -35343 -5228 -34984 c --5845 -34631 -6280 -34161 -6533 -33579 c --6786 -33003 -6915 -31780 -6915 -29922 c --6915 -19397 L --9191 -19397 L --9191 -16986 L --6915 -16986 L --6915 -12453 L --3828 -10595 L --3828 -16986 L --712 -16986 L --712 -19397 L --3828 -19397 L --3828 -30092 l --3828 -30980 -3775 -31544 -3670 -31797 c --3558 -32050 -3382 -32250 -3135 -32403 c --2888 -32550 -2535 -32626 -2076 -32626 c --1729 -32626 -1277 -32585 -712 -32503 C -@c -F -%CHAR: -1 -35278 (-) @t -1116 -27699 m -1116 -24583 L -10647 -24583 L -10647 -27699 L -1116 -27699 L -@c -F -%CHAR: 11747 -35278 (e) @t -26593 -29387 m -29798 -29781 L -29292 -31656 28357 -33108 26993 -34143 c -25623 -35172 23877 -35690 21754 -35690 c -19079 -35690 16956 -34866 15392 -33220 c -13823 -31574 13041 -29263 13041 -26288 c -13041 -23207 13834 -20820 15416 -19121 c -17003 -17421 19055 -16569 21584 -16569 c -24030 -16569 26029 -17404 27575 -19068 c -29127 -20732 29903 -23078 29903 -26094 c -29903 -26282 29898 -26558 29886 -26923 C -16245 -26923 L -16357 -28934 16927 -30474 17950 -31539 c -18973 -32609 20243 -33144 21772 -33144 c -22907 -33144 23877 -32844 24682 -32244 c -25488 -31650 26123 -30698 26593 -29387 C -@c -16415 -24371 m -26628 -24371 L -26493 -22837 26099 -21678 25458 -20914 c -24471 -19720 23189 -19121 21619 -19121 c -20196 -19121 18997 -19597 18026 -20549 c -17056 -21502 16521 -22778 16415 -24371 C -@c -F -%CHAR: 31362 -35278 (n) @t -33690 -35278 m -33690 -16986 L -36477 -16986 L -36477 -19585 L -37824 -17574 39764 -16569 42298 -16569 c -43404 -16569 44415 -16769 45338 -17163 c -46267 -17563 46955 -18080 47413 -18727 c -47878 -19368 48195 -20132 48384 -21014 c -48495 -21590 48554 -22596 48554 -24030 c -48554 -35278 L -45450 -35278 L -45450 -24148 l -45450 -22890 45332 -21943 45091 -21314 c -44850 -20691 44421 -20191 43809 -19820 c -43192 -19444 42475 -19256 41646 -19256 c -40323 -19256 39188 -19679 38224 -20514 c -37265 -21355 36789 -22942 36789 -25288 c -36789 -35278 L -33690 -35278 L -@c -F -%CHAR: 50977 -35278 (d) @t -65171 -35278 m -65171 -32967 L -64012 -34784 62307 -35690 60055 -35690 c -58597 -35690 57256 -35290 56034 -34484 c -54811 -33685 53864 -32562 53188 -31115 c -52517 -29675 52182 -28022 52182 -26147 c -52182 -24324 52488 -22666 53094 -21179 c -53705 -19691 54617 -18550 55834 -17762 c -57051 -16969 58415 -16569 59920 -16569 c -61019 -16569 62001 -16804 62860 -17269 c -63724 -17733 64424 -18339 64965 -19085 C -64965 -10025 L -68046 -10025 L -68046 -35278 L -65171 -35278 L -@c -55369 -26147 m -55369 -28493 55863 -30245 56851 -31403 c -57839 -32562 59003 -33144 60349 -33144 c -61702 -33144 62854 -32585 63801 -31480 c -64747 -30374 65223 -28681 65223 -26406 c -65223 -23901 64741 -22066 63777 -20896 c -62813 -19720 61625 -19138 60208 -19138 c -58832 -19138 57680 -19703 56757 -20826 c -55834 -21949 55369 -23724 55369 -26147 c -@c -F -T -@rax 364.10003 760.56917 450.19757 769.95411 @E -[0.00028346 0.00000000 0.00000000 0.00028346 407.35557565 762.67414533] @tm - 0 O 0 @g -0.00 0.00 0.00 1.00 k -e - -% FontChange:/_ArialCE 35278.00000 z -%CHAR: -152596 0 (J) @t --151579 7167 m --148563 7579 L --148486 5650 -148122 4327 -147481 3616 c --146834 2905 -145946 2552 -144811 2552 c --143971 2552 -143247 2740 -142642 3128 c --142030 3510 -141613 4033 -141383 4692 c --141154 5356 -141037 6409 -141037 7855 c --141037 25253 L --137697 25253 L --137697 8043 l --137697 5933 -137950 4292 -138461 3134 c --138973 1976 -139784 1094 -140890 482 c --142001 -123 -143300 -429 -144794 -429 c --147010 -429 -148704 206 -149885 1482 c --151061 2758 -151626 4651 -151579 7167 C -@c -F -%CHAR: -134957 0 (P) @t --132235 0 m --132235 25253 L --122710 25253 l --121034 25253 -119752 25171 -118870 25012 c --117630 24806 -116589 24412 -115748 23830 c --114913 23254 -114237 22437 -113726 21396 c --113214 20350 -112961 19203 -112961 17951 c --112961 15805 -113643 13982 -115007 12494 c --116377 11013 -118847 10266 -122416 10266 c --128895 10266 L --128895 0 L --132235 0 L -@c --128895 13247 m --122363 13247 l --120205 13247 -118670 13647 -117765 14452 c --116859 15258 -116407 16387 -116407 17845 c --116407 18903 -116671 19809 -117206 20561 c --117741 21314 -118441 21808 -119317 22049 c --119882 22196 -120916 22272 -122433 22272 c --128895 22272 L --128895 13247 L -@c -F -%CHAR: -102255 0 (P) @t --99533 0 m --99533 25253 L --90008 25253 l --88332 25253 -87050 25171 -86168 25012 c --84928 24806 -83887 24412 -83046 23830 c --82211 23254 -81535 22437 -81024 21396 c --80512 20350 -80259 19203 -80259 17951 c --80259 15805 -80941 13982 -82305 12494 c --83675 11013 -86145 10266 -89714 10266 c --96193 10266 L --96193 0 L --99533 0 L -@c --96193 13247 m --89661 13247 l --87503 13247 -85968 13647 -85063 14452 c --84157 15258 -83705 16387 -83705 17845 c --83705 18903 -83969 19809 -84504 20561 c --85039 21314 -85739 21808 -86615 22049 c --87180 22196 -88214 22272 -89731 22272 c --96193 22272 L --96193 13247 L -@c -F -%CHAR: -78725 0 (r) @t --76432 0 m --76432 18292 L --73645 18292 L --73645 15522 L --72934 16816 -72275 17674 -71669 18086 c --71070 18497 -70405 18709 -69682 18709 c --68635 18709 -67577 18374 -66495 17710 C --67565 14829 L --68318 15281 -69076 15505 -69835 15505 c --70517 15505 -71123 15299 -71664 14893 c --72204 14482 -72587 13917 -72816 13194 c --73163 12094 -73333 10889 -73333 9578 c --73333 0 L --76432 0 L -@c -F -%CHAR: -66977 0 (i) @t --64637 21684 m --64637 25253 L --61532 25253 L --61532 21684 L --64637 21684 L -@c --64637 0 m --64637 18292 L --61532 18292 L --61532 0 L --64637 0 L -@c -F -%CHAR: -59145 0 (m) @t --56817 0 m --56817 18292 L --54047 18292 L --54047 15728 L --53471 16622 -52707 17345 -51754 17886 c --50802 18433 -49714 18709 -48497 18709 c --47145 18709 -46033 18427 -45169 17862 c --44299 17298 -43687 16516 -43335 15505 C --41882 17639 -40001 18709 -37684 18709 c --35867 18709 -34474 18203 -33498 17198 c --32522 16193 -32034 14646 -32034 12559 c --32034 0 L --35115 0 L --35115 11524 l --35115 12765 -35215 13658 -35415 14205 c --35620 14746 -35985 15187 -36508 15522 c --37037 15852 -37661 16022 -38372 16022 c --39660 16022 -40724 15593 -41577 14734 c --42423 13882 -42852 12512 -42852 10630 c --42852 0 L --45951 0 L --45951 11883 l --45951 13265 -46204 14299 -46710 14987 c --47215 15675 -48038 16022 -49191 16022 c --50061 16022 -50866 15793 -51607 15328 c --52348 14870 -52889 14199 -53218 13317 c --53553 12430 -53718 11154 -53718 9490 c --53718 0 L --56817 0 L -@c -F -%CHAR: -29758 0 (a) @t --15494 2258 m --16646 1282 -17752 594 -18810 188 c --19874 -212 -21015 -412 -22232 -412 c --24243 -412 -25783 76 -26865 1058 c --27941 2040 -28482 3298 -28482 4821 c --28482 5721 -28282 6538 -27871 7279 c --27465 8020 -26930 8614 -26271 9061 c --25607 9507 -24866 9848 -24037 10078 c --23431 10236 -22514 10395 -21285 10542 c --18781 10842 -16934 11195 -15753 11612 C --15741 12036 -15735 12306 -15735 12418 c --15735 13682 -16029 14576 -16617 15087 c --17405 15793 -18587 16140 -20145 16140 c --21603 16140 -22679 15887 -23379 15375 c --24072 14864 -24584 13958 -24919 12659 C --27947 13076 L --27671 14370 -27218 15422 -26589 16216 c --25960 17016 -25043 17633 -23849 18062 c --22655 18492 -21274 18709 -19698 18709 c --18134 18709 -16870 18521 -15894 18156 c --14918 17786 -14200 17327 -13736 16769 c --13277 16210 -12960 15511 -12772 14658 c --12672 14129 -12619 13176 -12619 11800 c --12619 7667 l --12619 4780 -12554 2957 -12419 2199 c --12290 1435 -12025 700 -11637 0 C --14877 0 L --15194 641 -15406 1393 -15494 2258 C -@c --15753 9184 m --16882 8720 -18569 8331 -20815 8008 c --22091 7826 -22996 7620 -23520 7391 c --24049 7161 -24460 6826 -24743 6379 c --25031 5938 -25178 5450 -25178 4910 c --25178 4080 -24860 3393 -24237 2840 c --23614 2293 -22697 2017 -21491 2017 c --20298 2017 -19233 2275 -18304 2799 c --17375 3322 -16688 4039 -16252 4945 c --15917 5644 -15753 6679 -15753 8043 c --15753 9184 L -@c -F -%CHAR: -10143 0 (r) @t --7850 0 m --7850 18292 L --5063 18292 L --5063 15522 L --4352 16816 -3693 17674 -3087 18086 c --2488 18497 -1823 18709 -1100 18709 c --53 18709 1005 18374 2087 17710 C -1017 14829 L -264 15281 -494 15505 -1253 15505 c --1935 15505 -2541 15299 -3082 14893 c --3622 14482 -4005 13917 -4234 13194 c --4581 12094 -4751 10889 -4751 9578 c --4751 0 L --7850 0 L -@c -F -%CHAR: 1605 0 (y) @t -3792 -7044 m -3445 -4133 L -4127 -4316 4715 -4410 5221 -4410 c -5909 -4410 6462 -4292 6873 -4063 c -7291 -3834 7626 -3516 7890 -3099 c -8090 -2793 8402 -2023 8837 -794 c -8896 -617 8990 -370 9113 -35 C -2175 18292 L -5515 18292 L -9325 7702 l -9813 6356 10260 4945 10648 3463 C -11007 4886 11430 6274 11924 7632 c -15834 18292 L -18932 18292 L -11977 -312 l -11230 -2322 10648 -3704 10236 -4463 c -9684 -5486 9055 -6232 8343 -6709 c -7626 -7185 6779 -7426 5791 -7426 c -5192 -7426 4527 -7297 3792 -7044 C -@c -F -%CHAR: 29051 0 (S) @t -30639 8114 m -33790 8390 L -33937 7126 34284 6091 34831 5280 c -35378 4469 36224 3816 37371 3316 c -38517 2816 39811 2569 41245 2569 c -42521 2569 43644 2758 44620 3134 c -45596 3516 46325 4033 46802 4692 c -47278 5356 47519 6074 47519 6856 c -47519 7649 47290 8337 46825 8931 c -46367 9525 45608 10019 44556 10419 c -43874 10683 42380 11095 40058 11653 c -37741 12212 36112 12735 35183 13229 c -33978 13858 33079 14646 32485 15581 c -31897 16516 31603 17563 31603 18727 c -31603 19997 31961 21190 32685 22296 c -33408 23407 34466 24248 35854 24824 c -37247 25394 38788 25682 40487 25682 c -42363 25682 44009 25383 45444 24777 c -46872 24177 47972 23289 48742 22119 c -49506 20949 49924 19620 49983 18139 C -46778 17898 L -46602 19491 46020 20702 45026 21514 c -44032 22331 42568 22737 40628 22737 c -38605 22737 37136 22366 36207 21625 c -35283 20885 34819 19991 34819 18950 c -34819 18039 35148 17292 35801 16710 c -36448 16122 38123 15522 40840 14911 c -43556 14293 45420 13758 46431 13300 c -47901 12618 48989 11759 49689 10725 c -50388 9684 50735 8484 50735 7132 c -50735 5786 50353 4521 49583 3334 c -48813 2146 47707 1223 46267 559 c -44826 -100 43203 -429 41404 -429 c -39117 -429 37200 -100 35660 570 c -34113 1235 32902 2234 32020 3575 c -31144 4910 30680 6426 30639 8114 C -@c -F -%CHAR: 52581 0 (t) @t -61677 2775 m -62124 35 L -61254 -147 60472 -241 59784 -241 c -58655 -241 57785 -65 57161 294 c -56544 647 56109 1117 55856 1699 c -55603 2275 55474 3498 55474 5356 c -55474 15881 L -53198 15881 L -53198 18292 L -55474 18292 L -55474 22825 L -58561 24683 L -58561 18292 L -61677 18292 L -61677 15881 L -58561 15881 L -58561 5186 l -58561 4298 58614 3734 58719 3481 c -58831 3228 59007 3028 59254 2875 c -59501 2728 59854 2652 60313 2652 c -60660 2652 61112 2693 61677 2775 C -@c -F -%CHAR: 62388 0 (o) @t -63558 9149 m -63558 12535 64499 15046 66386 16675 c -67956 18027 69873 18709 72136 18709 c -74653 18709 76711 17886 78304 16234 c -79904 14587 80697 12312 80697 9407 c -80697 7050 80345 5198 79639 3851 c -78933 2499 77904 1452 76558 706 c -75206 -41 73736 -412 72136 -412 c -69579 -412 67509 406 65928 2052 c -64346 3692 63558 6056 63558 9149 c -@c -66745 9149 m -66745 6803 67256 5051 68279 3886 c -69302 2716 70590 2134 72136 2134 c -73677 2134 74959 2722 75982 3892 c -76999 5062 77511 6850 77511 9249 c -77511 11512 76999 13229 75970 14393 c -74941 15558 73665 16140 72136 16140 c -70590 16140 69302 15558 68279 14399 c -67256 13241 66745 11489 66745 9149 c -@c -F -%CHAR: 82003 0 (r) @t -84296 0 m -84296 18292 L -87083 18292 L -87083 15522 L -87794 16816 88453 17674 89059 18086 c -89658 18497 90323 18709 91046 18709 c -92093 18709 93151 18374 94233 17710 C -93163 14829 L -92410 15281 91652 15505 90893 15505 c -90211 15505 89605 15299 89064 14893 c -88524 14482 88141 13917 87912 13194 c -87565 12094 87395 10889 87395 9578 c -87395 0 L -84296 0 L -@c -F -%CHAR: 93751 0 (a) @t -108015 2258 m -106863 1282 105757 594 104699 188 c -103635 -212 102494 -412 101277 -412 c -99266 -412 97726 76 96644 1058 c -95568 2040 95027 3298 95027 4821 c -95027 5721 95227 6538 95638 7279 c -96044 8020 96579 8614 97238 9061 c -97902 9507 98643 9848 99472 10078 c -100078 10236 100995 10395 102224 10542 c -104728 10842 106575 11195 107756 11612 C -107768 12036 107774 12306 107774 12418 c -107774 13682 107480 14576 106892 15087 c -106104 15793 104922 16140 103364 16140 c -101906 16140 100830 15887 100130 15375 c -99437 14864 98925 13958 98590 12659 C -95562 13076 L -95838 14370 96291 15422 96920 16216 c -97549 17016 98466 17633 99660 18062 c -100854 18492 102235 18709 103811 18709 c -105375 18709 106639 18521 107615 18156 c -108591 17786 109309 17327 109773 16769 c -110232 16210 110549 15511 110737 14658 c -110837 14129 110890 13176 110890 11800 c -110890 7667 l -110890 4780 110955 2957 111090 2199 c -111219 1435 111484 700 111872 0 C -108632 0 L -108315 641 108103 1393 108015 2258 C -@c -107756 9184 m -106627 8720 104940 8331 102694 8008 c -101418 7826 100513 7620 99989 7391 c -99460 7161 99049 6826 98766 6379 c -98478 5938 98331 5450 98331 4910 c -98331 4080 98649 3393 99272 2840 c -99895 2293 100812 2017 102018 2017 c -103211 2017 104276 2275 105205 2799 c -106134 3322 106821 4039 107257 4945 c -107592 5644 107756 6679 107756 8043 c -107756 9184 L -@c -F -%CHAR: 113366 0 (g) @t -115124 -1517 m -118140 -1964 L -118264 -2893 118617 -3569 119187 -3998 c -119957 -4569 121010 -4857 122338 -4857 c -123779 -4857 124884 -4569 125666 -3998 c -126448 -3422 126972 -2616 127248 -1588 c -127413 -953 127483 370 127471 2393 C -126119 800 124432 0 122409 0 c -119892 0 117946 905 116570 2722 c -115195 4533 114501 6715 114501 9249 c -114501 10995 114818 12606 115447 14082 c -116082 15558 117000 16698 118199 17504 c -119399 18303 120810 18709 122427 18709 c -124584 18709 126366 17833 127765 16087 C -127765 18292 L -130629 18292 L -130629 2481 l -130629 -365 130335 -2387 129759 -3575 c -129176 -4763 128259 -5703 127001 -6391 c -125743 -7079 124196 -7426 122356 -7426 c -120175 -7426 118411 -6932 117070 -5950 c -115724 -4968 115077 -3493 115124 -1517 C -@c -117688 9472 m -117688 7073 118164 5321 119122 4222 c -120075 3116 121268 2569 122703 2569 c -124126 2569 125319 3116 126284 4210 c -127248 5309 127730 7026 127730 9372 c -127730 11612 127236 13300 126242 14435 c -125249 15569 124049 16140 122650 16140 c -121274 16140 120104 15581 119134 14458 c -118170 13341 117688 11677 117688 9472 c -@c -F -%CHAR: 132981 0 (e) @t -147827 5891 m -151032 5497 L -150526 3622 149591 2170 148227 1135 c -146857 106 145111 -412 142988 -412 c -140313 -412 138190 412 136626 2058 c -135057 3704 134275 6015 134275 8990 c -134275 12071 135068 14458 136650 16157 c -138237 17857 140289 18709 142818 18709 c -145264 18709 147263 17874 148809 16210 c -150361 14546 151137 12200 151137 9184 c -151137 8996 151132 8720 151120 8355 C -137479 8355 L -137591 6344 138161 4804 139184 3739 c -140207 2669 141477 2134 143006 2134 c -144141 2134 145111 2434 145916 3034 c -146722 3628 147357 4580 147827 5891 C -@c -137649 10907 m -147862 10907 L -147727 12441 147333 13600 146692 14364 c -145705 15558 144423 16157 142853 16157 c -141430 16157 140231 15681 139260 14729 c -138290 13776 137755 12500 137649 10907 C -@c -F -T -@rax 401.58879 657.52299 431.04161 671.34274 @E -[0.00028346 0.00000000 0.00000000 0.00028346 416.48058319 665.61616463] @tm - 0 O 0 @g -0.00 0.00 0.00 1.00 k -e - -% FontChange:/_ArialCE 28222.00000 z -%CHAR: -52535 0 (R) @t --50315 0 m --50315 20202 L --41359 20202 l --39558 20202 -38189 20019 -37253 19657 c --36317 19294 -35569 18655 -35004 17738 c --34445 16816 -34167 15800 -34167 14690 c --34167 13255 -34628 12051 -35559 11068 c --36486 10085 -37921 9459 -39859 9191 C --39148 8852 -38612 8518 -38245 8184 c --37464 7469 -36726 6571 -36025 5499 c --32511 0 L --35875 0 L --38546 4205 l --39327 5414 -39972 6345 -40480 6985 c --40983 7629 -41434 8081 -41834 8335 c --42234 8594 -42638 8772 -43052 8876 c --43358 8937 -43852 8970 -44543 8970 c --47643 8970 L --47643 0 L --50315 0 L -@c --47643 11284 m --41895 11284 l --40677 11284 -39718 11411 -39031 11665 c --38339 11919 -37817 12324 -37460 12879 c --37102 13434 -36924 14036 -36924 14690 c --36924 15644 -37267 16430 -37963 17046 c --38654 17662 -39750 17968 -41251 17968 c --47643 17968 L --47643 11284 L -@c -F -%CHAR: -32159 0 (e) @t --20282 4713 m --17719 4398 L --18123 2897 -18871 1736 -19962 908 c --21058 85 -22455 -329 -24153 -329 c --26294 -329 -27992 329 -29243 1646 c --30499 2963 -31124 4812 -31124 7192 c --31124 9657 -30489 11566 -29224 12926 c --27954 14285 -26312 14967 -24290 14967 c --22333 14967 -20734 14299 -19497 12968 c --18255 11637 -17634 9760 -17634 7347 c --17634 7197 -17639 6976 -17648 6684 C --28561 6684 L --28471 5075 -28015 3843 -27197 2992 c --26378 2135 -25362 1707 -24139 1707 c --23231 1707 -22455 1947 -21811 2427 c --21167 2902 -20659 3664 -20282 4713 C -@c --28424 8725 m --20254 8725 L --20362 9953 -20677 10880 -21190 11491 c --21980 12446 -23006 12926 -24262 12926 c --25400 12926 -26359 12545 -27135 11783 c --27912 11021 -28340 10000 -28424 8725 C -@c -F -%CHAR: -16468 0 (t) @t --9191 2220 m --8834 28 L --9530 -118 -10156 -193 -10706 -193 c --11609 -193 -12305 -52 -12804 235 c --13298 517 -13646 894 -13848 1359 c --14050 1820 -14154 2799 -14154 4285 c --14154 12705 L --15974 12705 L --15974 14633 L --14154 14633 L --14154 18260 L --11684 19746 L --11684 14633 L --9191 14633 L --9191 12705 L --11684 12705 L --11684 4149 l --11684 3438 -11642 2987 -11557 2785 c --11468 2582 -11327 2422 -11129 2300 c --10932 2183 -10650 2121 -10283 2121 c --10005 2121 -9643 2154 -9191 2220 C -@c -F -%CHAR: -8622 0 (r) @t --6788 0 m --6788 14633 L --4558 14633 L --4558 12418 L --3989 13452 -3462 14139 -2978 14468 c --2498 14798 -1966 14967 -1388 14967 c --551 14967 296 14699 1162 14167 C -306 11863 L --297 12225 -903 12404 -1510 12404 c --2056 12404 -2540 12239 -2973 11914 c --3406 11585 -3711 11134 -3895 10555 c --4172 9675 -4309 8711 -4309 7662 c --4309 0 L --6788 0 L -@c -F -%CHAR: 776 0 (i) @t -2648 17347 m -2648 20202 L -5132 20202 L -5132 17347 L -2648 17347 L -@c -2648 0 m -2648 14633 L -5132 14633 L -5132 0 L -2648 0 L -@c -F -%CHAR: 7041 0 (e) @t -18918 4713 m -21481 4398 L -21077 2897 20329 1736 19238 908 c -18142 85 16745 -329 15047 -329 c -12906 -329 11208 329 9957 1646 c -8701 2963 8076 4812 8076 7192 c -8076 9657 8711 11566 9976 12926 c -11246 14285 12888 14967 14910 14967 c -16867 14967 18466 14299 19703 12968 c -20945 11637 21566 9760 21566 7347 c -21566 7197 21561 6976 21552 6684 C -10639 6684 L -10729 5075 11185 3843 12003 2992 c -12822 2135 13838 1707 15061 1707 c -15969 1707 16745 1947 17389 2427 c -18033 2902 18541 3664 18918 4713 C -@c -10776 8725 m -18946 8725 L -18838 9953 18523 10880 18010 11491 c -17220 12446 16194 12926 14938 12926 c -13800 12926 12841 12545 12065 11783 c -11288 11021 10860 10000 10776 8725 C -@c -F -%CHAR: 22732 0 (v) @t -28659 0 m -23089 14633 L -25709 14633 L -28851 5870 l -29190 4925 29501 3942 29788 2921 C -30009 3692 30314 4619 30709 5706 c -33964 14633 L -36514 14633 L -30973 0 L -28659 0 L -@c -F -%CHAR: 36843 0 (e) @t -48720 4713 m -51283 4398 L -50879 2897 50131 1736 49040 908 c -47944 85 46547 -329 44849 -329 c -42708 -329 41010 329 39759 1646 c -38503 2963 37878 4812 37878 7192 c -37878 9657 38513 11566 39778 12926 c -41048 14285 42690 14967 44712 14967 c -46669 14967 48268 14299 49505 12968 c -50747 11637 51368 9760 51368 7347 c -51368 7197 51363 6976 51354 6684 C -40441 6684 L -40531 5075 40987 3843 41805 2992 c -42624 2135 43640 1707 44863 1707 c -45771 1707 46547 1947 47191 2427 c -47835 2902 48343 3664 48720 4713 C -@c -40578 8725 m -48748 8725 L -48640 9953 48325 10880 47812 11491 c -47022 12446 45996 12926 44740 12926 c -43602 12926 42643 12545 41867 11783 c -41090 11021 40662 10000 40578 8725 C -@c -F -%CHAR: -51745 -28222 (r) @t --49911 -28222 m --49911 -13589 L --47681 -13589 L --47681 -15804 L --47112 -14770 -46585 -14083 -46101 -13754 c --45621 -13424 -45089 -13255 -44511 -13255 c --43674 -13255 -42827 -13523 -41961 -14055 C --42817 -16359 L --43420 -15997 -44026 -15818 -44633 -15818 c --45179 -15818 -45663 -15983 -46096 -16308 c --46529 -16637 -46834 -17088 -47018 -17667 c --47295 -18547 -47432 -19511 -47432 -20560 c --47432 -28222 L --49911 -28222 L -@c -F -%CHAR: -42347 -28222 (a) @t --30936 -26416 m --31858 -27197 -32742 -27747 -33589 -28071 c --34440 -28391 -35353 -28551 -36326 -28551 c --37935 -28551 -39167 -28161 -40033 -27375 c --40894 -26590 -41326 -25583 -41326 -24365 c --41326 -23645 -41166 -22992 -40837 -22399 c --40513 -21806 -40085 -21331 -39558 -20974 c --39026 -20616 -38434 -20343 -37770 -20160 c --37286 -20033 -36552 -19906 -35569 -19788 c --33565 -19548 -32088 -19266 -31143 -18932 C --31133 -18594 -31129 -18377 -31129 -18288 c --31129 -17277 -31364 -16562 -31834 -16152 c --32465 -15588 -33410 -15310 -34657 -15310 c --35823 -15310 -36684 -15513 -37244 -15922 c --37799 -16331 -38208 -17055 -38476 -18095 C --40898 -17761 L --40677 -16726 -40315 -15884 -39812 -15249 c --39308 -14610 -38575 -14116 -37620 -13772 c --36665 -13429 -35560 -13255 -34299 -13255 c --33048 -13255 -32037 -13405 -31256 -13697 c --30475 -13993 -29901 -14360 -29530 -14807 c --29163 -15254 -28909 -15814 -28758 -16496 c --28678 -16919 -28636 -17681 -28636 -18782 c --28636 -22088 l --28636 -24398 -28584 -25856 -28476 -26463 c --28372 -27074 -28161 -27662 -27850 -28222 C --30442 -28222 L --30696 -27709 -30865 -27107 -30936 -26416 C -@c --31143 -20875 m --32046 -21246 -33396 -21557 -35193 -21816 c --36213 -21961 -36938 -22126 -37356 -22309 c --37780 -22493 -38109 -22761 -38335 -23119 c --38565 -23471 -38683 -23862 -38683 -24294 c --38683 -24958 -38429 -25508 -37930 -25950 c --37432 -26388 -36698 -26609 -35734 -26609 c --34779 -26609 -33927 -26402 -33184 -25983 c --32441 -25564 -31891 -24991 -31543 -24266 c --31275 -23706 -31143 -22879 -31143 -21787 c --31143 -20875 L -@c -F -%CHAR: -26656 -28222 (w) @t --22093 -28222 m --26571 -13589 L --24008 -13589 L --21680 -22037 L --20814 -25179 L --20776 -25019 -20522 -24012 -20057 -22159 c --17728 -13589 L --15179 -13589 L --12987 -22074 L --12253 -24873 L --11416 -22046 L --8909 -13589 L --6496 -13589 L --11073 -28222 L --13646 -28222 L --15974 -19459 L --16543 -16961 L --19502 -28222 L --22093 -28222 L -@c -F -%CHAR: 1566 -28222 (f) @t -4017 -28222 m -4017 -15517 L -1829 -15517 L -1829 -13589 L -4017 -13589 L -4017 -12032 l -4017 -11049 4106 -10315 4280 -9840 c -4520 -9196 4939 -8674 5541 -8274 c -6143 -7874 6985 -7676 8071 -7676 c -8767 -7676 9539 -7756 10385 -7926 C -10014 -10089 L -9501 -9995 9012 -9948 8551 -9948 c -7798 -9948 7267 -10108 6956 -10433 c -6641 -10753 6486 -11355 6486 -12239 c -6486 -13589 L -9336 -13589 L -9336 -15517 L -6486 -15517 L -6486 -28222 L -4017 -28222 L -@c -F -%CHAR: 9412 -28222 (i) @t -11284 -10875 m -11284 -8020 L -13768 -8020 L -13768 -10875 L -11284 -10875 L -@c -11284 -28222 m -11284 -13589 L -13768 -13589 L -13768 -28222 L -11284 -28222 L -@c -F -%CHAR: 15677 -28222 (l) @t -17483 -28222 m -17483 -8020 L -19962 -8020 L -19962 -28222 L -17483 -28222 L -@c -F -%CHAR: 21942 -28222 (e) @t -33819 -23509 m -36382 -23824 L -35978 -25325 35230 -26486 34139 -27314 c -33043 -28137 31646 -28551 29948 -28551 c -27807 -28551 26109 -27893 24858 -26576 c -23602 -25259 22977 -23410 22977 -21030 c -22977 -18565 23612 -16656 24877 -15296 c -26147 -13937 27789 -13255 29811 -13255 c -31768 -13255 33367 -13923 34604 -15254 c -35846 -16585 36467 -18462 36467 -20875 c -36467 -21025 36462 -21246 36453 -21538 C -25540 -21538 L -25630 -23147 26086 -24379 26904 -25230 c -27723 -26087 28739 -26515 29962 -26515 c -30870 -26515 31646 -26275 32290 -25795 c -32934 -25320 33442 -24558 33819 -23509 C -@c -25677 -19497 m -33847 -19497 L -33739 -18269 33424 -17342 32911 -16731 c -32121 -15776 31095 -15296 29839 -15296 c -28701 -15296 27742 -15677 26966 -16439 c -26189 -17201 25761 -18222 25677 -19497 C -@c -F -%CHAR: 37633 -28222 (s) @t -38503 -23852 m -40954 -23467 L -41090 -24450 41476 -25202 42106 -25729 c -42732 -26251 43611 -26515 44745 -26515 c -45883 -26515 46730 -26279 47280 -25818 c -47831 -25353 48108 -24807 48108 -24186 c -48108 -23622 47863 -23184 47374 -22860 c -47036 -22639 46189 -22361 44839 -22023 c -43023 -21562 41758 -21166 41057 -20828 c -40356 -20494 39820 -20028 39458 -19436 c -39096 -18843 38912 -18189 38912 -17474 c -38912 -16820 39063 -16218 39364 -15663 c -39660 -15103 40069 -14643 40582 -14276 c -40968 -13993 41495 -13749 42158 -13551 c -42826 -13354 43541 -13255 44303 -13255 c -45450 -13255 46457 -13424 47327 -13754 c -48197 -14083 48837 -14530 49251 -15094 c -49665 -15663 49947 -16416 50102 -17361 C -47680 -17695 L -47567 -16943 47247 -16355 46720 -15931 c -46194 -15508 45446 -15296 44482 -15296 c -43343 -15296 42530 -15484 42045 -15861 c -41556 -16237 41311 -16679 41311 -17182 c -41311 -17507 41415 -17794 41617 -18053 c -41819 -18321 42134 -18537 42567 -18716 c -42816 -18805 43546 -19017 44759 -19346 c -46514 -19817 47736 -20198 48428 -20499 c -49124 -20795 49670 -21232 50065 -21801 c -50460 -22371 50657 -23076 50657 -23923 c -50657 -24751 50413 -25527 49933 -26261 c -49449 -26990 48752 -27554 47845 -27954 c -46937 -28354 45907 -28551 44759 -28551 c -42854 -28551 41405 -28156 40408 -27366 c -39411 -26576 38776 -25405 38503 -23852 C -@c -F -T -@rax %Note: Object -362.81792 577.71128 456.05225 619.14898 @E - 0 O 0 @g -0.00 0.00 0.00 0.50 k -/$fm 0 def -362.81792 619.14898 m -456.05225 619.14898 L -456.05225 577.71128 L -362.81792 577.71128 L -362.81792 619.14898 L -@c -F - -@rax %Note: Object -359.83786 581.68318 452.91203 623.04945 @E - 0 O 0 @g -0.00 0.00 0.00 0.00 k -0 J 0 j [] 0 d 0 R 0 @G -0.00 0.00 0.00 1.00 K -0 0.49890 0.49890 0.00000 @w -/$fm 0 def -359.83786 623.04945 m -452.91203 623.04945 L -452.91203 581.68318 L -359.83786 581.68318 L -359.83786 623.04945 L -@c -B - -@rax 370.77279 593.58076 442.60044 610.97754 @E -[0.00028346 0.00000000 0.00000000 0.00028346 406.89352842 603.69758422] @tm - 0 O 0 @g -0.00 0.00 0.00 1.00 k -e - -% FontChange:/_ArialCE 35278.00000 z -%CHAR: -127426 0 (P) @t --124704 0 m --124704 25253 L --115179 25253 l --113503 25253 -112221 25171 -111339 25012 c --110099 24806 -109058 24412 -108217 23830 c --107382 23254 -106706 22437 -106195 21396 c --105683 20350 -105430 19203 -105430 17951 c --105430 15805 -106112 13982 -107476 12494 c --108846 11013 -111316 10266 -114885 10266 c --121364 10266 L --121364 0 L --124704 0 L -@c --121364 13247 m --114832 13247 l --112674 13247 -111139 13647 -110234 14452 c --109328 15258 -108876 16387 -108876 17845 c --108876 18903 -109140 19809 -109675 20561 c --110210 21314 -110910 21808 -111786 22049 c --112351 22196 -113385 22272 -114902 22272 c --121364 22272 L --121364 13247 L -@c -F -%CHAR: -103896 0 (r) @t --101603 0 m --101603 18292 L --98816 18292 L --98816 15522 L --98105 16816 -97446 17674 -96840 18086 c --96241 18497 -95576 18709 -94853 18709 c --93806 18709 -92748 18374 -91666 17710 C --92736 14829 L --93489 15281 -94247 15505 -95006 15505 c --95688 15505 -96294 15299 -96835 14893 c --97375 14482 -97758 13917 -97987 13194 c --98334 12094 -98504 10889 -98504 9578 c --98504 0 L --101603 0 L -@c -F -%CHAR: -92148 0 (i) @t --89808 21684 m --89808 25253 L --86703 25253 L --86703 21684 L --89808 21684 L -@c --89808 0 m --89808 18292 L --86703 18292 L --86703 0 L --89808 0 L -@c -F -%CHAR: -84316 0 (m) @t --81988 0 m --81988 18292 L --79218 18292 L --79218 15728 L --78642 16622 -77878 17345 -76925 17886 c --75973 18433 -74885 18709 -73668 18709 c --72316 18709 -71204 18427 -70340 17862 c --69470 17298 -68858 16516 -68506 15505 C --67053 17639 -65172 18709 -62855 18709 c --61038 18709 -59645 18203 -58669 17198 c --57693 16193 -57205 14646 -57205 12559 c --57205 0 L --60286 0 L --60286 11524 l --60286 12765 -60386 13658 -60586 14205 c --60791 14746 -61156 15187 -61679 15522 c --62208 15852 -62832 16022 -63543 16022 c --64831 16022 -65895 15593 -66748 14734 c --67594 13882 -68023 12512 -68023 10630 c --68023 0 L --71122 0 L --71122 11883 l --71122 13265 -71375 14299 -71881 14987 c --72386 15675 -73209 16022 -74362 16022 c --75232 16022 -76037 15793 -76778 15328 c --77519 14870 -78060 14199 -78389 13317 c --78724 12430 -78889 11154 -78889 9490 c --78889 0 L --81988 0 L -@c -F -%CHAR: -54929 0 (a) @t --40665 2258 m --41817 1282 -42923 594 -43981 188 c --45045 -212 -46186 -412 -47403 -412 c --49414 -412 -50954 76 -52036 1058 c --53112 2040 -53653 3298 -53653 4821 c --53653 5721 -53453 6538 -53042 7279 c --52636 8020 -52101 8614 -51442 9061 c --50778 9507 -50037 9848 -49208 10078 c --48602 10236 -47685 10395 -46456 10542 c --43952 10842 -42105 11195 -40924 11612 C --40912 12036 -40906 12306 -40906 12418 c --40906 13682 -41200 14576 -41788 15087 c --42576 15793 -43758 16140 -45316 16140 c --46774 16140 -47850 15887 -48550 15375 c --49243 14864 -49755 13958 -50090 12659 C --53118 13076 L --52842 14370 -52389 15422 -51760 16216 c --51131 17016 -50214 17633 -49020 18062 c --47826 18492 -46445 18709 -44869 18709 c --43305 18709 -42041 18521 -41065 18156 c --40089 17786 -39371 17327 -38907 16769 c --38448 16210 -38131 15511 -37943 14658 c --37843 14129 -37790 13176 -37790 11800 c --37790 7667 l --37790 4780 -37725 2957 -37590 2199 c --37461 1435 -37196 700 -36808 0 C --40048 0 L --40365 641 -40577 1393 -40665 2258 C -@c --40924 9184 m --42053 8720 -43740 8331 -45986 8008 c --47262 7826 -48167 7620 -48691 7391 c --49220 7161 -49631 6826 -49914 6379 c --50202 5938 -50349 5450 -50349 4910 c --50349 4080 -50031 3393 -49408 2840 c --48785 2293 -47868 2017 -46662 2017 c --45469 2017 -44404 2275 -43475 2799 c --42546 3322 -41859 4039 -41423 4945 c --41088 5644 -40924 6679 -40924 8043 c --40924 9184 L -@c -F -%CHAR: -35314 0 (r) @t --33021 0 m --33021 18292 L --30234 18292 L --30234 15522 L --29523 16816 -28864 17674 -28258 18086 c --27659 18497 -26994 18709 -26271 18709 c --25224 18709 -24166 18374 -23084 17710 C --24154 14829 L --24907 15281 -25665 15505 -26424 15505 c --27106 15505 -27712 15299 -28253 14893 c --28793 14482 -29176 13917 -29405 13194 c --29752 12094 -29922 10889 -29922 9578 c --29922 0 L --33021 0 L -@c -F -%CHAR: -23566 0 (y) @t --21379 -7044 m --21726 -4133 L --21044 -4316 -20456 -4410 -19950 -4410 c --19262 -4410 -18709 -4292 -18298 -4063 c --17880 -3834 -17545 -3516 -17281 -3099 c --17081 -2793 -16769 -2023 -16334 -794 c --16275 -617 -16181 -370 -16058 -35 C --22996 18292 L --19656 18292 L --15846 7702 l --15358 6356 -14911 4945 -14523 3463 C --14164 4886 -13741 6274 -13247 7632 c --9337 18292 L --6239 18292 L --13194 -312 l --13941 -2322 -14523 -3704 -14935 -4463 c --15487 -5486 -16116 -6232 -16828 -6709 c --17545 -7185 -18392 -7426 -19380 -7426 c --19979 -7426 -20644 -7297 -21379 -7044 C -@c -F -%CHAR: 3880 0 (S) @t -5468 8114 m -8619 8390 L -8766 7126 9113 6091 9660 5280 c -10207 4469 11053 3816 12200 3316 c -13346 2816 14640 2569 16074 2569 c -17350 2569 18473 2758 19449 3134 c -20425 3516 21154 4033 21631 4692 c -22107 5356 22348 6074 22348 6856 c -22348 7649 22119 8337 21654 8931 c -21196 9525 20437 10019 19385 10419 c -18703 10683 17209 11095 14887 11653 c -12570 12212 10941 12735 10012 13229 c -8807 13858 7908 14646 7314 15581 c -6726 16516 6432 17563 6432 18727 c -6432 19997 6790 21190 7514 22296 c -8237 23407 9295 24248 10683 24824 c -12076 25394 13617 25682 15316 25682 c -17192 25682 18838 25383 20273 24777 c -21701 24177 22801 23289 23571 22119 c -24335 20949 24753 19620 24812 18139 C -21607 17898 L -21431 19491 20849 20702 19855 21514 c -18861 22331 17397 22737 15457 22737 c -13434 22737 11965 22366 11036 21625 c -10112 20885 9648 19991 9648 18950 c -9648 18039 9977 17292 10630 16710 c -11277 16122 12952 15522 15669 14911 c -18385 14293 20249 13758 21260 13300 c -22730 12618 23818 11759 24518 10725 c -25217 9684 25564 8484 25564 7132 c -25564 5786 25182 4521 24412 3334 c -23642 2146 22536 1223 21096 559 c -19655 -100 18032 -429 16233 -429 c -13946 -429 12029 -100 10489 570 c -8942 1235 7731 2234 6849 3575 c -5973 4910 5509 6426 5468 8114 C -@c -F -%CHAR: 27410 0 (t) @t -36506 2775 m -36953 35 L -36083 -147 35301 -241 34613 -241 c -33484 -241 32614 -65 31990 294 c -31373 647 30938 1117 30685 1699 c -30432 2275 30303 3498 30303 5356 c -30303 15881 L -28027 15881 L -28027 18292 L -30303 18292 L -30303 22825 L -33390 24683 L -33390 18292 L -36506 18292 L -36506 15881 L -33390 15881 L -33390 5186 l -33390 4298 33443 3734 33548 3481 c -33660 3228 33836 3028 34083 2875 c -34330 2728 34683 2652 35142 2652 c -35489 2652 35941 2693 36506 2775 C -@c -F -%CHAR: 37217 0 (o) @t -38387 9149 m -38387 12535 39328 15046 41215 16675 c -42785 18027 44702 18709 46965 18709 c -49482 18709 51540 17886 53133 16234 c -54733 14587 55526 12312 55526 9407 c -55526 7050 55174 5198 54468 3851 c -53762 2499 52733 1452 51387 706 c -50035 -41 48565 -412 46965 -412 c -44408 -412 42338 406 40757 2052 c -39175 3692 38387 6056 38387 9149 c -@c -41574 9149 m -41574 6803 42085 5051 43108 3886 c -44131 2716 45419 2134 46965 2134 c -48506 2134 49788 2722 50811 3892 c -51828 5062 52340 6850 52340 9249 c -52340 11512 51828 13229 50799 14393 c -49770 15558 48494 16140 46965 16140 c -45419 16140 44131 15558 43108 14399 c -42085 13241 41574 11489 41574 9149 c -@c -F -%CHAR: 56832 0 (r) @t -59125 0 m -59125 18292 L -61912 18292 L -61912 15522 L -62623 16816 63282 17674 63888 18086 c -64487 18497 65152 18709 65875 18709 c -66922 18709 67980 18374 69062 17710 C -67992 14829 L -67239 15281 66481 15505 65722 15505 c -65040 15505 64434 15299 63893 14893 c -63353 14482 62970 13917 62741 13194 c -62394 12094 62224 10889 62224 9578 c -62224 0 L -59125 0 L -@c -F -%CHAR: 68580 0 (a) @t -82844 2258 m -81692 1282 80586 594 79528 188 c -78464 -212 77323 -412 76106 -412 c -74095 -412 72555 76 71473 1058 c -70397 2040 69856 3298 69856 4821 c -69856 5721 70056 6538 70467 7279 c -70873 8020 71408 8614 72067 9061 c -72731 9507 73472 9848 74301 10078 c -74907 10236 75824 10395 77053 10542 c -79557 10842 81404 11195 82585 11612 C -82597 12036 82603 12306 82603 12418 c -82603 13682 82309 14576 81721 15087 c -80933 15793 79751 16140 78193 16140 c -76735 16140 75659 15887 74959 15375 c -74266 14864 73754 13958 73419 12659 C -70391 13076 L -70667 14370 71120 15422 71749 16216 c -72378 17016 73295 17633 74489 18062 c -75683 18492 77064 18709 78640 18709 c -80204 18709 81468 18521 82444 18156 c -83420 17786 84138 17327 84602 16769 c -85061 16210 85378 15511 85566 14658 c -85666 14129 85719 13176 85719 11800 c -85719 7667 l -85719 4780 85784 2957 85919 2199 c -86048 1435 86313 700 86701 0 C -83461 0 L -83144 641 82932 1393 82844 2258 C -@c -82585 9184 m -81456 8720 79769 8331 77523 8008 c -76247 7826 75342 7620 74818 7391 c -74289 7161 73878 6826 73595 6379 c -73307 5938 73160 5450 73160 4910 c -73160 4080 73478 3393 74101 2840 c -74724 2293 75641 2017 76847 2017 c -78040 2017 79105 2275 80034 2799 c -80963 3322 81650 4039 82086 4945 c -82421 5644 82585 6679 82585 8043 c -82585 9184 L -@c -F -%CHAR: 88195 0 (g) @t -89953 -1517 m -92969 -1964 L -93093 -2893 93446 -3569 94016 -3998 c -94786 -4569 95839 -4857 97167 -4857 c -98608 -4857 99713 -4569 100495 -3998 c -101277 -3422 101801 -2616 102077 -1588 c -102242 -953 102312 370 102300 2393 C -100948 800 99261 0 97238 0 c -94721 0 92775 905 91399 2722 c -90024 4533 89330 6715 89330 9249 c -89330 10995 89647 12606 90276 14082 c -90911 15558 91829 16698 93028 17504 c -94228 18303 95639 18709 97256 18709 c -99413 18709 101195 17833 102594 16087 C -102594 18292 L -105458 18292 L -105458 2481 l -105458 -365 105164 -2387 104588 -3575 c -104005 -4763 103088 -5703 101830 -6391 c -100572 -7079 99025 -7426 97185 -7426 c -95004 -7426 93240 -6932 91899 -5950 c -90553 -4968 89906 -3493 89953 -1517 C -@c -92517 9472 m -92517 7073 92993 5321 93951 4222 c -94904 3116 96097 2569 97532 2569 c -98955 2569 100148 3116 101113 4210 c -102077 5309 102559 7026 102559 9372 c -102559 11612 102065 13300 101071 14435 c -100078 15569 98878 16140 97479 16140 c -96103 16140 94933 15581 93963 14458 c -92999 13341 92517 11677 92517 9472 c -@c -F -%CHAR: 107810 0 (e) @t -122656 5891 m -125861 5497 L -125355 3622 124420 2170 123056 1135 c -121686 106 119940 -412 117817 -412 c -115142 -412 113019 412 111455 2058 c -109886 3704 109104 6015 109104 8990 c -109104 12071 109897 14458 111479 16157 c -113066 17857 115118 18709 117647 18709 c -120093 18709 122092 17874 123638 16210 c -125190 14546 125966 12200 125966 9184 c -125966 8996 125961 8720 125949 8355 C -112308 8355 L -112420 6344 112990 4804 114013 3739 c -115036 2669 116306 2134 117835 2134 c -118970 2134 119940 2434 120745 3034 c -121551 3628 122186 4580 122656 5891 C -@c -112478 10907 m -122691 10907 L -122556 12441 122162 13600 121521 14364 c -120534 15558 119252 16157 117682 16157 c -116259 16157 115060 15681 114089 14729 c -113119 13776 112584 12500 112478 10907 C -@c -F -%CHAR: -72551 -35278 (b) @t --67365 -35278 m --70240 -35278 L --70240 -10025 L --67142 -10025 L --67142 -19032 L --65831 -17392 -64161 -16569 -62132 -16569 c --61003 -16569 -59939 -16798 -58934 -17251 c --57928 -17704 -57105 -18345 -56452 -19162 c --55806 -19985 -55294 -20973 -54930 -22137 c --54559 -23295 -54377 -24536 -54377 -25853 c --54377 -28993 -55153 -31415 -56705 -33126 c --58252 -34837 -60116 -35690 -62285 -35690 c --64443 -35690 -66136 -34790 -67365 -32985 C --67365 -35278 L -@c --67400 -25994 m --67400 -28187 -67101 -29769 -66507 -30745 c --65531 -32344 -64208 -33144 -62544 -33144 c --61186 -33144 -60016 -32556 -59028 -31374 c --58040 -30198 -57546 -28446 -57546 -26112 c --57546 -23724 -58022 -21961 -58969 -20826 c --59916 -19691 -61062 -19121 -62403 -19121 c --63761 -19121 -64931 -19709 -65919 -20885 c --66907 -22061 -67400 -23766 -67400 -25994 c -@c -F -%CHAR: -52936 -35278 (a) @t --38672 -33020 m --39824 -33996 -40930 -34684 -41988 -35090 c --43052 -35490 -44193 -35690 -45410 -35690 c --47421 -35690 -48961 -35202 -50043 -34220 c --51119 -33238 -51660 -31980 -51660 -30457 c --51660 -29557 -51460 -28740 -51049 -27999 c --50643 -27258 -50108 -26664 -49449 -26217 c --48785 -25771 -48044 -25430 -47215 -25200 c --46609 -25042 -45692 -24883 -44463 -24736 c --41959 -24436 -40112 -24083 -38931 -23666 C --38919 -23242 -38913 -22972 -38913 -22860 c --38913 -21596 -39207 -20702 -39795 -20191 c --40583 -19485 -41765 -19138 -43323 -19138 c --44781 -19138 -45857 -19391 -46557 -19903 c --47250 -20414 -47762 -21320 -48097 -22619 C --51125 -22202 L --50849 -20908 -50396 -19856 -49767 -19062 c --49138 -18262 -48221 -17645 -47027 -17216 c --45833 -16786 -44452 -16569 -42876 -16569 c --41312 -16569 -40048 -16757 -39072 -17122 c --38096 -17492 -37378 -17951 -36914 -18509 c --36455 -19068 -36138 -19767 -35950 -20620 c --35850 -21149 -35797 -22102 -35797 -23478 c --35797 -27611 l --35797 -30498 -35732 -32321 -35597 -33079 c --35468 -33843 -35203 -34578 -34815 -35278 C --38055 -35278 L --38372 -34637 -38584 -33885 -38672 -33020 C -@c --38931 -26094 m --40060 -26558 -41747 -26947 -43993 -27270 c --45269 -27452 -46174 -27658 -46698 -27887 c --47227 -28117 -47638 -28452 -47921 -28899 c --48209 -29340 -48356 -29828 -48356 -30368 c --48356 -31198 -48038 -31885 -47415 -32438 c --46792 -32985 -45875 -33261 -44669 -33261 c --43476 -33261 -42411 -33003 -41482 -32479 c --40553 -31956 -39866 -31239 -39430 -30333 c --39095 -29634 -38931 -28599 -38931 -27235 c --38931 -26094 L -@c -F -%CHAR: -33321 -35278 (c) @t --19057 -28575 m --16011 -28975 L --16341 -31074 -17193 -32720 -18569 -33908 c --19939 -35096 -21626 -35690 -23625 -35690 c --26124 -35690 -28141 -34872 -29658 -33238 c --31181 -31603 -31945 -29257 -31945 -26200 c --31945 -24224 -31616 -22496 -30963 -21014 c --30305 -19532 -29311 -18421 -27971 -17680 c --26636 -16939 -25178 -16569 -23608 -16569 c --21620 -16569 -19992 -17075 -18734 -18080 c --17469 -19085 -16658 -20508 -16299 -22360 C --19316 -22825 L --19604 -21596 -20109 -20673 -20838 -20050 c --21568 -19432 -22449 -19121 -23484 -19121 c --25048 -19121 -26318 -19679 -27294 -20802 c --28270 -21919 -28758 -23689 -28758 -26112 c --28758 -28569 -28288 -30357 -27341 -31474 c --26401 -32585 -25172 -33144 -23655 -33144 c --22438 -33144 -21426 -32767 -20609 -32021 c --19792 -31274 -19274 -30127 -19057 -28575 C -@c -F -%CHAR: -15682 -35278 (k) @t --13342 -35278 m --13342 -10025 L --10237 -10025 L --10237 -24424 L --2900 -16986 L -1110 -16986 L --5881 -23771 L -1822 -35278 L --2006 -35278 L --8050 -25923 L --10237 -28028 L --10237 -35278 L --13342 -35278 L -@c -F -%CHAR: 1957 -35278 (-) @t -3074 -27699 m -3074 -24583 L -12605 -24583 L -12605 -27699 L -3074 -27699 L -@c -F -%CHAR: 13705 -35278 (e) @t -28551 -29387 m -31756 -29781 L -31250 -31656 30315 -33108 28951 -34143 c -27581 -35172 25835 -35690 23712 -35690 c -21037 -35690 18914 -34866 17350 -33220 c -15781 -31574 14999 -29263 14999 -26288 c -14999 -23207 15792 -20820 17374 -19121 c -18961 -17421 21013 -16569 23542 -16569 c -25988 -16569 27987 -17404 29533 -19068 c -31085 -20732 31861 -23078 31861 -26094 c -31861 -26282 31856 -26558 31844 -26923 C -18203 -26923 L -18315 -28934 18885 -30474 19908 -31539 c -20931 -32609 22201 -33144 23730 -33144 c -24865 -33144 25835 -32844 26640 -32244 c -27446 -31650 28081 -30698 28551 -29387 C -@c -18373 -24371 m -28586 -24371 L -28451 -22837 28057 -21678 27416 -20914 c -26429 -19720 25147 -19121 23577 -19121 c -22154 -19121 20955 -19597 19984 -20549 c -19014 -21502 18479 -22778 18373 -24371 C -@c -F -%CHAR: 33320 -35278 (n) @t -35648 -35278 m -35648 -16986 L -38435 -16986 L -38435 -19585 L -39782 -17574 41722 -16569 44256 -16569 c -45362 -16569 46373 -16769 47296 -17163 c -48225 -17563 48913 -18080 49371 -18727 c -49836 -19368 50153 -20132 50342 -21014 c -50453 -21590 50512 -22596 50512 -24030 c -50512 -35278 L -47408 -35278 L -47408 -24148 l -47408 -22890 47290 -21943 47049 -21314 c -46808 -20691 46379 -20191 45767 -19820 c -45150 -19444 44433 -19256 43604 -19256 c -42281 -19256 41146 -19679 40182 -20514 c -39223 -21355 38747 -22942 38747 -25288 c -38747 -35278 L -35648 -35278 L -@c -F -%CHAR: 52935 -35278 (d) @t -67129 -35278 m -67129 -32967 L -65970 -34784 64265 -35690 62013 -35690 c -60555 -35690 59214 -35290 57992 -34484 c -56769 -33685 55822 -32562 55146 -31115 c -54475 -29675 54140 -28022 54140 -26147 c -54140 -24324 54446 -22666 55052 -21179 c -55663 -19691 56575 -18550 57792 -17762 c -59009 -16969 60373 -16569 61878 -16569 c -62977 -16569 63959 -16804 64818 -17269 c -65682 -17733 66382 -18339 66923 -19085 C -66923 -10025 L -70004 -10025 L -70004 -35278 L -67129 -35278 L -@c -57327 -26147 m -57327 -28493 57821 -30245 58809 -31403 c -59797 -32562 60961 -33144 62307 -33144 c -63660 -33144 64812 -32585 65759 -31480 c -66705 -30374 67181 -28681 67181 -26406 c -67181 -23901 66699 -22066 65735 -20896 c -64771 -19720 63583 -19138 62166 -19138 c -60790 -19138 59638 -19703 58715 -20826 c -57792 -21949 57327 -23724 57327 -26147 c -@c -F -T -@rax %Note: Object -389.39924 702.30643 411.00236 713.59625 @E - 0 O 0 @g -0.00 0.00 0.00 0.50 k -/$fm 0 def -389.39924 713.59654 m -411.00236 713.59654 L -411.00236 702.30643 L -389.39924 702.30643 L -389.39924 713.59654 L -@c -F - -@rax %Note: Object -388.45786 703.38926 409.69219 714.65924 @E - 0 O 0 @g -0.00 0.00 0.00 0.00 k -0 J 0 j [] 0 d 0 R 0 @G -0.00 0.00 0.00 1.00 K -0 0.49890 0.49890 0.00000 @w -/$fm 0 def -388.45786 714.65924 m -409.69276 714.65924 L -409.69276 703.38841 L -388.45786 703.38841 L -388.45786 714.65924 L -@c -B - -@rax %Note: Object -387.64828 700.86472 409.25140 712.15455 @E - 0 O 0 @g -0.00 0.00 0.00 0.50 k -/$fm 0 def -387.64828 712.15483 m -409.25140 712.15483 L -409.25140 700.86472 L -387.64828 700.86472 L -387.64828 712.15483 L -@c -F - -@rax %Note: Object -386.70690 701.94756 407.94123 713.21754 @E - 0 O 0 @g -0.00 0.00 0.00 0.00 k -0 J 0 j [] 0 d 0 R 0 @G -0.00 0.00 0.00 1.00 K -0 0.49890 0.49890 0.00000 @w -/$fm 0 def -386.70690 713.21754 m -407.94180 713.21754 L -407.94180 701.94671 L -386.70690 701.94671 L -386.70690 713.21754 L -@c -B - -@rax %Note: Object -385.89761 699.03213 407.50072 710.32195 @E - 0 O 0 @g -0.00 0.00 0.00 0.50 k -/$fm 0 def -385.89761 710.32224 m -407.50072 710.32224 L -407.50072 699.03213 L -385.89761 699.03213 L -385.89761 710.32224 L -@c -F - -@rax %Note: Object -384.95622 700.11496 406.19055 711.38494 @E - 0 O 0 @g -0.00 0.00 0.00 0.00 k -0 J 0 j [] 0 d 0 R 0 @G -0.00 0.00 0.00 1.00 K -0 0.49890 0.49890 0.00000 @w -/$fm 0 def -384.95622 711.38494 m -406.19112 711.38494 L -406.19112 700.11411 L -384.95622 700.11411 L -384.95622 711.38494 L -@c -B - -@rax %Note: Object -395.69272 623.18154 395.88661 699.87118 @E -0 J 0 j [] 0 d 0 R 0 @G -0.00 0.00 0.00 1.00 K -0 0.86740 0.86740 0.00000 @w -/$fm 0 def -395.88661 623.18154 m -395.70151 696.32504 L -S -@j -0.00 0.00 0.00 1.00 K -0.00 0.00 0.00 1.00 k -0 @g -0 @G -[] 0 d 0 J 0 j -0 R 0 O -0 1.00800 1.00800 0 @w -395.69272 699.87118 m -392.68658 692.80753 L -394.70003 693.82063 396.71603 693.82573 398.73458 692.82283 C -395.69272 699.87118 L -f -@J - -@rax %Note: Object -345.43928 563.54088 465.93865 777.17197 @E -0 J 0 j [] 0 d 0 R 0 @G -0.00 0.00 0.00 1.00 K -0 0.21543 0.21543 0.00000 @w -/$fm 0 def -345.43928 777.17197 m -465.93865 777.17197 L -465.93865 563.54088 L -345.43928 563.54088 L -345.43928 777.17197 L -@c -S - -%%PageTrailer -@rs -@rs -%%Trailer -@EndSysCorelDict -end -%%DocumentSuppliedResources: procset wCorel8Dict -%%EOF diff --git a/org.glite.jp/doc/users-quide/JP-interactions.pdf b/org.glite.jp/doc/users-quide/JP-interactions.pdf dele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E;V911cc+Ukgw~qfuzU8TbQJMk^>VJ94l9 zufH&~BC~Y=z);G}Ir;~NR8aW`#!Nu`w;mG7tmr?u3M&771{%fe_Mdq)ssq`BMEyP( z7UUojpaQ_mDHP@i9P|T#>3KO*fP-c*hfxm)*gzaC*-T0`2@pM9WskFzxWLcQ{{h(^ Z%#Sb4flB*c9A&f;N&zG-t!;81^lxKn@QDBb diff --git a/org.glite.jp/doc/users-quide/JP-query.cdr b/org.glite.jp/doc/users-quide/JP-query.cdr deleted file mode 100755 index eaff6f8233fe13d6604d773c9b34b906feac7977..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 37774 zcmeHQ3wTu3wcg1jA%whx@(^{XY2_kFV0@%%B|vXZ0AvgRK_CQ#fe66P0U!v3fG`jN zC@=s7fe;V|A^-;o06`!GgnXZ08}~v z1c49`1|k3_5&(ig2nYiafRhUVK_CQ#fe3&BFnUn_h42{$A^?pL0D?dW2m=v-h6w;c zAOwVg2tZ>6fFKY8!axL|0Run~2mxUr0??=dAP9tjFc1MC2>MWyko*hdGXl`~0U!v3 zfG`jN=#T&q1VTU}xJpcrO5D*3;00SWa1c49`1|k51BLD<}5D*3;00Slf1c49`1|k4HpbzLk2nYia z01eQG9->vKNksmE8Tx<@gn%#*0U!YSfDVL!Fc1MC6#9S;gn%#*0Wc8s0UZbdVITrv za0~%D5CXzL1mKaCl_f@x9xcX=8z)Xb{d6&7#tczbRwfoKSRj@xSt43nTg8eME5z#6 ztHlEkJRqKU;t8=~!v^ukBibR?+3#^|xv0 z(v>o_ef5y~+)W=zw`lw67M!7%VGv5BW4#Y{i4s3-Vpq@J<5epej1pCWu7C;!B~;B*Em@%{Y6}R5OFlb~tNBgOlj2Nfs~rV{*{5dn>P3>tGpXwg@aa ztInF@jADOUp6<28p~#w~Py=}w?MB_G=|&F@-2_gls;!5*d5wApisMqVhIPo-x?0UB zk;7|T2NNp}QM%Phbk-CPuLsQ?^XzqTItO(IrXkEFT^iVJWwP2QZ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_ch_|^?n#hn@C@qIMG=0L+|~bA689~(YOUs z(cfsKFI5mZqcPSPe0OOQK}OtX`jZeoUTt3;T{k zCt6RgZo0d!WT84aL%pXaoD_GJ-O~hIP^CT=}Q$o&Nz%U2KgOv zI2r`*JsyUm+%3};pjp8t{O-Eke2lyMn6k(x?s_Co+*g$@ZfmgKC3Dl)EcA)ApXQ0I znsjkoo%Jpmf3cq5Px&!<{qF6NcqhI62hJU@MA?1x=MI~u-J^FO`A+&>kHmi`{g~T) z;t6) z#qU~q+f5(+J^0D^)hY66U+gt}(Scyl*F_P^1e*Hw>o?_h4)lG~eaX`)TprHc)&7-F zN{j~Mq}s=wks9|sXg%kX)(jW>a4*yEIJ)WD7OU?bE^Zl>XWHUdgA|wBV86kB-&E%S zyX}XcG|4kZL@rmqeiiHc<$IpW5mU#iUqiFUrJL@q>$rS+kbF^cx6>DikR$j``svFo zU+8Zrm?O>|t9-$Kp=bZqIQ<)r^GG*-!|_6t30`{q7k|9Q@kUsmqZpKP0P=eMY8-#N zk@r&fnEKZm(AHsU!dZ diff --git a/org.glite.jp/doc/users-quide/JP-query.eps b/org.glite.jp/doc/users-quide/JP-query.eps deleted file mode 100755 index f5c7c96..0000000 --- a/org.glite.jp/doc/users-quide/JP-query.eps +++ /dev/null @@ -1,4202 +0,0 @@ -%!PS-Adobe-3.0 EPSF-3.0 -%%BoundingBox: 345.33156 563.43317 683.08072 780.51203 -%%Creator: CorelDRAW 8 -%%Title: C:\temp\JP-query.eps -%%CreationDate: Thu Feb 09 10:17:49 2006 -%%DocumentProcessColors: Black -%%DocumentSuppliedResources: (atend) -%%EndComments -%%BeginProlog -/AutoFlatness false def -/AutoSteps 0 def -/CMYKMarks true def -/UseLevel 1 def -%Color profile: PROFILES.CCM - Obecný profil tiskárny CMYK - Žád. -%%BeginResource: procset wCorel8Dict 8.0 0 -/wCorel8Dict 300 dict def wCorel8Dict begin -% Copyright (c)1992-97 Corel Corporation -% All rights reserved. v8.0 r0.7 -/bd{bind def}bind def/ld{load def}bd/xd{exch def}bd/_ null def/rp{{pop}repeat} -bd/@cp/closepath ld/@gs/gsave ld/@gr/grestore ld/@np/newpath ld/Tl/translate ld -/$sv 0 def/@sv{/$sv save def}bd/@rs{$sv restore}bd/spg/showpage ld/showpage{} -bd currentscreen/@dsp xd/$dsp/@dsp def/$dsa xd/$dsf xd/$sdf false def/$SDF -false def/$Scra 0 def/SetScr/setscreen ld/setscreen{pop pop pop}bd/@ss{2 index -0 eq{$dsf 3 1 roll 4 -1 roll pop}if exch $Scra add exch load SetScr}bd -/SepMode_5 where{pop}{/SepMode_5 0 def}ifelse/CurrentInkName_5 where{pop} -{/CurrentInkName_5(Composite)def}ifelse/$ink_5 where{pop}{/$ink_5 -1 def} -ifelse/$c 0 def/$m 0 def/$y 0 def/$k 0 def/$t 1 def/$n _ def/$o 0 def/$fil 0 -def/$C 0 def/$M 0 def/$Y 0 def/$K 0 def/$T 1 def/$N _ def/$O 0 def/$PF false -def/s1c 0 def/s1m 0 def/s1y 0 def/s1k 0 def/s1t 0 def/s1n _ def/$bkg false def -/SK 0 def/SM 0 def/SY 0 def/SC 0 def/$op false def matrix currentmatrix/$ctm xd -/$ptm matrix def/$ttm matrix def/$stm matrix def/$ffpnt true def -/CorelDrawReencodeVect[16#0/grave 16#5/breve 16#6/dotaccent 16#8/ring -16#A/hungarumlaut 16#B/ogonek 16#C/caron 16#D/dotlessi 16#27/quotesingle -16#60/grave 16#7C/bar -16#82/quotesinglbase/florin/quotedblbase/ellipsis/dagger/daggerdbl -16#88/circumflex/perthousand/Scaron/guilsinglleft/OE -16#91/quoteleft/quoteright/quotedblleft/quotedblright/bullet/endash/emdash -16#98/tilde/trademark/scaron/guilsinglright/oe 16#9F/Ydieresis -16#A1/exclamdown/cent/sterling/currency/yen/brokenbar/section -16#a8/dieresis/copyright/ordfeminine/guillemotleft/logicalnot/minus/registered/macron -16#b0/degree/plusminus/twosuperior/threesuperior/acute/mu/paragraph/periodcentered -16#b8/cedilla/onesuperior/ordmasculine/guillemotright/onequarter/onehalf/threequarters/questiondown -16#c0/Agrave/Aacute/Acircumflex/Atilde/Adieresis/Aring/AE/Ccedilla -16#c8/Egrave/Eacute/Ecircumflex/Edieresis/Igrave/Iacute/Icircumflex/Idieresis -16#d0/Eth/Ntilde/Ograve/Oacute/Ocircumflex/Otilde/Odieresis/multiply -16#d8/Oslash/Ugrave/Uacute/Ucircumflex/Udieresis/Yacute/Thorn/germandbls -16#e0/agrave/aacute/acircumflex/atilde/adieresis/aring/ae/ccedilla -16#e8/egrave/eacute/ecircumflex/edieresis/igrave/iacute/icircumflex/idieresis -16#f0/eth/ntilde/ograve/oacute/ocircumflex/otilde/odieresis/divide -16#f8/oslash/ugrave/uacute/ucircumflex/udieresis/yacute/thorn/ydieresis]def -/L2?/languagelevel where{pop languagelevel 2 ge}{false}ifelse def -/@BeginSysCorelDict{systemdict/Corel30Dict known{systemdict/Corel30Dict get -exec}if systemdict/CorelLexDict known{1 systemdict/CorelLexDict get exec}if}bd -/@EndSysCorelDict{systemdict/Corel30Dict known{end}if/EndCorelLexDict where -{pop EndCorelLexDict}if}bd AutoFlatness{/@ifl{dup currentflat exch sub 10 gt{ -([Error: PathTooComplex; OffendingCommand: AnyPaintingOperator]\n)print flush -@np exit}{currentflat 2 add setflat}ifelse}bd/@fill/fill ld/fill{currentflat{ -{@fill}stopped{@ifl}{exit}ifelse}bind loop setflat}bd/@eofill/eofill ld/eofill -{currentflat{{@eofill}stopped{@ifl}{exit}ifelse}bind loop setflat}bd/@clip -/clip ld/clip{currentflat{{@clip}stopped{@ifl}{exit}ifelse}bind loop setflat} -bd/@eoclip/eoclip ld/eoclip{currentflat{{@eoclip}stopped{@ifl}{exit}ifelse} -bind loop setflat}bd/@stroke/stroke ld/stroke{currentflat{{@stroke}stopped -{@ifl}{exit}ifelse}bind loop setflat}bd}if L2?{/@ssa{true setstrokeadjust}bd}{ -/@ssa{}bd}ifelse/d/setdash ld/j/setlinejoin ld/J/setlinecap ld/M/setmiterlimit -ld/w/setlinewidth ld/O{/$o xd}bd/R{/$O xd}bd/W/eoclip ld/c/curveto ld/C/c ld/l -/lineto ld/L/l ld/rl/rlineto ld/m/moveto ld/n/newpath ld/N/newpath ld/P{11 rp} -bd/u{}bd/U{}bd/A{pop}bd/q/@gs ld/Q/@gr ld/&{}bd/@j{@sv @np}bd/@J{@rs}bd/g{1 -exch sub/$k xd/$c 0 def/$m 0 def/$y 0 def/$t 1 def/$n _ def/$fil 0 def}bd/G{1 -sub neg/$K xd _ 1 0 0 0/$C xd/$M xd/$Y xd/$T xd/$N xd}bd/k{1 index type -/stringtype eq{/$t xd/$n xd}{/$t 0 def/$n _ def}ifelse/$k xd/$y xd/$m xd/$c xd -/$fil 0 def}bd/K{1 index type/stringtype eq{/$T xd/$N xd}{/$T 0 def/$N _ def} -ifelse/$K xd/$Y xd/$M xd/$C xd}bd/x/k ld/X/K ld/sf{1 index type/stringtype eq{ -/s1t xd/s1n xd}{/s1t 0 def/s1n _ def}ifelse/s1k xd/s1y xd/s1m xd/s1c xd}bd/i{ -dup 0 ne{setflat}{pop}ifelse}bd/v{4 -2 roll 2 copy 6 -2 roll c}bd/V/v ld/y{2 -copy c}bd/Y/y ld/@w{matrix rotate/$ptm xd matrix scale $ptm dup concatmatrix -/$ptm xd 1 eq{$ptm exch dup concatmatrix/$ptm xd}if 1 w}bd/@g{1 eq dup/$sdf xd -{/$scp xd/$sca xd/$scf xd}if}bd/@G{1 eq dup/$SDF xd{/$SCP xd/$SCA xd/$SCF xd} -if}bd/@D{2 index 0 eq{$dsf 3 1 roll 4 -1 roll pop}if 3 copy exch $Scra add exch -load SetScr/$dsp xd/$dsa xd/$dsf xd}bd/$ngx{$SDF{$SCF SepMode_5 0 eq{$SCA} -{$dsa}ifelse $SCP @ss}if}bd/p{/$pm xd 7 rp/$pyf xd/$pxf xd/$pn xd/$fil 1 def} -bd/@MN{2 copy le{pop}{exch pop}ifelse}bd/@MX{2 copy ge{pop}{exch pop}ifelse}bd -/InRange{3 -1 roll @MN @MX}bd/@sqr{dup 0 rl dup 0 exch rl neg 0 rl @cp}bd -/currentscale{1 0 dtransform matrix defaultmatrix idtransform dup mul exch dup -mul add sqrt 0 1 dtransform matrix defaultmatrix idtransform dup mul exch dup -mul add sqrt}bd/@unscale{}bd/wDstChck{2 1 roll dup 3 -1 roll eq{1 add}if}bd -/@dot{dup mul exch dup mul add 1 exch sub}bd/@lin{exch pop abs 1 exch sub}bd -/cmyk2rgb{3{dup 5 -1 roll add 1 exch sub dup 0 lt{pop 0}if exch}repeat pop}bd -/rgb2cmyk{3{1 exch sub 3 1 roll}repeat 3 copy @MN @MN 3{dup 5 -1 roll sub neg -exch}repeat}bd/rgb2g{2 index .299 mul 2 index .587 mul add 1 index .114 mul add -4 1 roll pop pop pop}bd/WaldoColor_5 where{pop}{/SetRgb/setrgbcolor ld/GetRgb -/currentrgbcolor ld/SetGry/setgray ld/GetGry/currentgray ld/SetRgb2 systemdict -/setrgbcolor get def/GetRgb2 systemdict/currentrgbcolor get def/SetHsb -systemdict/sethsbcolor get def/GetHsb systemdict/currenthsbcolor get def -/rgb2hsb{SetRgb2 GetHsb}bd/hsb2rgb{3 -1 roll dup floor sub 3 1 roll SetHsb -GetRgb2}bd/setcmykcolor where{pop/SetCmyk_5/setcmykcolor ld}{/SetCmyk_5{ -cmyk2rgb SetRgb}bd}ifelse/currentcmykcolor where{pop/GetCmyk/currentcmykcolor -ld}{/GetCmyk{GetRgb rgb2cmyk}bd}ifelse/setoverprint where{pop}{/setoverprint{ -/$op xd}bd}ifelse/currentoverprint where{pop}{/currentoverprint{$op}bd}ifelse -/@tc_5{5 -1 roll dup 1 ge{pop}{4{dup 6 -1 roll mul exch}repeat pop}ifelse}bd -/@trp{exch pop 5 1 roll @tc_5}bd/setprocesscolor_5{SepMode_5 0 eq{SetCmyk_5}{0 -4 $ink_5 sub index exch pop 5 1 roll pop pop pop pop SepsColor true eq{$ink_5 3 -gt{1 sub neg SetGry}{0 0 0 4 $ink_5 roll SetCmyk_5}ifelse}{1 sub neg SetGry} -ifelse}ifelse}bd/findcmykcustomcolor where{pop}{/findcmykcustomcolor{5 array -astore}bd}ifelse/setcustomcolor where{pop}{/setcustomcolor{exch aload pop -SepMode_5 0 eq{pop @tc_5 setprocesscolor_5}{CurrentInkName_5 eq{4 index}{0} -ifelse 6 1 roll 5 rp 1 sub neg SetGry}ifelse}bd}ifelse/@scc_5{dup type -/booleantype eq{setoverprint}{1 eq setoverprint}ifelse dup _ eq{pop -setprocesscolor_5 pop}{findcmykcustomcolor exch setcustomcolor}ifelse SepMode_5 -0 eq{true}{GetGry 1 eq currentoverprint and not}ifelse}bd/colorimage where{pop -/ColorImage{colorimage}def}{/ColorImage{/ncolors xd pop/dataaq xd{dataaq -ncolors dup 3 eq{/$dat xd 0 1 $dat length 3 div 1 sub{dup 3 mul $dat 1 index -get 255 div $dat 2 index 1 add get 255 div $dat 3 index 2 add get 255 div rgb2g -255 mul cvi exch pop $dat 3 1 roll put}for $dat 0 $dat length 3 idiv -getinterval pop}{4 eq{/$dat xd 0 1 $dat length 4 div 1 sub{dup 4 mul $dat 1 -index get 255 div $dat 2 index 1 add get 255 div $dat 3 index 2 add get 255 div -$dat 4 index 3 add get 255 div cmyk2rgb rgb2g 255 mul cvi exch pop $dat 3 1 -roll put}for $dat 0 $dat length ncolors idiv getinterval}if}ifelse}image}bd -}ifelse/setcmykcolor{1 5 1 roll _ currentoverprint @scc_5/$ffpnt xd}bd -/currentcmykcolor{0 0 0 0}bd/setrgbcolor{rgb2cmyk setcmykcolor}bd -/currentrgbcolor{currentcmykcolor cmyk2rgb}bd/sethsbcolor{hsb2rgb setrgbcolor} -bd/currenthsbcolor{currentrgbcolor rgb2hsb}bd/setgray{dup dup setrgbcolor}bd -/currentgray{currentrgbcolor rgb2g}bd/InsideDCS false def/IMAGE systemdict -/image get def/image{InsideDCS{IMAGE}{/EPSDict where{pop SepMode_5 0 eq{IMAGE} -{dup type/dicttype eq{dup/ImageType get 1 ne{IMAGE}{dup dup/BitsPerComponent -get 8 eq exch/BitsPerComponent get 1 eq or currentcolorspace 0 get/DeviceGray -eq and{CurrentInkName_5(Black)eq{IMAGE}{dup/DataSource get/TCC xd/Height get -abs{TCC pop}repeat}ifelse}{IMAGE}ifelse}ifelse}{2 index 1 ne{CurrentInkName_5 -(Black)eq{IMAGE}{/TCC xd pop pop exch pop abs{TCC pop}repeat}ifelse}{IMAGE} -ifelse}ifelse}ifelse}{IMAGE}ifelse}ifelse}bd}ifelse/WaldoColor_5 true def/@sft -{$tllx $pxf add dup $tllx gt{$pwid sub}if/$tx xd $tury $pyf sub dup $tury lt -{$phei add}if/$ty xd}bd/@stb{pathbbox/$ury xd/$urx xd/$lly xd/$llx xd}bd/@ep{{ -cvx exec}forall}bd/@tp{@sv/$in true def 2 copy dup $lly le{/$in false def}if -$phei sub $ury ge{/$in false def}if dup $urx ge{/$in false def}if $pwid add -$llx le{/$in false def}if $in{@np 2 copy m $pwid 0 rl 0 $phei neg rl $pwid neg -0 rl 0 $phei rl clip @np $pn cvlit load aload pop 7 -1 roll 5 index sub 7 -1 -roll 3 index sub Tl matrix currentmatrix/$ctm xd @ep pop pop pop pop}{pop pop -}ifelse @rs}bd/@th{@sft 0 1 $tly 1 sub{dup $psx mul $tx add{dup $llx gt{$pwid -sub}{exit}ifelse}loop exch $phei mul $ty exch sub 0 1 $tlx 1 sub{$pwid mul 3 -copy 3 -1 roll add exch @tp pop}for pop pop}for}bd/@tv{@sft 0 1 $tlx 1 sub{dup -$pwid mul $tx add exch $psy mul $ty exch sub{dup $ury lt{$phei add}{exit} -ifelse}loop 0 1 $tly 1 sub{$phei mul 3 copy sub @tp pop}for pop pop}for}bd/$fm -0 def/wfill{1 $fm eq{fill}{eofill}ifelse}bd/wclip{1 $fm eq{clip}{eoclip}ifelse -}bd/@pf{@gs $ctm setmatrix $pm concat @stb wclip @sv Bburx Bbury $pm itransform -/$tury xd/$turx xd Bbllx Bblly $pm itransform/$tlly xd/$tllx xd newpath $tllx -$tlly m $tllx $tury l $turx $tury l $turx $tlly l $tllx $tlly m @cp pathbbox -@rs/$tury xd/$turx xd/$tlly xd/$tllx xd/$wid $turx $tllx sub def/$hei $tury -$tlly sub def @gs $vectpat{1 0 0 0 0 _ $o @scc_5{wfill}if}{$t $c $m $y $k $n $o -@scc_5{SepMode_5 0 eq $pfrg or{$tllx $tlly Tl $wid $hei scale <00> 8 1 false[8 -0 0 1 0 0]{}imagemask}{/$bkg true def}ifelse}if}ifelse @gr $wid 0 gt $hei 0 gt -and{$pn cvlit load aload pop/$pd xd 3 -1 roll sub/$phei xd exch sub/$pwid xd -$wid $pwid div ceiling 1 add/$tlx xd $hei $phei div ceiling 1 add/$tly xd $psx -0 eq{@tv}{@th}ifelse}if @gr @np/$bkg false def}bd/@Pf{@sv SepMode_5 0 eq $Psc 0 -ne or $ink_5 3 eq or{0 J 0 j[]0 d $t $c $m $y $k $n $o @scc_5 pop $ctm -setmatrix 72 1000 div dup matrix scale dup concat dup Bburx exch Bbury exch -itransform ceiling cvi/Bbury xd ceiling cvi/Bburx xd Bbllx exch Bblly exch -itransform floor cvi/Bblly xd floor cvi/Bbllx xd $Prm aload pop $Psn load exec -}{1 SetGry wfill}ifelse @rs @np}bd/F{matrix currentmatrix $sdf{$scf $sca $scp -@ss}if $fil 1 eq{@pf}{$fil 2 eq{@ff}{$fil 3 eq{@Pf}{$t $c $m $y $k $n $o @scc_5 -{wfill}{@np}ifelse}ifelse}ifelse}ifelse $sdf{$dsf $dsa $dsp @ss}if setmatrix} -bd/f{@cp F}bd/S{matrix currentmatrix $ctm setmatrix $SDF{$SCF $SCA $SCP @ss}if -$T $C $M $Y $K $N $O @scc_5{matrix currentmatrix $ptm concat stroke setmatrix} -{@np}ifelse $SDF{$dsf $dsa $dsp @ss}if setmatrix}bd/s{@cp S}bd/B{@gs F @gr S} -bd/b{@cp B}bd/_E{5 array astore exch cvlit xd}bd/@cc{currentfile $dat -readhexstring pop}bd/@sm{/$ctm $ctm currentmatrix def}bd/@E{/Bbury xd/Bburx xd -/Bblly xd/Bbllx xd}bd/@c{@cp}bd/@p{/$fil 1 def 1 eq dup/$vectpat xd{/$pfrg true -def}{@gs $t $c $m $y $k $n $o @scc_5/$pfrg xd @gr}ifelse/$pm xd/$psy xd/$psx xd -/$pyf xd/$pxf xd/$pn xd}bd/@P{/$fil 3 def/$Psn xd/$Psc xd array astore/$Prm xd -}bd/@ii{concat 3 index 3 index m 3 index 1 index l 2 copy l 1 index 3 index l 3 -index 3 index l clip pop pop pop pop}bd/tcc{@cc}def/@i{@sm @gs @ii 6 index 1 ne -{/$frg true def pop pop}{1 eq{s1t s1c s1m s1y s1k s1n $O @scc_5/$frg xd}{/$frg -false def}ifelse 1 eq{@gs $ctm setmatrix F @gr}if}ifelse @np/$ury xd/$urx xd -/$lly xd/$llx xd/$bts xd/$hei xd/$wid xd/$dat $wid $bts mul 8 div ceiling cvi -string def $bkg $frg or{$SDF{$SCF $SCA $SCP @ss}if $llx $lly Tl $urx $llx sub -$ury $lly sub scale $bkg{$t $c $m $y $k $n $o @scc_5 pop}if $wid $hei abs $bts -1 eq{$bkg}{$bts}ifelse[$wid 0 0 $hei neg 0 $hei 0 gt{$hei}{0}ifelse]/tcc load -$bts 1 eq{imagemask}{image}ifelse $SDF{$dsf $dsa $dsp @ss}if}{$hei abs{tcc pop} -repeat}ifelse @gr $ctm setmatrix}bd/@I{@sm @gs @ii @np/$ury xd/$urx xd/$lly xd -/$llx xd/$ncl xd/$bts xd/$hei xd/$wid xd/$dat $wid $bts mul $ncl mul 8 div -ceiling cvi string def $ngx $llx $lly Tl $urx $llx sub $ury $lly sub scale $wid -$hei abs $bts[$wid 0 0 $hei neg 0 $hei 0 gt{$hei}{0}ifelse]/@cc load false $ncl -ColorImage $SDF{$dsf $dsa $dsp @ss}if @gr $ctm setmatrix}bd/COMP 0 def -/MaskedImage false def L2?{/@I_2{@sm @gs @ii @np/$ury xd/$urx xd/$lly xd/$llx -xd/$ncl xd/$bts xd/$hei xd/$wid xd/$dat $wid $bts mul $ncl mul 8 div ceiling -cvi string def $ngx $ncl 1 eq{/DeviceGray}{$ncl 3 eq{/DeviceRGB}{/DeviceCMYK} -ifelse}ifelse setcolorspace $llx $lly Tl $urx $llx sub $ury $lly sub scale 8 -dict begin/ImageType 1 def/Width $wid def/Height $hei abs def/BitsPerComponent -$bts def/Decode $ncl 1 eq{[0 1]}{$ncl 3 eq{[0 1 0 1 0 1]}{[0 1 0 1 0 1 0 1]} -ifelse}ifelse def/ImageMatrix[$wid 0 0 $hei neg 0 $hei 0 gt{$hei}{0}ifelse]def -/DataSource currentfile/ASCII85Decode filter COMP 1 eq{/DCTDecode filter}{COMP -2 eq{/RunLengthDecode filter}if}ifelse def currentdict end image $SDF{$dsf $dsa -$dsp @ss}if @gr $ctm setmatrix}bd}{/@I_2{}bd}ifelse/@I_3{@sm @gs @ii @np/$ury -xd/$urx xd/$lly xd/$llx xd/$ncl xd/$bts xd/$hei xd/$wid xd/$dat $wid $bts mul -$ncl mul 8 div ceiling cvi string def $ngx $ncl 1 eq{/DeviceGray}{$ncl 3 eq -{/DeviceRGB}{/DeviceCMYK}ifelse}ifelse setcolorspace $llx $lly Tl $urx $llx sub -$ury $lly sub scale/ImageDataDict 8 dict def ImageDataDict begin/ImageType 1 -def/Width $wid def/Height $hei abs def/BitsPerComponent $bts def/Decode $ncl 1 -eq{[0 1]}{$ncl 3 eq{[0 1 0 1 0 1]}{[0 1 0 1 0 1 0 1]}ifelse}ifelse def -/ImageMatrix[$wid 0 0 $hei neg 0 $hei 0 gt{$hei}{0}ifelse]def/DataSource -currentfile/ASCII85Decode filter COMP 1 eq{/DCTDecode filter}{COMP 2 eq{ -/RunLengthDecode filter}if}ifelse def end/MaskedImageDict 7 dict def -MaskedImageDict begin/ImageType 3 def/InterleaveType 3 def/MaskDict -ImageMaskDict def/DataDict ImageDataDict def end MaskedImageDict image $SDF -{$dsf $dsa $dsp @ss}if @gr $ctm setmatrix}bd/@SetMask{/$mbts xd/$mhei xd/$mwid -xd/ImageMaskDict 8 dict def ImageMaskDict begin/ImageType 1 def/Width $mwid def -/Height $mhei abs def/BitsPerComponent $mbts def/DataSource maskstream def -/ImageMatrix[$mwid 0 0 $mhei neg 0 $mhei 0 gt{$mhei}{0}ifelse]def/Decode[1 0] -def end}bd/@B{@gs S @gr F}bd/@b{@cp @B}bd/@sep{CurrentInkName_5(Composite)eq -{/$ink_5 -1 def}{CurrentInkName_5(Cyan)eq{/$ink_5 0 def}{CurrentInkName_5 -(Magenta)eq{/$ink_5 1 def}{CurrentInkName_5(Yellow)eq{/$ink_5 2 def}{ -CurrentInkName_5(Black)eq{/$ink_5 3 def}{/$ink_5 4 def}ifelse}ifelse}ifelse} -ifelse}ifelse}bd/@whi{@gs -72000 dup m -72000 72000 l 72000 dup l 72000 -72000 -l @cp 1 SetGry fill @gr}bd/@neg{[{1 exch sub}/exec cvx currenttransfer/exec -cvx]cvx settransfer @whi}bd/deflevel 0 def/@sax{/deflevel deflevel 1 add def} -bd/@eax{/deflevel deflevel dup 0 gt{1 sub}if def deflevel 0 gt{/eax load}{eax} -ifelse}bd/eax{{exec}forall}bd/@rax{deflevel 0 eq{@rs @sv}if}bd/@daq{dup type -/arraytype eq{{}forall}if}bd/@BMP{/@cc xd UseLevel 3 eq MaskedImage true eq and -{7 -2 roll pop pop @I_3}{12 index 1 gt UseLevel 2 eq UseLevel 3 eq or and{7 -2 -roll pop pop @I_2}{11 index 1 eq{12 -1 roll pop @i}{7 -2 roll pop pop @I} -ifelse}ifelse}ifelse}bd systemdict/pdfmark known not{/pdfmark/cleartomark ld} -if -/z{exch findfont exch scalefont setfont}bd/ZB{9 dict dup begin 4 1 roll -/FontType 3 def/FontMatrix xd/FontBBox xd/Encoding 256 array def 0 1 255{ -Encoding exch/.notdef put}for/CharStrings 256 dict def CharStrings/.notdef{} -put/Metrics 256 dict def Metrics/.notdef 3 -1 roll put/BuildChar{exch dup -/$char exch/Encoding get 3 index get def dup/Metrics get $char get aload pop -setcachedevice begin Encoding exch get CharStrings exch get end exec}def end -definefont pop}bd/ZBAddChar{findfont begin dup 4 1 roll dup 6 1 roll Encoding 3 -1 roll put CharStrings 3 1 roll put Metrics 3 1 roll put end}bd/Z{findfont dup -maxlength 2 add dict exch dup{1 index/FID ne{3 index 3 1 roll put}{pop pop} -ifelse}forall pop dup dup/Encoding get 256 array copy dup/$fe xd/Encoding exch -put dup/Fontname 3 index put 3 -1 roll dup length 0 ne{0 exch{dup type 0 type -eq{exch pop}{$fe exch 2 index exch put 1 add}ifelse}forall pop}if dup 256 dict -dup/$met xd/Metrics exch put dup/FontMatrix get 0 get 1000 mul 1 exch div 3 -index length 256 eq{0 1 255{dup $fe exch get dup/.notdef eq{pop pop}{5 index 3 --1 roll get 2 index mul $met 3 1 roll put}ifelse}for}if pop definefont pop pop -}bd/@ftx{{currentpoint 3 -1 roll(0)dup 3 -1 roll 0 exch put dup @gs true -charpath $ctm setmatrix @@txt @gr @np stringwidth pop 3 -1 roll add exch m} -forall}bd/@ft{matrix currentmatrix exch $sdf{$scf $sca $scp @ss}if $fil 1 eq -{/@@txt/@pf ld @ftx}{$fil 2 eq{/@@txt/@ff ld @ftx}{$fil 3 eq{/@@txt/@Pf ld -@ftx}{$t $c $m $y $k $n $o @scc_5{show}{pop}ifelse}ifelse}ifelse}ifelse $sdf -{$dsf $dsa $dsp @ss}if setmatrix}bd/@st{matrix currentmatrix exch $SDF{$SCF -$SCA $SCP @ss}if $T $C $M $Y $K $N $O @scc_5{{currentpoint 3 -1 roll(0)dup 3 -1 -roll 0 exch put dup @gs true charpath $ctm setmatrix $ptm concat stroke @gr @np -stringwidth pop 3 -1 roll add exch m}forall}{pop}ifelse $SDF{$dsf $dsa $dsp -@ss}if setmatrix}bd/@te{@ft}bd/@tr{@st}bd/@ta{dup @gs @ft @gr @st}bd/@t@a{dup -@gs @st @gr @ft}bd/@tm{@sm concat}bd/e{/t{@te}def}bd/r{/t{@tr}def}bd/o{/t{pop} -def}bd/a{/t{@ta}def}bd/@a{/t{@t@a}def}bd/t{@te}def/T{@np $ctm setmatrix/$ttm -matrix def}bd/ddt{t}def/@t{/$stm $stm currentmatrix def 3 1 roll m $ttm concat -ddt $stm setmatrix}bd/@n{/$ttm exch matrix rotate def}bd/@s{}bd/@l{}bd -end -%%EndResource -%%EndProlog -%%BeginSetup -wCorel8Dict begin -@BeginSysCorelDict -2.6131 setmiterlimit -1.00 setflat -/$fst 128 def -%%EndSetup - -%%Page: 1 1 -%LogicalPage: 1 -%%BeginPageSetup -@sv -@sm -@sv -%%EndPageSetup -@rax %Note: Object -589.84639 734.92441 683.08072 776.36211 @E - 0 O 0 @g -0.00 0.00 0.00 0.50 k -/$fm 0 def -589.84639 776.36211 m -683.08072 776.36211 L -683.08072 734.92441 L -589.84639 734.92441 L -589.84639 776.36211 L -@c -F - -@rax %Note: Object -586.86633 738.89631 679.94050 780.26258 @E - 0 O 0 @g -0.00 0.00 0.00 0.00 k -0 J 0 j [] 0 d 0 R 0 @G -0.00 0.00 0.00 1.00 K -0 0.49890 0.49890 0.00000 @w -/$fm 0 def -586.86633 780.26258 m -679.94050 780.26258 L -679.94050 738.89631 L -586.86633 738.89631 L -586.86633 780.26258 L -@c -B - -@rax %Note: Object -363.47216 703.76343 456.70649 745.20113 @E - 0 O 0 @g -0.00 0.00 0.00 0.50 k -/$fm 0 def -363.47216 745.20113 m -456.70649 745.20113 L -456.70649 703.76343 L -363.47216 703.76343 L -363.47216 745.20113 L -@c -F - -@rax %Note: Object -360.49209 707.73534 453.56627 749.10161 @E - 0 O 0 @g -0.00 0.00 0.00 0.00 k -0 J 0 j [] 0 d 0 R 0 @G -0.00 0.00 0.00 1.00 K -0 0.49890 0.49890 0.00000 @w -/$fm 0 def -360.49209 749.10161 m -453.56627 749.10161 L -453.56627 707.73534 L -360.49209 707.73534 L -360.49209 749.10161 L -@c -B - -@rax 370.79915 721.48620 442.62680 738.88299 @E -[0.00028346 0.00000000 0.00000000 0.00028346 406.91989063 731.60302836] @tm - 0 O 0 @g -0.00 0.00 0.00 1.00 k -e - -% FontChange:/_ArialCE 35278.00000 z -%CHAR: -127426 0 (P) @t --124704 0 m --124704 25253 L --115179 25253 l --113503 25253 -112221 25171 -111339 25012 c --110099 24806 -109058 24412 -108217 23830 c --107382 23254 -106706 22437 -106195 21396 c --105683 20350 -105430 19203 -105430 17951 c --105430 15805 -106112 13982 -107476 12494 c --108846 11013 -111316 10266 -114885 10266 c --121364 10266 L --121364 0 L --124704 0 L -@c --121364 13247 m --114832 13247 l --112674 13247 -111139 13647 -110234 14452 c --109328 15258 -108876 16387 -108876 17845 c --108876 18903 -109140 19809 -109675 20561 c --110210 21314 -110910 21808 -111786 22049 c --112351 22196 -113385 22272 -114902 22272 c --121364 22272 L --121364 13247 L -@c -F -%CHAR: -103896 0 (r) @t --101603 0 m --101603 18292 L --98816 18292 L --98816 15522 L --98105 16816 -97446 17674 -96840 18086 c --96241 18497 -95576 18709 -94853 18709 c --93806 18709 -92748 18374 -91666 17710 C --92736 14829 L --93489 15281 -94247 15505 -95006 15505 c --95688 15505 -96294 15299 -96835 14893 c --97375 14482 -97758 13917 -97987 13194 c --98334 12094 -98504 10889 -98504 9578 c --98504 0 L --101603 0 L -@c -F -%CHAR: -92148 0 (i) @t --89808 21684 m --89808 25253 L --86703 25253 L --86703 21684 L --89808 21684 L -@c --89808 0 m --89808 18292 L --86703 18292 L --86703 0 L --89808 0 L -@c -F -%CHAR: -84316 0 (m) @t --81988 0 m --81988 18292 L --79218 18292 L --79218 15728 L --78642 16622 -77878 17345 -76925 17886 c --75973 18433 -74885 18709 -73668 18709 c --72316 18709 -71204 18427 -70340 17862 c --69470 17298 -68858 16516 -68506 15505 C --67053 17639 -65172 18709 -62855 18709 c --61038 18709 -59645 18203 -58669 17198 c --57693 16193 -57205 14646 -57205 12559 c --57205 0 L --60286 0 L --60286 11524 l --60286 12765 -60386 13658 -60586 14205 c --60791 14746 -61156 15187 -61679 15522 c --62208 15852 -62832 16022 -63543 16022 c --64831 16022 -65895 15593 -66748 14734 c --67594 13882 -68023 12512 -68023 10630 c --68023 0 L --71122 0 L --71122 11883 l --71122 13265 -71375 14299 -71881 14987 c --72386 15675 -73209 16022 -74362 16022 c --75232 16022 -76037 15793 -76778 15328 c --77519 14870 -78060 14199 -78389 13317 c --78724 12430 -78889 11154 -78889 9490 c --78889 0 L --81988 0 L -@c -F -%CHAR: -54929 0 (a) @t --40665 2258 m --41817 1282 -42923 594 -43981 188 c --45045 -212 -46186 -412 -47403 -412 c --49414 -412 -50954 76 -52036 1058 c --53112 2040 -53653 3298 -53653 4821 c --53653 5721 -53453 6538 -53042 7279 c --52636 8020 -52101 8614 -51442 9061 c --50778 9507 -50037 9848 -49208 10078 c --48602 10236 -47685 10395 -46456 10542 c --43952 10842 -42105 11195 -40924 11612 C --40912 12036 -40906 12306 -40906 12418 c --40906 13682 -41200 14576 -41788 15087 c --42576 15793 -43758 16140 -45316 16140 c --46774 16140 -47850 15887 -48550 15375 c --49243 14864 -49755 13958 -50090 12659 C --53118 13076 L --52842 14370 -52389 15422 -51760 16216 c --51131 17016 -50214 17633 -49020 18062 c --47826 18492 -46445 18709 -44869 18709 c --43305 18709 -42041 18521 -41065 18156 c --40089 17786 -39371 17327 -38907 16769 c --38448 16210 -38131 15511 -37943 14658 c --37843 14129 -37790 13176 -37790 11800 c --37790 7667 l --37790 4780 -37725 2957 -37590 2199 c --37461 1435 -37196 700 -36808 0 C --40048 0 L --40365 641 -40577 1393 -40665 2258 C -@c --40924 9184 m --42053 8720 -43740 8331 -45986 8008 c --47262 7826 -48167 7620 -48691 7391 c --49220 7161 -49631 6826 -49914 6379 c --50202 5938 -50349 5450 -50349 4910 c --50349 4080 -50031 3393 -49408 2840 c --48785 2293 -47868 2017 -46662 2017 c --45469 2017 -44404 2275 -43475 2799 c --42546 3322 -41859 4039 -41423 4945 c --41088 5644 -40924 6679 -40924 8043 c --40924 9184 L -@c -F -%CHAR: -35314 0 (r) @t --33021 0 m --33021 18292 L --30234 18292 L --30234 15522 L --29523 16816 -28864 17674 -28258 18086 c --27659 18497 -26994 18709 -26271 18709 c --25224 18709 -24166 18374 -23084 17710 C --24154 14829 L --24907 15281 -25665 15505 -26424 15505 c --27106 15505 -27712 15299 -28253 14893 c --28793 14482 -29176 13917 -29405 13194 c --29752 12094 -29922 10889 -29922 9578 c --29922 0 L --33021 0 L -@c -F -%CHAR: -23566 0 (y) @t --21379 -7044 m --21726 -4133 L --21044 -4316 -20456 -4410 -19950 -4410 c --19262 -4410 -18709 -4292 -18298 -4063 c --17880 -3834 -17545 -3516 -17281 -3099 c --17081 -2793 -16769 -2023 -16334 -794 c --16275 -617 -16181 -370 -16058 -35 C --22996 18292 L --19656 18292 L --15846 7702 l --15358 6356 -14911 4945 -14523 3463 C --14164 4886 -13741 6274 -13247 7632 c --9337 18292 L --6239 18292 L --13194 -312 l --13941 -2322 -14523 -3704 -14935 -4463 c --15487 -5486 -16116 -6232 -16828 -6709 c --17545 -7185 -18392 -7426 -19380 -7426 c --19979 -7426 -20644 -7297 -21379 -7044 C -@c -F -%CHAR: 3880 0 (S) @t -5468 8114 m -8619 8390 L -8766 7126 9113 6091 9660 5280 c -10207 4469 11053 3816 12200 3316 c -13346 2816 14640 2569 16074 2569 c -17350 2569 18473 2758 19449 3134 c -20425 3516 21154 4033 21631 4692 c -22107 5356 22348 6074 22348 6856 c -22348 7649 22119 8337 21654 8931 c -21196 9525 20437 10019 19385 10419 c -18703 10683 17209 11095 14887 11653 c -12570 12212 10941 12735 10012 13229 c -8807 13858 7908 14646 7314 15581 c -6726 16516 6432 17563 6432 18727 c -6432 19997 6790 21190 7514 22296 c -8237 23407 9295 24248 10683 24824 c -12076 25394 13617 25682 15316 25682 c -17192 25682 18838 25383 20273 24777 c -21701 24177 22801 23289 23571 22119 c -24335 20949 24753 19620 24812 18139 C -21607 17898 L -21431 19491 20849 20702 19855 21514 c -18861 22331 17397 22737 15457 22737 c -13434 22737 11965 22366 11036 21625 c -10112 20885 9648 19991 9648 18950 c -9648 18039 9977 17292 10630 16710 c -11277 16122 12952 15522 15669 14911 c -18385 14293 20249 13758 21260 13300 c -22730 12618 23818 11759 24518 10725 c -25217 9684 25564 8484 25564 7132 c -25564 5786 25182 4521 24412 3334 c -23642 2146 22536 1223 21096 559 c -19655 -100 18032 -429 16233 -429 c -13946 -429 12029 -100 10489 570 c -8942 1235 7731 2234 6849 3575 c -5973 4910 5509 6426 5468 8114 C -@c -F -%CHAR: 27410 0 (t) @t -36506 2775 m -36953 35 L -36083 -147 35301 -241 34613 -241 c -33484 -241 32614 -65 31990 294 c -31373 647 30938 1117 30685 1699 c -30432 2275 30303 3498 30303 5356 c -30303 15881 L -28027 15881 L -28027 18292 L -30303 18292 L -30303 22825 L -33390 24683 L -33390 18292 L -36506 18292 L -36506 15881 L -33390 15881 L -33390 5186 l -33390 4298 33443 3734 33548 3481 c -33660 3228 33836 3028 34083 2875 c -34330 2728 34683 2652 35142 2652 c -35489 2652 35941 2693 36506 2775 C -@c -F -%CHAR: 37217 0 (o) @t -38387 9149 m -38387 12535 39328 15046 41215 16675 c -42785 18027 44702 18709 46965 18709 c -49482 18709 51540 17886 53133 16234 c -54733 14587 55526 12312 55526 9407 c -55526 7050 55174 5198 54468 3851 c -53762 2499 52733 1452 51387 706 c -50035 -41 48565 -412 46965 -412 c -44408 -412 42338 406 40757 2052 c -39175 3692 38387 6056 38387 9149 c -@c -41574 9149 m -41574 6803 42085 5051 43108 3886 c -44131 2716 45419 2134 46965 2134 c -48506 2134 49788 2722 50811 3892 c -51828 5062 52340 6850 52340 9249 c -52340 11512 51828 13229 50799 14393 c -49770 15558 48494 16140 46965 16140 c -45419 16140 44131 15558 43108 14399 c -42085 13241 41574 11489 41574 9149 c -@c -F -%CHAR: 56832 0 (r) @t -59125 0 m -59125 18292 L -61912 18292 L -61912 15522 L -62623 16816 63282 17674 63888 18086 c -64487 18497 65152 18709 65875 18709 c -66922 18709 67980 18374 69062 17710 C -67992 14829 L -67239 15281 66481 15505 65722 15505 c -65040 15505 64434 15299 63893 14893 c -63353 14482 62970 13917 62741 13194 c -62394 12094 62224 10889 62224 9578 c -62224 0 L -59125 0 L -@c -F -%CHAR: 68580 0 (a) @t -82844 2258 m -81692 1282 80586 594 79528 188 c -78464 -212 77323 -412 76106 -412 c -74095 -412 72555 76 71473 1058 c -70397 2040 69856 3298 69856 4821 c -69856 5721 70056 6538 70467 7279 c -70873 8020 71408 8614 72067 9061 c -72731 9507 73472 9848 74301 10078 c -74907 10236 75824 10395 77053 10542 c -79557 10842 81404 11195 82585 11612 C -82597 12036 82603 12306 82603 12418 c -82603 13682 82309 14576 81721 15087 c -80933 15793 79751 16140 78193 16140 c -76735 16140 75659 15887 74959 15375 c -74266 14864 73754 13958 73419 12659 C -70391 13076 L -70667 14370 71120 15422 71749 16216 c -72378 17016 73295 17633 74489 18062 c -75683 18492 77064 18709 78640 18709 c -80204 18709 81468 18521 82444 18156 c -83420 17786 84138 17327 84602 16769 c -85061 16210 85378 15511 85566 14658 c -85666 14129 85719 13176 85719 11800 c -85719 7667 l -85719 4780 85784 2957 85919 2199 c -86048 1435 86313 700 86701 0 C -83461 0 L -83144 641 82932 1393 82844 2258 C -@c -82585 9184 m -81456 8720 79769 8331 77523 8008 c -76247 7826 75342 7620 74818 7391 c -74289 7161 73878 6826 73595 6379 c -73307 5938 73160 5450 73160 4910 c -73160 4080 73478 3393 74101 2840 c -74724 2293 75641 2017 76847 2017 c -78040 2017 79105 2275 80034 2799 c -80963 3322 81650 4039 82086 4945 c -82421 5644 82585 6679 82585 8043 c -82585 9184 L -@c -F -%CHAR: 88195 0 (g) @t -89953 -1517 m -92969 -1964 L -93093 -2893 93446 -3569 94016 -3998 c -94786 -4569 95839 -4857 97167 -4857 c -98608 -4857 99713 -4569 100495 -3998 c -101277 -3422 101801 -2616 102077 -1588 c -102242 -953 102312 370 102300 2393 C -100948 800 99261 0 97238 0 c -94721 0 92775 905 91399 2722 c -90024 4533 89330 6715 89330 9249 c -89330 10995 89647 12606 90276 14082 c -90911 15558 91829 16698 93028 17504 c -94228 18303 95639 18709 97256 18709 c -99413 18709 101195 17833 102594 16087 C -102594 18292 L -105458 18292 L -105458 2481 l -105458 -365 105164 -2387 104588 -3575 c -104005 -4763 103088 -5703 101830 -6391 c -100572 -7079 99025 -7426 97185 -7426 c -95004 -7426 93240 -6932 91899 -5950 c -90553 -4968 89906 -3493 89953 -1517 C -@c -92517 9472 m -92517 7073 92993 5321 93951 4222 c -94904 3116 96097 2569 97532 2569 c -98955 2569 100148 3116 101113 4210 c -102077 5309 102559 7026 102559 9372 c -102559 11612 102065 13300 101071 14435 c -100078 15569 98878 16140 97479 16140 c -96103 16140 94933 15581 93963 14458 c -92999 13341 92517 11677 92517 9472 c -@c -F -%CHAR: 107810 0 (e) @t -122656 5891 m -125861 5497 L -125355 3622 124420 2170 123056 1135 c -121686 106 119940 -412 117817 -412 c -115142 -412 113019 412 111455 2058 c -109886 3704 109104 6015 109104 8990 c -109104 12071 109897 14458 111479 16157 c -113066 17857 115118 18709 117647 18709 c -120093 18709 122092 17874 123638 16210 c -125190 14546 125966 12200 125966 9184 c -125966 8996 125961 8720 125949 8355 C -112308 8355 L -112420 6344 112990 4804 114013 3739 c -115036 2669 116306 2134 117835 2134 c -118970 2134 119940 2434 120745 3034 c -121551 3628 122186 4580 122656 5891 C -@c -112478 10907 m -122691 10907 L -122556 12441 122162 13600 121521 14364 c -120534 15558 119252 16157 117682 16157 c -116259 16157 115060 15681 114089 14729 c -113119 13776 112584 12500 112478 10907 C -@c -F -%CHAR: -70593 -35278 (f) @t --67530 -35278 m --67530 -19397 L --70264 -19397 L --70264 -16986 L --67530 -16986 L --67530 -15040 l --67530 -13811 -67418 -12894 -67200 -12300 c --66901 -11495 -66377 -10842 -65625 -10342 c --64872 -9843 -63820 -9596 -62461 -9596 c --61591 -9596 -60627 -9696 -59569 -9907 C --60033 -12612 L --60674 -12494 -61285 -12435 -61862 -12435 c --62802 -12435 -63467 -12635 -63855 -13041 c --64249 -13441 -64443 -14194 -64443 -15299 c --64443 -16986 L --60880 -16986 L --60880 -19397 L --64443 -19397 L --64443 -35278 L --67530 -35278 L -@c -F -%CHAR: -60786 -35278 (r) @t --58493 -35278 m --58493 -16986 L --55706 -16986 L --55706 -19756 L --54995 -18462 -54336 -17604 -53730 -17192 c --53131 -16781 -52466 -16569 -51743 -16569 c --50696 -16569 -49638 -16904 -48556 -17568 C --49626 -20449 L --50379 -19997 -51137 -19773 -51896 -19773 c --52578 -19773 -53184 -19979 -53725 -20385 c --54265 -20796 -54648 -21361 -54877 -22084 c --55224 -23184 -55394 -24389 -55394 -25700 c --55394 -35278 L --58493 -35278 L -@c -F -%CHAR: -49038 -35278 (o) @t --47868 -26129 m --47868 -22743 -46927 -20232 -45040 -18603 c --43470 -17251 -41553 -16569 -39290 -16569 c --36773 -16569 -34715 -17392 -33122 -19044 c --31522 -20691 -30729 -22966 -30729 -25871 c --30729 -28228 -31081 -30080 -31787 -31427 c --32493 -32779 -33522 -33826 -34868 -34572 c --36220 -35319 -37690 -35690 -39290 -35690 c --41847 -35690 -43917 -34872 -45498 -33226 c --47080 -31586 -47868 -29222 -47868 -26129 c -@c --44681 -26129 m --44681 -28475 -44170 -30227 -43147 -31392 c --42124 -32562 -40836 -33144 -39290 -33144 c --37749 -33144 -36467 -32556 -35444 -31386 c --34427 -30216 -33915 -28428 -33915 -26029 c --33915 -23766 -34427 -22049 -35456 -20885 c --36485 -19720 -37761 -19138 -39290 -19138 c --40836 -19138 -42124 -19720 -43147 -20879 c --44170 -22037 -44681 -23789 -44681 -26129 c -@c -F -%CHAR: -29423 -35278 (n) @t --27095 -35278 m --27095 -16986 L --24308 -16986 L --24308 -19585 L --22961 -17574 -21021 -16569 -18487 -16569 c --17381 -16569 -16370 -16769 -15447 -17163 c --14518 -17563 -13830 -18080 -13372 -18727 c --12907 -19368 -12590 -20132 -12401 -21014 c --12290 -21590 -12231 -22596 -12231 -24030 c --12231 -35278 L --15335 -35278 L --15335 -24148 l --15335 -22890 -15453 -21943 -15694 -21314 c --15935 -20691 -16364 -20191 -16976 -19820 c --17593 -19444 -18310 -19256 -19139 -19256 c --20462 -19256 -21597 -19679 -22561 -20514 c --23520 -21355 -23996 -22942 -23996 -25288 c --23996 -35278 L --27095 -35278 L -@c -F -%CHAR: -9808 -35278 (t) @t --712 -32503 m --265 -35243 L --1135 -35425 -1917 -35519 -2605 -35519 c --3734 -35519 -4604 -35343 -5228 -34984 c --5845 -34631 -6280 -34161 -6533 -33579 c --6786 -33003 -6915 -31780 -6915 -29922 c --6915 -19397 L --9191 -19397 L --9191 -16986 L --6915 -16986 L --6915 -12453 L --3828 -10595 L --3828 -16986 L --712 -16986 L --712 -19397 L --3828 -19397 L --3828 -30092 l --3828 -30980 -3775 -31544 -3670 -31797 c --3558 -32050 -3382 -32250 -3135 -32403 c --2888 -32550 -2535 -32626 -2076 -32626 c --1729 -32626 -1277 -32585 -712 -32503 C -@c -F -%CHAR: -1 -35278 (-) @t -1116 -27699 m -1116 -24583 L -10647 -24583 L -10647 -27699 L -1116 -27699 L -@c -F -%CHAR: 11747 -35278 (e) @t -26593 -29387 m -29798 -29781 L -29292 -31656 28357 -33108 26993 -34143 c -25623 -35172 23877 -35690 21754 -35690 c -19079 -35690 16956 -34866 15392 -33220 c -13823 -31574 13041 -29263 13041 -26288 c -13041 -23207 13834 -20820 15416 -19121 c -17003 -17421 19055 -16569 21584 -16569 c -24030 -16569 26029 -17404 27575 -19068 c -29127 -20732 29903 -23078 29903 -26094 c -29903 -26282 29898 -26558 29886 -26923 C -16245 -26923 L -16357 -28934 16927 -30474 17950 -31539 c -18973 -32609 20243 -33144 21772 -33144 c -22907 -33144 23877 -32844 24682 -32244 c -25488 -31650 26123 -30698 26593 -29387 C -@c -16415 -24371 m -26628 -24371 L -26493 -22837 26099 -21678 25458 -20914 c -24471 -19720 23189 -19121 21619 -19121 c -20196 -19121 18997 -19597 18026 -20549 c -17056 -21502 16521 -22778 16415 -24371 C -@c -F -%CHAR: 31362 -35278 (n) @t -33690 -35278 m -33690 -16986 L -36477 -16986 L -36477 -19585 L -37824 -17574 39764 -16569 42298 -16569 c -43404 -16569 44415 -16769 45338 -17163 c -46267 -17563 46955 -18080 47413 -18727 c -47878 -19368 48195 -20132 48384 -21014 c -48495 -21590 48554 -22596 48554 -24030 c -48554 -35278 L -45450 -35278 L -45450 -24148 l -45450 -22890 45332 -21943 45091 -21314 c -44850 -20691 44421 -20191 43809 -19820 c -43192 -19444 42475 -19256 41646 -19256 c -40323 -19256 39188 -19679 38224 -20514 c -37265 -21355 36789 -22942 36789 -25288 c -36789 -35278 L -33690 -35278 L -@c -F -%CHAR: 50977 -35278 (d) @t -65171 -35278 m -65171 -32967 L -64012 -34784 62307 -35690 60055 -35690 c -58597 -35690 57256 -35290 56034 -34484 c -54811 -33685 53864 -32562 53188 -31115 c -52517 -29675 52182 -28022 52182 -26147 c -52182 -24324 52488 -22666 53094 -21179 c -53705 -19691 54617 -18550 55834 -17762 c -57051 -16969 58415 -16569 59920 -16569 c -61019 -16569 62001 -16804 62860 -17269 c -63724 -17733 64424 -18339 64965 -19085 C -64965 -10025 L -68046 -10025 L -68046 -35278 L -65171 -35278 L -@c -55369 -26147 m -55369 -28493 55863 -30245 56851 -31403 c -57839 -32562 59003 -33144 60349 -33144 c -61702 -33144 62854 -32585 63801 -31480 c -64747 -30374 65223 -28681 65223 -26406 c -65223 -23901 64741 -22066 63777 -20896 c -62813 -19720 61625 -19138 60208 -19138 c -58832 -19138 57680 -19703 56757 -20826 c -55834 -21949 55369 -23724 55369 -26147 c -@c -F -T -@rax 364.10003 760.56917 450.19757 769.95411 @E -[0.00028346 0.00000000 0.00000000 0.00028346 407.35557565 762.67414533] @tm - 0 O 0 @g -0.00 0.00 0.00 1.00 k -e - -% FontChange:/_ArialCE 35278.00000 z -%CHAR: -152596 0 (J) @t --151579 7167 m --148563 7579 L --148486 5650 -148122 4327 -147481 3616 c --146834 2905 -145946 2552 -144811 2552 c --143971 2552 -143247 2740 -142642 3128 c --142030 3510 -141613 4033 -141383 4692 c --141154 5356 -141037 6409 -141037 7855 c --141037 25253 L --137697 25253 L --137697 8043 l --137697 5933 -137950 4292 -138461 3134 c --138973 1976 -139784 1094 -140890 482 c --142001 -123 -143300 -429 -144794 -429 c --147010 -429 -148704 206 -149885 1482 c --151061 2758 -151626 4651 -151579 7167 C -@c -F -%CHAR: -134957 0 (P) @t --132235 0 m --132235 25253 L --122710 25253 l --121034 25253 -119752 25171 -118870 25012 c --117630 24806 -116589 24412 -115748 23830 c --114913 23254 -114237 22437 -113726 21396 c --113214 20350 -112961 19203 -112961 17951 c --112961 15805 -113643 13982 -115007 12494 c --116377 11013 -118847 10266 -122416 10266 c --128895 10266 L --128895 0 L --132235 0 L -@c --128895 13247 m --122363 13247 l --120205 13247 -118670 13647 -117765 14452 c --116859 15258 -116407 16387 -116407 17845 c --116407 18903 -116671 19809 -117206 20561 c --117741 21314 -118441 21808 -119317 22049 c --119882 22196 -120916 22272 -122433 22272 c --128895 22272 L --128895 13247 L -@c -F -%CHAR: -102255 0 (P) @t --99533 0 m --99533 25253 L --90008 25253 l --88332 25253 -87050 25171 -86168 25012 c --84928 24806 -83887 24412 -83046 23830 c --82211 23254 -81535 22437 -81024 21396 c --80512 20350 -80259 19203 -80259 17951 c --80259 15805 -80941 13982 -82305 12494 c --83675 11013 -86145 10266 -89714 10266 c --96193 10266 L --96193 0 L --99533 0 L -@c --96193 13247 m --89661 13247 l --87503 13247 -85968 13647 -85063 14452 c --84157 15258 -83705 16387 -83705 17845 c --83705 18903 -83969 19809 -84504 20561 c --85039 21314 -85739 21808 -86615 22049 c --87180 22196 -88214 22272 -89731 22272 c --96193 22272 L --96193 13247 L -@c -F -%CHAR: -78725 0 (r) @t --76432 0 m --76432 18292 L --73645 18292 L --73645 15522 L --72934 16816 -72275 17674 -71669 18086 c --71070 18497 -70405 18709 -69682 18709 c --68635 18709 -67577 18374 -66495 17710 C --67565 14829 L --68318 15281 -69076 15505 -69835 15505 c --70517 15505 -71123 15299 -71664 14893 c --72204 14482 -72587 13917 -72816 13194 c --73163 12094 -73333 10889 -73333 9578 c --73333 0 L --76432 0 L -@c -F -%CHAR: -66977 0 (i) @t --64637 21684 m --64637 25253 L --61532 25253 L --61532 21684 L --64637 21684 L -@c --64637 0 m --64637 18292 L --61532 18292 L --61532 0 L --64637 0 L -@c -F -%CHAR: -59145 0 (m) @t --56817 0 m --56817 18292 L --54047 18292 L --54047 15728 L --53471 16622 -52707 17345 -51754 17886 c --50802 18433 -49714 18709 -48497 18709 c --47145 18709 -46033 18427 -45169 17862 c --44299 17298 -43687 16516 -43335 15505 C --41882 17639 -40001 18709 -37684 18709 c --35867 18709 -34474 18203 -33498 17198 c --32522 16193 -32034 14646 -32034 12559 c --32034 0 L --35115 0 L --35115 11524 l --35115 12765 -35215 13658 -35415 14205 c --35620 14746 -35985 15187 -36508 15522 c --37037 15852 -37661 16022 -38372 16022 c --39660 16022 -40724 15593 -41577 14734 c --42423 13882 -42852 12512 -42852 10630 c --42852 0 L --45951 0 L --45951 11883 l --45951 13265 -46204 14299 -46710 14987 c --47215 15675 -48038 16022 -49191 16022 c --50061 16022 -50866 15793 -51607 15328 c --52348 14870 -52889 14199 -53218 13317 c --53553 12430 -53718 11154 -53718 9490 c --53718 0 L --56817 0 L -@c -F -%CHAR: -29758 0 (a) @t --15494 2258 m --16646 1282 -17752 594 -18810 188 c --19874 -212 -21015 -412 -22232 -412 c --24243 -412 -25783 76 -26865 1058 c --27941 2040 -28482 3298 -28482 4821 c --28482 5721 -28282 6538 -27871 7279 c --27465 8020 -26930 8614 -26271 9061 c --25607 9507 -24866 9848 -24037 10078 c --23431 10236 -22514 10395 -21285 10542 c --18781 10842 -16934 11195 -15753 11612 C --15741 12036 -15735 12306 -15735 12418 c --15735 13682 -16029 14576 -16617 15087 c --17405 15793 -18587 16140 -20145 16140 c --21603 16140 -22679 15887 -23379 15375 c --24072 14864 -24584 13958 -24919 12659 C --27947 13076 L --27671 14370 -27218 15422 -26589 16216 c --25960 17016 -25043 17633 -23849 18062 c --22655 18492 -21274 18709 -19698 18709 c --18134 18709 -16870 18521 -15894 18156 c --14918 17786 -14200 17327 -13736 16769 c --13277 16210 -12960 15511 -12772 14658 c --12672 14129 -12619 13176 -12619 11800 c --12619 7667 l --12619 4780 -12554 2957 -12419 2199 c --12290 1435 -12025 700 -11637 0 C --14877 0 L --15194 641 -15406 1393 -15494 2258 C -@c --15753 9184 m --16882 8720 -18569 8331 -20815 8008 c --22091 7826 -22996 7620 -23520 7391 c --24049 7161 -24460 6826 -24743 6379 c --25031 5938 -25178 5450 -25178 4910 c --25178 4080 -24860 3393 -24237 2840 c --23614 2293 -22697 2017 -21491 2017 c --20298 2017 -19233 2275 -18304 2799 c --17375 3322 -16688 4039 -16252 4945 c --15917 5644 -15753 6679 -15753 8043 c --15753 9184 L -@c -F -%CHAR: -10143 0 (r) @t --7850 0 m --7850 18292 L --5063 18292 L --5063 15522 L --4352 16816 -3693 17674 -3087 18086 c --2488 18497 -1823 18709 -1100 18709 c --53 18709 1005 18374 2087 17710 C -1017 14829 L -264 15281 -494 15505 -1253 15505 c --1935 15505 -2541 15299 -3082 14893 c --3622 14482 -4005 13917 -4234 13194 c --4581 12094 -4751 10889 -4751 9578 c --4751 0 L --7850 0 L -@c -F -%CHAR: 1605 0 (y) @t -3792 -7044 m -3445 -4133 L -4127 -4316 4715 -4410 5221 -4410 c -5909 -4410 6462 -4292 6873 -4063 c -7291 -3834 7626 -3516 7890 -3099 c -8090 -2793 8402 -2023 8837 -794 c -8896 -617 8990 -370 9113 -35 C -2175 18292 L -5515 18292 L -9325 7702 l -9813 6356 10260 4945 10648 3463 C -11007 4886 11430 6274 11924 7632 c -15834 18292 L -18932 18292 L -11977 -312 l -11230 -2322 10648 -3704 10236 -4463 c -9684 -5486 9055 -6232 8343 -6709 c -7626 -7185 6779 -7426 5791 -7426 c -5192 -7426 4527 -7297 3792 -7044 C -@c -F -%CHAR: 29051 0 (S) @t -30639 8114 m -33790 8390 L -33937 7126 34284 6091 34831 5280 c -35378 4469 36224 3816 37371 3316 c -38517 2816 39811 2569 41245 2569 c -42521 2569 43644 2758 44620 3134 c -45596 3516 46325 4033 46802 4692 c -47278 5356 47519 6074 47519 6856 c -47519 7649 47290 8337 46825 8931 c -46367 9525 45608 10019 44556 10419 c -43874 10683 42380 11095 40058 11653 c -37741 12212 36112 12735 35183 13229 c -33978 13858 33079 14646 32485 15581 c -31897 16516 31603 17563 31603 18727 c -31603 19997 31961 21190 32685 22296 c -33408 23407 34466 24248 35854 24824 c -37247 25394 38788 25682 40487 25682 c -42363 25682 44009 25383 45444 24777 c -46872 24177 47972 23289 48742 22119 c -49506 20949 49924 19620 49983 18139 C -46778 17898 L -46602 19491 46020 20702 45026 21514 c -44032 22331 42568 22737 40628 22737 c -38605 22737 37136 22366 36207 21625 c -35283 20885 34819 19991 34819 18950 c -34819 18039 35148 17292 35801 16710 c -36448 16122 38123 15522 40840 14911 c -43556 14293 45420 13758 46431 13300 c -47901 12618 48989 11759 49689 10725 c -50388 9684 50735 8484 50735 7132 c -50735 5786 50353 4521 49583 3334 c -48813 2146 47707 1223 46267 559 c -44826 -100 43203 -429 41404 -429 c -39117 -429 37200 -100 35660 570 c -34113 1235 32902 2234 32020 3575 c -31144 4910 30680 6426 30639 8114 C -@c -F -%CHAR: 52581 0 (t) @t -61677 2775 m -62124 35 L -61254 -147 60472 -241 59784 -241 c -58655 -241 57785 -65 57161 294 c -56544 647 56109 1117 55856 1699 c -55603 2275 55474 3498 55474 5356 c -55474 15881 L -53198 15881 L -53198 18292 L -55474 18292 L -55474 22825 L -58561 24683 L -58561 18292 L -61677 18292 L -61677 15881 L -58561 15881 L -58561 5186 l -58561 4298 58614 3734 58719 3481 c -58831 3228 59007 3028 59254 2875 c -59501 2728 59854 2652 60313 2652 c -60660 2652 61112 2693 61677 2775 C -@c -F -%CHAR: 62388 0 (o) @t -63558 9149 m -63558 12535 64499 15046 66386 16675 c -67956 18027 69873 18709 72136 18709 c -74653 18709 76711 17886 78304 16234 c -79904 14587 80697 12312 80697 9407 c -80697 7050 80345 5198 79639 3851 c -78933 2499 77904 1452 76558 706 c -75206 -41 73736 -412 72136 -412 c -69579 -412 67509 406 65928 2052 c -64346 3692 63558 6056 63558 9149 c -@c -66745 9149 m -66745 6803 67256 5051 68279 3886 c -69302 2716 70590 2134 72136 2134 c -73677 2134 74959 2722 75982 3892 c -76999 5062 77511 6850 77511 9249 c -77511 11512 76999 13229 75970 14393 c -74941 15558 73665 16140 72136 16140 c -70590 16140 69302 15558 68279 14399 c -67256 13241 66745 11489 66745 9149 c -@c -F -%CHAR: 82003 0 (r) @t -84296 0 m -84296 18292 L -87083 18292 L -87083 15522 L -87794 16816 88453 17674 89059 18086 c -89658 18497 90323 18709 91046 18709 c -92093 18709 93151 18374 94233 17710 C -93163 14829 L -92410 15281 91652 15505 90893 15505 c -90211 15505 89605 15299 89064 14893 c -88524 14482 88141 13917 87912 13194 c -87565 12094 87395 10889 87395 9578 c -87395 0 L -84296 0 L -@c -F -%CHAR: 93751 0 (a) @t -108015 2258 m -106863 1282 105757 594 104699 188 c -103635 -212 102494 -412 101277 -412 c -99266 -412 97726 76 96644 1058 c -95568 2040 95027 3298 95027 4821 c -95027 5721 95227 6538 95638 7279 c -96044 8020 96579 8614 97238 9061 c -97902 9507 98643 9848 99472 10078 c -100078 10236 100995 10395 102224 10542 c -104728 10842 106575 11195 107756 11612 C -107768 12036 107774 12306 107774 12418 c -107774 13682 107480 14576 106892 15087 c -106104 15793 104922 16140 103364 16140 c -101906 16140 100830 15887 100130 15375 c -99437 14864 98925 13958 98590 12659 C -95562 13076 L -95838 14370 96291 15422 96920 16216 c -97549 17016 98466 17633 99660 18062 c -100854 18492 102235 18709 103811 18709 c -105375 18709 106639 18521 107615 18156 c -108591 17786 109309 17327 109773 16769 c -110232 16210 110549 15511 110737 14658 c -110837 14129 110890 13176 110890 11800 c -110890 7667 l -110890 4780 110955 2957 111090 2199 c -111219 1435 111484 700 111872 0 C -108632 0 L -108315 641 108103 1393 108015 2258 C -@c -107756 9184 m -106627 8720 104940 8331 102694 8008 c -101418 7826 100513 7620 99989 7391 c -99460 7161 99049 6826 98766 6379 c -98478 5938 98331 5450 98331 4910 c -98331 4080 98649 3393 99272 2840 c -99895 2293 100812 2017 102018 2017 c -103211 2017 104276 2275 105205 2799 c -106134 3322 106821 4039 107257 4945 c -107592 5644 107756 6679 107756 8043 c -107756 9184 L -@c -F -%CHAR: 113366 0 (g) @t -115124 -1517 m -118140 -1964 L -118264 -2893 118617 -3569 119187 -3998 c -119957 -4569 121010 -4857 122338 -4857 c -123779 -4857 124884 -4569 125666 -3998 c -126448 -3422 126972 -2616 127248 -1588 c -127413 -953 127483 370 127471 2393 C -126119 800 124432 0 122409 0 c -119892 0 117946 905 116570 2722 c -115195 4533 114501 6715 114501 9249 c -114501 10995 114818 12606 115447 14082 c -116082 15558 117000 16698 118199 17504 c -119399 18303 120810 18709 122427 18709 c -124584 18709 126366 17833 127765 16087 C -127765 18292 L -130629 18292 L -130629 2481 l -130629 -365 130335 -2387 129759 -3575 c -129176 -4763 128259 -5703 127001 -6391 c -125743 -7079 124196 -7426 122356 -7426 c -120175 -7426 118411 -6932 117070 -5950 c -115724 -4968 115077 -3493 115124 -1517 C -@c -117688 9472 m -117688 7073 118164 5321 119122 4222 c -120075 3116 121268 2569 122703 2569 c -124126 2569 125319 3116 126284 4210 c -127248 5309 127730 7026 127730 9372 c -127730 11612 127236 13300 126242 14435 c -125249 15569 124049 16140 122650 16140 c -121274 16140 120104 15581 119134 14458 c -118170 13341 117688 11677 117688 9472 c -@c -F -%CHAR: 132981 0 (e) @t -147827 5891 m -151032 5497 L -150526 3622 149591 2170 148227 1135 c -146857 106 145111 -412 142988 -412 c -140313 -412 138190 412 136626 2058 c -135057 3704 134275 6015 134275 8990 c -134275 12071 135068 14458 136650 16157 c -138237 17857 140289 18709 142818 18709 c -145264 18709 147263 17874 148809 16210 c -150361 14546 151137 12200 151137 9184 c -151137 8996 151132 8720 151120 8355 C -137479 8355 L -137591 6344 138161 4804 139184 3739 c -140207 2669 141477 2134 143006 2134 c -144141 2134 145111 2434 145916 3034 c -146722 3628 147357 4580 147827 5891 C -@c -137649 10907 m -147862 10907 L -147727 12441 147333 13600 146692 14364 c -145705 15558 144423 16157 142853 16157 c -141430 16157 140231 15681 139260 14729 c -138290 13776 137755 12500 137649 10907 C -@c -F -T -@rax 401.11625 657.05046 430.56907 670.87020 @E -[0.00028346 0.00000000 0.00000000 0.00028346 416.00804777 665.14362921] @tm - 0 O 0 @g -0.00 0.00 0.00 1.00 k -e - -% FontChange:/_ArialCE 28222.00000 z -%CHAR: -52535 0 (R) @t --50315 0 m --50315 20202 L --41359 20202 l --39558 20202 -38189 20019 -37253 19657 c --36317 19294 -35569 18655 -35004 17738 c --34445 16816 -34167 15800 -34167 14690 c --34167 13255 -34628 12051 -35559 11068 c --36486 10085 -37921 9459 -39859 9191 C --39148 8852 -38612 8518 -38245 8184 c --37464 7469 -36726 6571 -36025 5499 c --32511 0 L --35875 0 L --38546 4205 l --39327 5414 -39972 6345 -40480 6985 c --40983 7629 -41434 8081 -41834 8335 c --42234 8594 -42638 8772 -43052 8876 c --43358 8937 -43852 8970 -44543 8970 c --47643 8970 L --47643 0 L --50315 0 L -@c --47643 11284 m --41895 11284 l --40677 11284 -39718 11411 -39031 11665 c --38339 11919 -37817 12324 -37460 12879 c --37102 13434 -36924 14036 -36924 14690 c --36924 15644 -37267 16430 -37963 17046 c --38654 17662 -39750 17968 -41251 17968 c --47643 17968 L --47643 11284 L -@c -F -%CHAR: -32159 0 (e) @t --20282 4713 m --17719 4398 L --18123 2897 -18871 1736 -19962 908 c --21058 85 -22455 -329 -24153 -329 c --26294 -329 -27992 329 -29243 1646 c --30499 2963 -31124 4812 -31124 7192 c --31124 9657 -30489 11566 -29224 12926 c --27954 14285 -26312 14967 -24290 14967 c --22333 14967 -20734 14299 -19497 12968 c --18255 11637 -17634 9760 -17634 7347 c --17634 7197 -17639 6976 -17648 6684 C --28561 6684 L --28471 5075 -28015 3843 -27197 2992 c --26378 2135 -25362 1707 -24139 1707 c --23231 1707 -22455 1947 -21811 2427 c --21167 2902 -20659 3664 -20282 4713 C -@c --28424 8725 m --20254 8725 L --20362 9953 -20677 10880 -21190 11491 c --21980 12446 -23006 12926 -24262 12926 c --25400 12926 -26359 12545 -27135 11783 c --27912 11021 -28340 10000 -28424 8725 C -@c -F -%CHAR: -16468 0 (t) @t --9191 2220 m --8834 28 L --9530 -118 -10156 -193 -10706 -193 c --11609 -193 -12305 -52 -12804 235 c --13298 517 -13646 894 -13848 1359 c --14050 1820 -14154 2799 -14154 4285 c --14154 12705 L --15974 12705 L --15974 14633 L --14154 14633 L --14154 18260 L --11684 19746 L --11684 14633 L --9191 14633 L --9191 12705 L --11684 12705 L --11684 4149 l --11684 3438 -11642 2987 -11557 2785 c --11468 2582 -11327 2422 -11129 2300 c --10932 2183 -10650 2121 -10283 2121 c --10005 2121 -9643 2154 -9191 2220 C -@c -F -%CHAR: -8622 0 (r) @t --6788 0 m --6788 14633 L --4558 14633 L --4558 12418 L --3989 13452 -3462 14139 -2978 14468 c --2498 14798 -1966 14967 -1388 14967 c --551 14967 296 14699 1162 14167 C -306 11863 L --297 12225 -903 12404 -1510 12404 c --2056 12404 -2540 12239 -2973 11914 c --3406 11585 -3711 11134 -3895 10555 c --4172 9675 -4309 8711 -4309 7662 c --4309 0 L --6788 0 L -@c -F -%CHAR: 776 0 (i) @t -2648 17347 m -2648 20202 L -5132 20202 L -5132 17347 L -2648 17347 L -@c -2648 0 m -2648 14633 L -5132 14633 L -5132 0 L -2648 0 L -@c -F -%CHAR: 7041 0 (e) @t -18918 4713 m -21481 4398 L -21077 2897 20329 1736 19238 908 c -18142 85 16745 -329 15047 -329 c -12906 -329 11208 329 9957 1646 c -8701 2963 8076 4812 8076 7192 c -8076 9657 8711 11566 9976 12926 c -11246 14285 12888 14967 14910 14967 c -16867 14967 18466 14299 19703 12968 c -20945 11637 21566 9760 21566 7347 c -21566 7197 21561 6976 21552 6684 C -10639 6684 L -10729 5075 11185 3843 12003 2992 c -12822 2135 13838 1707 15061 1707 c -15969 1707 16745 1947 17389 2427 c -18033 2902 18541 3664 18918 4713 C -@c -10776 8725 m -18946 8725 L -18838 9953 18523 10880 18010 11491 c -17220 12446 16194 12926 14938 12926 c -13800 12926 12841 12545 12065 11783 c -11288 11021 10860 10000 10776 8725 C -@c -F -%CHAR: 22732 0 (v) @t -28659 0 m -23089 14633 L -25709 14633 L -28851 5870 l -29190 4925 29501 3942 29788 2921 C -30009 3692 30314 4619 30709 5706 c -33964 14633 L -36514 14633 L -30973 0 L -28659 0 L -@c -F -%CHAR: 36843 0 (e) @t -48720 4713 m -51283 4398 L -50879 2897 50131 1736 49040 908 c -47944 85 46547 -329 44849 -329 c -42708 -329 41010 329 39759 1646 c -38503 2963 37878 4812 37878 7192 c -37878 9657 38513 11566 39778 12926 c -41048 14285 42690 14967 44712 14967 c -46669 14967 48268 14299 49505 12968 c -50747 11637 51368 9760 51368 7347 c -51368 7197 51363 6976 51354 6684 C -40441 6684 L -40531 5075 40987 3843 41805 2992 c -42624 2135 43640 1707 44863 1707 c -45771 1707 46547 1947 47191 2427 c -47835 2902 48343 3664 48720 4713 C -@c -40578 8725 m -48748 8725 L -48640 9953 48325 10880 47812 11491 c -47022 12446 45996 12926 44740 12926 c -43602 12926 42643 12545 41867 11783 c -41090 11021 40662 10000 40578 8725 C -@c -F -%CHAR: -51745 -28222 (r) @t --49911 -28222 m --49911 -13589 L --47681 -13589 L --47681 -15804 L --47112 -14770 -46585 -14083 -46101 -13754 c --45621 -13424 -45089 -13255 -44511 -13255 c --43674 -13255 -42827 -13523 -41961 -14055 C --42817 -16359 L --43420 -15997 -44026 -15818 -44633 -15818 c --45179 -15818 -45663 -15983 -46096 -16308 c --46529 -16637 -46834 -17088 -47018 -17667 c --47295 -18547 -47432 -19511 -47432 -20560 c --47432 -28222 L --49911 -28222 L -@c -F -%CHAR: -42347 -28222 (a) @t --30936 -26416 m --31858 -27197 -32742 -27747 -33589 -28071 c --34440 -28391 -35353 -28551 -36326 -28551 c --37935 -28551 -39167 -28161 -40033 -27375 c --40894 -26590 -41326 -25583 -41326 -24365 c --41326 -23645 -41166 -22992 -40837 -22399 c --40513 -21806 -40085 -21331 -39558 -20974 c --39026 -20616 -38434 -20343 -37770 -20160 c --37286 -20033 -36552 -19906 -35569 -19788 c --33565 -19548 -32088 -19266 -31143 -18932 C --31133 -18594 -31129 -18377 -31129 -18288 c --31129 -17277 -31364 -16562 -31834 -16152 c --32465 -15588 -33410 -15310 -34657 -15310 c --35823 -15310 -36684 -15513 -37244 -15922 c --37799 -16331 -38208 -17055 -38476 -18095 C --40898 -17761 L --40677 -16726 -40315 -15884 -39812 -15249 c --39308 -14610 -38575 -14116 -37620 -13772 c --36665 -13429 -35560 -13255 -34299 -13255 c --33048 -13255 -32037 -13405 -31256 -13697 c --30475 -13993 -29901 -14360 -29530 -14807 c --29163 -15254 -28909 -15814 -28758 -16496 c --28678 -16919 -28636 -17681 -28636 -18782 c --28636 -22088 l --28636 -24398 -28584 -25856 -28476 -26463 c --28372 -27074 -28161 -27662 -27850 -28222 C --30442 -28222 L --30696 -27709 -30865 -27107 -30936 -26416 C -@c --31143 -20875 m --32046 -21246 -33396 -21557 -35193 -21816 c --36213 -21961 -36938 -22126 -37356 -22309 c --37780 -22493 -38109 -22761 -38335 -23119 c --38565 -23471 -38683 -23862 -38683 -24294 c --38683 -24958 -38429 -25508 -37930 -25950 c --37432 -26388 -36698 -26609 -35734 -26609 c --34779 -26609 -33927 -26402 -33184 -25983 c --32441 -25564 -31891 -24991 -31543 -24266 c --31275 -23706 -31143 -22879 -31143 -21787 c --31143 -20875 L -@c -F -%CHAR: -26656 -28222 (w) @t --22093 -28222 m --26571 -13589 L --24008 -13589 L --21680 -22037 L --20814 -25179 L --20776 -25019 -20522 -24012 -20057 -22159 c --17728 -13589 L --15179 -13589 L --12987 -22074 L --12253 -24873 L --11416 -22046 L --8909 -13589 L --6496 -13589 L --11073 -28222 L --13646 -28222 L --15974 -19459 L --16543 -16961 L --19502 -28222 L --22093 -28222 L -@c -F -%CHAR: 1566 -28222 (f) @t -4017 -28222 m -4017 -15517 L -1829 -15517 L -1829 -13589 L -4017 -13589 L -4017 -12032 l -4017 -11049 4106 -10315 4280 -9840 c -4520 -9196 4939 -8674 5541 -8274 c -6143 -7874 6985 -7676 8071 -7676 c -8767 -7676 9539 -7756 10385 -7926 C -10014 -10089 L -9501 -9995 9012 -9948 8551 -9948 c -7798 -9948 7267 -10108 6956 -10433 c -6641 -10753 6486 -11355 6486 -12239 c -6486 -13589 L -9336 -13589 L -9336 -15517 L -6486 -15517 L -6486 -28222 L -4017 -28222 L -@c -F -%CHAR: 9412 -28222 (i) @t -11284 -10875 m -11284 -8020 L -13768 -8020 L -13768 -10875 L -11284 -10875 L -@c -11284 -28222 m -11284 -13589 L -13768 -13589 L -13768 -28222 L -11284 -28222 L -@c -F -%CHAR: 15677 -28222 (l) @t -17483 -28222 m -17483 -8020 L -19962 -8020 L -19962 -28222 L -17483 -28222 L -@c -F -%CHAR: 21942 -28222 (e) @t -33819 -23509 m -36382 -23824 L -35978 -25325 35230 -26486 34139 -27314 c -33043 -28137 31646 -28551 29948 -28551 c -27807 -28551 26109 -27893 24858 -26576 c -23602 -25259 22977 -23410 22977 -21030 c -22977 -18565 23612 -16656 24877 -15296 c -26147 -13937 27789 -13255 29811 -13255 c -31768 -13255 33367 -13923 34604 -15254 c -35846 -16585 36467 -18462 36467 -20875 c -36467 -21025 36462 -21246 36453 -21538 C -25540 -21538 L -25630 -23147 26086 -24379 26904 -25230 c -27723 -26087 28739 -26515 29962 -26515 c -30870 -26515 31646 -26275 32290 -25795 c -32934 -25320 33442 -24558 33819 -23509 C -@c -25677 -19497 m -33847 -19497 L -33739 -18269 33424 -17342 32911 -16731 c -32121 -15776 31095 -15296 29839 -15296 c -28701 -15296 27742 -15677 26966 -16439 c -26189 -17201 25761 -18222 25677 -19497 C -@c -F -%CHAR: 37633 -28222 (s) @t -38503 -23852 m -40954 -23467 L -41090 -24450 41476 -25202 42106 -25729 c -42732 -26251 43611 -26515 44745 -26515 c -45883 -26515 46730 -26279 47280 -25818 c -47831 -25353 48108 -24807 48108 -24186 c -48108 -23622 47863 -23184 47374 -22860 c -47036 -22639 46189 -22361 44839 -22023 c -43023 -21562 41758 -21166 41057 -20828 c -40356 -20494 39820 -20028 39458 -19436 c -39096 -18843 38912 -18189 38912 -17474 c -38912 -16820 39063 -16218 39364 -15663 c -39660 -15103 40069 -14643 40582 -14276 c -40968 -13993 41495 -13749 42158 -13551 c -42826 -13354 43541 -13255 44303 -13255 c -45450 -13255 46457 -13424 47327 -13754 c -48197 -14083 48837 -14530 49251 -15094 c -49665 -15663 49947 -16416 50102 -17361 C -47680 -17695 L -47567 -16943 47247 -16355 46720 -15931 c -46194 -15508 45446 -15296 44482 -15296 c -43343 -15296 42530 -15484 42045 -15861 c -41556 -16237 41311 -16679 41311 -17182 c -41311 -17507 41415 -17794 41617 -18053 c -41819 -18321 42134 -18537 42567 -18716 c -42816 -18805 43546 -19017 44759 -19346 c -46514 -19817 47736 -20198 48428 -20499 c -49124 -20795 49670 -21232 50065 -21801 c -50460 -22371 50657 -23076 50657 -23923 c -50657 -24751 50413 -25527 49933 -26261 c -49449 -26990 48752 -27554 47845 -27954 c -46937 -28354 45907 -28551 44759 -28551 c -42854 -28551 41405 -28156 40408 -27366 c -39411 -26576 38776 -25405 38503 -23852 C -@c -F -T -@rax 617.48504 670.41808 643.40561 677.73402 @E -[0.00028346 0.00000000 0.00000000 0.00028346 630.60460685 672.00743998] @tm - 0 O 0 @g -0.00 0.00 0.00 1.00 k -e - -% FontChange:/_ArialCE 28222.00000 z -%CHAR: -46283 0 (L) @t --44218 0 m --44218 20202 L --41542 20202 L --41542 2385 L --31593 2385 L --31593 0 L --44218 0 L -@c -F -%CHAR: -30592 0 (o) @t --29656 7319 m --29656 10028 -28903 12037 -27394 13340 c --26138 14421 -24604 14967 -22793 14967 c --20780 14967 -19134 14309 -17859 12987 c --16580 11670 -15945 9849 -15945 7526 c --15945 5640 -16227 4158 -16791 3081 c --17356 1999 -18179 1162 -19256 564 c --20338 -33 -21514 -329 -22793 -329 c --24839 -329 -26495 325 -27760 1642 c --29026 2954 -29656 4845 -29656 7319 c -@c --27107 7319 m --27107 5442 -26697 4040 -25879 3109 c --25060 2173 -24030 1707 -22793 1707 c --21561 1707 -20536 2178 -19717 3114 c --18903 4050 -18494 5480 -18494 7399 c --18494 9210 -18903 10583 -19727 11515 c --20550 12446 -21570 12912 -22793 12912 c --24030 12912 -25060 12446 -25879 11519 c --26697 10593 -27107 9191 -27107 7319 c -@c -F -%CHAR: -14901 0 (o) @t --13965 7319 m --13965 10028 -13212 12037 -11703 13340 c --10447 14421 -8913 14967 -7102 14967 c --5089 14967 -3443 14309 -2168 12987 c --889 11670 -254 9849 -254 7526 c --254 5640 -536 4158 -1100 3081 c --1665 1999 -2488 1162 -3565 564 c --4647 -33 -5823 -329 -7102 -329 c --9148 -329 -10804 325 -12069 1642 c --13335 2954 -13965 4845 -13965 7319 c -@c --11416 7319 m --11416 5442 -11006 4040 -10188 3109 c --9369 2173 -8339 1707 -7102 1707 c --5870 1707 -4845 2178 -4026 3114 c --3212 4050 -2803 5480 -2803 7399 c --2803 9210 -3212 10583 -4036 11515 c --4859 12446 -5879 12912 -7102 12912 c --8339 12912 -9369 12446 -10188 11519 c --11006 10593 -11416 9191 -11416 7319 c -@c -F -%CHAR: 790 0 (k) @t -2662 0 m -2662 20202 L -5146 20202 L -5146 8683 L -11016 14633 L -14224 14633 L -8631 9205 L -14793 0 L -11731 0 L -6895 7484 L -5146 5800 L -5146 0 L -2662 0 L -@c -F -%CHAR: 14901 0 (u) @t -26354 0 m -26354 2150 L -25211 494 23664 -329 21707 -329 c -20846 -329 20037 -165 19290 165 c -18542 494 17987 913 17624 1411 c -17258 1914 17004 2526 16858 3250 c -16759 3739 16707 4511 16707 5569 c -16707 14633 L -19186 14633 L -19186 6519 l -19186 5221 19238 4351 19337 3899 c -19496 3246 19826 2738 20329 2361 c -20837 1990 21463 1806 22206 1806 c -22949 1806 23645 1994 24299 2375 c -24953 2756 25414 3278 25682 3932 c -25955 4591 26091 5546 26091 6792 c -26091 14633 L -28570 14633 L -28570 0 L -26354 0 L -@c -F -%CHAR: 30592 0 (p) @t -32455 -5607 m -32455 14633 L -34712 14633 L -34712 12733 L -35244 13476 35846 14036 36519 14407 c -37187 14779 38000 14967 38955 14967 c -40206 14967 41307 14643 42262 14003 c -43221 13358 43941 12451 44425 11279 c -44915 10108 45159 8824 45159 7427 c -45159 5931 44891 4581 44350 3382 c -43814 2183 43033 1265 42008 626 c -40982 -9 39905 -329 38776 -329 c -37949 -329 37210 -155 36552 193 c -35893 541 35357 983 34933 1515 C -34933 -5607 L -32455 -5607 L -@c -34698 7234 m -34698 5353 35079 3960 35841 3057 c -36603 2159 37530 1707 38612 1707 c -39712 1707 40658 2173 41443 3109 c -42229 4040 42624 5484 42624 7441 c -42624 9309 42238 10701 41472 11632 c -40705 12559 39788 13024 38725 13024 c -37666 13024 36730 12531 35917 11543 c -35103 10555 34698 9116 34698 7234 c -@c -F -T -@rax 472.88636 603.39061 501.92192 609.31191 @E -[0.00028346 0.00000000 0.00000000 0.00028346 487.55818689 603.48782044] @tm - 0 O 0 @g -0.00 0.00 0.00 1.00 k -e - -% FontChange:/_ArialCE 28222.00000 z -%CHAR: -51759 0 (G) @t --40127 7926 m --40127 10292 L --31571 10306 L --31571 2813 L --32883 1764 -34238 978 -35635 447 c --37032 -80 -38466 -343 -39934 -343 c --41919 -343 -43725 80 -45343 931 c --46966 1778 -48189 3010 -49017 4614 c --49845 6223 -50259 8020 -50259 10005 c --50259 11971 -49845 13805 -49021 15508 c --48203 17215 -47018 18481 -45475 19309 c --43932 20132 -42154 20546 -40141 20546 c --38683 20546 -37361 20310 -36180 19835 c --35000 19365 -34073 18706 -33405 17860 c --32733 17013 -32225 15913 -31872 14553 C --34285 13890 L --34591 14920 -34967 15729 -35414 16317 c --35865 16905 -36510 17375 -37347 17728 c --38180 18081 -39111 18260 -40127 18260 c --41350 18260 -42408 18071 -43297 17700 c --44191 17328 -44906 16839 -45456 16232 c --46002 15626 -46425 14962 -46731 14233 c --47243 12987 -47502 11632 -47502 10169 c --47502 8368 -47192 6863 -46571 5649 c --45950 4436 -45047 3537 -43862 2949 c --42676 2361 -41420 2065 -40089 2065 c --38927 2065 -37799 2291 -36698 2738 c --35592 3180 -34760 3655 -34191 4163 C --34191 7926 L --40127 7926 L -@c -F -%CHAR: -29802 0 (e) @t --17925 4713 m --15362 4398 L --15766 2897 -16514 1736 -17605 908 c --18701 85 -20098 -329 -21796 -329 c --23937 -329 -25635 329 -26886 1646 c --28142 2963 -28767 4812 -28767 7192 c --28767 9657 -28132 11566 -26867 12926 c --25597 14285 -23955 14967 -21933 14967 c --19976 14967 -18377 14299 -17140 12968 c --15898 11637 -15277 9760 -15277 7347 c --15277 7197 -15282 6976 -15291 6684 C --26204 6684 L --26114 5075 -25658 3843 -24840 2992 c --24021 2135 -23005 1707 -21782 1707 c --20874 1707 -20098 1947 -19454 2427 c --18810 2902 -18302 3664 -17925 4713 C -@c --26067 8725 m --17897 8725 L --18005 9953 -18320 10880 -18833 11491 c --19623 12446 -20649 12926 -21905 12926 c --23043 12926 -24002 12545 -24778 11783 c --25555 11021 -25983 10000 -26067 8725 C -@c -F -%CHAR: -14111 0 (t) @t --6834 2220 m --6477 28 L --7173 -118 -7799 -193 -8349 -193 c --9252 -193 -9948 -52 -10447 235 c --10941 517 -11289 894 -11491 1359 c --11693 1820 -11797 2799 -11797 4285 c --11797 12705 L --13617 12705 L --13617 14633 L --11797 14633 L --11797 18260 L --9327 19746 L --9327 14633 L --6834 14633 L --6834 12705 L --9327 12705 L --9327 4149 l --9327 3438 -9285 2987 -9200 2785 c --9111 2582 -8970 2422 -8772 2300 c --8575 2183 -8293 2121 -7926 2121 c --7648 2121 -7286 2154 -6834 2220 C -@c -F -%CHAR: 1581 0 (f) @t -4032 0 m -4032 12705 L -1844 12705 L -1844 14633 L -4032 14633 L -4032 16190 l -4032 17173 4121 17907 4295 18382 c -4535 19026 4954 19548 5556 19948 c -6158 20348 7000 20546 8086 20546 c -8782 20546 9554 20466 10400 20296 C -10029 18133 L -9516 18227 9027 18274 8566 18274 c -7813 18274 7282 18114 6971 17789 c -6656 17469 6501 16867 6501 15983 c -6501 14633 L -9351 14633 L -9351 12705 L -6501 12705 L -6501 0 L -4032 0 L -@c -F -%CHAR: 9427 0 (i) @t -11299 17347 m -11299 20202 L -13783 20202 L -13783 17347 L -11299 17347 L -@c -11299 0 m -11299 14633 L -13783 14633 L -13783 0 L -11299 0 L -@c -F -%CHAR: 15692 0 (l) @t -17498 0 m -17498 20202 L -19977 20202 L -19977 0 L -17498 0 L -@c -F -%CHAR: 21957 0 (e) @t -33834 4713 m -36397 4398 L -35993 2897 35245 1736 34154 908 c -33058 85 31661 -329 29963 -329 c -27822 -329 26124 329 24873 1646 c -23617 2963 22992 4812 22992 7192 c -22992 9657 23627 11566 24892 12926 c -26162 14285 27804 14967 29826 14967 c -31783 14967 33382 14299 34619 12968 c -35861 11637 36482 9760 36482 7347 c -36482 7197 36477 6976 36468 6684 C -25555 6684 L -25645 5075 26101 3843 26919 2992 c -27738 2135 28754 1707 29977 1707 c -30885 1707 31661 1947 32305 2427 c -32949 2902 33457 3664 33834 4713 C -@c -25692 8725 m -33862 8725 L -33754 9953 33439 10880 32926 11491 c -32136 12446 31110 12926 29854 12926 c -28716 12926 27757 12545 26981 11783 c -26204 11021 25776 10000 25692 8725 C -@c -F -%CHAR: 37648 0 (s) @t -38518 4370 m -40969 4755 L -41105 3772 41491 3020 42121 2493 c -42747 1971 43626 1707 44760 1707 c -45898 1707 46745 1943 47295 2404 c -47846 2869 48123 3415 48123 4036 c -48123 4600 47878 5038 47389 5362 c -47051 5583 46204 5861 44854 6199 c -43038 6660 41773 7056 41072 7394 c -40371 7728 39835 8194 39473 8786 c -39111 9379 38927 10033 38927 10748 c -38927 11402 39078 12004 39379 12559 c -39675 13119 40084 13579 40597 13946 c -40983 14229 41510 14473 42173 14671 c -42841 14868 43556 14967 44318 14967 c -45465 14967 46472 14798 47342 14468 c -48212 14139 48852 13692 49266 13128 c -49680 12559 49962 11806 50117 10861 C -47695 10527 L -47582 11279 47262 11867 46735 12291 c -46209 12714 45461 12926 44497 12926 c -43358 12926 42545 12738 42060 12361 c -41571 11985 41326 11543 41326 11040 c -41326 10715 41430 10428 41632 10169 c -41834 9901 42149 9685 42582 9506 c -42831 9417 43561 9205 44774 8876 c -46529 8405 47751 8024 48443 7723 c -49139 7427 49685 6990 50080 6421 c -50475 5851 50672 5146 50672 4299 c -50672 3471 50428 2695 49948 1961 c -49464 1232 48767 668 47860 268 c -46952 -132 45922 -329 44774 -329 c -42869 -329 41420 66 40423 856 c -39426 1646 38791 2817 38518 4370 C -@c -F -T -@rax 506.00183 669.62636 531.86400 685.13443 @E -[0.00028346 0.00000000 0.00000000 0.00028346 519.26426447 679.31033736] @tm - 0 O 0 @g -0.00 0.00 0.00 1.00 k -e - -% FontChange:/_ArialCE 28222.00000 z -%CHAR: -22747 0 (G) @t --11115 7926 m --11115 10292 L --2559 10306 L --2559 2813 L --3871 1764 -5226 978 -6623 447 c --8020 -80 -9454 -343 -10922 -343 c --12907 -343 -14713 80 -16331 931 c --17954 1778 -19177 3010 -20005 4614 c --20833 6223 -21247 8020 -21247 10005 c --21247 11971 -20833 13805 -20009 15508 c --19191 17215 -18006 18481 -16463 19309 c --14920 20132 -13142 20546 -11129 20546 c --9671 20546 -8349 20310 -7168 19835 c --5988 19365 -5061 18706 -4393 17860 c --3721 17013 -3213 15913 -2860 14553 C --5273 13890 L --5579 14920 -5955 15729 -6402 16317 c --6853 16905 -7498 17375 -8335 17728 c --9168 18081 -10099 18260 -11115 18260 c --12338 18260 -13396 18071 -14285 17700 c --15179 17328 -15894 16839 -16444 16232 c --16990 15626 -17413 14962 -17719 14233 c --18231 12987 -18490 11632 -18490 10169 c --18490 8368 -18180 6863 -17559 5649 c --16938 4436 -16035 3537 -14850 2949 c --13664 2361 -12408 2065 -11077 2065 c --9915 2065 -8787 2291 -7686 2738 c --6580 3180 -5748 3655 -5179 4163 C --5179 7926 L --11115 7926 L -@c -F -%CHAR: -790 0 (e) @t -11087 4713 m -13650 4398 L -13246 2897 12498 1736 11407 908 c -10311 85 8914 -329 7216 -329 c -5075 -329 3377 329 2126 1646 c -870 2963 245 4812 245 7192 c -245 9657 880 11566 2145 12926 c -3415 14285 5057 14967 7079 14967 c -9036 14967 10635 14299 11872 12968 c -13114 11637 13735 9760 13735 7347 c -13735 7197 13730 6976 13721 6684 C -2808 6684 L -2898 5075 3354 3843 4172 2992 c -4991 2135 6007 1707 7230 1707 c -8138 1707 8914 1947 9558 2427 c -10202 2902 10710 3664 11087 4713 C -@c -2945 8725 m -11115 8725 L -11007 9953 10692 10880 10179 11491 c -9389 12446 8363 12926 7107 12926 c -5969 12926 5010 12545 4234 11783 c -3457 11021 3029 10000 2945 8725 C -@c -F -%CHAR: 14901 0 (t) @t -22178 2220 m -22535 28 L -21839 -118 21213 -193 20663 -193 c -19760 -193 19064 -52 18565 235 c -18071 517 17723 894 17521 1359 c -17319 1820 17215 2799 17215 4285 c -17215 12705 L -15395 12705 L -15395 14633 L -17215 14633 L -17215 18260 L -19685 19746 L -19685 14633 L -22178 14633 L -22178 12705 L -19685 12705 L -19685 4149 l -19685 3438 19727 2987 19812 2785 c -19901 2582 20042 2422 20240 2300 c -20437 2183 20719 2121 21086 2121 c -21364 2121 21726 2154 22178 2220 C -@c -F -%CHAR: -45493 -28222 (j) @t --43644 -10898 m --43644 -8020 L --41166 -8020 L --41166 -10898 L --43644 -10898 L -@c --46787 -33899 m --46321 -31792 L --45822 -31919 -45432 -31985 -45150 -31985 c --44642 -31985 -44265 -31816 -44021 -31482 c --43771 -31148 -43644 -30306 -43644 -28965 c --43644 -13589 L --41166 -13589 L --41166 -29022 l --41166 -30823 -41401 -32074 -41866 -32785 c --42464 -33702 -43456 -34163 -44844 -34163 c --45517 -34163 -46166 -34073 -46787 -33899 C -@c -F -%CHAR: -39228 -28222 (o) @t --38292 -20903 m --38292 -18194 -37539 -16185 -36030 -14882 c --34774 -13801 -33240 -13255 -31429 -13255 c --29416 -13255 -27770 -13913 -26495 -15235 c --25216 -16552 -24581 -18373 -24581 -20696 c --24581 -22582 -24863 -24064 -25427 -25141 c --25992 -26223 -26815 -27060 -27892 -27658 c --28974 -28255 -30150 -28551 -31429 -28551 c --33475 -28551 -35131 -27897 -36396 -26580 c --37662 -25268 -38292 -23377 -38292 -20903 c -@c --35743 -20903 m --35743 -22780 -35333 -24182 -34515 -25113 c --33696 -26049 -32666 -26515 -31429 -26515 c --30197 -26515 -29172 -26044 -28353 -25108 c --27539 -24172 -27130 -22742 -27130 -20823 c --27130 -19012 -27539 -17639 -28363 -16707 c --29186 -15776 -30206 -15310 -31429 -15310 c --32666 -15310 -33696 -15776 -34515 -16703 c --35333 -17629 -35743 -19031 -35743 -20903 c -@c -F -%CHAR: -23537 -28222 (b) @t --19388 -28222 m --21688 -28222 L --21688 -8020 L --19210 -8020 L --19210 -15226 L --18161 -13913 -16825 -13255 -15202 -13255 c --14299 -13255 -13448 -13438 -12643 -13801 c --11839 -14163 -11180 -14675 -10658 -15329 c --10141 -15988 -9732 -16778 -9440 -17709 c --9144 -18636 -8998 -19628 -8998 -20682 c --8998 -23194 -9619 -25132 -10861 -26500 c --12098 -27869 -13589 -28551 -15324 -28551 c --17051 -28551 -18405 -27832 -19388 -26388 C --19388 -28222 L -@c --19417 -20795 m --19417 -22549 -19177 -23815 -18702 -24595 c --17921 -25875 -16862 -26515 -15531 -26515 c --14445 -26515 -13509 -26044 -12719 -25099 c --11928 -24158 -11533 -22756 -11533 -20889 c --11533 -18979 -11914 -17568 -12672 -16660 c --13429 -15753 -14346 -15296 -15418 -15296 c --16505 -15296 -17441 -15767 -18231 -16707 c --19021 -17648 -19417 -19012 -19417 -20795 c -@c -F -%CHAR: 0 -28222 (i) @t -1872 -10875 m -1872 -8020 L -4356 -8020 L -4356 -10875 L -1872 -10875 L -@c -1872 -28222 m -1872 -13589 L -4356 -13589 L -4356 -28222 L -1872 -28222 L -@c -F -%CHAR: 6265 -28222 (n) @t -8128 -28222 m -8128 -13589 L -10357 -13589 L -10357 -15668 L -11434 -14059 12987 -13255 15014 -13255 c -15898 -13255 16707 -13415 17446 -13730 c -18189 -14050 18739 -14464 19106 -14981 c -19478 -15494 19732 -16105 19882 -16811 c -19971 -17272 20019 -18076 20019 -19224 c -20019 -28222 L -17535 -28222 L -17535 -19318 l -17535 -18311 17441 -17554 17248 -17051 c -17055 -16552 16712 -16152 16223 -15856 c -15729 -15555 15155 -15405 14492 -15405 c -13433 -15405 12526 -15743 11754 -16411 c -10987 -17084 10606 -18354 10606 -20230 c -10606 -28222 L -8128 -28222 L -@c -F -%CHAR: 21956 -28222 (f) @t -24407 -28222 m -24407 -15517 L -22219 -15517 L -22219 -13589 L -24407 -13589 L -24407 -12032 l -24407 -11049 24496 -10315 24670 -9840 c -24910 -9196 25329 -8674 25931 -8274 c -26533 -7874 27375 -7676 28461 -7676 c -29157 -7676 29929 -7756 30775 -7926 C -30404 -10089 L -29891 -9995 29402 -9948 28941 -9948 c -28188 -9948 27657 -10108 27346 -10433 c -27031 -10753 26876 -11355 26876 -12239 c -26876 -13589 L -29726 -13589 L -29726 -15517 L -26876 -15517 L -26876 -28222 L -24407 -28222 L -@c -F -%CHAR: 29802 -28222 (o) @t -30738 -20903 m -30738 -18194 31491 -16185 33000 -14882 c -34256 -13801 35790 -13255 37601 -13255 c -39614 -13255 41260 -13913 42535 -15235 c -43814 -16552 44449 -18373 44449 -20696 c -44449 -22582 44167 -24064 43603 -25141 c -43038 -26223 42215 -27060 41138 -27658 c -40056 -28255 38880 -28551 37601 -28551 c -35555 -28551 33899 -27897 32634 -26580 c -31368 -25268 30738 -23377 30738 -20903 c -@c -33287 -20903 m -33287 -22780 33697 -24182 34515 -25113 c -35334 -26049 36364 -26515 37601 -26515 c -38833 -26515 39858 -26044 40677 -25108 c -41491 -24172 41900 -22742 41900 -20823 c -41900 -19012 41491 -17639 40667 -16707 c -39844 -15776 38824 -15310 37601 -15310 c -36364 -15310 35334 -15776 34515 -16703 c -33697 -17629 33287 -19031 33287 -20903 c -@c -F -T -@rax 468.68542 730.16107 542.66712 736.08236 @E -[0.00028346 0.00000000 0.00000000 0.00028346 505.96495787 730.25827250] @tm - 0 O 0 @g -0.00 0.00 0.00 1.00 k -e - -% FontChange:/_ArialCE 28222.00000 z -%CHAR: -131514 0 (J) @t --130700 5734 m --128287 6063 L --128226 4520 -127935 3462 -127422 2893 c --126904 2324 -126194 2041 -125286 2041 c --124614 2041 -124035 2192 -123551 2502 c --123062 2808 -122728 3227 -122544 3754 c --122361 4285 -122267 5127 -122267 6284 c --122267 20202 L --119595 20202 L --119595 6435 l --119595 4746 -119797 3434 -120206 2507 c --120616 1580 -121265 875 -122149 386 c --123038 -99 -124078 -343 -125272 -343 c --127046 -343 -128400 165 -129346 1185 c --130286 2206 -130738 3721 -130700 5734 C -@c -F -%CHAR: -117403 0 (P) @t --115225 0 m --115225 20202 L --107605 20202 l --106265 20202 -105239 20136 -104534 20009 c --103541 19845 -102709 19530 -102036 19064 c --101368 18603 -100827 17949 -100418 17117 c --100009 16279 -99807 15362 -99807 14360 c --99807 12643 -100352 11185 -101443 9995 c --102539 8810 -104515 8213 -107370 8213 c --112554 8213 L --112554 0 L --115225 0 L -@c --112554 10597 m --107328 10597 l --105602 10597 -104374 10917 -103649 11562 c --102925 12206 -102563 13109 -102563 14276 c --102563 15122 -102775 15847 -103203 16449 c --103631 17051 -104190 17446 -104891 17639 c --105343 17756 -106171 17817 -107384 17817 c --112554 17817 L --112554 10597 L -@c -F -%CHAR: -91241 0 (I) @t --88607 0 m --88607 20202 L --85935 20202 L --85935 0 L --88607 0 L -@c -F -%CHAR: -83395 0 (n) @t --81532 0 m --81532 14633 L --79303 14633 L --79303 12554 L --78226 14163 -76673 14967 -74646 14967 c --73762 14967 -72953 14807 -72214 14492 c --71471 14172 -70921 13758 -70554 13241 c --70182 12728 -69928 12117 -69778 11411 c --69689 10950 -69641 10146 -69641 8998 c --69641 0 L --72125 0 L --72125 8904 l --72125 9911 -72219 10668 -72412 11171 c --72605 11670 -72948 12070 -73437 12366 c --73931 12667 -74505 12817 -75168 12817 c --76227 12817 -77134 12479 -77906 11811 c --78673 11138 -79054 9868 -79054 7992 c --79054 0 L --81532 0 L -@c -F -%CHAR: -67704 0 (d) @t --56349 0 m --56349 1849 L --57276 395 -58640 -329 -60442 -329 c --61608 -329 -62680 -9 -63659 635 c --64637 1275 -65394 2173 -65935 3330 c --66472 4483 -66740 5804 -66740 7305 c --66740 8763 -66495 10089 -66011 11279 c --65521 12469 -64792 13382 -63819 14012 c --62845 14647 -61754 14967 -60550 14967 c --59670 14967 -58885 14779 -58198 14407 c --57506 14036 -56947 13551 -56514 12954 C --56514 20202 L --54049 20202 L --54049 0 L --56349 0 L -@c --64190 7305 m --64190 5428 -63795 4026 -63005 3100 c --62215 2173 -61283 1707 -60206 1707 c --59125 1707 -58203 2154 -57445 3039 c --56688 3923 -56307 5278 -56307 7098 c --56307 9102 -56693 10569 -57464 11505 c --58236 12446 -59186 12912 -60319 12912 c --61420 12912 -62342 12460 -63080 11562 c --63819 10663 -64190 9243 -64190 7305 c -@c -F -%CHAR: -52013 0 (e) @t --40136 4713 m --37573 4398 L --37977 2897 -38725 1736 -39816 908 c --40912 85 -42309 -329 -44007 -329 c --46148 -329 -47846 329 -49097 1646 c --50353 2963 -50978 4812 -50978 7192 c --50978 9657 -50343 11566 -49078 12926 c --47808 14285 -46166 14967 -44144 14967 c --42187 14967 -40588 14299 -39351 12968 c --38109 11637 -37488 9760 -37488 7347 c --37488 7197 -37493 6976 -37502 6684 C --48415 6684 L --48325 5075 -47869 3843 -47051 2992 c --46232 2135 -45216 1707 -43993 1707 c --43085 1707 -42309 1947 -41665 2427 c --41021 2902 -40513 3664 -40136 4713 C -@c --48278 8725 m --40108 8725 L --40216 9953 -40531 10880 -41044 11491 c --41834 12446 -42860 12926 -44116 12926 c --45254 12926 -46213 12545 -46989 11783 c --47766 11021 -48194 10000 -48278 8725 C -@c -F -%CHAR: -36322 0 (x) @t --36115 0 m --30767 7606 L --35715 14633 L --32616 14633 L --30367 11204 l --29949 10550 -29605 10005 -29351 9563 C --28947 10169 -28575 10706 -28232 11176 c --25767 14633 L --22804 14633 L --27860 7742 L --22418 0 L --25461 0 L --28467 4548 L --29266 5776 L --33109 0 L --36115 0 L -@c -F -%CHAR: -14365 0 (S) @t --13095 6491 m --10574 6712 L --10456 5701 -10179 4873 -9741 4224 c --9304 3575 -8627 3053 -7709 2653 c --6792 2253 -5757 2056 -4610 2056 c --3589 2056 -2690 2206 -1910 2507 c --1129 2813 -546 3227 -165 3754 c -216 4285 409 4859 409 5484 c -409 6119 226 6670 -146 7145 c --513 7620 -1119 8015 -1961 8335 c --2507 8547 -3702 8876 -5560 9323 c --7413 9770 -8716 10188 -9459 10583 c --10423 11087 -11143 11717 -11618 12465 c --12088 13213 -12324 14050 -12324 14981 c --12324 15997 -12037 16952 -11458 17836 c --10880 18725 -10033 19398 -8923 19859 c --7808 20315 -6576 20546 -5216 20546 c --3716 20546 -2399 20306 -1251 19821 c --108 19341 771 18631 1388 17695 c -1999 16759 2333 15696 2380 14511 C --183 14318 L --325 15593 -790 16562 -1585 17211 c --2380 17865 -3551 18189 -5103 18189 c --6722 18189 -7897 17893 -8641 17300 c --9379 16707 -9751 15992 -9751 15160 c --9751 14431 -9487 13833 -8965 13368 c --8448 12897 -7107 12418 -4934 11928 c --2761 11435 -1270 11007 -461 10640 c -715 10094 1585 9407 2145 8579 c -2705 7747 2982 6787 2982 5706 c -2982 4628 2676 3617 2060 2667 c -1444 1717 560 978 -593 447 c --1745 -80 -3043 -343 -4483 -343 c --6312 -343 -7846 -80 -9078 456 c --10315 988 -11284 1787 -11990 2860 c --12690 3928 -13062 5141 -13095 6491 C -@c -F -%CHAR: 4459 0 (e) @t -16336 4713 m -18899 4398 L -18495 2897 17747 1736 16656 908 c -15560 85 14163 -329 12465 -329 c -10324 -329 8626 329 7375 1646 c -6119 2963 5494 4812 5494 7192 c -5494 9657 6129 11566 7394 12926 c -8664 14285 10306 14967 12328 14967 c -14285 14967 15884 14299 17121 12968 c -18363 11637 18984 9760 18984 7347 c -18984 7197 18979 6976 18970 6684 C -8057 6684 L -8147 5075 8603 3843 9421 2992 c -10240 2135 11256 1707 12479 1707 c -13387 1707 14163 1947 14807 2427 c -15451 2902 15959 3664 16336 4713 C -@c -8194 8725 m -16364 8725 L -16256 9953 15941 10880 15428 11491 c -14638 12446 13612 12926 12356 12926 c -11218 12926 10259 12545 9483 11783 c -8706 11021 8278 10000 8194 8725 C -@c -F -%CHAR: 20150 0 (r) @t -21984 0 m -21984 14633 L -24214 14633 L -24214 12418 L -24783 13452 25310 14139 25794 14468 c -26274 14798 26806 14967 27384 14967 c -28221 14967 29068 14699 29934 14167 C -29078 11863 L -28475 12225 27869 12404 27262 12404 c -26716 12404 26232 12239 25799 11914 c -25366 11585 25061 11134 24877 10555 c -24600 9675 24463 8711 24463 7662 c -24463 0 L -21984 0 L -@c -F -%CHAR: 29548 0 (v) @t -35475 0 m -29905 14633 L -32525 14633 L -35667 5870 l -36006 4925 36317 3942 36604 2921 C -36825 3692 37130 4619 37525 5706 c -40780 14633 L -43330 14633 L -37789 0 L -35475 0 L -@c -F -%CHAR: 43659 0 (e) @t -55536 4713 m -58099 4398 L -57695 2897 56947 1736 55856 908 c -54760 85 53363 -329 51665 -329 c -49524 -329 47826 329 46575 1646 c -45319 2963 44694 4812 44694 7192 c -44694 9657 45329 11566 46594 12926 c -47864 14285 49506 14967 51528 14967 c -53485 14967 55084 14299 56321 12968 c -57563 11637 58184 9760 58184 7347 c -58184 7197 58179 6976 58170 6684 C -47257 6684 L -47347 5075 47803 3843 48621 2992 c -49440 2135 50456 1707 51679 1707 c -52587 1707 53363 1947 54007 2427 c -54651 2902 55159 3664 55536 4713 C -@c -47394 8725 m -55564 8725 L -55456 9953 55141 10880 54628 11491 c -53838 12446 52812 12926 51556 12926 c -50418 12926 49459 12545 48683 11783 c -47906 11021 47478 10000 47394 8725 C -@c -F -%CHAR: 59350 0 (r) @t -61184 0 m -61184 14633 L -63414 14633 L -63414 12418 L -63983 13452 64510 14139 64994 14468 c -65474 14798 66006 14967 66584 14967 c -67421 14967 68268 14699 69134 14167 C -68278 11863 L -67675 12225 67069 12404 66462 12404 c -65916 12404 65432 12239 64999 11914 c -64566 11585 64261 11134 64077 10555 c -63800 9675 63663 8711 63663 7662 c -63663 0 L -61184 0 L -@c -F -%CHAR: 76594 0 (f) @t -79045 0 m -79045 12705 L -76857 12705 L -76857 14633 L -79045 14633 L -79045 16190 l -79045 17173 79134 17907 79308 18382 c -79548 19026 79967 19548 80569 19948 c -81171 20348 82013 20546 83099 20546 c -83795 20546 84567 20466 85413 20296 C -85042 18133 L -84529 18227 84040 18274 83579 18274 c -82826 18274 82295 18114 81984 17789 c -81669 17469 81514 16867 81514 15983 c -81514 14633 L -84364 14633 L -84364 12705 L -81514 12705 L -81514 0 L -79045 0 L -@c -F -%CHAR: 84440 0 (e) @t -96317 4713 m -98880 4398 L -98476 2897 97728 1736 96637 908 c -95541 85 94144 -329 92446 -329 c -90305 -329 88607 329 87356 1646 c -86100 2963 85475 4812 85475 7192 c -85475 9657 86110 11566 87375 12926 c -88645 14285 90287 14967 92309 14967 c -94266 14967 95865 14299 97102 12968 c -98344 11637 98965 9760 98965 7347 c -98965 7197 98960 6976 98951 6684 C -88038 6684 L -88128 5075 88584 3843 89402 2992 c -90221 2135 91237 1707 92460 1707 c -93368 1707 94144 1947 94788 2427 c -95432 2902 95940 3664 96317 4713 C -@c -88175 8725 m -96345 8725 L -96237 9953 95922 10880 95409 11491 c -94619 12446 93593 12926 92337 12926 c -91199 12926 90240 12545 89464 11783 c -88687 11021 88259 10000 88175 8725 C -@c -F -%CHAR: 100131 0 (e) @t -112008 4713 m -114571 4398 L -114167 2897 113419 1736 112328 908 c -111232 85 109835 -329 108137 -329 c -105996 -329 104298 329 103047 1646 c -101791 2963 101166 4812 101166 7192 c -101166 9657 101801 11566 103066 12926 c -104336 14285 105978 14967 108000 14967 c -109957 14967 111556 14299 112793 12968 c -114035 11637 114656 9760 114656 7347 c -114656 7197 114651 6976 114642 6684 C -103729 6684 L -103819 5075 104275 3843 105093 2992 c -105912 2135 106928 1707 108151 1707 c -109059 1707 109835 1947 110479 2427 c -111123 2902 111631 3664 112008 4713 C -@c -103866 8725 m -112036 8725 L -111928 9953 111613 10880 111100 11491 c -110310 12446 109284 12926 108028 12926 c -106890 12926 105931 12545 105155 11783 c -104378 11021 103950 10000 103866 8725 C -@c -F -%CHAR: 115822 0 (d) @t -127177 0 m -127177 1849 L -126250 395 124886 -329 123084 -329 c -121918 -329 120846 -9 119867 635 c -118889 1275 118132 2173 117591 3330 c -117054 4483 116786 5804 116786 7305 c -116786 8763 117031 10089 117515 11279 c -118005 12469 118734 13382 119707 14012 c -120681 14647 121772 14967 122976 14967 c -123856 14967 124641 14779 125328 14407 c -126020 14036 126579 13551 127012 12954 C -127012 20202 L -129477 20202 L -129477 0 L -127177 0 L -@c -119336 7305 m -119336 5428 119731 4026 120521 3100 c -121311 2173 122243 1707 123320 1707 c -124401 1707 125323 2154 126081 3039 c -126838 3923 127219 5278 127219 7098 c -127219 9102 126833 10569 126062 11505 c -125290 12446 124340 12912 123207 12912 c -122106 12912 121184 12460 120446 11562 c -119707 10663 119336 9243 119336 7305 c -@c -F -T -@rax %Note: Object -362.81792 577.71128 456.05225 619.14898 @E - 0 O 0 @g -0.00 0.00 0.00 0.50 k -/$fm 0 def -362.81792 619.14898 m -456.05225 619.14898 L -456.05225 577.71128 L -362.81792 577.71128 L -362.81792 619.14898 L -@c -F - -@rax %Note: Object -359.83786 581.68318 452.91203 623.04945 @E - 0 O 0 @g -0.00 0.00 0.00 0.00 k -0 J 0 j [] 0 d 0 R 0 @G -0.00 0.00 0.00 1.00 K -0 0.49890 0.49890 0.00000 @w -/$fm 0 def -359.83786 623.04945 m -452.91203 623.04945 L -452.91203 581.68318 L -359.83786 581.68318 L -359.83786 623.04945 L -@c -B - -@rax 370.77279 593.58076 442.60044 610.97754 @E -[0.00028346 0.00000000 0.00000000 0.00028346 406.89352842 603.69758422] @tm - 0 O 0 @g -0.00 0.00 0.00 1.00 k -e - -% FontChange:/_ArialCE 35278.00000 z -%CHAR: -127426 0 (P) @t --124704 0 m --124704 25253 L --115179 25253 l --113503 25253 -112221 25171 -111339 25012 c --110099 24806 -109058 24412 -108217 23830 c --107382 23254 -106706 22437 -106195 21396 c --105683 20350 -105430 19203 -105430 17951 c --105430 15805 -106112 13982 -107476 12494 c --108846 11013 -111316 10266 -114885 10266 c --121364 10266 L --121364 0 L --124704 0 L -@c --121364 13247 m --114832 13247 l --112674 13247 -111139 13647 -110234 14452 c --109328 15258 -108876 16387 -108876 17845 c --108876 18903 -109140 19809 -109675 20561 c --110210 21314 -110910 21808 -111786 22049 c --112351 22196 -113385 22272 -114902 22272 c --121364 22272 L --121364 13247 L -@c -F -%CHAR: -103896 0 (r) @t --101603 0 m --101603 18292 L --98816 18292 L --98816 15522 L --98105 16816 -97446 17674 -96840 18086 c --96241 18497 -95576 18709 -94853 18709 c --93806 18709 -92748 18374 -91666 17710 C --92736 14829 L --93489 15281 -94247 15505 -95006 15505 c --95688 15505 -96294 15299 -96835 14893 c --97375 14482 -97758 13917 -97987 13194 c --98334 12094 -98504 10889 -98504 9578 c --98504 0 L --101603 0 L -@c -F -%CHAR: -92148 0 (i) @t --89808 21684 m --89808 25253 L --86703 25253 L --86703 21684 L --89808 21684 L -@c --89808 0 m --89808 18292 L --86703 18292 L --86703 0 L --89808 0 L -@c -F -%CHAR: -84316 0 (m) @t --81988 0 m --81988 18292 L --79218 18292 L --79218 15728 L --78642 16622 -77878 17345 -76925 17886 c --75973 18433 -74885 18709 -73668 18709 c --72316 18709 -71204 18427 -70340 17862 c --69470 17298 -68858 16516 -68506 15505 C --67053 17639 -65172 18709 -62855 18709 c --61038 18709 -59645 18203 -58669 17198 c --57693 16193 -57205 14646 -57205 12559 c --57205 0 L --60286 0 L --60286 11524 l --60286 12765 -60386 13658 -60586 14205 c --60791 14746 -61156 15187 -61679 15522 c --62208 15852 -62832 16022 -63543 16022 c --64831 16022 -65895 15593 -66748 14734 c --67594 13882 -68023 12512 -68023 10630 c --68023 0 L --71122 0 L --71122 11883 l --71122 13265 -71375 14299 -71881 14987 c --72386 15675 -73209 16022 -74362 16022 c --75232 16022 -76037 15793 -76778 15328 c --77519 14870 -78060 14199 -78389 13317 c --78724 12430 -78889 11154 -78889 9490 c --78889 0 L --81988 0 L -@c -F -%CHAR: -54929 0 (a) @t --40665 2258 m --41817 1282 -42923 594 -43981 188 c --45045 -212 -46186 -412 -47403 -412 c --49414 -412 -50954 76 -52036 1058 c --53112 2040 -53653 3298 -53653 4821 c --53653 5721 -53453 6538 -53042 7279 c --52636 8020 -52101 8614 -51442 9061 c --50778 9507 -50037 9848 -49208 10078 c --48602 10236 -47685 10395 -46456 10542 c --43952 10842 -42105 11195 -40924 11612 C --40912 12036 -40906 12306 -40906 12418 c --40906 13682 -41200 14576 -41788 15087 c --42576 15793 -43758 16140 -45316 16140 c --46774 16140 -47850 15887 -48550 15375 c --49243 14864 -49755 13958 -50090 12659 C --53118 13076 L --52842 14370 -52389 15422 -51760 16216 c --51131 17016 -50214 17633 -49020 18062 c --47826 18492 -46445 18709 -44869 18709 c --43305 18709 -42041 18521 -41065 18156 c --40089 17786 -39371 17327 -38907 16769 c --38448 16210 -38131 15511 -37943 14658 c --37843 14129 -37790 13176 -37790 11800 c --37790 7667 l --37790 4780 -37725 2957 -37590 2199 c --37461 1435 -37196 700 -36808 0 C --40048 0 L --40365 641 -40577 1393 -40665 2258 C -@c --40924 9184 m --42053 8720 -43740 8331 -45986 8008 c --47262 7826 -48167 7620 -48691 7391 c --49220 7161 -49631 6826 -49914 6379 c --50202 5938 -50349 5450 -50349 4910 c --50349 4080 -50031 3393 -49408 2840 c --48785 2293 -47868 2017 -46662 2017 c --45469 2017 -44404 2275 -43475 2799 c --42546 3322 -41859 4039 -41423 4945 c --41088 5644 -40924 6679 -40924 8043 c --40924 9184 L -@c -F -%CHAR: -35314 0 (r) @t --33021 0 m --33021 18292 L --30234 18292 L --30234 15522 L --29523 16816 -28864 17674 -28258 18086 c --27659 18497 -26994 18709 -26271 18709 c --25224 18709 -24166 18374 -23084 17710 C --24154 14829 L --24907 15281 -25665 15505 -26424 15505 c --27106 15505 -27712 15299 -28253 14893 c --28793 14482 -29176 13917 -29405 13194 c --29752 12094 -29922 10889 -29922 9578 c --29922 0 L --33021 0 L -@c -F -%CHAR: -23566 0 (y) @t --21379 -7044 m --21726 -4133 L --21044 -4316 -20456 -4410 -19950 -4410 c --19262 -4410 -18709 -4292 -18298 -4063 c --17880 -3834 -17545 -3516 -17281 -3099 c --17081 -2793 -16769 -2023 -16334 -794 c --16275 -617 -16181 -370 -16058 -35 C --22996 18292 L --19656 18292 L --15846 7702 l --15358 6356 -14911 4945 -14523 3463 C --14164 4886 -13741 6274 -13247 7632 c --9337 18292 L --6239 18292 L --13194 -312 l --13941 -2322 -14523 -3704 -14935 -4463 c --15487 -5486 -16116 -6232 -16828 -6709 c --17545 -7185 -18392 -7426 -19380 -7426 c --19979 -7426 -20644 -7297 -21379 -7044 C -@c -F -%CHAR: 3880 0 (S) @t -5468 8114 m -8619 8390 L -8766 7126 9113 6091 9660 5280 c -10207 4469 11053 3816 12200 3316 c -13346 2816 14640 2569 16074 2569 c -17350 2569 18473 2758 19449 3134 c -20425 3516 21154 4033 21631 4692 c -22107 5356 22348 6074 22348 6856 c -22348 7649 22119 8337 21654 8931 c -21196 9525 20437 10019 19385 10419 c -18703 10683 17209 11095 14887 11653 c -12570 12212 10941 12735 10012 13229 c -8807 13858 7908 14646 7314 15581 c -6726 16516 6432 17563 6432 18727 c -6432 19997 6790 21190 7514 22296 c -8237 23407 9295 24248 10683 24824 c -12076 25394 13617 25682 15316 25682 c -17192 25682 18838 25383 20273 24777 c -21701 24177 22801 23289 23571 22119 c -24335 20949 24753 19620 24812 18139 C -21607 17898 L -21431 19491 20849 20702 19855 21514 c -18861 22331 17397 22737 15457 22737 c -13434 22737 11965 22366 11036 21625 c -10112 20885 9648 19991 9648 18950 c -9648 18039 9977 17292 10630 16710 c -11277 16122 12952 15522 15669 14911 c -18385 14293 20249 13758 21260 13300 c -22730 12618 23818 11759 24518 10725 c -25217 9684 25564 8484 25564 7132 c -25564 5786 25182 4521 24412 3334 c -23642 2146 22536 1223 21096 559 c -19655 -100 18032 -429 16233 -429 c -13946 -429 12029 -100 10489 570 c -8942 1235 7731 2234 6849 3575 c -5973 4910 5509 6426 5468 8114 C -@c -F -%CHAR: 27410 0 (t) @t -36506 2775 m -36953 35 L -36083 -147 35301 -241 34613 -241 c -33484 -241 32614 -65 31990 294 c -31373 647 30938 1117 30685 1699 c -30432 2275 30303 3498 30303 5356 c -30303 15881 L -28027 15881 L -28027 18292 L -30303 18292 L -30303 22825 L -33390 24683 L -33390 18292 L -36506 18292 L -36506 15881 L -33390 15881 L -33390 5186 l -33390 4298 33443 3734 33548 3481 c -33660 3228 33836 3028 34083 2875 c -34330 2728 34683 2652 35142 2652 c -35489 2652 35941 2693 36506 2775 C -@c -F -%CHAR: 37217 0 (o) @t -38387 9149 m -38387 12535 39328 15046 41215 16675 c -42785 18027 44702 18709 46965 18709 c -49482 18709 51540 17886 53133 16234 c -54733 14587 55526 12312 55526 9407 c -55526 7050 55174 5198 54468 3851 c -53762 2499 52733 1452 51387 706 c -50035 -41 48565 -412 46965 -412 c -44408 -412 42338 406 40757 2052 c -39175 3692 38387 6056 38387 9149 c -@c -41574 9149 m -41574 6803 42085 5051 43108 3886 c -44131 2716 45419 2134 46965 2134 c -48506 2134 49788 2722 50811 3892 c -51828 5062 52340 6850 52340 9249 c -52340 11512 51828 13229 50799 14393 c -49770 15558 48494 16140 46965 16140 c -45419 16140 44131 15558 43108 14399 c -42085 13241 41574 11489 41574 9149 c -@c -F -%CHAR: 56832 0 (r) @t -59125 0 m -59125 18292 L -61912 18292 L -61912 15522 L -62623 16816 63282 17674 63888 18086 c -64487 18497 65152 18709 65875 18709 c -66922 18709 67980 18374 69062 17710 C -67992 14829 L -67239 15281 66481 15505 65722 15505 c -65040 15505 64434 15299 63893 14893 c -63353 14482 62970 13917 62741 13194 c -62394 12094 62224 10889 62224 9578 c -62224 0 L -59125 0 L -@c -F -%CHAR: 68580 0 (a) @t -82844 2258 m -81692 1282 80586 594 79528 188 c -78464 -212 77323 -412 76106 -412 c -74095 -412 72555 76 71473 1058 c -70397 2040 69856 3298 69856 4821 c -69856 5721 70056 6538 70467 7279 c -70873 8020 71408 8614 72067 9061 c -72731 9507 73472 9848 74301 10078 c -74907 10236 75824 10395 77053 10542 c -79557 10842 81404 11195 82585 11612 C -82597 12036 82603 12306 82603 12418 c -82603 13682 82309 14576 81721 15087 c -80933 15793 79751 16140 78193 16140 c -76735 16140 75659 15887 74959 15375 c -74266 14864 73754 13958 73419 12659 C -70391 13076 L -70667 14370 71120 15422 71749 16216 c -72378 17016 73295 17633 74489 18062 c -75683 18492 77064 18709 78640 18709 c -80204 18709 81468 18521 82444 18156 c -83420 17786 84138 17327 84602 16769 c -85061 16210 85378 15511 85566 14658 c -85666 14129 85719 13176 85719 11800 c -85719 7667 l -85719 4780 85784 2957 85919 2199 c -86048 1435 86313 700 86701 0 C -83461 0 L -83144 641 82932 1393 82844 2258 C -@c -82585 9184 m -81456 8720 79769 8331 77523 8008 c -76247 7826 75342 7620 74818 7391 c -74289 7161 73878 6826 73595 6379 c -73307 5938 73160 5450 73160 4910 c -73160 4080 73478 3393 74101 2840 c -74724 2293 75641 2017 76847 2017 c -78040 2017 79105 2275 80034 2799 c -80963 3322 81650 4039 82086 4945 c -82421 5644 82585 6679 82585 8043 c -82585 9184 L -@c -F -%CHAR: 88195 0 (g) @t -89953 -1517 m -92969 -1964 L -93093 -2893 93446 -3569 94016 -3998 c -94786 -4569 95839 -4857 97167 -4857 c -98608 -4857 99713 -4569 100495 -3998 c -101277 -3422 101801 -2616 102077 -1588 c -102242 -953 102312 370 102300 2393 C -100948 800 99261 0 97238 0 c -94721 0 92775 905 91399 2722 c -90024 4533 89330 6715 89330 9249 c -89330 10995 89647 12606 90276 14082 c -90911 15558 91829 16698 93028 17504 c -94228 18303 95639 18709 97256 18709 c -99413 18709 101195 17833 102594 16087 C -102594 18292 L -105458 18292 L -105458 2481 l -105458 -365 105164 -2387 104588 -3575 c -104005 -4763 103088 -5703 101830 -6391 c -100572 -7079 99025 -7426 97185 -7426 c -95004 -7426 93240 -6932 91899 -5950 c -90553 -4968 89906 -3493 89953 -1517 C -@c -92517 9472 m -92517 7073 92993 5321 93951 4222 c -94904 3116 96097 2569 97532 2569 c -98955 2569 100148 3116 101113 4210 c -102077 5309 102559 7026 102559 9372 c -102559 11612 102065 13300 101071 14435 c -100078 15569 98878 16140 97479 16140 c -96103 16140 94933 15581 93963 14458 c -92999 13341 92517 11677 92517 9472 c -@c -F -%CHAR: 107810 0 (e) @t -122656 5891 m -125861 5497 L -125355 3622 124420 2170 123056 1135 c -121686 106 119940 -412 117817 -412 c -115142 -412 113019 412 111455 2058 c -109886 3704 109104 6015 109104 8990 c -109104 12071 109897 14458 111479 16157 c -113066 17857 115118 18709 117647 18709 c -120093 18709 122092 17874 123638 16210 c -125190 14546 125966 12200 125966 9184 c -125966 8996 125961 8720 125949 8355 C -112308 8355 L -112420 6344 112990 4804 114013 3739 c -115036 2669 116306 2134 117835 2134 c -118970 2134 119940 2434 120745 3034 c -121551 3628 122186 4580 122656 5891 C -@c -112478 10907 m -122691 10907 L -122556 12441 122162 13600 121521 14364 c -120534 15558 119252 16157 117682 16157 c -116259 16157 115060 15681 114089 14729 c -113119 13776 112584 12500 112478 10907 C -@c -F -%CHAR: -72551 -35278 (b) @t --67365 -35278 m --70240 -35278 L --70240 -10025 L --67142 -10025 L --67142 -19032 L --65831 -17392 -64161 -16569 -62132 -16569 c --61003 -16569 -59939 -16798 -58934 -17251 c --57928 -17704 -57105 -18345 -56452 -19162 c --55806 -19985 -55294 -20973 -54930 -22137 c --54559 -23295 -54377 -24536 -54377 -25853 c --54377 -28993 -55153 -31415 -56705 -33126 c --58252 -34837 -60116 -35690 -62285 -35690 c --64443 -35690 -66136 -34790 -67365 -32985 C --67365 -35278 L -@c --67400 -25994 m --67400 -28187 -67101 -29769 -66507 -30745 c --65531 -32344 -64208 -33144 -62544 -33144 c --61186 -33144 -60016 -32556 -59028 -31374 c --58040 -30198 -57546 -28446 -57546 -26112 c --57546 -23724 -58022 -21961 -58969 -20826 c --59916 -19691 -61062 -19121 -62403 -19121 c --63761 -19121 -64931 -19709 -65919 -20885 c --66907 -22061 -67400 -23766 -67400 -25994 c -@c -F -%CHAR: -52936 -35278 (a) @t --38672 -33020 m --39824 -33996 -40930 -34684 -41988 -35090 c --43052 -35490 -44193 -35690 -45410 -35690 c --47421 -35690 -48961 -35202 -50043 -34220 c --51119 -33238 -51660 -31980 -51660 -30457 c --51660 -29557 -51460 -28740 -51049 -27999 c --50643 -27258 -50108 -26664 -49449 -26217 c --48785 -25771 -48044 -25430 -47215 -25200 c --46609 -25042 -45692 -24883 -44463 -24736 c --41959 -24436 -40112 -24083 -38931 -23666 C --38919 -23242 -38913 -22972 -38913 -22860 c --38913 -21596 -39207 -20702 -39795 -20191 c --40583 -19485 -41765 -19138 -43323 -19138 c --44781 -19138 -45857 -19391 -46557 -19903 c --47250 -20414 -47762 -21320 -48097 -22619 C --51125 -22202 L --50849 -20908 -50396 -19856 -49767 -19062 c --49138 -18262 -48221 -17645 -47027 -17216 c --45833 -16786 -44452 -16569 -42876 -16569 c --41312 -16569 -40048 -16757 -39072 -17122 c --38096 -17492 -37378 -17951 -36914 -18509 c --36455 -19068 -36138 -19767 -35950 -20620 c --35850 -21149 -35797 -22102 -35797 -23478 c --35797 -27611 l --35797 -30498 -35732 -32321 -35597 -33079 c --35468 -33843 -35203 -34578 -34815 -35278 C --38055 -35278 L --38372 -34637 -38584 -33885 -38672 -33020 C -@c --38931 -26094 m --40060 -26558 -41747 -26947 -43993 -27270 c --45269 -27452 -46174 -27658 -46698 -27887 c --47227 -28117 -47638 -28452 -47921 -28899 c --48209 -29340 -48356 -29828 -48356 -30368 c --48356 -31198 -48038 -31885 -47415 -32438 c --46792 -32985 -45875 -33261 -44669 -33261 c --43476 -33261 -42411 -33003 -41482 -32479 c --40553 -31956 -39866 -31239 -39430 -30333 c --39095 -29634 -38931 -28599 -38931 -27235 c --38931 -26094 L -@c -F -%CHAR: -33321 -35278 (c) @t --19057 -28575 m --16011 -28975 L --16341 -31074 -17193 -32720 -18569 -33908 c --19939 -35096 -21626 -35690 -23625 -35690 c --26124 -35690 -28141 -34872 -29658 -33238 c --31181 -31603 -31945 -29257 -31945 -26200 c --31945 -24224 -31616 -22496 -30963 -21014 c --30305 -19532 -29311 -18421 -27971 -17680 c --26636 -16939 -25178 -16569 -23608 -16569 c --21620 -16569 -19992 -17075 -18734 -18080 c --17469 -19085 -16658 -20508 -16299 -22360 C --19316 -22825 L --19604 -21596 -20109 -20673 -20838 -20050 c --21568 -19432 -22449 -19121 -23484 -19121 c --25048 -19121 -26318 -19679 -27294 -20802 c --28270 -21919 -28758 -23689 -28758 -26112 c --28758 -28569 -28288 -30357 -27341 -31474 c --26401 -32585 -25172 -33144 -23655 -33144 c --22438 -33144 -21426 -32767 -20609 -32021 c --19792 -31274 -19274 -30127 -19057 -28575 C -@c -F -%CHAR: -15682 -35278 (k) @t --13342 -35278 m --13342 -10025 L --10237 -10025 L --10237 -24424 L --2900 -16986 L -1110 -16986 L --5881 -23771 L -1822 -35278 L --2006 -35278 L --8050 -25923 L --10237 -28028 L --10237 -35278 L --13342 -35278 L -@c -F -%CHAR: 1957 -35278 (-) @t -3074 -27699 m -3074 -24583 L -12605 -24583 L -12605 -27699 L -3074 -27699 L -@c -F -%CHAR: 13705 -35278 (e) @t -28551 -29387 m -31756 -29781 L -31250 -31656 30315 -33108 28951 -34143 c -27581 -35172 25835 -35690 23712 -35690 c -21037 -35690 18914 -34866 17350 -33220 c -15781 -31574 14999 -29263 14999 -26288 c -14999 -23207 15792 -20820 17374 -19121 c -18961 -17421 21013 -16569 23542 -16569 c -25988 -16569 27987 -17404 29533 -19068 c -31085 -20732 31861 -23078 31861 -26094 c -31861 -26282 31856 -26558 31844 -26923 C -18203 -26923 L -18315 -28934 18885 -30474 19908 -31539 c -20931 -32609 22201 -33144 23730 -33144 c -24865 -33144 25835 -32844 26640 -32244 c -27446 -31650 28081 -30698 28551 -29387 C -@c -18373 -24371 m -28586 -24371 L -28451 -22837 28057 -21678 27416 -20914 c -26429 -19720 25147 -19121 23577 -19121 c -22154 -19121 20955 -19597 19984 -20549 c -19014 -21502 18479 -22778 18373 -24371 C -@c -F -%CHAR: 33320 -35278 (n) @t -35648 -35278 m -35648 -16986 L -38435 -16986 L -38435 -19585 L -39782 -17574 41722 -16569 44256 -16569 c -45362 -16569 46373 -16769 47296 -17163 c -48225 -17563 48913 -18080 49371 -18727 c -49836 -19368 50153 -20132 50342 -21014 c -50453 -21590 50512 -22596 50512 -24030 c -50512 -35278 L -47408 -35278 L -47408 -24148 l -47408 -22890 47290 -21943 47049 -21314 c -46808 -20691 46379 -20191 45767 -19820 c -45150 -19444 44433 -19256 43604 -19256 c -42281 -19256 41146 -19679 40182 -20514 c -39223 -21355 38747 -22942 38747 -25288 c -38747 -35278 L -35648 -35278 L -@c -F -%CHAR: 52935 -35278 (d) @t -67129 -35278 m -67129 -32967 L -65970 -34784 64265 -35690 62013 -35690 c -60555 -35690 59214 -35290 57992 -34484 c -56769 -33685 55822 -32562 55146 -31115 c -54475 -29675 54140 -28022 54140 -26147 c -54140 -24324 54446 -22666 55052 -21179 c -55663 -19691 56575 -18550 57792 -17762 c -59009 -16969 60373 -16569 61878 -16569 c -62977 -16569 63959 -16804 64818 -17269 c -65682 -17733 66382 -18339 66923 -19085 C -66923 -10025 L -70004 -10025 L -70004 -35278 L -67129 -35278 L -@c -57327 -26147 m -57327 -28493 57821 -30245 58809 -31403 c -59797 -32562 60961 -33144 62307 -33144 c -63660 -33144 64812 -32585 65759 -31480 c -66705 -30374 67181 -28681 67181 -26406 c -67181 -23901 66699 -22066 65735 -20896 c -64771 -19720 63583 -19138 62166 -19138 c -60790 -19138 59638 -19703 58715 -20826 c -57792 -21949 57327 -23724 57327 -26147 c -@c -F -T -@rax %Note: Object -584.26753 579.86362 655.71931 621.30132 @E - 0 O 0 @g -0.00 0.00 0.00 0.50 k -/$fm 0 def -584.26753 621.30132 m -655.71931 621.30132 L -655.71931 579.86362 L -584.26753 579.86362 L -584.26753 621.30132 L -@c -F - -@rax %Note: Object -581.28746 583.83553 652.29279 625.20180 @E - 0 O 0 @g -0.00 0.00 0.00 0.00 k -0 J 0 j [] 0 d 0 R 0 @G -0.00 0.00 0.00 1.00 K -0 0.49890 0.49890 0.00000 @w -/$fm 0 def -581.28746 625.20180 m -652.29279 625.20180 L -652.29279 583.83553 L -581.28746 583.83553 L -581.28746 625.20180 L -@c -B - -@rax 595.13017 599.26394 634.88580 606.66548 @E -[0.00028346 0.00000000 0.00000000 0.00028346 615.04552081 599.38552138] @tm - 0 O 0 @g -0.00 0.00 0.00 1.00 k -e - -% FontChange:/_ArialCE 35278.00000 z -%CHAR: -70257 0 (J) @t --69240 7167 m --66224 7579 L --66147 5650 -65783 4327 -65142 3616 c --64495 2905 -63607 2552 -62472 2552 c --61632 2552 -60908 2740 -60303 3128 c --59691 3510 -59274 4033 -59044 4692 c --58815 5356 -58698 6409 -58698 7855 c --58698 25253 L --55358 25253 L --55358 8043 l --55358 5933 -55611 4292 -56122 3134 c --56634 1976 -57445 1094 -58551 482 c --59662 -123 -60961 -429 -62455 -429 c --64671 -429 -66365 206 -67546 1482 c --68722 2758 -69287 4651 -69240 7167 C -@c -F -%CHAR: -52618 0 (P) @t --49896 0 m --49896 25253 L --40371 25253 l --38695 25253 -37413 25171 -36531 25012 c --35291 24806 -34250 24412 -33409 23830 c --32574 23254 -31898 22437 -31387 21396 c --30875 20350 -30622 19203 -30622 17951 c --30622 15805 -31304 13982 -32668 12494 c --34038 11013 -36508 10266 -40077 10266 c --46556 10266 L --46556 0 L --49896 0 L -@c --46556 13247 m --40024 13247 l --37866 13247 -36331 13647 -35426 14452 c --34520 15258 -34068 16387 -34068 17845 c --34068 18903 -34332 19809 -34867 20561 c --35402 21314 -36102 21808 -36978 22049 c --37543 22196 -38577 22272 -40094 22272 c --46556 22272 L --46556 13247 L -@c -F -%CHAR: -19916 0 (C) @t -822 8855 m -4167 8008 L -3467 5268 2203 3175 386 1729 c --1436 288 -3659 -429 -6293 -429 c --9015 -429 -11226 123 -12931 1229 c --14636 2340 -15935 3945 -16823 6044 c --17711 8149 -18158 10407 -18158 12818 c --18158 15446 -17658 17739 -16653 19697 c --15647 21655 -14219 23142 -12361 24160 c --10509 25177 -8468 25682 -6240 25682 c --3712 25682 -1589 25042 134 23754 c -1856 22466 3056 20661 3732 18327 C -445 17551 L --143 19391 -989 20726 -2106 21567 c --3218 22407 -4617 22825 -6310 22825 c --8251 22825 -9868 22360 -11173 21431 c --12478 20497 -13395 19250 -13919 17680 c --14448 16116 -14712 14499 -14712 12835 c --14712 10683 -14401 8814 -13778 7208 c --13149 5609 -12178 4410 -10855 3616 c --9533 2822 -8104 2428 -6563 2428 c --4694 2428 -3112 2969 -1813 4045 c --513 5127 363 6732 822 8855 C -@c -F -%CHAR: 5555 0 (l) @t -7813 0 m -7813 25253 L -10911 25253 L -10911 0 L -7813 0 L -@c -F -%CHAR: 13387 0 (i) @t -15727 21684 m -15727 25253 L -18832 25253 L -18832 21684 L -15727 21684 L -@c -15727 0 m -15727 18292 L -18832 18292 L -18832 0 L -15727 0 L -@c -F -%CHAR: 21219 0 (e) @t -36065 5891 m -39270 5497 L -38764 3622 37829 2170 36465 1135 c -35095 106 33349 -412 31226 -412 c -28551 -412 26428 412 24864 2058 c -23295 3704 22513 6015 22513 8990 c -22513 12071 23306 14458 24888 16157 c -26475 17857 28527 18709 31056 18709 c -33502 18709 35501 17874 37047 16210 c -38599 14546 39375 12200 39375 9184 c -39375 8996 39370 8720 39358 8355 C -25717 8355 L -25829 6344 26399 4804 27422 3739 c -28445 2669 29715 2134 31244 2134 c -32379 2134 33349 2434 34154 3034 c -34960 3628 35595 4580 36065 5891 C -@c -25887 10907 m -36100 10907 L -35965 12441 35571 13600 34930 14364 c -33943 15558 32661 16157 31091 16157 c -29668 16157 28469 15681 27498 14729 c -26528 13776 25993 12500 25887 10907 C -@c -F -%CHAR: 40834 0 (n) @t -43162 0 m -43162 18292 L -45949 18292 L -45949 15693 L -47296 17704 49236 18709 51770 18709 c -52876 18709 53887 18509 54810 18115 c -55739 17715 56427 17198 56885 16551 c -57350 15910 57667 15146 57856 14264 c -57967 13688 58026 12682 58026 11248 c -58026 0 L -54922 0 L -54922 11130 l -54922 12388 54804 13335 54563 13964 c -54322 14587 53893 15087 53281 15458 c -52664 15834 51947 16022 51118 16022 c -49795 16022 48660 15599 47696 14764 c -46737 13923 46261 12336 46261 9990 c -46261 0 L -43162 0 L -@c -F -%CHAR: 60449 0 (t) @t -69545 2775 m -69992 35 L -69122 -147 68340 -241 67652 -241 c -66523 -241 65653 -65 65029 294 c -64412 647 63977 1117 63724 1699 c -63471 2275 63342 3498 63342 5356 c -63342 15881 L -61066 15881 L -61066 18292 L -63342 18292 L -63342 22825 L -66429 24683 L -66429 18292 L -69545 18292 L -69545 15881 L -66429 15881 L -66429 5186 l -66429 4298 66482 3734 66587 3481 c -66699 3228 66875 3028 67122 2875 c -67369 2728 67722 2652 68181 2652 c -68528 2652 68980 2693 69545 2775 C -@c -F -T -@rax 625.55386 639.65792 629.27887 646.84630 @E -[0.00028346 0.00000000 0.00000000 0.00028346 628.33405576 639.65789786] @tm - 0 O 0 @g -0.00 0.00 0.00 1.00 k -e - -% FontChange:/_ArialCE 35278.00000 z -%CHAR: -9808 0 (1) @t -3333 0 m -234 0 L -234 19756 L --512 19044 -1488 18333 -2699 17621 c --3917 16910 -5004 16375 -5969 16022 C --5969 19015 L --4234 19832 -2717 20820 -1418 21978 c --124 23142 799 24265 1340 25359 C -3333 25359 L -3333 0 L -@c -F -T -@rax 561.74570 638.81206 566.78060 646.00044 @E -[0.00028346 0.00000000 0.00000000 0.00028346 564.52590061 638.81203962] @tm - 0 O 0 @g -0.00 0.00 0.00 1.00 k -e - -% FontChange:/_ArialCE 35278.00000 z -%CHAR: -9808 0 (2) @t -7954 2981 m -7954 0 L --8738 0 L --8761 747 -8644 1464 -8379 2152 c --7956 3293 -7274 4410 -6339 5515 c --5398 6615 -4046 7891 -2282 9337 c -464 11589 2322 13370 3286 14687 c -4250 15999 4732 17245 4732 18415 c -4732 19644 4291 20679 3415 21525 c -2533 22366 1387 22790 -24 22790 c --1518 22790 -2711 22343 -3605 21443 c --4505 20549 -4957 19309 -4969 17727 C --8156 18051 L --7938 20432 -7115 22243 -5692 23489 c --4269 24736 -2353 25359 46 25359 c -2469 25359 4386 24683 5797 23342 c -7214 21996 7919 20332 7919 18345 c -7919 17333 7713 16340 7296 15364 c -6884 14388 6196 13359 5238 12283 c -4280 11201 2686 9719 458 7838 c --1400 6274 -2594 5215 -3123 4657 c --3652 4104 -4087 3545 -4434 2981 C -7954 2981 L -@c -F -T -@rax 550.62028 607.00082 555.72690 614.31591 @E -[0.00028346 0.00000000 0.00000000 0.00028346 553.40048369 607.12750535] @tm - 0 O 0 @g -0.00 0.00 0.00 1.00 k -e - -% FontChange:/_ArialCE 35278.00000 z -%CHAR: -9808 0 (3) @t --8326 6668 m --5228 7079 L --4869 5321 -4263 4057 -3411 3281 c --2552 2505 -1512 2117 -283 2117 c -1175 2117 2410 2622 3415 3634 c -4415 4645 4921 5897 4921 7391 c -4921 8814 4456 9990 3527 10913 c -2592 11836 1410 12300 -24 12300 c --612 12300 -1341 12183 -2211 11953 C --1865 14676 L --1659 14652 -1494 14640 -1365 14640 c --48 14640 1140 14987 2198 15675 c -3257 16363 3786 17427 3786 18862 c -3786 19997 3398 20943 2627 21684 c -1857 22431 864 22807 -353 22807 c --1559 22807 -2564 22425 -3364 21672 c --4169 20914 -4687 19773 -4916 18256 C --8015 18809 L --7638 20890 -6774 22501 -5434 23642 c --4087 24783 -2417 25359 -418 25359 c -958 25359 2228 25059 3386 24471 c -4544 23877 5432 23072 6049 22049 c -6661 21026 6973 19944 6973 18791 c -6973 17704 6679 16710 6091 15810 c -5503 14917 4638 14205 3492 13676 C -4985 13335 6144 12618 6973 11530 c -7796 10448 8207 9090 8207 7461 c -8207 5256 7408 3387 5797 1852 c -4191 318 2157 -447 -301 -447 c --2517 -447 -4358 212 -5822 1535 c --7286 2852 -8121 4563 -8326 6668 C -@c -F -T -@rax %Note: Object -389.39924 702.30643 411.00236 713.59625 @E - 0 O 0 @g -0.00 0.00 0.00 0.50 k -/$fm 0 def -389.39924 713.59654 m -411.00236 713.59654 L -411.00236 702.30643 L -389.39924 702.30643 L -389.39924 713.59654 L -@c -F - -@rax %Note: Object -388.45786 703.38926 409.69219 714.65924 @E - 0 O 0 @g -0.00 0.00 0.00 0.00 k -0 J 0 j [] 0 d 0 R 0 @G -0.00 0.00 0.00 1.00 K -0 0.49890 0.49890 0.00000 @w -/$fm 0 def -388.45786 714.65924 m -409.69276 714.65924 L -409.69276 703.38841 L -388.45786 703.38841 L -388.45786 714.65924 L -@c -B - -@rax %Note: Object -578.27112 719.92261 671.50545 761.36031 @E - 0 O 0 @g -0.00 0.00 0.00 0.50 k -/$fm 0 def -578.27112 761.36031 m -671.50545 761.36031 L -671.50545 719.92261 L -578.27112 719.92261 L -578.27112 761.36031 L -@c -F - -@rax %Note: Object -575.29106 723.89452 668.36523 765.26079 @E - 0 O 0 @g -0.00 0.00 0.00 0.00 k -0 J 0 j [] 0 d 0 R 0 @G -0.00 0.00 0.00 1.00 K -0 0.49890 0.49890 0.00000 @w -/$fm 0 def -575.29106 765.26079 m -668.36523 765.26079 L -668.36523 723.89452 L -575.29106 723.89452 L -575.29106 765.26079 L -@c -B - -@rax %Note: Object -567.15647 705.38145 660.39080 746.81915 @E - 0 O 0 @g -0.00 0.00 0.00 0.50 k -/$fm 0 def -567.15647 746.81915 m -660.39080 746.81915 L -660.39080 705.38145 L -567.15647 705.38145 L -567.15647 746.81915 L -@c -F - -@rax %Note: Object -564.17641 709.35335 657.25058 750.71962 @E - 0 O 0 @g -0.00 0.00 0.00 0.00 k -0 J 0 j [] 0 d 0 R 0 @G -0.00 0.00 0.00 1.00 K -0 0.49890 0.49890 0.00000 @w -/$fm 0 def -564.17641 750.71962 m -657.25058 750.71962 L -657.25058 709.35335 L -564.17641 709.35335 L -564.17641 750.71962 L -@c -B - -@rax 589.68397 721.18488 628.34088 738.46488 @E -[0.00028346 0.00000000 0.00000000 0.00028346 609.04911158 731.30652443] @tm - 0 O 0 @g -0.00 0.00 0.00 1.00 k -e - -% FontChange:/_ArialCE 35278.00000 z -%CHAR: -68316 0 (J) @t --67299 7167 m --64283 7579 L --64206 5650 -63842 4327 -63201 3616 c --62554 2905 -61666 2552 -60531 2552 c --59691 2552 -58967 2740 -58362 3128 c --57750 3510 -57333 4033 -57103 4692 c --56874 5356 -56757 6409 -56757 7855 c --56757 25253 L --53417 25253 L --53417 8043 l --53417 5933 -53670 4292 -54181 3134 c --54693 1976 -55504 1094 -56610 482 c --57721 -123 -59020 -429 -60514 -429 c --62730 -429 -64424 206 -65605 1482 c --66781 2758 -67346 4651 -67299 7167 C -@c -F -%CHAR: -50677 0 (P) @t --47955 0 m --47955 25253 L --38430 25253 l --36754 25253 -35472 25171 -34590 25012 c --33350 24806 -32309 24412 -31468 23830 c --30633 23254 -29957 22437 -29446 21396 c --28934 20350 -28681 19203 -28681 17951 c --28681 15805 -29363 13982 -30727 12494 c --32097 11013 -34567 10266 -38136 10266 c --44615 10266 L --44615 0 L --47955 0 L -@c --44615 13247 m --38083 13247 l --35925 13247 -34390 13647 -33485 14452 c --32579 15258 -32127 16387 -32127 17845 c --32127 18903 -32391 19809 -32926 20561 c --33461 21314 -34161 21808 -35037 22049 c --35602 22196 -36636 22272 -38153 22272 c --44615 22272 L --44615 13247 L -@c -F -%CHAR: -17975 0 (I) @t --14682 0 m --14682 25253 L --11343 25253 L --11343 0 L --14682 0 L -@c -F -%CHAR: -8168 0 (n) @t --5840 0 m --5840 18292 L --3053 18292 L --3053 15693 L --1706 17704 234 18709 2768 18709 c -3874 18709 4885 18509 5808 18115 c -6737 17715 7425 17198 7883 16551 c -8348 15910 8665 15146 8854 14264 c -8965 13688 9024 12682 9024 11248 c -9024 0 L -5920 0 L -5920 11130 l -5920 12388 5802 13335 5561 13964 c -5320 14587 4891 15087 4279 15458 c -3662 15834 2945 16022 2116 16022 c -793 16022 -342 15599 -1306 14764 c --2265 13923 -2741 12336 -2741 9990 c --2741 0 L --5840 0 L -@c -F -%CHAR: 11447 0 (d) @t -25641 0 m -25641 2311 L -24482 494 22777 -412 20525 -412 c -19067 -412 17726 -12 16504 794 c -15281 1593 14334 2716 13658 4163 c -12987 5603 12652 7256 12652 9131 c -12652 10954 12958 12612 13564 14099 c -14175 15587 15087 16728 16304 17516 c -17521 18309 18885 18709 20390 18709 c -21489 18709 22471 18474 23330 18009 c -24194 17545 24894 16939 25435 16193 C -25435 25253 L -28516 25253 L -28516 0 L -25641 0 L -@c -15839 9131 m -15839 6785 16333 5033 17321 3875 c -18309 2716 19473 2134 20819 2134 c -22172 2134 23324 2693 24271 3798 c -25217 4904 25693 6597 25693 8872 c -25693 11377 25211 13212 24247 14382 c -23283 15558 22095 16140 20678 16140 c -19302 16140 18150 15575 17227 14452 c -16304 13329 15839 11554 15839 9131 c -@c -F -%CHAR: 31062 0 (e) @t -45908 5891 m -49113 5497 L -48607 3622 47672 2170 46308 1135 c -44938 106 43192 -412 41069 -412 c -38394 -412 36271 412 34707 2058 c -33138 3704 32356 6015 32356 8990 c -32356 12071 33149 14458 34731 16157 c -36318 17857 38370 18709 40899 18709 c -43345 18709 45344 17874 46890 16210 c -48442 14546 49218 12200 49218 9184 c -49218 8996 49213 8720 49201 8355 C -35560 8355 L -35672 6344 36242 4804 37265 3739 c -38288 2669 39558 2134 41087 2134 c -42222 2134 43192 2434 43997 3034 c -44803 3628 45438 4580 45908 5891 C -@c -35730 10907 m -45943 10907 L -45808 12441 45414 13600 44773 14364 c -43786 15558 42504 16157 40934 16157 c -39511 16157 38312 15681 37341 14729 c -36371 13776 35836 12500 35730 10907 C -@c -F -%CHAR: 50677 0 (x) @t -50936 0 m -57621 9507 L -51435 18292 L -55310 18292 L -58121 14005 l -58644 13188 59073 12506 59391 11953 C -59896 12712 60361 13382 60790 13970 c -63871 18292 L -67575 18292 L -61255 9678 L -68057 0 L -64253 0 L -60496 5686 L -59497 7220 L -54693 0 L -50936 0 L -@c -F -%CHAR: -51948 -35278 (S) @t --50360 -27164 m --47209 -26888 L --47062 -28152 -46715 -29187 -46168 -29998 c --45621 -30809 -44775 -31462 -43628 -31962 c --42482 -32462 -41188 -32709 -39754 -32709 c --38478 -32709 -37355 -32520 -36379 -32144 c --35403 -31762 -34674 -31245 -34197 -30586 c --33721 -29922 -33480 -29204 -33480 -28422 c --33480 -27629 -33709 -26941 -34174 -26347 c --34632 -25753 -35391 -25259 -36443 -24859 c --37125 -24595 -38619 -24183 -40941 -23625 c --43258 -23066 -44887 -22543 -45816 -22049 c --47021 -21420 -47920 -20632 -48514 -19697 c --49102 -18762 -49396 -17715 -49396 -16551 c --49396 -15281 -49038 -14088 -48314 -12982 c --47591 -11871 -46533 -11030 -45145 -10454 c --43752 -9884 -42211 -9596 -40512 -9596 c --38636 -9596 -36990 -9895 -35555 -10501 c --34127 -11101 -33027 -11989 -32257 -13159 c --31493 -14329 -31075 -15658 -31016 -17139 C --34221 -17380 L --34397 -15787 -34979 -14576 -35973 -13764 c --36967 -12947 -38431 -12541 -40371 -12541 c --42394 -12541 -43863 -12912 -44792 -13653 c --45716 -14393 -46180 -15287 -46180 -16328 c --46180 -17239 -45851 -17986 -45198 -18568 c --44551 -19156 -42876 -19756 -40159 -20367 c --37443 -20985 -35579 -21520 -34568 -21978 c --33098 -22660 -32010 -23519 -31310 -24553 c --30611 -25594 -30264 -26794 -30264 -28146 c --30264 -29492 -30646 -30757 -31416 -31944 c --32186 -33132 -33292 -34055 -34732 -34719 c --36173 -35378 -37796 -35707 -39595 -35707 c --41882 -35707 -43799 -35378 -45339 -34708 c --46886 -34043 -48097 -33044 -48979 -31703 c --49855 -30368 -50319 -28852 -50360 -27164 C -@c -F -%CHAR: -28418 -35278 (e) @t --13572 -29387 m --10367 -29781 L --10873 -31656 -11808 -33108 -13172 -34143 c --14542 -35172 -16288 -35690 -18411 -35690 c --21086 -35690 -23209 -34866 -24773 -33220 c --26342 -31574 -27124 -29263 -27124 -26288 c --27124 -23207 -26331 -20820 -24749 -19121 c --23162 -17421 -21110 -16569 -18581 -16569 c --16135 -16569 -14136 -17404 -12590 -19068 c --11038 -20732 -10262 -23078 -10262 -26094 c --10262 -26282 -10267 -26558 -10279 -26923 C --23920 -26923 L --23808 -28934 -23238 -30474 -22215 -31539 c --21192 -32609 -19922 -33144 -18393 -33144 c --17258 -33144 -16288 -32844 -15483 -32244 c --14677 -31650 -14042 -30698 -13572 -29387 C -@c --23750 -24371 m --13537 -24371 L --13672 -22837 -14066 -21678 -14707 -20914 c --15694 -19720 -16976 -19121 -18546 -19121 c --19969 -19121 -21168 -19597 -22139 -20549 c --23109 -21502 -23644 -22778 -23750 -24371 C -@c -F -%CHAR: -8803 -35278 (r) @t --6510 -35278 m --6510 -16986 L --3723 -16986 L --3723 -19756 L --3012 -18462 -2353 -17604 -1747 -17192 c --1148 -16781 -483 -16569 240 -16569 c -1287 -16569 2345 -16904 3427 -17568 C -2357 -20449 L -1604 -19997 846 -19773 87 -19773 c --595 -19773 -1201 -19979 -1742 -20385 c --2282 -20796 -2665 -21361 -2894 -22084 c --3241 -23184 -3411 -24389 -3411 -25700 c --3411 -35278 L --6510 -35278 L -@c -F -%CHAR: 2945 -35278 (v) @t -10353 -35278 m -3392 -16986 L -6667 -16986 L -10594 -27940 l -11018 -29122 11406 -30351 11765 -31627 C -12041 -30662 12423 -29504 12917 -28146 c -16986 -16986 L -20172 -16986 L -13246 -35278 L -10353 -35278 L -@c -F -%CHAR: 20584 -35278 (e) @t -35430 -29387 m -38635 -29781 L -38129 -31656 37194 -33108 35830 -34143 c -34460 -35172 32714 -35690 30591 -35690 c -27916 -35690 25793 -34866 24229 -33220 c -22660 -31574 21878 -29263 21878 -26288 c -21878 -23207 22671 -20820 24253 -19121 c -25840 -17421 27892 -16569 30421 -16569 c -32867 -16569 34866 -17404 36412 -19068 c -37964 -20732 38740 -23078 38740 -26094 c -38740 -26282 38735 -26558 38723 -26923 C -25082 -26923 L -25194 -28934 25764 -30474 26787 -31539 c -27810 -32609 29080 -33144 30609 -33144 c -31744 -33144 32714 -32844 33519 -32244 c -34325 -31650 34960 -30698 35430 -29387 C -@c -25252 -24371 m -35465 -24371 L -35330 -22837 34936 -21678 34295 -20914 c -33308 -19720 32026 -19121 30456 -19121 c -29033 -19121 27834 -19597 26863 -20549 c -25893 -21502 25358 -22778 25252 -24371 C -@c -F -%CHAR: 40199 -35278 (r) @t -42492 -35278 m -42492 -16986 L -45279 -16986 L -45279 -19756 L -45990 -18462 46649 -17604 47255 -17192 c -47854 -16781 48519 -16569 49242 -16569 c -50289 -16569 51347 -16904 52429 -17568 C -51359 -20449 L -50606 -19997 49848 -19773 49089 -19773 c -48407 -19773 47801 -19979 47260 -20385 c -46720 -20796 46337 -21361 46108 -22084 c -45761 -23184 45591 -24389 45591 -25700 c -45591 -35278 L -42492 -35278 L -@c -F -T -@rax %Note: Object -612.43087 624.90557 612.62476 708.87657 @E -0 J 0 j [5 3 ] 0 d 0 R 0 @G -0.00 0.00 0.00 1.00 K -0 0.86740 0.86740 0.00000 @w -/$fm 0 def -612.62476 624.90557 m -612.43880 705.33043 L -S -@j -0.00 0.00 0.00 1.00 K -0.00 0.00 0.00 1.00 k -0 @g -0 @G -[] 0 d 0 J 0 j -0 R 0 O -0 1.00800 1.00800 0 @w -612.43087 708.87657 m -609.42302 701.81348 L -611.43676 702.82630 613.45276 702.83083 615.47102 701.82765 C -612.43087 708.87657 L -f -@J - -@rax %Note: Object -447.11206 617.63499 581.36854 706.74576 @E -0 J 0 j [5 3 ] 0 d 0 R 0 @G -0.00 0.00 0.00 1.00 K -0 0.86740 0.86740 0.00000 @w -/$fm 0 def -581.36854 617.63499 m -450.06661 704.78476 L -S -@j -0.00 0.00 0.00 1.00 K -0.00 0.00 0.00 1.00 k -0 @g -0 @G -[] 0 d 0 J 0 j -0 R 0 O -0 1.00800 1.00800 0 @w -447.11206 706.74576 m -451.31868 700.32416 L -451.59364 702.56126 452.70850 704.24107 454.66328 705.36331 C -447.11206 706.74576 L -f -@J - -@rax %Note: Object -453.97587 598.37159 581.37931 598.39285 @E -0 J 0 j [5 3 ] 0 d 0 R 0 @G -0.00 0.00 0.00 1.00 K -0 0.86740 0.86740 0.00000 @w -/$fm 0 def -581.37931 598.37159 m -457.52202 598.39228 L -S -@j -0.00 0.00 0.00 1.00 K -0.00 0.00 0.00 1.00 k -0 @g -0 @G -[] 0 d 0 J 0 j -0 R 0 O -0 1.00800 1.00800 0 @w -453.97587 598.39285 m -461.03131 595.36772 L -460.02359 597.38372 460.02416 599.39972 461.03244 601.41572 C -453.97587 598.39285 L -f -@J - -@rax %Note: Object -454.15899 725.99868 563.61373 726.01994 @E -0 J 0 j [] 0 d 0 R 0 @G -0.00 0.00 0.00 1.00 K -0 0.86740 0.86740 0.00000 @w -/$fm 0 def -454.15899 725.99868 m -560.06759 726.01937 L -S -@j -0.00 0.00 0.00 1.00 K -0.00 0.00 0.00 1.00 k -0 @g -0 @G -[] 0 d 0 J 0 j -0 R 0 O -0 1.00800 1.00800 0 @w -563.61373 726.01994 m -556.55717 729.04252 L -557.56545 727.02680 557.56602 725.01080 556.55830 722.99452 C -563.61373 726.01994 L -f -@J - -@rax %Note: Object -619.31254 634.71317 638.15839 652.70239 @E -0 J 0 j [] 0 d 0 R 0 @G -0.00 0.00 0.00 1.00 K -0 0.56976 0.56976 0.00000 @w -/$fm 0 def -628.73546 652.70239 m -633.92542 652.70239 638.15839 648.66189 638.15839 643.70778 c -638.15839 638.75367 633.92542 634.71317 628.73546 634.71317 c -623.54551 634.71317 619.31254 638.75367 619.31254 643.70778 c -619.31254 648.66189 623.54551 652.70239 628.73546 652.70239 c -@c -S - -@rax %Note: Object -555.50438 633.86731 574.35024 651.85654 @E -0 J 0 j [] 0 d 0 R 0 @G -0.00 0.00 0.00 1.00 K -0 0.56976 0.56976 0.00000 @w -/$fm 0 def -564.92731 651.85654 m -570.11726 651.85654 574.35024 647.81603 574.35024 642.86192 c -574.35024 637.90781 570.11726 633.86731 564.92731 633.86731 c -559.73735 633.86731 555.50438 637.90781 555.50438 642.86192 c -555.50438 647.81603 559.73735 651.85654 564.92731 651.85654 c -@c -S - -@rax %Note: Object -544.37896 602.18277 563.22482 620.17200 @E -0 J 0 j [] 0 d 0 R 0 @G -0.00 0.00 0.00 1.00 K -0 0.56976 0.56976 0.00000 @w -/$fm 0 def -553.80189 620.17200 m -558.99184 620.17200 563.22482 616.13150 563.22482 611.17739 c -563.22482 606.22328 558.99184 602.18277 553.80189 602.18277 c -548.61194 602.18277 544.37896 606.22328 544.37896 611.17739 c -544.37896 616.13150 548.61194 620.17200 553.80189 620.17200 c -@c -S - -@rax %Note: Object -387.64828 700.86472 409.25140 712.15455 @E - 0 O 0 @g -0.00 0.00 0.00 0.50 k -/$fm 0 def -387.64828 712.15483 m -409.25140 712.15483 L -409.25140 700.86472 L -387.64828 700.86472 L -387.64828 712.15483 L -@c -F - -@rax %Note: Object -386.70690 701.94756 407.94123 713.21754 @E - 0 O 0 @g -0.00 0.00 0.00 0.00 k -0 J 0 j [] 0 d 0 R 0 @G -0.00 0.00 0.00 1.00 K -0 0.49890 0.49890 0.00000 @w -/$fm 0 def -386.70690 713.21754 m -407.94180 713.21754 L -407.94180 701.94671 L -386.70690 701.94671 L -386.70690 713.21754 L -@c -B - -@rax %Note: Object -385.89761 699.03213 407.50072 710.32195 @E - 0 O 0 @g -0.00 0.00 0.00 0.50 k -/$fm 0 def -385.89761 710.32224 m -407.50072 710.32224 L -407.50072 699.03213 L -385.89761 699.03213 L -385.89761 710.32224 L -@c -F - -@rax %Note: Object -384.95622 700.11496 406.19055 711.38494 @E - 0 O 0 @g -0.00 0.00 0.00 0.00 k -0 J 0 j [] 0 d 0 R 0 @G -0.00 0.00 0.00 1.00 K -0 0.49890 0.49890 0.00000 @w -/$fm 0 def -384.95622 711.38494 m -406.19112 711.38494 L -406.19112 700.11411 L -384.95622 700.11411 L -384.95622 711.38494 L -@c -B - -@rax %Note: Object -395.69272 623.18154 395.88661 699.87118 @E -0 J 0 j [] 0 d 0 R 0 @G -0.00 0.00 0.00 1.00 K -0 0.86740 0.86740 0.00000 @w -/$fm 0 def -395.88661 623.18154 m -395.70151 696.32504 L -S -@j -0.00 0.00 0.00 1.00 K -0.00 0.00 0.00 1.00 k -0 @g -0 @G -[] 0 d 0 J 0 j -0 R 0 O -0 1.00800 1.00800 0 @w -395.69272 699.87118 m -392.68658 692.80753 L -394.70003 693.82063 396.71603 693.82573 398.73458 692.82283 C -395.69272 699.87118 L -f -@J - -@rax %Note: Object -345.43928 563.54088 465.93865 777.17197 @E -0 J 0 j [] 0 d 0 R 0 @G -0.00 0.00 0.00 1.00 K -0 0.21543 0.21543 0.00000 @w -/$fm 0 def -345.43928 777.17197 m -465.93865 777.17197 L -465.93865 563.54088 L -345.43928 563.54088 L -345.43928 777.17197 L -@c -S - -%%PageTrailer -@rs -@rs -%%Trailer -@EndSysCorelDict -end -%%DocumentSuppliedResources: procset wCorel8Dict -%%EOF diff --git a/org.glite.jp/doc/users-quide/JP-query.pdf b/org.glite.jp/doc/users-quide/JP-query.pdf deleted file mode 100644 index e2f5c791970283b6d7d423789dabc324e4715114..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 41756 zcmV(zK<2+CP((&8F)lL-CCBWKq6#%2Fd%PYY6?6&FHB`_XLM*FHXtw{QZGhnY;RCu$`1Q^20%lfqE2KDaqK7DECJEw300jTr>-tKs3;+4=-+zDp)BibM|KH)SN z157P_^=rSs*79}b|G@zN7kd528T6iY-ydD`mHHmcc>TKpqm{2bU*CW7T%V9tzf!#+ zd5y0zliK^+<+?VQnAmuF{ryw+1jiZzTxoacUxUA2UmKm}T3@M@-LC5^H$0Hi7k;l} zN6?^h^zDfMBtjkURFrcDo7DYkFxb-@g|l0WV&;^0mj6*V^liXKVe+z{@5TFJ;Bj zf|UIDUerQ7rbqjUNkP7Upy?ZQU-BLtFcpM+0Hf@opjX-R5t;sk`;&fPiyuyEHGN@` z*7vN1;7vuFPfMABrnDKK?Ua`mKo1NHgam5a9lFuBnWgnd`{~nN#MP+P)N#j?Dp8Edr9`M?M9eO#P4t1Ot{eYZNzrRJJp5Tbbi`~B8vLIvf zuaGT`G>Mf>N1IJI>h}U!L~eOLH%2!fO}!(3)s4`)B|$4D?!B7ODP4mnoz>0NSAP;> zg=BhABJ|GH;tgm^(m*Y#{|wT;*nf+hzLti#pR1cV+&1CW{f{Y>0u{9+Q;9zaW=rik zq)nM3JonhNJY!AJTqf;3g32$nY$?3Sr@v||W`#`)>27Wz&eyvgi?uC;j|Oao((e{% za(}jZoO{MKv8{RR8B+>C*S2mZ-MHV=&{}MnJJ3$XEXB<3zZtAGYoBgRh{33CD&&&h zXZ2GHq-(i*Z25F8^Yq%y{hq1sSB_|ZIS0#bfnE0xT7D?B{%j}7*#kKUNq)r-0Jyx& zcgVu}q=SYGZCE$=i)i;~(lpJPMyQzUmIpWh+RpPNBM5)r^4ELVGg?HOw9}i3q$lr0hEgA8jeXJ)e>u?LFG=2l5kD?<`L# z(DpdHM8y`CTMX1?1ES9chN^p9IgtPhuvx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p|i2Y7`dRM$5GH;>Z8i+jY7`j zan=6J)192d!^OIngkW+4KK*AMNsH-g(wj)_ zAq9=E4yDk=pa$=h?am2g zK4W)~`ap0Ja+dh!4u^UyT)Q)qMk@fRiT_sE)KM=5Ae)D$53ivbbNX4`E1y!chV0mk zLrW@B)64%SqUl1*;dOPjes$<5=;zQ)h+F4PPmJ!*C45?;o!Lqx;ETwz_=D7pVjKAf z{w2m3xy)jq#mV%)rSuC4V-yAi;6+@wTF9>Z2ejAHrai^S@`nR z3fvoG0>6s};smsP?4=*x*a$A*{H;dud~)wm2y*tAZ{bXE7Me!^*=2|P0sLjA@*gi8{}Dd-+r-%z>PRoCstlAiw{wCy z89Q3o!+^Z(T&!&D4A0$uP6W)t&Q{_%8uSwU9BgddY+x`uJ3A)_2k*07!OrCW68&vz z=SVMZ=LofyP_y1w+?9VCtZ;XwP=Q%|Gg+0Ig zZ+cwM!TT>gPIeBC|Jeoy_j9iPr3Z5~w6KOc{yid8Ej*w=J|IZN&h9z)e -% Diana Bosio -% Paul Millar -% Thanks are due to Norman Gray -% -\NeedsTeXFormat{LaTeX2e} -\ProvidesClass{egee}[2002/06/20 EGEE LaTeX Class] -\typeout{EGEE LaTeX class -- 2002/06/13 Rock Lobster!} -% -%% Notes: This class file tries, as largely as possible, to copy the Microsoft -%% Word template document EDMS 2098656 v2.2. Differences and notes are listed -%% below: -%% o The Word Template uses 11pt for the main body, but 12 point -%% occasionally. Any such occurrence of 12pt is mapped into 11pt in this -%% class-file. -%% o This class inherits 11pt article. In that class Huge=30pt and -%% LARGE=22pt, which matches the required point-size for the title page. -%% o The parskip in the Word doc is exactly 1.4mm (0.7mm above and below). -%% Here we've taken the liberty of adding some glue to make things fit -%% better. -%% o The Word Template shows all the (sub)sections on the contents page in -%% capitals and subsubsections in italics. The LateX class doesn't. - -%% Interface - example of an option, should we want to use these later. -%\newif\ifmonotitle\monotitlefalse - -%\DeclareOption{mono}{\monotitletrue} - -\DeclareOption*{\PassOptionsToClass{\CurrentOption}{article}} -\ProcessOptions - - -% Inherit! -\LoadClass[11pt]{article} - -% Necessary packages: -\RequirePackage{lastpage} -\RequirePackage{tabularx} -\RequirePackage{pslatex} -\RequirePackage{times} -\RequirePackage{verbatim} -\RequirePackage{geometry} -\RequirePackage{url} - -\usepackage[hang,bf,small]{caption} - -% -% We now define a new \if command to test for PDF being enabled. -% It is important because loading graphicx overrides the definition -% of \pdfoutput and sets it to true even when PDF is not enabled. -% Use \ifpdf instead of \ifx\pdfoutput\undefined hereafter. -% - -\newif\ifpdf -\ifx\pdfoutput\undefined - \pdffalse - % \typeout{PDF _not_ defined} -\else - \pdfoutput=1 - \pdftrue - % \typeout{PDF _is_ defined} -\fi - -\ifpdf - \usepackage[pdftex, - pdfpagemode={UseOutlines},bookmarks=true,bookmarksopen=true, - bookmarksopenlevel=0,bookmarksnumbered=true, - hypertexnames=false,colorlinks,linkcolor={blue}, - citecolor={blue},urlcolor={red}, - pdfstartview={FitV}]{hyperref} -\else - \usepackage[hypertex]{hyperref} -\fi - -\ifpdf - \usepackage[pdftex]{graphicx} - \pdfcompresslevel 9 - \pdfadjustspacing 1 -\else - \usepackage[dvips]{graphicx} -\fi - -\usepackage{color} - -\def\footsize{5mm} - -%% -%% PAGE GEOMETRY DEFINITIONS -%% -% From Template file -\geometry{centering,includeheadfoot} -\geometry{a4paper,top=12.5mm,headheight=12.5mm,headsep=5mm,foot=\footsize,footskip=13.3mm,bottom=12.5mm} -\geometry{right=25mm,left=25mm} - - - -% APM -- I don't think these are right, my impression is above is correct -%\geometry{a4paper,margin=0.98in,headheight=0.72in} - - -%% -%% PAGE COLOUR DEFINITIONS -%% -\definecolor{blue}{rgb}{0.1,0.1,0.5} -\definecolor{lightgrey}{gray}{0.65} - - -% paulm's prefered name ... -\def\bibname{References} - -\setlength{\parindent}{0pt} -\setlength{\parskip}{1.4mm plus 0.4mm minus 0.2mm} - -\def\@defaultfooter{ - \def\@oddfoot{\vbox to \footsize {% - {\color{blue}\hrule width \textwidth height 1pt depth 0pt}% - \vfil - \small\hbox to \textwidth{\ISTNumber% - \hfil - \hbox{\colorbox{yellow}{\MakeUppercase{\@Dissemination}}}% - \hfil - \hbox{\thepage/\pageref{LastPage}}}% - }% - }% -} - - -\def\ps@title{% - \@defaultfooter - \def\@oddhead{\hbox to \textwidth{\LargeEGEELogo\hfil\ISTLogo}} -} - -\def\ps@headings{% - \@defaultfooter - \def\@oddhead{\vbox to \headheight{% -%\hrule width \textwidth height 1pt\relax - \vbox to 0.75\headheight{% - \hbox to \textwidth{% - \hbox to 0pt{\EGEELogo\hss}% - \hfil - \hbox to 8cm{% - \vbox to 0.75\headheight{% - \vfil - \parbox{8cm}{% - \centering\color{blue}% - \textbf{\MakeUppercase{\@title}}% -%\ifx\@Subtitle\@empty\else -% \par\textbf{\scriptsize\@Subtitle}% -%\fi - }% - \vfil - }% - \hss}% - \hfil -%\hbox to 0pt{\vrule width 1pt height 10pt depth 0pt \hss}% -%% {\scriptsize\setlength{\parskip}{0pt}\setlength{\topsep}{0pt}% -%% % \vbox to 0.75\headheight{% -%% \parbox{4cm}{x% -%% \begin{flushright}% -%% \textit{Doc. Identifier}:\\ -%% \textbf{\@DocIdentifier}\\ -%% \vfil -%% \textit{Date}: \textbf{\@Date} -%% \end{flushright}% -%% }% -%% % }% -%% }% -\hbox to 0pt{\hss\vbox to 0.75\headheight{%\hrule -\tiny%\scriptsize -\parfillskip0pt -\leftskip 0pt plus 1fil -\parskip0ex -\textit{Doc.\ Identifier}: -\par -\textbf{\@DocIdentifier} -\vfil -\textit{Date}: \textbf{\@Date} -%\hrule -}}% -% \hbox to 4cm{\scriptsize -% \vbox to 0.75\headheight{% -% \parbox{4cm}{ -% \halign{\hfill####\cr -% \textit{Doc. Identifier}:\cr -% \textbf{\@DocIdentifier}\cr -% % \noalign{\vfil} -% \textit{Date}: \textbf{\@Date}\cr -% }}% -% \vfil -% }% -% }% - }% - }% -%\hrule width \textwidth height 1pt\relax - \vfil\vskip 2.5mm\relax - {\color{blue}\hrule width \textwidth height 1pt depth 0pt}% - }% - }% -} - -\pagestyle{headings} - -\setlength{\captionmargin}{1cm} - -% image file extensions respective to the output format -\ifpdf - \DeclareGraphicsExtensions{.jpg,.pdf,.png} - \pdfcompresslevel=9 -% \pdfinfo{ /Title (\@DocumentLink) } - \pdfinfo{ /Title (EGEE) } -\else - \DeclareGraphicsExtensions{.eps} -\fi - -\def\frontboxwidth{10.6cm}% - - - -%% -%% Define our title page -%% -\AtBeginDocument{ -\pagestyle{title}% -\hbox{}% Force top of page -\vfill -{\centering - \Huge\bf\textsf{\textcolor{blue}{EGEE}}\\[20mm]% - \LARGE\sc\textsf{\bf \@title}\\[5mm]% - \ifx\@Subtitle\@empty\else - \normalsize\textsf{\@Subtitle}\\[10mm]% - \fi - \ifx\@DeliverableId\@empty\else - \LARGE\sc\textsf{\bf \@DeliverableId}\\[5mm]% - \fi -}% -\vfill -\hbox to \textwidth{ - \hfil - \vbox{ - {\color{blue}\hrule width \frontboxwidth height 1mm depth 0pt} - \hbox to \frontboxwidth{\sf - \begin{tabularx}{\frontboxwidth}{l>{\raggedright\arraybackslash}X} - Document identifier: & \textbf{\@DocIdentifier}\\[3mm] - Date: & \textbf{\@Date}\\[3mm] - Activity:& \textbf{\@Activity}\\[3mm] - Lead Partner: & \textbf{\@LeadPartner}\\[3mm] - Document status: & \textbf{\@DocStatus}\\[3mm] - Document link:& \textbf{\@DocumentLink}\\[3mm] - \end{tabularx} - } - {\color{blue}\hrule width \frontboxwidth height 1mm depth 0pt} - } -} -\vfill -{\sf\underline{Abstract}: \@Abstract} -\vfill -\newpage % end of the first page -\pagestyle{headings} -\setcounter{tocdepth}{3} -} % End of AtBeginningDocument - - -% -% EGEE style small-capital section titles. -% -% The numbering is aligned with the WinWord style, -% although it is not common in the english typography... -% -\newcommand{\sectionbreak}{\newpage} -%\renewcommand{\thesection}{\arabic{section}.} -%\renewcommand{\thesubsection}{\thesection\arabic{subsection}.} -%\renewcommand{\thesubsubsection}{\thesubsection\arabic{subsubsection}.} - -\renewcommand\section{\@startsection {section}{1}{\z@}% - {-3.5ex \@plus -1ex \@minus -.2ex}% - {2.3ex \@plus.2ex}% - {\normalfont\Large\bfseries\sffamily\scshape}} - -\renewcommand\subsection{\@startsection{subsection}{2}{\z@}% - {-3.25ex\@plus -1ex \@minus -.2ex}% - {1.5ex \@plus .2ex}% - {\normalfont\large\bfseries\sffamily\scshape}} -\renewcommand\subsubsection{\@startsection{subsubsection}{3}{\z@}% - {-3.25ex\@plus -1ex \@minus -.2ex}% - {1.5ex \@plus .2ex}% - {\normalfont\normalsize\bfseries\sffamily\scshape}} - - - -%% APM NEED TO REDEFINE section -%\titleformat{\section}{\Large\bfseries\sffamily\scshape}{\thesection}{1em}{} -%\titlecontents{section} [2em] {\vspace*{4pt}} -% {\large \sc \bfseries \contentslabel{2em}} -% {\large \sc \bfseries \hspace*{-2em}} -% {\large \textbf{\titlerule*[1ex]{.}\contentspage}} [\vspace*{4pt}] - -%\titleformat{\subsection}{\large\bfseries\sffamily\scshape}{\thesubsection}{1em}{} -%\titlecontents{subsection} [5em] {} -% {\sc \contentslabel{3em}} -% {\sc \hspace*{-3em}} -% {\titlerule*[1ex]{.}\contentspage} - - -% -% common constants -% -\def\ISTNumber{INFSO-RI-508833} -\newsavebox{\@EGEELogo} -\savebox{\@EGEELogo}{\includegraphics[height=0.75\headheight]{EGEElogoNEW}} -\def\EGEELogo{\usebox{\@EGEELogo}} -\def\LargeEGEELogo{\includegraphics[height=\headheight]{EGEElogoNEW}} -\def\ISTLogo{\includegraphics[height=\headheight]{isi}} - -% -% parameters to be supplied by the author -% -\def\Subtitle#1{\gdef\@Subtitle{#1}} -\gdef\@Subtitle{\@latex@warning@no@line{No \noexpand\Subtitle given}} - -\def\DeliverableId#1{\gdef\@DeliverableId{#1}} -\gdef\@DeliverableId{\@latex@warning@no@line{No \noexpand\DeliverableId given}} - -\def\DocIdentifier#1{\gdef\@DocIdentifier{#1}} -\gdef\@DocIdentifier{\@latex@warning@no@line{No \noexpand\DocIdentifier given % - (e.g. EGEE-JRA1-TEC-edmsId-v0-1)}} - -\def\Date#1{\gdef\@Date{#1}} -\gdef\@Date{\@latex@warning@no@line{No \noexpand\Date given % - (e.g. 01/01/2004)}} - -\def\Activity#1{\gdef\@Activity{#1}} -\gdef\@Activity{\@latex@warning@no@line{No \noexpand\Activity given % - (e.g. JRA1 Middleware Engineering and Integration )}} - -\def\LeadPartner#1{\gdef\@LeadPartner{#1}} -\gdef\@LeadPartner{\@latex@warning@no@line{No \noexpand\LeadPartner given % - (e.g. CERN, RAL )}} - -\def\DocStatus#1{\gdef\@DocStatus{#1}} -\gdef\@DocStatus{\@latex@warning@no@line{No \noexpand\DocStatus given % - (e.g. DRAFT, WORKING, DELIVERED)}} - -\def\Dissemination#1{\gdef\@Dissemination{#1}} -\gdef\@Dissemination{\@latex@warning@no@line{No \noexpand\Dissemination given % - (e.g. PUBLIC, INTERNAL, ...)}} - -\def\DocumentLink#1{\gdef\@DocumentLink{#1}} -\gdef\@DocumentLink{\@latex@warning@no@line{No \noexpand\DocumentLink given % - (e.g. http://cern.ch)}} - -\long\def\Abstract#1{\gdef\@Abstract{#1}} -\gdef\@Abstract{\@latex@warning@no@line{No \noexpand\Abstract given}} - -%% -%% Define the abstract using an environment abstract - -% -% This will produce the mailto link in the PDF file -% -% -% We use the URL package, which does this nicely. The old way (\HTTP) was -% a bit buggy as it had problems with '~'s and '_'s -% -\urlstyle{sf} -\ifpdf - \newcommand{\Email}[1]{\href{mailto:#1}{<{#1}>}} - \newcommand{\HTTP}[1]{\href{#1}{\url{#1}}} -\else - \newcommand{\Email}[1]{\textsf{<{#1}>}} - \newcommand{\HTTP}[1]{\url{#1}} -\fi - - -% -% We now redifine \part and \section so that the table of contents -% has the sections/parts in upper case. -% -% Note: need to use \uppercase because \MakeUppercase is not robust -% -\def\@part[#1]#2{% - \ifnum \c@secnumdepth >\m@ne - \refstepcounter{part}% - \addcontentsline{toc}{part}{\thepart\hspace{1em}\uppercase{#1}}% - \else - \addcontentsline{toc}{part}{\uppercase{#1}}% - \fi - {\parindent \z@ \raggedright - \interlinepenalty \@M - \normalfont - \ifnum \c@secnumdepth >\m@ne - \Large\bfseries \partname\nobreakspace\thepart - \par\nobreak - \fi - \huge \bfseries #2% - \markboth{}{}\par}% - \nobreak - \vskip 3ex - \@afterheading} - -\def\@sect#1#2#3#4#5#6[#7]#8{% - \ifnum #2>\c@secnumdepth - \let\@svsec\@empty - \else - \refstepcounter{#1}% - \protected@edef\@svsec{\@seccntformat{#1}\relax}% - \fi - \@tempskipa #5\relax - \ifdim \@tempskipa>\z@ - \begingroup - #6{% - \@hangfrom{\hskip #3\relax\@svsec}% - \interlinepenalty \@M #8\@@par}% - \endgroup - \csname #1mark\endcsname{\uppercase{#7}}% - \addcontentsline{toc}{#1}{% - \ifnum #2>\c@secnumdepth \else - \protect\numberline{\csname the#1\endcsname}% - \fi - \texorpdfstring{\uppercase{#7}}{#7}}% - \else - \def\@svsechd{% - #6{\hskip #3\relax - \@svsec #8}% - \csname #1mark\endcsname{\uppercase{#7}}% - \addcontentsline{toc}{#1}{% - \ifnum #2>\c@secnumdepth \else - \protect\numberline{\csname the#1\endcsname}% - \fi - \texorpdfstring{\uppercase{#7}}{#7}}}% - \fi - \@xsect{#5}} - -% \addcontentsline{toc} expands to \contentsline{NAME} -% which in turn expands to \l@NAME. So, to specify -% the table of contents, we must define \l@chapter, \l@section, -% \l@subsection, ... ; to specify the list of figures, we must define -% \l@figure; and so on. Most of these can be defined with the -% \@dottedtocline command, which produces a contents line with dots -% between the title and the page number. It works as follows: -% -% \@dottedtocline{LEVEL}{INDENT}{NUMWIDTH} -% LEVEL : An entry is produced only if LEVEL < or = value of -% 'tocdepth' counter. Note, \chapter is level 0, \section -% is level 1, etc. -% INDENT : The indentation from the outer left margin of the start of -% the contents line. -% NUMWIDTH : The width of a box in which the section number is to go, -% if TITLE includes a \numberline command. -% - -\def\l@part{\@dottedtocline{1}{4em}{2.0em}} -\def\l@subsection{\@dottedtocline{2}{1.5em}{2.3em}} -\def\l@subsubsection{\@dottedtocline{3}{3.8em}{3.2em}} -\def\l@paragraph{\@dottedtocline{4}{7.0em}{4.1em}} -\def\l@subparagraph{\@dottedtocline{5}{10em}{5em}} - diff --git a/org.glite.jp/doc/users-quide/glite-jpis-client.tex b/org.glite.jp/doc/users-quide/glite-jpis-client.tex deleted file mode 100644 index a577682..0000000 --- a/org.glite.jp/doc/users-quide/glite-jpis-client.tex +++ /dev/null @@ -1,93 +0,0 @@ -% -% ------------------------------------------------------------- -% Refentry -% ------------------------------------------------------------- -\section*{glite-jpis-client} -\label{glitejpisclient}\hypertarget{glitejpisclient}{}% -\label{name} - -%\section*{Nom} -glite-jpis-client --- client interface for JP IS\label{synopsis} -\subsection*{Synopsis} -\label{id2455104} -\begin{list}{}{\setlength{\itemindent}{-\leftmargin}\setlength{\parsep}{0mm}} -\item\raggedright\texttt{glite-jpis-client [ -h | --help ] [ -i | --index-server \textit{JPIS:PORT}] [ -q | --query-file \textit{IN\_FILE.XML}] [ -t | --test-file \textit{IN\_FILE.XML}] [ -e | --example-file \textit{OUT\_FILE.XML}] [ -f | --format {xml | human}]} -\end{list} - -\subsection*{DESCRIPTION} -\label{id2417458} - -{\bfseries{glite-jpis-client}} is command line interface for querying the Job Provenance Index Server. It takes the XML input, process the QueryJobs operation and returns the result in specified format. - -\subsection*{OPTIONS} -\label{id2417597} - -With no options you get simple usage message as with {\texttt{{-h}}}. - -\begin{description} -% \null and \mbox are tricks to induce different typesetting decisions -\item[{{\texttt{{-h}}}\docbooktolatexpipe{}{\texttt{{--help}}}}]\null{} -Displays usage message. -% \null and \mbox are tricks to induce different typesetting decisions -\item[{{\texttt{{-i}}}\docbooktolatexpipe{}{\texttt{{--index-server}}}}]\null{} -Specifies Job Provenance Index Server as {\ttfamily\itshape{{HOST:PORT}}}. -% \null and \mbox are tricks to induce different typesetting decisions -\item[{{\texttt{{-q}}}\docbooktolatexpipe{}{\texttt{{--query-file}}}}]\null{} -Process the QueryJobs operation. Requires input data in file {\ttfamily\itshape{{IN\_FILE.XML}}}, for using stdin specify {\texttt{{-}}}. - -The input and output data are in XML format with XSD schema, which can be found in {\texttt{{JobProvenanceISClient.\dbz{}xsd}}} (element QueryJobs for input and QueryJobsResponse for output). -% \null and \mbox are tricks to induce different typesetting decisions -\item[{{\texttt{{-t}}}\docbooktolatexpipe{}{\texttt{{--test-file}}}}]\null{} -Test the input data from {\ttfamily\itshape{{IN\_FILE.XML}}} (or from stdin if {\texttt{{-}}} is specified) and prints the found content. -% \null and \mbox are tricks to induce different typesetting decisions -\item[{{\texttt{{-e}}}\docbooktolatexpipe{}{\texttt{{--example-file}}}}]\null{} -Write the example input data to file {\ttfamily\itshape{{OUT\_FILE.XML}}} (or to stdout if {\texttt{{-}}} is specified). The XML is valid against XSD schema in {\texttt{{JobProvananceISClient.\dbz{}xsd}}}, formating may vary according to used gsoap version. -% \null and \mbox are tricks to induce different typesetting decisions -\item[{{\texttt{{-f}}}\docbooktolatexpipe{}{\texttt{{--format}}}}]\null{} -Use {\ttfamily\itshape{{FORMAT}}} as output format type. You can specify {\texttt{{xml}}} for interchangeable XML output or {\texttt{{human}}} for nice looking human readable output. -\end{description} -\noindent -\subsection*{RETURN VALUE} -\label{id2417767} - -\begin{description} -% \null and \mbox are tricks to induce different typesetting decisions -\item[{0}]\null{} -Success. -% \null and \mbox are tricks to induce different typesetting decisions -\item[{-1}]\null{} -Communication error or error from the remote server. -% \null and \mbox are tricks to induce different typesetting decisions -\item[{EINVAL}]\null{} -In most cases XML parsing error. -% \null and \mbox are tricks to induce different typesetting decisions -\item[{other error}]\null{} -Other error from errno. -\end{description} -\noindent -\subsection*{EXAMPLES} -\label{id2417822} - -\begin{description} -% \null and \mbox are tricks to induce different typesetting decisions -\item[{{\bfseries{glite-jpis-client --example-file query.xml}}}]\null{} -Save the example query parameters to file {\texttt{{query.\dbz{}xml}}}. -% \null and \mbox are tricks to induce different typesetting decisions -\item[{{\bfseries{glite-jpis-client --query-file query.xml}}}]\null{} -Queries the local index server running on default port with the query parameters specified in the file {\texttt{{query.\dbz{}xml}}}. -% \null and \mbox are tricks to induce different typesetting decisions -\item[{{\bfseries{glite-jpis-client -i localhost:8902 -q - -f human}}}]\null{} -Queries the index server running on local host on the port 8902 with the query parameters from stdin and show results in non-XML form. -\end{description} -\noindent - - -\subsection*{SEE ALSO} -\label{id2418102} - -glite-jp-indexd(8) - -\subsection*{AUTHOR} -\label{id2418112} - -EU DataGrid Work Package 1, CESNET group. diff --git a/org.glite.jp/doc/users-quide/isi.png b/org.glite.jp/doc/users-quide/isi.png deleted file mode 100644 index c6766f4747f68096fdb89f45dfefa9e125068556..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 83835 zcmV)wK$O3UP)00009a7bBm000XT z000XT0n*)m`~Uy|33NqRbVF}#ZDnqB004<9jRpV!AOJ~3K~#90)LREol*^VLz3=UN zzO-+*wzg`kZtbhPuWH}kV8E=HbGTx{9Iok_5fw9FjzmEa5JeOPBq&JEQG!U4Bw>IV z!oV=hFp0@C`~82zFa$>#eYd<_U4QlTf4ckY)2C0LbN(KN_7_Pyo$e#aj8ig<)&@K+ zME%66u8*G-m;%@8=<~_bZ)2E=Q(eYRaQb1KgV`kKnR7jsEWfv4vA6l`J7$xe%_g~k z26@61*9lWxkjGC(b_V_E@s7wSqms~AZuED#o$lhAVQU||cD?_MId>*aa|J#OK?q3Z za>b^=W!Cf1I4`eJCQ}JTvcfm)h{!T;pPaj1uY!UL6O-QMfqKK(taZ$f;skgOFgz0d>wu_hI^fkig4B?A@8I=bPhC==fSFlOIPj9H} z>D|^k;$1meC{ok#l?98jp7pQmS&Vg5fw2}(txAPgOIP^1dt`nR+>Kiv>uWUKt%~Ll z3TO}R5va5}5)LxMg=N?t8Fl3h>49ef!JR8I9KQ#6dQ0FUMAZ%M<| zmVQqH3qJ|2#p?U|8Wk@GKqaY@F&5y8V*V4AJ9Y=@W%sYw&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-I2Nh9rM17PxRvK_wx*>wgoc+oxnu*@1i2)_e2D7){!!}6ja%H{iD%A7 zm{}&fd**@f{((inN?3SVlBPB^yv)Wfol1Z0M(1}vFrjbfFGT{KsF%ai((9{h#GHXy zbtxB0O{*7M(w_-iztLsqF4_-=kAvnIi*AR6mfo??xOiEteY5>%4>~}iqBAI&6eVZ8 zLeJyktE_IN9zGUGS-oMC%f5qtSQaixYP@ni8dKWbNe8w{O4_)h929DFbI;kZ#r2Uv z0Wt&4{Dn>riuU1yvXdMMou`G9r$g6naQ=C>nE$KoWQwbM4vE3mE}ikx$)9$5Qij75 zF_7{iMxC_miPKot@qJ-gcb#Q}gk>9Q70W)*ZeHEdAxHo`{n+mzD_7sawbuOTu~-U2te%0muJ!FSCzq_W^g59R#a4ayaf#cu>C&?35IbgSEsINF9llA=Z0OTkR+XiS z3a_(edVBiON$3o*4N+}w?gyt}qhx;En*UPjiYMkH;<+lAI5s{7H|Y{D*bLMvN7mK% zz&G(@<<-ea8sr19;+PiY7=VKh&C0`ul?gF&qPy5rzP7u#q`j=H9bf07{FeqB8v9yX z2jF*L1gOV1`~((Lq4O`qif_bYjrKvh2i2me*S)qN2Sv}p+?d#^xP)pdzS8n`!m>{} z5*|ut3W=-q`Z#6&BeY%FiT<8^cc`wumoND>D@#n*=c4ruyJDlFpIo#Jj+S1ZrUfIC_xrBCJ+O(2&R;Jp;zWiET+(s==A_Q zBXcaP%Hl - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - The org.glite and org.glite.jp modules have been updated, please rerun the configuration file - - - - - The org.glite and org.glite.jp modules have been updated, please rerun the configuration file - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/org.glite.jp/project/properties.xml b/org.glite.jp/project/properties.xml deleted file mode 100755 index 276cf76..0000000 --- a/org.glite.jp/project/properties.xml +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/org.glite.jp/project/run-workspace b/org.glite.jp/project/run-workspace deleted file mode 100644 index a5d1f54..0000000 --- a/org.glite.jp/project/run-workspace +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/sh - -cd ../.. - -cvs co org.glite -cvs co org.glite.jp - -cd org.glite.jp/project -ant -f glite.jp.csf.xml - diff --git a/org.glite.jp/project/taskdefs.xml b/org.glite.jp/project/taskdefs.xml deleted file mode 100755 index c4cc889..0000000 --- a/org.glite.jp/project/taskdefs.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/org.glite.jp/project/version.properties b/org.glite.jp/project/version.properties deleted file mode 100644 index 5d1303b..0000000 --- a/org.glite.jp/project/version.properties +++ /dev/null @@ -1,2 +0,0 @@ -module.version=1.4.0 -module.age=1 diff --git a/org.glite.lb-utils.context/.cvsignore b/org.glite.lb-utils.context/.cvsignore deleted file mode 100755 index 1df717b..0000000 --- a/org.glite.lb-utils.context/.cvsignore +++ /dev/null @@ -1,2 +0,0 @@ -.project -.cdtproject \ No newline at end of file diff --git a/org.glite.lb-utils.context/LICENSE b/org.glite.lb-utils.context/LICENSE deleted file mode 100755 index 01b973b..0000000 --- a/org.glite.lb-utils.context/LICENSE +++ /dev/null @@ -1,69 +0,0 @@ -LICENSE file for EGEE Middleware -================================ - -Copyright (c) 2004 on behalf of the EU EGEE Project: -The European Organization for Nuclear Research (CERN), -Istituto Nazionale di Fisica Nucleare (INFN), Italy -Datamat Spa, Italy -Centre National de la Recherche Scientifique (CNRS), France -CS Systeme d'Information (CSSI), France -Royal Institute of Technology, Center for Parallel Computers (KTH-PDC), Sweden -Universiteit van Amsterdam (UvA), Netherlands -University of Helsinki (UH.HIP), Finlan -University of Bergen (UiB), Norway -Council for the Central Laboratory of the Research Councils (CCLRC), United Kingdom - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - -1. Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - -2. Redistributions in binary form must reproduce the above copyright -notice, this list of conditions and the following disclaimer in the -documentation and/or other materials provided with the distribution. - -3. The end-user documentation included with the redistribution, if -any, must include the following acknowledgment: "This product includes -software developed by The EU EGEE Project (http://cern.ch/eu-egee/)." -Alternatively, this acknowledgment may appear in the software itself, if -and wherever such third-party acknowledgments normally appear. - -4. The names EGEE and the EU EGEE Project must not be -used to endorse or promote products derived from this software without -prior written permission. For written permission, please contact -. - -5. You are under no obligation whatsoever to provide anyone with any -bug fixes, patches, or upgrades to the features, functionality or -performance of the Software ("Enhancements") that you may develop over -time; however, if you choose to provide your Enhancements to The EU -EGEE Project, or if you choose to otherwise publish or distribute your -Enhancements, in source code form without contemporaneously requiring -end users of The EU EGEE Proejct to enter into a separate written license -agreement for such Enhancements, then you hereby grant The EU EGEE Project -a non-exclusive, royalty-free perpetual license to install, use, copy, -modify, prepare derivative works, incorporate into the EGEE Middleware -or any other computer software, distribute, and sublicense your -Enhancements or derivative works thereof, in binary and source code -form (if any), whether developed by The EU EGEE Project or third parties. - -THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED -WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL PROJECT OR ITS CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR -BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE -OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN -IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -This software consists of voluntary contributions made by many -individuals on behalf of the EU EGEE Prject. For more information on The -EU EGEE Project, please see http://cern.ch/eu-egee/. For more information on -EGEE Middleware, please see http://egee-jra1.web.cern.ch/egee-jra1/ - - diff --git a/org.glite.lb-utils.context/build.xml b/org.glite.lb-utils.context/build.xml deleted file mode 100644 index 81cd270..0000000 --- a/org.glite.lb-utils.context/build.xml +++ /dev/null @@ -1,122 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/org.glite.lb-utils.context/project/build.number b/org.glite.lb-utils.context/project/build.number deleted file mode 100644 index 5cfec85..0000000 --- a/org.glite.lb-utils.context/project/build.number +++ /dev/null @@ -1 +0,0 @@ -module.build = 0 diff --git a/org.glite.lb-utils.context/project/build.properties b/org.glite.lb-utils.context/project/build.properties deleted file mode 100755 index e69de29..0000000 diff --git a/org.glite.lb-utils.context/project/configure.properties.xml b/org.glite.lb-utils.context/project/configure.properties.xml deleted file mode 100644 index 0b17304..0000000 --- a/org.glite.lb-utils.context/project/configure.properties.xml +++ /dev/null @@ -1,37 +0,0 @@ - - - - - diff --git a/org.glite.lb-utils.context/project/properties.xml b/org.glite.lb-utils.context/project/properties.xml deleted file mode 100644 index 86c1f8a..0000000 --- a/org.glite.lb-utils.context/project/properties.xml +++ /dev/null @@ -1,73 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/org.glite.lb-utils.context/project/version.properties b/org.glite.lb-utils.context/project/version.properties deleted file mode 100755 index 6f1f8ab..0000000 --- a/org.glite.lb-utils.context/project/version.properties +++ /dev/null @@ -1,2 +0,0 @@ -module.version = 0.0.0 -module.age = 0 \ No newline at end of file diff --git a/org.glite.lb-utils.db/.cvsignore b/org.glite.lb-utils.db/.cvsignore deleted file mode 100755 index ff82493..0000000 --- a/org.glite.lb-utils.db/.cvsignore +++ /dev/null @@ -1,5 +0,0 @@ -.project -.cdtproject -build -doc -reports diff --git a/org.glite.lb-utils.db/LICENSE b/org.glite.lb-utils.db/LICENSE deleted file mode 100755 index 01b973b..0000000 --- a/org.glite.lb-utils.db/LICENSE +++ /dev/null @@ -1,69 +0,0 @@ -LICENSE file for EGEE Middleware -================================ - -Copyright (c) 2004 on behalf of the EU EGEE Project: -The European Organization for Nuclear Research (CERN), -Istituto Nazionale di Fisica Nucleare (INFN), Italy -Datamat Spa, Italy -Centre National de la Recherche Scientifique (CNRS), France -CS Systeme d'Information (CSSI), France -Royal Institute of Technology, Center for Parallel Computers (KTH-PDC), Sweden -Universiteit van Amsterdam (UvA), Netherlands -University of Helsinki (UH.HIP), Finlan -University of Bergen (UiB), Norway -Council for the Central Laboratory of the Research Councils (CCLRC), United Kingdom - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - -1. Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - -2. Redistributions in binary form must reproduce the above copyright -notice, this list of conditions and the following disclaimer in the -documentation and/or other materials provided with the distribution. - -3. The end-user documentation included with the redistribution, if -any, must include the following acknowledgment: "This product includes -software developed by The EU EGEE Project (http://cern.ch/eu-egee/)." -Alternatively, this acknowledgment may appear in the software itself, if -and wherever such third-party acknowledgments normally appear. - -4. The names EGEE and the EU EGEE Project must not be -used to endorse or promote products derived from this software without -prior written permission. For written permission, please contact -. - -5. You are under no obligation whatsoever to provide anyone with any -bug fixes, patches, or upgrades to the features, functionality or -performance of the Software ("Enhancements") that you may develop over -time; however, if you choose to provide your Enhancements to The EU -EGEE Project, or if you choose to otherwise publish or distribute your -Enhancements, in source code form without contemporaneously requiring -end users of The EU EGEE Proejct to enter into a separate written license -agreement for such Enhancements, then you hereby grant The EU EGEE Project -a non-exclusive, royalty-free perpetual license to install, use, copy, -modify, prepare derivative works, incorporate into the EGEE Middleware -or any other computer software, distribute, and sublicense your -Enhancements or derivative works thereof, in binary and source code -form (if any), whether developed by The EU EGEE Project or third parties. - -THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED -WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL PROJECT OR ITS CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR -BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE -OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN -IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -This software consists of voluntary contributions made by many -individuals on behalf of the EU EGEE Prject. For more information on The -EU EGEE Project, please see http://cern.ch/eu-egee/. For more information on -EGEE Middleware, please see http://egee-jra1.web.cern.ch/egee-jra1/ - - diff --git a/org.glite.lb-utils.db/Makefile b/org.glite.lb-utils.db/Makefile deleted file mode 100644 index 362c7cb..0000000 --- a/org.glite.lb-utils.db/Makefile +++ /dev/null @@ -1,128 +0,0 @@ -# defaults -top_srcdir=. -builddir=build -stagedir=. -distdir=. -globalprefix=glite -lbutilsprefix=lb-utils -package=glite-lb-utils-db -version=0.2.0 -PREFIX=/opt/glite -flavour=gcc32thr - -glite_location=/opt/glite -mysql_prefix=/opt/mysql -mysql_version=4.1.11 -cppunit_prefix=/opt/cppunit -thrflavour=gcc32pthr -nothrflavour=gcc32 - --include Makefile.inc --include ../project/version.properties - -version=${module.version} - -CC=gcc - -VPATH=${top_srcdir}/interface:${top_srcdir}/src:${top_srcdir}/examples - -DEBUG:=-g -O0 -Wall - -CFLAGS:= \ - ${DEBUG} \ - -DVERSION=\"${version}\" \ - -I${stagedir}/include -I${top_srcdir}/src -I. \ - -I${top_srcdir}/interface \ - ${COVERAGE_FLAGS} \ - -I${mysql_prefix}/include -I${mysql_prefix}/include/mysql \ - -D_GNU_SOURCE - -ifdef LBS_DB_PROFILE - CFLAGS:=${CFLAGS} -DLBS_DB_PROFILE -endif - -TEST_LIBS:=-L${cppunit_prefix}/lib -lcppunit -TEST_INC:=-I${cppunit_prefix}/include - -LDFLAGS:=-L${stagedir}/lib ${COVERAGE_FLAGS} - -COMPILE:=libtool --mode=compile ${CC} ${CFLAGS} -LINK:=libtool --mode=link ${CC} -rpath ${stagedir}/lib ${LDFLAGS} -INSTALL:=libtool --mode=install install - -ifneq (${mysql_prefix},/usr) - ifeq ($(shell echo ${mysql_version} | cut -d. -f1,2),4.1) - mysqlib := -L${mysql_prefix}/lib/mysql - else - mysqlib := -L${mysql_prefix}/lib - endif -endif - -EXT_LIBS:=${mysqlib} -lmysqlclient -lglite_lbu_trio -OBJS:=db.o -TESTOBJS:=dbtest.o -HDRS:=db.h -LOBJS:=${OBJS:.o=.lo} -LTESTOBJS:=${TESTOBJS:.o=.lo} - -libglite_lbu_db.la: ${LOBJS} - ${LINK} -o $@ $< ${EXT_LIBS} - -libglite_lbu_dbtest.la: ${LTESTOBJS} - ${LINK} -o $@ $< ${EXT_LIBS} - -dbtest.lo dbtest.o: db.c db.h - ${COMPILE} -DGLITE_LBU_DEFAULT_RESULT_BUFFER_LENGTH=10 -c $< -o $@ - -db_test: db_test.lo libglite_lbu_dbtest.la - ${LINK} -o $@ $+ ${EXT_LIBS} - -default all: compile - -compile: libglite_lbu_db.la - -check: - -echo No checks here yet. - -test_coverage: - -mkdir coverage - cd coverage && $(MAKE) -f ../Makefile top_srcdir=../../ COVERAGE_FLAGS="-fprofile-arcs -ftest-coverage" check - cd coverage && for i in `echo ${OBJS} | tr ' ' '\012' | sort -u`; do gcov $$i ; done - -examples: db_test - -doc: - doxygen C.dox - -stage: compile - $(MAKE) install PREFIX=${stagedir} DOSTAGE=yes - -dist: distsrc distbin - -distsrc: - mkdir -p ${top_srcdir}/${package}-${version} - cd ${top_srcdir} && GLOBIGNORE="${package}-${version}" && cp -Rf * ${package}-${version} - cd ${top_srcdir} && tar -czf ${distdir}/${package}-${version}_src.tar.gz --exclude-from=project/tar_exclude ${package}-${version} - rm -rf ${top_srcdir}/${package}-${version} - -distbin: - $(MAKE) install PREFIX=`pwd`/tmpbuilddir${stagedir} - save_dir=`pwd`; cd tmpbuilddir${stagedir} && tar -czf $$save_dir/${top_srcdir}/${distdir}/${package}-${version}_bin.tar.gz *; cd $$save_dir - rm -rf tmpbuilddir - -install: - -mkdir -p ${PREFIX}/lib - -mkdir -p ${PREFIX}/include/${globalprefix}/${lbutilsprefix} -# ${INSTALL} -m 644 ${top_srcdir}/LICENSE ${PREFIX}/share/doc/${package}-${version} - ${INSTALL} -m 755 "libglite_lbu_db.la" "${PREFIX}/lib/libglite_lbu_db.la"; \ - ${INSTALL} -m 644 ${top_srcdir}/interface/${HDRS} ${PREFIX}/include/${globalprefix}/${lbutilsprefix} - -clean: - -%.o %.lo: %.c - ${COMPILE} -c $< - -db.lo: db.c db.h -db_test.lo: libglite_lbu_dbtest.la db.h db_test.c - -.PHONY: default all compile check examples doc stage dist distsrc distbin install clean test_coverage diff --git a/org.glite.lb-utils.db/build.xml b/org.glite.lb-utils.db/build.xml deleted file mode 100644 index 14d4d7e..0000000 --- a/org.glite.lb-utils.db/build.xml +++ /dev/null @@ -1,126 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/org.glite.lb-utils.db/examples/db_expire.c b/org.glite.lb-utils.db/examples/db_expire.c deleted file mode 100644 index 012a91b..0000000 --- a/org.glite.lb-utils.db/examples/db_expire.c +++ /dev/null @@ -1,115 +0,0 @@ -/* - * Example (and quick test) of prepared statements expirations. - * Use 'SET GLOBAL wait_timeout=...' for experimenting. - * - * Requires existing database with appropriate access and example table: - * - * mysqladmin -u root -p create test - * mysql -u root -p -e 'GRANT ALL on test.* to testuser@localhost' - * ./db_test - * - * Use CS environment variable when using different user/pwd@machine:dbname. - */ - -#include -#include -#include - -#include "db.h" - -#define CS "testuser/@localhost:test" -#define SELECT_CMD "SELECT id, user, info FROM data WHERE user = ?" - -#define dprintf(ARGS) { printf("%s: ", name); printf ARGS; } - - -static void print_blob(unsigned long len, char *blob) { - int i; - for (i = 0; i < len; i++) printf("%02X ", blob[i]); - printf("(='"); - for (i = 0; i < len; i++) printf("%c", blob[i]); - printf("')"); -} - - -static void print_free_result(const char *name, unsigned long *lens, char **res) { - dprintf((" id='%s'=%d\n", res[0], atoi(res[0]))); - - dprintf((" user='%s'\n", res[1])); - - dprintf((" blob=")); - if (res[2] && lens) print_blob(lens[2], res[2]); - else printf("null"); - printf("\n"); - - free(res[0]); - free(res[1]); - free(res[2]); -} - - -int main(int argn, char *argv[]) { - char *name, *user; - const char *cs; - glite_lbu_DBContext ctx; - glite_lbu_Statement stmt; - int caps, i, nr, c; - unsigned long lens[3]; - char *res[3]; - - if ((name = strrchr(argv[0], '/')) != NULL) name++; - else name = argv[0]; - if ((cs = getenv("CS")) == NULL) cs = CS; - - // init - dprintf(("connecting to %s...\n", cs)); - if (glite_lbu_InitDBContext(&ctx) != 0) goto fail; - if (glite_lbu_DBConnect(ctx, cs) != 0) goto failctx; - if ((caps = glite_lbu_DBQueryCaps(ctx)) == -1) goto failcon; - if ((caps & GLITE_LBU_DB_CAP_PREPARED) == 0) { - dprintf(("can't do prepared commands, exiting.")); - goto failcon; - } - // caps - glite_lbu_DBSetCaps(ctx, caps); - dprintf(("capabilities: %d\n", caps)); - - user = NULL; - dprintf(("preparing '%s'...\n", user)); - if ((glite_lbu_PrepareStmt(ctx, SELECT_CMD, &stmt)) != 0) goto failcon; - - do { - user = "cicomexocitl.civ"; - dprintf(("executing '%s'...\n", user)); - if (glite_lbu_ExecStmt(stmt, 1, GLITE_LBU_DB_TYPE_VARCHAR, user) == -1) goto failstmt; - dprintf(("fetching '%s'...\n", user)); - while ((nr = glite_lbu_FetchRow(stmt, 3, lens, res)) > 0) { - dprintf(("Result: n=%d, res=%p\n", nr, res)); - print_free_result(name, lens, res); - } - if (nr < 0) { - dprintf(("fetch '%s' failed\n", user)); - break; - } - dprintf(("\n")); - - c = fgetc(stdin); - } while (c != -1 && (c == '\r' || c == '\n')); - - dprintf(("closing...\n")); - glite_lbu_DBClose(ctx); - glite_lbu_FreeDBContext(ctx); - return 0; - -failstmt: - printf("closing stmt...\n"); - glite_lbu_FreeStmt(&stmt); -failcon: - dprintf(("closing...\n")); - glite_lbu_DBClose(ctx); -failctx: - glite_lbu_FreeDBContext(ctx); -fail: - dprintf(("failed\n")); - return 1; -} diff --git a/org.glite.lb-utils.db/examples/db_test.c b/org.glite.lb-utils.db/examples/db_test.c deleted file mode 100644 index 7890031..0000000 --- a/org.glite.lb-utils.db/examples/db_test.c +++ /dev/null @@ -1,196 +0,0 @@ -/* - * Example (and quick test) of this DB module. - * - * Requires existing database with appropriate access: - * - * mysqladmin -u root -p create test - * mysql -u root -p -e 'GRANT ALL on test.* to testuser@localhost' - * - * Use CS environment variable when using different user/pwd@machine:dbname. - */ - -#include -#include -#include - -#include "db.h" - -#define CS "testuser/@localhost:test" -#define CREATE_CMD "CREATE TABLE data (\n\ - id INT NOT NULL,\n\ - user VARCHAR(32) NOT NULL,\n\ - info BLOB,\n\ - PRIMARY KEY (id),\n\ - INDEX(user)\n\ -) engine=innodb" -#define DROP_CMD "DROP TABLE data" -#define INSERT_TRIO_CMD "INSERT INTO data (id, user, info) VALUES (%d, %s, %s)" -#define SELECT_TRIO_CMD "SELECT id, user, info FROM data WHERE user = '%s'" -#define INSERT_CMD "INSERT INTO data (id, user, info) VALUES (?, ?, ?)" -#define SELECT_CMD "SELECT id, user, info FROM data WHERE user = ?" - -#define dprintf(ARGS) { printf("%s: ", name); printf ARGS; } - - -static void print_blob(unsigned long len, char *blob) { - int i; - for (i = 0; i < len; i++) printf("%02X ", blob[i]); - printf("(='"); - for (i = 0; i < len; i++) printf("%c", blob[i]); - printf("')"); -} - - -static void print_free_result(const char *name, unsigned long *lens, char **res) { - dprintf((" id='%s'=%d\n", res[0], atoi(res[0]))); - - dprintf((" user='%s'\n", res[1])); - - dprintf((" blob=")); - if (res[2] && lens) print_blob(lens[2], res[2]); - else printf("null"); - printf("\n"); - - free(res[0]); - free(res[1]); - free(res[2]); -} - - -int main(int argn, char *argv[]) { - char *name, *cmd; - const char *cs; - glite_lbu_DBContext ctx; - glite_lbu_Statement stmt; - int caps; - - char blob1[] = "Guess: blob or \000string?"; - char blob2[] = {0, 1, 2, 3, 4, 5}; - - int nr; - char *res[3]; - unsigned long lens[3]; - - if ((name = strrchr(argv[0], '/')) != NULL) name++; - else name = argv[0]; - if ((cs = getenv("CS")) == NULL) cs = CS; - cmd = NULL; - - // init - dprintf(("connecting to %s...\n", cs)); - if (glite_lbu_InitDBContext(&ctx) != 0) goto fail; - if (glite_lbu_DBConnect(ctx, cs) != 0) goto failctx; - if ((caps = glite_lbu_DBQueryCaps(ctx)) == -1) goto failcon; - if ((caps & GLITE_LBU_DB_CAP_PREPARED) == 0) { - dprintf(("can't do prepared commands, exiting.")); - goto failcon; - } - // caps - glite_lbu_DBSetCaps(ctx, caps); - dprintf(("capabilities: %d\n", caps)); - // create all needed tables and data - dprintf(("creating tables...\n")); - glite_lbu_ExecSQL(ctx, DROP_CMD, NULL); - if (glite_lbu_ExecSQL(ctx, CREATE_CMD, NULL) == -1) goto failcon; - // trio-insert - dprintf(("trio-insert...\n")); - asprintf(&cmd, INSERT_TRIO_CMD, 1, "'hyperochus'", "NULL"); - if (glite_lbu_ExecSQL(ctx, cmd, NULL) != 1) goto failcon; - free(cmd); cmd = NULL; - // prepared-insert - dprintf(("prepare-insert...\n")); - if (glite_lbu_PrepareStmt(ctx, INSERT_CMD, &stmt) != 0) goto failcon; - dprintf(("execute 1. insert...\n")); - if (glite_lbu_ExecStmt(stmt, 3, - GLITE_LBU_DB_TYPE_INT, 2, - GLITE_LBU_DB_TYPE_VARCHAR, "cicomexocitl.civ", - GLITE_LBU_DB_TYPE_BLOB, blob1, sizeof(blob1) - 1) != 1) goto failstmt; - dprintf(("execute 2. insert...\n")); - if (glite_lbu_ExecStmt(stmt, 3, - GLITE_LBU_DB_TYPE_INT, 3, - GLITE_LBU_DB_TYPE_VARCHAR, "tartarus", - GLITE_LBU_DB_TYPE_NULL) != 1) goto failstmt; - dprintf(("execute 3. insert...\n")); - if (glite_lbu_ExecStmt(stmt, 3, - GLITE_LBU_DB_TYPE_INT, 4, - GLITE_LBU_DB_TYPE_VARCHAR, "harpia", - GLITE_LBU_DB_TYPE_BLOB, blob2, sizeof(blob2)) != 1) goto failstmt; - glite_lbu_FreeStmt(&stmt); - dprintf(("\n")); - - // trio-query -{ - const char *user; - - user = "harpia"; - dprintf(("selecting '%s'...\n", user)); - asprintf(&cmd, SELECT_TRIO_CMD, user); - if (glite_lbu_ExecSQL(ctx, cmd, &stmt) == -1) goto failcon; - free(cmd); cmd = NULL; - dprintf(("fetching '%s'...\n", user)); - while ((nr = glite_lbu_FetchRow(stmt, 3, lens, res)) > 0) { - dprintf(("Result: n=%d, res=%p\n", nr, res)); - print_free_result(name, lens, res); - } - if (nr < 0) dprintf(("fetch '%s' failed\n", user)); - dprintf(("closing stmt...\n")); - glite_lbu_FreeStmt(&stmt); - dprintf(("\n")); - - user = "nobody"; - dprintf(("selecting '%s'...\n", user)); - asprintf(&cmd, SELECT_TRIO_CMD, user); - if (glite_lbu_ExecSQL(ctx, cmd, &stmt) == -1) goto failcon; - free(cmd); cmd = NULL; - dprintf(("fetching '%s'...\n", user)); - while ((nr = glite_lbu_FetchRow(stmt, 3, lens, res)) > 0) { - dprintf(("Result: n=%d, res=%p\n", nr, res)); - print_free_result(name, lens, res); - } - if (nr < 0) dprintf(("fetch '%s' failed\n", user)); - dprintf(("closing stmt...\n")); - glite_lbu_FreeStmt(&stmt); - dprintf(("\n")); -} - - // "param" queries -{ - const char *user = NULL; - - dprintf(("preparing '%s'...\n", user)); - if ((glite_lbu_PrepareStmt(ctx, SELECT_CMD, &stmt)) != 0) goto failcon; - - user = "cicomexocitl.civ"; - dprintf(("executing '%s'...\n", user)); - if (glite_lbu_ExecStmt(stmt, 1, GLITE_LBU_DB_TYPE_VARCHAR, user) == -1) goto failstmt; - dprintf(("fetching '%s'...\n", user)); - while ((nr = glite_lbu_FetchRow(stmt, 3, lens, res)) > 0) { - dprintf(("Result: n=%d, res=%p\n", nr, res)); - print_free_result(name, lens, res); - } - if (nr < 0) dprintf(("fetch '%s' failed\n", user)); - dprintf(("\n")); - - dprintf(("closing stmt...\n")); - glite_lbu_FreeStmt(&stmt); - dprintf(("\n")); -} - - dprintf(("closing...\n")); - glite_lbu_DBClose(ctx); - glite_lbu_FreeDBContext(ctx); - return 0; - -failstmt: - printf("closing stmt...\n"); - glite_lbu_FreeStmt(&stmt); -failcon: - dprintf(("closing...\n")); - glite_lbu_DBClose(ctx); -failctx: - glite_lbu_FreeDBContext(ctx); -fail: - free(cmd); - dprintf(("failed\n")); - return 1; -} diff --git a/org.glite.lb-utils.db/interface/db.h b/org.glite.lb-utils.db/interface/db.h deleted file mode 100644 index 0c9002a..0000000 --- a/org.glite.lb-utils.db/interface/db.h +++ /dev/null @@ -1,336 +0,0 @@ -#ifndef GLITE_LBU_DB_H -#define GLITE_LBU_DB_H - -#ident "$Header$" - - -#include - - -#ifdef __cplusplus -extern "C" { -#endif - - -/** - * \file db.h - * \defgroup database Database module - * - * Database modul module API (LB & JP Utils). - * - * There are two ways to access DB here: - * - simple: - * - * SQL commands as single string. All values are incorporated in the SQL command strings. Proper escaping is required. - * - enhanced: - * - * Prepared SQL commands with separated parameters, functions PrepareStmt() and ExecStmt(). All values are delivered in separated buffers. Its faster for multiple using and more secure. - * @{ - */ - - -/** - * Enable transaction support if available. - * - * With disabled transaction can be used transaction functions, they are just ignored. - */ -#define GLITE_LBU_DB_CAP_TRANSACTIONS 1 - -/** - * Check prepared parameters support. - */ -#define GLITE_LBU_DB_CAP_PREPARED 2 - -/** - * Check for getting indexes support. - * - * Needed for QueryIndices call. - */ -#define GLITE_LBU_DB_CAP_INDEX 4 - - -/** - * Database connection context. - */ -typedef struct glite_lbu_DBContext_s *glite_lbu_DBContext; - - -/** - * Prepared statement, used for SQL statement with parameters. - */ -typedef struct glite_lbu_Statement_s *glite_lbu_Statement; - - -/** - * Structure holds date for multi-rows insert. - */ -typedef struct glite_lbu_bufInsert_s *glite_lbu_bufInsert; - - - -/** - * All types of parameteres, they match to the SQL types. - */ -typedef enum { - GLITE_LBU_DB_TYPE_NULL = 0, - GLITE_LBU_DB_TYPE_TINYINT = 1, - GLITE_LBU_DB_TYPE_INT = 2, - GLITE_LBU_DB_TYPE_TINYBLOB = 3, - GLITE_LBU_DB_TYPE_TINYTEXT = 4, - GLITE_LBU_DB_TYPE_BLOB = 5, - GLITE_LBU_DB_TYPE_TEXT = 6, - GLITE_LBU_DB_TYPE_MEDIUMBLOB = 7, - GLITE_LBU_DB_TYPE_MEDIUMTEXT = 8, - GLITE_LBU_DB_TYPE_LONGBLOB = 9, - GLITE_LBU_DB_TYPE_LONGTEXT = 10, - GLITE_LBU_DB_TYPE_VARCHAR = 11, - GLITE_LBU_DB_TYPE_CHAR = 12, - GLITE_LBU_DB_TYPE_DATE = 13, - GLITE_LBU_DB_TYPE_TIME = 14, - GLITE_LBU_DB_TYPE_DATETIME = 15, - GLITE_LBU_DB_TYPE_TIMESTAMP = 16, - GLITE_LBU_DB_TYPE_LAST = 17 -} glite_lbu_DBType; - - - -/** - * Get error state from DB context. - * - * \param[in] ctx context to work with - * \param[out] text error name - * \param[out] desc error description - */ -int glite_lbu_DBError(glite_lbu_DBContext ctx, char **text, char **desc); - - -/** - * Initialize the database context. - * - * \param[out] ctx result context - */ -int glite_lbu_InitDBContext(glite_lbu_DBContext *ctx); - - -/** - * Free database context. - */ -void glite_lbu_FreeDBContext(glite_lbu_DBContext ctx); - - -/** - * Connect to the given database. - * - * \param[out] ctx context to work with - * \param[in] cs connect string user/password\@host:database - * - * \return error code, 0 = OK - */ -int glite_lbu_DBConnect(glite_lbu_DBContext ctx, const char *cs); - - -/** - * Close the connection. - * - * \param[in,out] ctx context to work with - */ -void glite_lbu_DBClose(glite_lbu_DBContext ctx); - - -/** - * Check database version and capabilities. - * - * \param[in,out] ctx context to work with - * - * \return capabilities - * \retval -1 error occured - */ -int glite_lbu_DBQueryCaps(glite_lbu_DBContext ctx); - - -/** - * Set the database capabilities on already initialized context. - * - * It should be find out by DBQueryCaps() first. - * - * \param[in,out] ctx context to work with - * \param[in] caps capabilities to use, should be found out by QueryCaps() - */ -void glite_lbu_DBSetCaps(glite_lbu_DBContext ctx, int caps); - - -/** - * Start transaction. - */ -int glite_lbu_Transaction(glite_lbu_DBContext ctx); - - -/** - * Commit (end) transaction. - */ -int glite_lbu_Commit(glite_lbu_DBContext ctx); - - -/** - * Cancel transaction. - */ -int glite_lbu_Rollback(glite_lbu_DBContext ctx); - - -/** - * \param[in,out] stmt executed SQL statement - * \param[in] n number of items for sure there is enough space in lengths and results - * \param[out] lengths array with lengths (good for data blobs), may be NULL - * \param[out] results array with results, all items are allocated - * - * \retval >0 number of fields of the retrieved row - * \retval 0 no more rows - * \retval -1 error - */ -int glite_lbu_FetchRow(glite_lbu_Statement stmt, unsigned int n, unsigned long *lengths, char **results); - - -/** - * Free the statement structure and destroy its parameters. - * - * Statement will be set to NULL and multiple calls are allowed. - * - * \param[in,out] stmt statement - */ -void glite_lbu_FreeStmt(glite_lbu_Statement *stmt); - - -/** - * Parse and execute one simple SQL statement. - * All values are incorporated int the SQL command string. - * - * \param[in,out] ctx context to work with - * \param[in] cmd SQL command - * \param[out] stmt statement handle with results (makes sense for selects only) - * - * \return number of rows selected, created or affected by update, -1 on error - */ -int glite_lbu_ExecSQL(glite_lbu_DBContext ctx, const char *cmd, glite_lbu_Statement *stmt); - - -/** - * Query for column names of the statement. - * - * It work only for simple API, so only after ExecSQL(). - * - * \param[in,out] stmt the statement handle - * \param[out] cols result array of names - * - * \return error code - */ -int glite_lbu_QueryColumns(glite_lbu_Statement stmt, char **cols); - - -/** - * Retrieve column names of a query simple SQL statement. - * - * \param[in,out] ctx context to work with - * \param[in] table table name - * \param[out] key_names one-dimensional index names array - * \param[out] column_names two-dimensional column names array - * - * \return 0 if OK, nonzero on error - */ -int glite_lbu_QueryIndices(glite_lbu_DBContext ctx, const char *table, char ***key_names, char ****column_names); - - -/** - * Convert time_t into database-specific time string. - * - * The result string can be used directly in SQL commands. - * - * \param[in] t the converted time - * \param[out] str result allocated string - */ -void glite_lbu_TimeToDB(time_t t, char **str); - - -/** - * Convert database-specific time string to time_t. - * - * String is expected in database for (ISO format). - * - * \param[in] str the converted string - * \return result time - */ -time_t glite_lbu_DBToTime(const char *str); - - -/** - * Init data structure for buffered insert - * - * takes table_name and columns string for future multirow insert - * when insert string oversize size_limit or number of rows to be inserted - * overcome record_limit, the real insert is triggered - */ -int glite_lbu_bufferedInsertInit(glite_lbu_DBContext ctx, glite_lbu_bufInsert *bi, void *mysql, const char *table_name, long size_limit, long record_limit, const char * columns); - - -/** - * adds row of n values into n columns into an insert buffer - * if num. of rows or size of data oversteps the limits, real - * multi-row insert is done - */ -int glite_lbu_bufferedInsert(glite_lbu_bufInsert bi, const char *row); - - -/** - * Flush buffered data and free bi structure. - */ -int glite_lbu_bufferedInsertClose(glite_lbu_bufInsert bi); - - -/** - * Prepare the SQL statement. Use glite_lbu_FreeStmt() to free it. - * - * \param[in,out] ctx context to work with - * \param[in] sql SQL command - * \param[out] stmt returned SQL statement - * - * \return error code - */ -int glite_lbu_PrepareStmt(glite_lbu_DBContext ctx, const char *sql, glite_lbu_Statement *stmt); - - -/** - * Execute prepared SQL statement. - * - * \param[in,out] stmt SQL statement - * \param[in] n number of items - * - * Variable parameters (n-times): - * - * always: - * - * \param type DB item type - * - * then one of them: - * - * \param GLITE_LBU_DB_TYPE_TINYINT int c - * \param GLITE_LBU_DB_TYPE_INT long int i - * \param GLITE_LBU_DB_TYPE_...BLOB/TEXT void *b, unsigned long len - * \param GLITE_LBU_DB_TYPE_[VAR]CHAR char *str - * \param GLITE_LBU_DB_TYPE_DATE/TIME/DATETIME time_t t - * \param GLITE_LBU_DB_TYPE_TIMESTAMP time_t t - * \param GLITE_LBU_DB_TYPE_NULL - - * - * \return number of affected rows, -1 on error - */ -int glite_lbu_ExecStmt(glite_lbu_Statement stmt, int n, ...); - - -/** - * @} database group - */ - - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/org.glite.lb-utils.db/project/build.number b/org.glite.lb-utils.db/project/build.number deleted file mode 100644 index 5cfec85..0000000 --- a/org.glite.lb-utils.db/project/build.number +++ /dev/null @@ -1 +0,0 @@ -module.build = 0 diff --git a/org.glite.lb-utils.db/project/build.properties b/org.glite.lb-utils.db/project/build.properties deleted file mode 100755 index 1df02e3..0000000 --- a/org.glite.lb-utils.db/project/build.properties +++ /dev/null @@ -1,3 +0,0 @@ -lb-utils.subsystem.name = org.glite.lb-utils -lb-utils.subsystem.prefix = lb-utils - diff --git a/org.glite.lb-utils.db/project/configure.properties.xml b/org.glite.lb-utils.db/project/configure.properties.xml deleted file mode 100644 index 276b497..0000000 --- a/org.glite.lb-utils.db/project/configure.properties.xml +++ /dev/null @@ -1,81 +0,0 @@ - - - - - - - - - -top_srcdir=.. -builddir=build -stagedir=${stage.abs.dir} -distdir=${dist.dir} -globalprefix=${global.prefix} -lbutilsprefix=${subsystem.prefix} -package=${module.package.name} -PREFIX=${install.dir} -flavour=${with.globus.thr.flavor} - -glite_location=${with.glite.location} -mysql_prefix=${with.mysql.prefix} -mysql_version=${ext.mysql.version} -cppunit_prefix=${with.cppunit.prefix} - - -PROJECT_NAME = "Glite LB/JP Utils: Database Module" -PROJECT_NUMBER = ${module.version} -OUTPUT_DIRECTORY = ${component.dir}/doc/C -OPTIMIZE_OUTPUT_FOR_C = YES -INPUT = ../interface/db.h -SHOW_DIRECTORIES = NO -FULL_PATH_NAMES = NO -EXTRACT_ALL = YES -PDF_HYPERLINKS = YES -USE_PDFLATEX = YES -MACRO_EXPANSION = YES -EXPAND_ONLY_PREDEF = YES -#PREDEFINED = _EDG_WLL_EVENT_COMMON -HAVE_DOT = NO - - - - diff --git a/org.glite.lb-utils.db/project/properties.xml b/org.glite.lb-utils.db/project/properties.xml deleted file mode 100644 index d01c359..0000000 --- a/org.glite.lb-utils.db/project/properties.xml +++ /dev/null @@ -1,73 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/org.glite.lb-utils.db/project/tar_exclude b/org.glite.lb-utils.db/project/tar_exclude deleted file mode 100644 index e1fcd1a..0000000 --- a/org.glite.lb-utils.db/project/tar_exclude +++ /dev/null @@ -1,10 +0,0 @@ -tar_exclude -CVS -build.xml -build -build.properties -properties.xml -configure.properties.xml -.cvsignore -.project -.cdtproject diff --git a/org.glite.lb-utils.db/project/version.properties b/org.glite.lb-utils.db/project/version.properties deleted file mode 100755 index 6f1f8ab..0000000 --- a/org.glite.lb-utils.db/project/version.properties +++ /dev/null @@ -1,2 +0,0 @@ -module.version = 0.0.0 -module.age = 0 \ No newline at end of file diff --git a/org.glite.lb-utils.db/src/db.c b/org.glite.lb-utils.db/src/db.c deleted file mode 100644 index ba54dfb..0000000 --- a/org.glite.lb-utils.db/src/db.c +++ /dev/null @@ -1,1038 +0,0 @@ -#ident "$Header$" - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include - -#include "glite/lb-utils/trio.h" -#include "db.h" - - -#define GLITE_LBU_MYSQL_INDEX_VERSION 40001 -#define GLITE_LBU_MYSQL_PREPARED_VERSION 40102 -#define BUF_INSERT_ROW_ALLOC_BLOCK 1000 -#ifndef GLITE_LBU_DEFAULT_RESULT_BUFFER_LENGTH -#define GLITE_LBU_DEFAULT_RESULT_BUFFER_LENGTH 256 -#endif - - -#define CLR_ERR(CTX) lbu_clrerr((CTX)) -#define ERR(CTX, CODE, DESC) lbu_err((CTX), (CODE), (DESC), __FUNCTION__, __LINE__) -#define STATUS(CTX) ((CTX)->err.code) -#define MY_ERR(CTX) myerr((CTX), __FUNCTION__, __LINE__) -#define MY_ERRSTMT(STMT) myerrstmt((STMT), __FUNCTION__, __LINE__) -#define MY_ISOKSTMT(STMT, RETRY) myisokstmt((STMT), __FUNCTION__, __LINE__, (RETRY)) - -#define USE_TRANS(CTX) ((CTX->caps & GLITE_LBU_DB_CAP_TRANSACTIONS) != 0) - - - -struct glite_lbu_DBContext_s { - MYSQL *mysql; - const char *cs; - int have_caps; - int caps; - struct { - int code; - char *desc; - } err; -}; - - -struct glite_lbu_Statement_s { - glite_lbu_DBContext ctx; - - /* for simple commands */ - MYSQL_RES *result; - - /* for prepared commands */ - MYSQL_STMT *stmt; - unsigned long nrfields; -}; - - -struct glite_lbu_bufInsert_s { - glite_lbu_DBContext ctx; - char *table_name; - char *columns; /* names of columns to be inserted into - * (values separated with commas) */ - char **rows; /* each row hold string of one row to be inserted - * (values separated with commas) */ - long rec_num, /* actual number of rows in structure */ - rec_size; /* approx. size of a real insert string */ - long size_limit, /* size and # of records limit which trigger */ - record_limit; /* real insert; zero means unlimitted */ -}; - - -/* - * mapping glite DB types to mysql types - */ -int glite_type_to_mysql[] = { - MYSQL_TYPE_NULL, - MYSQL_TYPE_TINY, - MYSQL_TYPE_LONG, - MYSQL_TYPE_TINY_BLOB, - MYSQL_TYPE_TINY_BLOB, - MYSQL_TYPE_BLOB, - MYSQL_TYPE_BLOB, - MYSQL_TYPE_MEDIUM_BLOB, - MYSQL_TYPE_MEDIUM_BLOB, - MYSQL_TYPE_LONG_BLOB, - MYSQL_TYPE_LONG_BLOB, - MYSQL_TYPE_VAR_STRING, - MYSQL_TYPE_STRING, - MYSQL_TYPE_DATE, - MYSQL_TYPE_TIME, - MYSQL_TYPE_DATETIME, - MYSQL_TYPE_TIMESTAMP, -}; - - - -static int lbu_clrerr(glite_lbu_DBContext ctx); -static int lbu_err(glite_lbu_DBContext ctx, int code, const char *desc, const char *func, int line); -static int myerr(glite_lbu_DBContext ctx, const char *source, int line); -static int myerrstmt(glite_lbu_Statement stmt, const char *source, int line); -static int myisokstmt(glite_lbu_Statement stmt, const char *source, int line, int *retry); -static int db_connect(glite_lbu_DBContext ctx, const char *cs, MYSQL **mysql); -static void db_close(MYSQL *mysql); -static int transaction_test(glite_lbu_DBContext ctx, MYSQL *m2, int *have_transactions); -static int FetchRowSimple(glite_lbu_DBContext ctx, MYSQL_RES *result, unsigned long *lengths, char **results); -static int FetchRowPrepared(glite_lbu_DBContext ctx, glite_lbu_Statement stmt, unsigned int n, unsigned long *lengths, char **results); -void set_time(MYSQL_TIME *mtime, const time_t time); -time_t get_time(const MYSQL_TIME *mtime); - - -/* ---- common ---- */ - - -int glite_lbu_DBError(glite_lbu_DBContext ctx, char **text, char **desc) { - if (text) *text = strdup(strerror(ctx->err.code)); - if (desc) { - if (ctx->err.desc) *desc = strdup(ctx->err.desc); - else *desc = NULL; - } - - return ctx->err.code; -} - - -int glite_lbu_InitDBContext(glite_lbu_DBContext *ctx) { - *ctx = calloc(1, sizeof **ctx); - return *ctx == NULL ? ENOMEM : 0; -} - - -void glite_lbu_FreeDBContext(glite_lbu_DBContext ctx) { - if (ctx) { - assert(ctx->mysql == NULL); - free(ctx->err.desc); - free(ctx); - } -} - - -int glite_lbu_DBConnect(glite_lbu_DBContext ctx, const char *cs) { - if (db_connect(ctx, cs, &ctx->mysql) != 0) return STATUS(ctx); - return 0; -} - - -void glite_lbu_DBClose(glite_lbu_DBContext ctx) { - db_close(ctx->mysql); - ctx->mysql = NULL; -} - - -int glite_lbu_DBQueryCaps(glite_lbu_DBContext ctx) { - MYSQL *m = ctx->mysql; - MYSQL *m2; - int major,minor,sub,version,caps,have_transactions=0; - const char *ver_s; - - if (ctx->have_caps) return ctx->caps; - - caps = 0; - - ver_s = mysql_get_server_info(m); - if (!ver_s || 3 != sscanf(ver_s,"%d.%d.%d",&major,&minor,&sub)) - return ERR(ctx, EINVAL, "problem retreiving MySQL version"); - version = 10000*major + 100*minor + sub; - - if (version >= GLITE_LBU_MYSQL_INDEX_VERSION) caps |= GLITE_LBU_DB_CAP_INDEX; - if (version >= GLITE_LBU_MYSQL_PREPARED_VERSION) caps |= GLITE_LBU_DB_CAP_PREPARED; - - CLR_ERR(ctx); - - if (db_connect(ctx, ctx->cs, &m2) == 0) { - transaction_test(ctx, m2, &have_transactions); - db_close(m2); - } - if (have_transactions) caps |= GLITE_LBU_DB_CAP_TRANSACTIONS; - - if (STATUS(ctx) == 0) { - ctx->have_caps = 1; - return caps; - } else return -1; -} - - -void glite_lbu_DBSetCaps(glite_lbu_DBContext ctx, int caps) { - ctx->caps = caps; -} - - -int glite_lbu_Transaction(glite_lbu_DBContext ctx) { - if (USE_TRANS(ctx)) { - if (glite_lbu_ExecSQL(ctx, "SET AUTOCOMMIT=0", NULL) < 0) goto err; - if (glite_lbu_ExecSQL(ctx, "BEGIN", NULL) < 0) goto err; - } -err: - return STATUS(ctx); -} - - -int glite_lbu_Commit(glite_lbu_DBContext ctx) { - if (USE_TRANS(ctx)) { - if (glite_lbu_ExecSQL(ctx, "COMMIT", NULL) < 0) goto err; - if (glite_lbu_ExecSQL(ctx, "SET AUTOCOMMIT=1", NULL) < 0) goto err; - } -err: - return STATUS(ctx); -} - - -int glite_lbu_Rollback(glite_lbu_DBContext ctx) { - if (USE_TRANS(ctx)) { - if (glite_lbu_ExecSQL(ctx, "ROLLBACK", NULL) < 0) goto err; - if (glite_lbu_ExecSQL(ctx, "SET AUTOCOMMIT=1", NULL) < 0) goto err; - } -err: - return STATUS(ctx); -} - - -int glite_lbu_FetchRow(glite_lbu_Statement stmt, unsigned int n, unsigned long *lengths, char **results) { - memset(results, 0, n * sizeof(*results)); - if (stmt->result) return FetchRowSimple(stmt->ctx, stmt->result, lengths, results); - else return FetchRowPrepared(stmt->ctx, stmt, n, lengths, results); -} - - -void glite_lbu_FreeStmt(glite_lbu_Statement *stmt) { - if (*stmt) { - if ((*stmt)->result) mysql_free_result((*stmt)->result); - if ((*stmt)->stmt) mysql_stmt_close((*stmt)->stmt); - free(*stmt); - *stmt = NULL; - } -} - - -int glite_lbu_QueryIndices(glite_lbu_DBContext ctx, const char *table, char ***key_names, char ****column_names) { - glite_lbu_Statement stmt = NULL; - - int i,j,ret; - -/* XXX: "show index from" columns. Matches at least MySQL 4.0.11 */ - char *showcol[12]; - int Key_name,Seq_in_index,Column_name,Sub_part; - - char **keys = NULL; - int *cols = NULL; - char **col_names = NULL; - - int nkeys = 0; - - char ***idx = NULL; - - Key_name = Seq_in_index = Column_name = Sub_part = -1; - - if (glite_lbu_ExecSQL(ctx,"show index from states",&stmt)<0) - return STATUS(ctx); - - while ((ret = glite_lbu_FetchRow(stmt,sizeof(showcol)/sizeof(showcol[0]),NULL,showcol)) > 0) { - assert(ret <= sizeof showcol/sizeof showcol[0]); - - if (!col_names) { - col_names = malloc(ret * sizeof col_names[0]); - glite_lbu_QueryColumns(stmt,col_names); - for (i=0; i= 0 && Seq_in_index >= 0 && - Column_name >= 0 && Sub_part >= 0); - - } - - for (i=0; imysql, cmd)) { - /* error occured */ - switch (merr = mysql_errno(ctx->mysql)) { - case 0: - break; - case ER_DUP_ENTRY: - ERR(ctx, EEXIST, mysql_error(ctx->mysql)); - return -1; - break; - case CR_SERVER_LOST: - if (retry_nr <= 0) - do_reconnect = 1; - break; - default: - MY_ERR(ctx); - return -1; - break; - } - } - retry_nr++; - } - - if (stmt) { - *stmt = calloc(1, sizeof(**stmt)); - if (!*stmt) { - ERR(ctx, ENOMEM, NULL); - return -1; - } - (**stmt).ctx = ctx; - (**stmt).result = mysql_store_result(ctx->mysql); - if (!(**stmt).result) { - if (mysql_errno(ctx->mysql)) { - MY_ERR(ctx); - *stmt = NULL; - return -1; - } - } - } else { - MYSQL_RES *r = mysql_store_result(ctx->mysql); - mysql_free_result(r); - } -#ifdef LBS_DB_PROFILE - pid = getpid(); - gettimeofday(&end,NULL); - end.tv_usec -= start.tv_usec; - end.tv_sec -= start.tv_sec; - if (end.tv_usec < 0) { end.tv_sec--; end.tv_usec += 1000000; } - - sum.tv_usec += end.tv_usec; - sum.tv_sec += end.tv_sec + sum.tv_usec / 1000000; - sum.tv_usec -= 1000000 * (sum.tv_usec / 1000000); - fprintf(stderr,"[%d] %s\n[%d] %3ld.%06ld (sum: %3ld.%06ld)\n",pid,txt,pid,end.tv_sec,end.tv_usec,sum.tv_sec,sum.tv_usec); -#endif - - return mysql_affected_rows(ctx->mysql); -} - - -int glite_lbu_QueryColumns(glite_lbu_Statement stmt, char **cols) -{ - int i = 0; - MYSQL_FIELD *f; - - if (!stmt->result) return ERR(stmt->ctx, EINVAL, "QueryColumns implemented only for simple API"); - while ((f = mysql_fetch_field(stmt->result))) cols[i++] = f->name; - return i == 0; -} - - -void glite_lbu_TimeToDB(time_t t, char **str) { - struct tm *tm = gmtime(&t); - - asprintf(str,"'%4d-%02d-%02d %02d:%02d:%02d'",tm->tm_year+1900,tm->tm_mon+1, - tm->tm_mday,tm->tm_hour,tm->tm_min,tm->tm_sec); -} - - -time_t glite_lbu_DBToTime(const char *str) { - struct tm tm; - - memset(&tm,0,sizeof(tm)); - setenv("TZ","UTC",1); tzset(); - sscanf(str,"%4d-%02d-%02d %02d:%02d:%02d", - &tm.tm_year,&tm.tm_mon,&tm.tm_mday, - &tm.tm_hour,&tm.tm_min,&tm.tm_sec); - tm.tm_year -= 1900; - tm.tm_mon--; - - return mktime(&tm); -} - -/* ---- prepared --- */ - -int glite_lbu_PrepareStmt(glite_lbu_DBContext ctx, const char *sql, glite_lbu_Statement *stmt) { - int ret, retry; - MYSQL_RES *meta; - - // init - *stmt = calloc(1, sizeof(**stmt)); - (*stmt)->ctx = ctx; - - // create the SQL command - if (((*stmt)->stmt = mysql_stmt_init(ctx->mysql)) == NULL) - return MY_ERRSTMT(*stmt); - - // prepare the SQL command - retry = 1; - do { - mysql_stmt_prepare((*stmt)->stmt, sql, strlen(sql)); - ret = MY_ISOKSTMT(*stmt, &retry); - } while (ret == 0); - if (ret == -1) goto failed; - - // number of fields (0 for no results) - if ((meta = mysql_stmt_result_metadata((*stmt)->stmt)) != NULL) { - (*stmt)->nrfields = mysql_num_fields(meta); - mysql_free_result(meta); - } else - (*stmt)->nrfields = 0; - - return CLR_ERR(ctx); - -failed: - glite_lbu_FreeStmt(stmt); - return STATUS(ctx); -} - - -int glite_lbu_ExecStmt(glite_lbu_Statement stmt, int n, ...) { - int i; - va_list ap; - glite_lbu_DBType type; - char *pchar; - long int *plint; - MYSQL_TIME *ptime; - glite_lbu_DBContext ctx; - int ret, retry; - MYSQL_BIND *binds = NULL; - void **data = NULL; - unsigned long *lens; - - // gather parameters - if (n) { - binds = calloc(n, sizeof(MYSQL_BIND)); - data = calloc(n, sizeof(void *)); - lens = calloc(n, sizeof(unsigned long *)); - } - va_start(ap, n); - for (i = 0; i < n; i++) { - type = va_arg(ap, glite_lbu_DBType); - switch (type) { - case GLITE_LBU_DB_TYPE_TINYINT: - pchar = binds[i].buffer = data[i] = malloc(sizeof(char)); - *pchar = va_arg(ap, int); - break; - - case GLITE_LBU_DB_TYPE_INT: - plint = binds[i].buffer = data[i] = malloc(sizeof(long int)); - *plint = va_arg(ap, long int); - break; - - case GLITE_LBU_DB_TYPE_TINYBLOB: - case GLITE_LBU_DB_TYPE_TINYTEXT: - case GLITE_LBU_DB_TYPE_BLOB: - case GLITE_LBU_DB_TYPE_TEXT: - case GLITE_LBU_DB_TYPE_MEDIUMBLOB: - case GLITE_LBU_DB_TYPE_MEDIUMTEXT: - case GLITE_LBU_DB_TYPE_LONGBLOB: - case GLITE_LBU_DB_TYPE_LONGTEXT: - binds[i].buffer = va_arg(ap, void *); - binds[i].length = &lens[i]; - lens[i] = va_arg(ap, unsigned long); - break; - - case GLITE_LBU_DB_TYPE_VARCHAR: - case GLITE_LBU_DB_TYPE_CHAR: - binds[i].buffer = va_arg(ap, char *); - binds[i].length = &lens[i]; - lens[i] = binds[i].buffer ? strlen((char *)binds[i].buffer) : 0; - break; - - case GLITE_LBU_DB_TYPE_DATE: - case GLITE_LBU_DB_TYPE_TIME: - case GLITE_LBU_DB_TYPE_DATETIME: - case GLITE_LBU_DB_TYPE_TIMESTAMP: - ptime = binds[i].buffer = data[i] = malloc(sizeof(MYSQL_TIME)); - set_time(ptime, va_arg(ap, time_t)); - break; - - case GLITE_LBU_DB_TYPE_NULL: - break; - - default: - assert("unimplemented parameter assign" == NULL); - break; - } - binds[i].buffer_type = glite_type_to_mysql[type]; - } - va_end(ap); - - // bind parameters - if (mysql_stmt_bind_param(stmt->stmt, binds) != 0) { - MY_ERRSTMT(stmt); - goto failed; - } - - // run - ctx = stmt->ctx; - retry = 1; - do { - mysql_stmt_execute(stmt->stmt); - ret = MY_ISOKSTMT(stmt, &retry); - } while (ret == 0); - if (ret == -1) goto failed; - - // result - retry = 1; - do { - mysql_stmt_store_result(stmt->stmt); - ret = MY_ISOKSTMT(stmt, &retry); - } while (ret == 0); - if (ret == -1) goto failed; - - // free params - for (i = 0; i < n; i++) free(data[i]); - free(data); - free(binds); - free(lens); - CLR_ERR(ctx); - return mysql_stmt_affected_rows(stmt->stmt); - -failed: - for (i = 0; i < n; i++) free(data[i]); - free(data); - free(binds); - free(lens); - return -1; -} - - -int glite_lbu_bufferedInsertInit(glite_lbu_DBContext ctx, glite_lbu_bufInsert *bi, void *mysql, const char *table_name, long size_limit, long record_limit, const char *columns) -{ - *bi = calloc(1, sizeof(*bi)); - (*bi)->ctx = ctx; - (*bi)->table_name = strdup(table_name); - (*bi)->columns = strdup(columns); - (*bi)->rec_num = 0; - (*bi)->rec_size = 0; - (*bi)->rows = calloc(record_limit, sizeof(*((*bi)->rows)) ); - (*bi)->size_limit = size_limit; - (*bi)->record_limit = record_limit; - - return CLR_ERR(ctx); -} - - -static int flush_bufferd_insert(glite_lbu_bufInsert bi) -{ - char *stmt, *vals, *temp; - long i; - - - if (!bi->rec_num) - return STATUS(bi->ctx); - - asprintf(&vals,"(%s)", bi->rows[0]); - for (i=1; i < bi->rec_num; i++) { - // XXX: use string add (preallocated memory) - asprintf(&temp,"%s,(%s)", vals, bi->rows[i]); - free(vals); vals = temp; temp = NULL; - free(bi->rows[i]); - bi->rows[i] = NULL; - } - - trio_asprintf(&stmt, "insert into %|Ss(%|Ss) values %s;", - bi->table_name, bi->columns, vals); - - if (glite_lbu_ExecSQL(bi->ctx,stmt,NULL) < 0) { - if (STATUS(bi->ctx) == EEXIST) - CLR_ERR(bi->ctx); - } - - /* reset bi counters */ - bi->rec_size = 0; - bi->rec_num = 0; - - free(vals); - free(stmt); - - return STATUS(bi->ctx); -} - - -int glite_lbu_bufferedInsert(glite_lbu_bufInsert bi, const char *row) -{ - bi->rows[bi->rec_num++] = strdup(row); - bi->rec_size += strlen(row); - - if ((bi->size_limit && bi->rec_size >= bi->size_limit) || - (bi->record_limit && bi->rec_num >= bi->record_limit)) - { - if (flush_bufferd_insert(bi)) - return STATUS(bi->ctx); - } - - return CLR_ERR(bi->ctx); -} - - -static void free_buffered_insert(glite_lbu_bufInsert bi) { - long i; - - free(bi->table_name); - free(bi->columns); - for (i=0; i < bi->rec_num; i++) { - free(bi->rows[i]); - } - free(bi->rows); -} - - -int glite_lbu_bufferedInsertClose(glite_lbu_bufInsert bi) -{ - if (flush_bufferd_insert(bi)) - return STATUS(bi->ctx); - free_buffered_insert(bi); - - return CLR_ERR(bi->ctx); -} - - -/* - * helping compatibility function: clear error from the context - */ -static int lbu_clrerr(glite_lbu_DBContext ctx) { - ctx->err.code = 0; - if (ctx->err.desc) { - free(ctx->err.desc); - ctx->err.desc = NULL; - } - return 0; -} - - -/* - * helping compatibility function: sets error on the context - */ -static int lbu_err(glite_lbu_DBContext ctx, int code, const char *desc, const char *func, int line) { - if (code) { - ctx->err.code = code; - free(ctx->err.desc); - ctx->err.desc = desc ? strdup(desc) : NULL; - fprintf(stderr, "[db] %s:%d %s\n", func, line, desc); - return code; - } else - return ctx->err.code; -} - - -/* - * helping function: find oud mysql error and sets on the context - */ -static int myerr(glite_lbu_DBContext ctx, const char *source, int line) { - return lbu_err(ctx, EIO, mysql_error(ctx->mysql), source, line); -} - - -/* - * helping function: find oud mysql stmt error and sets on the context - */ -static int myerrstmt(glite_lbu_Statement stmt, const char *source, int line) { - return lbu_err(stmt->ctx, EIO, mysql_stmt_error(stmt->stmt), source, line); -} - - -/* - * Ehelping function: error handle - * - * \return -1 failed - * \return 0 retry - * \return 1 OK - */ -static int myisokstmt(glite_lbu_Statement stmt, const char *source, int line, int *retry) { - switch (mysql_stmt_errno(stmt->stmt)) { - case 0: - return 1; - break; - case ER_DUP_ENTRY: - lbu_err(stmt->ctx, EEXIST, mysql_stmt_error(stmt->stmt), source, line); - return -1; - break; - case CR_SERVER_LOST: - if (*retry > 0) { - (*retry)--; - return 0; - } else - return -1; - break; - default: - myerrstmt(stmt, source, line); - return -1; - break; - } -} - - -/* - * mysql connect - */ -static int db_connect(glite_lbu_DBContext ctx, const char *cs, MYSQL **mysql) { - char *buf = NULL; - char *host,*user,*pw,*db; - char *slash,*at,*colon; - int ret; - - // needed for SQL result parameters - assert(sizeof(int) >= sizeof(my_bool)); - - if (!cs) return ERR(ctx, EINVAL, "connect string not specified"); - - if (!(*mysql = mysql_init(NULL))) return ERR(ctx, ENOMEM, NULL); - - mysql_options(*mysql, MYSQL_READ_DEFAULT_FILE, "my"); - - host = user = pw = db = NULL; - - buf = strdup(cs); - slash = strchr(buf,'/'); - at = strrchr(buf,'@'); - colon = strrchr(buf,':'); - - if (!slash || !at || !colon) { - free(buf); - db_close(*mysql); - *mysql = NULL; - return ERR(ctx, EINVAL, "Invalid DB connect string"); - } - - *slash = *at = *colon = 0; - host = at+1; - user = buf; - pw = slash+1; - db = colon+1; - - /* ljocha: CLIENT_FOUND_ROWS added to make authorization check - * working in update_notif(). - * Hope it does not break anything else */ - if (!mysql_real_connect(*mysql,host,user,pw,db,0,NULL,CLIENT_FOUND_ROWS)) { - free(buf); - ret = MY_ERR(ctx); - glite_lbu_DBClose(ctx); - return ret; - } - free(buf); - - ctx->cs = cs; - return 0; -} - - -/* - * mysql close - */ -static void db_close(MYSQL *mysql) { - if (mysql) mysql_close(mysql); -} - - -/* - * test transactions capability: - * - * 1) with connection 1 create testing table test - * 2) with connection 1 insert a value - * 3) with connection 2 look for a value, transactions are for no error and - * no items found - * 4) with connection 1 commit and drop the table - */ -static int transaction_test(glite_lbu_DBContext ctx, MYSQL *m2, int *have_transactions) { - MYSQL *m1; - char *desc, *cmd_create, *cmd_insert, *cmd_select, *cmd_drop; - int retval; - int err; - pid_t pid; - - ctx->caps |= GLITE_LBU_DB_CAP_TRANSACTIONS; - pid = getpid(); - *have_transactions = 0; - - asprintf(&cmd_create, "CREATE TABLE test%d (item INT)", pid); - asprintf(&cmd_insert, "INSERT INTO test%d (item) VALUES (1)", pid); - asprintf(&cmd_select, "SELECT item FROM test%d", pid); - asprintf(&cmd_drop, "DROP TABLE test%d", pid); - - m1 = ctx->mysql; - glite_lbu_ExecSQL(ctx, cmd_drop, NULL); - if (glite_lbu_ExecSQL(ctx, cmd_create, NULL) != 0) goto err1; - if (glite_lbu_Transaction(ctx) != 0) goto err2; - if (glite_lbu_ExecSQL(ctx, cmd_insert, NULL) != 1) goto err2; - - ctx->mysql = m2; - if ((retval = glite_lbu_ExecSQL(ctx, cmd_select, NULL)) == -1) goto err2; - - ctx->mysql = m1; - if (glite_lbu_Commit(ctx) != 0) goto err2; - if (glite_lbu_ExecSQL(ctx, cmd_drop, NULL) != 0) goto err1; - -#ifdef LBS_DB_PROFILE - fprintf(stderr, "[%d] use_transactions = %d\n", getpid(), USE_TRANS(ctx)); -#endif - - *have_transactions = retval == 0; - goto ok; -err2: - err = ctx->err.code; - desc = ctx->err.desc; - glite_lbu_ExecSQL(ctx, cmd_drop, NULL); - ctx->err.code = err; - ctx->err.desc = desc; -err1: -ok: - free(cmd_create); - free(cmd_insert); - free(cmd_select); - free(cmd_drop); - return STATUS(ctx); -} - - -/* - * simple version of the fetch - */ -static int FetchRowSimple(glite_lbu_DBContext ctx, MYSQL_RES *result, unsigned long *lengths, char **results) { - MYSQL_ROW row; - int nr, i; - unsigned long *len; - - CLR_ERR(ctx); - - if (!(row = mysql_fetch_row(result))) { - if (mysql_errno((MYSQL *) ctx->mysql)) { - MY_ERR(ctx); - return -1; - } else return 0; - } - - nr = mysql_num_fields(result); - len = mysql_fetch_lengths(result); - for (i=0; inrfields) { - ERR(ctx, EINVAL, "bad number of result fields"); - return -1; - } - - // space for results - if (n) binds = calloc(n, sizeof(MYSQL_BIND)); - if (!lengths) { - lens = calloc(n, sizeof(unsigned long)); - lengths = lens; - } - for (i = 0; i < n; i++) { - binds[i].buffer_type = MYSQL_TYPE_VAR_STRING; - binds[i].buffer_length = GLITE_LBU_DEFAULT_RESULT_BUFFER_LENGTH - 1; - binds[i].length = &lengths[i]; - binds[i].buffer = results[i] = calloc(1, GLITE_LBU_DEFAULT_RESULT_BUFFER_LENGTH); - } - if (mysql_stmt_bind_result(stmt->stmt, binds) != 0) goto failedstmt; - - // fetch data, all can be truncated - retry = 1; - do { - switch(mysql_stmt_fetch(stmt->stmt)) { -#ifdef MYSQL_DATA_TRUNCATED - case MYSQL_DATA_TRUNCATED: -#endif - case 0: - ret = 1; break; - case 1: ret = MY_ISOKSTMT(stmt, &retry); break; - case MYSQL_NO_DATA: ret = 0; goto quit; /* it's OK */ - default: ERR(ctx, EIO, "other fetch error"); goto failed; - } - } while (ret == 0); - if (ret == -1) goto failed; - - // check if all fileds had enough buffer space - for (i = 0; i < n; i++) { - // fetch the rest if needed - if (lengths[i] > binds[i].buffer_length) { - unsigned int fetched; - - fetched = binds[i].buffer_length; - if ((results[i] = realloc(results[i], lengths[i] + 1)) == NULL) { - ERR(ctx, ENOMEM, "insufficient memory for field data"); - goto failed; - } - results[i][lengths[i]] = '\000'; - binds[i].buffer = results[i] + fetched; - binds[i].buffer_length = lengths[i] - fetched; - - retry = 1; - do { - switch (mysql_stmt_fetch_column(stmt->stmt, binds + i, i, fetched)) { - case 0: ret = 1; break; - case 1: ret = MY_ISOKSTMT(stmt, &retry); break; - case MYSQL_NO_DATA: ret = 0; goto quit; /* it's OK */ - default: ERR(ctx, EIO, "other fetch error"); goto failed; - } - } while (ret == 0); - if (ret == -1) goto failed; - } - } - - CLR_ERR(ctx); - free(binds); - free(lens); - return n; - -failedstmt: - MY_ERRSTMT(stmt); -failed: - ret = -1; -quit: - free(binds); - free(lens); - for (i = 0; i < n; i++) { - free(results[i]); - results[i] = NULL; - } - return ret; -} - - -void set_time(MYSQL_TIME *mtime, const time_t time) { - struct tm tm; - - gmtime_r(&time, &tm); - memset(mtime, 0, sizeof *mtime); - mtime->year = tm.tm_year + 1900; - mtime->month = tm.tm_mon + 1; - mtime->day = tm.tm_mday; - mtime->hour = tm.tm_hour; - mtime->minute = tm.tm_min; - mtime->second = tm.tm_sec; -} - - -time_t get_time(const MYSQL_TIME *mtime) { - struct tm tm; - - memset(&tm, 0, sizeof(tm)); - setenv("TZ","UTC",1); tzset(); - tm.tm_year = mtime->year - 1900; - tm.tm_mon = mtime->month - 1; - tm.tm_mday = mtime->day; - tm.tm_hour = mtime->hour; - tm.tm_min = mtime->minute; - tm.tm_sec = mtime->second; - - return mktime(&tm); -} diff --git a/org.glite.lb-utils.jobid/.cvsignore b/org.glite.lb-utils.jobid/.cvsignore deleted file mode 100755 index 1df717b..0000000 --- a/org.glite.lb-utils.jobid/.cvsignore +++ /dev/null @@ -1,2 +0,0 @@ -.project -.cdtproject \ No newline at end of file diff --git a/org.glite.lb-utils.jobid/LICENSE b/org.glite.lb-utils.jobid/LICENSE deleted file mode 100755 index 01b973b..0000000 --- a/org.glite.lb-utils.jobid/LICENSE +++ /dev/null @@ -1,69 +0,0 @@ -LICENSE file for EGEE Middleware -================================ - -Copyright (c) 2004 on behalf of the EU EGEE Project: -The European Organization for Nuclear Research (CERN), -Istituto Nazionale di Fisica Nucleare (INFN), Italy -Datamat Spa, Italy -Centre National de la Recherche Scientifique (CNRS), France -CS Systeme d'Information (CSSI), France -Royal Institute of Technology, Center for Parallel Computers (KTH-PDC), Sweden -Universiteit van Amsterdam (UvA), Netherlands -University of Helsinki (UH.HIP), Finlan -University of Bergen (UiB), Norway -Council for the Central Laboratory of the Research Councils (CCLRC), United Kingdom - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - -1. Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - -2. Redistributions in binary form must reproduce the above copyright -notice, this list of conditions and the following disclaimer in the -documentation and/or other materials provided with the distribution. - -3. The end-user documentation included with the redistribution, if -any, must include the following acknowledgment: "This product includes -software developed by The EU EGEE Project (http://cern.ch/eu-egee/)." -Alternatively, this acknowledgment may appear in the software itself, if -and wherever such third-party acknowledgments normally appear. - -4. The names EGEE and the EU EGEE Project must not be -used to endorse or promote products derived from this software without -prior written permission. For written permission, please contact -. - -5. You are under no obligation whatsoever to provide anyone with any -bug fixes, patches, or upgrades to the features, functionality or -performance of the Software ("Enhancements") that you may develop over -time; however, if you choose to provide your Enhancements to The EU -EGEE Project, or if you choose to otherwise publish or distribute your -Enhancements, in source code form without contemporaneously requiring -end users of The EU EGEE Proejct to enter into a separate written license -agreement for such Enhancements, then you hereby grant The EU EGEE Project -a non-exclusive, royalty-free perpetual license to install, use, copy, -modify, prepare derivative works, incorporate into the EGEE Middleware -or any other computer software, distribute, and sublicense your -Enhancements or derivative works thereof, in binary and source code -form (if any), whether developed by The EU EGEE Project or third parties. - -THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED -WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL PROJECT OR ITS CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR -BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE -OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN -IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -This software consists of voluntary contributions made by many -individuals on behalf of the EU EGEE Prject. For more information on The -EU EGEE Project, please see http://cern.ch/eu-egee/. For more information on -EGEE Middleware, please see http://egee-jra1.web.cern.ch/egee-jra1/ - - diff --git a/org.glite.lb-utils.jobid/Makefile b/org.glite.lb-utils.jobid/Makefile deleted file mode 100644 index 986b5e0..0000000 --- a/org.glite.lb-utils.jobid/Makefile +++ /dev/null @@ -1,98 +0,0 @@ -# Default values -top_srcdir=. -builddir=build -top_builddir=${top_srcdir}/${builddir} -stagedir=. -distdir=. -globalprefix=glite -package=glite-lb-utils-jobid -version=0.0.0 -PREFIX=/opt/glite -lbuprefix=lbu - --include Makefile.inc --include ../project/version.properties - -version=${module.version} - -VPATH=${top_srcdir}/src:${top_srcdir}/test::${top_srcdir}/doc - -CC=gcc - -DEBUG:=-g -O0 -Wall - -CFLAGS:=${DEBUG} -I${top_srcdir}/src -I${top_srcdir}/interface -I. -D_GNU_SOURCE - -COMPILE:=libtool --mode=compile ${CC} -LINK:=libtool --mode=link ${CC} -rpath ${stagedir}/lib ${LDFLAGS} -INSTALL:=libtool --mode=install install - -OBJS:=cjobid.o strmd5.o -LOBJS:=${OBJS:.o=.lo} - -HDRS:=cjobid.h strmd5.h Exception.h JobId.h JobIdExceptions.h - -STATICLIB:=libglite_lbu_jobid.a -LTLIB:=libglite_lbu_jobid.la - -default: all - -all compile: ${STATICLIB} ${LTLIB} - -# to use libtool versioning correcty, we should have: -# -# current = major + minor + offset -# revision = patch -# age = minor -# -# where offset is a sum of maximal released minor's of all previous major's -# -# version_info=-version-info `echo ${version} | cut -d. -f1,2 | tr . :` - -# counted minors: n/a -offset=0 - -version_info:=-version-info ${shell \ - perl -e '$$,=":"; @F=split "\\.","${version}"; print $$F[0]+$$F[1]+${offset},$$F[2],$$F[1]' } - -${STATICLIB}: ${OBJS} - ar crv $@ ${OBJS} - ranlib $@ - -${LTLIB}: ${OBJS} - ${LINK} ${version_info} -o $@ ${LOBJS} - -stage: compile - $(MAKE) install PREFIX=${stagedir} DOSTAGE=yes - -check: - @true - -dist: distsrc distbin - -distsrc: - mkdir -p ${top_srcdir}/${package}-${version} - cd ${top_srcdir} && GLOBIGNORE="${package}-${version}" && cp -Rf * ${package}-${version} - cd ${top_srcdir} && tar -czf ${distdir}/${package}-${version}_src.tar.gz --exclude-from=project/tar_exclude ${package}-${version} - rm -rf ${top_srcdir}/${package}-${version} - -distbin: - $(MAKE) install PREFIX=`pwd`/tmpbuilddir${stagedir} - save_dir=`pwd`; cd tmpbuilddir${stagedir} && tar -czf $$save_dir/${top_srcdir}/${distdir}/${package}-${version}_bin.tar.gz *; cd $$save_dir - rm -rf tmpbuilddir - -install: - mkdir -p ${PREFIX}/lib - mkdir -p ${PREFIX}/share/doc/${package}-${version} - ${INSTALL} -m 644 ${LTLIB} ${PREFIX}/lib - ${INSTALL} -m 644 ${top_srcdir}/LICENSE ${PREFIX}/share/doc/${package}-${version} - if [ x${DOSTAGE} = xyes ]; then \ - mkdir -p ${PREFIX}/include/${globalprefix}/${lbuprefix} ; \ - (cd ${top_srcdir}/interface && install -m 644 ${HDRS} ${PREFIX}/include/${globalprefix}/${lbuprefix}) ; \ - install -m 644 ${STATICLIB} ${PREFIX}/lib; \ - fi - -clean: - -%.o: %.c - ${COMPILE} ${CFLAGS} -c $< diff --git a/org.glite.lb-utils.jobid/build.xml b/org.glite.lb-utils.jobid/build.xml deleted file mode 100644 index e6cc422..0000000 --- a/org.glite.lb-utils.jobid/build.xml +++ /dev/null @@ -1,129 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/org.glite.lb-utils.jobid/interface/Exception.h b/org.glite.lb-utils.jobid/interface/Exception.h deleted file mode 100644 index 21a9064..0000000 --- a/org.glite.lb-utils.jobid/interface/Exception.h +++ /dev/null @@ -1,138 +0,0 @@ -#ifndef GLITE_WMS_UTILS_EXCEPTION_EXCEPTION_H -#define GLITE_WMS_UTILS_EXCEPTION_EXCEPTION_H - -/* - * Exception.h - * Copyright (c) 2001 The European Datagrid Project - IST programme, all rights reserved. - * Contributors are mentioned in the code where appropriate. - */ - -#include -#include -//#include -#include // For logging exceptions to log file -#include // list the exception codes -#include -#include -#include // base ancestor stl::exception - - -namespace glite { - namespace lb_utils { - namespace exception { - -extern pthread_mutex_t METHOD_MUTEX; // used in order to store info into a file (rather then syslog) -#define GLITE_STACK_TRY(method_name) std::string METHOD = method_name ; int LINE = __LINE__ ; try { -#define GLITE_STACK_CATCH() } catch (glite::lb_utils::exception::Exception &exc){ exc.push_back ( __FILE__ , LINE, METHOD ); throw exc ; } catch (std::exception &ex){ glite::lb_utils::exception::Exception exc( __FILE__ , LINE, METHOD, 0, "Standard exception: " + std::string(ex.what()) ); throw exc; } - -/** - * The Exception base classe contains attributes into which are placed exception information and provides - * constructor that beyond the error code take parameters specifying the source file and line number - * (e.g. through __FILE__ and __LINE__) where the error has been generated and string messages, - * allowing an easy way of storing the origin of the exception. - * Moreover it provides methods for getting all the exception information and for logging them either - * in a log file or to the syslog daemon. - * Each of the derived types may contain its private attributes describing the actual error instance in detail. - * Moreover each exception has an attribute representing the exception identifier that is set by the - * class constructor and allows the identification of the original exception. - * - * @version 0.1 - * @date 22 July 2004 - * @author Alessandro Maraschini -*/ - -class Exception : public std::exception{ - public: - /** - * Constructor Update all mandatory fields - * @param method the name of the method that raised the exception - * @param source The source that raised the exception (could be the file path, the class Name, etc etc) - * @param exc the previous exception as in the stack trace */ - Exception ( const std::string& source, const std::string& method, Exception *exc); - /** - * Constructor Update all mandatory fields - * @param code the code representing the thrown exception - * @param exception the name of the thrown exception - * @param method the name of the method that raised the exception - * @param source The source that raised the exception (could be the file path, the class Name, etc etc) */ - Exception ( const std::string& source, const std::string& method, int code, const std::string& exception); - - /** - * Constructor Update all mandatory fields - * @param source the path of the file that raised the exception - * @param line_number the number of the line in the file that raised the exception - * @param method the name of the method that raised the exception - * @param code the code representing the thrown exception - * @param exception the name of the thrown exception */ - Exception (const std::string& source, int line_number, const std::string& method, int code, const std::string& exception); - /** - * Default Destructor - */ - virtual ~Exception() throw (); - /** - * Return a string debug message containing information about Exception thrown - * Debug message contains all the attributes stored in an exception instance such as the method, the file and the line - * that threw the exception. - *@return the debug message string representation - */ - virtual std::string dbgMessage(); - /** - * Return the error code - * @return The integer representing the code of the error that generated the exception - */ - virtual int getCode(); - - /** - * return the Error Message associated to the Exception - * @return The Exception string message representation - */ - virtual const char* what() const throw (); - - /** - * Print Exception error information into a log file - * @param logfile the file where to log exception information - */ - virtual void log(const std::string& logfile = ""); - /** - * Retrieve the Exception name - * @return the name of the Exception thrown - */ - virtual std::string getExceptionName(); - - /** - * Retrieve the Stack of the exception as a list of previous generated exceptions - *@return the string representation of the stack trace: each line correspond to an exception message - */ - virtual std::string printStackTrace() ; - /** - * Return the list of methods that caused the Exception - */ - virtual std::vector getStackTrace() ; - /** - * Update stack information - */ - virtual void push_back ( const std::string& source, int line_number, const std::string& method ) ; - protected: - /** Empty constructor*/ - Exception(); - /** integer error code representing the cause of the error */ - int error_code; - /** string exception message representation*/ - std::string error_message ; - /** line number where the exception was raised */ - int line; - /** The name of the file where the exception was raised */ - std::string source_file; - /** the name of the exception */ - std::string exception_name; - /** the name of the method where the expceiton was raised */ - std::string method_name ; - /** a string representation of the stacktrace */ - std::string stack; - /** the actual internal stacktrace representation */ - std::vector< std::string> stack_strings ; - /** the name of the ancestor exception */ - std::string ancestor ; -}; //End Exception Class -}}} // Closing namespace -#endif diff --git a/org.glite.lb-utils.jobid/interface/JobId.h b/org.glite.lb-utils.jobid/interface/JobId.h deleted file mode 100644 index b99992d..0000000 --- a/org.glite.lb-utils.jobid/interface/JobId.h +++ /dev/null @@ -1,126 +0,0 @@ -#ifndef GLITE_WMSUTILS_JOBID_JOBID_H -#define GLITE_WMSUTILS_JOBID_JOBID_H - -/* - * JobId.h - * Copyright (c) 2001 The European Datagrid Project - IST programme, all rights reserved. - * - */ - -#include -#include - -#include "glite/lb-utils/cjobid.h" - -typedef struct _glite_lbu_jobid_s* glite_lbu_jobid_t; - -namespace glite { -namespace lb_utils { -namespace jobid { - -/** - * Managing Identification, checking, retreiving info from a job - * File name: JobId.h - * The JobId class provides a representation of the Datagrid job identifier - * (dg_jobId) and the methods for manipulating it. - * We remind that the format of the dg_jobId is as follows: - * :/ - * - * @ingroup common - * @version 0.1 - * @date 15 April 2002 - * @author Alessandro Maraschini */ - -class JobId { -public: - /**@name Constructors/Destructor */ - //@{ - /** Instantiates an empty JobId object */ - JobId() ; - /** - * Instantiates a JobId object from the passed dg_jobId in string format. - * @param job_id_string a string representig a classAd expression - * @throws WrongIdException When a string is passed in a wrong format - */ - JobId(const std::string& job_id_string); - JobId(const JobId&); - JobId(const glite_lbu_JobId&); - /** - * Destructor - * Destroy the Job Id instance - */ - ~JobId() ; - //@} - - /**@name Miscellaneous */ - //@{ - /** Unsets the JobId instance. Clear all it's memebers */ - void clear() ; - /** - * Check wheater the jobId has been already created (true) or not (false) - *@return true (jobId created) or false (jobId not yet created) - */ - bool isSet() { return ( m_JobId != 0 ) ; } - /** - * Set the JobId instance according to the LB and RB server addresses and the unique string passed as input parameters. - * @param lb_server Loggin and Bookkeeping server address - * @param port Loggin and Bookkeeping port ( dafault value is 9000 ) - * @param unique A Unique identification ( automatically generatad by md5 protocol ) - * @throws WrongIdException When one parameter has been passed in a wrong format */ - void setJobId(const std::string& lb_server, int port = 0, const std::string& unique = ""); - //@} - /**@name Get Methods */ - //@{ - /** @return the LB address into its string format - * @throws EmptyIdException If the jobId has not been initialised yet */ - std::string getServer() const; - /** @return the Unique string into its string format - * @throws EmptyIdException If the jobId has not been initialised yet */ - std::string getUnique() const; - //@} - /** This method sets the JobId instance from the JobId in string format given - * as input. - * @param dg_JobId the string representing the job - * @throws WrongIdException When a string is passed in a wrong format */ - void fromString ( const std::string& dg_JobId ); - /** Converts the jobId into a string - @return the string representation of a JobId*/ - std::string toString() const; - /** casting operator */ - operator const glite_lbu_JobId() const { return m_JobId; } - /** Operator "=" create a deep copy of the JobId instance*/ - JobId & operator=(JobId const &); - /** Operator "=" create a deep copy of the JobId instance*/ - JobId & operator=(const glite_lbu_JobId &); - /** Retrieve the internal id reference - *@return the JobId internal reference used by some LB methods */ - glite_lbu_JobId getId() const ; -private: - // This Variable stores the Job unique identification String - glite_lbu_JobId m_JobId; - mutable char* m_pStr; - mutable char* m_pBkserver; - mutable char* m_pUnique; - /** Operator "<"*/ - friend bool operator<(JobId const& lhs, JobId const& rhs); - /** Operator "=="*/ - friend bool operator==(JobId const& lhs, JobId const& rhs); -}; - -inline bool operator<(JobId const& lhs, JobId const& rhs) -{ - return strcmp ( lhs.m_pStr , rhs.m_pStr ) <0 ; -} - -inline bool operator==(JobId const& lhs, JobId const& rhs) -{ -return strcmp ( lhs.m_pStr , rhs.m_pStr ) ==0 ; -} - -std::ostream& operator<<(std::ostream& os, JobId const& id); - -} // namespace jobid -} // namespace lb_utils -} // namespace glite - -#endif // GLITE_WMSUTILS_JOBID_JOBID_H diff --git a/org.glite.lb-utils.jobid/interface/JobIdExceptions.h b/org.glite.lb-utils.jobid/interface/JobIdExceptions.h deleted file mode 100644 index d154adf..0000000 --- a/org.glite.lb-utils.jobid/interface/JobIdExceptions.h +++ /dev/null @@ -1,80 +0,0 @@ -#ifndef GLITE_WMSUTILS_JOBID_EXCEPTIONS_H -#define GLITE_WMSUTILS_JOBID_EXCEPTIONS_H - -/* - * JobIdExceptions.h - * Copyright (c) 2001 The European Datagrid Project - IST programme, all rights reserved. - */ - -#include "glite/lb-utils/Exception.h" - -namespace glite { -namespace lb_utils { -namespace jobid { - -/** - * JobIdException - Exception thrown by JobId Class - * @ingroup Common - * @version 0.1 - * @date 15 April 2002 - * @author Alessandro Maraschini -*/ - -class JobIdException : public glite::lb_utils::exception::Exception { -public: - /** - * Update all mandatory Exception Information - */ - JobIdException (const std::string& file, - int line, - const std::string& method, - int code, - const std::string& exception_name) ; -};//End CLass JobIdException - -/** -* WrongIdFieldException -* This Exception is thrown when a Job Id syntax error is found -* A valid Job Identification string should be made as follows: -* :/ */ -class WrongIdException : public JobIdException { -public: - /** - * Constructor - * @param file - The source file which has generated the Exception - * @param line - The line number in the source file where the Exception has been thrown - * @param method - The Name of the method which has thrown the Exception - * @param code - The Code of the Error raised - * @param field - The wrong expression catched */ - WrongIdException(const std::string& file, - int line, - const std::string& method, - int code ); -}; //End CLass WrongIdException -/** -* EmptyIdException -* This Exception is thrown when the user tries to get information from a JobId -* which has not been initialized yet, i.e tries to use the get Methods -*/ -class EmptyIdException : public JobIdException { -public: - /** - * Constructor - * @param file - The source file which has generated the Exception - * @param line - The line number in the source file where the Exception has been thrown - * @param method - The Name of the method which has thrown the Exception - * @param code - The Code of the Error raised - * @param field - The Empty filed requested for */ - EmptyIdException::EmptyIdException(const std::string& file, - int line, - const std::string& method, - int code , - const std::string& field ); -}; //End CLass EmptyIdException - -} // namespace jobid -} // namespace lb_utils -} // namespace glite - -#endif // GLITE_WMSUTILS_JOBID_EXCEPTIONS_H - diff --git a/org.glite.lb-utils.jobid/interface/cjobid.h b/org.glite.lb-utils.jobid/interface/cjobid.h deleted file mode 100755 index f802ce7..0000000 --- a/org.glite.lb-utils.jobid/interface/cjobid.h +++ /dev/null @@ -1,109 +0,0 @@ -#ifndef _GLITE_JOBID_H -#define _GLITE_JOBID_H - -/*! - * \file cjobid.h - * \brief L&B consumer API - */ - -#ident "$Header$" - -#ifdef __cplusplus -extern "C" { -#endif - -typedef struct _glite_lbu_JobId *glite_lbu_JobId; - -#define GLITE_WMSC_JOBID_DEFAULT_PORT 9000 /**< Default port where bookkeeping server listens */ -#define GLITE_WMSC_JOBID_PROTO_PREFIX "https://" /**< JobId protocol prefix */ - - -/* All the pointer functions return malloc'ed objects (or NULL on error) */ - -/** - * Create a Job ID. - * See the lb_draft document for details on its construction and components - * \param bkserver book keeping server hostname - * \param port port for the bk service - * \param jobid new created job id - * \ret al 0 success - * \retval EINVAL invalid bkserver - * \retval ENOMEM if memory allocation fails - */ -int glite_lbu_JobIdCreate(const char * bkserver, int port, glite_lbu_JobId * jobid); - -/** - * Recreate a Job ID - * \param bkserver bookkeeping server hostname - * \param port port for the bk service - * \param unique string which represent created jobid (if NULL then new - * one is created) - * \param jobid new created job id - * \retval 0 success - * \retval EINVAL invalid bkserver - * \retval ENOMEM if memory allocation fails - */ -int glite_lbu_JobIdRecreate(const char *bkserver, int port, const char * unique, glite_lbu_JobId * jobid); - -/** - * Create copy of Job ID - * \param in jobid for duplication - * \param jobid duplicated jobid - * \retval 0 for success - * \retval EINVAL invalid jobid - * \retval ENOMEM if memory allocation fails - */ -int glite_lbu_JobIdDup(const glite_lbu_JobId in, glite_lbu_JobId * jobid); - -/* - * Free jobid structure - * \param jobid for dealocation - */ -void glite_lbu_JobIdFree(glite_lbu_JobId jobid); - -/** - * Parse Job ID string and creates jobid structure - * \param jobidstr string representation of jobid - * \param jobid parsed job id - * \retval 0 for success - * \retval EINVAL jobidstr can't be parsed - * \retval ENOMEM if memory allocation fails - */ -int glite_lbu_JobIdParse(const char* jobidstr, glite_lbu_JobId * jobid); - -/** - * Unparse Job ID (produce the string form of JobId). - * \param jobid to be converted to string - * \return allocated string which represents jobid - */ -char* glite_lbu_JobIdUnparse(const glite_lbu_JobId jobid); - -/** - * Extract bookkeeping server address (address:port) - * \param jobid from which the bkserver address should be extracted - * \retval pointer to allocated string with bkserver address - * \retval NULL if jobid is 0 or memory allocation fails - */ -char* glite_lbu_JobIdGetServer(const glite_lbu_JobId jobid); - -/** - * Extract bookkeeping server address and port - * \param jobid from which the bkserver address should be extracted - * \param srvName pointer where to return server name - * \param srvPort pointer where to return server port - * */ -void glite_lbu_JobIdGetServerParts(const glite_lbu_JobId jobid, char **srvName, unsigned int *srvPort); - -/** - * Extract unique string - * \param jobid - * \retval pointer to allocated unique string representing jobid - * \retval NULL if jobid is 0 or memory allocation fails - */ -char* glite_lbu_JobIdGetUnique(const glite_lbu_JobId jobid); - -#ifdef __cplusplus -} -#endif - -#endif /* _GLITE_JOBID_H */ diff --git a/org.glite.lb-utils.jobid/interface/strmd5.h b/org.glite.lb-utils.jobid/interface/strmd5.h deleted file mode 100755 index 27d8544..0000000 --- a/org.glite.lb-utils.jobid/interface/strmd5.h +++ /dev/null @@ -1,30 +0,0 @@ -#ifndef _GLITE_STRMD5_H -#define _GLITE_STRMD5_H - -#ident "$Header$" - -/* Compute MD5 sum of the first argument. - * The sum is returned in the 16-byte array pointed to by 2nd argument - * (if not NULL) - * - * Return value: ASCII string of the sum, i.e. 32 characters [0-9a-f] - * (pointer to static area, changed by subsequent calls) - */ - -#ifdef USE_MBUF -char *strmd5(const char *src, unsigned char *dst); -#endif - -/** - * Returns: allocated 32bytes long ASCII string with md5 sum - * of the first argument - */ -char *str2md5(const char *src); - -/** - * Returns: allocated 22bytes long ASCII string with md5 sum in base64 - * format of the source argument - */ -char *str2md5base64(const char *src); - -#endif /* _GLITE_STRMD5_H */ diff --git a/org.glite.lb-utils.jobid/project/build.number b/org.glite.lb-utils.jobid/project/build.number deleted file mode 100644 index 5cfec85..0000000 --- a/org.glite.lb-utils.jobid/project/build.number +++ /dev/null @@ -1 +0,0 @@ -module.build = 0 diff --git a/org.glite.lb-utils.jobid/project/build.properties b/org.glite.lb-utils.jobid/project/build.properties deleted file mode 100755 index 89232f3..0000000 --- a/org.glite.lb-utils.jobid/project/build.properties +++ /dev/null @@ -1,4 +0,0 @@ -# temporary hack before lb-utils are integrated - -lb-utils.subsystem.name = org.glite.lb-utils -lb-utils.subsystem.prefix = lb-utils diff --git a/org.glite.lb-utils.jobid/project/configure.properties.xml b/org.glite.lb-utils.jobid/project/configure.properties.xml deleted file mode 100644 index 23ba931..0000000 --- a/org.glite.lb-utils.jobid/project/configure.properties.xml +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - - - - - -top_srcdir=.. -builddir=build -stagedir=${stage.abs.dir} -distdir=${dist.dir} -globalprefix=${global.prefix} -lbuprefix=${subsystem.prefix} -package=${module.package.name} -PREFIX=${install.dir} - - - - diff --git a/org.glite.lb-utils.jobid/project/properties.xml b/org.glite.lb-utils.jobid/project/properties.xml deleted file mode 100644 index 1adf343..0000000 --- a/org.glite.lb-utils.jobid/project/properties.xml +++ /dev/null @@ -1,73 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/org.glite.lb-utils.jobid/project/tar_exclude b/org.glite.lb-utils.jobid/project/tar_exclude deleted file mode 100644 index e1fcd1a..0000000 --- a/org.glite.lb-utils.jobid/project/tar_exclude +++ /dev/null @@ -1,10 +0,0 @@ -tar_exclude -CVS -build.xml -build -build.properties -properties.xml -configure.properties.xml -.cvsignore -.project -.cdtproject diff --git a/org.glite.lb-utils.jobid/project/version.properties b/org.glite.lb-utils.jobid/project/version.properties deleted file mode 100755 index 52a0f68..0000000 --- a/org.glite.lb-utils.jobid/project/version.properties +++ /dev/null @@ -1,2 +0,0 @@ -module.version = 1.0.0 -module.age = 0 diff --git a/org.glite.lb-utils.jobid/src/cjobid.c b/org.glite.lb-utils.jobid/src/cjobid.c deleted file mode 100755 index 6d6a73f..0000000 --- a/org.glite.lb-utils.jobid/src/cjobid.c +++ /dev/null @@ -1,260 +0,0 @@ -#ident "$Header$" - -#include -#include -#include -#include -#include - -#include -#include -#include - -#include - -#include "cjobid.h" -#include "strmd5.h" - -struct _glite_lbu_JobId { - char *id; /* unique job identification */ - /* additional information */ - char *BShost;/* bookkeeping server hostname */ - unsigned int BSport; /* bookkeeping server port */ - char *info; /* additional information (after ? in URI) */ -}; - -int glite_lbu_JobIdCreate(const char *bkserver, int port, glite_lbu_JobId *jobId) -{ - return glite_lbu_JobIdRecreate(bkserver, port, NULL, jobId); -} - - -int glite_lbu_JobIdRecreate(const char* bkserver, int port, const char *unique, glite_lbu_JobId *jobId) -{ - glite_lbu_JobId out; - char hostname[200]; /* used to hold string for encrypt */ - struct timeval tv; - int skip; - char* portbeg; - - struct hostent* he; - - if (!bkserver) - return EINVAL; - - if (unique == NULL) { - gethostname(hostname, 100); - he = gethostbyname(hostname); - assert(he->h_length > 0); - gettimeofday(&tv, NULL); - srandom(tv.tv_usec); - - skip = strlen(hostname); - skip += sprintf(hostname + skip, "-IP:0x%x-pid:%d-rnd:%d-time:%d:%d", - *((int*)he->h_addr_list[0]), getpid(), (int)random(), - (int)tv.tv_sec, (int)tv.tv_usec); - } - - *jobId = NULL; - out = (glite_lbu_JobId) malloc (sizeof(*out)); - if (!out) - return ENOMEM; - - memset(out, 0, sizeof(*out)); - - /* check if it begins with prefix */ - /* unsupported */ - if (strncmp(bkserver, GLITE_WMSC_JOBID_PROTO_PREFIX, sizeof(GLITE_WMSC_JOBID_PROTO_PREFIX)-1) == 0) - return EINVAL; - - out->BShost = strdup(bkserver); - portbeg = strchr(out->BShost, ':'); - if (portbeg) { - *portbeg = 0; - /* try to get port number */ - if (port == 0) - port = atoi(portbeg + 1); - } - - if (port == 0) - port = GLITE_WMSC_JOBID_DEFAULT_PORT; - - out->BSport = port; - - out->id = (unique) ? strdup(unique) : str2md5base64(hostname); - //printf("Encrypt: %s\nBASE64 %s\n", hostname, out->id); - - if (!out->id || !out->BShost) { - glite_lbu_JobIdFree(out); - return ENOMEM; - } - - *jobId = out; - return 0; -} - - -int glite_lbu_JobIdDup(const glite_lbu_JobId in, glite_lbu_JobId *out) -{ - glite_lbu_JobId jid; - *out = NULL; - if (in == NULL) - return 0; - - jid = malloc(sizeof(*jid)); - if (!jid) - return ENOMEM; - - memset(jid, 0,sizeof(*jid)); - jid->BShost = strdup(in->BShost); - jid->id = strdup(in->id); - if (in->info) - jid->info = strdup(in->info); - - if (jid->BShost == NULL || jid->id == NULL) { - glite_lbu_JobIdFree(jid); - return ENOMEM; - } - - jid->BSport = in->BSport; - *out = jid; - return 0; -} - - -// XXX -// use recreate -// parse name, port, unique -int glite_lbu_JobIdParse(const char *idString, glite_lbu_JobId *jobId) -{ - char *pom, *pom1, *pom2; - glite_lbu_JobId out; - - *jobId = NULL; - - out = (glite_lbu_JobId) malloc (sizeof(*out)); - if (out == NULL ) - return ENOMEM; - - memset(out,0,sizeof(*out)); - - if (strncmp(idString, GLITE_WMSC_JOBID_PROTO_PREFIX, sizeof(GLITE_WMSC_JOBID_PROTO_PREFIX) - 1)) { - out->BShost = (char *) NULL; - out->BSport = 0; - - free(out); - return EINVAL; - } - - pom = strdup(idString + sizeof(GLITE_WMSC_JOBID_PROTO_PREFIX) - 1); - pom1 = strchr(pom, '/'); - pom2 = strchr(pom, ':'); - - if (!pom1) { free(pom); free(out); return EINVAL; } - - if ( pom2 && (pom1 > pom2)) { - pom[pom2-pom] = '\0'; - out->BShost = strdup(pom); - pom[pom1-pom] = '\0'; - out->BSport = (unsigned int) strtoul(pom2 + 1,NULL,10); - } else { - pom[pom1-pom] = '\0'; - out->BShost = strdup(pom); - out->BSport = GLITE_WMSC_JOBID_DEFAULT_PORT; - } - - /* XXX: localhost not supported in jobid - if (!strncmp(out->BShost,"localhost",9) { - free(pom); - free(out->BShost); - free(out); - return EINVAL; - } - */ - - /* additional info from URI */ - pom2 = strchr(pom1+1,'?'); - if (pom2) { - *pom2 = 0; - out->info = strdup(pom2+1); - } - - /* extract the unique part */ - out->id = strdup(pom1+1); - - for (pom1 = out->BShost; *pom1; pom1++) - if (isspace(*pom1)) break; - - for (pom2 = out->id; *pom2; pom2++) - if (isspace(*pom2)) break; - - if (*pom1 || *pom2) { - free(pom); - glite_lbu_JobIdFree(out); - return EINVAL; - } - - free(pom); - *jobId = out; - return 0; -} - - -void glite_lbu_JobIdFree(glite_lbu_JobId job) -{ - if (job) { - free(job->id); - free(job->BShost); - free(job->info); - free(job); - } -} - - -char* glite_lbu_JobIdUnparse(const glite_lbu_JobId jobid) -{ - char *out, port[40]; - - if (!jobid) - return NULL; - - if (jobid->BSport) - sprintf(port,":%d",jobid->BSport); - else - *port = 0; - - asprintf(&out, GLITE_WMSC_JOBID_PROTO_PREFIX"%s%s/%s%s%s", - jobid->BShost,port, - jobid->id, - (jobid->info ? "?" : ""), - (jobid->info ? jobid->info : "")); - - return out; -} - - -char* glite_lbu_JobIdGetServer(const glite_lbu_JobId jobid) -{ - char *bs = NULL; - - if (jobid) - asprintf(&bs, "%s:%u", jobid->BShost, - jobid->BSport ? jobid->BSport : GLITE_WMSC_JOBID_DEFAULT_PORT); - - return bs; -} - - -void glite_lbu_JobIdGetServerParts(const glite_lbu_JobId jobid, char **srvName, unsigned int *srvPort) -{ - if (jobid) { - *srvName = strdup(jobid->BShost); - *srvPort = jobid->BSport ? jobid->BSport : GLITE_WMSC_JOBID_DEFAULT_PORT; - } -} - - -char* glite_lbu_JobIdGetUnique(const glite_lbu_JobId jobid) -{ - return jobid ? strdup(jobid->id) : NULL; -} diff --git a/org.glite.lb-utils.jobid/src/strmd5.c b/org.glite.lb-utils.jobid/src/strmd5.c deleted file mode 100755 index 775aee8..0000000 --- a/org.glite.lb-utils.jobid/src/strmd5.c +++ /dev/null @@ -1,122 +0,0 @@ -#ident "$Header$" - -#include -#include -#include -#include - -#include "strmd5.h" - -#if USE_MBUF /* let's try without it */ -#warning Thread unsafe! -static char mbuf[33]; -#endif - -static int base64_encode(const void *enc, int enc_size, char *out, int out_max_size) -{ - static const char* b64 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"; - - unsigned char* enc_buf = (unsigned char*)enc; - int out_size = 0; - unsigned int bits = 0; - unsigned int shift = 0; - - while ( out_size < out_max_size ) { - if ( enc_size>0 ) { - // Shift in byte - bits <<= 8; - bits |= *enc_buf; - shift += 8; - // Next byte - enc_buf++; - enc_size--; - } else if ( shift>0 ) { - // Pad last bits to 6 bits - will end next loop - bits <<= 6 - shift; - shift = 6; - } else { - // Terminate with Mime style '=' - *out = '='; - out_size++; - - return out_size; - } - - // Encode 6 bit segments - while ( shift>=6 ) { - shift -= 6; - *out = b64[ (bits >> shift) & 0x3F ]; - out++; - out_size++; - } - } - - // Output overflow - return -1; -} - -#ifdef USE_MBUF -char *strmd5(const char *s, unsigned char *digest) -{ - MD5_CTX md5; - unsigned char d[16]; - int i; - - MD5_Init(&md5); - MD5_Update(&md5,s,strlen(s)); - MD5_Final(d,&md5); - - if (digest) memcpy(digest,d,sizeof(d)); - - for (i=0; i<16; i++) { - int dd = d[i] & 0x0f; - mbuf[2*i+1] = dd<10 ? dd+'0' : dd-10+'a'; - dd = d[i] >> 4; - mbuf[2*i] = dd<10 ? dd+'0' : dd-10+'a'; - } - mbuf[32] = 0; - return (char *) mbuf; -} -#endif - -char *str2md5(const char *s) -{ - MD5_CTX md5; - unsigned char d[16]; - char* ret = malloc(33); - int i; - - if (!ret) - return NULL; - - MD5_Init(&md5); - MD5_Update(&md5, s, strlen(s)); - MD5_Final(d, &md5); - - for (i=0; i<16; i++) { - int dd = d[i] & 0x0f; - ret[2*i+1] = dd<10 ? dd+'0' : dd-10+'a'; - dd = d[i] >> 4; - ret[2*i] = dd<10 ? dd+'0' : dd-10+'a'; - } - ret[32] = 0; - return ret; -} - -char *str2md5base64(const char *s) -{ - MD5_CTX md5; - unsigned char d[16]; - char buf[50]; - int l; - - MD5_Init(&md5); - MD5_Update(&md5, s, strlen(s)); - MD5_Final(d, &md5); - - l = base64_encode(d, 16, buf, sizeof(buf) - 1); - if (l < 1) - return NULL; - buf[l - 1] = 0; - return strdup(buf); -} diff --git a/org.glite.lb-utils.server-bones/.cvsignore b/org.glite.lb-utils.server-bones/.cvsignore deleted file mode 100755 index 1df717b..0000000 --- a/org.glite.lb-utils.server-bones/.cvsignore +++ /dev/null @@ -1,2 +0,0 @@ -.project -.cdtproject \ No newline at end of file diff --git a/org.glite.lb-utils.server-bones/LICENSE b/org.glite.lb-utils.server-bones/LICENSE deleted file mode 100755 index 01b973b..0000000 --- a/org.glite.lb-utils.server-bones/LICENSE +++ /dev/null @@ -1,69 +0,0 @@ -LICENSE file for EGEE Middleware -================================ - -Copyright (c) 2004 on behalf of the EU EGEE Project: -The European Organization for Nuclear Research (CERN), -Istituto Nazionale di Fisica Nucleare (INFN), Italy -Datamat Spa, Italy -Centre National de la Recherche Scientifique (CNRS), France -CS Systeme d'Information (CSSI), France -Royal Institute of Technology, Center for Parallel Computers (KTH-PDC), Sweden -Universiteit van Amsterdam (UvA), Netherlands -University of Helsinki (UH.HIP), Finlan -University of Bergen (UiB), Norway -Council for the Central Laboratory of the Research Councils (CCLRC), United Kingdom - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - -1. Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - -2. Redistributions in binary form must reproduce the above copyright -notice, this list of conditions and the following disclaimer in the -documentation and/or other materials provided with the distribution. - -3. The end-user documentation included with the redistribution, if -any, must include the following acknowledgment: "This product includes -software developed by The EU EGEE Project (http://cern.ch/eu-egee/)." -Alternatively, this acknowledgment may appear in the software itself, if -and wherever such third-party acknowledgments normally appear. - -4. The names EGEE and the EU EGEE Project must not be -used to endorse or promote products derived from this software without -prior written permission. For written permission, please contact -. - -5. You are under no obligation whatsoever to provide anyone with any -bug fixes, patches, or upgrades to the features, functionality or -performance of the Software ("Enhancements") that you may develop over -time; however, if you choose to provide your Enhancements to The EU -EGEE Project, or if you choose to otherwise publish or distribute your -Enhancements, in source code form without contemporaneously requiring -end users of The EU EGEE Proejct to enter into a separate written license -agreement for such Enhancements, then you hereby grant The EU EGEE Project -a non-exclusive, royalty-free perpetual license to install, use, copy, -modify, prepare derivative works, incorporate into the EGEE Middleware -or any other computer software, distribute, and sublicense your -Enhancements or derivative works thereof, in binary and source code -form (if any), whether developed by The EU EGEE Project or third parties. - -THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED -WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL PROJECT OR ITS CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR -BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE -OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN -IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -This software consists of voluntary contributions made by many -individuals on behalf of the EU EGEE Prject. For more information on The -EU EGEE Project, please see http://cern.ch/eu-egee/. For more information on -EGEE Middleware, please see http://egee-jra1.web.cern.ch/egee-jra1/ - - diff --git a/org.glite.lb-utils.server-bones/build.xml b/org.glite.lb-utils.server-bones/build.xml deleted file mode 100644 index efe49ad..0000000 --- a/org.glite.lb-utils.server-bones/build.xml +++ /dev/null @@ -1,122 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/org.glite.lb-utils.server-bones/project/build.number b/org.glite.lb-utils.server-bones/project/build.number deleted file mode 100644 index 5cfec85..0000000 --- a/org.glite.lb-utils.server-bones/project/build.number +++ /dev/null @@ -1 +0,0 @@ -module.build = 0 diff --git a/org.glite.lb-utils.server-bones/project/build.properties b/org.glite.lb-utils.server-bones/project/build.properties deleted file mode 100755 index e69de29..0000000 diff --git a/org.glite.lb-utils.server-bones/project/configure.properties.xml b/org.glite.lb-utils.server-bones/project/configure.properties.xml deleted file mode 100644 index 6ad627b..0000000 --- a/org.glite.lb-utils.server-bones/project/configure.properties.xml +++ /dev/null @@ -1,37 +0,0 @@ - - - - - diff --git a/org.glite.lb-utils.server-bones/project/properties.xml b/org.glite.lb-utils.server-bones/project/properties.xml deleted file mode 100644 index a76d544..0000000 --- a/org.glite.lb-utils.server-bones/project/properties.xml +++ /dev/null @@ -1,73 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/org.glite.lb-utils.server-bones/project/version.properties b/org.glite.lb-utils.server-bones/project/version.properties deleted file mode 100755 index 6f1f8ab..0000000 --- a/org.glite.lb-utils.server-bones/project/version.properties +++ /dev/null @@ -1,2 +0,0 @@ -module.version = 0.0.0 -module.age = 0 \ No newline at end of file diff --git a/org.glite.lb-utils.trio/.cvsignore b/org.glite.lb-utils.trio/.cvsignore deleted file mode 100755 index 1df717b..0000000 --- a/org.glite.lb-utils.trio/.cvsignore +++ /dev/null @@ -1,2 +0,0 @@ -.project -.cdtproject \ No newline at end of file diff --git a/org.glite.lb-utils.trio/LICENSE b/org.glite.lb-utils.trio/LICENSE deleted file mode 100755 index 01b973b..0000000 --- a/org.glite.lb-utils.trio/LICENSE +++ /dev/null @@ -1,69 +0,0 @@ -LICENSE file for EGEE Middleware -================================ - -Copyright (c) 2004 on behalf of the EU EGEE Project: -The European Organization for Nuclear Research (CERN), -Istituto Nazionale di Fisica Nucleare (INFN), Italy -Datamat Spa, Italy -Centre National de la Recherche Scientifique (CNRS), France -CS Systeme d'Information (CSSI), France -Royal Institute of Technology, Center for Parallel Computers (KTH-PDC), Sweden -Universiteit van Amsterdam (UvA), Netherlands -University of Helsinki (UH.HIP), Finlan -University of Bergen (UiB), Norway -Council for the Central Laboratory of the Research Councils (CCLRC), United Kingdom - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - -1. Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - -2. Redistributions in binary form must reproduce the above copyright -notice, this list of conditions and the following disclaimer in the -documentation and/or other materials provided with the distribution. - -3. The end-user documentation included with the redistribution, if -any, must include the following acknowledgment: "This product includes -software developed by The EU EGEE Project (http://cern.ch/eu-egee/)." -Alternatively, this acknowledgment may appear in the software itself, if -and wherever such third-party acknowledgments normally appear. - -4. The names EGEE and the EU EGEE Project must not be -used to endorse or promote products derived from this software without -prior written permission. For written permission, please contact -. - -5. You are under no obligation whatsoever to provide anyone with any -bug fixes, patches, or upgrades to the features, functionality or -performance of the Software ("Enhancements") that you may develop over -time; however, if you choose to provide your Enhancements to The EU -EGEE Project, or if you choose to otherwise publish or distribute your -Enhancements, in source code form without contemporaneously requiring -end users of The EU EGEE Proejct to enter into a separate written license -agreement for such Enhancements, then you hereby grant The EU EGEE Project -a non-exclusive, royalty-free perpetual license to install, use, copy, -modify, prepare derivative works, incorporate into the EGEE Middleware -or any other computer software, distribute, and sublicense your -Enhancements or derivative works thereof, in binary and source code -form (if any), whether developed by The EU EGEE Project or third parties. - -THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED -WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL PROJECT OR ITS CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR -BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE -OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN -IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -This software consists of voluntary contributions made by many -individuals on behalf of the EU EGEE Prject. For more information on The -EU EGEE Project, please see http://cern.ch/eu-egee/. For more information on -EGEE Middleware, please see http://egee-jra1.web.cern.ch/egee-jra1/ - - diff --git a/org.glite.lb-utils.trio/Makefile b/org.glite.lb-utils.trio/Makefile deleted file mode 100644 index 96a8386..0000000 --- a/org.glite.lb-utils.trio/Makefile +++ /dev/null @@ -1,114 +0,0 @@ -# Default values -top_srcdir=. -builddir=build -top_builddir=${top_srcdir}/${builddir} -stagedir=. -distdir=. -globalprefix=glite -package=glite-lb-utils-trio -version=0.0.0 -PREFIX=/opt/glite -lbuprefix=lbu - --include Makefile.inc --include ../project/version.properties - -version=${module.version} - -VPATH=${top_srcdir}/src:${top_srcdir}/test::${top_srcdir}/doc - -CC=gcc - -DEBUG:=-g -O0 -Wall - -CFLAGS:=${DEBUG} -I${top_srcdir}/src -I${top_srcdir}/interface -I. -DDATAGRID_EXTENSION - -COMPILE:=libtool --mode=compile ${CC} -LINK:=libtool --mode=link ${CC} -rpath ${stagedir}/lib ${LDFLAGS} -LINKXX:=libtool --mode=link ${CXX} -rpath ${stagedir}/lib ${LDFLAGS} -INSTALL:=libtool --mode=install install - -REPORTS:=${top_srcdir}/reports -TEST_LIBS:=-L${cppunit_prefix}/lib -lcppunit -ldl -TEST_INC:=-I${cppunit_prefix}/include - - -OBJS:=trio.o strio.o escape.o -LOBJS:=${OBJS:.o=.lo} - -HDRS:=trio.h escape.h - -STATICLIB:=libglite_lbu_trio.a -LTLIB:=libglite_lbu_trio.la - -default: all - -all compile: ${STATICLIB} ${LTLIB} - -# to use libtool versioning correcty, we should have: -# -# current = major + minor + offset -# revision = patch -# age = minor -# -# where offset is a sum of maximal released minor's of all previous major's -# -# version_info=-version-info `echo ${version} | cut -d. -f1,2 | tr . :` - -# counted minors: n/a -offset=0 - -version_info:=-version-info ${shell \ - perl -e '$$,=":"; @F=split "\\.","${version}"; print $$F[0]+$$F[1]+${offset},$$F[2],$$F[1]' } - -${STATICLIB}: ${OBJS} - ar crv $@ ${OBJS} - ranlib $@ - -${LTLIB}: ${OBJS} - ${LINK} ${version_info} -o $@ ${LOBJS} - -stage: compile - $(MAKE) install PREFIX=${stagedir} DOSTAGE=yes - -check: compile mkreports runtest - -mkreports: - -mkdir ${REPORTS} - -runtest: trio_test - ./trio_test ${REPORTS}/trio.xml - -trio_test: trio_test.cpp - ${CXX} -c ${CFLAGS} ${TEST_INC} $< - ${LINKXX} -o $@ trio_test.o ${LTLIB} ${TEST_LIBS} - - -dist: distsrc distbin - -distsrc: - mkdir -p ${top_srcdir}/${package}-${version} - cd ${top_srcdir} && GLOBIGNORE="${package}-${version}" && cp -Rf * ${package}-${version} - cd ${top_srcdir} && tar -czf ${distdir}/${package}-${version}_src.tar.gz --exclude-from=project/tar_exclude ${package}-${version} - rm -rf ${top_srcdir}/${package}-${version} - -distbin: - $(MAKE) install PREFIX=`pwd`/tmpbuilddir${stagedir} - save_dir=`pwd`; cd tmpbuilddir${stagedir} && tar -czf $$save_dir/${top_srcdir}/${distdir}/${package}-${version}_bin.tar.gz *; cd $$save_dir - rm -rf tmpbuilddir - -install: - mkdir -p ${PREFIX}/lib - mkdir -p ${PREFIX}/share/doc/${package}-${version} - ${INSTALL} -m 644 ${LTLIB} ${PREFIX}/lib - ${INSTALL} -m 644 ${top_srcdir}/LICENSE ${PREFIX}/share/doc/${package}-${version} - if [ x${DOSTAGE} = xyes ]; then \ - mkdir -p ${PREFIX}/include/${globalprefix}/${lbuprefix} ; \ - (cd ${top_srcdir}/interface && install -m 644 ${HDRS} ${PREFIX}/include/${globalprefix}/${lbuprefix}) ; \ - install -m 644 ${STATICLIB} ${PREFIX}/lib; \ - fi - -clean: - -%.o: %.c - ${COMPILE} ${CFLAGS} -c $< diff --git a/org.glite.lb-utils.trio/build.xml b/org.glite.lb-utils.trio/build.xml deleted file mode 100644 index 7e38dda..0000000 --- a/org.glite.lb-utils.trio/build.xml +++ /dev/null @@ -1,126 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/org.glite.lb-utils.trio/interface/escape.h b/org.glite.lb-utils.trio/interface/escape.h deleted file mode 100644 index 4795f68..0000000 --- a/org.glite.lb-utils.trio/interface/escape.h +++ /dev/null @@ -1,59 +0,0 @@ -#ifndef __EDG_WORKLOAD_LOGGING_COMMON_ESCAPE_H__ -#define __EDG_WORKLOAD_LOGGING_COMMON_ESCAPE_H__ -/*! - * \file escape.h - */ - -#ident "$Header$" - - -/*! - * \fn char *glite_lbu_EscapeULM(const char *str) - * \param str a string to escape - * \return new (allocated) escaped string - * \brief in given string (ULM) escape all ULM_QM, ULM_BS and ULM_LF by ULM_BS - */ - -char *glite_lbu_EscapeULM(const char *); - - -/*! - * \fn char *glite_lbu_UnescapeULM(const char *str) - * \param str a string to unescape - * \return new (allocated) unescaped string - * \brief in given string (ULM) unescape all escaped ULM_QM, ULM_BS and ULM_LF - */ - -char *glite_lbu_UnescapeULM(const char *); - - -/*! - * \fn char *glite_lbu_EscapeXML(const char *str); - * \param str a string to escape - * \return new (allocated) escaped string - * \brief in given string (XML) escape all unwanted characters - */ - -char *glite_lbu_EscapeXML(const char *); - - -/*! - * \fn char *glite_lbu_UnescapeXML(const char *str) - * \param str a string to unescape - * \return new (allocated) unescaped string - * \brief in given string (XML) unescape all escaped characters - */ - -char *glite_lbu_UnescapeXML(const char *); - - -/*! - * \fn char *glite_lbu_EscapeSQL(const char *str) - * \param str a string to escape - * \return new (allocated) escaped string - * \briefin given string (SQL) escape all unwanted characters - */ - -char *glite_lbu_EscapeSQL(const char *); - -#endif /* __EDG_WORKLOAD_LOGGING_COMMON_ESCAPE_H__ */ diff --git a/org.glite.lb-utils.trio/interface/trio.h b/org.glite.lb-utils.trio/interface/trio.h deleted file mode 100644 index 04f133c..0000000 --- a/org.glite.lb-utils.trio/interface/trio.h +++ /dev/null @@ -1,187 +0,0 @@ -/************************************************************************* - * - * $Id$ - * - * Copyright (C) 1998 Bjorn Reese and Daniel Stenberg. - * - * Permission to use, copy, modify, and distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF - * MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE AUTHORS AND - * CONTRIBUTORS ACCEPT NO RESPONSIBILITY IN ANY CONCEIVABLE MANNER. - * - ************************************************************************/ - -#ifndef TRIO_TRIO_H -#define TRIO_TRIO_H - -#include -#include -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/* make utility and C++ compiler in Windows NT fails to find this symbol */ -#if defined(WIN32) && !defined(isascii) -# define isascii ((unsigned)(x) < 0x80) -#endif - -/* - * Error codes. - * - * Remember to add a textual description to trio_strerror. - */ -enum { - TRIO_EOF = 1, - TRIO_EINVAL = 2, - TRIO_ETOOMANY = 3, - TRIO_EDBLREF = 4, - TRIO_EGAP = 5, - TRIO_ENOMEM = 6, - TRIO_ERANGE = 7 -}; - -/* Error macros */ -#define TRIO_ERROR_CODE(x) ((-(x)) & 0x00FF) -#define TRIO_ERROR_POSITION(x) ((-(x)) >> 8) -#define TRIO_ERROR_NAME(x) trio_strerror(x) - -const char *trio_strerror(int); - -/************************************************************************* - * Print Functions - */ - -int trio_printf(const char *format, ...); -int trio_vprintf(const char *format, va_list args); -int trio_printfv(const char *format, void **args); - -int trio_fprintf(FILE *file, const char *format, ...); -int trio_vfprintf(FILE *file, const char *format, va_list args); -int trio_fprintfv(FILE *file, const char *format, void **args); - -int trio_dprintf(int fd, const char *format, ...); -int trio_vdprintf(int fd, const char *format, va_list args); -int trio_dprintfv(int fd, const char *format, void **args); - -/* trio_sprintf(target, format, ...) - * trio_snprintf(target, maxsize, format, ...) - * - * Build 'target' according to 'format' and succesive - * arguments. This is equal to the sprintf() and - * snprintf() functions. - */ -int trio_sprintf(char *buffer, const char *format, ...); -int trio_vsprintf(char *buffer, const char *format, va_list args); -int trio_sprintfv(char *buffer, const char *format, void **args); - -int trio_snprintf(char *buffer, size_t max, const char *format, ...); -int trio_vsnprintf(char *buffer, size_t bufferSize, const char *format, - va_list args); -int trio_snprintfv(char *buffer, size_t bufferSize, const char *format, - void **args); - -int trio_snprintfcat(char *buffer, size_t max, const char *format, ...); -int trio_vsnprintfcat(char *buffer, size_t bufferSize, const char *format, - va_list args); - -char *trio_aprintf(const char *format, ...); -char *trio_vaprintf(const char *format, va_list args); - -int trio_asprintf(char **ret, const char *format, ...); -int trio_vasprintf(char **ret, const char *format, va_list args); - -/************************************************************************* - * Scan Functions - */ -int trio_scanf(const char *format, ...); -int trio_vscanf(const char *format, va_list args); -int trio_scanfv(const char *format, void **args); - -int trio_fscanf(FILE *file, const char *format, ...); -int trio_vfscanf(FILE *file, const char *format, va_list args); -int trio_fscanfv(FILE *file, const char *format, void **args); - -int trio_dscanf(int fd, const char *format, ...); -int trio_vdscanf(int fd, const char *format, va_list args); -int trio_dscanfv(int fd, const char *format, void **args); - -int trio_sscanf(const char *buffer, const char *format, ...); -int trio_vsscanf(const char *buffer, const char *format, va_list args); -int trio_sscanfv(const char *buffer, const char *format, void **args); - -/************************************************************************* - * Renaming - */ -#ifdef TRIO_REPLACE_STDIO -/* Replace the functions */ -#ifndef HAVE_PRINTF -# define printf trio_printf -#endif -#ifndef HAVE_VPRINTF -# define vprintf trio_vprintf -#endif -#ifndef HAVE_FPRINTF -# define fprintf trio_fprintf -#endif -#ifndef HAVE_VFPRINTF -# define vfprintf trio_vfprintf -#endif -#ifndef HAVE_SPRINTF -# define sprintf trio_sprintf -#endif -#ifndef HAVE_VSPRINTF -# define vsprintf trio_vsprintf -#endif -#ifndef HAVE_SNPRINTF -# define snprintf trio_snprintf -#endif -#ifndef HAVE_VSNPRINTF -# define vsnprintf trio_vsnprintf -#endif -#ifndef HAVE_SCANF -# define scanf trio_scanf -#endif -#ifndef HAVE_VSCANF -# define vscanf trio_vscanf -#endif -#ifndef HAVE_FSCANF -# define fscanf trio_fscanf -#endif -#ifndef HAVE_VFSCANF -# define vfscanf trio_vfscanf -#endif -#ifndef HAVE_SSCANF -# define sscanf trio_sscanf -#endif -#ifndef HAVE_VSSCANF -# define vsscanf trio_vsscanf -#endif -/* These aren't stdio functions, but we make them look similar */ -#define dprintf trio_dprintf -#define vdprintf trio_vdprintf -#define aprintf trio_aprintf -#define vaprintf trio_vaprintf -#define asprintf trio_asprintf -#define vasprintf trio_vasprintf -#define dscanf trio_dscanf -#define vdscanf trio_vdscanf -#endif - -/* strio compatible names */ -#define StrScan trio_sscanf -#define StrFormat trio_sprintf -#define StrFormatMax trio_snprintf -#define StrFormatAlloc trio_aprintf -#define StrFormatAppendMax trio_snprintfcat - -#ifdef __cplusplus -} /* extern "C" */ -#endif - -#endif /* TRIO_TRIO_H */ diff --git a/org.glite.lb-utils.trio/project/build.number b/org.glite.lb-utils.trio/project/build.number deleted file mode 100644 index 5cfec85..0000000 --- a/org.glite.lb-utils.trio/project/build.number +++ /dev/null @@ -1 +0,0 @@ -module.build = 0 diff --git a/org.glite.lb-utils.trio/project/build.properties b/org.glite.lb-utils.trio/project/build.properties deleted file mode 100755 index 89232f3..0000000 --- a/org.glite.lb-utils.trio/project/build.properties +++ /dev/null @@ -1,4 +0,0 @@ -# temporary hack before lb-utils are integrated - -lb-utils.subsystem.name = org.glite.lb-utils -lb-utils.subsystem.prefix = lb-utils diff --git a/org.glite.lb-utils.trio/project/configure.properties.xml b/org.glite.lb-utils.trio/project/configure.properties.xml deleted file mode 100644 index d743f4b..0000000 --- a/org.glite.lb-utils.trio/project/configure.properties.xml +++ /dev/null @@ -1,59 +0,0 @@ - - - - - - - - - - -top_srcdir=.. -builddir=build -stagedir=${stage.abs.dir} -distdir=${dist.dir} -globalprefix=${global.prefix} -lbuprefix=${subsystem.prefix} -package=${module.package.name} -cppunit_prefix=${with.cppunit.prefix} -PREFIX=${install.dir} - - - - - diff --git a/org.glite.lb-utils.trio/project/properties.xml b/org.glite.lb-utils.trio/project/properties.xml deleted file mode 100644 index e472152..0000000 --- a/org.glite.lb-utils.trio/project/properties.xml +++ /dev/null @@ -1,73 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/org.glite.lb-utils.trio/project/version.properties b/org.glite.lb-utils.trio/project/version.properties deleted file mode 100755 index 6f1f8ab..0000000 --- a/org.glite.lb-utils.trio/project/version.properties +++ /dev/null @@ -1,2 +0,0 @@ -module.version = 0.0.0 -module.age = 0 \ No newline at end of file diff --git a/org.glite.lb-utils.trio/src/escape.c b/org.glite.lb-utils.trio/src/escape.c deleted file mode 100644 index 9a1d545..0000000 --- a/org.glite.lb-utils.trio/src/escape.c +++ /dev/null @@ -1,224 +0,0 @@ -#ident "$Header$" - -#include -#include -#include -#include - -#include "escape.h" - -#define ULM_QM '"' -#define ULM_BS '\\' -#define ULM_LF '\n' - -/* - *---------------------------------------------------------------------- - * - * \fn char *glite_lbu_EscapeULM(const char *str) - * \param str a string to escape - * \return new (allocated) escaped string - * \brief in given string escape all ULM_QM, ULM_BS and ULM_LF by ULM_BS - * - * Calls: malloc, strlen - * - * Algorithm: array lookup - * - the new string will be allocated - * - *---------------------------------------------------------------------- - */ - -char *glite_lbu_EscapeULM(const char *str) -{ -unsigned int i,j; -size_t size; -char *ret; - -if (str == NULL) return NULL; -if ((size = strlen(str)) == 0) return strdup(""); - -ret = (char*) malloc(1+2*size*sizeof(char)); - -j = 0; -for (i=0; i',"gt" }, - { '&',"amp" }, - { '"',"quot" }, - { '\'',"apos" }, - { 0, NULL } -}; - -#define XML_ESCAPE_SET "<>&\"'" - -char *glite_lbu_EscapeXML(const char *in) -{ - const char* tmp_in; - char *out; - int cnt,i,j,k; - - if (!in) return NULL; - - for (cnt = 0, tmp_in = in; *tmp_in != '\0'; ++tmp_in) { - if (strchr(XML_ESCAPE_SET, *tmp_in) || - (*tmp_in & 0x7f) < 0x20 /* control character */ || - (*tmp_in == '%')) cnt++; - } - - out = malloc(strlen(in)+1+cnt*5); - - for (i=j=0; in[i]; i++) { - for (k=0; xml_etab[k].c && xml_etab[k].c != in[i]; k++); - if (xml_etab[k].c) { - int l; - - out[j++] = '&'; - memcpy(out+j,xml_etab[k].e,l=strlen(xml_etab[k].e)); - j += l; - out[j++] = ';'; - } else if ((in[i] & 0x7f) < 0x20 || in[i] == '%') { - sprintf(out+j, "%%%02x", (unsigned char)in[i]); - j+=3; - } else { - out[j++] = in[i]; - } - } - out[j] = 0; - return out; -} - -char *glite_lbu_UnescapeXML(const char *in) -{ - char *out; - int i,j,k; - char xtmp[3]; - unsigned char origchar; - - if (!in) return NULL; - out = malloc(strlen(in)+1); - - for (i=j=0; in[i]; j++) if (in[i] == '&') { - char *s = strchr(in+i,';'); - if (s) { - int l = s-in-i+1; - for (k=0; xml_etab[k].c && strncasecmp(in+i+1,xml_etab[k].e,l-2); k++); - if (xml_etab[k].c) { - out[j] = xml_etab[k].c; - i += l; - } else out[j] = in[i++]; - } else out[j] = in[i++]; - } else if (in[i] == '%') { - if (isxdigit(xtmp[0]=in[i+1]) && isxdigit(xtmp[1]=in[i+2])) { - xtmp[2] = '\0'; - origchar = (unsigned char) strtol(xtmp, NULL, 16); - if ((origchar & 0x7f) < 0x20 || origchar == '%') { - out[j] = origchar; - i += 3; - } else out[j] = in[i++]; - } else out[j] = in[i++]; - } else { - out[j] = in[i++]; - } - out[j] = 0; - return out; -} - -char *glite_lbu_EscapeSQL(const char *in) -{ - const char* tmp_in; - char *out = NULL; - int i,j,cnt; - - if (!in) return NULL; - - for (cnt = 0, tmp_in = in; (tmp_in = strchr(tmp_in,'\'')) != NULL; ++tmp_in) { - ++cnt; - } - for (tmp_in = in; (tmp_in = strchr(tmp_in,'\\')) != NULL; ++tmp_in) { - ++cnt; - } - - out = malloc(strlen(in)+1+cnt); - - for (i=j=0; in[i]; i++) { - if (in[i] == '\\') out[j++] = '\\'; - if (in[i] == '\'') out[j++] = '\''; - out[j++] = in[i]; - } - out[j] = 0; - - return out; -} diff --git a/org.glite.lb-utils.trio/src/strio.c b/org.glite.lb-utils.trio/src/strio.c deleted file mode 100644 index f1ab5b8..0000000 --- a/org.glite.lb-utils.trio/src/strio.c +++ /dev/null @@ -1,581 +0,0 @@ -/************************************************************************* - * - * $Id$ - * - * Copyright (C) 1998 Bjorn Reese and Daniel Stenberg. - * - * Permission to use, copy, modify, and distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF - * MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE AUTHORS AND - * CONTRIBUTORS ACCEPT NO RESPONSIBILITY IN ANY CONCEIVABLE MANNER. - * - ************************************************************************/ - -/* - * TODO - * - StrToLongDouble - */ - -static const char rcsid[] = "@(#)$Id$"; - -#if defined(unix) || defined(__xlC__) || defined(__QNX__) -# define PLATFORM_UNIX -#elif defined(WIN32) || defined(_WIN32) -# define PLATFORM_WIN32 -#elif defined(AMIGA) && defined(__GNUC__) -# define PLATFORM_UNIX -#endif - -#if defined(__STDC__) && (__STDC_VERSION__ >= 199901L) -# define TRIO_C99 -#endif - -#include "strio.h" -#include -#include -#include -#include -#include -#include -#ifndef DEBUG -# define NDEBUG -#endif -#include - -#ifndef NULL -# define NULL 0 -#endif -#define NIL ((char)0) -#ifndef FALSE -# define FALSE (1 == 0) -# define TRUE (! FALSE) -#endif - -#define VALID(x) (NULL != (x)) -#define INVALID(x) (NULL == (x)) - -#if defined(PLATFORM_UNIX) -# define USE_STRCASECMP -# define USE_STRNCASECMP -# define USE_STRERROR -# if defined(__QNX__) -# define strcasecmp(x,y) stricmp(x,y) -# define strncasecmp(x,y,n) strnicmp(x,y,n) -# endif -#elif defined(PLATFORM_WIN32) -# define USE_STRCASECMP -# define strcasecmp(x,y) strcmpi(x,y) -#endif - -/************************************************************************* - * StrAppendMax - */ -char *StrAppendMax(char *target, size_t max, const char *source) -{ - assert(VALID(target)); - assert(VALID(source)); - assert(max > 0); - - max -= StrLength(target) + 1; - return (max > 0) ? strncat(target, source, max) : target; -} - -/************************************************************************* - * StrCopyMax - */ -char *StrCopyMax(char *target, size_t max, const char *source) -{ - assert(VALID(target)); - assert(VALID(source)); - assert(max > 0); /* Includes != 0 */ - - target = strncpy(target, source, max - 1); - target[max - 1] = (char)0; - return target; -} - -/************************************************************************* - * StrDuplicate - */ -char *StrDuplicate(const char *source) -{ - char *target; - - assert(VALID(source)); - - target = StrAlloc(StrLength(source) + 1); - if (target) - { - StrCopy(target, source); - } - return target; -} - -/************************************************************************* - * StrDuplicateMax - */ -char *StrDuplicateMax(const char *source, size_t max) -{ - char *target; - size_t len; - - assert(VALID(source)); - assert(max > 0); - - /* Make room for string plus a terminating zero */ - len = StrLength(source) + 1; - if (len > max) - { - len = max; - } - target = StrAlloc(len); - if (target) - { - StrCopyMax(target, len, source); - } - return target; -} - -/************************************************************************* - * StrEqual - */ -int StrEqual(const char *first, const char *second) -{ - assert(VALID(first)); - assert(VALID(second)); - - if (VALID(first) && VALID(second)) - { -#if defined(USE_STRCASECMP) - return (0 == strcasecmp(first, second)); -#else - while ((*first != NIL) && (*second != NIL)) - { - if (toupper(*first) != toupper(*second)) - { - break; - } - first++; - second++; - } - return ((*first == NIL) && (*second == NIL)); -#endif - } - return FALSE; -} - -/************************************************************************* - * StrEqualCase - */ -int StrEqualCase(const char *first, const char *second) -{ - assert(VALID(first)); - assert(VALID(second)); - - if (VALID(first) && VALID(second)) - { - return (0 == strcmp(first, second)); - } - return FALSE; -} - -/************************************************************************* - * StrEqualCaseMax - */ -int StrEqualCaseMax(const char *first, size_t max, const char *second) -{ - assert(VALID(first)); - assert(VALID(second)); - - if (VALID(first) && VALID(second)) - { - return (0 == strncmp(first, second, max)); - } - return FALSE; -} - -/************************************************************************* - * StrEqualLocale - */ -int StrEqualLocale(const char *first, const char *second) -{ - assert(VALID(first)); - assert(VALID(second)); - -#if defined(LC_COLLATE) - return (strcoll(first, second) == 0); -#else - return StrEqual(first, second); -#endif -} - -/************************************************************************* - * StrEqualMax - */ -int StrEqualMax(const char *first, size_t max, const char *second) -{ - assert(VALID(first)); - assert(VALID(second)); - - if (VALID(first) && VALID(second)) - { -#if defined(USE_STRNCASECMP) - return (0 == strncasecmp(first, second, max)); -#else - /* Not adequately tested yet */ - size_t cnt = 0; - while ((*first != NIL) && (*second != NIL) && (cnt <= max)) - { - if (toupper(*first) != toupper(*second)) - { - break; - } - first++; - second++; - cnt++; - } - return ((cnt == max) || ((*first == NIL) && (*second == NIL))); -#endif - } - return FALSE; -} - -/************************************************************************* - * StrError - */ -const char *StrError(int errorNumber) -{ -#if defined(USE_STRERROR) - return strerror(errorNumber); -#else - return "unknown"; -#endif -} - -/************************************************************************* - * StrFormatDate - */ -size_t StrFormatDateMax(char *target, - size_t max, - const char *format, - const struct tm *datetime) -{ - assert(VALID(target)); - assert(VALID(format)); - assert(VALID(datetime)); - assert(max > 0); - - return strftime(target, max, format, datetime); -} - -/************************************************************************* - * StrHash - */ -unsigned long StrHash(const char *string, int type) -{ - unsigned long value = 0L; - char ch; - - assert(VALID(string)); - - switch (type) - { - case STRIO_HASH_PLAIN: - while ( (ch = *string++) != NIL ) - { - value *= 31; - value += (unsigned long)ch; - } - break; - default: - assert(FALSE); - break; - } - return value; -} - -/************************************************************************* - * StrMatch - */ -int StrMatch(char *string, char *pattern) -{ - assert(VALID(string)); - assert(VALID(pattern)); - - for (; ('*' != *pattern); ++pattern, ++string) - { - if (NIL == *string) - { - return (NIL == *pattern); - } - if ((toupper((int)*string) != toupper((int)*pattern)) - && ('?' != *pattern)) - { - return FALSE; - } - } - /* two-line patch to prevent *too* much recursiveness: */ - while ('*' == pattern[1]) - pattern++; - - do - { - if ( StrMatch(string, &pattern[1]) ) - { - return TRUE; - } - } - while (*string++); - - return FALSE; -} - -/************************************************************************* - * StrMatchCase - */ -int StrMatchCase(char *string, char *pattern) -{ - assert(VALID(string)); - assert(VALID(pattern)); - - for (; ('*' != *pattern); ++pattern, ++string) - { - if (NIL == *string) - { - return (NIL == *pattern); - } - if ((*string != *pattern) - && ('?' != *pattern)) - { - return FALSE; - } - } - /* two-line patch to prevent *too* much recursiveness: */ - while ('*' == pattern[1]) - pattern++; - - do - { - if ( StrMatchCase(string, &pattern[1]) ) - { - return TRUE; - } - } - while (*string++); - - return FALSE; -} - -/************************************************************************* - * StrSpanFunction - * - * Untested - */ -size_t StrSpanFunction(char *source, int (*Function)(int)) -{ - size_t count = 0; - - assert(VALID(source)); - assert(VALID(Function)); - - while (*source != NIL) - { - if (Function(*source)) - break; /* while */ - source++; - count++; - } - return count; -} - -/************************************************************************* - * StrSubstringMax - */ -char *StrSubstringMax(const char *string, size_t max, const char *find) -{ - size_t count; - size_t size; - char *result = NULL; - - assert(VALID(string)); - assert(VALID(find)); - - size = StrLength(find); - if (size <= max) - { - for (count = 0; count <= max - size; count++) - { - if (StrEqualMax(find, size, &string[count])) - { - result = (char *)&string[count]; - break; - } - } - } - return result; -} - -/************************************************************************* - * StrToDouble - * - * double ::= [ ] - * ( | - * | - * ) - * [ [ ] ] - * number ::= 1*( ) - * digit ::= ( '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' ) - * exponential ::= ( 'e' | 'E' ) - * sign ::= ( '-' | '+' ) - * decimal_point ::= '.' - */ -double StrToDouble(const char *source, const char **endp) -{ -#if defined(TRIO_C99) - return strtod(source, endp); -#else - /* Preliminary code */ - int isNegative = FALSE; - int isExponentNegative = FALSE; - unsigned long integer = 0; - unsigned long fraction = 0; - unsigned long fracdiv = 1; - unsigned long exponent = 0; - double value = 0.0; - - /* First try hex-floats */ - if ((source[0] == '0') && ((source[1] == 'x') || (source[1] == 'X'))) - { - source += 2; - while (isxdigit((int)*source)) - { - integer *= 16; - integer += (isdigit((int)*source) - ? (*source - '0') - : 10 + (toupper((int)*source) - 'A')); - source++; - } - if (*source == '.') - { - source++; - while (isxdigit((int)*source)) - { - fraction *= 16; - fraction += (isdigit((int)*source) - ? (*source - '0') - : 10 + (toupper((int)*source) - 'A')); - fracdiv *= 16; - source++; - } - if ((*source == 'p') || (*source == 'P')) - { - source++; - if ((*source == '+') || (*source == '-')) - { - isExponentNegative = (*source == '-'); - source++; - } - while (isdigit((int)*source)) - { - exponent *= 10; - exponent += (*source - '0'); - source++; - } - } - } - } - else /* Then try normal decimal floats */ - { - isNegative = (*source == '-'); - /* Skip sign */ - if ((*source == '+') || (*source == '-')) - source++; - - /* Integer part */ - while (isdigit((int)*source)) - { - integer *= 10; - integer += (*source - '0'); - source++; - } - - if (*source == '.') - { - source++; /* skip decimal point */ - while (isdigit((int)*source)) - { - fraction *= 10; - fraction += (*source - '0'); - fracdiv *= 10; - source++; - } - } - if ((*source == 'e') || (*source == 'E')) - { - source++; /* Skip exponential indicator */ - isExponentNegative = (*source == '-'); - if ((*source == '+') || (*source == '-')) - source++; - while (isdigit((int)*source)) - { - exponent *= 10; - exponent += (*source - '0'); - source++; - } - } - } - - value = (double)integer; - if (fraction != 0) - { - value += (double)fraction / (double)fracdiv; - } - if (exponent != 0) - { - if (isExponentNegative) - value /= pow((double)10, (double)exponent); - else - value *= pow((double)10, (double)exponent); - } - if (isNegative) - value = -value; - - if (endp) - *endp = source; - return value; -#endif -} - -/************************************************************************* - * StrToFloat - */ -float StrToFloat(const char *source, const char **endp) -{ -#if defined(TRIO_C99) - return strtof(source, endp); -#else - return (float)StrToDouble(source, endp); -#endif -} - -/************************************************************************* - * StrToUpper - */ -int StrToUpper(char *target) -{ - int i = 0; - - assert(VALID(target)); - - while (NIL != *target) - { - *target = toupper((int)*target); - target++; - i++; - } - return i; -} diff --git a/org.glite.lb-utils.trio/src/strio.h b/org.glite.lb-utils.trio/src/strio.h deleted file mode 100644 index 68845a3..0000000 --- a/org.glite.lb-utils.trio/src/strio.h +++ /dev/null @@ -1,227 +0,0 @@ -/************************************************************************* - * - * $Id$ - * - * Copyright (C) 1998 Bjorn Reese and Daniel Stenberg. - * - * Permission to use, copy, modify, and distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF - * MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE AUTHORS AND - * CONTRIBUTORS ACCEPT NO RESPONSIBILITY IN ANY CONCEIVABLE MANNER. - * - ************************************************************************/ - -#ifndef TRIO_STRIO_H -#define TRIO_STRIO_H - -#if !(defined(DEBUG) || defined(NDEBUG)) -# define NDEBUG -#endif -#include -#include -#include -#include - -#ifndef STRIO_MALLOC -# define STRIO_MALLOC(n) malloc(n) -#endif -#ifndef STRIO_FREE -# define STRIO_FREE(x) free(x) -#endif - -/* - * StrAppend(target, source) - * StrAppendMax(target, maxsize, source) - * - * Append 'source' to 'target' - * - * target = StrAlloc(size) - * - * Allocate a new string - * - * StrContains(target, substring) - * - * Find out if the string 'substring' is - * contained in the string 'target' - * - * StrCopy(target, source) - * StrCopyMax(target, maxsize, source) - * - * Copy 'source' to 'target' - * - * target = StrDuplicate(source) - * target = StrDuplicateMax(source, maxsize) - * - * Allocate and copy 'source' to 'target' - * - * StrEqual(first, second) - * StrEqualMax(first, maxsize, second) - * - * Compare if 'first' is equal to 'second'. - * Case-independent. - * - * StrEqualCase(first, second) - * StrEqualCaseMax(first, maxsize, second) - * - * Compare if 'first' is equal to 'second' - * Case-dependent. Please note that the use of the - * word 'case' has the opposite meaning as that of - * strcasecmp(). - * - * StrFormat(target, format, ...) - * StrFormatMax(target, maxsize, format, ...) - * - * Build 'target' according to 'format' and succesive - * arguments. This is equal to the sprintf() and - * snprintf() functions. - * - * StrFormatDate(target, format, ...) - * - * StrFree(target) - * - * De-allocates a string - * - * StrHash(string, type) - * - * Calculates the hash value of 'string' based on the - * 'type'. - * - * StrIndex(target, character) - * StrIndexLast(target, character) - * - * Find the first/last occurrence of 'character' in - * 'target' - * - * StrLength(target) - * - * Return the length of 'target' - * - * StrMatch(string, pattern) - * StrMatchCase(string, pattern) - * - * Find 'pattern' within 'string'. 'pattern' may contain - * wildcards such as * (asterics) and ? (question mark) - * which matches zero or more characters and exactly - * on character respectively - * - * StrScan(source, format, ...) - * - * Equal to sscanf() - * - * StrSubstring(target, substring) - * - * Find the first occurrence of the string 'substring' - * within the string 'target' - * - * StrTokenize(target, list) - * - * Split 'target' into the first token delimited by - * one of the characters in 'list'. If 'target' is - * NULL then next token will be returned. - * - * StrToUpper(target) - * - * Convert all lower case characters in 'target' into - * upper case characters. - */ - -enum { - STRIO_HASH_NONE = 0, - STRIO_HASH_PLAIN, - STRIO_HASH_TWOSIGNED -}; - -#if !defined(DEBUG) || defined(__DECC) -#define StrAlloc(n) (char *)STRIO_MALLOC(n) -#define StrAppend(x,y) strcat((x), (y)) -#define StrContains(x,y) (0 != strstr((x), (y))) -#define StrCopy(x,y) strcpy((x), (y)) -#define StrIndex(x,y) strchr((x), (y)) -#define StrIndexLast(x,y) strrchr((x), (y)) -#define StrFree(x) STRIO_FREE(x) -#define StrLength(x) strlen((x)) -#define StrSubstring(x,y) strstr((x), (y)) -#define StrTokenize(x,y) strtok((x), (y)) -#define StrToLong(x,y,n) strtol((x), (y), (n)) -#define StrToUnsignedLong(x,y,n) strtoul((x), (y), (n)) -#else /* DEBUG */ - /* - * To be able to use these macros everywhere, including in - * if() sentences, the assertions are put first in a comma - * seperated list. - * - * Unfortunately the DECC compiler does not seem to like this - * so it will use the un-asserted functions above for the - * debugging case too. - */ -#define StrAlloc(n) \ - (assert((n) > 0),\ - (char *)STRIO_MALLOC(n)) -#define StrAppend(x,y) \ - (assert((x) != NULL),\ - assert((y) != NULL),\ - strcat((x), (y))) -#define StrContains(x,y) \ - (assert((x) != NULL),\ - assert((y) != NULL),\ - (0 != strstr((x), (y)))) -#define StrCopy(x,y) \ - (assert((x) != NULL),\ - assert((y) != NULL),\ - strcpy((x), (y))) -#define StrIndex(x,c) \ - (assert((x) != NULL),\ - strchr((x), (c))) -#define StrIndexLast(x,c) \ - (assert((x) != NULL),\ - strrchr((x), (c))) -#define StrFree(x) \ - (assert((x) != NULL),\ - STRIO_FREE(x)) -#define StrLength(x) \ - (assert((x) != NULL),\ - strlen((x))) -#define StrSubstring(x,y) \ - (assert((x) != NULL),\ - assert((y) != NULL),\ - strstr((x), (y))) -#define StrTokenize(x,y) \ - (assert((y) != NULL),\ - strtok((x), (y))) -#define StrToLong(x,y,n) \ - (assert((x) != NULL),\ - assert((y) != NULL),\ - assert((n) >= 2 && (n) <= 36),\ - strtol((x), (y), (n))) -#define StrToUnsignedLong(x,y,n) \ - (assert((x) != NULL),\ - assert((y) != NULL),\ - assert((n) >= 2 && (n) <= 36),\ - strtoul((x), (y), (n))) -#endif /* DEBUG */ - -char *StrAppendMax(char *target, size_t max, const char *source); -char *StrCopyMax(char *target, size_t max, const char *source); -char *StrDuplicate(const char *source); -char *StrDuplicateMax(const char *source, size_t max); -int StrEqual(const char *first, const char *second); -int StrEqualCase(const char *first, const char *second); -int StrEqualCaseMax(const char *first, size_t max, const char *second); -int StrEqualLocale(const char *first, const char *second); -int StrEqualMax(const char *first, size_t max, const char *second); -const char *StrError(int); -size_t StrFormatDateMax(char *target, size_t max, const char *format, const struct tm *datetime); -unsigned long StrHash(const char *string, int type); -int StrMatch(char *string, char *pattern); -int StrMatchCase(char *string, char *pattern); -size_t StrSpanFunction(char *source, int (*Function)(int)); -char *StrSubstringMax(const char *string, size_t max, const char *find); -float StrToFloat(const char *source, const char **target); -double StrToDouble(const char *source, const char **target); -int StrToUpper(char *target); - -#endif /* TRIO_STRIO_H */ diff --git a/org.glite.lb-utils.trio/src/trio.c b/org.glite.lb-utils.trio/src/trio.c deleted file mode 100644 index 6e4211e..0000000 --- a/org.glite.lb-utils.trio/src/trio.c +++ /dev/null @@ -1,5706 +0,0 @@ - -/************************************************************************* - * - * $Id$ - * - * Copyright (C) 1998 Bjorn Reese and Daniel Stenberg. - * - * Permission to use, copy, modify, and distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF - * MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE AUTHORS AND - * CONTRIBUTORS ACCEPT NO RESPONSIBILITY IN ANY CONCEIVABLE MANNER. - * - ************************************************************************* - * - * A note to trio contributors: - * - * Avoid heap allocation at all costs to ensure that the trio functions - * are async-safe. The exceptions are the printf/fprintf functions, which - * uses fputc, and the asprintf functions and the modifier, which - * by design are required to allocate form the heap. - * - ************************************************************************/ - -/* - * TODO: - * - Scan is probably too permissive about its modifiers. - * - C escapes in %#[] ? - * - C99 support has not been properly tested. - * - Multibyte characters (done for format parsing, except scan groups) - * - Complex numbers? (C99 _Complex) - * - Boolean values? (C99 _Bool) - * - C99 NaN(n-char-sequence) missing - * - Should we support the GNU %a alloc modifier? GNU has an ugly hack - * for %a, because C99 used %a for other purposes. If specified as - * %as or %a[ it is interpreted as the alloc modifier, otherwise as - * the C99 hex-float. This means that you cannot scan %as as a hex-float - * immediately followed by an 's'. - * - Scanning of collating symbols. - */ - -static const char rcsid[] = "@(#)$Id$"; - -/************************************************************************* - * Trio include files - */ -#include "trio.h" -#include "triop.h" -#include "strio.h" - -#ifdef DATAGRID_EXTENSION -#include "escape.h" -#endif - -/* - * Encode the error code and the position. This is decoded - * with TRIO_ERROR_CODE and TRIO_ERROR_POSITION. - */ -#if TRIO_ERRORS -# define TRIO_ERROR_RETURN(x,y) (- ((x) + ((y) << 8))) -#else -# define TRIO_ERROR_RETURN(x,y) (-1) -#endif - - -/************************************************************************* - * Platform and compiler support detection - */ -#if defined(unix) || defined(__xlC__) || defined(_AIX) || defined(__QNX__) -# define PLATFORM_UNIX -#elif defined(AMIGA) && defined(__GNUC__) -# define PLATFORM_UNIX -#elif defined(WIN32) || defined(_WIN32) || defined(_MSC_VER) -# define PLATFORM_WIN32 -# define TRIO_MSVC_5 1100 -#endif - -#if defined(__STDC__) && defined(__STDC_VERSION__) -# if (__STDC_VERSION__ >= 199409L) -# define TRIO_COMPILER_SUPPORTS_ISO94 -# endif -# if (__STDC_VERSION__ >= 199901L) -# define TRIO_COMPILER_SUPPORTS_C99 -# endif -#endif - -#if defined(_XOPEN_SOURCE) && defined(_XOPEN_SOURCE_EXTENDED) -# define TRIO_COMPILER_SUPPORTS_UNIX98 -#endif - -#if defined(__STDC_ISO_10646__) || defined(MB_LEN_MAX) || defined(USE_MULTIBYTE) || TRIO_WIDECHAR -# define TRIO_COMPILER_SUPPORTS_MULTIBYTE -# if !defined(MB_LEN_MAX) -# define MB_LEN_MAX 6 -# endif -#endif - - -/************************************************************************* - * Generic definitions - */ - -#if !(defined(DEBUG) || defined(NDEBUG)) -# define NDEBUG -#endif -#include -#include -#if !defined(TRIO_COMPILER_SUPPORTS_C99) && !defined(isblank) -# define isblank(x) (((x)==32) || ((x)==9)) -#endif -#include -#include -#include -#include -#include -#include - -#ifndef NULL -# define NULL 0 -#endif -#define NIL ((char)0) -#ifndef FALSE -# define FALSE (1 == 0) -# define TRUE (! FALSE) -#endif -#define BOOLEAN_T int - -/* mincore() can be used for debugging purposes */ -#define VALID(x) (NULL != (x)) - -/* xlC crashes on log10(0) */ -#define guarded_log10(x) (((x) == 0.0) ? -HUGE_VAL : log10(x)) -#define guarded_log16(x) (guarded_log10(x) / log10(16.0)) - - -/************************************************************************* - * Platform specific definitions - */ -#if defined(PLATFORM_UNIX) -# include -# include -# include -# define USE_LOCALE -#endif /* PLATFORM_UNIX */ -#if defined(PLATFORM_WIN32) -# include -# define read _read -# define write _write -#endif /* PLATFORM_WIN32 */ - -#if TRIO_WIDECHAR -# if defined(TRIO_COMPILER_SUPPORTS_ISO94) -# include -# include -# else -typedef char wchar_t; -typedef int wint_t; -# define WEOF EOF -# define iswalnum(x) isalnum(x) -# define iswalpha(x) isalpha(x) -# define iswblank(x) isblank(x) -# define iswcntrl(x) iscntrl(x) -# define iswdigit(x) isdigit(x) -# define iswgraph(x) isgraph(x) -# define iswlower(x) islower(x) -# define iswprint(x) isprint(x) -# define iswpunct(x) ispunct(x) -# define iswspace(x) isspace(x) -# define iswupper(x) isupper(x) -# define iswxdigit(x) isxdigit(x) -# endif -#endif - - -/************************************************************************* - * Compiler dependent definitions - */ - -/* Support for long long */ -#ifndef __cplusplus -# if !defined(USE_LONGLONG) -# if defined(__GNUC__) && !defined(__STRICT_ANSI__) -# define USE_LONGLONG -# elif defined(__SUNPRO_C) -# define USE_LONGLONG -# elif defined(_LONG_LONG) || defined(_LONGLONG) -# define USE_LONGLONG -# endif -# endif -#endif - -/* The extra long numbers */ -#if defined(USE_LONGLONG) -typedef signed long long int trio_longlong_t; -typedef unsigned long long int trio_ulonglong_t; -#elif defined(_MSC_VER) -# if (_MSC_VER >= TRIO_MSVC_5) -typedef signed __int64 trio_longlong_t; -typedef unsigned __int64 trio_ulonglong_t; -# else -typedef signed long int trio_longlong_t; -typedef unsigned long int trio_ulonglong_t; -# endif -#else -typedef signed long int trio_longlong_t; -typedef unsigned long int trio_ulonglong_t; -#endif - -/* Maximal and fixed integer types */ -#if defined(TRIO_COMPILER_SUPPORTS_C99) -# include -typedef intmax_t trio_intmax_t; -typedef uintmax_t trio_uintmax_t; -typedef int8_t trio_int8_t; -typedef int16_t trio_int16_t; -typedef int32_t trio_int32_t; -typedef int64_t trio_int64_t; -#elif defined(TRIO_COMPILER_SUPPORTS_UNIX98) -# include -typedef intmax_t trio_intmax_t; -typedef uintmax_t trio_uintmax_t; -typedef int8_t trio_int8_t; -typedef int16_t trio_int16_t; -typedef int32_t trio_int32_t; -typedef int64_t trio_int64_t; -#elif defined(_MSC_VER) && (_MSC_VER >= TRIO_MSVC_5) -typedef trio_longlong_t trio_intmax_t; -typedef trio_ulonglong_t trio_uintmax_t; -typedef __int8 trio_int8_t; -typedef __int16 trio_int16_t; -typedef __int32 trio_int32_t; -typedef __int64 trio_int64_t; -#else -typedef trio_longlong_t trio_intmax_t; -typedef trio_ulonglong_t trio_uintmax_t; -# if defined(TRIO_INT8_T) -typedef TRIO_INT8_T trio_int8_t; -# else -typedef signed char trio_int8_t; -# endif -# if defined(TRIO_INT16_T) -typedef TRIO_INT16_T trio_int16_t; -# else -typedef signed short trio_int16_t; -# endif -# if defined(TRIO_INT32_T) -typedef TRIO_INT32_T trio_int32_t; -# else -typedef signed int trio_int32_t; -# endif -# if defined(TRIO_INT64_T) -typedef TRIO_INT64_T trio_int64_t; -# else -typedef trio_longlong_t trio_int64_t; -# endif -#endif - - -/************************************************************************* - * Internal definitions - */ - -/* Long double sizes */ -#ifdef LDBL_DIG -# define MAX_MANTISSA_DIGITS LDBL_DIG -# define MAX_EXPONENT_DIGITS 4 -#else -# define MAX_MANTISSA_DIGITS DBL_DIG -# define MAX_EXPONENT_DIGITS 3 -#endif - -/* The maximal number of digits is for base 2 */ -#define MAX_CHARS_IN(x) (sizeof(x) * CHAR_BIT) -/* The width of a pointer. The number of bits in a hex digit is 4 */ -#define POINTER_WIDTH ((sizeof("0x") - 1) + sizeof(void *) * CHAR_BIT / 4) - -/* Infinite and Not-A-Number for floating-point */ -#define INFINITE_LOWER "inf" -#define INFINITE_UPPER "INF" -#define LONG_INFINITE_LOWER "infinite" -#define LONG_INFINITE_UPPER "INFINITE" -#define NAN_LOWER "nan" -#define NAN_UPPER "NAN" - -/* Various constants */ -enum { - TYPE_PRINT = 1, - TYPE_SCAN = 2, - - /* Flags. Use maximum 32 */ - FLAGS_NEW = 0, - FLAGS_STICKY = 1, - FLAGS_SPACE = 2 * FLAGS_STICKY, - FLAGS_SHOWSIGN = 2 * FLAGS_SPACE, - FLAGS_LEFTADJUST = 2 * FLAGS_SHOWSIGN, - FLAGS_ALTERNATIVE = 2 * FLAGS_LEFTADJUST, - FLAGS_SHORT = 2 * FLAGS_ALTERNATIVE, - FLAGS_SHORTSHORT = 2 * FLAGS_SHORT, - FLAGS_LONG = 2 * FLAGS_SHORTSHORT, - FLAGS_QUAD = 2 * FLAGS_LONG, - FLAGS_LONGDOUBLE = 2 * FLAGS_QUAD, - FLAGS_SIZE_T = 2 * FLAGS_LONGDOUBLE, - FLAGS_PTRDIFF_T = 2 * FLAGS_SIZE_T, - FLAGS_INTMAX_T = 2 * FLAGS_PTRDIFF_T, - FLAGS_NILPADDING = 2 * FLAGS_INTMAX_T, - FLAGS_UNSIGNED = 2 * FLAGS_NILPADDING, - FLAGS_UPPER = 2 * FLAGS_UNSIGNED, - FLAGS_WIDTH = 2 * FLAGS_UPPER, - FLAGS_WIDTH_PARAMETER = 2 * FLAGS_WIDTH, - FLAGS_PRECISION = 2 * FLAGS_WIDTH_PARAMETER, - FLAGS_PRECISION_PARAMETER = 2 * FLAGS_PRECISION, - FLAGS_BASE = 2 * FLAGS_PRECISION_PARAMETER, - FLAGS_BASE_PARAMETER = 2 * FLAGS_BASE, - FLAGS_FLOAT_E = 2 * FLAGS_BASE_PARAMETER, - FLAGS_FLOAT_G = 2 * FLAGS_FLOAT_E, - FLAGS_QUOTE = 2 * FLAGS_FLOAT_G, - FLAGS_WIDECHAR = 2 * FLAGS_QUOTE, - FLAGS_ALLOC = 2 * FLAGS_WIDECHAR, - FLAGS_IGNORE = 2 * FLAGS_ALLOC, - FLAGS_IGNORE_PARAMETER = 2 * FLAGS_IGNORE, - FLAGS_VARSIZE_PARAMETER = 2 * FLAGS_IGNORE_PARAMETER, - FLAGS_FIXED_SIZE = 2 * FLAGS_VARSIZE_PARAMETER, - /* Reused flags */ - FLAGS_EXCLUDE = FLAGS_SHORT, - FLAGS_USER_DEFINED = FLAGS_IGNORE, - /* Compounded flags */ - FLAGS_ALL_VARSIZES = FLAGS_LONG | FLAGS_QUAD | FLAGS_INTMAX_T | FLAGS_PTRDIFF_T | FLAGS_SIZE_T, - FLAGS_ALL_SIZES = FLAGS_ALL_VARSIZES | FLAGS_SHORTSHORT | FLAGS_SHORT, - - NO_POSITION = -1, - NO_WIDTH = 0, - NO_PRECISION = -1, - NO_SIZE = -1, - - NO_BASE = -1, - MIN_BASE = 2, - MAX_BASE = 36, - BASE_BINARY = 2, - BASE_OCTAL = 8, - BASE_DECIMAL = 10, - BASE_HEX = 16, - - /* Maximal number of allowed parameters */ - MAX_PARAMETERS = 64, - /* Maximal number of characters in class */ - MAX_CHARACTER_CLASS = UCHAR_MAX, - - /* Maximal string lengths for user-defined specifiers */ - MAX_USER_NAME = 64, - MAX_USER_DATA = 256, - - /* Maximal length of locale separator strings */ - MAX_LOCALE_SEPARATOR_LENGTH = MB_LEN_MAX, - /* Maximal number of integers in grouping */ - MAX_LOCALE_GROUPS = 64 -}; - -#define NO_GROUPING ((int)CHAR_MAX) - -/* Fundamental formatting parameter types */ -#define FORMAT_UNKNOWN 0 -#define FORMAT_INT 1 -#define FORMAT_DOUBLE 2 -#define FORMAT_CHAR 3 -#define FORMAT_STRING 4 -#define FORMAT_POINTER 5 -#define FORMAT_COUNT 6 -#define FORMAT_PARAMETER 7 -#define FORMAT_GROUP 8 -#if TRIO_GNU -# define FORMAT_ERRNO 9 -#endif -#if TRIO_EXTENSION -# define FORMAT_USER_DEFINED 10 -#endif - -/* Character constants */ -#define CHAR_IDENTIFIER '%' -#define CHAR_BACKSLASH '\\' -#define CHAR_QUOTE '\"' -#define CHAR_ADJUST ' ' - -/* Character class expressions */ -#define CLASS_ALNUM ":alnum:" -#define CLASS_ALPHA ":alpha:" -#define CLASS_CNTRL ":cntrl:" -#define CLASS_DIGIT ":digit:" -#define CLASS_GRAPH ":graph:" -#define CLASS_LOWER ":lower:" -#define CLASS_PRINT ":print:" -#define CLASS_PUNCT ":punct:" -#define CLASS_SPACE ":space:" -#define CLASS_UPPER ":upper:" -#define CLASS_XDIGIT ":xdigit:" - -/* - * SPECIFIERS: - * - * - * a Hex-float - * A Hex-float - * c Character - * C Widechar character (wint_t) - * d Decimal - * e Float - * E Float - * F Float - * F Float - * g Float - * G Float - * i Integer - * m Error message - * n Count - * o Octal - * p Pointer - * s String - * S Widechar string (wchar_t *) - * u Unsigned - * x Hex - * X Hex - * [] Group - * <> User-defined - * - * Reserved: - * - * D Binary Coded Decimal %D(length,precision) (OS/390) - */ -#define SPECIFIER_CHAR 'c' -#define SPECIFIER_STRING 's' -#define SPECIFIER_DECIMAL 'd' -#define SPECIFIER_INTEGER 'i' -#define SPECIFIER_UNSIGNED 'u' -#define SPECIFIER_OCTAL 'o' -#define SPECIFIER_HEX 'x' -#define SPECIFIER_HEX_UPPER 'X' -#define SPECIFIER_FLOAT_E 'e' -#define SPECIFIER_FLOAT_E_UPPER 'E' -#define SPECIFIER_FLOAT_F 'f' -#define SPECIFIER_FLOAT_F_UPPER 'F' -#define SPECIFIER_FLOAT_G 'g' -#define SPECIFIER_FLOAT_G_UPPER 'G' -#define SPECIFIER_POINTER 'p' -#define SPECIFIER_GROUP '[' -#define SPECIFIER_UNGROUP ']' -#define SPECIFIER_COUNT 'n' -#if TRIO_UNIX98 -# define SPECIFIER_CHAR_UPPER 'C' -# define SPECIFIER_STRING_UPPER 'S' -#endif -#if TRIO_C99 -# define SPECIFIER_HEXFLOAT 'a' -# define SPECIFIER_HEXFLOAT_UPPER 'A' -#endif -#if TRIO_GNU -# define SPECIFIER_ERRNO 'm' -#endif -#if TRIO_EXTENSION -# define SPECIFIER_BINARY 'b' -# define SPECIFIER_BINARY_UPPER 'B' -# define SPECIFIER_USER_DEFINED_BEGIN '<' -# define SPECIFIER_USER_DEFINED_END '>' -# define SPECIFIER_USER_DEFINED_SEPARATOR ':' -#endif - -/* - * QUALIFIERS: - * - * - * Numbers = d,i,o,u,x,X - * Float = a,A,e,E,f,F,g,G - * String = s - * Char = c - * - * - * 9$ Position - * Use the 9th parameter. 9 can be any number between 1 and - * the maximal argument - * - * 9 Width - * Set width to 9. 9 can be any number, but must not be postfixed - * by '$' - * - * h Short - * Numbers: - * (unsigned) short int - * - * hh Short short - * Numbers: - * (unsigned) char - * - * l Long - * Numbers: - * (unsigned) long int - * String: - * as the S specifier - * Char: - * as the C specifier - * - * ll Long Long - * Numbers: - * (unsigned) long long int - * - * L Long Double - * Float - * long double - * - * # Alternative - * Float: - * Decimal-point is always present - * String: - * non-printable characters are handled as \number - * - * Spacing - * - * + Sign - * - * - Alignment - * - * . Precision - * - * * Parameter - * print: use parameter - * scan: no parameter (ignore) - * - * q Quad - * - * Z size_t - * - * w Widechar - * - * ' Thousands/quote - * Numbers: - * Integer part grouped in thousands - * Binary numbers: - * Number grouped in nibbles (4 bits) - * String: - * Quoted string - * - * j intmax_t - * t prtdiff_t - * z size_t - * - * ! Sticky - * @ Parameter (for both print and scan) - * - * I n-bit Integer - * Numbers: - * The following options exists - * I8 = 8-bit integer - * I16 = 16-bit integer - * I32 = 32-bit integer - * I64 = 64-bit integer - */ -#define QUALIFIER_POSITION '$' -#define QUALIFIER_SHORT 'h' -#define QUALIFIER_LONG 'l' -#define QUALIFIER_LONG_UPPER 'L' -#define QUALIFIER_ALTERNATIVE '#' -#define QUALIFIER_SPACE ' ' -#define QUALIFIER_PLUS '+' -#define QUALIFIER_MINUS '-' -#define QUALIFIER_DOT '.' -#define QUALIFIER_STAR '*' -#define QUALIFIER_CIRCUMFLEX '^' -#if TRIO_C99 -# define QUALIFIER_SIZE_T 'z' -# define QUALIFIER_PTRDIFF_T 't' -# define QUALIFIER_INTMAX_T 'j' -#endif -#if TRIO_BSD || TRIO_GNU -# define QUALIFIER_QUAD 'q' -#endif -#if TRIO_GNU -# define QUALIFIER_SIZE_T_UPPER 'Z' -#endif -#if TRIO_MISC -# define QUALIFIER_WIDECHAR 'w' -#endif -#if TRIO_MICROSOFT -# define QUALIFIER_FIXED_SIZE 'I' -#endif -#if TRIO_EXTENSION -# define QUALIFIER_QUOTE '\'' -# define QUALIFIER_STICKY '!' -# define QUALIFIER_VARSIZE '&' /* This should remain undocumented */ -# define QUALIFIER_PARAM '@' /* Experimental */ -# define QUALIFIER_COLON ':' /* For scanlists */ -# define QUALIFIER_EQUAL '=' /* For scanlists */ -#endif -#if DATAGRID_EXTENSION -# define QUALIFIER_ESCAPE '|' -#endif - - -/************************************************************************* - * Internal structures - */ - -/* Parameters */ -typedef struct { - int type; - unsigned long flags; - int width; - int precision; - int base; - int varsize; -#ifdef QUALIFIER_ESCAPE - enum dg_escape { ESCAPE_NONE, ESCAPE_ULM, ESCAPE_XML, ESCAPE_SQL } escape; -#endif - int indexAfterSpecifier; - union { - char *string; -#if TRIO_WIDECHAR - wchar_t *wstring; -#endif - void *pointer; - union { - trio_uintmax_t as_signed; - trio_intmax_t as_unsigned; - } number; - double doubleNumber; - double *doublePointer; - long double longdoubleNumber; - long double *longdoublePointer; - int errorNumber; - } data; - /* For the user-defined specifier */ - char user_name[MAX_USER_NAME]; - char user_data[MAX_USER_DATA]; -} parameter_T; - -/* General trio "class" */ -typedef struct _trio_T { - void *location; - void (*OutStream)(struct _trio_T *, int); - void (*InStream)(struct _trio_T *, int *); - /* - * The number of characters that would have been written/read if - * there had been sufficient space. - */ - int processed; - /* - * The number of characters that are actually written/read. - * Processed and committed with only differ for the *nprintf - * and *nscanf functions. - */ - int committed; - int max; - int current; -} trio_T; - -/* References (for user-defined callbacks) */ -typedef struct _reference_T { - trio_T *data; - parameter_T *parameter; -} reference_T; - -/* Registered entries (for user-defined callbacks) */ -typedef struct _userdef_T { - struct _userdef_T *next; - trio_callback_t callback; - char *name; -} userdef_T; - - -/************************************************************************* - * Internal variables - */ - -static const char null[] = "(nil)"; - -#if defined(USE_LOCALE) -static struct lconv *internalLocaleValues = NULL; -#endif - -/* - * UNIX98 says "in a locale where the radix character is not defined, - * the radix character defaults to a period (.)" - */ -static char internalDecimalPoint[MAX_LOCALE_SEPARATOR_LENGTH + 1] = "."; -static char internalThousandSeparator[MAX_LOCALE_SEPARATOR_LENGTH + 1] = ","; -static char internalGrouping[MAX_LOCALE_GROUPS] = { (char)NO_GROUPING }; - -static const char internalDigitsLower[] = "0123456789abcdefghijklmnopqrstuvwxyz"; -static const char internalDigitsUpper[] = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"; -static BOOLEAN_T internalDigitsUnconverted = TRUE; -static int internalDigitArray[128]; -#if TRIO_EXTENSION -static BOOLEAN_T internalCollationUnconverted = TRUE; -static char internalCollationArray[MAX_CHARACTER_CLASS][MAX_CHARACTER_CLASS]; -#endif - -static volatile trio_callback_t internalEnterCriticalRegion = NULL; -static volatile trio_callback_t internalLeaveCriticalRegion = NULL; -static userdef_T *internalUserDef = NULL; - - -/************************************************************************* - * trio_strerror [public] - */ -const char *trio_strerror(int errorcode) -{ - /* Textual versions of the error codes */ - switch (TRIO_ERROR_CODE(errorcode)) - { - case TRIO_EOF: - return "End of file"; - case TRIO_EINVAL: - return "Invalid argument"; - case TRIO_ETOOMANY: - return "Too many arguments"; - case TRIO_EDBLREF: - return "Double reference"; - case TRIO_EGAP: - return "Reference gap"; - case TRIO_ENOMEM: - return "Out of memory"; - case TRIO_ERANGE: - return "Invalid range"; - default: - return "Unknown"; - } -} - -/************************************************************************* - * TrioIsQualifier [private] - * - * Description: - * Remember to add all new qualifiers to this function. - * QUALIFIER_POSITION must not be added. - */ -static BOOLEAN_T -TrioIsQualifier(const char ch) -{ - /* QUALIFIER_POSITION is not included */ - switch (ch) - { - case '0': case '1': case '2': case '3': case '4': - case '5': case '6': case '7': case '8': case '9': - case QUALIFIER_PLUS: - case QUALIFIER_MINUS: - case QUALIFIER_SPACE: - case QUALIFIER_DOT: - case QUALIFIER_STAR: - case QUALIFIER_ALTERNATIVE: - case QUALIFIER_SHORT: - case QUALIFIER_LONG: - case QUALIFIER_LONG_UPPER: - case QUALIFIER_CIRCUMFLEX: -#if defined(QUALIFIER_SIZE_T) - case QUALIFIER_SIZE_T: -#endif -#if defined(QUALIFIER_PTRDIFF_T) - case QUALIFIER_PTRDIFF_T: -#endif -#if defined(QUALIFIER_INTMAX_T) - case QUALIFIER_INTMAX_T: -#endif -#if defined(QUALIFIER_QUAD) - case QUALIFIER_QUAD: -#endif -#if defined(QUALIFIER_SIZE_T_UPPER) - case QUALIFIER_SIZE_T_UPPER: -#endif -#if defined(QUALIFIER_WIDECHAR) - case QUALIFIER_WIDECHAR: -#endif -#if defined(QUALIFIER_QUOTE) - case QUALIFIER_QUOTE: -#endif -#if defined(QUALIFIER_STICKY) - case QUALIFIER_STICKY: -#endif -#if defined(QUALIFIER_VARSIZE) - case QUALIFIER_VARSIZE: -#endif -#if defined(QUALIFIER_PARAM) - case QUALIFIER_PARAM: -#endif -#if defined(QUALIFIER_FIXED_SIZE) - case QUALIFIER_FIXED_SIZE: -#endif -#ifdef QUALIFIER_ESCAPE - case QUALIFIER_ESCAPE: -#endif - return TRUE; - default: - return FALSE; - } -} - -/************************************************************************* - * TrioGenerateNan [private] - * - * Calculating NaN portably is difficult. Some compilers will emit - * warnings about divide by zero, and others will simply fail to - * generate a NaN. - */ -static double -TrioGenerateNaN(void) -{ -#if defined(TRIO_COMPILER_SUPPORTS_C99) - return nan(NULL); -#elif defined(DBL_QNAN) - return DBL_QNAN; -#elif defined(PLATFORM_UNIX) - double value; - void (*signal_handler)(int); - - signal_handler = signal(SIGFPE, SIG_IGN); - value = 0.0 / 0.0; - signal(SIGFPE, signal_handler); - return value; -#else - return 0.0 / 0.0; -#endif -} - -/************************************************************************* - * TrioIsNan [private] - */ -static int -TrioIsNan(double number) -{ -#ifdef isnan - /* C99 defines isnan() as a macro */ - return isnan(number); -#else - double integral, fraction; - - return (/* NaN is the only number which does not compare to itself */ - (number != number) || - /* Fallback solution if NaN compares to NaN */ - ((number != 0.0) && - (fraction = modf(number, &integral), - integral == fraction))); -#endif -} - -/************************************************************************* - * TrioIsInfinite [private] - */ -static int -TrioIsInfinite(double number) -{ -#ifdef isinf - /* C99 defines isinf() as a macro */ - return isinf(number); -#else - return ((number == HUGE_VAL) ? 1 : ((number == -HUGE_VAL) ? -1 : 0)); -#endif -} - -/************************************************************************* - * TrioSetLocale [private] - */ -#if defined(USE_LOCALE) -static void -TrioSetLocale(void) -{ - internalLocaleValues = (struct lconv *)localeconv(); - if (internalLocaleValues) - { - if ((internalLocaleValues->decimal_point) && - (internalLocaleValues->decimal_point[0] != NIL)) - { - StrCopyMax(internalDecimalPoint, - sizeof(internalDecimalPoint), - internalLocaleValues->decimal_point); - } - if ((internalLocaleValues->thousands_sep) && - (internalLocaleValues->thousands_sep[0] != NIL)) - { - StrCopyMax(internalThousandSeparator, - sizeof(internalThousandSeparator), - internalLocaleValues->thousands_sep); - } - if ((internalLocaleValues->grouping) && - (internalLocaleValues->grouping[0] != NIL)) - { - StrCopyMax(internalGrouping, - sizeof(internalGrouping), - internalLocaleValues->grouping); - } - } -} -#endif /* defined(USE_LOCALE) */ - -/************************************************************************* - * TrioGetPosition [private] - * - * Get the %n$ position. - */ -static int -TrioGetPosition(const char *format, - int *indexPointer) -{ - char *tmpformat; - int number = 0; - int index = *indexPointer; - - number = (int)StrToLong(&format[index], &tmpformat, BASE_DECIMAL); - index = (int)(tmpformat - format); - if ((number != 0) && (QUALIFIER_POSITION == format[index++])) - { - *indexPointer = index; - /* - * number is decreased by 1, because n$ starts from 1, whereas - * the array it is indexing starts from 0. - */ - return number - 1; - } - return NO_POSITION; -} - -/************************************************************************* - * TrioFindNamespace [private] - * - * Find registered user-defined specifier. - * The prev argument is used for optimisation only. - */ -static userdef_T * -TrioFindNamespace(const char *name, userdef_T **prev) -{ - userdef_T *def; - - if (internalEnterCriticalRegion) - (void)internalEnterCriticalRegion(NULL); - - for (def = internalUserDef; def; def = def->next) - { - /* Case-sensitive string comparison */ - if (StrEqualCase(def->name, name)) - break; - - if (prev) - *prev = def; - } - - if (internalLeaveCriticalRegion) - (void)internalLeaveCriticalRegion(NULL); - - return def; -} - -/************************************************************************* - * TrioPreprocess [private] - * - * Description: - * Parse the format string - */ -static int -TrioPreprocess(int type, - const char *format, - parameter_T *parameters, - va_list arglist, - void **argarray) -{ -#if TRIO_ERRORS - /* Count the number of times a parameter is referenced */ - unsigned short usedEntries[MAX_PARAMETERS]; -#endif - /* Parameter counters */ - int parameterPosition; - int currentParam; - int maxParam = -1; - /* Utility variables */ - unsigned long flags; - int width; - int precision; - int varsize; -#ifdef QUALIFIER_ESCAPE - enum dg_escape escape; -#endif - int base; - int index; /* Index into formatting string */ - int dots; /* Count number of dots in modifier part */ - BOOLEAN_T positional; /* Does the specifier have a positional? */ - BOOLEAN_T got_sticky = FALSE; /* Are there any sticky modifiers at all? */ - /* - * indices specifies the order in which the parameters must be - * read from the va_args (this is necessary to handle positionals) - */ - int indices[MAX_PARAMETERS]; - int pos = 0; - /* Various variables */ - char ch; -#if defined(TRIO_COMPILER_SUPPORTS_MULTIBYTE) - int charlen; -#endif - int i = -1; - int num; - char *tmpformat; - - -#if TRIO_ERRORS - /* - * The 'parameters' array is not initialized, but we need to - * know which entries we have used. - */ - memset(usedEntries, 0, sizeof(usedEntries)); -#endif - - index = 0; - parameterPosition = 0; -#if defined(TRIO_COMPILER_SUPPORTS_MULTIBYTE) - mblen(NULL, 0); -#endif - - while (format[index]) - { -#if defined(TRIO_COMPILER_SUPPORTS_MULTIBYTE) - if (! isascii(format[index])) - { - /* - * Multibyte characters cannot be legal specifiers or - * modifiers, so we skip over them. - */ - charlen = mblen(&format[index], MB_LEN_MAX); - index += (charlen > 0) ? charlen : 1; - continue; /* while */ - } -#endif /* TRIO_COMPILER_SUPPORTS_MULTIBYTE */ - if (CHAR_IDENTIFIER == format[index++]) - { - if (CHAR_IDENTIFIER == format[index]) - { - index++; - continue; /* while */ - } - - flags = FLAGS_NEW; - dots = 0; - currentParam = TrioGetPosition(format, &index); - positional = (NO_POSITION != currentParam); - if (!positional) - { - /* We have no positional, get the next counter */ - currentParam = parameterPosition; - } - if(currentParam >= MAX_PARAMETERS) - { - /* Bail out completely to make the error more obvious */ - return TRIO_ERROR_RETURN(TRIO_ETOOMANY, index); - } - - if (currentParam > maxParam) - maxParam = currentParam; - - /* Default values */ - width = NO_WIDTH; - precision = NO_PRECISION; - base = NO_BASE; - varsize = NO_SIZE; -#ifdef QUALIFIER_ESCAPE - escape = ESCAPE_NONE; -#endif - - while (TrioIsQualifier(format[index])) - { - ch = format[index++]; - - switch (ch) - { - case QUALIFIER_SPACE: - flags |= FLAGS_SPACE; - break; - - case QUALIFIER_PLUS: - flags |= FLAGS_SHOWSIGN; - break; - - case QUALIFIER_MINUS: - flags |= FLAGS_LEFTADJUST; - flags &= ~FLAGS_NILPADDING; - break; - - case QUALIFIER_ALTERNATIVE: - flags |= FLAGS_ALTERNATIVE; - break; - - case QUALIFIER_DOT: - if (dots == 0) /* Precision */ - { - dots++; - - /* Skip if no precision */ - if (QUALIFIER_DOT == format[index]) - break; - - /* After the first dot we have the precision */ - flags |= FLAGS_PRECISION; - if ((QUALIFIER_STAR == format[index]) || - (QUALIFIER_PARAM == format[index])) - { - index++; - flags |= FLAGS_PRECISION_PARAMETER; - - precision = TrioGetPosition(format, &index); - if (precision == NO_POSITION) - { - parameterPosition++; - if (positional) - precision = parameterPosition; - else - { - precision = currentParam; - currentParam = precision + 1; - } - } - else - { - if (! positional) - currentParam = precision + 1; - if (width > maxParam) - maxParam = precision; - } - if (currentParam > maxParam) - maxParam = currentParam; - } - else - { - precision = StrToLong(&format[index], &tmpformat, BASE_DECIMAL); - index = (int)(tmpformat - format); - } - } - else if (dots == 1) /* Base */ - { - dots++; - - /* After the second dot we have the base */ - flags |= FLAGS_BASE; - if ((QUALIFIER_STAR == format[index]) || - (QUALIFIER_PARAM == format[index])) - { - index++; - flags |= FLAGS_BASE_PARAMETER; - base = TrioGetPosition(format, &index); - if (base == NO_POSITION) - { - parameterPosition++; - if (positional) - base = parameterPosition; - else - { - base = currentParam; - currentParam = base + 1; - } - } - else - { - if (! positional) - currentParam = base + 1; - if (base > maxParam) - maxParam = base; - } - if (currentParam > maxParam) - maxParam = currentParam; - } - else - { - base = StrToLong(&format[index], &tmpformat, BASE_DECIMAL); - if (base > MAX_BASE) - return TRIO_ERROR_RETURN(TRIO_EINVAL, index); - index = (int)(tmpformat - format); - } - } - else - { - return TRIO_ERROR_RETURN(TRIO_EINVAL, index); - } - break; /* QUALIFIER_DOT */ - - case QUALIFIER_PARAM: - type = TYPE_PRINT; - /* FALLTHROUGH */ - case QUALIFIER_STAR: - /* This has different meanings for print and scan */ - if (TYPE_PRINT == type) - { - /* Read with from parameter */ - flags |= (FLAGS_WIDTH | FLAGS_WIDTH_PARAMETER); - width = TrioGetPosition(format, &index); - if (width == NO_POSITION) - { - parameterPosition++; - if (positional) - width = parameterPosition; - else - { - width = currentParam; - currentParam = width + 1; - } - } - else - { - if (! positional) - currentParam = width + 1; - if (width > maxParam) - maxParam = width; - } - if (currentParam > maxParam) - maxParam = currentParam; - } - else - { - /* Scan, but do not store result */ - flags |= FLAGS_IGNORE; - } - - break; /* QUALIFIER_STAR */ - - case '0': - if (! (flags & FLAGS_LEFTADJUST)) - flags |= FLAGS_NILPADDING; - /* FALLTHROUGH */ - case '1': case '2': case '3': case '4': - case '5': case '6': case '7': case '8': case '9': - flags |= FLAGS_WIDTH; - /* &format[index - 1] is used to "rewind" the read - * character from format - */ - width = StrToLong(&format[index - 1], &tmpformat, BASE_DECIMAL); - index = (int)(tmpformat - format); - break; - - case QUALIFIER_SHORT: - if (flags & FLAGS_SHORTSHORT) - return TRIO_ERROR_RETURN(TRIO_EINVAL, index); - else if (flags & FLAGS_SHORT) - flags |= FLAGS_SHORTSHORT; - else - flags |= FLAGS_SHORT; - break; - - case QUALIFIER_LONG: - if (flags & FLAGS_QUAD) - return TRIO_ERROR_RETURN(TRIO_EINVAL, index); - else if (flags & FLAGS_LONG) - flags |= FLAGS_QUAD; - else - flags |= FLAGS_LONG; - break; - - case QUALIFIER_LONG_UPPER: - flags |= FLAGS_LONGDOUBLE; - break; - -#if defined(QUALIFIER_SIZE_T) - case QUALIFIER_SIZE_T: - flags |= FLAGS_SIZE_T; - /* Modify flags for later truncation of number */ - if (sizeof(size_t) == sizeof(trio_ulonglong_t)) - flags |= FLAGS_QUAD; - else if (sizeof(size_t) == sizeof(long)) - flags |= FLAGS_LONG; - break; -#endif - -#if defined(QUALIFIER_PTRDIFF_T) - case QUALIFIER_PTRDIFF_T: - flags |= FLAGS_PTRDIFF_T; - if (sizeof(ptrdiff_t) == sizeof(trio_ulonglong_t)) - flags |= FLAGS_QUAD; - else if (sizeof(ptrdiff_t) == sizeof(long)) - flags |= FLAGS_LONG; - break; -#endif - -#if defined(QUALIFIER_INTMAX_T) - case QUALIFIER_INTMAX_T: - flags |= FLAGS_INTMAX_T; - if (sizeof(trio_intmax_t) == sizeof(trio_ulonglong_t)) - flags |= FLAGS_QUAD; - else if (sizeof(trio_intmax_t) == sizeof(long)) - flags |= FLAGS_LONG; - break; -#endif - -#if defined(QUALIFIER_QUAD) - case QUALIFIER_QUAD: - flags |= FLAGS_QUAD; - break; -#endif - -#if defined(QUALIFIER_FIXED_SIZE) - case QUALIFIER_FIXED_SIZE: - if (flags & FLAGS_FIXED_SIZE) - return TRIO_ERROR_RETURN(TRIO_EINVAL, index); - - if (flags & (FLAGS_ALL_SIZES | FLAGS_LONGDOUBLE | - FLAGS_WIDECHAR | FLAGS_VARSIZE_PARAMETER)) - return TRIO_ERROR_RETURN(TRIO_EINVAL, index); - - if ((format[index] == '6') && - (format[index + 1] == '4')) - { - varsize = sizeof(trio_int64_t); - index += 2; - } - else if ((format[index] == '3') && - (format[index + 1] == '2')) - { - varsize = sizeof(trio_int32_t); - index += 2; - } - else if ((format[index] == '1') && - (format[index + 1] == '6')) - { - varsize = sizeof(trio_int16_t); - index += 2; - } - else if (format[index] == '8') - { - varsize = sizeof(trio_int8_t); - index++; - } - else - return TRIO_ERROR_RETURN(TRIO_EINVAL, index); - - flags |= FLAGS_FIXED_SIZE; - break; -#endif - -#ifdef QUALIFIER_ESCAPE - case QUALIFIER_ESCAPE: - switch (format[index++]) { - case 'U': escape = ESCAPE_ULM; break; - case 'X': escape = ESCAPE_XML; break; - case 'S': escape = ESCAPE_SQL; break; - default: return TRIO_ERROR_RETURN(TRIO_EINVAL,index); - } - break; -#endif - - -#if defined(QUALIFIER_WIDECHAR) - case QUALIFIER_WIDECHAR: - flags |= FLAGS_WIDECHAR; - break; -#endif - -#if defined(QUALIFIER_SIZE_T_UPPER) - case QUALIFIER_SIZE_T_UPPER: - break; -#endif - -#if defined(QUALIFIER_QUOTE) - case QUALIFIER_QUOTE: - flags |= FLAGS_QUOTE; - break; -#endif - -#if defined(QUALIFIER_STICKY) - case QUALIFIER_STICKY: - flags |= FLAGS_STICKY; - got_sticky = TRUE; - break; -#endif - -#if defined(QUALIFIER_VARSIZE) - case QUALIFIER_VARSIZE: - flags |= FLAGS_VARSIZE_PARAMETER; - parameterPosition++; - if (positional) - varsize = parameterPosition; - else - { - varsize = currentParam; - currentParam = varsize + 1; - } - if (currentParam > maxParam) - maxParam = currentParam; - break; -#endif - - default: - /* Bail out completely to make the error more obvious */ - return TRIO_ERROR_RETURN(TRIO_EINVAL, index); - } - } /* while qualifier */ - - /* - * Parameters only need the type and value. The value is - * read later. - */ - if (flags & FLAGS_WIDTH_PARAMETER) - { -#if TRIO_ERRORS - usedEntries[width] += 1; -#endif - parameters[pos].type = FORMAT_PARAMETER; - indices[width] = pos; - width = pos++; - } - if (flags & FLAGS_PRECISION_PARAMETER) - { -#if TRIO_ERRORS - usedEntries[precision] += 1; -#endif - parameters[pos].type = FORMAT_PARAMETER; - indices[precision] = pos; - precision = pos++; - } - if (flags & FLAGS_BASE_PARAMETER) - { -#if TRIO_ERRORS - usedEntries[base] += 1; -#endif - parameters[pos].type = FORMAT_PARAMETER; - indices[base] = pos; - base = pos++; - } - if (flags & FLAGS_VARSIZE_PARAMETER) - { -#if TRIO_ERRORS - usedEntries[varsize] += 1; -#endif - parameters[pos].type = FORMAT_PARAMETER; - indices[varsize] = pos; - varsize = pos++; - } - - indices[currentParam] = pos; - - switch (format[index++]) - { -#if defined(SPECIFIER_CHAR_UPPER) - case SPECIFIER_CHAR_UPPER: - flags |= FLAGS_WIDECHAR; - /* FALLTHROUGH */ -#endif - case SPECIFIER_CHAR: - if (flags & FLAGS_LONG) - flags |= FLAGS_WIDECHAR; - else if (flags & FLAGS_SHORT) - flags &= ~FLAGS_WIDECHAR; - parameters[pos].type = FORMAT_CHAR; - break; - -#if defined(SPECIFIER_STRING_UPPER) - case SPECIFIER_STRING_UPPER: - flags |= FLAGS_WIDECHAR; - /* FALLTHROUGH */ -#endif - case SPECIFIER_STRING: - if (flags & FLAGS_LONG) - flags |= FLAGS_WIDECHAR; - else if (flags & FLAGS_SHORT) - flags &= ~FLAGS_WIDECHAR; - parameters[pos].type = FORMAT_STRING; - break; - - - case SPECIFIER_GROUP: - if (TYPE_SCAN == type) - { - int depth = 1; - parameters[pos].type = FORMAT_GROUP; - if (format[index] == QUALIFIER_CIRCUMFLEX) - index++; - if (format[index] == SPECIFIER_UNGROUP) - index++; - if (format[index] == QUALIFIER_MINUS) - index++; - /* Skip nested brackets */ - while (format[index] != NIL) - { - if (format[index] == SPECIFIER_GROUP) - { - depth++; - } - else if (format[index] == SPECIFIER_UNGROUP) - { - if (--depth <= 0) - { - index++; - break; - } - } - index++; - } - } - break; - - case SPECIFIER_INTEGER: - parameters[pos].type = FORMAT_INT; - break; - - case SPECIFIER_UNSIGNED: - flags |= FLAGS_UNSIGNED; - parameters[pos].type = FORMAT_INT; - break; - - case SPECIFIER_DECIMAL: - /* Disable base modifier */ - flags &= ~FLAGS_BASE_PARAMETER; - base = BASE_DECIMAL; - parameters[pos].type = FORMAT_INT; - break; - - case SPECIFIER_OCTAL: - flags &= ~FLAGS_BASE_PARAMETER; - base = BASE_OCTAL; - parameters[pos].type = FORMAT_INT; - break; - -#if defined(SPECIFIER_BINARY) - case SPECIFIER_BINARY_UPPER: - flags |= FLAGS_UPPER; - /* FALLTHROUGH */ - case SPECIFIER_BINARY: - flags |= FLAGS_NILPADDING; - flags &= ~FLAGS_BASE_PARAMETER; - base = BASE_BINARY; - parameters[pos].type = FORMAT_INT; - break; -#endif - - case SPECIFIER_HEX_UPPER: - flags |= FLAGS_UPPER; - /* FALLTHROUGH */ - case SPECIFIER_HEX: - flags |= FLAGS_UNSIGNED; - flags &= ~FLAGS_BASE_PARAMETER; - base = BASE_HEX; - parameters[pos].type = FORMAT_INT; - break; - - case SPECIFIER_FLOAT_E_UPPER: - flags |= FLAGS_UPPER; - /* FALLTHROUGH */ - case SPECIFIER_FLOAT_E: - flags |= FLAGS_FLOAT_E; - parameters[pos].type = FORMAT_DOUBLE; - break; - - case SPECIFIER_FLOAT_G_UPPER: - flags |= FLAGS_UPPER; - /* FALLTHROUGH */ - case SPECIFIER_FLOAT_G: - flags |= FLAGS_FLOAT_G; - parameters[pos].type = FORMAT_DOUBLE; - break; - - case SPECIFIER_FLOAT_F_UPPER: - flags |= FLAGS_UPPER; - /* FALLTHROUGH */ - case SPECIFIER_FLOAT_F: - parameters[pos].type = FORMAT_DOUBLE; - break; - - case SPECIFIER_POINTER: - parameters[pos].type = FORMAT_POINTER; - break; - - case SPECIFIER_COUNT: - parameters[pos].type = FORMAT_COUNT; - break; - -#if defined(SPECIFIER_HEXFLOAT) -# if defined(SPECIFIER_HEXFLOAT_UPPER) - case SPECIFIER_HEXFLOAT_UPPER: - flags |= FLAGS_UPPER; - /* FALLTHROUGH */ -# endif - case SPECIFIER_HEXFLOAT: - base = BASE_HEX; - parameters[pos].type = FORMAT_DOUBLE; - break; -#endif - -#if defined(FORMAT_ERRNO) - case SPECIFIER_ERRNO: - parameters[pos].type = FORMAT_ERRNO; - break; -#endif - -#if defined(SPECIFIER_USER_DEFINED_BEGIN) - case SPECIFIER_USER_DEFINED_BEGIN: - { - unsigned int max; - int without_namespace = TRUE; - - parameters[pos].type = FORMAT_USER_DEFINED; - parameters[pos].user_name[0] = NIL; - tmpformat = (char *)&format[index]; - - while ((ch = format[index])) - { - index++; - if (ch == SPECIFIER_USER_DEFINED_END) - { - if (without_namespace) - { - /* We must get the handle first */ - parameters[pos].type = FORMAT_PARAMETER; - parameters[pos].indexAfterSpecifier = index; - parameters[pos].flags = FLAGS_USER_DEFINED; - /* Adjust parameters for insertion of new one */ - pos++; -# if TRIO_ERRORS - usedEntries[currentParam] += 1; -# endif - parameters[pos].type = FORMAT_USER_DEFINED; - currentParam++; - indices[currentParam] = pos; - if (currentParam > maxParam) - maxParam = currentParam; - } - /* Copy the user data */ - max = (unsigned int)(&format[index] - tmpformat); - if (max > MAX_USER_DATA) - max = MAX_USER_DATA; - StrCopyMax(parameters[pos].user_data, - max, - tmpformat); - break; /* while */ - } - if (ch == SPECIFIER_USER_DEFINED_SEPARATOR) - { - without_namespace = FALSE; - /* Copy the namespace for later looking-up */ - max = (int)(&format[index] - tmpformat); - if (max > MAX_USER_NAME) - max = MAX_USER_NAME; - StrCopyMax(parameters[pos].user_name, - max, - tmpformat); - tmpformat = (char *)&format[index]; - } - } - if (ch != SPECIFIER_USER_DEFINED_END) - return TRIO_ERROR_RETURN(TRIO_EINVAL, index); - } - break; -#endif /* defined(SPECIFIER_USER_DEFINED_BEGIN) */ - - default: - /* Bail out completely to make the error more obvious */ - return TRIO_ERROR_RETURN(TRIO_EINVAL, index); - } - -#if TRIO_ERRORS - /* Count the number of times this entry has been used */ - usedEntries[currentParam] += 1; -#endif - - /* Find last sticky parameters */ - if (got_sticky && !(flags & FLAGS_STICKY)) - { - for (i = pos - 1; i >= 0; i--) - { - if (parameters[i].type == FORMAT_PARAMETER) - continue; - if ((parameters[i].flags & FLAGS_STICKY) && - (parameters[i].type == parameters[pos].type)) - { - /* Do not overwrite current qualifiers */ - flags |= (parameters[i].flags & (unsigned long)~FLAGS_STICKY); - if (width == NO_WIDTH) - width = parameters[i].width; - if (precision == NO_PRECISION) - precision = parameters[i].precision; - if (base == NO_BASE) - base = parameters[i].base; - break; - } - } - } - - parameters[pos].indexAfterSpecifier = index; - parameters[pos].flags = flags; - parameters[pos].width = width; - parameters[pos].precision = precision; - parameters[pos].base = (base == NO_BASE) ? BASE_DECIMAL : base; - parameters[pos].varsize = varsize; -#ifdef QUALIFIER_ESCAPE - parameters[pos].escape = escape; -#endif - pos++; - - if (! positional) - parameterPosition++; - - } /* if identifier */ - - } /* while format characters left */ - - for (num = 0; num <= maxParam; num++) - { -#if TRIO_ERRORS - if (usedEntries[num] != 1) - { - if (usedEntries[num] == 0) /* gap detected */ - return TRIO_ERROR_RETURN(TRIO_EGAP, num); - else /* double references detected */ - return TRIO_ERROR_RETURN(TRIO_EDBLREF, num); - } -#endif - - i = indices[num]; - - /* - * FORMAT_PARAMETERS are only present if they must be read, - * so it makes no sense to check the ignore flag (besides, - * the flags variable is not set for that particular type) - */ - if ((parameters[i].type != FORMAT_PARAMETER) && - (parameters[i].flags & FLAGS_IGNORE)) - continue; /* for all arguments */ - - /* - * The stack arguments are read according to ANSI C89 - * default argument promotions: - * - * char = int - * short = int - * unsigned char = unsigned int - * unsigned short = unsigned int - * float = double - * - * In addition to the ANSI C89 these types are read (the - * default argument promotions of C99 has not been - * considered yet) - * - * long long - * long double - * size_t - * ptrdiff_t - * intmax_t - */ - switch (parameters[i].type) - { - case FORMAT_GROUP: - case FORMAT_STRING: -#if TRIO_WIDECHAR - if (flags & FLAGS_WIDECHAR) - { - parameters[i].data.wstring = (argarray == NULL) - ? va_arg(arglist, wchar_t *) - : (wchar_t *)(argarray[num]); - } - else -#endif - { - parameters[i].data.string = (argarray == NULL) - ? va_arg(arglist, char *) - : (char *)(argarray[num]); - } - break; - - case FORMAT_POINTER: - case FORMAT_COUNT: - case FORMAT_USER_DEFINED: - case FORMAT_UNKNOWN: - parameters[i].data.pointer = (argarray == NULL) - ? va_arg(arglist, void *) - : argarray[num]; - break; - - case FORMAT_CHAR: - case FORMAT_INT: - if (TYPE_SCAN == type) - { - if (argarray == NULL) - parameters[i].data.pointer = - (trio_uintmax_t *)va_arg(arglist, void *); - else - { - if (parameters[i].type == FORMAT_CHAR) - parameters[i].data.pointer = - (trio_uintmax_t *)((char *)argarray[num]); - else if (parameters[i].flags & FLAGS_SHORT) - parameters[i].data.pointer = - (trio_uintmax_t *)((short *)argarray[num]); - else - parameters[i].data.pointer = - (trio_uintmax_t *)((int *)argarray[num]); - } - } - else - { -#if defined(QUALIFIER_VARSIZE) || defined(QUALIFIER_FIXED_SIZE) - if ((parameters[i].flags & FLAGS_VARSIZE_PARAMETER) || - (parameters[i].flags & FLAGS_FIXED_SIZE)) - { - if (parameters[i].flags & FLAGS_VARSIZE_PARAMETER) - { - /* - * Variable sizes are mapped onto the fixed sizes, in - * accordance with integer promotion. - * - * Please note that this may not be portable, as we - * only guess the size, not the layout of the numbers. - * For example, if int is little-endian, and long is - * big-endian, then this will fail. - */ - varsize = (int)parameters[parameters[i].varsize].data.number.as_unsigned; - } - else - { - /* Used for the I modifiers */ - varsize = parameters[i].varsize; - } - parameters[i].flags &= ~FLAGS_ALL_VARSIZES; - - if (varsize <= (int)sizeof(int)) - ; - else if (varsize <= (int)sizeof(long)) - parameters[i].flags |= FLAGS_LONG; -#if defined(QUALIFIER_INTMAX_T) - else if (varsize <= (int)sizeof(trio_longlong_t)) - parameters[i].flags |= FLAGS_QUAD; - else - parameters[i].flags |= FLAGS_INTMAX_T; -#else - else - parameters[i].flags |= FLAGS_QUAD; -#endif - } -#endif /* defined(QUALIFIER_VARSIZE) */ -#if defined(QUALIFIER_SIZE_T) || defined(QUALIFIER_SIZE_T_UPPER) - if (parameters[i].flags & FLAGS_SIZE_T) - parameters[i].data.number.as_unsigned = (argarray == NULL) - ? (trio_uintmax_t)va_arg(arglist, size_t) - : (trio_uintmax_t)(*((size_t *)argarray[num])); - else -#endif -#if defined(QUALIFIER_PTRDIFF_T) - if (parameters[i].flags & FLAGS_PTRDIFF_T) - parameters[i].data.number.as_unsigned = (argarray == NULL) - ? (trio_uintmax_t)va_arg(arglist, ptrdiff_t) - : (trio_uintmax_t)(*((ptrdiff_t *)argarray[num])); - else -#endif -#if defined(QUALIFIER_INTMAX_T) - if (parameters[i].flags & FLAGS_INTMAX_T) - parameters[i].data.number.as_unsigned = (argarray == NULL) - ? (trio_uintmax_t)va_arg(arglist, trio_intmax_t) - : (trio_uintmax_t)(*((trio_intmax_t *)argarray[num])); - else -#endif - if (parameters[i].flags & FLAGS_QUAD) - parameters[i].data.number.as_unsigned = (argarray == NULL) - ? (trio_uintmax_t)va_arg(arglist, trio_ulonglong_t) - : (trio_uintmax_t)(*((trio_ulonglong_t *)argarray[num])); - else if (parameters[i].flags & FLAGS_LONG) - parameters[i].data.number.as_unsigned = (argarray == NULL) - ? (trio_uintmax_t)va_arg(arglist, long) - : (trio_uintmax_t)(*((long *)argarray[num])); - else - { - if (argarray == NULL) - parameters[i].data.number.as_unsigned = (trio_uintmax_t)va_arg(arglist, int); - else - { - if (parameters[i].type == FORMAT_CHAR) - parameters[i].data.number.as_unsigned = (trio_uintmax_t)(*((char *)argarray[num])); - else if (parameters[i].flags & FLAGS_SHORT) - parameters[i].data.number.as_unsigned = (trio_uintmax_t)(*((short *)argarray[num])); - else - parameters[i].data.number.as_unsigned = (trio_uintmax_t)(*((int *)argarray[num])); - } - } - } - break; - - case FORMAT_PARAMETER: - /* - * The parameter for the user-defined specifier is a pointer, - * whereas the rest (width, precision, base) uses an integer. - */ - if (parameters[i].flags & FLAGS_USER_DEFINED) - parameters[i].data.pointer = (argarray == NULL) - ? va_arg(arglist, void *) - : argarray[num]; - else - parameters[i].data.number.as_unsigned = (argarray == NULL) - ? (trio_uintmax_t)va_arg(arglist, int) - : (trio_uintmax_t)(*((int *)argarray[num])); - break; - - case FORMAT_DOUBLE: - if (TYPE_SCAN == type) - { - if (parameters[i].flags & FLAGS_LONG) - parameters[i].data.longdoublePointer = (argarray == NULL) - ? va_arg(arglist, long double *) - : (long double *)((long double *)argarray[num]); - else - { - if (argarray == NULL) - parameters[i].data.doublePointer = - va_arg(arglist, double *); - else - { - if (parameters[i].flags & FLAGS_SHORT) - parameters[i].data.doublePointer = - (double *)((float *)argarray[num]); - else - parameters[i].data.doublePointer = - (double *)((double *)argarray[num]); - } - } - } - else - { - if (parameters[i].flags & FLAGS_LONG) - parameters[i].data.longdoubleNumber = (argarray == NULL) - ? va_arg(arglist, long double) - : (long double)(*((long double *)argarray[num])); - else - { - if (argarray == NULL) - parameters[i].data.longdoubleNumber = (long double)va_arg(arglist, double); - else - { - if (parameters[i].flags & FLAGS_SHORT) - parameters[i].data.longdoubleNumber = (long double)(*((float *)argarray[num])); - else - parameters[i].data.longdoubleNumber = (long double)(long double)(*((double *)argarray[num])); - } - } - } - break; - -#if defined(FORMAT_ERRNO) - case FORMAT_ERRNO: - parameters[i].data.errorNumber = errno; - break; -#endif - - default: - break; - } - } /* for all specifiers */ - return num; -} - - -/************************************************************************* - * - * @FORMATTING - * - ************************************************************************/ - - -/************************************************************************* - * TrioWriteNumber [private] - * - * Description: - * Output a number. - * The complexity of this function is a result of the complexity - * of the dependencies of the flags. - */ -static void -TrioWriteNumber(trio_T *self, - trio_uintmax_t number, - unsigned long flags, - int width, - int precision, - int base) -{ - BOOLEAN_T isNegative; - char buffer[MAX_CHARS_IN(trio_uintmax_t) * (1 + MAX_LOCALE_SEPARATOR_LENGTH) + 1]; - char *bufferend; - char *pointer; - const char *digits; - int i; - int length; - char *p; - int charsPerThousand; - int groupingIndex; - int count; - - assert(VALID(self)); - assert(VALID(self->OutStream)); - assert((base >= MIN_BASE && base <= MAX_BASE) || (base == NO_BASE)); - - digits = (flags & FLAGS_UPPER) ? internalDigitsUpper : internalDigitsLower; - - isNegative = (flags & FLAGS_UNSIGNED) - ? FALSE - : ((trio_intmax_t)number < 0); - if (isNegative) - number = -number; - - if (flags & FLAGS_QUAD) - number &= (trio_ulonglong_t)-1; - else if (flags & FLAGS_LONG) - number &= (unsigned long)-1; - else - number &= (unsigned int)-1; - - /* Build number */ - pointer = bufferend = &buffer[sizeof(buffer) - 1]; - *pointer-- = NIL; - charsPerThousand = (int)internalGrouping[0]; - groupingIndex = 1; - for (i = 1; i < (int)sizeof(buffer); i++) - { - *pointer-- = digits[number % base]; - number /= base; - if (number == 0) - break; - - if ((flags & FLAGS_QUOTE) - && (charsPerThousand != NO_GROUPING) - && (i % charsPerThousand == 0)) - { - /* - * We are building the number from the least significant - * to the most significant digit, so we have to copy the - * thousand separator backwards - */ - length = StrLength(internalThousandSeparator); - if (((int)(pointer - buffer) - length) > 0) - { - p = &internalThousandSeparator[length - 1]; - while (length-- > 0) - *pointer-- = *p--; - } - - /* Advance to next grouping number */ - switch (internalGrouping[groupingIndex]) - { - case CHAR_MAX: /* Disable grouping */ - charsPerThousand = NO_GROUPING; - break; - case 0: /* Repeat last group */ - break; - default: - charsPerThousand = (int)internalGrouping[groupingIndex++]; - break; - } - } - } - - /* Adjust width */ - width -= (bufferend - pointer) - 1; - - /* Adjust precision */ - if (NO_PRECISION != precision) - { - precision -= (bufferend - pointer) - 1; - if (precision < 0) - precision = 0; - flags |= FLAGS_NILPADDING; - } - - /* Adjust width further */ - if (isNegative || (flags & FLAGS_SHOWSIGN) || (flags & FLAGS_SPACE)) - width--; - if (flags & FLAGS_ALTERNATIVE) - { - switch (base) - { - case BASE_BINARY: - case BASE_HEX: - width -= 2; - break; - case BASE_OCTAL: - width--; - break; - default: - break; - } - } - - /* Output prefixes spaces if needed */ - if (! ((flags & FLAGS_LEFTADJUST) || - ((flags & FLAGS_NILPADDING) && (precision == NO_PRECISION)))) - { - count = (precision == NO_PRECISION) ? 0 : precision; - while (width-- > count) - self->OutStream(self, CHAR_ADJUST); - } - - /* width has been adjusted for signs and alternatives */ - if (isNegative) - self->OutStream(self, '-'); - else if (flags & FLAGS_SHOWSIGN) - self->OutStream(self, '+'); - else if (flags & FLAGS_SPACE) - self->OutStream(self, ' '); - - if (flags & FLAGS_ALTERNATIVE) - { - switch (base) - { - case BASE_BINARY: - self->OutStream(self, '0'); - self->OutStream(self, (flags & FLAGS_UPPER) ? 'B' : 'b'); - break; - - case BASE_OCTAL: - self->OutStream(self, '0'); - break; - - case BASE_HEX: - self->OutStream(self, '0'); - self->OutStream(self, (flags & FLAGS_UPPER) ? 'X' : 'x'); - break; - - default: - break; - } /* switch base */ - } - - /* Output prefixed zero padding if needed */ - if (flags & FLAGS_NILPADDING) - { - if (precision == NO_PRECISION) - precision = width; - while (precision-- > 0) - { - self->OutStream(self, '0'); - width--; - } - } - - /* Output the number itself */ - while (*(++pointer)) - { - self->OutStream(self, *pointer); - } - - /* Output trailing spaces if needed */ - if (flags & FLAGS_LEFTADJUST) - { - while (width-- > 0) - self->OutStream(self, CHAR_ADJUST); - } -} - -/************************************************************************* - * TrioWriteStringCharacter [private] - * - * Description: - * Output a single character of a string - */ -static void -TrioWriteStringCharacter(trio_T *self, - int ch, - unsigned long flags) -{ - if (flags & FLAGS_ALTERNATIVE) - { - if (! (isprint(ch) || isspace(ch))) - { - /* - * Non-printable characters are converted to C escapes or - * \number, if no C escape exists. - */ - self->OutStream(self, CHAR_BACKSLASH); - switch (ch) - { - case '\007': self->OutStream(self, 'a'); break; - case '\b': self->OutStream(self, 'b'); break; - case '\f': self->OutStream(self, 'f'); break; - case '\n': self->OutStream(self, 'n'); break; - case '\r': self->OutStream(self, 'r'); break; - case '\t': self->OutStream(self, 't'); break; - case '\v': self->OutStream(self, 'v'); break; - case '\\': self->OutStream(self, '\\'); break; - default: - self->OutStream(self, 'x'); - TrioWriteNumber(self, (trio_intmax_t)ch, - FLAGS_UNSIGNED | FLAGS_NILPADDING, - 2, 2, BASE_HEX); - break; - } - } - else if (ch == CHAR_BACKSLASH) - { - self->OutStream(self, CHAR_BACKSLASH); - self->OutStream(self, CHAR_BACKSLASH); - } - else - { - self->OutStream(self, ch); - } - } - else - { - self->OutStream(self, ch); - } -} - -/************************************************************************* - * TrioWriteString [private] - * - * Description: - * Output a string - */ -static void -TrioWriteString(trio_T *self, - const char *string, - unsigned long flags, - int width, - int precision) -{ - int length; - int ch; - - assert(VALID(self)); - assert(VALID(self->OutStream)); - - if (string == NULL) - { - string = null; - length = sizeof(null) - 1; - /* Disable quoting for the null pointer */ - flags &= (~FLAGS_QUOTE); - width = 0; - } - else - { - length = StrLength(string); - } - if ((NO_PRECISION != precision) && - (precision < length)) - { - length = precision; - } - width -= length; - - if (flags & FLAGS_QUOTE) - self->OutStream(self, CHAR_QUOTE); - - if (! (flags & FLAGS_LEFTADJUST)) - { - while (width-- > 0) - self->OutStream(self, CHAR_ADJUST); - } - - while (length-- > 0) - { - /* The ctype parameters must be an unsigned char (or EOF) */ - ch = (int)((unsigned char)(*string++)); - TrioWriteStringCharacter(self, ch, flags); - } - - if (flags & FLAGS_LEFTADJUST) - { - while (width-- > 0) - self->OutStream(self, CHAR_ADJUST); - } - if (flags & FLAGS_QUOTE) - self->OutStream(self, CHAR_QUOTE); -} - -/************************************************************************* - * TrioWriteWideStringCharacter [private] - * - * Description: - * Output a wide string as a multi-byte sequence - */ -#if TRIO_WIDECHAR -static int -TrioWriteWideStringCharacter(trio_T *self, - wchar_t wch, - unsigned long flags, - int width) -{ - int size; - int i; - int ch; - char *string; - char buffer[MB_LEN_MAX + 1]; - - if (width == NO_WIDTH) - width = sizeof(buffer); - - size = wctomb(buffer, wch); - if ((size <= 0) || (size > width) || (buffer[0] == NIL)) - return 0; - - string = buffer; - i = size; - while ((width >= i) && (width-- > 0) && (i-- > 0)) - { - /* The ctype parameters must be an unsigned char (or EOF) */ - ch = (int)((unsigned char)(*string++)); - TrioWriteStringCharacter(self, ch, flags); - } - return size; -} -#endif /* TRIO_WIDECHAR */ - -/************************************************************************* - * TrioWriteString [private] - * - * Description: - * Output a wide character string as a multi-byte string - */ -#if TRIO_WIDECHAR -static void -TrioWriteWideString(trio_T *self, - const wchar_t *wstring, - unsigned long flags, - int width, - int precision) -{ - int length; - int size; - - assert(VALID(self)); - assert(VALID(self->OutStream)); - -#if defined(TRIO_COMPILER_SUPPORTS_MULTIBYTE) - mblen(NULL, 0); -#endif - - if (wstring == NULL) - { - TrioWriteString(self, NULL, flags, width, precision); - return; - } - - if (NO_PRECISION == precision) - { - length = INT_MAX; - } - else - { - length = precision; - width -= length; - } - - if (flags & FLAGS_QUOTE) - self->OutStream(self, CHAR_QUOTE); - - if (! (flags & FLAGS_LEFTADJUST)) - { - while (width-- > 0) - self->OutStream(self, CHAR_ADJUST); - } - - while (length > 0) - { - size = TrioWriteWideStringCharacter(self, *wstring++, flags, length); - if (size == 0) - break; /* while */ - length -= size; - } - - if (flags & FLAGS_LEFTADJUST) - { - while (width-- > 0) - self->OutStream(self, CHAR_ADJUST); - } - if (flags & FLAGS_QUOTE) - self->OutStream(self, CHAR_QUOTE); -} -#endif /* TRIO_WIDECHAR */ - -/************************************************************************* - * TrioWriteDouble [private] - */ -static void -TrioWriteDouble(trio_T *self, - long double longdoubleNumber, - unsigned long flags, - int width, - int precision, - int base) -{ - int charsPerThousand; - int length; - double number; - double workNumber; - int integerDigits; - int fractionDigits; - int exponentDigits; - int expectedWidth; - int exponent; - unsigned int uExponent = 0; - double dblBase; - BOOLEAN_T isNegative; - BOOLEAN_T isExponentNegative = FALSE; - BOOLEAN_T isHex; - const char *digits; - char numberBuffer[MAX_MANTISSA_DIGITS - * (1 + MAX_LOCALE_SEPARATOR_LENGTH) + 1]; - char *numberPointer; - char exponentBuffer[MAX_EXPONENT_DIGITS + 1]; - char *exponentPointer = NULL; - int groupingIndex; - char *work; - int i; - BOOLEAN_T onlyzero; - int zeroes = 0; - - assert(VALID(self)); - assert(VALID(self->OutStream)); - assert(base == BASE_DECIMAL || base == BASE_HEX); - - number = (double)longdoubleNumber; - - /* Look for infinite numbers and non-a-number first */ - switch (TrioIsInfinite(number)) - { - case 1: - /* Positive infinity */ - TrioWriteString(self, - (flags & FLAGS_UPPER) - ? INFINITE_UPPER - : INFINITE_LOWER, - flags, width, precision); - return; - - case -1: - /* Negative infinity */ - TrioWriteString(self, - (flags & FLAGS_UPPER) - ? "-" INFINITE_UPPER - : "-" INFINITE_LOWER, - flags, width, precision); - return; - - default: - /* Finitude */ - break; - } - if (TrioIsNan(number)) - { - TrioWriteString(self, - (flags & FLAGS_UPPER) - ? NAN_UPPER - : NAN_LOWER, - flags, width, precision); - return; - } - - /* Normal numbers */ - digits = (flags & FLAGS_UPPER) ? internalDigitsUpper : internalDigitsLower; - isHex = (base == BASE_HEX); - dblBase = (double)base; - - if (precision == NO_PRECISION) - precision = FLT_DIG; - - isNegative = (number < 0.0); - if (isNegative) - number = -number; - - if ((flags & FLAGS_FLOAT_G) || isHex) - { - if (precision == 0) - precision = 1; - - if ((number < 1.0e-4) || (number > pow(10.0, (double)precision))) - { - /* Use scientific notation */ - flags |= FLAGS_FLOAT_E; - } - else if (number < 1.0) - { - /* - * Use normal notation. If the integer part of the number is - * zero, then adjust the precision to include leading fractional - * zeros. - */ - workNumber = fabs(guarded_log10(number)); - if (workNumber - floor(workNumber) < 0.001) - workNumber--; - zeroes = (int)floor(workNumber); - } - } - - if (flags & FLAGS_FLOAT_E) - { - /* Scale the number */ - workNumber = guarded_log10(number); - if (workNumber == -HUGE_VAL) - { - exponent = 0; - /* Undo setting */ - if (flags & FLAGS_FLOAT_G) - flags &= ~FLAGS_FLOAT_E; - } - else - { - exponent = (int)floor(workNumber); - number /= pow(10.0, (double)exponent); - isExponentNegative = (exponent < 0); - uExponent = (isExponentNegative) ? -exponent : exponent; - /* No thousand separators */ - flags &= ~FLAGS_QUOTE; - } - } - - /* - * Truncated number. - * - * precision is number of significant digits for FLOAT_G - * and number of fractional digits for others - */ - integerDigits = (floor(number) > DBL_EPSILON) - ? 1 + (int)guarded_log10(floor(number)) - : 1; - fractionDigits = ((flags & FLAGS_FLOAT_G) && (zeroes == 0)) - ? precision - integerDigits - : zeroes + precision; - - number = floor(0.5 + number * pow(dblBase, (double)fractionDigits)); - workNumber = (isHex - ? guarded_log16(0.5 + number) - : guarded_log10(0.5 + number)); - if ((int)workNumber + 1 > integerDigits + fractionDigits) - { - if (flags & FLAGS_FLOAT_E) - { - /* Adjust if number was rounded up one digit (ie. 0.99 to 1.00) */ - exponent--; - uExponent -= (isExponentNegative) ? 1 : -1; - number /= dblBase; - } - else - { - /* Adjust if number was rounded up one digit (ie. 99 to 100) */ - integerDigits++; - } - } - - /* Build the fraction part */ - numberPointer = &numberBuffer[sizeof(numberBuffer) - 1]; - *numberPointer = NIL; - onlyzero = TRUE; - for (i = 0; i < fractionDigits; i++) - { - *(--numberPointer) = digits[(int)fmod(number, dblBase)]; - number = floor(number / dblBase); - - if ((flags & FLAGS_FLOAT_G) && !(flags & FLAGS_ALTERNATIVE)) - { - /* Prune trailing zeroes */ - if (numberPointer[0] != digits[0]) - onlyzero = FALSE; - else if (onlyzero && (numberPointer[0] == digits[0])) - numberPointer++; - } - else - onlyzero = FALSE; - } - - /* Insert decimal point */ - if ((flags & FLAGS_ALTERNATIVE) || ((fractionDigits > 0) && !onlyzero)) - { - i = StrLength(internalDecimalPoint); - while (i> 0) - { - *(--numberPointer) = internalDecimalPoint[--i]; - } - } - /* Insert the integer part and thousand separators */ - charsPerThousand = (int)internalGrouping[0]; - groupingIndex = 1; - for (i = 1; i < integerDigits + 1; i++) - { - *(--numberPointer) = digits[(int)fmod(number, dblBase)]; - number = floor(number / dblBase); - if (number < DBL_EPSILON) - break; - - if ((i > 0) - && ((flags & (FLAGS_FLOAT_E | FLAGS_QUOTE)) == FLAGS_QUOTE) - && (charsPerThousand != NO_GROUPING) - && (i % charsPerThousand == 0)) - { - /* - * We are building the number from the least significant - * to the most significant digit, so we have to copy the - * thousand separator backwards - */ - length = StrLength(internalThousandSeparator); - integerDigits += length; - if (((int)(numberPointer - numberBuffer) - length) > 0) - { - work = &internalThousandSeparator[length - 1]; - while (length-- > 0) - *(--numberPointer) = *work--; - } - - /* Advance to next grouping number */ - if (charsPerThousand != NO_GROUPING) - { - switch (internalGrouping[groupingIndex]) - { - case CHAR_MAX: /* Disable grouping */ - charsPerThousand = NO_GROUPING; - break; - case 0: /* Repeat last group */ - break; - default: - charsPerThousand = (int)internalGrouping[groupingIndex++]; - break; - } - } - } - } - - /* Build the exponent */ - exponentDigits = 0; - if (flags & FLAGS_FLOAT_E) - { - exponentPointer = &exponentBuffer[sizeof(exponentBuffer) - 1]; - *exponentPointer-- = NIL; - do { - *exponentPointer-- = digits[uExponent % base]; - uExponent /= base; - exponentDigits++; - } while (uExponent); - } - - /* - * Calculate expected width. - * sign + integer part + thousands separators + decimal point - * + fraction + exponent - */ - expectedWidth = StrLength(numberPointer); - if (isNegative || (flags & FLAGS_SHOWSIGN)) - expectedWidth += sizeof("-") - 1; - if (exponentDigits > 0) - expectedWidth += exponentDigits + - ((exponentDigits > 1) ? sizeof("E+") : sizeof("E+0")) - 1; - if (isHex) - expectedWidth += sizeof("0X") - 1; - - /* Output prefixing */ - if (flags & FLAGS_NILPADDING) - { - /* Leading zeros must be after sign */ - if (isNegative) - self->OutStream(self, '-'); - else if (flags & FLAGS_SHOWSIGN) - self->OutStream(self, '+'); - if (isHex) - { - self->OutStream(self, '0'); - self->OutStream(self, (flags & FLAGS_UPPER) ? 'X' : 'x'); - } - if (!(flags & FLAGS_LEFTADJUST)) - { - for (i = expectedWidth; i < width; i++) - { - self->OutStream(self, '0'); - } - } - } - else - { - /* Leading spaces must be before sign */ - if (!(flags & FLAGS_LEFTADJUST)) - { - for (i = expectedWidth; i < width; i++) - { - self->OutStream(self, CHAR_ADJUST); - } - } - if (isNegative) - self->OutStream(self, '-'); - else if (flags & FLAGS_SHOWSIGN) - self->OutStream(self, '+'); - if (isHex) - { - self->OutStream(self, '0'); - self->OutStream(self, (flags & FLAGS_UPPER) ? 'X' : 'x'); - } - } - /* Output number */ - for (i = 0; numberPointer[i]; i++) - { - self->OutStream(self, numberPointer[i]); - } - /* Output exponent */ - if (exponentDigits > 0) - { - self->OutStream(self, - isHex - ? ((flags & FLAGS_UPPER) ? 'P' : 'p') - : ((flags & FLAGS_UPPER) ? 'E' : 'e')); - self->OutStream(self, (isExponentNegative) ? '-' : '+'); - - /* The exponent must contain at least two digits */ - if (exponentDigits == 1) - self->OutStream(self, '0'); - - for (i = 0; i < exponentDigits; i++) - { - self->OutStream(self, exponentPointer[i + 1]); - } - } - /* Output trailing spaces */ - if (flags & FLAGS_LEFTADJUST) - { - for (i = expectedWidth; i < width; i++) - { - self->OutStream(self, CHAR_ADJUST); - } - } -} - -/************************************************************************* - * TrioFormatProcess [private] - */ -static int -TrioFormatProcess(trio_T *data, - const char *format, - parameter_T *parameters) - -{ -#if defined(TRIO_COMPILER_SUPPORTS_MULTIBYTE) - int charlen; -#endif - int i; - const char *string; - void *pointer; - unsigned long flags; - int width; - int precision; - int base; - int index; - - index = 0; - i = 0; -#if defined(TRIO_COMPILER_SUPPORTS_MULTIBYTE) - mblen(NULL, 0); -#endif - - while (format[index]) - { -#if defined(TRIO_COMPILER_SUPPORTS_MULTIBYTE) - if (! isascii(format[index])) - { - charlen = mblen(&format[index], MB_LEN_MAX); - while (charlen-- > 0) - { - data->OutStream(data, format[index++]); - } - continue; /* while */ - } -#endif /* TRIO_COMPILER_SUPPORTS_MULTIBYTE */ - if (CHAR_IDENTIFIER == format[index]) - { - if (CHAR_IDENTIFIER == format[index + 1]) - { - data->OutStream(data, CHAR_IDENTIFIER); - index += 2; - } - else - { - /* Skip the parameter entries */ - while (parameters[i].type == FORMAT_PARAMETER) - i++; - - flags = parameters[i].flags; - - /* Find width */ - width = parameters[i].width; - if (flags & FLAGS_WIDTH_PARAMETER) - { - /* Get width from parameter list */ - width = (int)parameters[width].data.number.as_signed; - } - - /* Find precision */ - if (flags & FLAGS_PRECISION) - { - precision = parameters[i].precision; - if (flags & FLAGS_PRECISION_PARAMETER) - { - /* Get precision from parameter list */ - precision = (int)parameters[precision].data.number.as_signed; - } - } - else - { - precision = NO_PRECISION; - } - - /* Find base */ - base = parameters[i].base; - if (flags & FLAGS_BASE_PARAMETER) - { - /* Get base from parameter list */ - base = (int)parameters[base].data.number.as_signed; - } - - switch (parameters[i].type) - { - case FORMAT_CHAR: - if (flags & FLAGS_QUOTE) - data->OutStream(data, CHAR_QUOTE); - if (! (flags & FLAGS_LEFTADJUST)) - { - while (--width > 0) - data->OutStream(data, CHAR_ADJUST); - } -#if TRIO_WIDECHAR - if (flags & FLAGS_WIDECHAR) - { - TrioWriteWideStringCharacter(data, - (wchar_t)parameters[i].data.number.as_signed, - flags, - NO_WIDTH); - } - else -#endif - TrioWriteStringCharacter(data, - (int)parameters[i].data.number.as_signed, - flags); - - if (flags & FLAGS_LEFTADJUST) - { - while(--width > 0) - data->OutStream(data, CHAR_ADJUST); - } - if (flags & FLAGS_QUOTE) - data->OutStream(data, CHAR_QUOTE); - - break; /* FORMAT_CHAR */ - - case FORMAT_INT: - if (base == NO_BASE) - base = BASE_DECIMAL; - - TrioWriteNumber(data, - parameters[i].data.number.as_signed, - flags, - width, - precision, - base); - - break; /* FORMAT_INT */ - - case FORMAT_DOUBLE: - TrioWriteDouble(data, - parameters[i].data.longdoubleNumber, - flags, - width, - precision, - base); - break; /* FORMAT_DOUBLE */ - - case FORMAT_STRING: -#if TRIO_WIDECHAR - if (flags & FLAGS_WIDECHAR) - { - TrioWriteWideString(data, - parameters[i].data.wstring, - flags, - width, - precision); - } - else -#endif -#ifdef QUALIFIER_ESCAPE - { - char *s = NULL; - static const char* empty = "(null)"; - switch (parameters[i].escape) - { - case ESCAPE_ULM: - s = glite_lbu_EscapeULM(parameters[i].data.string); - break; - case ESCAPE_XML: - s = glite_lbu_EscapeXML(parameters[i].data.string); - break; - case ESCAPE_SQL: - s = glite_lbu_EscapeSQL(parameters[i].data.string); - break; - case ESCAPE_NONE: - s = strdup(parameters[i].data.string ? parameters[i].data.string : empty); - break; - } - TrioWriteString(data,s,flags,width,precision); - free(s); - } -#else - { - TrioWriteString(data, - parameters[i].data.string, - flags, - width, - precision); - } -#endif - break; /* FORMAT_STRING */ - - case FORMAT_POINTER: - { - reference_T reference; - - reference.data = data; - reference.parameter = ¶meters[i]; - trio_print_pointer(&reference, parameters[i].data.pointer); - } - break; /* FORMAT_POINTER */ - - case FORMAT_COUNT: - pointer = parameters[i].data.pointer; - if (NULL != pointer) - { - /* - * C99 paragraph 7.19.6.1.8 says "the number of - * characters written to the output stream so far by - * this call", which is data->committed - */ -#if defined(QUALIFIER_SIZE_T) || defined(QUALIFIER_SIZE_T_UPPER) - if (flags & FLAGS_SIZE_T) - *(size_t *)pointer = (size_t)data->committed; - else -#endif -#if defined(QUALIFIER_PTRDIFF_T) - if (flags & FLAGS_PTRDIFF_T) - *(ptrdiff_t *)pointer = (ptrdiff_t)data->committed; - else -#endif -#if defined(QUALIFIER_INTMAX_T) - if (flags & FLAGS_INTMAX_T) - *(trio_intmax_t *)pointer = (trio_intmax_t)data->committed; - else -#endif - if (flags & FLAGS_QUAD) - { - *(trio_ulonglong_t *)pointer = (trio_ulonglong_t)data->committed; - } - else if (flags & FLAGS_LONG) - { - *(long int *)pointer = (long int)data->committed; - } - else if (flags & FLAGS_SHORT) - { - *(short int *)pointer = (short int)data->committed; - } - else - { - *(int *)pointer = (int)data->committed; - } - } - break; /* FORMAT_COUNT */ - - case FORMAT_PARAMETER: - break; /* FORMAT_PARAMETER */ - -#if defined(FORMAT_ERRNO) - case FORMAT_ERRNO: - string = StrError(parameters[i].data.errorNumber); - if (string) - { - TrioWriteString(data, - string, - flags, - width, - precision); - } - else - { - data->OutStream(data, '#'); - TrioWriteNumber(data, - (trio_intmax_t)parameters[i].data.errorNumber, - flags, - width, - precision, - BASE_DECIMAL); - } - break; /* FORMAT_ERRNO */ -#endif /* defined(FORMAT_ERRNO) */ - -#if defined(FORMAT_USER_DEFINED) - case FORMAT_USER_DEFINED: - { - reference_T reference; - userdef_T *def = NULL; - - if (parameters[i].user_name[0] == NIL) - { - /* Use handle */ - if ((i > 0) || - (parameters[i - 1].type == FORMAT_PARAMETER)) - def = (userdef_T *)parameters[i - 1].data.pointer; - } - else - { - /* Look up namespace */ - def = TrioFindNamespace(parameters[i].user_name, NULL); - } - if (def) { - reference.data = data; - reference.parameter = ¶meters[i]; - def->callback(&reference); - } - } - break; -#endif /* defined(FORMAT_USER_DEFINED) */ - - default: - break; - } /* switch parameter type */ - - /* Prepare for next */ - index = parameters[i].indexAfterSpecifier; - i++; - } - } - else /* not identifier */ - { - data->OutStream(data, format[index++]); - } - } - return data->processed; -} - -/************************************************************************* - * TrioFormatRef [private] - */ -static int -TrioFormatRef(reference_T *reference, - const char *format, - va_list arglist, - void **argarray) -{ - int status; - parameter_T parameters[MAX_PARAMETERS]; - - status = TrioPreprocess(TYPE_PRINT, format, parameters, arglist, argarray); - if (status < 0) - return status; - - return TrioFormatProcess(reference->data, format, parameters); -} - -/************************************************************************* - * TrioFormat [private] - * - * Description: - * This is the main engine for formatting output - */ -static int -TrioFormat(void *destination, - size_t destinationSize, - void (*OutStream)(trio_T *, int), - const char *format, - va_list arglist, - void **argarray) -{ - int status; - trio_T data; - parameter_T parameters[MAX_PARAMETERS]; - - assert(VALID(OutStream)); - assert(VALID(format)); - - memset(&data, 0, sizeof(data)); - data.OutStream = OutStream; - data.location = destination; - data.max = destinationSize; - -#if defined(USE_LOCALE) - if (NULL == internalLocaleValues) - { - TrioSetLocale(); - } -#endif - - status = TrioPreprocess(TYPE_PRINT, format, parameters, arglist, argarray); - if (status < 0) - return status; - - return TrioFormatProcess(&data, format, parameters); -} - -/************************************************************************* - * TrioOutStreamFile [private] - */ -static void -TrioOutStreamFile(trio_T *self, - int output) -{ - FILE *file = (FILE *)self->location; - - assert(VALID(self)); - assert(VALID(file)); - - self->processed++; - self->committed++; - (void)fputc(output, file); -} - -/************************************************************************* - * TrioOutStreamFileDescriptor [private] - */ -static void -TrioOutStreamFileDescriptor(trio_T *self, - int output) -{ - int fd = *((int *)self->location); - char ch; - - assert(VALID(self)); - - ch = (char)output; - (void)write(fd, &ch, sizeof(char)); - self->processed++; - self->committed++; -} - -/************************************************************************* - * TrioOutStreamString [private] - */ -static void -TrioOutStreamString(trio_T *self, - int output) -{ - char **buffer = (char **)self->location; - - assert(VALID(self)); - assert(VALID(buffer)); - - **buffer = (char)output; - (*buffer)++; - self->processed++; - self->committed++; -} - -/************************************************************************* - * TrioOutStreamStringMax [private] - */ -static void -TrioOutStreamStringMax(trio_T *self, - int output) -{ - char **buffer; - - assert(VALID(self)); - buffer = (char **)self->location; - assert(VALID(buffer)); - - if (self->processed < self->max) - { - **buffer = (char)output; - (*buffer)++; - self->committed++; - } - self->processed++; -} - -/************************************************************************* - * TrioOutStreamStringDynamic [private] - */ -#define DYNAMIC_START_SIZE 32 -struct dynamicBuffer { - char *buffer; - size_t length; - size_t allocated; -}; - -static void -TrioOutStreamStringDynamic(trio_T *self, - int output) -{ - struct dynamicBuffer *infop; - - assert(VALID(self)); - assert(VALID(self->location)); - - infop = (struct dynamicBuffer *)self->location; - - if (infop->buffer == NULL) - { - /* Start with a reasonable size */ - infop->buffer = (char *)TRIO_MALLOC(DYNAMIC_START_SIZE); - if (infop->buffer == NULL) - return; /* fail */ - - infop->allocated = DYNAMIC_START_SIZE; - self->processed = 0; - self->committed = 0; - } - else if (self->committed + sizeof(NIL) >= infop->allocated) - { - char *newptr; - - /* Allocate increasing chunks */ - newptr = (char *)TRIO_REALLOC(infop->buffer, infop->allocated * 2); - - if (newptr == NULL) - return; - - infop->buffer = newptr; - infop->allocated *= 2; - } - - infop->buffer[self->committed] = (char)output; - self->committed++; - self->processed++; - - infop->length = self->committed; -} - -/************************************************************************* - * printf - */ -int -trio_printf(const char *format, - ...) -{ - int status; - va_list args; - - assert(VALID(format)); - - va_start(args, format); - status = TrioFormat(stdout, 0, TrioOutStreamFile, format, args, NULL); - va_end(args); - return status; -} - -int -trio_vprintf(const char *format, - va_list args) -{ - assert(VALID(format)); - - return TrioFormat(stdout, 0, TrioOutStreamFile, format, args, NULL); -} - -#ifdef __GNUC__ -#define UNUSED_VAR __attribute__((unused)) -#else -#define UNUSED_VAR -#endif - -static void shutup_unitialized(va_list *dummy UNUSED_VAR) { -} - -int -trio_printfv(const char *format, - void ** args) -{ - va_list dummy; - shutup_unitialized(&dummy); - - assert(VALID(format)); - - return TrioFormat(stdout, 0, TrioOutStreamFile, format, dummy, args); -} - -/************************************************************************* - * fprintf - */ -int -trio_fprintf(FILE *file, - const char *format, - ...) -{ - int status; - va_list args; - - assert(VALID(file)); - assert(VALID(format)); - - va_start(args, format); - status = TrioFormat(file, 0, TrioOutStreamFile, format, args, NULL); - va_end(args); - return status; -} - -int -trio_vfprintf(FILE *file, - const char *format, - va_list args) -{ - assert(VALID(file)); - assert(VALID(format)); - - return TrioFormat(file, 0, TrioOutStreamFile, format, args, NULL); -} - -int -trio_fprintfv(FILE *file, - const char *format, - void ** args) -{ - va_list dummy; - shutup_unitialized(&dummy); - - assert(VALID(file)); - assert(VALID(format)); - - return TrioFormat(file, 0, TrioOutStreamFile, format, dummy, args); -} - -/************************************************************************* - * dprintf - */ -int -trio_dprintf(int fd, - const char *format, - ...) -{ - int status; - va_list args; - - assert(VALID(format)); - - va_start(args, format); - status = TrioFormat(&fd, 0, TrioOutStreamFileDescriptor, format, args, NULL); - va_end(args); - return status; -} - -int -trio_vdprintf(int fd, - const char *format, - va_list args) -{ - assert(VALID(format)); - - return TrioFormat(&fd, 0, TrioOutStreamFileDescriptor, format, args, NULL); -} - -int -trio_dprintfv(int fd, - const char *format, - void **args) -{ - va_list dummy; - shutup_unitialized(&dummy); - - assert(VALID(format)); - - return TrioFormat(&fd, 0, TrioOutStreamFileDescriptor, format, dummy, args); -} - -/************************************************************************* - * sprintf - */ -int -trio_sprintf(char *buffer, - const char *format, - ...) -{ - int status; - va_list args; - - assert(VALID(buffer)); - assert(VALID(format)); - - va_start(args, format); - status = TrioFormat(&buffer, 0, TrioOutStreamString, format, args, NULL); - *buffer = NIL; /* Terminate with NIL character */ - va_end(args); - return status; -} - -int -trio_vsprintf(char *buffer, - const char *format, - va_list args) -{ - int status; - - assert(VALID(buffer)); - assert(VALID(format)); - - status = TrioFormat(&buffer, 0, TrioOutStreamString, format, args, NULL); - *buffer = NIL; - return status; -} - -int -trio_sprintfv(char *buffer, - const char *format, - void **args) -{ - int status; - va_list dummy; - shutup_unitialized(&dummy); - - assert(VALID(buffer)); - assert(VALID(format)); - - status = TrioFormat(&buffer, 0, TrioOutStreamString, format, dummy, args); - *buffer = NIL; - return status; -} - -/************************************************************************* - * snprintf - */ -int -trio_snprintf(char *buffer, - size_t bufferSize, - const char *format, - ...) -{ - int status; - va_list args; - - assert(VALID(buffer)); - assert(VALID(format)); - - va_start(args, format); - status = TrioFormat(&buffer, bufferSize > 0 ? bufferSize - 1 : 0, - TrioOutStreamStringMax, format, args, NULL); - if (bufferSize > 0) - *buffer = NIL; - va_end(args); - return status; -} - -int -trio_vsnprintf(char *buffer, - size_t bufferSize, - const char *format, - va_list args) -{ - int status; - - assert(VALID(buffer)); - assert(VALID(format)); - - status = TrioFormat(&buffer, bufferSize > 0 ? bufferSize - 1 : 0, - TrioOutStreamStringMax, format, args, NULL); - if (bufferSize > 0) - *buffer = NIL; - return status; -} - -int -trio_snprintfv(char *buffer, - size_t bufferSize, - const char *format, - void **args) -{ - int status; - va_list dummy; - shutup_unitialized(&dummy); - - assert(VALID(buffer)); - assert(VALID(format)); - - status = TrioFormat(&buffer, bufferSize > 0 ? bufferSize - 1 : 0, - TrioOutStreamStringMax, format, dummy, args); - if (bufferSize > 0) - *buffer = NIL; - return status; -} - -/************************************************************************* - * snprintfcat - * Appends the new string to the buffer string overwriting the '\0' - * character at the end of buffer. - */ -int -trio_snprintfcat(char *buffer, - size_t bufferSize, - const char *format, - ...) -{ - int status; - va_list args; - size_t buf_len; - - va_start(args, format); - - assert(VALID(buffer)); - assert(VALID(format)); - - buf_len = strlen(buffer); - buffer = &buffer[buf_len]; - - status = TrioFormat(&buffer, bufferSize - 1 - buf_len, - TrioOutStreamStringMax, format, args, NULL); - va_end(args); - *buffer = NIL; - return status; -} - -int -trio_vsnprintfcat(char *buffer, - size_t bufferSize, - const char *format, - va_list args) -{ - int status; - size_t buf_len; - assert(VALID(buffer)); - assert(VALID(format)); - - buf_len = strlen(buffer); - buffer = &buffer[buf_len]; - status = TrioFormat(&buffer, bufferSize - 1 - buf_len, - TrioOutStreamStringMax, format, args, NULL); - *buffer = NIL; - return status; -} - -/************************************************************************* - * trio_aprintf - */ - -/* Deprecated */ -char * -trio_aprintf(const char *format, - ...) -{ - va_list args; - struct dynamicBuffer info; - - assert(VALID(format)); - - info.buffer = NULL; - info.length = 0; - info.allocated = 0; - - va_start(args, format); - (void)TrioFormat(&info, 0, TrioOutStreamStringDynamic, format, args, NULL); - va_end(args); - if (info.length) { - info.buffer[info.length] = NIL; /* we terminate this with a zero byte */ - return info.buffer; - } - else - return NULL; -} - -/* Deprecated */ -char * -trio_vaprintf(const char *format, - va_list args) -{ - struct dynamicBuffer info; - - assert(VALID(format)); - - info.buffer = NULL; - info.length = 0; - info.allocated = 0; - - (void)TrioFormat(&info, 0, TrioOutStreamStringDynamic, format, args, NULL); - if (info.length) { - info.buffer[info.length] = NIL; /* we terminate this with a zero byte */ - return info.buffer; - } - else - return NULL; -} - -int -trio_asprintf(char **result, - const char *format, - ...) -{ - va_list args; - int status; - struct dynamicBuffer info; - - assert(VALID(format)); - - info.buffer = NULL; - info.length = 0; - info.allocated = 0; - - va_start(args, format); - status = TrioFormat(&info, 0, TrioOutStreamStringDynamic, format, args, NULL); - va_end(args); - if (status < 0) { - *result = NULL; - return status; - } - if (info.length == 0) { - /* - * If the length is zero, no characters have been written and therefore - * no memory has been allocated, but we must to allocate and return an - * empty string. - */ - info.buffer = (char *)TRIO_MALLOC(sizeof(char)); - if (info.buffer == NULL) { - *result = NULL; - return TRIO_ERROR_RETURN(TRIO_ENOMEM, 0); - } - } - info.buffer[info.length] = NIL; /* we terminate this with a zero byte */ - *result = info.buffer; - - return status; -} - -int -trio_vasprintf(char **result, - const char *format, - va_list args) -{ - int status; - struct dynamicBuffer info; - - assert(VALID(format)); - - info.buffer = NULL; - info.length = 0; - info.allocated = 0; - - status = TrioFormat(&info, 0, TrioOutStreamStringDynamic, format, args, NULL); - if (status < 0) { - *result = NULL; - return status; - } - if (info.length == 0) { - info.buffer = (char *)TRIO_MALLOC(sizeof(char)); - if (info.buffer == NULL) { - *result = NULL; - return TRIO_ERROR_RETURN(TRIO_ENOMEM, 0); - } - } - info.buffer[info.length] = NIL; /* we terminate this with a zero byte */ - *result = info.buffer; - - return status; -} - - -/************************************************************************* - * - * @CALLBACK - * - ************************************************************************/ - - -/************************************************************************* - * trio_register [public] - */ -void * -trio_register(trio_callback_t callback, - const char *name) -{ - userdef_T *def; - userdef_T *prev = NULL; - - if (callback == NULL) - return NULL; - - if (name) - { - /* Handle built-in namespaces */ - if (name[0] == ':') - { - if (StrEqual(name, ":enter")) - { - internalEnterCriticalRegion = callback; - } - else if (StrEqual(name, ":leave")) - { - internalLeaveCriticalRegion = callback; - } - return NULL; - } - - /* Bail out if namespace is too long */ - if (StrLength(name) >= MAX_USER_NAME) - return NULL; - - /* Bail out if namespace already is registered */ - def = TrioFindNamespace(name, &prev); - if (def) - return NULL; - } - - def = (userdef_T *)TRIO_MALLOC(sizeof(userdef_T)); - if (def) - { - if (internalEnterCriticalRegion) - (void)internalEnterCriticalRegion(NULL); - - if (name) - { - /* Link into internal list */ - if (prev == NULL) - internalUserDef = def; - else - prev->next = def; - } - /* Initialize */ - def->callback = callback; - def->name = (name == NULL) - ? NULL - : StrDuplicate(name); - def->next = NULL; - - if (internalLeaveCriticalRegion) - (void)internalLeaveCriticalRegion(NULL); - } - return def; -} - -/************************************************************************* - * trio_unregister [public] - */ -void -trio_unregister(void *handle) -{ - userdef_T *self = (userdef_T *)handle; - userdef_T *def; - userdef_T *prev = NULL; - - assert(VALID(self)); - - if (self->name) - { - def = TrioFindNamespace(self->name, &prev); - if (def) - { - if (internalEnterCriticalRegion) - (void)internalEnterCriticalRegion(NULL); - - if (prev == NULL) - internalUserDef = NULL; - else - prev->next = def->next; - - if (internalLeaveCriticalRegion) - (void)internalLeaveCriticalRegion(NULL); - } - StrFree(self->name); - } - TRIO_FREE(self); -} - -/************************************************************************* - * trio_get_format [public] - */ -const char * -trio_get_format(void *ref) -{ - assert(((reference_T *)ref)->parameter->type == FORMAT_USER_DEFINED); - - return (((reference_T *)ref)->parameter->user_data); -} - -/************************************************************************* - * trio_get_argument [public] - */ -void * -trio_get_argument(void *ref) -{ - assert(((reference_T *)ref)->parameter->type == FORMAT_USER_DEFINED); - - return ((reference_T *)ref)->parameter->data.pointer; -} - -/************************************************************************* - * trio_get_width / trio_set_width [public] - */ -int -trio_get_width(void *ref) -{ - return ((reference_T *)ref)->parameter->width; -} - -void -trio_set_width(void *ref, - int width) -{ - ((reference_T *)ref)->parameter->width = width; -} - -/************************************************************************* - * trio_get_precision / trio_set_precision [public] - */ -int -trio_get_precision(void *ref) -{ - return (((reference_T *)ref)->parameter->precision); -} - -void -trio_set_precision(void *ref, - int precision) -{ - ((reference_T *)ref)->parameter->precision = precision; -} - -/************************************************************************* - * trio_get_base / trio_set_base [public] - */ -int -trio_get_base(void *ref) -{ - return (((reference_T *)ref)->parameter->base); -} - -void -trio_set_base(void *ref, - int base) -{ - ((reference_T *)ref)->parameter->base = base; -} - -/************************************************************************* - * trio_get_long / trio_set_long [public] - */ -int -trio_get_long(void *ref) -{ - return (((reference_T *)ref)->parameter->flags & FLAGS_LONG); -} - -void -trio_set_long(void *ref, - int is_long) -{ - if (is_long) - ((reference_T *)ref)->parameter->flags |= FLAGS_LONG; - else - ((reference_T *)ref)->parameter->flags &= ~FLAGS_LONG; -} - -/************************************************************************* - * trio_get_longlong / trio_set_longlong [public] - */ -int -trio_get_longlong(void *ref) -{ - return (((reference_T *)ref)->parameter->flags & FLAGS_QUAD); -} - -void -trio_set_longlong(void *ref, - int is_longlong) -{ - if (is_longlong) - ((reference_T *)ref)->parameter->flags |= FLAGS_QUAD; - else - ((reference_T *)ref)->parameter->flags &= ~FLAGS_QUAD; -} - -/************************************************************************* - * trio_get_longdouble / trio_set_longdouble [public] - */ -int -trio_get_longdouble(void *ref) -{ - return (((reference_T *)ref)->parameter->flags & FLAGS_LONGDOUBLE); -} - -void -trio_set_longdouble(void *ref, - int is_longdouble) -{ - if (is_longdouble) - ((reference_T *)ref)->parameter->flags |= FLAGS_LONGDOUBLE; - else - ((reference_T *)ref)->parameter->flags &= ~FLAGS_LONGDOUBLE; -} - -/************************************************************************* - * trio_get_short / trio_set_short [public] - */ -int -trio_get_short(void *ref) -{ - return (((reference_T *)ref)->parameter->flags & FLAGS_SHORT); -} - -void -trio_set_short(void *ref, - int is_short) -{ - if (is_short) - ((reference_T *)ref)->parameter->flags |= FLAGS_SHORT; - else - ((reference_T *)ref)->parameter->flags &= ~FLAGS_SHORT; -} - -/************************************************************************* - * trio_get_shortshort / trio_set_shortshort [public] - */ -int -trio_get_shortshort(void *ref) -{ - return (((reference_T *)ref)->parameter->flags & FLAGS_SHORTSHORT); -} - -void -trio_set_shortshort(void *ref, - int is_shortshort) -{ - if (is_shortshort) - ((reference_T *)ref)->parameter->flags |= FLAGS_SHORTSHORT; - else - ((reference_T *)ref)->parameter->flags &= ~FLAGS_SHORTSHORT; -} - -/************************************************************************* - * trio_get_alternative / trio_set_alternative [public] - */ -int -trio_get_alternative(void *ref) -{ - return (((reference_T *)ref)->parameter->flags & FLAGS_ALTERNATIVE); -} - -void -trio_set_alternative(void *ref, - int is_alternative) -{ - if (is_alternative) - ((reference_T *)ref)->parameter->flags |= FLAGS_ALTERNATIVE; - else - ((reference_T *)ref)->parameter->flags &= ~FLAGS_ALTERNATIVE; -} - -/************************************************************************* - * trio_get_alignment / trio_set_alignment [public] - */ -int -trio_get_alignment(void *ref) -{ - return (((reference_T *)ref)->parameter->flags & FLAGS_LEFTADJUST); -} - -void -trio_set_alignment(void *ref, - int is_leftaligned) -{ - if (is_leftaligned) - ((reference_T *)ref)->parameter->flags |= FLAGS_LEFTADJUST; - else - ((reference_T *)ref)->parameter->flags &= ~FLAGS_LEFTADJUST; -} - -/************************************************************************* - * trio_get_spacing /trio_set_spacing [public] - */ -int -trio_get_spacing(void *ref) -{ - return (((reference_T *)ref)->parameter->flags & FLAGS_SPACE); -} - -void -trio_set_spacing(void *ref, - int is_space) -{ - if (is_space) - ((reference_T *)ref)->parameter->flags |= FLAGS_SPACE; - else - ((reference_T *)ref)->parameter->flags &= ~FLAGS_SPACE; -} - -/************************************************************************* - * trio_get_sign / trio_set_sign [public] - */ -int -trio_get_sign(void *ref) -{ - return (((reference_T *)ref)->parameter->flags & FLAGS_SHOWSIGN); -} - -void -trio_set_sign(void *ref, - int is_sign) -{ - if (is_sign) - ((reference_T *)ref)->parameter->flags |= FLAGS_SHOWSIGN; - else - ((reference_T *)ref)->parameter->flags &= ~FLAGS_SHOWSIGN; -} - -/************************************************************************* - * trio_get_padding / trio_set_padding [public] - */ -int -trio_get_padding(void *ref) -{ - return (((reference_T *)ref)->parameter->flags & FLAGS_NILPADDING); -} - -void -trio_set_padding(void *ref, - int is_padding) -{ - if (is_padding) - ((reference_T *)ref)->parameter->flags |= FLAGS_NILPADDING; - else - ((reference_T *)ref)->parameter->flags &= ~FLAGS_NILPADDING; -} - -/************************************************************************* - * trio_get_quote / trio_set_quote [public] - */ -int -trio_get_quote(void *ref) -{ - return (((reference_T *)ref)->parameter->flags & FLAGS_QUOTE); -} - -void -trio_set_quote(void *ref, - int is_quote) -{ - if (is_quote) - ((reference_T *)ref)->parameter->flags |= FLAGS_QUOTE; - else - ((reference_T *)ref)->parameter->flags &= ~FLAGS_QUOTE; -} - -/************************************************************************* - * trio_get_upper / trio_set_upper [public] - */ -int -trio_get_upper(void *ref) -{ - return (((reference_T *)ref)->parameter->flags & FLAGS_UPPER); -} - -void -trio_set_upper(void *ref, - int is_upper) -{ - if (is_upper) - ((reference_T *)ref)->parameter->flags |= FLAGS_UPPER; - else - ((reference_T *)ref)->parameter->flags &= ~FLAGS_UPPER; -} - -/************************************************************************* - * trio_get_largest / trio_set_largest [public] - */ -#if TRIO_C99 -int -trio_get_largest(void *ref) -{ - return (((reference_T *)ref)->parameter->flags & FLAGS_INTMAX_T); -} - -void -trio_set_largest(void *ref, - int is_largest) -{ - if (is_largest) - ((reference_T *)ref)->parameter->flags |= FLAGS_INTMAX_T; - else - ((reference_T *)ref)->parameter->flags &= ~FLAGS_INTMAX_T; -} -#endif - -/************************************************************************* - * trio_get_ptrdiff / trio_set_ptrdiff [public] - */ -int -trio_get_ptrdiff(void *ref) -{ - return (((reference_T *)ref)->parameter->flags & FLAGS_PTRDIFF_T); -} - -void -trio_set_ptrdiff(void *ref, - int is_ptrdiff) -{ - if (is_ptrdiff) - ((reference_T *)ref)->parameter->flags |= FLAGS_PTRDIFF_T; - else - ((reference_T *)ref)->parameter->flags &= ~FLAGS_PTRDIFF_T; -} - -/************************************************************************* - * trio_get_size / trio_set_size [public] - */ -#if TRIO_C99 -int -trio_get_size(void *ref) -{ - return (((reference_T *)ref)->parameter->flags & FLAGS_SIZE_T); -} - -void -trio_set_size(void *ref, - int is_size) -{ - if (is_size) - ((reference_T *)ref)->parameter->flags |= FLAGS_SIZE_T; - else - ((reference_T *)ref)->parameter->flags &= ~FLAGS_SIZE_T; -} -#endif - -/************************************************************************* - * trio_print_int [public] - */ -void -trio_print_int(void *ref, - int number) -{ - reference_T *self = (reference_T *)ref; - - TrioWriteNumber(self->data, - (trio_intmax_t)number, - self->parameter->flags, - self->parameter->width, - self->parameter->precision, - self->parameter->base); -} - -/************************************************************************* - * trio_print_uint [public] - */ -void -trio_print_uint(void *ref, - unsigned int number) -{ - reference_T *self = (reference_T *)ref; - - TrioWriteNumber(self->data, - (trio_intmax_t)number, - self->parameter->flags | FLAGS_UNSIGNED, - self->parameter->width, - self->parameter->precision, - self->parameter->base); -} - -/************************************************************************* - * trio_print_double [public] - */ -void -trio_print_double(void *ref, - double number) -{ - reference_T *self = (reference_T *)ref; - - TrioWriteDouble(self->data, - number, - self->parameter->flags, - self->parameter->width, - self->parameter->precision, - self->parameter->base); -} - -/************************************************************************* - * trio_print_string [public] - */ -void -trio_print_string(void *ref, - char *string) -{ - reference_T *self = (reference_T *)ref; - - TrioWriteString(self->data, - string, - self->parameter->flags, - self->parameter->width, - self->parameter->precision); -} - -/************************************************************************* - * trio_print_pointer [public] - */ -void -trio_print_pointer(void *ref, - void *pointer) -{ - reference_T *self = (reference_T *)ref; - unsigned long flags; - trio_uintmax_t number; - - if (NULL == pointer) - { - const char *string = null; - while (*string) - self->data->OutStream(self->data, *string++); - } - else - { - /* - * The subtraction of the null pointer is a workaround - * to avoid a compiler warning. The performance overhead - * is negligible (and likely to be removed by an - * optimising compiler). The (char *) casting is done - * to please ANSI C++. - */ - number = (trio_uintmax_t)((char *)pointer - (char *)0); - /* Shrink to size of pointer */ - number &= (trio_uintmax_t)-1; - flags = self->parameter->flags; - flags |= (FLAGS_UNSIGNED | FLAGS_ALTERNATIVE | - FLAGS_NILPADDING); - TrioWriteNumber(self->data, - (trio_intmax_t)number, - flags, - POINTER_WIDTH, - NO_PRECISION, - BASE_HEX); - } -} - -/************************************************************************* - * trio_print_ref [public] - */ -int -trio_print_ref(void *ref, - const char *format, - ...) -{ - int status; - va_list arglist; - - assert(VALID(format)); - - va_start(arglist, format); - status = TrioFormatRef((reference_T *)ref, format, arglist, NULL); - va_end(arglist); - return status; -} - -/************************************************************************* - * trio_vprint_ref [public] - */ -int -trio_vprint_ref(void *ref, - const char *format, - va_list arglist) -{ - assert(VALID(format)); - - return TrioFormatRef((reference_T *)ref, format, arglist, NULL); -} - -/************************************************************************* - * trio_printv_ref [public] - */ -int -trio_printv_ref(void *ref, - const char *format, - void **argarray) -{ - va_list dummy; - shutup_unitialized(&dummy); - - assert(VALID(format)); - - return TrioFormatRef((reference_T *)ref, format, dummy, argarray); -} - - -/************************************************************************* - * - * @SCANNING - * - ************************************************************************/ - - -/************************************************************************* - * TrioSkipWhitespaces [private] - */ -static int -TrioSkipWhitespaces(trio_T *self) -{ - int ch; - - ch = self->current; - while (isspace(ch)) - { - self->InStream(self, &ch); - } - return ch; -} - -/************************************************************************* - * TrioGetCollation [private] - */ -#if TRIO_EXTENSION -static void -TrioGetCollation() -{ - int i; - int j; - int k; - char first[2]; - char second[2]; - - /* This is computational expensive */ - first[1] = NIL; - second[1] = NIL; - for (i = 0; i < MAX_CHARACTER_CLASS; i++) - { - k = 0; - first[0] = (char)i; - for (j = 0; j < MAX_CHARACTER_CLASS; j++) - { - second[0] = (char)j; - if (StrEqualLocale(first, second)) - internalCollationArray[i][k++] = (char)j; - } - internalCollationArray[i][k] = NIL; - } -} -#endif - -/************************************************************************* - * TrioGetCharacterClass [private] - * - * FIXME: - * multibyte - */ -static int -TrioGetCharacterClass(const char *format, - int *indexPointer, - unsigned long *flagsPointer, - int *characterclass) -{ - int index = *indexPointer; - int i; - char ch; - char range_begin; - char range_end; - - *flagsPointer &= ~FLAGS_EXCLUDE; - - if (format[index] == QUALIFIER_CIRCUMFLEX) - { - *flagsPointer |= FLAGS_EXCLUDE; - index++; - } - /* - * If the ungroup character is at the beginning of the scanlist, - * it will be part of the class, and a second ungroup character - * must follow to end the group. - */ - if (format[index] == SPECIFIER_UNGROUP) - { - characterclass[(int)SPECIFIER_UNGROUP]++; - index++; - } - /* - * Minus is used to specify ranges. To include minus in the class, - * it must be at the beginning of the list - */ - if (format[index] == QUALIFIER_MINUS) - { - characterclass[(int)QUALIFIER_MINUS]++; - index++; - } - /* Collect characters */ - for (ch = format[index]; - (ch != SPECIFIER_UNGROUP) && (ch != NIL); - ch = format[++index]) - { - switch (ch) - { - case QUALIFIER_MINUS: /* Scanlist ranges */ - - /* - * Both C99 and UNIX98 describes ranges as implementation- - * defined. - * - * We support the following behaviour (although this may - * change as we become wiser) - * - only increasing ranges, ie. [a-b] but not [b-a] - * - transitive ranges, ie. [a-b-c] == [a-c] - * - trailing minus, ie. [a-] is interpreted as an 'a' - * and a '-' - * - duplicates (although we can easily convert these - * into errors) - */ - range_begin = format[index - 1]; - range_end = format[++index]; - if (range_end == SPECIFIER_UNGROUP) - { - /* Trailing minus is included */ - characterclass[(int)ch]++; - ch = range_end; - break; /* for */ - } - if (range_end == NIL) - return TRIO_ERROR_RETURN(TRIO_EINVAL, index); - if (range_begin > range_end) - return TRIO_ERROR_RETURN(TRIO_ERANGE, index); - - for (i = (int)range_begin; i <= (int)range_end; i++) - characterclass[i]++; - - ch = range_end; - break; - -#if TRIO_EXTENSION - - case SPECIFIER_GROUP: - - switch (format[index + 1]) - { - case QUALIFIER_DOT: /* Collating symbol */ - /* - * FIXME: This will be easier to implement when multibyte - * characters have been implemented. Until now, we ignore - * this feature. - */ - for (i = index + 2; ; i++) - { - if (format[i] == NIL) - /* Error in syntax */ - return -1; - else if (format[i] == QUALIFIER_DOT) - break; /* for */ - } - if (format[++i] != SPECIFIER_UNGROUP) - return -1; - - index = i; - break; - - case QUALIFIER_EQUAL: /* Equivalence class expressions */ - { - unsigned int j; - unsigned int k; - - if (internalCollationUnconverted) - { - /* Lazy evalutation of collation array */ - TrioGetCollation(); - internalCollationUnconverted = FALSE; - } - for (i = index + 2; ; i++) - { - if (format[i] == NIL) - /* Error in syntax */ - return -1; - else if (format[i] == QUALIFIER_EQUAL) - break; /* for */ - else - { - /* Mark any equivalent character */ - k = (unsigned int)format[i]; - for (j = 0; internalCollationArray[k][j] != NIL; j++) - characterclass[(int)internalCollationArray[k][j]]++; - } - } - if (format[++i] != SPECIFIER_UNGROUP) - return -1; - - index = i; - } - break; - - case QUALIFIER_COLON: /* Character class expressions */ - - if (StrEqualMax(CLASS_ALNUM, sizeof(CLASS_ALNUM) - 1, - &format[index])) - { - for (i = 0; i < MAX_CHARACTER_CLASS; i++) - if (isalnum(i)) - characterclass[i]++; - index += sizeof(CLASS_ALNUM) - 1; - } - else if (StrEqualMax(CLASS_ALPHA, sizeof(CLASS_ALPHA) - 1, - &format[index])) - { - for (i = 0; i < MAX_CHARACTER_CLASS; i++) - if (isalpha(i)) - characterclass[i]++; - index += sizeof(CLASS_ALPHA) - 1; - } - else if (StrEqualMax(CLASS_CNTRL, sizeof(CLASS_CNTRL) - 1, - &format[index])) - { - for (i = 0; i < MAX_CHARACTER_CLASS; i++) - if (iscntrl(i)) - characterclass[i]++; - index += sizeof(CLASS_CNTRL) - 1; - } - else if (StrEqualMax(CLASS_DIGIT, sizeof(CLASS_DIGIT) - 1, - &format[index])) - { - for (i = 0; i < MAX_CHARACTER_CLASS; i++) - if (isdigit(i)) - characterclass[i]++; - index += sizeof(CLASS_DIGIT) - 1; - } - else if (StrEqualMax(CLASS_GRAPH, sizeof(CLASS_GRAPH) - 1, - &format[index])) - { - for (i = 0; i < MAX_CHARACTER_CLASS; i++) - if (isgraph(i)) - characterclass[i]++; - index += sizeof(CLASS_GRAPH) - 1; - } - else if (StrEqualMax(CLASS_LOWER, sizeof(CLASS_LOWER) - 1, - &format[index])) - { - for (i = 0; i < MAX_CHARACTER_CLASS; i++) - if (islower(i)) - characterclass[i]++; - index += sizeof(CLASS_LOWER) - 1; - } - else if (StrEqualMax(CLASS_PRINT, sizeof(CLASS_PRINT) - 1, - &format[index])) - { - for (i = 0; i < MAX_CHARACTER_CLASS; i++) - if (isprint(i)) - characterclass[i]++; - index += sizeof(CLASS_PRINT) - 1; - } - else if (StrEqualMax(CLASS_PUNCT, sizeof(CLASS_PUNCT) - 1, - &format[index])) - { - for (i = 0; i < MAX_CHARACTER_CLASS; i++) - if (ispunct(i)) - characterclass[i]++; - index += sizeof(CLASS_PUNCT) - 1; - } - else if (StrEqualMax(CLASS_SPACE, sizeof(CLASS_SPACE) - 1, - &format[index])) - { - for (i = 0; i < MAX_CHARACTER_CLASS; i++) - if (isspace(i)) - characterclass[i]++; - index += sizeof(CLASS_SPACE) - 1; - } - else if (StrEqualMax(CLASS_UPPER, sizeof(CLASS_UPPER) - 1, - &format[index])) - { - for (i = 0; i < MAX_CHARACTER_CLASS; i++) - if (isupper(i)) - characterclass[i]++; - index += sizeof(CLASS_UPPER) - 1; - } - else if (StrEqualMax(CLASS_XDIGIT, sizeof(CLASS_XDIGIT) - 1, - &format[index])) - { - for (i = 0; i < MAX_CHARACTER_CLASS; i++) - if (isxdigit(i)) - characterclass[i]++; - index += sizeof(CLASS_XDIGIT) - 1; - } - else - { - characterclass[(int)ch]++; - } - break; - - default: - characterclass[(int)ch]++; - break; - } - break; - -#endif /* TRIO_EXTENSION */ - - default: - characterclass[(int)ch]++; - break; - } - } - return 0; -} - -/************************************************************************* - * TrioReadNumber [private] - * - * We implement our own number conversion in preference of strtol and - * strtoul, because we must handle 'long long' and thousand separators. - */ -static BOOLEAN_T -TrioReadNumber(trio_T *self, - trio_uintmax_t *target, - unsigned long flags, - int width, - int base) -{ - trio_uintmax_t number = 0; - int digit; - int count; - BOOLEAN_T isNegative = FALSE; - int j; - - assert(VALID(self)); - assert(VALID(self->InStream)); - assert((base >= MIN_BASE && base <= MAX_BASE) || (base == NO_BASE)); - - if (internalDigitsUnconverted) - { - /* Lazy evaluation of digits array */ - memset(internalDigitArray, -1, sizeof(internalDigitArray)); - for (j = 0; j < (int)sizeof(internalDigitsLower) - 1; j++) - { - internalDigitArray[(int)internalDigitsLower[j]] = j; - internalDigitArray[(int)internalDigitsUpper[j]] = j; - } - internalDigitsUnconverted = FALSE; - } - - TrioSkipWhitespaces(self); - - if (!(flags & FLAGS_UNSIGNED)) - { - /* Leading sign */ - if (self->current == '+') - { - self->InStream(self, NULL); - } - else if (self->current == '-') - { - self->InStream(self, NULL); - isNegative = TRUE; - } - } - - count = self->processed; - - if (flags & FLAGS_ALTERNATIVE) - { - switch (base) - { - case NO_BASE: - case BASE_OCTAL: - case BASE_HEX: - case BASE_BINARY: - if (self->current == '0') - { - self->InStream(self, NULL); - if (self->current) - { - if ((base == BASE_HEX) && - (toupper(self->current) == 'X')) - { - self->InStream(self, NULL); - } - else if ((base == BASE_BINARY) && - (toupper(self->current) == 'B')) - { - self->InStream(self, NULL); - } - } - } - else - return FALSE; - break; - default: - break; - } - } - - while (((width == NO_WIDTH) || (self->processed - count < width)) && - (! ((self->current == EOF) || isspace(self->current)))) - { - if (isascii(self->current)) - { - digit = internalDigitArray[self->current]; - /* Abort if digit is not allowed in the specified base */ - if ((digit == -1) || (digit >= base)) - break; - } - else if (flags & FLAGS_QUOTE) - { - /* Compare with thousands separator */ - for (j = 0; internalThousandSeparator[j] && self->current; j++) - { - if (internalThousandSeparator[j] != self->current) - break; - - self->InStream(self, NULL); - } - if (internalThousandSeparator[j]) - break; /* Mismatch */ - else - continue; /* Match */ - } - else - break; - - number *= base; - number += digit; - - self->InStream(self, NULL); - } - - /* Was anything read at all? */ - if (self->processed == count) - return FALSE; - - if (target) - *target = (isNegative) ? -number : number; - return TRUE; -} - -/************************************************************************* - * TrioReadChar [private] - */ -static int -TrioReadChar(trio_T *self, - char *target, - unsigned long flags, - int width) -{ - int i; - char ch; - trio_uintmax_t number; - - assert(VALID(self)); - assert(VALID(self->InStream)); - - for (i = 0; - (self->current != EOF) && (i < width); - i++) - { - ch = (char)self->current; - self->InStream(self, NULL); - if ((flags & FLAGS_ALTERNATIVE) && (ch == CHAR_BACKSLASH)) - { - switch (self->current) - { - case '\\': ch = '\\'; break; - case 'a': ch = '\007'; break; - case 'b': ch = '\b'; break; - case 'f': ch = '\f'; break; - case 'n': ch = '\n'; break; - case 'r': ch = '\r'; break; - case 't': ch = '\t'; break; - case 'v': ch = '\v'; break; - default: - if (isdigit(self->current)) - { - /* Read octal number */ - if (!TrioReadNumber(self, &number, 0, 3, BASE_OCTAL)) - return 0; - ch = (char)number; - } - else if (toupper(self->current) == 'X') - { - /* Read hexadecimal number */ - self->InStream(self, NULL); - if (!TrioReadNumber(self, &number, 0, 2, BASE_HEX)) - return 0; - ch = (char)number; - } - else - { - ch = (char)self->current; - } - break; - } - } - - if (target) - target[i] = ch; - } - return i + 1; -} - -/************************************************************************* - * TrioReadString [private] - */ -static BOOLEAN_T -TrioReadString(trio_T *self, - char *target, - unsigned long flags, - int width) -{ - int i; - - assert(VALID(self)); - assert(VALID(self->InStream)); - - TrioSkipWhitespaces(self); - - /* - * Continue until end of string is reached, a whitespace is encountered, - * or width is exceeded - */ - for (i = 0; - ((width == NO_WIDTH) || (i < width)) && - (! ((self->current == EOF) || isspace(self->current))); - i++) - { - if (TrioReadChar(self, &target[i], flags, 1) == 0) - break; /* for */ - } - if (target) - target[i] = NIL; - return TRUE; -} - -/************************************************************************* - * TrioReadWideChar [private] - */ -#if TRIO_WIDECHAR -static int -TrioReadWideChar(trio_T *self, - wchar_t *target, - unsigned long flags, - int width) -{ - int i; - int j; - int size; - int amount = 0; - wchar_t wch; - char buffer[MB_LEN_MAX + 1]; - - assert(VALID(self)); - assert(VALID(self->InStream)); - - for (i = 0; - (self->current != EOF) && (i < width); - i++) - { - if (isascii(self->current)) - { - if (TrioReadChar(self, buffer, flags, 1) == 0) - return 0; - buffer[1] = NIL; - } - else - { - /* - * Collect a multibyte character, by enlarging buffer until - * it contains a fully legal multibyte character, or the - * buffer is full. - */ - j = 0; - do - { - buffer[j++] = (char)self->current; - buffer[j] = NIL; - self->InStream(self, NULL); - } - while ((j < (int)sizeof(buffer)) && (mblen(buffer, (size_t)j) != j)); - } - if (target) - { - size = mbtowc(&wch, buffer, sizeof(buffer)); - if (size > 0) - target[i] = wch; - } - amount += size; - self->InStream(self, NULL); - } - return amount; -} -#endif /* TRIO_WIDECHAR */ - -/************************************************************************* - * TrioReadWideString [private] - */ -#if TRIO_WIDECHAR -static BOOLEAN_T -TrioReadWideString(trio_T *self, - wchar_t *target, - unsigned long flags, - int width) -{ - int i; - int size; - - assert(VALID(self)); - assert(VALID(self->InStream)); - - TrioSkipWhitespaces(self); - -#if defined(TRIO_COMPILER_SUPPORTS_MULTIBYTE) - mblen(NULL, 0); -#endif - - /* - * Continue until end of string is reached, a whitespace is encountered, - * or width is exceeded - */ - for (i = 0; - ((width == NO_WIDTH) || (i < width)) && - (! ((self->current == EOF) || isspace(self->current))); - ) - { - size = TrioReadWideChar(self, &target[i], flags, 1); - if (size == 0) - break; /* for */ - - i += size; - } - if (target) - target[i] = L'\0'; - return TRUE; -} -#endif /* TRIO_WIDECHAR */ - -/************************************************************************* - * TrioReadGroup [private] - * - * FIXME: characterclass does not work with multibyte characters - */ -static BOOLEAN_T -TrioReadGroup(trio_T *self, - char *target, - int *characterclass, - unsigned long flags, - int width) -{ - int ch; - int i; - - assert(VALID(self)); - assert(VALID(self->InStream)); - - ch = self->current; - for (i = 0; - ((width == NO_WIDTH) || (i < width)) && - (! ((ch == EOF) || - (((flags & FLAGS_EXCLUDE) != 0) ^ (characterclass[ch] == 0)))); - i++) - { - if (target) - target[i] = (char)ch; - self->InStream(self, &ch); - } - - if (target) - target[i] = NIL; - return TRUE; -} - -/************************************************************************* - * TrioReadDouble [private] - * - * FIXME: - * add long double - */ -static BOOLEAN_T -TrioReadDouble(trio_T *self, - double *target, - unsigned long flags, - int width) -{ - int ch; - char doubleString[512] = ""; - int index = 0; - int start; - int j; - BOOLEAN_T isHex = FALSE; - - if ((width == NO_WIDTH) || (width > (int)sizeof(doubleString) - 1)) - width = sizeof(doubleString) - 1; - - TrioSkipWhitespaces(self); - - /* - * Read entire double number from stream. StrToDouble requires a - * string as input, but InStream can be anything, so we have to - * collect all characters. - */ - ch = self->current; - if ((ch == '+') || (ch == '-')) - { - doubleString[index++] = (char)ch; - self->InStream(self, &ch); - width--; - } - - start = index; - switch (ch) - { - case 'n': - case 'N': - /* Not-a-number */ - if (index != 0) - break; - /* FALLTHROUGH */ - case 'i': - case 'I': - /* Infinity */ - while (isalpha(ch) && (index - start < width)) - { - doubleString[index++] = (char)ch; - self->InStream(self, &ch); - } - doubleString[index] = NIL; - - /* Case insensitive string comparison */ - if (StrEqual(&doubleString[start], INFINITE_UPPER) || - StrEqual(&doubleString[start], LONG_INFINITE_UPPER)) - { - *target = ((start == 1 && doubleString[0] == '-')) - ? -HUGE_VAL - : HUGE_VAL; - return TRUE; - } - if (StrEqual(doubleString, NAN_LOWER)) - { - /* NaN must not have a preceeding + nor - */ - *target = TrioGenerateNaN(); - return TRUE; - } - return FALSE; - - default: - break; - } - - if (ch == '0') - { - doubleString[index++] = (char)ch; - self->InStream(self, &ch); - if (toupper(ch) == 'X') - { - isHex = TRUE; - doubleString[index++] = (char)ch; - self->InStream(self, &ch); - } - } - while ((ch != EOF) && (index - start < width)) - { - /* Integer part */ - if (isHex ? isxdigit(ch) : isdigit(ch)) - { - doubleString[index++] = (char)ch; - self->InStream(self, &ch); - } - else if (flags & FLAGS_QUOTE) - { - /* Compare with thousands separator */ - for (j = 0; internalThousandSeparator[j] && self->current; j++) - { - if (internalThousandSeparator[j] != self->current) - break; - - self->InStream(self, &ch); - } - if (internalThousandSeparator[j]) - break; /* Mismatch */ - else - continue; /* Match */ - } - else - break; /* while */ - } - if (ch == '.') - { - /* Decimal part */ - doubleString[index++] = (char)ch; - self->InStream(self, &ch); - while ((isHex ? isxdigit(ch) : isdigit(ch)) && - (index - start < width)) - { - doubleString[index++] = (char)ch; - self->InStream(self, &ch); - } - if (isHex ? (toupper(ch) == 'P') : (toupper(ch) == 'E')) - { - /* Exponent */ - doubleString[index++] = (char)ch; - self->InStream(self, &ch); - if ((ch == '+') || (ch == '-')) - { - doubleString[index++] = (char)ch; - self->InStream(self, &ch); - } - while ((isHex ? isxdigit(ch) : isdigit(ch)) && - (index - start < width)) - { - doubleString[index++] = (char)ch; - self->InStream(self, &ch); - } - } - } - - if ((index == start) || (*doubleString == NIL)) - return FALSE; - - if (flags & FLAGS_LONGDOUBLE) -/* *longdoublePointer = StrToLongDouble()*/ - return FALSE; /* FIXME: Remove when long double is implemented */ - else - { - *target = StrToDouble(doubleString, NULL); - } - return TRUE; -} - -/************************************************************************* - * TrioReadPointer [private] - */ -static BOOLEAN_T -TrioReadPointer(trio_T *self, - void **target, - unsigned long flags) -{ - trio_uintmax_t number; - char buffer[sizeof(null)]; - - flags |= (FLAGS_UNSIGNED | FLAGS_ALTERNATIVE | FLAGS_NILPADDING); - - if (TrioReadNumber(self, - &number, - flags, - POINTER_WIDTH, - BASE_HEX)) - { - /* - * The strange assignment of number is a workaround for a compiler - * warning - */ - if (target) - *target = (char *)0 + number; - return TRUE; - } - else if (TrioReadString(self, - (flags & FLAGS_IGNORE) - ? NULL - : buffer, - 0, - sizeof(null) - 1)) - { - if (StrEqualCase(buffer, null)) - { - if (target) - *target = NULL; - return TRUE; - } - } - return FALSE; -} - -/************************************************************************* - * TrioScan [private] - */ -static int -TrioScan(const void *source, - size_t sourceSize, - void (*InStream)(trio_T *, int *), - const char *format, - va_list arglist, - void **argarray) -{ -#if defined(TRIO_COMPILER_SUPPORTS_MULTIBYTE) - int charlen; -#endif - int status; - int assignment; - parameter_T parameters[MAX_PARAMETERS]; - trio_T internalData; - trio_T *data; - int ch; -#if defined(TRIO_COMPILER_SUPPORTS_MULTIBYTE) - int cnt; -#endif - int index; /* Index of format string */ - int i; /* Index of current parameter */ - unsigned long flags; - int width; - int base; - void *pointer; - - assert(VALID(InStream)); - assert(VALID(format)); - - memset(&internalData, 0, sizeof(internalData)); - data = &internalData; - data->InStream = InStream; - data->location = (void *)source; - data->max = sourceSize; - -#if defined(USE_LOCALE) - if (NULL == internalLocaleValues) - { - TrioSetLocale(); - } -#endif - - status = TrioPreprocess(TYPE_SCAN, format, parameters, arglist, argarray); - if (status < 0) - return status; - - assignment = 0; - i = 0; - index = 0; - data->InStream(data, &ch); - -#if defined(TRIO_COMPILER_SUPPORTS_MULTIBYTE) - mblen(NULL, 0); -#endif - - while (format[index]) - { -#if defined(TRIO_COMPILER_SUPPORTS_MULTIBYTE) - if (! isascii(format[index])) - { - charlen = mblen(&format[index], MB_LEN_MAX); - /* Compare multibyte characters in format string */ - for (cnt = 0; cnt < charlen - 1; cnt++) - { - if (ch != format[index + cnt]) - { - return TRIO_ERROR_RETURN(TRIO_EINVAL, index); - } - data->InStream(data, &ch); - } - continue; /* while */ - } -#endif /* TRIO_COMPILER_SUPPORTS_MULTIBYTE */ - if (EOF == ch) - return EOF; - - if (CHAR_IDENTIFIER == format[index]) - { - if (CHAR_IDENTIFIER == format[index + 1]) - { - /* Two % in format matches one % in input stream */ - if (CHAR_IDENTIFIER == ch) - { - data->InStream(data, &ch); - index += 2; - continue; /* while format chars left */ - } - else - return TRIO_ERROR_RETURN(TRIO_EINVAL, index); - } - - /* Skip the parameter entries */ - while (parameters[i].type == FORMAT_PARAMETER) - i++; - - flags = parameters[i].flags; - /* Find width */ - width = parameters[i].width; - if (flags & FLAGS_WIDTH_PARAMETER) - { - /* Get width from parameter list */ - width = (int)parameters[width].data.number.as_signed; - } - /* Find base */ - base = parameters[i].base; - if (flags & FLAGS_BASE_PARAMETER) - { - /* Get base from parameter list */ - base = (int)parameters[base].data.number.as_signed; - } - - switch (parameters[i].type) - { - case FORMAT_INT: - { - trio_uintmax_t number; - - if (0 == base) - base = BASE_DECIMAL; - - if (!TrioReadNumber(data, - &number, - flags, - width, - base)) - return assignment; - assignment++; - - if (!(flags & FLAGS_IGNORE)) - { - pointer = parameters[i].data.pointer; -#if defined(QUALIFIER_SIZE_T) || defined(QUALIFIER_SIZE_T_UPPER) - if (flags & FLAGS_SIZE_T) - *(size_t *)pointer = (size_t)number; - else -#endif -#if defined(QUALIFIER_PTRDIFF_T) - if (flags & FLAGS_PTRDIFF_T) - *(ptrdiff_t *)pointer = (ptrdiff_t)number; - else -#endif -#if defined(QUALIFIER_INTMAX_T) - if (flags & FLAGS_INTMAX_T) - *(trio_intmax_t *)pointer = (trio_intmax_t)number; - else -#endif - if (flags & FLAGS_QUAD) - *(trio_ulonglong_t *)pointer = (trio_ulonglong_t)number; - else if (flags & FLAGS_LONG) - *(long int *)pointer = (long int)number; - else if (flags & FLAGS_SHORT) - *(short int *)pointer = (short int)number; - else - *(int *)pointer = (int)number; - } - } - break; /* FORMAT_INT */ - - case FORMAT_STRING: -#if TRIO_WIDECHAR - if (flags & FLAGS_WIDECHAR) - { - if (!TrioReadWideString(data, - (flags & FLAGS_IGNORE) - ? NULL - : parameters[i].data.wstring, - flags, - width)) - return assignment; - } - else -#endif - { - if (!TrioReadString(data, - (flags & FLAGS_IGNORE) - ? NULL - : parameters[i].data.string, - flags, - width)) - return assignment; - } - assignment++; - break; /* FORMAT_STRING */ - - case FORMAT_DOUBLE: - if (!TrioReadDouble(data, - (flags & FLAGS_IGNORE) - ? NULL - : parameters[i].data.doublePointer, - flags, - width)) - return assignment; - assignment++; - break; /* FORMAT_DOUBLE */ - - case FORMAT_GROUP: - { - int characterclass[MAX_CHARACTER_CLASS + 1]; - int rc; - - /* Skip over modifiers */ - while (format[index] != SPECIFIER_GROUP) - { - index++; - } - /* Skip over group specifier */ - index++; - - memset(characterclass, 0, sizeof(characterclass)); - rc = TrioGetCharacterClass(format, - &index, - &flags, - characterclass); - if (rc < 0) - return rc; - - if (!TrioReadGroup(data, - (flags & FLAGS_IGNORE) - ? NULL - : parameters[i].data.string, - characterclass, - flags, - parameters[i].width)) - return assignment; - assignment++; - } - break; /* FORMAT_GROUP */ - - case FORMAT_COUNT: - pointer = parameters[i].data.pointer; - if (NULL != pointer) - { -#if defined(QUALIFIER_SIZE_T) || defined(QUALIFIER_SIZE_T_UPPER) - if (flags & FLAGS_SIZE_T) - *(size_t *)pointer = (size_t)data->committed; - else -#endif -#if defined(QUALIFIER_PTRDIFF_T) - if (flags & FLAGS_PTRDIFF_T) - *(ptrdiff_t *)pointer = (ptrdiff_t)data->committed; - else -#endif -#if defined(QUALIFIER_INTMAX_T) - if (flags & FLAGS_INTMAX_T) - *(trio_intmax_t *)pointer = (trio_intmax_t)data->committed; - else -#endif - if (flags & FLAGS_QUAD) - { - *(trio_ulonglong_t *)pointer = (trio_ulonglong_t)data->committed; - } - else if (flags & FLAGS_LONG) - { - *(long int *)pointer = (long int)data->committed; - } - else if (flags & FLAGS_SHORT) - { - *(short int *)pointer = (short int)data->committed; - } - else - { - *(int *)pointer = (int)data->committed; - } - } - break; /* FORMAT_COUNT */ - - case FORMAT_CHAR: -#if TRIO_WIDECHAR - if (flags & FLAGS_WIDECHAR) - { - if (TrioReadWideChar(data, - (flags & FLAGS_IGNORE) - ? NULL - : parameters[i].data.wstring, - flags, - (width == NO_WIDTH) ? 1 : width) > 0) - return assignment; - } - else -#endif - { - if (TrioReadChar(data, - (flags & FLAGS_IGNORE) - ? NULL - : parameters[i].data.string, - flags, - (width == NO_WIDTH) ? 1 : width) > 0) - return assignment; - } - assignment++; - break; /* FORMAT_CHAR */ - - case FORMAT_POINTER: - if (!TrioReadPointer(data, - (flags & FLAGS_IGNORE) - ? NULL - : (void **)parameters[i].data.pointer, - flags)) - return assignment; - assignment++; - break; /* FORMAT_POINTER */ - - case FORMAT_PARAMETER: - break; /* FORMAT_PARAMETER */ - - default: - return TRIO_ERROR_RETURN(TRIO_EINVAL, index); - } - ch = data->current; - index = parameters[i].indexAfterSpecifier; - i++; - } - else /* Not an % identifier */ - { - if (isspace((int)format[index])) - { - /* Whitespaces may match any amount of whitespaces */ - ch = TrioSkipWhitespaces(data); - } - else if (ch == format[index]) - { - data->InStream(data, &ch); - } - else - return TRIO_ERROR_RETURN(TRIO_EINVAL, index); - - index++; - } - } - return assignment; -} - -/************************************************************************* - * TrioInStreamFile [private] - */ -static void -TrioInStreamFile(trio_T *self, - int *intPointer) -{ - FILE *file = (FILE *)self->location; - - assert(VALID(self)); - assert(VALID(file)); - - self->current = fgetc(file); - self->processed++; - self->committed++; - - if (VALID(intPointer)) - { - *intPointer = self->current; - } -} - -/************************************************************************* - * TrioInStreamFileDescriptor [private] - */ -static void -TrioInStreamFileDescriptor(trio_T *self, - int *intPointer) -{ - int fd = *((int *)self->location); - int size; - unsigned char input; - - assert(VALID(self)); - - size = read(fd, &input, sizeof(char)); - self->current = (size == 0) ? EOF : input; - self->processed++; - self->committed++; - - if (VALID(intPointer)) - { - *intPointer = self->current; - } -} - -/************************************************************************* - * TrioInStreamString [private] - */ -static void -TrioInStreamString(trio_T *self, - int *intPointer) -{ - unsigned char **buffer; - - assert(VALID(self)); - assert(VALID(self->InStream)); - assert(VALID(self->location)); - - buffer = (unsigned char **)self->location; - self->current = (*buffer)[0]; - if (self->current == NIL) - self->current = EOF; - (*buffer)++; - self->processed++; - self->committed++; - - if (VALID(intPointer)) - { - *intPointer = self->current; - } -} - -/************************************************************************* - * scanf - */ -int -trio_scanf(const char *format, - ...) -{ - int status; - va_list args; - - assert(VALID(format)); - - va_start(args, format); - status = TrioScan(stdin, 0, TrioInStreamFile, format, args, NULL); - va_end(args); - return status; -} - -int -trio_vscanf(const char *format, - va_list args) -{ - assert(VALID(format)); - - return TrioScan(stdin, 0, TrioInStreamFile, format, args, NULL); -} - -int -trio_scanfv(const char *format, - void **args) -{ - va_list dummy; - shutup_unitialized(&dummy); - - assert(VALID(format)); - - return TrioScan(stdin, 0, TrioInStreamFile, format, dummy, args); -} - -/************************************************************************* - * fscanf - */ -int -trio_fscanf(FILE *file, - const char *format, - ...) -{ - int status; - va_list args; - - assert(VALID(file)); - assert(VALID(format)); - - va_start(args, format); - status = TrioScan(file, 0, TrioInStreamFile, format, args, NULL); - va_end(args); - return status; -} - -int -trio_vfscanf(FILE *file, - const char *format, - va_list args) -{ - assert(VALID(file)); - assert(VALID(format)); - - return TrioScan(file, 0, TrioInStreamFile, format, args, NULL); -} - -int -trio_fscanfv(FILE *file, - const char *format, - void **args) -{ - va_list dummy; - shutup_unitialized(&dummy); - - assert(VALID(file)); - assert(VALID(format)); - - return TrioScan(file, 0, TrioInStreamFile, format, dummy, args); -} - -/************************************************************************* - * dscanf - */ -int -trio_dscanf(int fd, - const char *format, - ...) -{ - int status; - va_list args; - - assert(VALID(format)); - - va_start(args, format); - status = TrioScan(&fd, 0, TrioInStreamFileDescriptor, format, args, NULL); - va_end(args); - return status; -} - -int -trio_vdscanf(int fd, - const char *format, - va_list args) -{ - assert(VALID(format)); - - return TrioScan(&fd, 0, TrioInStreamFileDescriptor, format, args, NULL); -} - -int -trio_dscanfv(int fd, - const char *format, - void **args) -{ - va_list dummy; - shutup_unitialized(&dummy); - - assert(VALID(format)); - - return TrioScan(&fd, 0, TrioInStreamFileDescriptor, format, dummy, args); -} - -/************************************************************************* - * sscanf - */ -int -trio_sscanf(const char *buffer, - const char *format, - ...) -{ - int status; - va_list args; - - assert(VALID(buffer)); - assert(VALID(format)); - - va_start(args, format); - status = TrioScan(&buffer, 0, TrioInStreamString, format, args, NULL); - va_end(args); - return status; -} - -int -trio_vsscanf(const char *buffer, - const char *format, - va_list args) -{ - assert(VALID(buffer)); - assert(VALID(format)); - - return TrioScan(&buffer, 0, TrioInStreamString, format, args, NULL); -} - -int -trio_sscanfv(const char *buffer, - const char *format, - void **args) -{ - va_list dummy; - shutup_unitialized(&dummy); - - assert(VALID(buffer)); - assert(VALID(format)); - - return TrioScan(&buffer, 0, TrioInStreamString, format, dummy, args); -} - diff --git a/org.glite.lb-utils.trio/src/triop.h b/org.glite.lb-utils.trio/src/triop.h deleted file mode 100644 index ca49fab..0000000 --- a/org.glite.lb-utils.trio/src/triop.h +++ /dev/null @@ -1,138 +0,0 @@ -/************************************************************************* - * - * $Id$ - * - * Copyright (C) 2000 Bjorn Reese and Daniel Stenberg. - * - * Permission to use, copy, modify, and distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF - * MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE AUTHORS AND - * CONTRIBUTORS ACCEPT NO RESPONSIBILITY IN ANY CONCEIVABLE MANNER. - * - ************************************************************************ - * - * Private functions, types, etc. used for callback functions. - * - * The ref pointer is an opaque type and should remain as such. - * Private data must only be accessible through the getter and - * setter functions. - * - ************************************************************************/ - -#ifndef TRIO_TRIOP_H -#define TRIO_TRIOP_H - -#include - -#ifdef __cplusplus -extern "C" { -#endif - -#ifndef TRIO_C99 -# define TRIO_C99 1 -#endif -#ifndef TRIO_BSD -# define TRIO_BSD 1 -#endif -#ifndef TRIO_GNU -# define TRIO_GNU 1 -#endif -#ifndef TRIO_MISC -# define TRIO_MISC 1 -#endif -#ifndef TRIO_UNIX98 -# define TRIO_UNIX98 1 -#endif -#ifndef TRIO_MICROSOFT -# define TRIO_MICROSOFT 1 -#endif -#ifndef TRIO_EXTENSION -# define TRIO_EXTENSION 1 -#endif -#ifndef TRIO_WIDECHAR -# define TRIO_WIDECHAR 0 -#endif -#ifndef TRIO_ERRORS -# define TRIO_ERRORS 1 -#endif - -#ifndef TRIO_MALLOC -# define TRIO_MALLOC(n) malloc(n) -#endif -#ifndef TRIO_REALLOC -# define TRIO_REALLOC(x,n) realloc((x),(n)) -#endif -#ifndef TRIO_FREE -# define TRIO_FREE(x) free(x) -#endif - -typedef int (*trio_callback_t)(void *ref); - -void *trio_register(trio_callback_t callback, const char *name); -void trio_unregister(void *handle); - -const char *trio_get_format(void *ref); -void *trio_get_argument(void *ref); - -/* Modifiers */ -int trio_get_width(void *ref); -void trio_set_width(void *ref, int width); -int trio_get_precision(void *ref); -void trio_set_precision(void *ref, int precision); -int trio_get_base(void *ref); -void trio_set_base(void *ref, int base); -int trio_get_padding(void *ref); -void trio_set_padding(void *ref, int is_padding); -int trio_get_short(void *ref); /* h */ -void trio_set_shortshort(void *ref, int is_shortshort); -int trio_get_shortshort(void *ref); /* hh */ -void trio_set_short(void *ref, int is_short); -int trio_get_long(void *ref); /* l */ -void trio_set_long(void *ref, int is_long); -int trio_get_longlong(void *ref); /* ll */ -void trio_set_longlong(void *ref, int is_longlong); -int trio_get_longdouble(void *ref); /* L */ -void trio_set_longdouble(void *ref, int is_longdouble); -int trio_get_alternative(void *ref); /* # */ -void trio_set_alternative(void *ref, int is_alternative); -int trio_get_alignment(void *ref); /* - */ -void trio_set_alignment(void *ref, int is_leftaligned); -int trio_get_spacing(void *ref); /* (space) */ -void trio_set_spacing(void *ref, int is_space); -int trio_get_sign(void *ref); /* + */ -void trio_set_sign(void *ref, int is_showsign); -int trio_get_quote(void *ref); /* ' */ -void trio_set_quote(void *ref, int is_quote); -int trio_get_upper(void *ref); -void trio_set_upper(void *ref, int is_upper); -#if TRIO_C99 -int trio_get_largest(void *ref); /* j */ -void trio_set_largest(void *ref, int is_largest); -int trio_get_ptrdiff(void *ref); /* t */ -void trio_set_ptrdiff(void *ref, int is_ptrdiff); -int trio_get_size(void *ref); /* z / Z */ -void trio_set_size(void *ref, int is_size); -#endif - -/* Printing */ -int trio_print_ref(void *ref, const char *format, ...); -int trio_vprint_ref(void *ref, const char *format, va_list args); -int trio_printv_ref(void *ref, const char *format, void **args); - -void trio_print_int(void *ref, int number); -void trio_print_uint(void *ref, unsigned int number); -/* void trio_print_long(void *ref, long number); */ -/* void trio_print_ulong(void *ref, unsigned long number); */ -void trio_print_double(void *ref, double number); -void trio_print_string(void *ref, char *string); -void trio_print_pointer(void *ref, void *pointer); - -#ifdef __cplusplus -} /* extern "C" */ -#endif - -#endif /* TRIO_TRIOP_H */ diff --git a/org.glite.lb-utils.trio/test/trio_test.cpp b/org.glite.lb-utils.trio/test/trio_test.cpp deleted file mode 100644 index 3ba4b9c..0000000 --- a/org.glite.lb-utils.trio/test/trio_test.cpp +++ /dev/null @@ -1,85 +0,0 @@ -#include - -#include -#include - -#include "trio.h" - -class TrioTest: public CppUnit::TestFixture -{ - CPPUNIT_TEST_SUITE(TrioTest); - CPPUNIT_TEST(escapeULM); - CPPUNIT_TEST(escapeXML); - CPPUNIT_TEST(escapeSQL); - CPPUNIT_TEST_SUITE_END(); - -public: - void escapeULM(); - void escapeXML(); - void escapeSQL(); -}; - -void TrioTest::escapeULM() -{ - char *e, *r = "START we have =, \\\", and \\n in the string END"; - - trio_asprintf(&e,"START %|Us END", "we have =, \", and \n in the string"), - std::cerr << e << std::endl; - - CPPUNIT_ASSERT_MESSAGE("escape ULM failed",!strcmp(e,r)); -} - -void TrioTest::escapeXML() -{ - char *e, *r = "START there is a <tag> containing &something; </tag> END"; - - trio_asprintf(&e,"START %|Xs END", "there is a containing &something; "), - std::cerr << e << std::endl; - - CPPUNIT_ASSERT_MESSAGE("escape XML failed",!strcmp(e,r)); -} - -void TrioTest::escapeSQL() -{ - char *e, *r = "START SQL doesn''t like '' END"; - - trio_asprintf(&e,"START %|Ss END", "SQL doesn't like '"), - std::cerr << e << std::endl; - - CPPUNIT_ASSERT_MESSAGE("escape SQL failed",!strcmp(e,r)); -} - -CPPUNIT_TEST_SUITE_REGISTRATION( TrioTest ); - -#include -#include - -#include -#include -#include -#include -#include -#include - -int main (int argc,const char *argv[]) -{ - CppUnit::Test *suite = CppUnit::TestFactoryRegistry::getRegistry().makeTest(); - - assert(argc == 2); - std::ofstream xml(argv[1]); - - CppUnit::TestResult controller; - CppUnit::TestResultCollector result; - controller.addListener( &result ); - - CppUnit::TestRunner runner; - runner.addTest(suite); - runner.run(controller); - - CppUnit::XmlOutputter xout( &result, xml ); - CppUnit::CompilerOutputter tout( &result, std::cout); - xout.write(); - tout.write(); - - return result.wasSuccessful() ? 0 : 1 ; -} diff --git a/org.glite.lb-utils/.cvsignore b/org.glite.lb-utils/.cvsignore deleted file mode 100644 index 3a4edf6..0000000 --- a/org.glite.lb-utils/.cvsignore +++ /dev/null @@ -1 +0,0 @@ -.project diff --git a/org.glite.lb-utils/LICENSE b/org.glite.lb-utils/LICENSE deleted file mode 100755 index 259a91f..0000000 --- a/org.glite.lb-utils/LICENSE +++ /dev/null @@ -1,69 +0,0 @@ -LICENSE file for EGEE Middleware -================================ - -Copyright (c) 2004 on behalf of the EU EGEE Project: -The European Organization for Nuclear Research (CERN), -Istituto Nazionale di Fisica Nucleare (INFN), Italy -Datamat Spa, Italy -Centre National de la Recherche Scientifique (CNRS), France -CS Systeme d'Information (CSSI), France -Royal Institute of Technology, Center for Parallel Computers (KTH-PDC), Sweden -Universiteit van Amsterdam (UvA), Netherlands -University of Helsinki (UH.HIP), Finlan -University of Bergen (UiB), Norway -Council for the Central Laboratory of the Research Councils (CCLRC), United Kingdom - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - -1. Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - -2. Redistributions in binary form must reproduce the above copyright -notice, this list of conditions and the following disclaimer in the -documentation and/or other materials provided with the distribution. - -3. The end-user documentation included with the redistribution, if -any, must include the following acknowledgment: "This product includes -software developed by The EU EGEE Project (http://cern.ch/eu-egee/)." -Alternatively, this acknowledgment may appear in the software itself, if -and wherever such third-party acknowledgments normally appear. - -4. The names EGEE and the EU EGEE Project must not be -used to endorse or promote products derived from this software without -prior written permission. For written permission, please contact -. - -5. You are under no obligation whatsoever to provide anyone with any -bug fixes, patches, or upgrades to the features, functionality or -performance of the Software ("Enhancements") that you may develop over -time; however, if you choose to provide your Enhancements to The EU -EGEE Project, or if you choose to otherwise publish or distribute your -Enhancements, in source code form without contemporaneously requiring -end users of The EU EGEE Proejct to enter into a separate written license -agreement for such Enhancements, then you hereby grant The EU EGEE Project -a non-exclusive, royalty-free perpetual license to install, use, copy, -modify, prepare derivative works, incorporate into the EGEE Middleware -or any other computer software, distribute, and sublicense your -Enhancements or derivative works thereof, in binary and source code -form (if any), whether developed by The EU EGEE Project or third parties. - -THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED -WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL PROJECT OR ITS CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR -BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE -OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN -IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -This software consists of voluntary contributions made by many -individuals on behalf of the EU EGEE Prject. For more information on The -EU EGEE Project, please see http://cern.ch/eu-egee/. For more information on -EGEE Middleware, please see http://egee-jra1.web.cern.ch/egee-jra1/ - - diff --git a/org.glite.lb-utils/build.xml b/org.glite.lb-utils/build.xml deleted file mode 100644 index 85553ce..0000000 --- a/org.glite.lb-utils/build.xml +++ /dev/null @@ -1,303 +0,0 @@ - - - - - - - Ant build file to build the lb-utils subsystem. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Preparing directories ... - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <project name="${subsystem.name}" type="post-subsystem" packageName="${global.prefix}-${subsystem.prefix}"/> - - - - diff --git a/org.glite.lb-utils/project/build.number b/org.glite.lb-utils/project/build.number deleted file mode 100644 index 5cfec85..0000000 --- a/org.glite.lb-utils/project/build.number +++ /dev/null @@ -1 +0,0 @@ -module.build = 0 diff --git a/org.glite.lb-utils/project/build.properties b/org.glite.lb-utils/project/build.properties deleted file mode 100755 index e69de29..0000000 diff --git a/org.glite.lb-utils/project/dependencies.properties b/org.glite.lb-utils/project/dependencies.properties deleted file mode 100644 index c590a39..0000000 --- a/org.glite.lb-utils/project/dependencies.properties +++ /dev/null @@ -1,13 +0,0 @@ - -################################################################### -# System dependencies -################################################################### - -org.glite.version = HEAD -org.glite.lb-utils.version = HEAD - -# Component dependencies tag = do not remove this line = -org.glite.lb-utils.db.version = HEAD -#org.glite.lb-utils.jobid.version = HEAD -#org.glite.lb-utils.server-bones.version = HEAD -#org.glite.lb-utils.trio.version = HEAD diff --git a/org.glite.lb-utils/project/glite.lb-utils.csf.xml b/org.glite.lb-utils/project/glite.lb-utils.csf.xml deleted file mode 100644 index 98945b8..0000000 --- a/org.glite.lb-utils/project/glite.lb-utils.csf.xml +++ /dev/null @@ -1,218 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - The org.glite and org.glite.lb-utils modules have been updated, please rerun the configuration file - - - - - The org.glite and org.glite.lb-utils modules have been updated, please rerun the configuration file - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/org.glite.lb-utils/project/properties.xml b/org.glite.lb-utils/project/properties.xml deleted file mode 100644 index 5f9597f..0000000 --- a/org.glite.lb-utils/project/properties.xml +++ /dev/null @@ -1,64 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/org.glite.lb-utils/project/taskdefs.xml b/org.glite.lb-utils/project/taskdefs.xml deleted file mode 100644 index 7963150..0000000 --- a/org.glite.lb-utils/project/taskdefs.xml +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - - - diff --git a/org.glite.lb-utils/project/version.properties b/org.glite.lb-utils/project/version.properties deleted file mode 100755 index 6f1f8ab..0000000 --- a/org.glite.lb-utils/project/version.properties +++ /dev/null @@ -1,2 +0,0 @@ -module.version = 0.0.0 -module.age = 0 \ No newline at end of file diff --git a/org.glite.security.gsoap-plugin/LICENSE b/org.glite.security.gsoap-plugin/LICENSE deleted file mode 100644 index 259a91f..0000000 --- a/org.glite.security.gsoap-plugin/LICENSE +++ /dev/null @@ -1,69 +0,0 @@ -LICENSE file for EGEE Middleware -================================ - -Copyright (c) 2004 on behalf of the EU EGEE Project: -The European Organization for Nuclear Research (CERN), -Istituto Nazionale di Fisica Nucleare (INFN), Italy -Datamat Spa, Italy -Centre National de la Recherche Scientifique (CNRS), France -CS Systeme d'Information (CSSI), France -Royal Institute of Technology, Center for Parallel Computers (KTH-PDC), Sweden -Universiteit van Amsterdam (UvA), Netherlands -University of Helsinki (UH.HIP), Finlan -University of Bergen (UiB), Norway -Council for the Central Laboratory of the Research Councils (CCLRC), United Kingdom - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - -1. Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - -2. Redistributions in binary form must reproduce the above copyright -notice, this list of conditions and the following disclaimer in the -documentation and/or other materials provided with the distribution. - -3. The end-user documentation included with the redistribution, if -any, must include the following acknowledgment: "This product includes -software developed by The EU EGEE Project (http://cern.ch/eu-egee/)." -Alternatively, this acknowledgment may appear in the software itself, if -and wherever such third-party acknowledgments normally appear. - -4. The names EGEE and the EU EGEE Project must not be -used to endorse or promote products derived from this software without -prior written permission. For written permission, please contact -. - -5. You are under no obligation whatsoever to provide anyone with any -bug fixes, patches, or upgrades to the features, functionality or -performance of the Software ("Enhancements") that you may develop over -time; however, if you choose to provide your Enhancements to The EU -EGEE Project, or if you choose to otherwise publish or distribute your -Enhancements, in source code form without contemporaneously requiring -end users of The EU EGEE Proejct to enter into a separate written license -agreement for such Enhancements, then you hereby grant The EU EGEE Project -a non-exclusive, royalty-free perpetual license to install, use, copy, -modify, prepare derivative works, incorporate into the EGEE Middleware -or any other computer software, distribute, and sublicense your -Enhancements or derivative works thereof, in binary and source code -form (if any), whether developed by The EU EGEE Project or third parties. - -THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED -WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL PROJECT OR ITS CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR -BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE -OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN -IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -This software consists of voluntary contributions made by many -individuals on behalf of the EU EGEE Prject. For more information on The -EU EGEE Project, please see http://cern.ch/eu-egee/. For more information on -EGEE Middleware, please see http://egee-jra1.web.cern.ch/egee-jra1/ - - diff --git a/org.glite.security.gsoap-plugin/Makefile b/org.glite.security.gsoap-plugin/Makefile deleted file mode 100644 index 8a8611e..0000000 --- a/org.glite.security.gsoap-plugin/Makefile +++ /dev/null @@ -1,305 +0,0 @@ -# defaults -top_srcdir=.. -builddir=build -top_builddir=${top_srcdir}/${builddir} -stagedir=. -distdir=. -globalprefix=glite -package=gsoap-plugin -version=1.0.0 -PREFIX=/opt/glite - -glite_location=/opt/glite -globus_prefix=/opt/globus -nothrflavour=gcc32 -thrflavour=gcc32pthr -gsoap_prefix=/opt/gsoap - -CC=gcc - -gsoap_versions?=2.6.2 2.7.0f 2.7.6b 2.7.9b 2.7.9d -gsoap_versions:=${shell if ! echo $gsoap_versions | grep "\<${gsoap_default_version}\>" >/dev/null; then echo "${gsoap_default_version} "; else echo ne; fi} ${gsoap_versions} - --include Makefile.inc --include ../Makefile.inc - -GSPLUGIN_DEBUG?=no -GSPLUGIN_VERSION_CHECKING?=yes - - -offset=1 -version_info:=-version-info ${shell \ - perl -e '$$,=":"; @F=split "\\.","${version}"; print $$F[0]+$$F[1]+${offset},$$F[2],$$F[1]' } - -# version_info=-version-info `echo ${version} | cut -d. -f1,2 | tr . :` - -ext_repository:=${shell if [ -d "${repository}/externals" ]; then \ - echo "${repository}/externals"; \ - else echo "${repository}"; \ - fi} - -gsoap_version=${gsoap_default_version} -gsoap_prefix?=${ext_repository}/${gsoap_name}/${gsoap_version}/${gsoap_platform} - -VPATH=${top_srcdir}/src:${top_srcdir}/test:${top_srcdir}/examples - -TEST_LIBS:=-L${cppunit}/lib -lcppunit -TEST_INC:=-I${cppunit}/include - -default: all - -#ifeq ($(GSPLUGIN_DEBUG),yes) -# DEBUG:=-g -O0 -Wall -DGSPLUGIN_DEBUG -#else -# DEBUG:=-g -O0 -Wall -#endif - -DEBUG:=-g -O0 -Wall - -#ifeq ($(GSPLUGIN_VERSION_CHECKING),yes) -# DEBUG:=${DEBUG} -DCHECK_GSOAP_VERSION -#endif - -CFLAGS:= ${DEBUG} \ - -DVERSION=\"${version}\" \ - -DWITH_NONAMESPACES \ - -I. -I${top_srcdir}/interface \ - -I${stagedir}/include \ - -I${cares_prefix}/include \ - -I${gsoap_prefix}/include \ - ${COVERAGE_FLAGS} -D_GNU_SOURCE -DDATAGRID_EXTENSION - -LDFLAGS:=${COVERAGE_FLAGS} - -COMPILE:=libtool --mode=compile ${CC} ${CFLAGS} -LINK:=libtool --mode=link ${CC} -rpath ${stagedir}/lib ${LDFLAGS} -LINKXX:=libtool --mode=link ${CXX} ${LDFLAGS} -INSTALL:=libtool --mode=install install -LINKXX:=libtool --mode=link ${CXX} -rpath ${stagedir}/lib ${LDFLAGS} - -GLOBUS_INC:= -I${globus_prefix}/include/${nothrflavour} -GLOBUS_THR_INC:= -I${globus_prefix}/include/${thrflavour} - -GLOBUS_LIBS:= -L${globus_prefix}/lib \ - -lglobus_common_${nothrflavour} \ - -lglobus_gssapi_gsi_${nothrflavour} \ - -GLOBUS_THR_LIBS:= -L${globus_prefix}/lib \ - -lglobus_common_${thrflavour} \ - -lglobus_gssapi_gsi_${thrflavour} - -GSOAP_LIBS:= -L${gsoap_prefix}/lib -lgsoap -ARES_LIBS:=-L${cares_prefix}/lib -lcares - -EX_LIBS:= ${GLOBUS_LIBS} ${ARES_LIBS} -EX_THRLIBS := ${GLOBUS_THR_LIBS} ${ARES_LIBS} - -HDRS:=glite_gss.h glite_gsplugin.h glite_gscompat.h - -GSS_OBJS:=glite_gss.o -GSS_LOBJS:=${GSS_OBJS:.o=.lo} -GSS_THROBJS:=${GSS_OBJS:.o=.thr.o} -GSS_THRLOBJS:=${GSS_OBJS:.o=.thr.lo} - -GSS_STATICLIB:=libglite_security_gss_${nothrflavour}.a -GSS_THRSTATICLIB:=libglite_security_gss_${thrflavour}.a -GSS_LTLIB:=libglite_security_gss_${nothrflavour}.la -GSS_THRLTLIB:=libglite_security_gss_${thrflavour}.la - -STATICLIB:=libglite_security_gsoap_plugin_${nothrflavour}.a -THRSTATICLIB:=libglite_security_gsoap_plugin_${thrflavour}.a -LTLIB:=libglite_security_gsoap_plugin_${nothrflavour}.la -THRLTLIB:=libglite_security_gsoap_plugin_${thrflavour}.la - -${GSS_STATICLIB}: ${GSS_OBJS} - ar crv $@ ${GSS_OBJS} - ranlib $@ - -${GSS_THRSTATICLIB}: ${GSS_THROBJS} - ar crv $@ ${GSS_THROBJS} - ranlib $@ - -${GSS_LTLIB}: ${GSS_OBJS} - ${LINK} ${version_info} -o $@ ${GSS_LOBJS} ${EX_LIBS} - -${GSS_THRLTLIB}: ${GSS_THROBJS} - ${LINK} ${version_info} -o $@ ${GSS_THRLOBJS} ${EX_THRLIBS} - - -OBJS:=${GSS_OBJS} glite_gsplugin.o -LOBJS:=${OBJS:.o=.lo} -THROBJS:=${OBJS:.o=.thr.o} -THRLOBJS:=${OBJS:.o=.thr.lo} - -dotless_ver:=${shell echo ${gsoap_version} | tr -d '.'} -STATICLIB_S:=libglite_security_gsoap_plugin_${dotless_ver}_${nothrflavour}.a -THRSTATICLIB_S:=libglite_security_gsoap_plugin_${dotless_ver}_${thrflavour}.a -LTLIB_S:=libglite_security_gsoap_plugin_${dotless_ver}_${nothrflavour}.la -THRLTLIB_S:=libglite_security_gsoap_plugin_${dotless_ver}_${thrflavour}.la - -OBJS_S:=${GSS_OBJS} glite_gsplugin.o stdsoap2.o -LOBJS_S:=${OBJS_S:.o=.lo} -THROBJS_S:=${OBJS_S:.o=.thr.o} -THRLOBJS_S:=${OBJS_S:.o=.thr.lo} - -${STATICLIB}: ${OBJS} - ar crv $@ ${OBJS} - ranlib $@ - -${THRSTATICLIB}: ${THROBJS} - ar crv $@ ${THROBJS} - ranlib $@ - -${LTLIB}: ${OBJS} - ${LINK} ${version_info} -o $@ ${LOBJS} ${EX_LIBS} - -${THRLTLIB}: ${THROBJS} - ${LINK} ${version_info} -o $@ ${THRLOBJS} ${EX_THRLIBS} - -${STATICLIB_S}: ${OBJS_S} - ar crv $@ ${OBJS_S} - ranlib $@ - -${THRSTATICLIB_S}: ${THROBJS_S} - ar crv $@ ${THROBJS_S} - ranlib $@ - -${LTLIB_S}: ${OBJS_S} - ${LINK} ${version_info} -o $@ ${LOBJS_S} ${EX_LIBS} - -${THRLTLIB_S}: ${THROBJS_S} - ${LINK} ${version_info} -o $@ ${THRLOBJS_S} ${EX_THRLIBS} - -all compile: \ - ${GSS_STATICLIB} ${GSS_LTLIB} ${GSS_THRSTATICLIB} ${GSS_THRLTLIB} \ - ${STATICLIB} ${LTLIB} ${THRSTATICLIB} ${THRLTLIB} \ - all-libs-with-soap examples - -check: compile check.gss - -check.gss: test_gss - # ./test_gss - echo test_gss not run automatically util we have got some credentials - -test_gss: test_gss.o - ${LINKXX} -o $@ test_gss.o ${GSS_LTLIB} ${TEST_LIBS} ${GLOBUS_LIBS} ${EX_LIBS} - -test_coverage: - -mkdir coverage - cd coverage && $(MAKE) -f ../Makefile top_srcdir=../../ COVERAGE_FLAGS="-fprofile-arcs -ftest-coverage" check - cd coverage && for i in ${OBJS}; do gcov -o .libs/ $$i ; done - - -examples: wscalc_clt_ex wscalc_srv_ex wscalc_srv_ex2 - -all-libs-with-soap: - for v in ${gsoap_versions}; do \ - dir=`echo $$v | tr -d .`; \ - mkdir $$dir; \ - ( cd $$dir && ${MAKE} -f ../Makefile gsoap_version=$$v top_srcdir=../.. libs-with-soap) ; \ - done - -libs-with-soap: ${LTLIB_S} ${THRLTLIB_S} ${STATICLIB_S} ${THRSTATICLIB_S} - -gsoap_srcname=gsoap-`echo ${gsoap_version} | cut -d. -f1,2` - -link-gsoap: - if [ -f ${top_srcdir}/src/stdsoap2_${gsoap_version}.c ]; then \ - ln -sf ${top_srcdir}/src/stdsoap2_${gsoap_version}.c stdsoap2.c; \ - ln -sf ${top_srcdir}/src/stdsoap2_${gsoap_version}.h stdsoap2.h; \ - elif [ -f ${ext_repository}/${gsoap_name}/${gsoap_version}/src/stdsoap2.c ]; then \ - ln -sf ${ext_repository}/${gsoap_name}/${gsoap_version}/src/stdsoap2.[ch] .; \ - elif [ -f ${ext_repository}/${gsoap_name}/${gsoap_version}/${gsoap_platform}/stdsoap2.c ]; then \ - ln -sf ${ext_repository}/${gsoap_name}/${gsoap_version}/${gsoap_platform}/stdsoap2.[ch] .; \ - elif [ -f ${ext_repository}/${gsoap_name}/${gsoap_version}/src/stdsoap2.c ]; then \ - ln -sf ${ext_repository}/${gsoap_name}/${gsoap_version}/src/stdsoap2.[ch] .; \ - elif [ -f ${ext_repository}/${gsoap_name}/${gsoap_version}/src/${gsoap_srcname}/soapcpp2/stdsoap2.c ]; then \ - ln -sf ${ext_repository}/${gsoap_name}/${gsoap_version}/src/${gsoap_srcname}/soapcpp2/stdsoap2.[ch] .; \ - else false ; \ - fi - -stdsoap2.c stdsoap2.h: link-gsoap - -GSOAP_FPREFIX:= GSOAP_ - -WSCALC_CLT_OBJS = wscalc_clt_ex.o ${GSOAP_FPREFIX}C.o ${GSOAP_FPREFIX}Client.o -WSCALC_SRV_OBJS = wscalc_srv_ex.o ${GSOAP_FPREFIX}C.o ${GSOAP_FPREFIX}Server.o -WSCALC_SRV2_OBJS = wscalc_srv_ex2.o ${GSOAP_FPREFIX}C.o ${GSOAP_FPREFIX}Server.o - -wscalc_clt_ex.o wscalc_srv_ex.o wscalc_srv_ex2.o: ${GSOAP_FPREFIX}H.h - -wscalc_clt_ex: ${WSCALC_CLT_OBJS} ${LTLIB_S} - ${LINK} -o $@ ${WSCALC_CLT_OBJS} ${LTLIB_S} - -wscalc_srv_ex: ${WSCALC_SRV_OBJS} ${LTLIB_S} - ${LINK} -o $@ ${WSCALC_SRV_OBJS} ${LTLIB_S} - -wscalc_srv_ex2: ${WSCALC_SRV2_OBJS} ${LTLIB_S} - ${LINK} -o $@ ${WSCALC_SRV2_OBJS} ${LTLIB_S} - - -soapcpp:=${shell if [ -x ${gsoap_prefix}/bin/soapcpp2 ]; then \ - echo ${gsoap_prefix}/bin/soapcpp2; \ - else echo ${gsoap_prefix}/soapcpp2; \ - fi} - -${GSOAP_FPREFIX}H.h ${GSOAP_FPREFIX}C.c ${GSOAP_FPREFIX}Server.c ${GSOAP_FPREFIX}Client.c ${GSOAP_FPREFIX}ServerLib.c ${GSOAP_FPREFIX}ClientLib.c: calc.h.S - ${soapcpp} -c -p ${GSOAP_FPREFIX} ${top_srcdir}/examples/calc.h.S - -wscalc_clt_ex.o: wscalc_clt_ex.c - ${CC} -c ${CFLAGS} ${GLOBUS_INC} -o $@ $< - -doc: - -stage: - $(MAKE) install PREFIX=${stagedir} DOSTAGE=yes - -dist: distsrc distbin - -distsrc: - mkdir -p ${top_srcdir}/${package}-${version} - cd ${top_srcdir} && GLOBIGNORE="${package}-${version}" && cp -Rf * ${package}-${version} - cd ${top_srcdir} && tar -czf ${distdir}/${package}-${version}_src.tar.gz --exclude-from=project/tar_exclude ${package}-${version} - rm -rf ${top_srcdir}/${package}-${version} - -distbin: - $(MAKE) install PREFIX=`pwd`/tmpbuilddir${stagedir} - save_dir=`pwd`; cd tmpbuilddir${stagedir} && tar -czf $$save_dir/${top_srcdir}/${distdir}/${package}-${version}_bin.tar.gz *; cd $$save_dir - rm -rf tmpbuilddir - -install: - -mkdir -p ${PREFIX}/lib - -mkdir -p ${PREFIX}/share/doc/${package}-${version} - -mkdir -p ${PREFIX}/include/glite/security/${package} - ${INSTALL} -m 755 ${GSS_LTLIB} ${GSS_THRLTLIB} ${PREFIX}/lib - ${INSTALL} -m 644 ${top_srcdir}/LICENSE ${PREFIX}/share/doc/${package}-${version} - cd ${top_srcdir}/interface && ${INSTALL} -m 644 ${HDRS} ${PREFIX}/include/glite/security/ - if [ x${DOSTAGE} = xyes ]; then \ - install -m 644 ${GSS_STATICLIB} ${GSS_THRSTATICLIB} ${PREFIX}/lib; \ - fi - for v in ${gsoap_versions}; do \ - (cd `echo $$v | tr -d .` && ${MAKE} -f ../Makefile install-soaplib gsoap_version=$$v PREFIX=${PREFIX} ); \ - done - -install-soaplib: - ${INSTALL} -m 755 ${LTLIB_S} ${THRLTLIB_S} ${PREFIX}/lib - -clean: - -%.o: %.c - ${COMPILE} ${GLOBUS_INC} -o $@ -c $< - -%.thr.o: %.c - ${COMPILE} ${GLOBUS_THR_INC} -o $@ -c $< - -test_gss.o: %.o: %.cpp - ${CXX} -c ${CFLAGS} ${GLOBUS_INC} ${TEST_INC} $< - -glite_gsplugin.o, glite_gsplugin.thr.o: soap_version.h - -soap_version.h: stdsoap2.h - head stdsoap2.h | \ - perl -ne '/^stdsoap2.h\s+([0-9])\.([0-9])\.(\S+)\s.*/ && printf "#define GSOAP_VERSION %d%02d%02d\n#define GSOAP_MIN_VERSION \"$$3\"\n#ident \"soap_version.h $$1.$$2.$$3\"\n",$$1,$$2,$$3' >$@ - -glite_gsplugin.o: soap_version.h - diff --git a/org.glite.security.gsoap-plugin/build.xml b/org.glite.security.gsoap-plugin/build.xml deleted file mode 100755 index 2bae60a..0000000 --- a/org.glite.security.gsoap-plugin/build.xml +++ /dev/null @@ -1,128 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/org.glite.security.gsoap-plugin/examples/calc.h.S b/org.glite.security.gsoap-plugin/examples/calc.h.S deleted file mode 100644 index da6ea9f..0000000 --- a/org.glite.security.gsoap-plugin/examples/calc.h.S +++ /dev/null @@ -1,13 +0,0 @@ -//gsoap wscalc service name: CalcService -//gsoap wscalc service type: Calc -//gsoap wscalc service port: https://localhost:19999/ -//gsoap wscalc service namespace: urn:calc:wscalc -//gsoap wscalc service documentation: Calculator service - -//gsoap wscalc service method-documentation: add Adds two numbers -int wscalc__add(double a, double b, struct wscalc__addResponse { -double result; } * ); - -//gsoap wscalc service method-documentation: sub Subtracts two numbers -int wscalc__sub(double a, double b, struct wscalc__subResponse { -double result; } * ); diff --git a/org.glite.security.gsoap-plugin/examples/wscalc_clt_ex.c b/org.glite.security.gsoap-plugin/examples/wscalc_clt_ex.c deleted file mode 100644 index 83a4cfb..0000000 --- a/org.glite.security.gsoap-plugin/examples/wscalc_clt_ex.c +++ /dev/null @@ -1,48 +0,0 @@ -#include - -#include "GSOAP_H.h" -#include "CalcService.nsmap" - -static const char *server = "http://localhost:19999/"; - -int -main(int argc, char **argv) -{ - struct soap soap; - double a, b, result; - int ret; - - - if (argc < 4) { - fprintf(stderr, "Usage: [add|sub] num num\n"); - exit(1); - } - - soap_init(&soap); - soap_set_namespaces(&soap, namespaces); - soap_register_plugin(&soap, glite_gsplugin); - - a = strtod(argv[2], NULL); - b = strtod(argv[3], NULL); - switch ( *argv[1] ) { - case 'a': - ret = soap_call_wscalc__add(&soap, server, "", a, b, &result); - break; - case 's': - ret = soap_call_wscalc__sub(&soap, server, "", a, b, &result); - break; - default: - fprintf(stderr, "Unknown command\n"); - exit(2); - } - - if ( ret ) { - fprintf(stderr, "NECO JE V ****\n\n"); - fprintf(stderr, "plugin err: %s", glite_gsplugin_errdesc(&soap)); - soap_print_fault(&soap, stderr); - } - else printf("result = %g\n", result); - - - return 0; -} diff --git a/org.glite.security.gsoap-plugin/examples/wscalc_srv_ex.c b/org.glite.security.gsoap-plugin/examples/wscalc_srv_ex.c deleted file mode 100644 index 9e5da4d..0000000 --- a/org.glite.security.gsoap-plugin/examples/wscalc_srv_ex.c +++ /dev/null @@ -1,105 +0,0 @@ -#include -#include -#include -#include - -#include "GSOAP_H.h" -#include "CalcService.nsmap" - - -static struct option long_options[] = { - { "cert", required_argument, NULL, 'c' }, - { "key", required_argument, NULL, 'k' }, - { NULL, 0, NULL, 0 } -}; - -void -usage(const char *me) -{ - fprintf(stderr, - "usage: %s [option]\n" - "\t-c, --cred\t certificate file\n" - "\t-k, --key\t private key file\n", me); -} - - -int -main(int argc, char **argv) -{ - struct soap soap; - glite_gsplugin_Context ctx = NULL; - char *name; - char *cert, *key; - int opt; - - - cert = key = NULL; - name = strrchr(argv[0],'/'); - if ( name ) name++; else name = argv[0]; - - while ((opt = getopt_long(argc, argv, "c:k:", long_options, NULL)) != EOF) { - switch (opt) { - case 'c': cert = optarg; break; - case 'k': key = optarg; break; - case '?': - default : usage(name); exit(1); - } - } - - if ( cert || key ) { - if ( glite_gsplugin_init_context(&ctx) ) { perror("init context"); exit(1); } - if (glite_gsplugin_set_credential(ctx, cert, key)) { - fprintf (stderr, "Failed to set credentials\n"); - exit(1); - } - } - - soap_init(&soap); - soap_set_namespaces(&soap, namespaces); - - if ( soap_register_plugin_arg(&soap, glite_gsplugin, ctx? : NULL) ) { - fprintf(stderr, "Can't register plugin\n"); - exit(1); - } - - if ( soap_bind(&soap, NULL, 19999, 100) < 0 ) { - soap_print_fault(&soap, stderr); - exit(1); - } - - while ( 1 ) { - printf("accepting connection\n"); - if ( soap_accept(&soap) < 0 ) { - fprintf(stderr, "soap_accept() failed!!!\n"); - soap_print_fault(&soap, stderr); - fprintf(stderr, "plugin err: %s\n", glite_gsplugin_errdesc(&soap)); - continue; - } - - printf("serving connection\n"); - if ( soap_serve(&soap) ) { - soap_print_fault(&soap, stderr); - fprintf(stderr, "plugin err: %s", glite_gsplugin_errdesc(&soap)); - } - - soap_destroy(&soap); /* clean up class instances */ - soap_end(&soap); /* clean up everything and close socket */ - } - soap_done(&soap); /* close master socket */ - - if ( ctx ) glite_gsplugin_free_context(ctx); - - return 0; -} - -int wscalc__add(struct soap *soap, double a, double b, struct wscalc__addResponse *result) -{ - result->result = a + b; - return SOAP_OK; -} - -int wscalc__sub(struct soap *soap, double a, double b, struct wscalc__subResponse *result) -{ - result->result = a - b; - return SOAP_OK; -} diff --git a/org.glite.security.gsoap-plugin/examples/wscalc_srv_ex2.c b/org.glite.security.gsoap-plugin/examples/wscalc_srv_ex2.c deleted file mode 100644 index 844f46a..0000000 --- a/org.glite.security.gsoap-plugin/examples/wscalc_srv_ex2.c +++ /dev/null @@ -1,131 +0,0 @@ -#include -#include -#include -#include - -#include "GSOAP_H.h" -#include "CalcService.nsmap" - - -static struct option long_options[] = { - { "cert", required_argument, NULL, 'c' }, - { "key", required_argument, NULL, 'k' }, - { "port", required_argument, NULL, 'p' }, - { NULL, 0, NULL, 0 } -}; - -void -usage(const char *me) -{ - fprintf(stderr, - "usage: %s [option]\n" - "\t-p, --port\t listening port\n" - "\t-c, --cred\t certificate file\n" - "\t-k, --key\t private key file\n", me); -} - - -int -main(int argc, char **argv) -{ - struct soap soap; - edg_wll_GssStatus gss_code; - glite_gsplugin_Context ctx; - struct sockaddr_in a; - int alen; - char *name, *msg; - char *subject = NULL; - int opt, - port = 19999; - int sock; - - - name = strrchr(argv[0],'/'); - if ( name ) name++; else name = argv[0]; - - if ( glite_gsplugin_init_context(&ctx) ) { perror("init context"); exit(1); } - - while ((opt = getopt_long(argc, argv, "c:k:p:", long_options, NULL)) != EOF) { - switch (opt) { - case 'p': port = atoi(optarg); break; - case 'c': ctx->cert_filename = strdup(optarg); break; - case 'k': ctx->key_filename = strdup(optarg); break; - case '?': - default : usage(name); exit(1); - } - } - - if ( edg_wll_gss_acquire_cred_gsi(ctx->cert_filename, ctx->key_filename, &ctx->cred, &subject, &gss_code) ) { - edg_wll_gss_get_error(&gss_code, "Failed to read credential", &msg); - fprintf(stderr, "%s\n", msg); - free(msg); - exit(1); - } - if (subject) { - printf("server running with certificate: %s\n", subject); - free(subject); - } - - soap_init(&soap); - soap_set_namespaces(&soap, namespaces); - - if ( soap_register_plugin_arg(&soap, glite_gsplugin, ctx) ) { - fprintf(stderr, "Can't register plugin\n"); - exit(1); - } - - alen = sizeof(a); - if ( (sock = socket(PF_INET,SOCK_STREAM,0)) < 0 ) { perror("socket()"); exit(1); } - a.sin_family = AF_INET; - a.sin_port = htons(port); - a.sin_addr.s_addr = INADDR_ANY; - if ( bind(sock, (struct sockaddr *)&a, sizeof(a)) ) { perror("bind()"); exit(1); } - if ( listen(sock, 100) ) { perror("listen()"); exit(1); } - if ( !(ctx->connection = malloc(sizeof(*ctx->connection))) ) exit(1); - - bzero((char *) &a, alen); - - while ( 1 ) { - int conn; - - printf("accepting connection\n"); - if ( (conn = accept(sock, (struct sockaddr *) &a, &alen)) < 0 ) { - close(sock); - perror("accept"); - exit(1); - } - if ( edg_wll_gss_accept(ctx->cred,conn,ctx->timeout,ctx->connection,&gss_code) ){ - edg_wll_gss_get_error(&gss_code, "Failed to read credential", &msg); - fprintf(stderr, "%s\n", msg); - free(msg); - exit(1); - } - - printf("serving connection\n"); - if ( soap_serve(&soap) ) { - soap_print_fault(&soap, stderr); - fprintf(stderr, "plugin err: %s", glite_gsplugin_errdesc(&soap)); - } - - soap_destroy(&soap); /* clean up class instances */ - soap_end(&soap); /* clean up everything and close socket */ - } - - soap_done(&soap); /* close master socket */ - - glite_gsplugin_free_context(ctx); - - return 0; -} - -int wscalc__add(struct soap *soap, double a, double b, struct wscalc__addResponse *result) -{ - result->result = a + b; - return SOAP_OK; -} - -int wscalc__sub(struct soap *soap, double a, double b, struct wscalc__subResponse *result) -{ - result->result = a - b; - return SOAP_OK; -} diff --git a/org.glite.security.gsoap-plugin/interface/glite_gscompat.h b/org.glite.security.gsoap-plugin/interface/glite_gscompat.h deleted file mode 100644 index 38b7d96..0000000 --- a/org.glite.security.gsoap-plugin/interface/glite_gscompat.h +++ /dev/null @@ -1,78 +0,0 @@ -#ifndef GLIE_SECURITY_GSCOMPAT_H -#define GLIE_SECURITY_GSCOMPAT_H - -#ident "$Header: " - -#ifndef GSOAP_VERSION - #error GSOAP_VERSION required -#endif - -#if GSOAP_VERSION >= 20709 - #define GLITE_SECURITY_GSOAP_CHOICE_GET(CHOICE, ITEM, TYPENAME, TYPENO) ((CHOICE)->union_##TYPENAME.ITEM) - #define GLITE_SECURITY_GSOAP_CHOICE_SETTYPE(CHOICE, ITEM, NS, TYPENAME, TYPENO) ((CHOICE)->__union_##TYPENAME) = SOAP_UNION__##NS##__union_##TYPENAME##_##ITEM - #define GLITE_SECURITY_GSOAP_CHOICE_ISTYPE(CHOICE, ITEM, NS, TYPENAME, TYPENO) (((CHOICE)->__union_##TYPENAME) == SOAP_UNION__##NS##__union_##TYPENAME##_##ITEM) -#elif GSOAP_VERSION >= 20706 - #define GLITE_SECURITY_GSOAP_CHOICE_GET(CHOICE, ITEM, TYPENAME, TYPENO) ((CHOICE)->union_##TYPENO.ITEM) - #define GLITE_SECURITY_GSOAP_CHOICE_SETTYPE(CHOICE, ITEM, NS, TYPENAME, TYPENO) ((CHOICE)->__union_##TYPENO) = SOAP_UNION_##NS##__union_##TYPENO##_##ITEM - #define GLITE_SECURITY_GSOAP_CHOICE_ISTYPE(CHOICE, ITEM, NS, TYPENAME, TYPENO) (((CHOICE)->__union_##TYPENO) == SOAP_UNION_##NS##__union_##TYPENO##_##ITEM) -#else - #define GLITE_SECURITY_GSOAP_CHOICE_GET(CHOICE, ITEM, TYPENAME, TYPENO) ((CHOICE)->ITEM) - #define GLITE_SECURITY_GSOAP_CHOICE_SETTYPE(CHOICE, ITEM, NS, TYPENAME, TYPENO) - #define GLITE_SECURITY_GSOAP_CHOICE_ISTYPE(CHOICE, ITEM, NS, TYPENAME, TYPENO) (((CHOICE)->ITEM) != NULL) -#endif -#define GLITE_SECURITY_GSOAP_CHOICE_SET(CHOICE, ITEM, NS, TYPENAME, TYPENO, VALUE) do { \ - memset((CHOICE), 0, sizeof(*(CHOICE))); \ - GLITE_SECURITY_GSOAP_CHOICE_SETTYPE(CHOICE, ITEM, NS, TYPENAME, TYPENO); \ - GLITE_SECURITY_GSOAP_CHOICE_GET(CHOICE, ITEM, TYPENAME, TYPENO) = (VALUE); \ -} while(0) - -#if GSOAP_VERSION >= 20706 - #define GLITE_SECURITY_GSOAP_REASON2(SOAP) ((SOAP)->fault->SOAP_ENV__Reason ? (SOAP)->fault->SOAP_ENV__Reason->SOAP_ENV__Text : "(no reason)") - #define GLITE_SECURITY_GSOAP_TRUE xsd__boolean__true_ - #define GLITE_SECURITY_GSOAP_FALSE xsd__boolean__false_ -#else - #define GLITE_SECURITY_GSOAP_REASON2(SOAP) ((SOAP)->fault->SOAP_ENV__Reason) - #define GLITE_SECURITY_GSOAP_TRUE true_ - #define GLITE_SECURITY_GSOAP_FALSE false_ -#endif - -#define GLITE_SECURITY_GSOAP_DETAIL(SOAP) ((SOAP)->version == 2 ? (SOAP)->fault->SOAP_ENV__Detail : (SOAP)->fault->detail) -#define GLITE_SECURITY_GSOAP_REASON(SOAP) ((SOAP)->version == 2 ? GLITE_SECURITY_GSOAP_REASON2((SOAP)) : (SOAP)->fault->faultstring) - -#if GSOAP_VERSION >= 20709 - #define GLITE_SECURITY_GSOAP_LIST_CREATE0(SOAP, LIST, SIZE, TYPE, N) do { \ - if ((N) != 0) (LIST) = soap_malloc((SOAP), (N) * sizeof(TYPE)); \ - else (LIST) = NULL; \ - (SIZE) = (N); \ -} while (0) - #define GLITE_SECURITY_GSOAP_LIST_DESTROY0(SOAP, LIST, SIZE) do { \ - if ((LIST) && (SIZE) != 0) soap_dealloc((SOAP), (LIST)); \ - (LIST) = NULL; \ -} while (0) - #define GLITE_SECURITY_GSOAP_LIST_GET(LIST, INDEX) (&(LIST)[INDEX]) - #define GLITE_SECURITY_GSOAP_LIST_TYPE(NS, LIST) struct NS##__##LIST * -#else - #define GLITE_SECURITY_GSOAP_LIST_CREATE0(SOAP, LIST, SIZE, TYPE, N) do { \ - int ilist; \ - \ - if ((N) != 0) (LIST) = soap_malloc((SOAP), (N) * sizeof(void *)); \ - else (LIST) = NULL; \ - (SIZE) = (N); \ - for (ilist = 0; ilist < (N); ilist++) { \ - (LIST)[ilist] = soap_malloc((SOAP), sizeof(TYPE)); \ - } \ -} while (0) - #define GLITE_SECURITY_GSOAP_LIST_DESTROY0(SOAP, LIST, SIZE) do { \ - int ilist; \ - \ - for (ilist = 0; ilist < (SIZE); ilist++) soap_dealloc((SOAP), (LIST)[ilist]); \ - if ((LIST) && (SIZE) != 0) soap_dealloc((SOAP), (LIST)); \ - (LIST) = NULL; \ -} while (0) - #define GLITE_SECURITY_GSOAP_LIST_GET(LIST, INDEX) ((LIST)[INDEX]) - #define GLITE_SECURITY_GSOAP_LIST_TYPE(NS, LIST) struct NS##__##LIST ** -#endif -#define GLITE_SECURITY_GSOAP_LIST_CREATE(SOAP, CONTAINER, LIST, TYPE, N) GLITE_SECURITY_GSOAP_LIST_CREATE0(SOAP, (CONTAINER)->LIST, (CONTAINER)->__size##LIST, TYPE, N) -#define GLITE_SECURITY_GSOAP_LIST_DESTROY(SOAP, CONTAINER, LIST) GLITE_SECURITY_GSOAP_LIST_DESTROY0(SOAP, (CONTAINER)->LIST, (CONTAINER)->__size##LIST) - -#endif diff --git a/org.glite.security.gsoap-plugin/interface/glite_gsplugin.h b/org.glite.security.gsoap-plugin/interface/glite_gsplugin.h deleted file mode 100644 index 4ebd8ef..0000000 --- a/org.glite.security.gsoap-plugin/interface/glite_gsplugin.h +++ /dev/null @@ -1,46 +0,0 @@ -#ifndef __GLITE_GSOAP_PLUGIN_H__ -#define __GLITE_GSOAP_PLUGIN_H__ - -#include - -#include "glite_gss.h" - -#ifdef __cplusplus -extern "C" { -#endif - -#define PLUGIN_ID "GLITE_GSOAP_PLUGIN" - -struct _glite_gsplugin_ctx { - struct timeval _timeout, *timeout; - - char *error_msg; - - char *key_filename; - char *cert_filename; - - edg_wll_GssConnection *connection; - gss_cred_id_t cred; - - void *user_data; -}; - -typedef struct _glite_gsplugin_ctx *glite_gsplugin_Context; - -extern int glite_gsplugin_init_context(glite_gsplugin_Context *); -extern int glite_gsplugin_free_context(glite_gsplugin_Context); -extern glite_gsplugin_Context glite_gsplugin_get_context(struct soap *); -extern void *glite_gsplugin_get_udata(struct soap *); -extern void glite_gsplugin_set_udata(struct soap *, void *); - -extern void glite_gsplugin_set_timeout(glite_gsplugin_Context, struct timeval const *); -extern int glite_gsplugin_set_credential(glite_gsplugin_Context, const char *, const char *); - -extern int glite_gsplugin(struct soap *, struct soap_plugin *, void *); -extern char *glite_gsplugin_errdesc(struct soap *); - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/org.glite.security.gsoap-plugin/interface/glite_gss.h b/org.glite.security.gsoap-plugin/interface/glite_gss.h deleted file mode 100644 index 3dd4903..0000000 --- a/org.glite.security.gsoap-plugin/interface/glite_gss.h +++ /dev/null @@ -1,117 +0,0 @@ -#ifndef __EDG_WORKLOAD_LOGGING_COMMON_LB_GSS_H__ -#define __EDG_WORKLOAD_LOGGING_COMMON_LB_GSS_H__ - -#ident "$Header$" - -#include - -#ifdef __cplusplus -extern "C" { -#endif - -enum { - EDG_WLL_GSS_OK = 0, /* no GSS errors */ - EDG_WLL_GSS_ERROR_GSS = -1, /* GSS specific error, call edg_wll_get_gss_error() for details */ - EDG_WLL_GSS_ERROR_TIMEOUT = -2, /* Timeout */ - EDG_WLL_GSS_ERROR_EOF = -3, /* EOF occured */ - EDG_WLL_GSS_ERROR_ERRNO = -4, /* System error. See errno */ - EDG_WLL_GSS_ERROR_HERRNO = -5 /* Resolver error. See h_errno */ -}; - -typedef struct _edg_wll_GssConnection { - gss_ctx_id_t context; - int sock; - char *buffer; - size_t bufsize; -} edg_wll_GssConnection; - -typedef struct _edg_wll_GssStatus { - OM_uint32 major_status; - OM_uint32 minor_status; -} edg_wll_GssStatus; - -/* XXX Support anonymous connections. Are we able/required to support - * anonymous servers as well. */ - -int -edg_wll_gss_acquire_cred_gsi(char *cert_file, - char *key_file, - gss_cred_id_t *cred, - char **name, - edg_wll_GssStatus* gss_code); - -int -edg_wll_gss_connect(gss_cred_id_t cred, - char const *hostname, - int port, - struct timeval *timeout, - edg_wll_GssConnection *connection, - edg_wll_GssStatus* gss_code); - -int -edg_wll_gss_accept(gss_cred_id_t cred, - int sock, - struct timeval *timeout, - edg_wll_GssConnection *connection, - edg_wll_GssStatus* gss_code); - -int -edg_wll_gss_read(edg_wll_GssConnection *connection, - void *buf, - size_t bufsize, - struct timeval *timeout, - edg_wll_GssStatus* gss_code); - -int -edg_wll_gss_write(edg_wll_GssConnection *connection, - const void *buf, - size_t bufsize, - struct timeval *timeout, - edg_wll_GssStatus* gss_code); - -int -edg_wll_gss_read_full(edg_wll_GssConnection *connection, - void *buf, - size_t bufsize, - struct timeval *timeout, - size_t *total, - edg_wll_GssStatus* gss_code); - -int -edg_wll_gss_write_full(edg_wll_GssConnection *connection, - const void *buf, - size_t bufsize, - struct timeval *timeout, - size_t *total, - edg_wll_GssStatus* gss_code); - -int -edg_wll_gss_watch_creds(const char * proxy_file, - time_t * proxy_mtime); - -int -edg_wll_gss_get_error(edg_wll_GssStatus* gss_code, - const char *prefix, - char **errmsg); - -int -edg_wll_gss_close(edg_wll_GssConnection *connection, - struct timeval *timeout); - -int -edg_wll_gss_reject(int sock); - -int -edg_wll_gss_oid_equal(const gss_OID a, - const gss_OID b); - -/* -int -edg_wll_gss_get_name(gss_cred_id_t cred, char **name); -*/ - -#ifdef __cplusplus -} -#endif - -#endif /* __EDG_WORKLOAD_LOGGING_COMMON_LB_GSS_H__ */ diff --git a/org.glite.security.gsoap-plugin/project/build.number b/org.glite.security.gsoap-plugin/project/build.number deleted file mode 100644 index d794048..0000000 --- a/org.glite.security.gsoap-plugin/project/build.number +++ /dev/null @@ -1 +0,0 @@ -module.build=0 diff --git a/org.glite.security.gsoap-plugin/project/build.properties b/org.glite.security.gsoap-plugin/project/build.properties deleted file mode 100644 index e69de29..0000000 diff --git a/org.glite.security.gsoap-plugin/project/configure.properties.xml b/org.glite.security.gsoap-plugin/project/configure.properties.xml deleted file mode 100644 index 3977f05..0000000 --- a/org.glite.security.gsoap-plugin/project/configure.properties.xml +++ /dev/null @@ -1,54 +0,0 @@ - - - - - - - - - - - -top_srcdir=.. -builddir=build -stagedir=${stage.abs.dir} -distdir=${dist.dir} -globalprefix=${global.prefix} -lbprefix=${subsystem.prefix} -package=${module.package.name} -PREFIX=${install.dir} -version=${module.version} -glite_location=${with.glite.location} -cares_prefix=${with.c-ares.prefix} -globus_prefix=${with.globus.prefix} -thrflavour=${with.globus.thr.flavor} -nothrflavour=${with.globus.nothr.flavor} -cppunit=${with.cppunit.prefix} -gsoap_prefix=${with.gsoap.prefix} -gsoap_default_version=${ext.gsoap.version} -gsoap_name=${ext.gsoap.name} -gsoap_platform=${ext.gsoap.platform} -repository=${repository} - - - diff --git a/org.glite.security.gsoap-plugin/project/properties.xml b/org.glite.security.gsoap-plugin/project/properties.xml deleted file mode 100755 index f63ddbd..0000000 --- a/org.glite.security.gsoap-plugin/project/properties.xml +++ /dev/null @@ -1,55 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/org.glite.security.gsoap-plugin/project/tar_exclude b/org.glite.security.gsoap-plugin/project/tar_exclude deleted file mode 100644 index b3133e4..0000000 --- a/org.glite.security.gsoap-plugin/project/tar_exclude +++ /dev/null @@ -1,10 +0,0 @@ -tar_exclude -CVS -build.xml -build -build.properties -properties.xml -configure-options.xml -.cvsignore -.project -.cdtproject diff --git a/org.glite.security.gsoap-plugin/project/version.properties b/org.glite.security.gsoap-plugin/project/version.properties deleted file mode 100644 index 4dae1ef..0000000 --- a/org.glite.security.gsoap-plugin/project/version.properties +++ /dev/null @@ -1,2 +0,0 @@ -module.version=1.4.2 -module.age=3 diff --git a/org.glite.security.gsoap-plugin/src/glite_gsplugin.c b/org.glite.security.gsoap-plugin/src/glite_gsplugin.c deleted file mode 100644 index 4504d5d..0000000 --- a/org.glite.security.gsoap-plugin/src/glite_gsplugin.c +++ /dev/null @@ -1,479 +0,0 @@ -#include -#include -#include -#include - -#include "soap_version.h" -#include "glite_gsplugin.h" - -#ifdef GSPLUGIN_DEBUG -# define pdprintf(s) printf s -#else -# define pdprintf(s) -#endif - -typedef struct _int_plugin_data_t { - glite_gsplugin_Context ctx; /**< data used for connection etc. */ - int def; /**< is the context created by plugin? */ -} int_plugin_data_t; - -static const char plugin_id[] = PLUGIN_ID; - -static void glite_gsplugin_delete(struct soap *, struct soap_plugin *); -static int glite_gsplugin_copy(struct soap *, struct soap_plugin *, struct soap_plugin *); - -static size_t glite_gsplugin_recv(struct soap *, char *, size_t); -static int glite_gsplugin_send(struct soap *, const char *, size_t); -static int glite_gsplugin_connect(struct soap *, const char *, const char *, int); -static int glite_gsplugin_close(struct soap *); -static int glite_gsplugin_accept(struct soap *, int, struct sockaddr *, int *); -static int glite_gsplugin_posthdr(struct soap *soap, const char *key, const char *val); - - -int -glite_gsplugin_init_context(glite_gsplugin_Context *ctx) -{ - glite_gsplugin_Context out = (glite_gsplugin_Context) malloc(sizeof(*out)); - if (!out) return ENOMEM; - - memset(out, 0, sizeof(*out)); - out->cred = GSS_C_NO_CREDENTIAL; - - /* XXX: some troubles with glite_gss and blocking calls! - out->timeout.tv_sec = 10000; - */ - - out->timeout = NULL; - *ctx = out; - - return 0; -} - -int -glite_gsplugin_free_context(glite_gsplugin_Context ctx) -{ - OM_uint32 ms; - - if (ctx == NULL) - return 0; - - if ( ctx->cred != GSS_C_NO_CREDENTIAL ) gss_release_cred(&ms, &ctx->cred); - if ( ctx->connection ) { - if ( ctx->connection->context != GSS_C_NO_CONTEXT ) - edg_wll_gss_close(ctx->connection, NULL); - free(ctx->connection); - } - if (ctx->error_msg) - free(ctx->error_msg); - if (ctx->key_filename) - free(ctx->key_filename); - if (ctx->cert_filename) - free(ctx->cert_filename); - free(ctx); - - return 0; -} - -glite_gsplugin_Context -glite_gsplugin_get_context(struct soap *soap) -{ - return ((int_plugin_data_t *)soap_lookup_plugin(soap, plugin_id))->ctx; -} - -void * -glite_gsplugin_get_udata(struct soap *soap) -{ - int_plugin_data_t *pdata; - - pdata = (int_plugin_data_t *)soap_lookup_plugin(soap, plugin_id); - assert(pdata); - return pdata->ctx->user_data; -} - -void -glite_gsplugin_set_udata(struct soap *soap, void *d) -{ - int_plugin_data_t *pdata; - - pdata = (int_plugin_data_t *)soap_lookup_plugin(soap, plugin_id); - assert(pdata); - pdata->ctx->user_data = d; -} - -void glite_gsplugin_set_timeout(glite_gsplugin_Context ctx, struct timeval const *to) -{ - if (to) { - ctx->_timeout = *to; - ctx->timeout = &ctx->_timeout; - } - else ctx->timeout = NULL; -} - -int -glite_gsplugin_set_credential(glite_gsplugin_Context ctx, - const char *cert, - const char *key) -{ - edg_wll_GssStatus gss_code; - int ret; - - ret = edg_wll_gss_acquire_cred_gsi(cert, key, &ctx->cred, NULL, &gss_code); - if (ret) { - /* XXX propagate error description */ - return EINVAL; - } - - ctx->cert_filename = strdup(cert); - ctx->key_filename = strdup(key); - - return 0; -} - -int -glite_gsplugin(struct soap *soap, struct soap_plugin *p, void *arg) -{ - int_plugin_data_t *pdata = malloc(sizeof(int_plugin_data_t)); - - pdprintf(("GSLITE_GSPLUGIN: initializing gSOAP plugin\n")); - if ( !pdata ) return ENOMEM; - if ( arg ) { - pdprintf(("GSLITE_GSPLUGIN: Context is given\n")); - pdata->ctx = arg; - pdata->def = 0; - } - else { - edg_wll_GssStatus gss_code; - char *subject = NULL; - - pdprintf(("GSLITE_GSPLUGIN: Creating default context\n")); - if ( glite_gsplugin_init_context((glite_gsplugin_Context*)&(pdata->ctx)) ) { - free(pdata); - return ENOMEM; - } - if ( edg_wll_gss_acquire_cred_gsi(NULL, NULL, &pdata->ctx->cred, &subject, &gss_code) ) { - /* XXX: Let user know, that cred. load failed. Somehow... - */ - glite_gsplugin_free_context(pdata->ctx); - return EINVAL; - } - pdprintf(("GSLITE_GSPLUGIN: server running with certificate: %s\n", subject)); - free(subject); - pdata->def = 1; - } - - p->id = plugin_id; - p->data = pdata; - p->fdelete = glite_gsplugin_delete; - p->fcopy = glite_gsplugin_copy; - - soap->fconnect = glite_gsplugin_connect; - soap->fclose = glite_gsplugin_close; -#if GSOAP_VERSION >= 20700 - soap->fclosesocket = NULL; -#endif - soap->faccept = glite_gsplugin_accept; - soap->fsend = glite_gsplugin_send; - soap->frecv = glite_gsplugin_recv; - soap->fposthdr = glite_gsplugin_posthdr; - - return SOAP_OK; -} - - -char *glite_gsplugin_errdesc(struct soap *soap) -{ - glite_gsplugin_Context ctx; - - ctx = ((int_plugin_data_t *)soap_lookup_plugin(soap, plugin_id))->ctx; - if ( ctx ) return ctx->error_msg; - - return NULL; -} - - - -static int -glite_gsplugin_copy(struct soap *soap, struct soap_plugin *dst, struct soap_plugin *src) -{ - pdprintf(("GSLITE_GSPLUGIN: glite_gsplugin_copy()\n")); - /* Should be the copy code here? - */ - return ENOSYS; -} - -static void -glite_gsplugin_delete(struct soap *soap, struct soap_plugin *p) -{ - int_plugin_data_t *d = (int_plugin_data_t *)soap_lookup_plugin(soap, plugin_id); - - pdprintf(("GSLITE_GSPLUGIN: glite_gsplugin_delete()\n")); - if ( d->def ) { - OM_uint32 ms; - - glite_gsplugin_close(soap); - glite_gsplugin_free_context(d->ctx); - } - free(d); -} - - -static int -glite_gsplugin_connect( - struct soap *soap, - const char *endpoint, - const char *host, - int port) -{ - glite_gsplugin_Context ctx; - edg_wll_GssStatus gss_stat; - int ret; - - - pdprintf(("GSLITE_GSPLUGIN: glite_gsplugin_connect()\n")); -#if defined(CHECK_GSOAP_VERSION) && GSOAP_VERSION <= 20700 - if ( GSOAP_VERSION < 20700 - || (GSOAP_VERSION == 20700 - && (strlen(GSOAP_MIN_VERSION) < 1 || GSOAP_MIN_VERSION[1] < 'e')) ) { - fprintf(stderr, "Client connect will work only with gSOAP v2.7.0e and later"); - soap->errnum = ENOSYS; - return ENOSYS; - } -#endif - - ctx = ((int_plugin_data_t *)soap_lookup_plugin(soap, plugin_id))->ctx; - - if ( ctx->cred == GSS_C_NO_CREDENTIAL ) { - pdprintf(("GSLITE_GSPLUGIN: loading credentials\n")); - ret = edg_wll_gss_acquire_cred_gsi(ctx->cert_filename, ctx->key_filename, - &ctx->cred, NULL, &gss_stat); - if ( ret ) { - edg_wll_gss_get_error(&gss_stat, "failed to load GSI credentials", - &ctx->error_msg); - goto err; - } - } - - if ( !(ctx->connection = malloc(sizeof(*ctx->connection))) ) return errno; - ret = edg_wll_gss_connect(ctx->cred, - host, port, - ctx->timeout, - ctx->connection, &gss_stat); - if ( ret ) { - free(ctx->connection); - ctx->connection = NULL; - edg_wll_gss_get_error(&gss_stat, "edg_wll_gss_connect()", &ctx->error_msg); - goto err; - } - - soap->errnum = 0; - return 0; - -err: - pdprintf(("GSLITE_GSPLUGIN: glite_gsplugin_connect() error!\n")); - switch ( ret ) { - case EDG_WLL_GSS_ERROR_GSS: ret = SOAP_CLI_FAULT; break; - case EDG_WLL_GSS_ERROR_HERRNO: - case EDG_WLL_GSS_ERROR_ERRNO: ret = errno; break; - case EDG_WLL_GSS_ERROR_EOF: ret = ECONNREFUSED; break; - case EDG_WLL_GSS_ERROR_TIMEOUT: ret = ETIMEDOUT; break; - default: break; - } - - soap->errnum = ret; - return ret; -} - -/** It is called in soap_closesocket() - * - * return like errno value - */ -static int -glite_gsplugin_close(struct soap *soap) -{ - glite_gsplugin_Context ctx; - int ret = SOAP_OK; - - - pdprintf(("GSLITE_GSPLUGIN: glite_gsplugin_close()\n")); - ctx = ((int_plugin_data_t *)soap_lookup_plugin(soap, plugin_id))->ctx; - if ( ctx->connection ) { - if ( ctx->connection->context != GSS_C_NO_CONTEXT) { - pdprintf(("GSLITE_GSPLUGIN: closing gss connection\n")); - ret = edg_wll_gss_close(ctx->connection, ctx->timeout); - } - ctx->connection->context = GSS_C_NO_CONTEXT; - } - - return ret; -} - - -static int -glite_gsplugin_accept(struct soap *soap, int s, struct sockaddr *a, int *n) -{ - glite_gsplugin_Context ctx; - edg_wll_GssStatus gss_code; - int conn; - - soap->errnum = 0; - pdprintf(("GSLITE_GSPLUGIN: glite_gsplugin_accept()\n")); - ctx = ((int_plugin_data_t *)soap_lookup_plugin(soap, plugin_id))->ctx; - if ( (conn = accept(s, (struct sockaddr *)&a, n)) < 0 ) return conn; - if ( !ctx->connection - && !(ctx->connection = malloc(sizeof(*ctx->connection))) ) return -1; - if ( edg_wll_gss_accept(ctx->cred, conn, ctx->timeout, ctx->connection, &gss_code)) { - pdprintf(("GSLITE_GSPLUGIN: Client authentication failed, closing.\n")); - edg_wll_gss_get_error(&gss_code, "Client authentication failed", &ctx->error_msg); - soap->errnum = SOAP_SVR_FAULT; - return -1; - } - - return conn; -} - -static size_t -glite_gsplugin_recv(struct soap *soap, char *buf, size_t bufsz) -{ - glite_gsplugin_Context ctx; - edg_wll_GssStatus gss_code; - int len; - - - ctx = ((int_plugin_data_t *)soap_lookup_plugin(soap, plugin_id))->ctx; - if ( ctx->error_msg ) { free(ctx->error_msg); ctx->error_msg = NULL; } - - if ( ctx->connection->context == GSS_C_NO_CONTEXT ) { - soap->errnum = ENOTCONN; - /* XXX: glite_gsplugin_send() returns SOAP_EOF on errors - */ - return 0; - } - - len = edg_wll_gss_read(ctx->connection, buf, bufsz, - ctx->timeout, - &gss_code); - - switch ( len ) { - case EDG_WLL_GSS_OK: - break; - - case EDG_WLL_GSS_ERROR_GSS: - edg_wll_gss_get_error(&gss_code, "receving WS request", - &ctx->error_msg); - soap->errnum = ENOTCONN; - return 0; - - case EDG_WLL_GSS_ERROR_ERRNO: - ctx->error_msg = strdup("edg_wll_gss_read()"); - soap->errnum = errno; - return 0; - - case EDG_WLL_GSS_ERROR_TIMEOUT: - soap->errnum = ETIMEDOUT; - return 0; - - case EDG_WLL_GSS_ERROR_EOF: - soap->errnum = ENOTCONN; - return 0; - - /* default: fallthrough */ - } - pdprintf(("GSLITE_GSPLUGIN: glite_gsplugin_recv() = %d\n",len)); - - return len; -} - -static int -glite_gsplugin_send(struct soap *soap, const char *buf, size_t bufsz) -{ - glite_gsplugin_Context ctx; - edg_wll_GssStatus gss_code; - struct sigaction sa, osa; - size_t total = 0; - int ret; - - - ctx = ((int_plugin_data_t *)soap_lookup_plugin(soap, plugin_id))->ctx; - /* XXX: check whether ctx is initialized - * i.e. ctx->connection != NULL - */ - if ( ctx->error_msg ) { free(ctx->error_msg); ctx->error_msg = NULL; } - if ( ctx->connection->context == GSS_C_NO_CONTEXT ) { - soap->errnum = ENOTCONN; - return SOAP_EOF; - } - - memset(&sa, 0, sizeof(sa)); - assert(sa.sa_handler == NULL); - sa.sa_handler = SIG_IGN; - sigaction(SIGPIPE, &sa, &osa); - - ret = edg_wll_gss_write_full(ctx->connection, - (void*)buf, bufsz, ctx->timeout, &total, &gss_code); - - sigaction(SIGPIPE, &osa, NULL); - - pdprintf(("GSLITE_GSPLUGIN: glite_gsplugin_send(%d) = %d\n",bufsz,ret)); - - switch ( ret ) { - case EDG_WLL_GSS_OK: - break; - - case EDG_WLL_GSS_ERROR_TIMEOUT: - ctx->error_msg = strdup("glite_gsplugin_send()"); - soap->errnum = ETIMEDOUT; - return SOAP_EOF; - - case EDG_WLL_GSS_ERROR_ERRNO: - if ( errno == EPIPE ) { - ctx->error_msg = strdup("glite_gsplugin_send()"); - soap->errnum = ENOTCONN; - } - else { - ctx->error_msg = strdup("glite_gsplugin_send()"); - soap->errnum = errno; - } - return SOAP_EOF; - - case EDG_WLL_GSS_ERROR_GSS: - case EDG_WLL_GSS_ERROR_EOF: - default: - ctx->error_msg = strdup("glite_gsplugin_send()"); - soap->errnum = ENOTCONN; - return SOAP_EOF; - } - - return SOAP_OK; -} - - -static int http_send_header(struct soap *soap, const char *s) { - const char *t; - - do { - t = strchr(s, '\n'); /* disallow \n in HTTP headers */ - if (!t) t = s + strlen(s); - if (soap_send_raw(soap, s, t - s)) return soap->error; - s = t + 1; - } while (*t); - - return SOAP_OK; -} - - -static int glite_gsplugin_posthdr(struct soap *soap, const char *key, const char *val) { - if (key) { - if (strcmp(key, "Status") == 0) { - snprintf(soap->tmpbuf, sizeof(soap->tmpbuf), "HTTP/%s", soap->http_version); - if (http_send_header(soap, soap->tmpbuf)) return soap->error; - if (val && (soap_send_raw(soap, " ", 1) || http_send_header(soap, val))) - return soap->error; - } else { - if (http_send_header(soap, key)) return soap->error; - if (val && (soap_send_raw(soap, ": ", 2) || http_send_header(soap, val))) - return soap->error; - } - } - - return soap_send_raw(soap, "\r\n", 2); -} diff --git a/org.glite.security.gsoap-plugin/src/glite_gss.c b/org.glite.security.gsoap-plugin/src/glite_gss.c deleted file mode 100644 index 8617f1e6..0000000 --- a/org.glite.security.gsoap-plugin/src/glite_gss.c +++ /dev/null @@ -1,1058 +0,0 @@ -#ident "$Header$" - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "glite_gss.h" - -#define tv_sub(a,b) {\ - (a).tv_usec -= (b).tv_usec;\ - (a).tv_sec -= (b).tv_sec;\ - if ((a).tv_usec < 0) {\ - (a).tv_sec--;\ - (a).tv_usec += 1000000;\ - }\ -} - -struct asyn_result { - struct hostent *ent; - int err; -}; - -static int decrement_timeout(struct timeval *timeout, struct timeval before, struct timeval after) -{ - (*timeout).tv_sec = (*timeout).tv_sec - (after.tv_sec - before.tv_sec); - (*timeout).tv_usec = (*timeout).tv_usec - (after.tv_usec - before.tv_usec); - while ( (*timeout).tv_usec < 0) { - (*timeout).tv_sec--; - (*timeout).tv_usec += 1000000; - } - if ( ((*timeout).tv_sec < 0) || (((*timeout).tv_sec == 0) && ((*timeout).tv_usec == 0)) ) return(1); - else return(0); -} - -/* ares callback handler for ares_gethostbyname() */ -static void callback_handler(void *arg, int status, struct hostent *h) { - struct asyn_result *arp = (struct asyn_result *) arg; - - switch (status) { - case ARES_SUCCESS: - if (h && h->h_addr_list[0]) { - arp->ent->h_addr_list = - (char **) malloc(2 * sizeof(char *)); - if (arp->ent->h_addr_list == NULL) { - arp->err = NETDB_INTERNAL; - break; - } - arp->ent->h_addr_list[0] = - malloc(sizeof(struct in_addr)); - if (arp->ent->h_addr_list[0] == NULL) { - free(arp->ent->h_addr_list); - arp->err = NETDB_INTERNAL; - break; - } - memcpy(arp->ent->h_addr_list[0], h->h_addr_list[0], - sizeof(struct in_addr)); - arp->ent->h_addr_list[1] = NULL; - arp->err = NETDB_SUCCESS; - } else { - arp->err = NO_DATA; - } - break; - case ARES_EBADNAME: - case ARES_ENOTFOUND: - arp->err = HOST_NOT_FOUND; - break; - case ARES_ENOTIMP: - arp->err = NO_RECOVERY; - break; - case ARES_ENOMEM: - case ARES_EDESTRUCTION: - default: - arp->err = NETDB_INTERNAL; - break; - } -} - -static void free_hostent(struct hostent *h){ - int i; - - if (h) { - if (h->h_name) free(h->h_name); - if (h->h_aliases) { - for (i=0; h->h_aliases[i]; i++) free(h->h_aliases[i]); - free(h->h_aliases); - } - if (h->h_addr_list) { - for (i=0; h->h_addr_list[i]; i++) free(h->h_addr_list[i]); - free(h->h_addr_list); - } - free(h); - } -} - -static int asyn_gethostbyname(char **addrOut, char const *name, struct timeval *timeout) { - struct asyn_result ar; - ares_channel channel; - int nfds; - fd_set readers, writers; - struct timeval tv, *tvp; - struct timeval start_time,check_time; - -/* start timer */ - gettimeofday(&start_time,0); - -/* ares init */ - if ( ares_init(&channel) != ARES_SUCCESS ) return(NETDB_INTERNAL); - ar.ent = (struct hostent *) calloc (sizeof(*ar.ent),1); - -/* query DNS server asynchronously */ - ares_gethostbyname(channel, name, AF_INET, callback_handler, - (void *) &ar); - -/* wait for result */ - while (1) { - FD_ZERO(&readers); - FD_ZERO(&writers); - nfds = ares_fds(channel, &readers, &writers); - if (nfds == 0) - break; - - gettimeofday(&check_time,0); - if (decrement_timeout(timeout, start_time, check_time)) { - ares_destroy(channel); - free_hostent(ar.ent); - return(TRY_AGAIN); - } - start_time = check_time; - - tvp = ares_timeout(channel, timeout, &tv); - - switch ( select(nfds, &readers, &writers, NULL, tvp) ) { - case -1: if (errno != EINTR) { - ares_destroy(channel); - free_hostent(ar.ent); - return NETDB_INTERNAL; - } else - continue; - case 0: - FD_ZERO(&readers); - FD_ZERO(&writers); - /* fallthrough */ - default: ares_process(channel, &readers, &writers); - } - } - - ares_destroy(channel); - - if (ar.err == NETDB_SUCCESS) { - *addrOut = malloc(sizeof(struct in_addr)); - memcpy(*addrOut,ar.ent->h_addr_list[0], sizeof(struct in_addr)); - free_hostent(ar.ent); - } - return(ar.err); -} - -static int -do_connect(int *s, char const *hostname, int port, struct timeval *timeout) -{ - int sock; - struct timeval before,after,to; - struct sockaddr_in a; - int sock_err; - socklen_t err_len; - char *addr; - int h_errno; - - sock = socket(AF_INET, SOCK_STREAM, 0); - if (sock < 0) return EDG_WLL_GSS_ERROR_ERRNO; - - if (timeout) { - int flags = fcntl(sock, F_GETFL, 0); - if (fcntl(sock, F_SETFL, flags | O_NONBLOCK) < 0) - return EDG_WLL_GSS_ERROR_ERRNO; - gettimeofday(&before,NULL); - } - - if (timeout) { - switch (h_errno = asyn_gethostbyname(&addr, hostname, timeout)) { - case NETDB_SUCCESS: - memset(&a,0,sizeof a); - a.sin_family = AF_INET; - memcpy(&a.sin_addr.s_addr,addr,sizeof a.sin_addr.s_addr); - a.sin_port = htons(port); - free(addr); - break; - case TRY_AGAIN: - close(sock); - return EDG_WLL_GSS_ERROR_TIMEOUT; - case NETDB_INTERNAL: - /* fall through */ - default: - close(sock); - /* h_errno may be thread safe with Linux pthread libs, - * but such an assumption is not portable - */ - errno = h_errno; - return EDG_WLL_GSS_ERROR_HERRNO; - } - } else { - struct hostent *hp; - - hp = gethostbyname(hostname); - if (hp == NULL) { - close(sock); - errno = h_errno; - return EDG_WLL_GSS_ERROR_HERRNO; - } - - memset(&a,0,sizeof a); - a.sin_family = AF_INET; - memcpy(&a.sin_addr.s_addr, hp->h_addr_list[0], sizeof(a.sin_addr.s_addr)); - a.sin_port = htons(port); - } - - if (connect(sock,(struct sockaddr *) &a,sizeof a) < 0) { - if (timeout && errno == EINPROGRESS) { - fd_set fds; - FD_ZERO(&fds); - FD_SET(sock,&fds); - memcpy(&to,timeout,sizeof to); - gettimeofday(&before,NULL); - switch (select(sock+1,NULL,&fds,NULL,&to)) { - case -1: close(sock); - return EDG_WLL_GSS_ERROR_ERRNO; - case 0: close(sock); - return EDG_WLL_GSS_ERROR_TIMEOUT; - } - gettimeofday(&after,NULL); - tv_sub(after,before); - tv_sub(*timeout,after); - - err_len = sizeof sock_err; - if (getsockopt(sock,SOL_SOCKET,SO_ERROR,&sock_err,&err_len)) { - close(sock); - return EDG_WLL_GSS_ERROR_ERRNO; - } - if (sock_err) { - close(sock); - errno = sock_err; - return EDG_WLL_GSS_ERROR_ERRNO; - } - } - else { - close(sock); - return EDG_WLL_GSS_ERROR_ERRNO; - } - } - - *s = sock; - return 0; -} - -static int -send_token(int sock, void *token, size_t token_length, struct timeval *to) -{ - size_t num_written = 0; - ssize_t count; - fd_set fds; - struct timeval timeout,before,after; - int ret; - - if (to) { - memcpy(&timeout,to,sizeof(timeout)); - gettimeofday(&before,NULL); - } - - - ret = 0; - while(num_written < token_length) { - FD_ZERO(&fds); - FD_SET(sock,&fds); - switch (select(sock+1, NULL, &fds, NULL, to ? &timeout : NULL)) { - case 0: ret = EDG_WLL_GSS_ERROR_TIMEOUT; - goto end; - break; - case -1: ret = EDG_WLL_GSS_ERROR_ERRNO; - goto end; - break; - } - - count = write(sock, ((char *)token) + num_written, - token_length - num_written); - if(count < 0) { - if(errno == EINTR) - continue; - else { - ret = EDG_WLL_GSS_ERROR_ERRNO; - goto end; - } - } - num_written += count; - } - -end: - if (to) { - gettimeofday(&after,NULL); - tv_sub(after,before); - tv_sub(*to,after); - if (to->tv_sec < 0) { - to->tv_sec = 0; - to->tv_usec = 0; - } - } - - return ret; -} - -#define SSL_TOKEN_HEADER_LENGTH 5 -static size_t ssl_token_length(char *t, int tl) { - unsigned char *b = t; - return (((size_t)(b[3]) << 8) | b[4]) + 5; -} - -static int -recv_token(int sock, void **token, size_t *token_length, struct timeval *to) -{ - ssize_t count; - char buf[4098]; - char *t = NULL; - char *tmp; - size_t tl = 0; - size_t expect = 0; - fd_set fds; - struct timeval timeout,before,after; - int ret; - - if (to) { - memcpy(&timeout,to,sizeof(timeout)); - gettimeofday(&before,NULL); - } - - ret = 0; - expect = SSL_TOKEN_HEADER_LENGTH; - do { - FD_ZERO(&fds); - FD_SET(sock,&fds); - switch (select(sock+1, &fds, NULL, NULL, to ? &timeout : NULL)) { - case 0: - ret = EDG_WLL_GSS_ERROR_TIMEOUT; - goto end; - break; - case -1: - ret = EDG_WLL_GSS_ERROR_ERRNO; - goto end; - break; - } - - count = read(sock, buf, MIN(expect - tl, sizeof(buf))); - if (count < 0) { - if (errno == EINTR) - continue; - else { - ret = EDG_WLL_GSS_ERROR_ERRNO; - goto end; - } - } - - if (count==0) { - if (tl==0) - return EDG_WLL_GSS_ERROR_EOF; - else goto end; - } - tmp=realloc(t, tl + count); - if (tmp == NULL) { - errno = ENOMEM; - return EDG_WLL_GSS_ERROR_ERRNO; - } - t = tmp; - memcpy(t + tl, buf, count); - tl += count; - - if ((expect == SSL_TOKEN_HEADER_LENGTH) && - (tl >= SSL_TOKEN_HEADER_LENGTH)) { - expect = ssl_token_length(t, tl); - } - - } while (count != 0 && tl < expect); - -end: - if (to) { - gettimeofday(&after,NULL); - tv_sub(after,before); - tv_sub(*to,after); - if (to->tv_sec < 0) { - to->tv_sec = 0; - to->tv_usec = 0; - } - } - - if (ret == 0) { - *token = t; - *token_length = tl; - } else - free(t); - - return ret; -} - -static int -create_proxy(char *cert_file, char *key_file, char **proxy_file) -{ - char buf[4096]; - int in, out; - char *name = NULL; - int ret, len; - - *proxy_file = NULL; - - asprintf(&name, "%s/%d.lb.XXXXXX", P_tmpdir, getpid()); - - out = mkstemp(name); - if (out < 0) - return EDG_WLL_GSS_ERROR_ERRNO; - - in = open(cert_file, O_RDONLY); - if (in < 0) { - ret = EDG_WLL_GSS_ERROR_ERRNO; - goto end; - } - while ((ret = read(in, buf, sizeof(buf))) > 0) { - len = write(out, buf, ret); - if (len != ret) { - ret = -1; - break; - } - } - close(in); - if (ret < 0) { - ret = EDG_WLL_GSS_ERROR_ERRNO; - goto end; - } - - len = write(out, "\n", 1); - if (len != 1) { - ret = EDG_WLL_GSS_ERROR_ERRNO; - goto end; - } - - in = open(key_file, O_RDONLY); - if (in < 0) { - ret = EDG_WLL_GSS_ERROR_ERRNO; - goto end; - } - while ((ret = read(in, buf, sizeof(buf))) > 0) { - len = write(out, buf, ret); - if (len != ret) { - ret = -1; - break; - } - } - close(in); - if (ret < 0) { - ret = EDG_WLL_GSS_ERROR_ERRNO; - goto end; - } - - ret = 0; - *proxy_file = name; - -end: - close(out); - if (ret) { - unlink(name); - free(name); - } - - return ret; -} - -static int -destroy_proxy(char *proxy_file) -{ - /* XXX we should erase the contents safely (i.e. overwrite with 0's) */ - unlink(proxy_file); - return 0; -} - -int -edg_wll_gss_acquire_cred_gsi(char *cert_file, char *key_file, gss_cred_id_t *cred, - char **name, edg_wll_GssStatus* gss_code) -{ - OM_uint32 major_status = 0, minor_status, minor_status2; - gss_cred_id_t gss_cred = GSS_C_NO_CREDENTIAL; - gss_buffer_desc buffer = GSS_C_EMPTY_BUFFER; - gss_name_t gss_name = GSS_C_NO_NAME; - OM_uint32 lifetime; - char *proxy_file = NULL; - int ret; - - if ((cert_file == NULL && key_file != NULL) || - (cert_file != NULL && key_file == NULL)) - return EINVAL; - - if (cert_file == NULL) { - major_status = gss_acquire_cred(&minor_status, GSS_C_NO_NAME, 0, - GSS_C_NO_OID_SET, GSS_C_BOTH, - &gss_cred, NULL, NULL); - if (GSS_ERROR(major_status)) { - ret = EDG_WLL_GSS_ERROR_GSS; - goto end; - } - } else { - proxy_file = cert_file; - if (strcmp(cert_file, key_file) != 0 && - (ret = create_proxy(cert_file, key_file, &proxy_file))) { - proxy_file = NULL; - goto end; - } - - asprintf((char**)&buffer.value, "X509_USER_PROXY=%s", proxy_file); - if (buffer.value == NULL) { - errno = ENOMEM; - ret = EDG_WLL_GSS_ERROR_ERRNO; - goto end; - } - buffer.length = strlen(proxy_file); - - major_status = gss_import_cred(&minor_status, &gss_cred, GSS_C_NO_OID, 1, - &buffer, 0, NULL); - free(buffer.value); - if (GSS_ERROR(major_status)) { - ret = EDG_WLL_GSS_ERROR_GSS; - goto end; - } - } - - /* gss_import_cred() doesn't check validity of credential loaded, so let's - * verify it now */ - major_status = gss_inquire_cred(&minor_status, gss_cred, &gss_name, - &lifetime, NULL, NULL); - if (GSS_ERROR(major_status)) { - ret = EDG_WLL_GSS_ERROR_GSS; - goto end; - } - - /* Must cast to time_t since OM_uint32 is unsinged and hence we couldn't - * detect negative values. */ - if ((time_t) lifetime <= 0) { - major_status = GSS_S_CREDENTIALS_EXPIRED; - minor_status = 0; /* XXX */ - ret = EDG_WLL_GSS_ERROR_GSS; - goto end; - } - - if (name) { - major_status = gss_display_name(&minor_status, gss_name, &buffer, NULL); - if (GSS_ERROR(major_status)) { - ret = EDG_WLL_GSS_ERROR_GSS; - goto end; - } - *name = buffer.value; - memset(&buffer, 0, sizeof(buffer)); - } - - *cred = gss_cred; - gss_cred = GSS_C_NO_CREDENTIAL; - ret = 0; - -end: - if (cert_file && key_file && proxy_file && strcmp(cert_file, key_file) != 0) { - destroy_proxy(proxy_file); - free(proxy_file); - } - - if (gss_name != GSS_C_NO_NAME) - gss_release_name(&minor_status2, &gss_name); - - if (gss_cred != GSS_C_NO_CREDENTIAL) - gss_release_cred(&minor_status2, &gss_cred); - - if (GSS_ERROR(major_status)) { - if (gss_code) { - gss_code->major_status = major_status; - gss_code->minor_status = minor_status; - } - ret = EDG_WLL_GSS_ERROR_GSS; - } - - return ret; -} - -/* XXX XXX This is black magic. "Sometimes" server refuses the client with SSL - * * alert "certificate expired" even if it is not true. In this case the server - * * slave terminates (which helps, usually), and we can reconnect transparently. - * */ - -/* This string appears in the error message in this case */ -#define _EXPIRED_ALERT_MESSAGE "function SSL3_READ_BYTES: sslv3 alert certificate expired" -#define _EXPIRED_ALERT_RETRY_COUNT 10 /* default number of slaves, hope that not all - are in the bad state */ -#define _EXPIRED_ALERT_RETRY_DELAY 10 /* ms */ - -int -edg_wll_gss_connect(gss_cred_id_t cred, char const *hostname, int port, - struct timeval *timeout, edg_wll_GssConnection *connection, - edg_wll_GssStatus* gss_code) -{ - int sock, ret; - OM_uint32 maj_stat, min_stat, min_stat2, req_flags; - int context_established = 0; - gss_buffer_desc input_token = GSS_C_EMPTY_BUFFER; - gss_buffer_desc output_token = GSS_C_EMPTY_BUFFER; - gss_name_t server = GSS_C_NO_NAME; - gss_ctx_id_t context = GSS_C_NO_CONTEXT; - char *servername = NULL; - int retry = _EXPIRED_ALERT_RETRY_COUNT; - - maj_stat = min_stat = min_stat2 = req_flags = 0; - memset(connection, 0, sizeof(*connection)); - - /* GSI specific */ - req_flags = GSS_C_GLOBUS_SSL_COMPATIBLE; - - ret = do_connect(&sock, hostname, port, timeout); - if (ret) - return ret; - - /* XXX find appropriate fqdn */ - asprintf (&servername, "host@%s", hostname); - if (servername == NULL) { - errno = ENOMEM; - ret = EDG_WLL_GSS_ERROR_ERRNO; - goto end; - } - input_token.value = servername; - input_token.length = strlen(servername) + 1; - - maj_stat = gss_import_name(&min_stat, &input_token, - GSS_C_NT_HOSTBASED_SERVICE, &server); - if (GSS_ERROR(maj_stat)) { - ret = EDG_WLL_GSS_ERROR_GSS; - goto end; - } - - free(servername); - memset(&input_token, 0, sizeof(input_token)); - - /* XXX if cred == GSS_C_NO_CREDENTIAL set the ANONYMOUS flag */ - - do { /* XXX: the black magic above */ - - /* XXX prepsat na do {} while (maj_stat == CONT) a osetrit chyby*/ - while (!context_established) { - /* XXX verify ret_flags match what was requested */ - maj_stat = gss_init_sec_context(&min_stat, cred, &context, - GSS_C_NO_NAME, GSS_C_NO_OID, - req_flags | GSS_C_MUTUAL_FLAG, - 0, GSS_C_NO_CHANNEL_BINDINGS, - &input_token, NULL, &output_token, - NULL, NULL); - if (input_token.length > 0) { - free(input_token.value); - input_token.length = 0; - } - - if (output_token.length != 0) { - ret = send_token(sock, output_token.value, output_token.length, timeout); - gss_release_buffer(&min_stat2, &output_token); - if (ret) - goto end; - } - - if (GSS_ERROR(maj_stat)) { - if (context != GSS_C_NO_CONTEXT) { - /* XXX send closing token to the friend */ - gss_delete_sec_context(&min_stat2, &context, GSS_C_NO_BUFFER); - context = GSS_C_NO_CONTEXT; - } - ret = EDG_WLL_GSS_ERROR_GSS; - goto end; - } - - if(maj_stat & GSS_S_CONTINUE_NEEDED) { - ret = recv_token(sock, &input_token.value, &input_token.length, timeout); - if (ret) - goto end; - } else - context_established = 1; - } - - /* XXX check ret_flags matches to what was requested */ - - /* retry on false "certificate expired" */ - if (ret == EDG_WLL_GSS_ERROR_GSS) { - edg_wll_GssStatus gss_stat; - char *msg = NULL; - - gss_stat.major_status = maj_stat; - gss_stat.minor_status = min_stat; - edg_wll_gss_get_error(&gss_stat,"",&msg); - - if (strstr(msg,_EXPIRED_ALERT_MESSAGE)) { - usleep(_EXPIRED_ALERT_RETRY_DELAY); - retry--; - } - else retry = 0; - - free(msg); - } - else retry = 0; - - } while (retry); - - connection->sock = sock; - connection->context = context; - servername = NULL; - ret = 0; - -end: - if (ret == EDG_WLL_GSS_ERROR_GSS && gss_code) { - gss_code->major_status = maj_stat; - gss_code->minor_status = min_stat; - } - if (server != GSS_C_NO_NAME) - gss_release_name(&min_stat2, &server); - if (servername == NULL) - free(servername); - if (ret) - close(sock); - - return ret; -} - -int -edg_wll_gss_accept(gss_cred_id_t cred, int sock, struct timeval *timeout, - edg_wll_GssConnection *connection, edg_wll_GssStatus* gss_code) -{ - OM_uint32 maj_stat, min_stat, min_stat2; - OM_uint32 ret_flags = 0; - gss_buffer_desc input_token = GSS_C_EMPTY_BUFFER; - gss_buffer_desc output_token = GSS_C_EMPTY_BUFFER; - gss_name_t client_name = GSS_C_NO_NAME; - gss_ctx_id_t context = GSS_C_NO_CONTEXT; - int ret; - - maj_stat = min_stat = min_stat2 = 0; - memset(connection, 0, sizeof(*connection)); - - /* GSI specific */ - ret_flags = GSS_C_GLOBUS_SSL_COMPATIBLE; - - do { - ret = recv_token(sock, &input_token.value, &input_token.length, timeout); - if (ret) - goto end; - - maj_stat = gss_accept_sec_context(&min_stat, &context, - cred, &input_token, - GSS_C_NO_CHANNEL_BINDINGS, - &client_name, NULL, &output_token, - &ret_flags, NULL, NULL); - if (input_token.length > 0) { - free(input_token.value); - input_token.length = 0; - } - - if (output_token.length) { - ret = send_token(sock, output_token.value, output_token.length, timeout); - gss_release_buffer(&min_stat2, &output_token); - if (ret) - goto end; - } - } while(maj_stat & GSS_S_CONTINUE_NEEDED); - - if (GSS_ERROR(maj_stat)) { - if (context != GSS_C_NO_CONTEXT) { - /* XXX send closing token to the friend */ - gss_delete_sec_context(&min_stat2, &context, GSS_C_NO_BUFFER); - context = GSS_C_NO_CONTEXT; - } - ret = EDG_WLL_GSS_ERROR_GSS; - goto end; - } - - maj_stat = gss_display_name(&min_stat, client_name, &output_token, NULL); - if (GSS_ERROR(maj_stat)) { - /* XXX close context ??? */ - ret = EDG_WLL_GSS_ERROR_GSS; - goto end; - } - - connection->sock = sock; - connection->context = context; - memset(&output_token, 0, sizeof(output_token.value)); - ret = 0; - -end: - if (ret == EDG_WLL_GSS_ERROR_GSS && gss_code) { - gss_code->major_status = maj_stat; - gss_code->minor_status = min_stat; - } - if (client_name != GSS_C_NO_NAME) - gss_release_name(&min_stat2, &client_name); - - return ret; -} - -int -edg_wll_gss_write(edg_wll_GssConnection *connection, const void *buf, size_t bufsize, - struct timeval *timeout, edg_wll_GssStatus* gss_code) -{ - OM_uint32 maj_stat, min_stat; - gss_buffer_desc input_token; - gss_buffer_desc output_token; - int ret; - - input_token.value = (void*)buf; - input_token.length = bufsize; - - maj_stat = gss_wrap (&min_stat, connection->context, 1, GSS_C_QOP_DEFAULT, - &input_token, NULL, &output_token); - if (GSS_ERROR(maj_stat)) { - if (gss_code) { - gss_code->minor_status = min_stat; - gss_code->major_status = maj_stat; - } - - return EDG_WLL_GSS_ERROR_GSS; - } - - ret = send_token(connection->sock, output_token.value, output_token.length, - timeout); - gss_release_buffer(&min_stat, &output_token); - - return ret; -} - - -int -edg_wll_gss_read(edg_wll_GssConnection *connection, void *buf, size_t bufsize, - struct timeval *timeout, edg_wll_GssStatus* gss_code) -{ - OM_uint32 maj_stat, min_stat; - gss_buffer_desc input_token; - gss_buffer_desc output_token; - int ret, i; - - if (connection->bufsize > 0) { - size_t len; - - len = (connection->bufsize < bufsize) ? connection->bufsize : bufsize; - memcpy(buf, connection->buffer, len); - if (connection->bufsize - len == 0) { - free(connection->buffer); - connection->buffer = NULL; - } else { - for (i = 0; i < connection->bufsize - len; i++) - connection->buffer[i] = connection->buffer[i+len]; - } - connection->bufsize -= len; - - return len; - } - - do { - ret = recv_token(connection->sock, &input_token.value, &input_token.length, - timeout); - if (ret) - /* XXX cleanup */ - return ret; - - - maj_stat = gss_unwrap(&min_stat, connection->context, &input_token, - &output_token, NULL, NULL); - gss_release_buffer(&min_stat, &input_token); - if (GSS_ERROR(maj_stat)) { - /* XXX cleanup */ - return EDG_WLL_GSS_ERROR_GSS; - } - } while (maj_stat == 0 && output_token.length == 0 && output_token.value == NULL); - - if (output_token.length > bufsize) { - connection->bufsize = output_token.length - bufsize; - connection->buffer = malloc(connection->bufsize); - if (connection->buffer == NULL) { - connection->bufsize = 0; - ret = EDG_WLL_GSS_ERROR_ERRNO; - goto end; - } - memcpy(connection->buffer, output_token.value + bufsize, connection->bufsize); - output_token.length = bufsize; - } - - memcpy(buf, output_token.value, output_token.length); - ret = output_token.length; - -end: - gss_release_buffer(&min_stat, &output_token); - - return ret; -} - -int -edg_wll_gss_read_full(edg_wll_GssConnection *connection, void *buf, - size_t bufsize, struct timeval *timeout, size_t *total, - edg_wll_GssStatus* gss_code) -{ - int len,i; - *total = 0; - - if (connection->bufsize > 0) { - size_t len; - - len = (connection->bufsize < bufsize) ? connection->bufsize : bufsize; - memcpy(buf, connection->buffer, len); - if (connection->bufsize - len == 0) { - free(connection->buffer); - connection->buffer = NULL; - } else { - for (i = 0; i < connection->bufsize - len; i++) - connection->buffer[i] = connection->buffer[i+len]; - } - connection->bufsize -= len; - *total = len; - } - - while (*total < bufsize) { - len = edg_wll_gss_read(connection, buf+*total, bufsize-*total, - timeout, gss_code); - if (len < 0) return len; - *total += len; - } - - return 0; -} - -int -edg_wll_gss_write_full(edg_wll_GssConnection *connection, const void *buf, - size_t bufsize, struct timeval *timeout, size_t *total, - edg_wll_GssStatus* gss_code) -{ - return edg_wll_gss_write(connection, buf, bufsize, timeout, gss_code); -} - -/* XXX: I'm afraid the contents of stuct stat is somewhat OS dependent */ -int -edg_wll_gss_watch_creds(const char *proxy_file, time_t *proxy_mtime) -{ - struct stat pstat; - int reload = 0; - - if (!proxy_file) return 0; - if (stat(proxy_file,&pstat)) return -1; - - if (!*proxy_mtime) *proxy_mtime = pstat.st_mtime; - - if (*proxy_mtime != pstat.st_mtime) { - *proxy_mtime = pstat.st_mtime; - reload = 1; - } - - return reload; -} - -int -edg_wll_gss_close(edg_wll_GssConnection *con, struct timeval *timeout) -{ - OM_uint32 min_stat; - - /* XXX if timeout is NULL use value of 120 secs */ - - if (con->context != GSS_C_NO_CONTEXT) { - gss_delete_sec_context(&min_stat, &con->context, GSS_C_NO_BUFFER); - /* XXX send the buffer (if any) to the peer. GSSAPI specs doesn't - * recommend sending it, though */ - - /* XXX can socket be open even if context == GSS_C_NO_CONTEXT) ? */ - /* XXX ensure that edg_wll_GssConnection is created with sock set to -1 */ - if (con->sock >= 0) - close(con->sock); - } - if (con->buffer) - free(con->buffer); - memset(con, 0, sizeof(*con)); - con->context = GSS_C_NO_CONTEXT; - con->sock = -1; - return 0; -} - -int -edg_wll_gss_get_error(edg_wll_GssStatus *gss_err, const char *prefix, char **msg) -{ - OM_uint32 maj_stat, min_stat; - OM_uint32 msg_ctx = 0; - gss_buffer_desc maj_status_string = GSS_C_EMPTY_BUFFER; - gss_buffer_desc min_status_string = GSS_C_EMPTY_BUFFER; - char *str = NULL; - char *line, *tmp; - - str = strdup(prefix); - do { - maj_stat = gss_display_status(&min_stat, gss_err->major_status, - GSS_C_GSS_CODE, GSS_C_NO_OID, - &msg_ctx, &maj_status_string); - if (GSS_ERROR(maj_stat)) - break; - - maj_stat = gss_display_status(&min_stat, gss_err->minor_status, - GSS_C_MECH_CODE, GSS_C_NULL_OID, - &msg_ctx, &min_status_string); - if (GSS_ERROR(maj_stat)) { - gss_release_buffer(&min_stat, &maj_status_string); - break; - } - - asprintf(&line, ": %s (%s)", (char *)maj_status_string.value, - (char *)min_status_string.value); - gss_release_buffer(&min_stat, &maj_status_string); - gss_release_buffer(&min_stat, &min_status_string); - - tmp = realloc(str, strlen(str) + strlen(line) + 1); - if (tmp == NULL) { - /* abort() ? */ - free(line); - free(str); - str = "WARNING: Not enough memory to produce error message"; - break; - } - str = tmp; - strcat(str, line); - free(line); - } while (!GSS_ERROR(maj_stat) && msg_ctx != 0); - - *msg = str; - return 0; -} - -int -edg_wll_gss_oid_equal(const gss_OID a, const gss_OID b) -{ - if (a == b) - return 1; - else { - if (a == GSS_C_NO_OID || b == GSS_C_NO_OID || a->length != b->length) - return 0; - else - return (memcmp(a->elements, b->elements, a->length) == 0); - } -} - -int -edg_wll_gss_reject(int sock) -{ - /* XXX is it possible to cut & paste edg_wll_ssl_reject() ? */ - return 0; -} diff --git a/org.glite.security.gsoap-plugin/src/stdsoap2_2.6.2.c b/org.glite.security.gsoap-plugin/src/stdsoap2_2.6.2.c deleted file mode 100644 index 78c4872..0000000 --- a/org.glite.security.gsoap-plugin/src/stdsoap2_2.6.2.c +++ /dev/null @@ -1,11020 +0,0 @@ -/* - -stdsoap2.c[pp] 2.6.2 - -Runtime environment. - -gSOAP XML Web services tools -Copyright (C) 2000-2004, Robert van Engelen, Genivia, Inc. All Rights Reserved. - -Contributors: - -Wind River Systems, Inc., for the following additions (marked WR[...]): - - vxWorks compatible - - Support for IPv6. - --------------------------------------------------------------------------------- -gSOAP public license. - -The contents of this file are subject to the gSOAP Public License Version 1.3 -(the "License"); you may not use this file except in compliance with the -License. You may obtain a copy of the License at -http://www.cs.fsu.edu/~engelen/soaplicense.html -Software distributed under the License is distributed on an "AS IS" basis, -WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License -for the specific language governing rights and limitations under the License. - -The Initial Developer of the Original Code is Robert A. van Engelen. -Copyright (C) 2000-2004 Robert A. van Engelen, Genivia inc. All Rights Reserved. --------------------------------------------------------------------------------- -GPL license. - -This program is free software; you can redistribute it and/or modify it under -the terms of the GNU General Public License as published by the Free Software -Foundation; either version 2 of the License, or (at your option) any later -version. - -This program is distributed in the hope that it will be useful, but WITHOUT ANY -WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A -PARTICULAR PURPOSE. See the GNU General Public License for more details. - -You should have received a copy of the GNU General Public License along with -this program; if not, write to the Free Software Foundation, Inc., 59 Temple -Place, Suite 330, Boston, MA 02111-1307 USA - -Author contact information: -engelen@genivia.com / engelen@acm.org --------------------------------------------------------------------------------- - -Installation note: - -Win32 build needs winsock.dll (Visual C++ "wsock32.lib") -To do this in Visual C++ 6.0, go to "Project", "settings", select the "Link" -tab (the project file needs to be selected in the file view) and add -"wsock32.lib" to the "Object/library modules" entry - -*/ - -#include "stdsoap2.h" - -#ifdef __cplusplus -SOAP_SOURCE_STAMP("@(#) stdsoap2.cpp ver 2.6.2 2004-06-12 12:00:00 GMT") -extern "C" { -#else -SOAP_SOURCE_STAMP("@(#) stdsoap2.c ver 2.6.2 2004-06-12 12:00:00 GMT") -#endif - -/* 8bit character representing unknown/nonrepresentable character data (not supported by current locale) */ -#ifndef SOAP_UNKNOWN_CHAR -#define SOAP_UNKNOWN_CHAR (127) -#endif - -/* EOF=-1 */ -#define LT (wchar)(-2) /* XML character '<' */ -#define TT (wchar)(-3) /* XML character '' */ -#define QT (wchar)(-5) /* XML character '"' */ -#define AP (wchar)(-6) /* XML character ''' */ - -#define soap_blank(c) ((c) >= 0 && (c) <= 32) -#define soap_notblank(c) ((c) > 32) -#define soap_hash_ptr(p) (((unsigned long)(p) >> 3) & (SOAP_PTRHASH - 1)) - -static int soap_isxdigit(int); -static wchar soap_char(struct soap*); -static wchar soap_getchunkchar(struct soap*); -static void soap_update_ptrs(struct soap*, char*, char*, long); -static int soap_has_copies(struct soap*, char*, char*); -static struct soap_ilist *soap_hlookup(struct soap*, const char*); -static void soap_init_iht(struct soap*); -static void soap_free_iht(struct soap*); -static void soap_init_pht(struct soap*); -static void soap_free_pht(struct soap*); -static int soap_set_error(struct soap*, const char*, const char*, const char*, int); -static int soap_copy_fault(struct soap*, const char*, const char*, const char*); -static int soap_getattrval(struct soap*, char*, size_t, wchar); -static void soap_set_local_namespaces(struct soap*); -static size_t soap_begin_dime(struct soap*); -static int soap_isnumeric(struct soap*, const char*); -static void *fplugin(struct soap*, const char*); - -#ifndef WITH_LEAN -static time_t soap_timegm(struct tm*); -static void soap_init_logs(struct soap*); -static void soap_close_logfile(struct soap*, int); -static void soap_set_logfile(struct soap*, int, const char*); -#endif - -#ifdef WITH_FAST -/* Use look-aside buffers */ -static int soap_append_lab(struct soap*, const char*, size_t); -#endif - -#ifndef WITH_LEANER -static int soap_putdimefield(struct soap*, const char*, size_t); -static char *soap_getdimefield(struct soap*, size_t); -#endif - -#ifdef WITH_GZIP -static int soap_getgzipheader(struct soap*); -#endif - -#ifdef WITH_OPENSSL -static int ssl_auth_init(struct soap*); -static int ssl_verify_callback(int, X509_STORE_CTX*); -static int ssl_password(char*, int, int, void *); -/* This callback is included for future references. It should not be deleted -static DH *ssl_tmp_dh(SSL*, int, int); -*/ -#endif - -static const char *soap_strerror(struct soap*); -static const char *tcp_error(struct soap*); -static const char *http_error(struct soap*, int); -static int http_post(struct soap*, const char*, const char*, int, const char*, const char*, size_t); -static int http_get(struct soap*); -static int http_post_header(struct soap*, const char*, const char*); -static int http_response(struct soap*, int, size_t); -static int http_parse(struct soap*); -static int http_parse_header(struct soap*, const char*, const char*); -static int tcp_connect(struct soap*, const char*, const char*, int); -static int tcp_accept(struct soap*, int, struct sockaddr*, int*); -static int tcp_disconnect(struct soap*); -static int fsend(struct soap*, const char*, size_t); -static size_t frecv(struct soap*, char*, size_t); - -/* WR[ */ -#ifdef VXWORKS -static int vx_nonblocking = TRUE; /* ioctl argument */ -#endif -/* ]WR */ - -#ifndef PALM_2 -static const char soap_env1[42] = "http://schemas.xmlsoap.org/soap/envelope/"; -static const char soap_enc1[42] = "http://schemas.xmlsoap.org/soap/encoding/"; -static const char soap_env2[40] = "http://www.w3.org/2003/05/soap-envelope"; -static const char soap_enc2[40] = "http://www.w3.org/2003/05/soap-encoding"; -static const char soap_rpc[35] = "http://www.w3.org/2003/05/soap-rpc"; -#endif - -#ifndef PALM_1 -const struct soap_double_nan soap_double_nan = {0xFFFFFFFF, 0xFFFFFFFF}; -static const char soap_base64o[65] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; -static const char soap_base64i[81] = "\76XXX\77\64\65\66\67\70\71\72\73\74\75XXXXXXX\00\01\02\03\04\05\06\07\10\11\12\13\14\15\16\17\20\21\22\23\24\25\26\27\30\31XXXXXX\32\33\34\35\36\37\40\41\42\43\44\45\46\47\50\51\52\53\54\55\56\57\60\61\62\63"; -#endif - -static const char soap_padding[3] = "\0\0"; -#define SOAP_STR_PADDING (soap_padding) -#define SOAP_STR_EOS (soap_padding) - -#ifndef WITH_LEAN -static const struct soap_code_map html_entity_codes[] = /* entities for XHTML parsing */ -{ { 160, "nbsp" }, - { 161, "iexcl" }, - { 162, "cent" }, - { 163, "pound" }, - { 164, "curren" }, - { 165, "yen" }, - { 166, "brvbar" }, - { 167, "sect" }, - { 168, "uml" }, - { 169, "copy" }, - { 170, "ordf" }, - { 171, "laquo" }, - { 172, "not" }, - { 173, "shy" }, - { 174, "reg" }, - { 175, "macr" }, - { 176, "deg" }, - { 177, "plusmn" }, - { 178, "sup2" }, - { 179, "sup3" }, - { 180, "acute" }, - { 181, "micro" }, - { 182, "para" }, - { 183, "middot" }, - { 184, "cedil" }, - { 185, "sup1" }, - { 186, "ordm" }, - { 187, "raquo" }, - { 188, "frac14" }, - { 189, "frac12" }, - { 190, "frac34" }, - { 191, "iquest" }, - { 192, "Agrave" }, - { 193, "Aacute" }, - { 194, "Acirc" }, - { 195, "Atilde" }, - { 196, "Auml" }, - { 197, "Aring" }, - { 198, "AElig" }, - { 199, "Ccedil" }, - { 200, "Egrave" }, - { 201, "Eacute" }, - { 202, "Ecirc" }, - { 203, "Euml" }, - { 204, "Igrave" }, - { 205, "Iacute" }, - { 206, "Icirc" }, - { 207, "Iuml" }, - { 208, "ETH" }, - { 209, "Ntilde" }, - { 210, "Ograve" }, - { 211, "Oacute" }, - { 212, "Ocirc" }, - { 213, "Otilde" }, - { 214, "Ouml" }, - { 215, "times" }, - { 216, "Oslash" }, - { 217, "Ugrave" }, - { 218, "Uacute" }, - { 219, "Ucirc" }, - { 220, "Uuml" }, - { 221, "Yacute" }, - { 222, "THORN" }, - { 223, "szlig" }, - { 224, "agrave" }, - { 225, "aacute" }, - { 226, "acirc" }, - { 227, "atilde" }, - { 228, "auml" }, - { 229, "aring" }, - { 230, "aelig" }, - { 231, "ccedil" }, - { 232, "egrave" }, - { 233, "eacute" }, - { 234, "ecirc" }, - { 235, "euml" }, - { 236, "igrave" }, - { 237, "iacute" }, - { 238, "icirc" }, - { 239, "iuml" }, - { 240, "eth" }, - { 241, "ntilde" }, - { 242, "ograve" }, - { 243, "oacute" }, - { 244, "ocirc" }, - { 245, "otilde" }, - { 246, "ouml" }, - { 247, "divide" }, - { 248, "oslash" }, - { 249, "ugrave" }, - { 250, "uacute" }, - { 251, "ucirc" }, - { 252, "uuml" }, - { 253, "yacute" }, - { 254, "thorn" }, - { 255, "yuml" }, - { 0, NULL } -}; -#endif - -#ifndef WITH_LEAN -static const struct soap_code_map h_error_codes[] = -{ -#ifdef HOST_NOT_FOUND - { HOST_NOT_FOUND, "Host not found" }, -#endif -#ifdef TRY_AGAIN - { TRY_AGAIN, "Try Again" }, -#endif -#ifdef NO_RECOVERY - { NO_RECOVERY, "No Recovery" }, -#endif -#ifdef NO_DATA - { NO_DATA, "No Data" }, -#endif -#ifdef NO_ADDRESS - { NO_ADDRESS, "No Address" }, -#endif - { 0, NULL } -}; -#endif - -#ifndef WITH_LEAN -static const struct soap_code_map h_http_error_codes[] = -{ { 201, "Created" }, - { 202, "Accepted" }, - { 203, "Non-Authoritative Information" }, - { 204, "No Content" }, - { 205, "Reset Content" }, - { 206, "Partial Content" }, - { 300, "Multiple Choices" }, - { 301, "Moved Permanently" }, - { 302, "Found" }, - { 303, "See Other" }, - { 304, "Not Modified" }, - { 305, "Use Proxy" }, - { 307, "Temporary Redirect" }, - { 400, "Bad Request" }, - { 401, "Unauthorized" }, - { 402, "Payment Required" }, - { 403, "Forbidden" }, - { 404, "Not Found" }, - { 405, "Method Not Allowed" }, - { 406, "Not Acceptable" }, - { 407, "Proxy Authentication Required" }, - { 408, "Request Time-out" }, - { 409, "Conflict" }, - { 410, "Gone" }, - { 411, "Length Required" }, - { 412, "Precondition Failed" }, - { 413, "Request Entity Too Large" }, - { 414, "Request-URI Too Large" }, - { 415, "Unsupported Media Type" }, - { 416, "Requested range not satisfiable" }, - { 417, "Expectation Failed" }, - { 500, "Internal Server Error" }, - { 501, "Not Implemented" }, - { 502, "Bad Gateway" }, - { 503, "Service Unavailable" }, - { 504, "Gateway Time-out" }, - { 505, "HTTP Version not supported" }, - { 0, NULL } -}; -#endif - -#ifdef WITH_OPENSSL -static const struct soap_code_map h_ssl_error_codes[] = -{ -#define _SSL_ERROR(e) { e, #e } - _SSL_ERROR(SSL_ERROR_SSL), - _SSL_ERROR(SSL_ERROR_ZERO_RETURN), - _SSL_ERROR(SSL_ERROR_WANT_READ), - _SSL_ERROR(SSL_ERROR_WANT_WRITE), - _SSL_ERROR(SSL_ERROR_WANT_CONNECT), - _SSL_ERROR(SSL_ERROR_WANT_X509_LOOKUP), - _SSL_ERROR(SSL_ERROR_SYSCALL), - { 0, NULL } -}; -#endif - -#ifdef WIN32 -static int tcp_done = 0; -#endif - -/******************************************************************************/ -#ifndef MAC_CARBON -#ifndef PALM_1 -static int -fsend(struct soap *soap, const char *s, size_t n) -{ register int nwritten; -#if defined(__cplusplus) && !defined(UNDER_CE) - if (soap->os) - { soap->os->write(s, n); - if (soap->os->good()) - return SOAP_OK; - return SOAP_EOF; - } -#endif - while (n) - { if (soap_valid_socket(soap->socket)) - { -#ifndef WITH_LEAN - if (soap->send_timeout) - { struct timeval timeout; - fd_set fd; - if (soap->send_timeout > 0) - { timeout.tv_sec = soap->send_timeout; - timeout.tv_usec = 0; - } - else - { timeout.tv_sec = -soap->send_timeout/1000000; - timeout.tv_usec = -soap->send_timeout%1000000; - } - FD_ZERO(&fd); - FD_SET((SOAP_SOCKET)soap->socket, &fd); - for (;;) - { register int r = select((SOAP_SOCKET)(soap->socket + 1), NULL, &fd, &fd, &timeout); - if (r > 0) - break; - if (!r) - { soap->errnum = 0; - return SOAP_EOF; - } - if (soap_socket_errno != SOAP_EINTR) - { soap->errnum = soap_socket_errno; - return SOAP_EOF; - } - } - } -#endif -#ifdef WITH_OPENSSL - if (soap->ssl) - nwritten = SSL_write(soap->ssl, s, n); - else -#endif -#ifndef PALM - nwritten = send((SOAP_SOCKET)soap->socket, s, n, soap->socket_flags); -#else - nwritten = send((SOAP_SOCKET)soap->socket, (void*)s, n, soap->socket_flags); -#endif - if (nwritten <= 0) - { -#ifdef WITH_OPENSSL - int err; - if (soap->ssl && (err = SSL_get_error(soap->ssl, nwritten)) != SSL_ERROR_NONE && err != SSL_ERROR_WANT_READ && err != SSL_ERROR_WANT_WRITE) - return SOAP_EOF; -#endif - if (soap_socket_errno != SOAP_EINTR && soap_socket_errno != SOAP_EWOULDBLOCK && soap_socket_errno != SOAP_EAGAIN) - { soap->errnum = soap_socket_errno; - return SOAP_EOF; - } - nwritten = 0; /* and call write() again */ - } - } - else - { -#ifdef WITH_FASTCGI - nwritten = fwrite((void*)s, 1, n, stdout); - fflush(stdout); -#else -#ifdef UNDER_CE - nwritten = fwrite(s, 1, n, soap->sendfd); -#else -/* WR[ */ -#ifdef VXWORKS -#ifdef WMW_RPM_IO - if (soap->rpmreqid) - { - httpBlockPut(soap->rpmreqid, s, n); - nwritten = n; - } - else - { - nwritten = fwrite(s, sizeof(char), n, fdopen(soap->sendfd, "w")); - } -#else - nwritten = fwrite(s, sizeof(char), n, fdopen(soap->sendfd, "w")); -#endif /* WMW_RPM_IO */ -#else -/* ]WR */ - nwritten = write((SOAP_SOCKET)soap->sendfd, s, n); -/* WR[ */ -#endif -/* ]WR */ -#endif -#endif - if (nwritten <= 0) - { if (soap_errno != SOAP_EINTR && soap_errno != SOAP_EWOULDBLOCK && soap_errno != SOAP_EAGAIN) - { soap->errnum = soap_errno; - return SOAP_EOF; - } - nwritten = 0; /* and call write() again */ - } - } - n -= nwritten; - s += nwritten; - } - return SOAP_OK; -} -#endif -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_flush_raw(struct soap *soap, const char *s, size_t n) -{ -#ifndef WITH_LEAN - if ((soap->mode & SOAP_IO) == SOAP_IO_STORE) - { char *t; - if (!(t = (char*)soap_push_block(soap, n))) - return soap->error = SOAP_EOM; - memcpy(t, s, n); - return SOAP_OK; - } - if ((soap->mode & SOAP_IO) == SOAP_IO_CHUNK) - { char t[16]; - sprintf(t, "\r\n%lX\r\n" + (soap->chunksize ? 0 : 2), (unsigned long)n); - DBGMSG(SENT, t, strlen(t)); - if ((soap->error = soap->fsend(soap, t, strlen(t)))) - return soap->error; - soap->chunksize += n; - } -#endif - DBGMSG(SENT, s, n); - return soap->error = soap->fsend(soap, s, n); -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_flush(struct soap *soap) -{ if (soap->bufidx) - { -#ifdef WITH_ZLIB - if (soap->mode & SOAP_ENC_ZLIB) - { soap->d_stream.next_in = (Byte*)soap->buf; - soap->d_stream.avail_in = (unsigned int)soap->bufidx; -#ifdef WITH_GZIP - soap->z_crc = crc32(soap->z_crc, (Byte*)soap->buf, (unsigned int)soap->bufidx); -#endif - do - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Deflating %u bytes\n", soap->d_stream.avail_in)); - if (deflate(&soap->d_stream, Z_NO_FLUSH) != Z_OK) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Unable to deflate: %s\n", soap->d_stream.msg?soap->d_stream.msg:"")); - return soap->error = SOAP_ZLIB_ERROR; - } - if (!soap->d_stream.avail_out) - { if (soap_flush_raw(soap, soap->z_buf, SOAP_BUFLEN)) - return soap->error; - soap->d_stream.next_out = (Byte*)soap->z_buf; - soap->d_stream.avail_out = SOAP_BUFLEN; - } - } while (soap->d_stream.avail_in); - } - else -#endif - if (soap_flush_raw(soap, soap->buf, soap->bufidx)) - return soap->error; - soap->bufidx = 0; - } - return SOAP_OK; -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_send_raw(struct soap *soap, const char *s, size_t n) -{ if (!n) - return SOAP_OK; - if (soap->mode & SOAP_IO_LENGTH) - { soap->count += n; - if (soap->fprepare) - return soap->fprepare(soap, s, n); - return SOAP_OK; - } - if (soap->mode & SOAP_IO) - { register size_t i = SOAP_BUFLEN - soap->bufidx; - while (n >= i) - { memcpy(soap->buf + soap->bufidx, s, i); - soap->bufidx = SOAP_BUFLEN; - if (soap_flush(soap)) - return soap->error; - s += i; - n -= i; - i = SOAP_BUFLEN; - } - memcpy(soap->buf + soap->bufidx, s, n); - soap->bufidx += n; - return SOAP_OK; - } - return soap_flush_raw(soap, s, n); -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_send(struct soap *soap, const char *s) -{ if (s) - return soap_send_raw(soap, s, strlen(s)); - return SOAP_OK; -} -#endif - -/******************************************************************************/ -#ifndef MAC_CARBON -#ifndef PALM_1 -static size_t -frecv(struct soap *soap, char *s, size_t n) -{ register int r; - soap->errnum = 0; -#if defined(__cplusplus) && !defined(UNDER_CE) - if (soap->is) - { if (soap->is->good()) - return soap->is->read(s, n).gcount(); - return 0; - } -#endif - if (soap_valid_socket(soap->socket)) - { for (;;) - { -#ifndef WITH_LEAN - struct timeval timeout; - fd_set fd; - if (soap->recv_timeout) - { if (soap->recv_timeout > 0) - { timeout.tv_sec = soap->recv_timeout; - timeout.tv_usec = 0; - } - else - { timeout.tv_sec = -soap->recv_timeout/1000000; - timeout.tv_usec = -soap->recv_timeout%1000000; - } - FD_ZERO(&fd); - FD_SET((SOAP_SOCKET)soap->socket, &fd); - for (;;) - { r = select((SOAP_SOCKET)(soap->socket + 1), &fd, NULL, &fd, &timeout); - if (r > 0) - break; - if (r == 0) - return 0; - if (soap_socket_errno != SOAP_EINTR) - { soap->errnum = soap_socket_errno; - return 0; - } - } - } -#endif -#ifdef WITH_OPENSSL - if (soap->ssl) - { int err; - r = SSL_read(soap->ssl, s, n); - if ((err = SSL_get_error(soap->ssl, r)) == SSL_ERROR_NONE) - return (size_t)r; - if (err != SSL_ERROR_WANT_READ && err != SSL_ERROR_WANT_WRITE) - return 0; - } - else -#endif - { r = recv((SOAP_SOCKET)soap->socket, s, n, soap->socket_flags); - if (r >= 0) - return (size_t)r; - if (soap_socket_errno != SOAP_EINTR && soap_socket_errno != SOAP_EAGAIN) - { soap->errnum = soap_socket_errno; - return 0; - } - } -#ifndef WITH_LEAN - { struct timeval timeout; - fd_set fd; - timeout.tv_sec = 0; - timeout.tv_usec = 10000; - FD_ZERO(&fd); - FD_SET((SOAP_SOCKET)soap->socket, &fd); - r = select((SOAP_SOCKET)(soap->socket + 1), &fd, NULL, &fd, &timeout); - if (r < 0 && soap_socket_errno != SOAP_EINTR) - { soap->errnum = soap_socket_errno; - return 0; - } - } -#endif - } - } -#ifdef WITH_FASTCGI - return fread(s, 1, n, stdin); -#else -#ifdef UNDER_CE - return fread(s, 1, n, soap->recvfd); -#else -/* WR[ */ -#ifdef WMW_RPM_IO - if (soap->rpmreqid) - { - r = httpBlockRead(soap->rpmreqid, s, n); - } - else - { - r = read(soap->recvfd, s, n); - } - if (r >= 0) - { - return r; - } - return 0; -#else -/* ]WR */ - r = read((SOAP_SOCKET)soap->recvfd, s, n); - if (r >= 0) - return (size_t)r; - soap->errnum = soap_errno; - return 0; -/* WR[ */ -#endif -/* ]WR */ -#endif -#endif -} -#endif -#endif - -/******************************************************************************/ -#ifndef PALM_1 -static wchar -soap_getchunkchar(struct soap *soap) -{ if (soap->bufidx < soap->buflen) - return soap->buf[soap->bufidx++]; - soap->bufidx = 0; - soap->buflen = soap->chunkbuflen = soap->frecv(soap, soap->buf, SOAP_BUFLEN); - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Read %u bytes\n", (unsigned int)soap->buflen)); - DBGMSG(RECV, soap->buf, soap->buflen); - if (soap->buflen) - return soap->buf[soap->bufidx++]; - return EOF; -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -static int -soap_isxdigit(int c) -{ switch (c) - { case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': - case 'A': case 'B': case 'C': case 'D': case 'E': case 'F': - case 'a': case 'b': case 'c': case 'd': case 'e': case 'f': - return 1; - } - return 0; -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_recv_raw(struct soap *soap) -{ register size_t ret; -#ifdef WITH_ZLIB - if (soap->mode & SOAP_ENC_ZLIB) - { if (soap->d_stream.next_out == Z_NULL) - return EOF; - if (soap->d_stream.avail_in || !soap->d_stream.avail_out) - { register int r; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Inflating\n")); - soap->d_stream.next_out = (Byte*)soap->buf; - soap->d_stream.avail_out = SOAP_BUFLEN; - r = inflate(&soap->d_stream, Z_NO_FLUSH); - if (r == Z_OK || r == Z_STREAM_END) - { soap->bufidx = 0; - soap->buflen = SOAP_BUFLEN - soap->d_stream.avail_out; - if (soap->zlib_in == SOAP_ZLIB_GZIP) - soap->z_crc = crc32(soap->z_crc, (Byte*)soap->buf, (unsigned int)soap->buflen); - if (r == Z_STREAM_END) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Inflated %lu->%lu bytes\n", soap->d_stream.total_in, soap->d_stream.total_out)); - soap->z_ratio_in = (float)soap->d_stream.total_in / (float)soap->d_stream.total_out; - soap->d_stream.next_out = Z_NULL; - } - if (soap->buflen) - { soap->count += soap->buflen; - return SOAP_OK; - } - } - else if (r != Z_BUF_ERROR) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Inflate error: %s\n", soap->d_stream.msg?soap->d_stream.msg:"")); - soap->d_stream.next_out = Z_NULL; - return EOF; - } - } -zlib_again: - if ((soap->mode & SOAP_IO) == SOAP_IO_CHUNK && !soap->chunksize) - { memcpy(soap->buf, soap->z_buf, SOAP_BUFLEN); - soap->buflen = soap->z_buflen; - } - } -#endif - if ((soap->mode & SOAP_IO) == SOAP_IO_CHUNK) /* read HTTP chunked transfer */ - { -chunk_again: - if (soap->chunksize) - { soap->buflen = ret = soap->frecv(soap, soap->buf, soap->chunksize > SOAP_BUFLEN ? SOAP_BUFLEN : soap->chunksize); - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Getting chunk: read %u bytes\n", (unsigned int)ret)); - DBGMSG(RECV, soap->buf, ret); - soap->bufidx = 0; - soap->chunksize -= ret; - } - else - { register wchar c; - char tmp[8], *t; - t = tmp; - if (!soap->chunkbuflen) - { soap->chunkbuflen = ret = soap->frecv(soap, soap->buf, SOAP_BUFLEN); - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Read %u bytes\n", (unsigned int)ret)); - DBGMSG(RECV, soap->buf, ret); - soap->bufidx = 0; - if (!ret) - return EOF; - } - else - soap->bufidx = soap->buflen; - soap->buflen = soap->chunkbuflen; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Getting chunk size (%u %u)\n", (unsigned int)soap->bufidx, (unsigned int)soap->buflen)); - while (!soap_isxdigit((int)(c = soap_getchunkchar(soap)))) - if ((int)c == EOF) - return EOF; - do - *t++ = (char)c; - while (soap_isxdigit((int)(c = soap_getchunkchar(soap))) && t - tmp < 7); - while ((int)c != EOF && c != '\n') - c = soap_getchunkchar(soap); - if ((int)c == EOF) - return EOF; - *t = '\0'; - soap->chunksize = soap_strtoul(tmp, &t, 16); - if (!soap->chunksize) - { soap->chunkbuflen = 0; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "End of chunked message\n")); - while ((int)c != EOF && c != '\n') - c = soap_getchunkchar(soap); - return EOF; - } - soap->buflen = soap->bufidx + soap->chunksize; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Moving buf len to %u (%u %s)\n", (unsigned int)soap->buflen, (unsigned int)soap->bufidx, tmp)); - if (soap->buflen > soap->chunkbuflen) - { soap->buflen = soap->chunkbuflen; - soap->chunksize -= soap->buflen - soap->bufidx; - soap->chunkbuflen = 0; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Passed end of buffer for chunked HTTP (%lu bytes left)\n", (unsigned long)(soap->buflen - soap->bufidx))); - } - else if (soap->chunkbuflen) - soap->chunksize = 0; - ret = soap->buflen - soap->bufidx; - if (!ret) - goto chunk_again; - } - } - else - { soap->bufidx = 0; - soap->buflen = ret = soap->frecv(soap, soap->buf, SOAP_BUFLEN); - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Read %u bytes\n", (unsigned int)ret)); - DBGMSG(RECV, soap->buf, ret); - } -#ifdef WITH_ZLIB - if (soap->mode & SOAP_ENC_ZLIB) - { int r; - memcpy(soap->z_buf, soap->buf, SOAP_BUFLEN); - soap->d_stream.next_in = (Byte*)(soap->z_buf + soap->bufidx); - soap->d_stream.avail_in = (unsigned int)ret; - soap->d_stream.next_out = (Byte*)soap->buf; - soap->d_stream.avail_out = SOAP_BUFLEN; - r = inflate(&soap->d_stream, Z_NO_FLUSH); - if (r == Z_OK || r == Z_STREAM_END) - { soap->bufidx = 0; - soap->z_buflen = soap->buflen; - soap->buflen = ret = SOAP_BUFLEN - soap->d_stream.avail_out; - if (soap->zlib_in == SOAP_ZLIB_GZIP) - soap->z_crc = crc32(soap->z_crc, (Byte*)soap->buf, (unsigned int)soap->buflen); - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Inflated %u bytes\n", (unsigned int)ret)); - if (!ret) - goto zlib_again; - if (r == Z_STREAM_END) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Inflated %lu->%lu bytes\n", soap->d_stream.total_in, soap->d_stream.total_out)); - soap->z_ratio_in = (float)soap->d_stream.total_in / (float)soap->d_stream.total_out; - soap->d_stream.next_out = Z_NULL; - } - } - else - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Unable to inflate: (%d) %s\n", r, soap->d_stream.msg?soap->d_stream.msg:"")); - soap->d_stream.next_out = Z_NULL; - return EOF; - } - } -#endif - soap->count += ret; - return !ret; -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_recv(struct soap *soap) -{ -#ifndef WITH_LEANER - if (soap->mode & SOAP_ENC_DIME) - { if (soap->dime_buflen) - { char *s; - int i; - unsigned char tmp[12]; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "DIME hdr for chunked DIME is in buffer\n")); - soap->count += soap->dime_buflen - soap->buflen; - soap->buflen = soap->dime_buflen; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Skip padding (%ld bytes)\n", -(long)soap->dime_size&3)); - for (i = -(long)soap->dime_size&3; i > 0; i--) - { soap->bufidx++; - if (soap->bufidx >= soap->buflen) - if (soap_recv_raw(soap)) - return EOF; - } - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Get DIME hdr for next chunk\n")); - s = (char*)tmp; - for (i = 12; i > 0; i--) - { *s++ = soap->buf[soap->bufidx++]; - if (soap->bufidx >= soap->buflen) - if (soap_recv_raw(soap)) - return EOF; - } - soap->dime_flags = tmp[0] & 0x7; - soap->dime_size = ((size_t)tmp[8] << 24) | ((size_t)tmp[9] << 16) | ((size_t)tmp[10] << 8) | ((size_t)tmp[11]); - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Get DIME chunk (%u bytes)\n", (unsigned int)soap->dime_size)); - if (soap->dime_flags & SOAP_DIME_CF) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "More chunking\n")); - soap->dime_chunksize = soap->dime_size; - if (soap->buflen - soap->bufidx >= soap->dime_size) - { soap->dime_buflen = soap->buflen; - soap->buflen = soap->bufidx + soap->dime_chunksize; - } - else - soap->dime_chunksize -= soap->buflen - soap->bufidx; - } - else - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Last chunk\n")); - soap->dime_buflen = 0; - soap->dime_chunksize = 0; - } - soap->count = soap->buflen - soap->bufidx; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "%u bytes remaining\n", (unsigned int)soap->count)); - return SOAP_OK; - } - if (soap->dime_chunksize) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Get next DIME hdr for chunked DIME (%u bytes chunk)\n", (unsigned int)soap->dime_chunksize)); - if (soap_recv_raw(soap)) - return EOF; - if (soap->buflen - soap->bufidx >= soap->dime_chunksize) - { soap->dime_buflen = soap->buflen; - soap->count -= soap->buflen - soap->bufidx - soap->dime_chunksize; - soap->buflen = soap->bufidx + soap->dime_chunksize; - } - else - soap->dime_chunksize -= soap->buflen - soap->bufidx; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "%lu bytes remaining, count=%u\n", (unsigned long)(soap->buflen-soap->bufidx), (unsigned int)soap->count)); - return SOAP_OK; - } - } -#endif - return soap_recv_raw(soap); -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -wchar -SOAP_FMAC2 -soap_getchar(struct soap *soap) -{ register wchar c; - if (soap->ahead) - { c = soap->ahead; - soap->ahead = 0; - return c; - } - return soap_get1(soap); -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -const struct soap_code_map* -SOAP_FMAC2 -soap_code(const struct soap_code_map *map, const char *str) -{ while (map->string) - { if (!strcmp(str, map->string)) - return map; - map++; - } - return NULL; -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -long -SOAP_FMAC2 -soap_int_code(const struct soap_code_map *map, const char *str, long other) -{ while (map->string) - { if (!strcmp(str, map->string)) - return map->code; - map++; - } - return other; -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -const char* -SOAP_FMAC2 -soap_str_code(const struct soap_code_map *map, long code) -{ while (map->code != code && map->string) - map++; - return map->string; -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -static wchar -soap_char(struct soap *soap) -{ char tmp[8]; - register int i; - register wchar c; - register char *s = tmp; - for (i = 0; i < 7; i++) - { c = soap_get1(soap); - if (c == ';' || (int)c == EOF) - break; - *s++ = (char)c; - } - *s = '\0'; - if (*tmp == '#') - { if (tmp[1] == 'x' || tmp[1] == 'X') - return soap_strtol(tmp + 2, NULL, 16); - return atol(tmp + 1); - } - if (!strcmp(tmp, "lt")) - return '<'; - if (!strcmp(tmp, "gt")) - return '>'; - if (!strcmp(tmp, "amp")) - return '&'; - if (!strcmp(tmp, "quot")) - return '"'; - if (!strcmp(tmp, "apos")) - return '\''; -#ifndef WITH_LEAN - return (wchar)soap_int_code(html_entity_codes, tmp, 127); -#else - return SOAP_UNKNOWN_CHAR; /* use this to represent unknown code */ -#endif -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -wchar -SOAP_FMAC2 -soap_get(struct soap *soap) -{ register wchar c; - c = soap->ahead; - if (c) - soap->ahead = 0; - else - c = soap_get1(soap); - for (;;) - { if (soap->cdata) - { if (c == ']') - { c = soap_get1(soap); - if (c == ']') - { soap->cdata = 0; - soap_get1(soap); /* skip > */ - c = soap_get1(soap); - } - else - { soap_revget1(soap); - return ']'; - } - } - else - return c; - } - switch (c) - { case '<': - do c = soap_get1(soap); - while (soap_blank(c)); - if (c == '!' || c == '?' || c == '%') - { if (c == '!') - { c = soap_get1(soap); - if (c == '[') - { do c = soap_get1(soap); - while ((int)c != EOF && c != '['); - if ((int)c == EOF) - break; - soap->cdata = 1; - c = soap_get1(soap); - continue; - } - if (c == '-' && (c = soap_get1(soap)) == '-') - { do - { c = soap_get1(soap); - if (c == '-' && (c = soap_get1(soap)) == '-') - break; - } while ((int)c != EOF); - } - } - while ((int)c != EOF && c != '>') - c = soap_get1(soap); - if ((int)c == EOF) - break; - c = soap_get1(soap); - continue; - } - if (c == '/') - return TT; - soap_revget1(soap); - return LT; - case '>': - return GT; - case '"': - return QT; - case '\'': - return AP; - case '&': - return soap_char(soap) | 0x80000000; - } - break; - } - return c; -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -wchar -SOAP_FMAC2 -soap_advance(struct soap *soap) -{ register wchar c; - while ((int)((c = soap_get(soap)) != EOF) && c != LT && c != TT) - ; - return c; -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -wchar -SOAP_FMAC2 -soap_skip(struct soap *soap) -{ register wchar c; - do c = soap_get(soap); - while (soap_blank(c)); - return c; -} -#endif - -/******************************************************************************/ -#ifndef WITH_LEANER -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_move(struct soap *soap, long n) -{ DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Moving %ld bytes forward\n", (long)n)); - for (; n > 0; n--) - if ((int)soap_getchar(soap) == EOF) - return SOAP_EOF; - return SOAP_OK; -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_LEANER -#ifndef PALM_1 -SOAP_FMAC1 -size_t -SOAP_FMAC2 -soap_tell(struct soap *soap) -{ return soap->count - soap->buflen + soap->bufidx - (soap->ahead != 0); -} -#endif -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_pututf8(struct soap *soap, register unsigned long c) -{ char tmp[16]; - if (c > 0 && c < 0x80) - { *tmp = (char)c; - return soap_send_raw(soap, tmp, 1); - } -#ifndef WITH_LEAN - if (soap->mode & SOAP_XML_CANONICAL) - { register char *t = tmp; - if (c < 0x0800) - *t++ = (char)(0xC0 | ((c >> 6) & 0x1F)); - else - { if (c < 0x010000) - *t++ = (char)(0xE0 | ((c >> 12) & 0x0F)); - else - { if (c < 0x200000) - *t++ = (char)(0xF0 | ((c >> 18) & 0x07)); - else - { if (c < 0x04000000) - *t++ = (char)(0xF8 | ((c >> 24) & 0x03)); - else - { *t++ = (char)(0xFC | ((c >> 30) & 0x01)); - *t++ = (char)(0x80 | ((c >> 24) & 0x3F)); - } - *t++ = (char)(0x80 | ((c >> 18) & 0x3F)); - } - *t++ = (char)(0x80 | ((c >> 12) & 0x3F)); - } - *t++ = (char)(0x80 | ((c >> 6) & 0x3F)); - } - *t++ = (char)(0x80 | (c & 0x3F)); - *t = '\0'; - } - else -#endif - sprintf(tmp, "&#%lu;", c); - return soap_send(soap, tmp); -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -wchar -SOAP_FMAC2 -soap_getutf8(struct soap *soap) -{ register wchar c, c1, c2, c3, c4; - c = soap_get(soap); - if (c < 0x80) - return c; - c1 = soap_get(soap); - if (c1 < 0x80) - { soap_unget(soap, c1); - return c; - } - c1 &= 0x3F; - if (c < 0xE0) - return ((wchar)(c & 0x1F) << 6) | c1; - c2 = (wchar)soap_get1(soap) & 0x3F; - if (c < 0xF0) - return ((wchar)(c & 0x0F) << 12) | (c1 << 6) | c2; - c3 = (wchar)soap_get1(soap) & 0x3F; - if (c < 0xF8) - return ((wchar)(c & 0x07) << 18) | (c1 << 12) | (c2 << 6) | c3; - c4 = (wchar)soap_get1(soap) & 0x3F; - if (c < 0xFC) - return ((wchar)(c & 0x03) << 24) | (c1 << 18) | (c2 << 12) | (c3 << 6) | c4; - return ((wchar)(c & 0x01) << 30) | (c1 << 24) | (c2 << 18) | (c3 << 12) | (c4 << 6) | (wchar)(soap_get1(soap) & 0x3F); -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_puthex(struct soap *soap, const unsigned char *s, int n) -{ /* TODO: serialize to DOM (as an option) using new soap_s2hex() */ - char d[2]; - register int i; - for (i = 0; i < n; i++) - { register int m = *s++; - d[0] = (char)((m >> 4) + (m > 159 ? '7' : '0')); - m &= 0x0F; - d[1] = (char)(m + (m > 9 ? '7' : '0')); - if (soap_send_raw(soap, d, 2)) - return soap->error; - } - return SOAP_OK; -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -unsigned char* -SOAP_FMAC2 -soap_gethex(struct soap *soap, int *n) -{ -#ifdef WITH_FAST - soap->labidx = 0; - for (;;) - { register char *s; - register int i, k; - if (soap_append_lab(soap, NULL, 0)) - return NULL; - s = soap->labbuf + soap->labidx; - k = soap->lablen - soap->labidx; - soap->labidx = soap->lablen; - for (i = 0; i < k; i++) - { register char d1, d2; - register wchar c; - c = soap_get(soap); - if (soap_isxdigit(c)) - { d1 = (char)c; - c = soap_get(soap); - if (soap_isxdigit(c)) - d2 = (char)c; - else - { soap->error = SOAP_TYPE; - return NULL; - } - } - else - { unsigned char *p; - soap_unget(soap, c); - if (n) - *n = (int)(soap->lablen - k + i); - p = (unsigned char*)soap_malloc(soap, soap->lablen - k + i); - if (p) - memcpy(p, soap->labbuf, soap->lablen - k + i); - return p; - } - *s++ = ((d1 >= 'A' ? (d1 & 0x7) + 9 : d1 - '0') << 4) + (d2 >= 'A' ? (d2 & 0x7) + 9 : d2 - '0'); - } - } -#else - if (soap_new_block(soap)) - return NULL; - for (;;) - { register int i; - register char *s = (char*)soap_push_block(soap, SOAP_BLKLEN); - if (!s) - { soap_end_block(soap); - return NULL; - } - for (i = 0; i < SOAP_BLKLEN; i++) - { register char d1, d2; - register wchar c = soap_get(soap); - if (soap_isxdigit(c)) - { d1 = (char)c; - c = soap_get(soap); - if (soap_isxdigit(c)) - d2 = (char)c; - else - { soap_end_block(soap); - soap->error = SOAP_TYPE; - return NULL; - } - } - else - { unsigned char *p; - soap_unget(soap, c); - if (n) - *n = soap_size_block(soap, i); - p = (unsigned char*)soap_save_block(soap, NULL); - return p; - } - *s++ = ((d1 >= 'A' ? (d1 & 0x7) + 9 : d1 - '0') << 4) + (d2 >= 'A' ? (d2 & 0x7) + 9 : d2 - '0'); - } - } -#endif -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_putbase64(struct soap *soap, const unsigned char *s, int n) -{ register int i; - register unsigned long m; - char d[4]; -#ifdef WITH_DOM - if ((soap->mode & SOAP_XML_DOM) && soap->dom) - { soap->dom->data = (char*)soap_malloc(soap, (n + 2) / 3 * 4 + 1); - return soap_s2base64(soap, s, soap->dom->data, n); - } -#endif - if (!s) - return SOAP_OK; - for (; n > 2; n -= 3, s += 3) - { m = ((unsigned long)((unsigned char*)s)[0] << 16) | ((unsigned long)((unsigned char*)s)[1] << 8) | (unsigned long)((unsigned char*)s)[2]; - for (i = 4; i > 0; m >>= 6) - d[--i] = soap_base64o[m & 0x3F]; - if (soap_send_raw(soap, d, 4)) - return soap->error; - } - if (n > 0) - { m = 0; - for (i = 0; i < n; i++) - m = (m << 8) | *s++; - for (; i < 3; i++) - m <<= 8; - for (i++; i > 0; m >>= 6) - d[--i] = soap_base64o[m & 0x3F]; - for (i = 3; i > n; i--) - d[i] = '='; - if (soap_send_raw(soap, d, 4)) - return soap->error; - } - return SOAP_OK; -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -unsigned char* -SOAP_FMAC2 -soap_getbase64(struct soap *soap, int *n, int malloc_flag) -{ -#ifdef WITH_FAST - soap->labidx = 0; - for (;;) - { register int i, k; - register char *s; - if (soap_append_lab(soap, NULL, 2)) - return NULL; - s = soap->labbuf + soap->labidx; - k = 3 * ((soap->lablen - soap->labidx) / 3); - soap->labidx = 3 * (soap->lablen / 3); - if (!s) - return NULL; - for (i = 0; i < k; i += 3) - { register unsigned long m = 0; - register int j = 0; - do - { register wchar c = soap_get(soap); - if (c == '=' || c < 0) - { unsigned char *p; - switch (j) - { case 2: - *s++ = (char)((m >> 4) & 0xFF); - i++; - break; - case 3: - *s++ = (char)((m >> 10) & 0xFF); - *s++ = (char)((m >> 2) & 0xFF); - i += 2; - } - if (n) - *n = (int)(soap->lablen - k + i); - p = (unsigned char*)soap_malloc(soap, soap->lablen - k + i); - if (p) - memcpy(p, soap->labbuf, soap->lablen - k + i); - if (c >= 0) - { while ((int)((c = soap_get(soap)) != EOF) && c != LT && c != TT) - ; - } - soap_unget(soap, c); - return p; - } - c -= '+'; - if (c >= 0 && c <= 79) - { m = (m << 6) + soap_base64i[c]; - j++; - } - } while (j < 4); - *s++ = (char)((m >> 16) & 0xFF); - *s++ = (char)((m >> 8) & 0xFF); - *s++ = (char)(m & 0xFF); - } - } -#else - if (soap_new_block(soap)) - return NULL; - for (;;) - { register int i; - register char *s = (char*)soap_push_block(soap, 3 * SOAP_BLKLEN); /* must be multiple of 3 */ - if (!s) - { soap_end_block(soap); - return NULL; - } - for (i = 0; i < SOAP_BLKLEN; i++) - { register unsigned long m = 0; - register int j = 0; - do - { register wchar c = soap_get(soap); - if (c == '=' || c < 0) - { unsigned char *p; - i *= 3; - switch (j) - { case 2: - *s++ = (char)((m >> 4) & 0xFF); - i++; - break; - case 3: - *s++ = (char)((m >> 10) & 0xFF); - *s++ = (char)((m >> 2) & 0xFF); - i += 2; - } - if (n) - *n = (int)soap_size_block(soap, i); - p = (unsigned char*)soap_save_block(soap, NULL); - if (c >= 0) - { while ((int)((c = soap_get(soap)) != EOF) && c != LT && c != TT) - ; - } - soap_unget(soap, c); - return p; - } - c -= '+'; - if (c >= 0 && c <= 79) - { m = (m << 6) + soap_base64i[c]; - j++; - } - } while (j < 4); - *s++ = (char)((m >> 16) & 0xFF); - *s++ = (char)((m >> 8) & 0xFF); - *s++ = (char)(m & 0xFF); - } - } -#endif -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -char * -SOAP_FMAC2 -soap_strdup(struct soap *soap, const char *s) -{ char *t = NULL; - if (s && (t = (char*)soap_malloc(soap, strlen(s) + 1))) - strcpy(t, s); - return t; -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_new_block(struct soap *soap) -{ struct soap_blist *p; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "New block sequence (prev=%p)\n", soap->blist)); - if (!(p = (struct soap_blist*)SOAP_MALLOC(sizeof(struct soap_blist)))) - return SOAP_EOM; - p->next = soap->blist; - p->ptr = NULL; - p->size = 0; - soap->blist = p; - return SOAP_OK; -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -void* -SOAP_FMAC2 -soap_push_block(struct soap *soap, size_t n) -{ char *p; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Push block of %u bytes (%u bytes total)\n", (unsigned int)n, (unsigned int)soap->blist->size)); - if (!(p = (char*)SOAP_MALLOC(n + sizeof(char*) + sizeof(size_t)))) - { soap->error = SOAP_EOM; - return NULL; - } - *(char**)p = soap->blist->ptr; - *(size_t*)(p + sizeof(char*)) = n; - soap->blist->ptr = p; - soap->blist->size += n; - return p + sizeof(char*) + sizeof(size_t); -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_pop_block(struct soap *soap) -{ char *p; - if (!soap->blist->ptr) - return; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Pop block\n")); - p = soap->blist->ptr; - soap->blist->size -= *(size_t*)(p + sizeof(char*)); - soap->blist->ptr = *(char**)p; - SOAP_FREE(p); -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -static void -soap_update_ptrs(struct soap *soap, char *start, char *end, long offset) -{ int i; - register struct soap_ilist *ip; - register void *p, **q; - for (i = 0; i < SOAP_IDHASH; i++) - for (ip = soap->iht[i]; ip; ip = ip->next) - { if (ip->ptr && (char*)ip->ptr >= start && (char*)ip->ptr < end) - ip->ptr = (char*)ip->ptr + offset; - for (q = &ip->link; q; q = (void**)p) - { p = *q; - if (p && (char*)p >= start && (char*)p < end) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Link update id='%s' %p\n", ip->id, p)); - *q = (char*)p + offset; - } - } - for (q = &ip->copy; q; q = (void**)p) - { p = *q; - if (p && (char*)p >= start && (char*)p < end) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copy update id='%s' %p\n", ip->id, p)); - *q = (char*)p + offset; - } - } - } -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -static int -soap_has_copies(struct soap *soap, register char *start, register char *end) -{ int i; - register struct soap_ilist *ip; - register char *p; - for (i = 0; i < SOAP_IDHASH; i++) - for (ip = soap->iht[i]; ip; ip = ip->next) - for (p = (char*)ip->copy; p; p = *(char**)p) - if (p >= start && p < end) - return SOAP_ERR; - return SOAP_OK; -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_resolve(struct soap *soap) -{ register int i; - register struct soap_ilist *ip; - short flag1 = 0, flag2; - for (i = 0; i < SOAP_IDHASH; i++) - for (ip = soap->iht[i]; ip; ip = ip->next) - { if (ip->ptr) - soap_resolve_ptr(ip); - else if (*ip->id == '#') - flag1 = 1; - } - do - { flag2 = 0; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Resolving forwarded data\n")); - for (i = 0; i < SOAP_IDHASH; i++) - for (ip = soap->iht[i]; ip; ip = ip->next) - if (ip->copy && ip->ptr && ip->size) - if (!soap_has_copies(soap, (char*)ip->ptr, (char*)ip->ptr + ip->size)) - { register void *p, **q = (void**)ip->copy; - DBGLOG(TEST, if (q) SOAP_MESSAGE(fdebug, "Traversing copy chain to resolve id='%s'\n", ip->id)); - ip->copy = NULL; - do - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "... copy %p -> %p (%u bytes)\n", ip->ptr, q, (unsigned int)ip->size)); - p = *q; - memcpy(q, ip->ptr, ip->size); - q = (void**)p; - } while (q); - flag2 = 1; - } - } while (flag2); - for (i = 0; i < SOAP_IDHASH; i++) - for (ip = soap->iht[i]; ip; ip = ip->next) - { register struct soap_flist *fp; - for (fp = ip->flist; fp; fp = fp->next) - if (fp->finsert) - { unsigned int k = fp->level; - void *p = ip->ptr; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Resolving forwarded container data type=%d location=%p level=%u,%u\n", fp->type, fp->ptr, ip->level, fp->level)); - while (ip->level < k) - { void **q = (void**)soap_malloc(soap, sizeof(void*)); - if (!q) - return SOAP_EOM; - *q = p; - p = (void*)q; - k--; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Descending one level...\n")); - } - fp->finsert(soap, fp->type, fp->ptr, p); - } - } - if (flag1) - return soap->error = SOAP_MISSING_ID; - return SOAP_OK; -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_resolve_ptr(struct soap_ilist *ip) -{ register void *p, **q, *r; - q = (void**)ip->link; - ip->link = NULL; - r = ip->ptr; - while (q) - { p = *q; - *q = r; - q = (void**)p; - } -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -size_t -SOAP_FMAC2 -soap_size_block(struct soap *soap, size_t n) -{ if (soap->blist->ptr) - { soap->blist->size -= *(size_t*)(soap->blist->ptr + sizeof(char*)) - n; - *(size_t*)(soap->blist->ptr + sizeof(char*)) = n; - } - return soap->blist->size; -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -char* -SOAP_FMAC2 -soap_first_block(struct soap *soap) -{ char *p, *q, *r; - p = soap->blist->ptr; - if (!p) - return NULL; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "First block\n")); - r = NULL; - do - { q = *(char**)p; - *(char**)p = r; - r = p; - p = q; - } while (p); - soap->blist->ptr = r; - return r + sizeof(char*) + sizeof(size_t); -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -char* -SOAP_FMAC2 -soap_next_block(struct soap *soap) -{ char *p; - p = soap->blist->ptr; - if (p) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Next block\n")); - soap->blist->ptr = *(char**)p; - SOAP_FREE(p); - if (soap->blist->ptr) - return soap->blist->ptr + sizeof(char*) + sizeof(size_t); - } - return NULL; -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -size_t -SOAP_FMAC2 -soap_block_size(struct soap *soap) -{ return *(size_t*)(soap->blist->ptr + sizeof(char*)); -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_end_block(struct soap *soap) -{ struct soap_blist *bp; - char *p, *q; - bp = soap->blist; - if (bp) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "End of block sequence, free all remaining blocks\n")); - for (p = bp->ptr; p; p = q) - { q = *(char**)p; - SOAP_FREE(p); - } - soap->blist = bp->next; - SOAP_FREE(bp); - } - DBGLOG(TEST, if (soap->blist) SOAP_MESSAGE(fdebug, "Restore previous block sequence\n")); -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -char* -SOAP_FMAC2 -soap_save_block(struct soap *soap, char *p) -{ register size_t n; - register char *q, *s; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Save all blocks in contiguous memory space of %u bytes (%p->%p)\n", (unsigned int)soap->blist->size, soap->blist->ptr, p)); - if (soap->blist->size) - { if (!p) - p = (char*)soap_malloc(soap, soap->blist->size); - if (p) - for (s = p, q = soap_first_block(soap); q; q = soap_next_block(soap)) - { n = soap_block_size(soap); - soap_update_ptrs(soap, q, q + n, (long)s - (long)q); /* pointers s and q may or may not be related */ - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copy %u bytes from %p to %p\n", (unsigned int)n, q, s)); - memcpy(s, q, n); - s += n; - } - else - soap->error = SOAP_EOM; - } - soap_end_block(soap); - return p; -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -char* -SOAP_FMAC2 -soap_store_block(struct soap *soap, char *p) -{ p = soap_save_block(soap, p); - if (!soap->blist) - { struct soap_ilist *ip; - int i; - for (i = 0; i < SOAP_IDHASH; i++) - for (ip = soap->iht[i]; ip; ip = ip->next) - if (ip->ptr) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Resolve link chain to point to %p\n", ip->ptr)); - soap_resolve_ptr(ip); - } - } - return p; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -char * -SOAP_FMAC2 -soap_putsize(struct soap *soap, const char *type, int size) -{ return soap_putsizes(soap, type, &size, 1); -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -char * -SOAP_FMAC2 -soap_putsizes(struct soap *soap, const char *type, const int *size, int dim) -{ return soap_putsizesoffsets(soap, type, size, NULL, dim); -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -char * -SOAP_FMAC2 -soap_putsizesoffsets(struct soap *soap, const char *type, const int *size, const int *offset, int dim) -{ int i; - if (!type) - return NULL; - if (soap->version == 2) - { sprintf(soap->type, "%s[%d", type, size[0]); - for (i = 1; i < dim; i++) - sprintf(soap->type + strlen(soap->type), " %d", size[i]); - } - else - { if (offset) - { sprintf(soap->type, "%s[%d", type, size[0] + offset[0]); - for (i = 1; i < dim; i++) - sprintf(soap->type + strlen(soap->type), ",%d", size[i] + offset[i]); - } - else - { sprintf(soap->type, "%s[%d", type, size[0]); - for (i = 1; i < dim; i++) - sprintf(soap->type + strlen(soap->type), ",%d", size[i]); - } - strcat(soap->type, "]"); - } - return soap->type; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -char * -SOAP_FMAC2 -soap_putoffset(struct soap *soap, int offset) -{ return soap_putoffsets(soap, &offset, 1); -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -char * -SOAP_FMAC2 -soap_putoffsets(struct soap *soap, const int *offset, int dim) -{ register int i; - sprintf(soap->arrayOffset, "[%d", offset[0]); - for (i = 1; i < dim; i++) - sprintf(soap->arrayOffset + strlen(soap->arrayOffset), ",%d", offset[i]); - strcat(soap->arrayOffset, "]"); - return soap->arrayOffset; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_size(const int *size, int dim) -{ register int i, n = size[0]; - for (i = 1; i < dim; i++) - n *= size[i]; - return n; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_getoffsets(const char *attr, const int *size, int *offset, int dim) -{ register int i, j = 0; - if (offset) - for (i = 0; i < dim && attr && *attr; i++) - { attr++; - j *= size[i]; - j += offset[i] = (int)atol(attr); - attr = strchr(attr, ','); - } - else - for (i = 0; i < dim && attr && *attr; i++) - { attr++; - j *= size[i]; - j += (int)atol(attr); - attr = strchr(attr, ','); - } - return j; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_getsize(const char *attr1, const char *attr2, int *j) -{ register int n, k; - char *s; - *j = 0; - if (!*attr1) - return -1; - n = 1; - do - { attr1++; - k = (int)soap_strtol(attr1, &s, 10); - n *= k; - if (k < 0 || n > SOAP_MAXARRAYSIZE || s == attr1) - return -1; - attr1 = strchr(s, ','); - if (!attr1) - attr1 = strchr(s, ' '); - if (attr2 && *attr2) - { attr2++; - *j *= k; - k = (int)soap_strtol(attr2, &s, 10); - *j += k; - if (k < 0) - return -1; - attr2 = s; - } - } while (attr1 && *attr1 != ']'); - return n - *j; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_getsizes(const char *attr, int *size, int dim) -{ register int i, k, n; - if (!*attr) - return -1; - i = strlen(attr); - n = 1; - do - { for (i = i-1; i >= 0; i--) - if (attr[i] == '[' || attr[i] == ',' || attr[i] == ' ') - break; - k = (int)atol(attr + i + 1); - n *= size[--dim] = k; - if (k < 0 || n > SOAP_MAXARRAYSIZE) - return -1; - } while (i >= 0 && attr[i] != '['); - return n; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_getposition(const char *attr, int *pos) -{ register int i, n; - if (!*attr) - return -1; - n = 0; - i = 1; - do - { pos[n++] = (int)atol(attr + i); - while (attr[i] && attr[i] != ',' && attr[i] != ']') - i++; - if (attr[i] == ',') - i++; - } while (n < SOAP_MAXDIMS && attr[i] && attr[i] != ']'); - return n; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_push_namespace(struct soap *soap, const char *id, const char *ns) -{ register struct soap_nlist *np; - register struct Namespace *p; - np = (struct soap_nlist*)SOAP_MALLOC(sizeof(struct soap_nlist) + strlen(id)); - if (!np) - return soap->error = SOAP_EOM; - np->next = soap->nlist; - soap->nlist = np; - strcpy(np->id, id); - np->level = soap->level; - np->index = -1; - np->ns = NULL; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Push namespace binding (level=%u) '%s' '%s'\n", soap->level, id, ns)); - p = soap->local_namespaces; - if (p) - { register short i = 0; - if (!strcmp(ns, soap_env1)) - soap->version = 1; /* make sure we use SOAP 1.1 */ - else if (!strcmp(ns, soap_env2)) - soap->version = 2; /* make sure we use SOAP 1.2 */ - else - { for (; p->id; p++, i++) - { if (p->ns) - if (!strcmp(ns, p->ns)) - break; - if (p->in) - if (!soap_tag_cmp(ns, p->in)) - { if (p->out) - SOAP_FREE(p->out); - if ((p->out = (char*)SOAP_MALLOC(strlen(ns) + 1))) - strcpy(p->out, ns); - break; - } - } - } - if (i == 0 && (!p->ns || strcmp(ns, p->ns))) - { if (p[0].out) - SOAP_FREE(p[0].out); - if ((p[0].out = (char*)SOAP_MALLOC(strlen(ns) + 1))) - strcpy(p[0].out, ns); - if (p[1].out) - SOAP_FREE(p[1].out); - if (soap->version == 1) - { if ((p[1].out = (char*)SOAP_MALLOC(sizeof(soap_enc1)))) - strcpy(p[1].out, soap_enc1); - } - else if ((p[1].out = (char*)SOAP_MALLOC(sizeof(soap_enc2)))) - strcpy(p[1].out, soap_enc2); - } - if (p && p->id) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Push OK ('%s' matches '%s' in namespace table)\n", id, p->id)); - np->index = i; - } - } - if (!p || !p->id) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Push NOT OK: no match found for '%s' in namespace mapping table (added to stack anyway)\n", ns)); - np->ns = (char*)SOAP_MALLOC(strlen(ns) + 1); - if (!np->ns) - return soap->error = SOAP_EOM; - strcpy(np->ns, ns); - } - return SOAP_OK; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_push_default_namespace(struct soap *soap, const char *id, int n) -{ register struct soap_nlist *np = soap->nlist; - while (np && np->index >= -1) - np = np->next; - if (np && (!strncmp(np->id, id, n) && !np->id[n])) - return SOAP_OK; - np = (struct soap_nlist*)SOAP_MALLOC(sizeof(struct soap_nlist) + n); - if (!np) - return soap->error = SOAP_EOM; - np->next = soap->nlist; - soap->nlist = np; - strncpy(np->id, id, n); - np->id[n] = '\0'; - np->level = soap->level; - np->index = -2; - np->ns = NULL; - return SOAP_OK; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_pop_namespace(struct soap *soap) -{ register struct soap_nlist *np; - while (soap->nlist && soap->nlist->level >= soap->level) - { np = soap->nlist->next; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Popped namespace binding (level=%u) '%s'\n", soap->level, soap->nlist->id)); - if (soap->nlist->ns) - SOAP_FREE(soap->nlist->ns); - SOAP_FREE(soap->nlist); - soap->nlist = np; - } -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_match_namespace(struct soap *soap, const char *id1, const char *id2, int n1, int n2) -{ register struct soap_nlist *np = soap->nlist; - while (np && (np->index == -2 || (strncmp(np->id, id1, n1) || np->id[n1]))) - np = np->next; - if (np) - { if (np->index < 0 || (np->index >= 0 && soap->local_namespaces[np->index].id && (strncmp(soap->local_namespaces[np->index].id, id2, n2) || soap->local_namespaces[np->index].id[n2]))) - return SOAP_NAMESPACE; - return SOAP_OK; - } - if (n1 == 3 && n1 == n2 && !strcmp(id1, "xml") && !strcmp(id1, id2)) - return SOAP_OK; - return SOAP_SYNTAX_ERROR; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -const char* -SOAP_FMAC2 -soap_default_namespace(struct soap *soap) -{ register struct soap_nlist *np = soap->nlist; - while (np && np->index >= -1) - np = np->next; - if (np) - return np->id; - return NULL; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_tag_cmp(register const char *s, register const char *t) -{ for (; *s && *s != '"'; s++, t++) - if (tolower(*s) != tolower(*t)) - if (*t != '-') - { if (*t != '*') - return 1; - if (*++t) - { register int c = tolower(*t); - for (; *s && *s != '"'; s++) - { if (tolower(*s) == c) - if (!soap_tag_cmp(s + 1, t + 1)) - return 0; - } - break; - } - else - return 0; - } - if (*t == '*' && !t[1]) - return 0; - return *t; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_match_tag(struct soap *soap, const char *tag1, const char *tag2) -{ register const char *s, *t; - if (!tag1 || !tag2 || !*tag2) - return SOAP_OK; - s = strchr(tag1, ':'); - t = strchr(tag2, ':'); - if (t) - { if (s) - { if (SOAP_STRCMP(s + 1, t + 1)) - return SOAP_TAG_MISMATCH; - if (t != tag2 && soap_match_namespace(soap, tag1, tag2, s - tag1, t - tag2)) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Tags '%s' and '%s' match but namespaces differ\n", tag1, tag2)); - return SOAP_TAG_MISMATCH; - } - } - else if (SOAP_STRCMP(tag1, t + 1)) - return SOAP_TAG_MISMATCH; - else if (t != tag2 && soap_match_namespace(soap, tag1, tag2, 0, t - tag2)) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Tags '%s' and '%s' match but namespaces differ\n", tag1, tag2)); - return SOAP_TAG_MISMATCH; - } - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Tags and (default) namespaces match: '%s' '%s'\n", tag1, tag2)); - return SOAP_OK; - } - if (s) - { if (((soap->mode & SOAP_XML_STRICT) && soap->part != SOAP_IN_HEADER && soap->encodingStyle)) - return SOAP_TAG_MISMATCH; - if (SOAP_STRCMP(s + 1, tag2)) - return SOAP_TAG_MISMATCH; - if (!soap->encodingStyle) - { t = soap_default_namespace(soap); - if (!t || soap_match_namespace(soap, tag1, t, s - tag1, strlen(t))) - return SOAP_TAG_MISMATCH; - } - } - else if (SOAP_STRCMP(tag1, tag2)) - return SOAP_TAG_MISMATCH; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Tags match: '%s' '%s'\n", tag1, tag2)); - return SOAP_OK; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_match_array(struct soap *soap, const char *type) -{ if (*soap->arrayType) - if (soap_match_tag(soap, soap->arrayType, type) - && soap_match_tag(soap, soap->arrayType, "xsd:anyType") - && soap_match_tag(soap, soap->arrayType, "xsd:ur-type") - ) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Array type mismatch: '%s' '%s'\n", soap->arrayType, type)); - return SOAP_TAG_MISMATCH; - } - return SOAP_OK; -} -#endif - -/******************************************************************************/ - -#ifdef WITH_OPENSSL -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_ssl_server_context(struct soap *soap, unsigned short flags, const char *keyfile, const char *password, const char *cafile, const char *capath, const char *dhfile, const char *randfile, const char *sid) -{ int err; - soap->keyfile = keyfile; - soap->password = password; - soap->cafile = cafile; - soap->capath = capath; - if (dhfile) - { soap->dhfile = dhfile; - soap->rsa = 0; - } - else - { soap->dhfile = NULL; - soap->rsa = 1; - } - soap->randfile = randfile; - soap->require_client_auth = (flags & SOAP_SSL_REQUIRE_CLIENT_AUTHENTICATION); - if (!(err = soap->fsslauth(soap))) - if (sid) - SSL_CTX_set_session_id_context(soap->ctx, (unsigned char*)sid, strlen(sid)); - return err; -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_ssl_client_context(struct soap *soap, unsigned short flags, const char *keyfile, const char *password, const char *cafile, const char *capath, const char *randfile) -{ soap->keyfile = keyfile; - soap->password = password; - soap->cafile = cafile; - soap->capath = capath; - soap->dhfile = NULL; - soap->rsa = 0; - soap->randfile = randfile; - soap->require_server_auth = (flags & SOAP_SSL_REQUIRE_SERVER_AUTHENTICATION); - return soap->fsslauth(soap); -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -static void -ssl_init() -{ static int done = 0; - if (!done) - { done = 1; - SSL_library_init(); -#ifndef WITH_LEAN - SSL_load_error_strings(); -#endif - } -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -static const char * -ssl_error(struct soap *soap, int ret) -{ int err = SSL_get_error(soap->ssl, ret); - const char *msg = soap_str_code(h_ssl_error_codes, err); - if (msg) - strcpy(soap->msgbuf, msg); - else - return ERR_error_string(err, soap->msgbuf); - if (ERR_peek_error()) - { unsigned long r; - strcat(soap->msgbuf, "\n"); - while ((r = ERR_get_error())) - ERR_error_string_n(r, soap->msgbuf + strlen(soap->msgbuf), sizeof(soap->msgbuf) - strlen(soap->msgbuf)); - } - else - { switch (ret) - { case 0: - strcpy(soap->msgbuf, "EOF was observed that violates the protocol. The client probably provided invalid authentication information."); - break; - case -1: - sprintf(soap->msgbuf, "Error observed by underlying BIO: %s", strerror(errno)); - break; - } - } - return soap->msgbuf; -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -static int -ssl_password(char *buf, int num, int rwflag, void *userdata) -{ if (num < (int)strlen((char*)userdata) + 1) - return 0; - return strlen(strcpy(buf, (char*)userdata)); -} -#endif - -/******************************************************************************/ -/* This callback is included for future references. It should not be deleted -#ifndef PALM_1 -static DH * -ssl_tmp_dh(SSL *ssl, int is_export, int keylength) -{ static DH *dh512 = NULL; - static DH *dh1024 = NULL; - DH *dh; - switch (keylength) - { case 512: - if (!dh512) - { BIO *bio = BIO_new_file("dh512.pem", "r"); - if (bio) - { dh512 = PEM_read_bio_DHparams(bio, NULL, NULL, NULL); - BIO_free(bio); - return dh512; - } - } - else - return dh512; - default: - if (!dh1024) - { BIO *bio = BIO_new_file("dh1024.pem", "r"); - if (bio) - { dh1024 = PEM_read_bio_DHparams(bio, NULL, NULL, NULL); - BIO_free(bio); - } - } - dh = dh1024; - } - return dh; -} -#endif -*/ -/******************************************************************************/ -#ifndef PALM_1 -static int -ssl_auth_init(struct soap *soap) -{ ssl_init(); - if (!soap->ctx) - if (!(soap->ctx = SSL_CTX_new(SSLv23_method()))) - return soap_set_receiver_error(soap, "SSL error", "Can't setup context", SOAP_SSL_ERROR); - if (soap->randfile) - { if (!RAND_load_file(soap->randfile, -1)) - return soap_set_receiver_error(soap, "SSL error", "Can't load randomness", SOAP_SSL_ERROR); - } - else if (!RAND_load_file("/dev/urandom", 1024)) - { int r; -#ifdef HAVE_RAND_R - unsigned int s = (unsigned int)time(NULL); -#endif - RAND_seed(soap->buf, sizeof(soap->buf)); - while (!RAND_status()) - { -#ifdef HAVE_RAND_R - r = rand_r(&s); -#else - r = rand(); -#endif - RAND_seed(&r, sizeof(int)); - } - } - if (soap->cafile || soap->capath) - if (!SSL_CTX_load_verify_locations(soap->ctx, soap->cafile, soap->capath)) - return soap_set_receiver_error(soap, "SSL error", "Can't read CA file and/or directory", SOAP_SSL_ERROR); - if (!SSL_CTX_set_default_verify_paths(soap->ctx)) - return soap_set_receiver_error(soap, "SSL error", "Can't read default CA file and/or directory", SOAP_SSL_ERROR); - if (soap->keyfile) - { if (!SSL_CTX_use_certificate_chain_file(soap->ctx, soap->keyfile)) - return soap_set_receiver_error(soap, "SSL error", "Can't read certificate key file", SOAP_SSL_ERROR); - if (soap->password) - { SSL_CTX_set_default_passwd_cb_userdata(soap->ctx, (void*)soap->password); - SSL_CTX_set_default_passwd_cb(soap->ctx, ssl_password); - if (!SSL_CTX_use_PrivateKey_file(soap->ctx, soap->keyfile, SSL_FILETYPE_PEM)) - return soap_set_receiver_error(soap, "SSL error", "Can't read key file", SOAP_SSL_ERROR); - } - } - if (soap->rsa) - { RSA *rsa = RSA_generate_key(512, RSA_F4, NULL, NULL); - if (!SSL_CTX_set_tmp_rsa(soap->ctx, rsa)) - { if (rsa) - RSA_free(rsa); - return soap_set_receiver_error(soap, "SSL error", "Can't set RSA key", SOAP_SSL_ERROR); - } - RSA_free(rsa); - } - else if (soap->dhfile) - { DH *dh = 0; - BIO *bio; - bio = BIO_new_file(soap->dhfile, "r"); - if (!bio) - return soap_set_receiver_error(soap, "SSL error", "Can't read DH file", SOAP_SSL_ERROR); - dh = PEM_read_bio_DHparams(bio, NULL, NULL, NULL); - BIO_free(bio); - if (SSL_CTX_set_tmp_dh(soap->ctx, dh) < 0) - { if (dh) - DH_free(dh); - return soap_set_receiver_error(soap, "SSL error", "Can't set DH parameters", SOAP_SSL_ERROR); - } - DH_free(dh); - } - SSL_CTX_set_options(soap->ctx, SSL_OP_ALL | SSL_OP_NO_SSLv2); - SSL_CTX_set_verify(soap->ctx, soap->require_client_auth ? (SSL_VERIFY_PEER | SSL_VERIFY_FAIL_IF_NO_PEER_CERT) : soap->require_server_auth ? SSL_VERIFY_PEER : SSL_VERIFY_NONE, soap->fsslverify); -#if (OPENSSL_VERSION_NUMBER < 0x00905100L) - SSL_CTX_set_verify_depth(soap->ctx, 1); -#endif - return SOAP_OK; -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -static int -ssl_verify_callback(int ok, X509_STORE_CTX *store) -{ -#ifdef SOAP_DEBUG - if (!ok) - { char data[256]; - X509 *cert = X509_STORE_CTX_get_current_cert(store); - fprintf(stderr, "SSL Verify error with certificate at depth %d: %s\n", X509_STORE_CTX_get_error_depth(store), X509_verify_cert_error_string(X509_STORE_CTX_get_error(store))); - X509_NAME_oneline(X509_get_issuer_name(cert), data, sizeof(data)); - fprintf(stderr, "certificate issuer %s\n", data); - X509_NAME_oneline(X509_get_subject_name(cert), data, sizeof(data)); - fprintf(stderr, "certificate subject %s\n", data); - } -#endif - return ok; -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_ssl_accept(struct soap *soap) -{ int i, r; - if (!soap_valid_socket(soap->socket)) - return soap_set_receiver_error(soap, "SSL error", "No socket in soap_ssl_accept()", SOAP_SSL_ERROR); - if (!soap->ssl) - { soap->ssl = SSL_new(soap->ctx); - if (!soap->ssl) - return soap_set_receiver_error(soap, "SSL error", "SSL_new() failed in soap_ssl_accept()", SOAP_SSL_ERROR); - } - else - SSL_clear(soap->ssl); - soap->imode |= SOAP_ENC_SSL; - soap->omode |= SOAP_ENC_SSL; -#ifdef WIN32 - u_long nonblocking = 1; - ioctlsocket((SOAP_SOCKET)soap->socket, FIONBIO, &nonblocking); -#else - fcntl((SOAP_SOCKET)soap->socket, F_SETFL, fcntl((SOAP_SOCKET)soap->socket, F_GETFL)|O_NONBLOCK); -#endif - soap->bio = BIO_new_socket((SOAP_SOCKET)soap->socket, BIO_NOCLOSE); - SSL_set_bio(soap->ssl, soap->bio, soap->bio); - i = 100; - while ((r = SSL_accept(soap->ssl)) <= 0) - { int err = SSL_get_error(soap->ssl, r); - if (err == SSL_ERROR_WANT_READ || err == SSL_ERROR_WANT_WRITE) - { struct timeval timeout; - fd_set fd; - if (i-- <= 0) - break; - timeout.tv_sec = 0; - timeout.tv_usec = 100000; - FD_ZERO(&fd); - FD_SET((SOAP_SOCKET)soap->socket, &fd); - r = select((SOAP_SOCKET)(soap->socket + 1), &fd, NULL, &fd, &timeout); - if (r < 0 && soap_socket_errno != SOAP_EINTR) - { soap->errnum = soap_socket_errno; - return SOAP_EOF; - } - } - else - { soap->errnum = err; - break; - } - } -#ifdef WIN32 - { u_long blocking = 0; - ioctlsocket((SOAP_SOCKET)soap->socket, FIONBIO, &blocking); - } -#else - fcntl((SOAP_SOCKET)soap->socket, F_SETFL, fcntl((SOAP_SOCKET)soap->socket, F_GETFL)&~O_NONBLOCK); -#endif - if (r <= 0) - { soap_set_receiver_error(soap, ssl_error(soap, r), "SSL_accept() failed in soap_ssl_accept()", SOAP_SSL_ERROR); - soap_closesock(soap); - return SOAP_SSL_ERROR; - } - return SOAP_OK; -} -#endif - -/******************************************************************************/ -#endif /* WITH_OPENSSL */ - -/******************************************************************************/ -#ifndef PALM_1 -static int -tcp_init(struct soap *soap) -{ soap->errmode = 1; -#ifdef WIN32 - if (tcp_done) - return 0; - else - { WSADATA w; - if (WSAStartup(MAKEWORD(1, 1), &w)) - return -1; - tcp_done = 1; - } -#endif -#ifdef PALM - errno = 0; - h_errno = 0; - AppNetRefnum = 0; - NetUInit(); - AppNetTimeout = 10000; - NetLibOpen(AppNetRefnum, &h_errno); -#endif - return 0; -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_done(struct soap *soap) -{ -#ifndef WITH_LEAN - int i; -#endif - soap_free(soap); - while (soap->clist) - { struct soap_clist *p = soap->clist->next; - SOAP_FREE(soap->clist); - soap->clist = p; - } - soap->keep_alive = 0; /* to force close the socket */ - soap_closesock(soap); -#ifdef WITH_COOKIES - soap_free_cookies(soap); -#endif - while (soap->plugins) - { register struct soap_plugin *p = soap->plugins->next; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Removing plugin '%s'\n", soap->plugins->id)); - if (soap->plugins->fcopy || !soap->copy) - soap->plugins->fdelete(soap, soap->plugins); - SOAP_FREE(soap->plugins); - soap->plugins = p; - } - soap->fplugin = fplugin; - soap->fpost = http_post; - soap->fget = http_get; - soap->fposthdr = http_post_header; - soap->fresponse = http_response; - soap->fparse = http_parse; - soap->fparsehdr = http_parse_header; -#ifndef MAC_CARBON - soap->faccept = tcp_accept; - soap->fopen = tcp_connect; - soap->fclose = tcp_disconnect; - soap->fsend = fsend; - soap->frecv = frecv; -#endif - soap->fprepare = NULL; - soap->fignore = NULL; -#ifdef WITH_OPENSSL - if (soap->session) - { SSL_SESSION_free(soap->session); - soap->session = NULL; - } -#endif - if (!soap->copy) - { if (soap_valid_socket(soap->master)) - { closesocket((SOAP_SOCKET)soap->master); - soap->master = SOAP_INVALID_SOCKET; - } -#ifdef WITH_OPENSSL - if (soap->ctx) - { SSL_CTX_free(soap->ctx); - soap->ctx = NULL; - } -#endif - } -#ifndef WITH_LEAN - for (i = 0; i < SOAP_MAXLOGS; i++) - { soap_close_logfile(soap, i); - if (soap->logfile[i]) - { SOAP_FREE((void*)soap->logfile[i]); - soap->logfile[i] = NULL; - } - } -#endif -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_cleanup(struct soap *soap) -{ soap_done(soap); -#ifdef WIN32 - if (!tcp_done) - return; - tcp_done = 0; - WSACleanup(); -#endif -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -static const char* -tcp_error(struct soap *soap) -{ register const char *msg = NULL; - switch (soap->errmode) - { case 0: - msg = soap_strerror(soap); - break; - case 1: - msg = "WSAStartup failed"; - break; - case 2: - { -#ifndef WITH_LEAN - msg = soap_str_code(h_error_codes, soap->errnum); - if (!msg) -#endif - { sprintf(soap->msgbuf, "TCP error %d", soap->errnum); - msg = soap->msgbuf; - } - } - } - return msg; -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -static const char* -http_error(struct soap *soap, int status) -{ register const char *msg = NULL; -#ifndef WITH_LEAN - msg = soap_str_code(h_http_error_codes, status); - if (!msg) -#endif - { sprintf(soap->msgbuf, "HTTP error %d", status); - msg = soap->msgbuf; - } - return msg; -} -#endif - -/******************************************************************************/ -/* WR[ */ -#ifndef WITH_IPV6 -/* ]WR */ -#ifndef MAC_CARBON -#ifndef PALM_1 -static int -soap_gethost(struct soap *soap, const char *addr, struct in_addr *inaddr) -{ unsigned long iadd; - struct hostent hostent, *host = &hostent; -/* WR[ */ -#ifdef VXWORKS - int hostint; - char * addrcopy = (char*)malloc(strlen(addr) + 1); /*copy of addr. */ - /* inet_addr(), and hostGetByName() expect "char *"; addr is a "const char *". */ - strncpy(addrcopy, addr, strlen(addr)+1); - iadd = inet_addr(addrcopy); -#else -/* ]WR */ -#if defined(_AIXVERSION_431) || defined(TRU64) - struct hostent_data ht_data; -#endif - iadd = inet_addr(addr); -/* WR[ */ -#endif -/* ]WR */ - if ((int)iadd != -1) - { memcpy(inaddr, &iadd, sizeof(iadd)); -/* WR[ */ -#ifdef VXWORKS - free(addrcopy); -#endif -/* ]WR */ - return 0; - } -#if defined(__GLIBC__) - if (gethostbyname_r(addr, &hostent, soap->buf, SOAP_BUFLEN, &host, &soap->errnum) < 0) - host = NULL; -#elif defined(_AIXVERSION_431) || defined(TRU64) - memset(&ht_data, 0, sizeof(ht_data)); - if (gethostbyname_r(addr, &hostent, &ht_data) < 0) - { host = NULL; - soap->errnum = h_errno; - } -#elif defined(HAVE_GETHOSTBYNAME_R) - host = gethostbyname_r(addr, &hostent, soap->buf, SOAP_BUFLEN, &soap->errnum); -/* WR[ */ -#elif defined(VXWORKS) - /* If the DNS resolver library resolvLib has been configured in the vxWorks - * image, a query for the host IP address is sent to the DNS server, if the - * name was not found in the local host table. */ - hostint = hostGetByName(addrcopy); - if (hostint == ERROR) - { - host = NULL; - soap->errnum = soap_errno; - } - free(addrcopy); /*free() is placed after the error checking to assure that - * errno captured is that from hostGetByName() */ -/* ]WR */ -#else - if (!(host = gethostbyname(addr))) - soap->errnum = h_errno; -#endif - if (!host) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Host name not found\n")); - return -1; - } -/* WR[ */ -#ifdef VXWORKS - inaddr->s_addr = hostint; -#else -/* ]WR */ - memcpy(inaddr, host->h_addr, host->h_length); -/* WR[ */ -#endif -/* ]WR */ - return 0; -} -#endif -#endif -/* WR[ */ -#endif /* WITH_IPV6 */ -/* ]WR */ - -/******************************************************************************/ -#ifndef MAC_CARBON -#ifndef PALM_1 -static int -tcp_connect(struct soap *soap, const char *endpoint, const char *host, int port) -{ struct sockaddr_in sockaddr; -/* WR[ */ -#ifdef WITH_IPV6 - struct addrinfo *addrinfo; - struct addrinfo hints; - struct addrinfo resaddr; - struct sockaddr_storage addrstorage; - int err; -#endif /* WITH_IPV6 */ -/* ]WR */ - register int fd; -#ifndef WITH_LEAN - int len = SOAP_BUFLEN; - int set = 1; -#endif - if (soap_valid_socket(soap->socket)) - closesocket((SOAP_SOCKET)soap->socket); - soap->socket = SOAP_INVALID_SOCKET; - if (tcp_init(soap)) - { soap_set_sender_error(soap, tcp_error(soap), "TCP initialization failed in tcp_connect()", SOAP_TCP_ERROR); - return -1; - } - soap->errmode = 0; -/* WR[ */ -#ifdef WITH_IPV6 - memset(&hints, 0, sizeof(hints)); - hints.ai_family = PF_UNSPEC; - hints.ai_socktype = SOCK_STREAM; - soap->errmode = 2; - if (soap->proxy_host) - err = getaddrinfo(soap->proxy_host, soap_int2s(soap, soap->proxy_port), &hints, &addrinfo); - else - err = getaddrinfo(host, soap_int2s(soap, port), &hints, &addrinfo); - if (addrinfo) - { resaddr = *addrinfo; - addrstorage = *((struct sockaddr_storage *) addrinfo->ai_addr); - resaddr.ai_addr = (struct sockaddr *) &addrstorage; - freeaddrinfo(addrinfo); - } - if (err) - { soap_set_sender_error(soap, gai_strerror(err), - "TCP getaddrinfo on proxy host failed in tcp_connect()", SOAP_TCP_ERROR); - return -1; - } - fd = (int)socket(resaddr.ai_family, resaddr.ai_socktype, resaddr.ai_protocol); /* modified to use fd */ - soap->errmode = 0; -#else /* WITH_IPV6 */ -/* ]WR */ - fd = (int)socket(AF_INET, SOCK_STREAM, 0); -/* WR[ */ -#endif /* WITH_IPV6 */ -/* ]WR */ - if (fd < 0) - { soap->errnum = soap_socket_errno; - soap_set_sender_error(soap, tcp_error(soap), "TCP socket failed in tcp_connect()", SOAP_TCP_ERROR); - return -1; - } -#ifndef WITH_LEAN - if (soap->connect_flags & SO_LINGER) - { struct linger linger; - memset(&linger, 0, sizeof(struct linger)); - linger.l_onoff = 1; - linger.l_linger = 0; - if (setsockopt((SOAP_SOCKET)fd, SOL_SOCKET, SO_LINGER, (char*)&linger, sizeof(struct linger))) - { soap->errnum = soap_socket_errno; - soap_set_sender_error(soap, tcp_error(soap), "TCP setsockopt SO_LINGER failed in tcp_connect()", SOAP_TCP_ERROR); - closesocket((SOAP_SOCKET)fd); - return -1; - } - } - if ((soap->connect_flags & ~SO_LINGER) && setsockopt((SOAP_SOCKET)fd, SOL_SOCKET, soap->connect_flags & ~SO_LINGER, (char*)&set, sizeof(int))) - { soap->errnum = soap_socket_errno; - soap_set_sender_error(soap, tcp_error(soap), "TCP setsockopt failed in tcp_connect()", SOAP_TCP_ERROR); - closesocket((SOAP_SOCKET)fd); - return -1; - } - if (soap->keep_alive && setsockopt((SOAP_SOCKET)fd, SOL_SOCKET, SO_KEEPALIVE, (char*)&set, sizeof(int))) - { soap->errnum = soap_socket_errno; - soap_set_sender_error(soap, tcp_error(soap), "TCP setsockopt SO_KEEPALIVE failed in tcp_connect()", SOAP_TCP_ERROR); - closesocket((SOAP_SOCKET)fd); - return -1; - } - if (setsockopt((SOAP_SOCKET)fd, SOL_SOCKET, SO_SNDBUF, (char*)&len, sizeof(int))) - { soap->errnum = soap_socket_errno; - soap_set_sender_error(soap, tcp_error(soap), "TCP setsockopt SO_SNDBUF failed in tcp_connect()", SOAP_TCP_ERROR); - closesocket((SOAP_SOCKET)fd); - return -1; - } - if (setsockopt((SOAP_SOCKET)fd, SOL_SOCKET, SO_RCVBUF, (char*)&len, sizeof(int))) - { soap->errnum = soap_socket_errno; - soap_set_sender_error(soap, tcp_error(soap), "TCP setsockopt SO_RCVBUF failed in tcp_connect()", SOAP_TCP_ERROR); - closesocket((SOAP_SOCKET)fd); - return -1; - } -#ifdef TCP_NODELAY - if (setsockopt((SOAP_SOCKET)fd, IPPROTO_TCP, TCP_NODELAY, (char*)&set, sizeof(int))) - { soap->errnum = soap_socket_errno; - soap_set_sender_error(soap, tcp_error(soap), "TCP setsockopt TCP_NODELAY failed in tcp_connect()", SOAP_TCP_ERROR); - closesocket((SOAP_SOCKET)fd); - return -1; - } -#endif -#endif -/* WR[ */ -#ifndef WITH_IPV6 -/* ]WR */ - memset(&sockaddr, 0, sizeof(sockaddr)); - sockaddr.sin_family = AF_INET; - DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Open socket %d to host='%s'\n", fd, host)); - soap->errmode = 2; - if (soap->proxy_host) - { if (soap_gethost(soap, soap->proxy_host, &sockaddr.sin_addr)) - { soap_set_sender_error(soap, tcp_error(soap), "TCP get proxy host by name failed in tcp_connect()", SOAP_TCP_ERROR); - closesocket((SOAP_SOCKET)fd); - return -1; - } - sockaddr.sin_port = htons((short)soap->proxy_port); - } - else - { if (soap_gethost(soap, host, &sockaddr.sin_addr)) - { soap_set_sender_error(soap, tcp_error(soap), "TCP get host by name failed in tcp_connect()", SOAP_TCP_ERROR); - closesocket((SOAP_SOCKET)fd); - return -1; - } - sockaddr.sin_port = htons((short)port); - } - soap->errmode = 0; -/* WR[ */ -#endif /* WITH_IPV6 */ -/* ]WR */ -#ifndef WITH_LEAN - if (soap->connect_timeout) -#if defined(WIN32) - { u_long nonblocking = 1; - ioctlsocket((SOAP_SOCKET)fd, FIONBIO, &nonblocking); - } -/* WR[ */ -#elif defined(VXWORKS) - { - vx_nonblocking = TRUE; - ioctl((SOAP_SOCKET)fd, FIONBIO, (int)(&vx_nonblocking)); /* modified to use fd */ - } -/* ]WR */ -#else - fcntl((SOAP_SOCKET)fd, F_SETFL, fcntl((SOAP_SOCKET)fd, F_GETFL)|O_NONBLOCK); -#endif - else -#if defined(WIN32) - { u_long blocking = 0; - ioctlsocket((SOAP_SOCKET)fd, FIONBIO, &blocking); - } -/* WR[ */ -#elif defined(VXWORKS) - { - vx_nonblocking = FALSE; - ioctl((SOAP_SOCKET)fd, FIONBIO, (int)(&vx_nonblocking)); /* modified to use fd */ - } -/* ]WR */ -#else - fcntl((SOAP_SOCKET)fd, F_SETFL, fcntl((SOAP_SOCKET)fd, F_GETFL)&~O_NONBLOCK); -#endif -#endif - for (;;) - { -/* WR[ */ -#ifdef WITH_IPV6 - if (connect((SOAP_SOCKET)fd, resaddr.ai_addr, resaddr.ai_addrlen)) /* modified to use fd */ -#else /* WITH_IPV6 */ - if (connect((SOAP_SOCKET)fd, (struct sockaddr*)&sockaddr, sizeof(sockaddr))) -#endif /* WITH_IPV6 */ -/* ]WR */ - { -#ifndef WITH_LEAN - if (soap->connect_timeout && (soap_socket_errno == SOAP_EINPROGRESS || soap_socket_errno == SOAP_EWOULDBLOCK)) - { struct timeval timeout; -#if defined(SOCKLEN_T) - SOCKLEN_T n = sizeof(struct sockaddr_in); -#elif defined(__socklen_t_defined) || defined(_SOCKLEN_T) || defined(CYGWIN) - socklen_t n = sizeof(struct sockaddr_in); -#elif defined(WIN32) || defined(__APPLE__) || defined(HP_UX) || defined(SUN_OS) || defined(OPENSERVER) || defined(TRU64) || defined(VXWORKS) - int n = sizeof(struct sockaddr_in); -#else - size_t n = sizeof(struct sockaddr_in); -#endif - fd_set fds; - if (soap->connect_timeout > 0) - { timeout.tv_sec = soap->connect_timeout; - timeout.tv_usec = 0; - } - else - { timeout.tv_sec = -soap->connect_timeout/1000000; - timeout.tv_usec = -soap->connect_timeout%1000000; - } - FD_ZERO(&fds); - FD_SET((SOAP_SOCKET)fd, &fds); - for (;;) - { int r = select((SOAP_SOCKET)(fd + 1), NULL, &fds, NULL, &timeout); - if (r > 0) - break; - if (!r) - { soap->errnum = 0; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Connect timeout\n")); - soap_set_sender_error(soap, "Timeout", "TCP connect failed in tcp_connect()", SOAP_TCP_ERROR); - closesocket((SOAP_SOCKET)fd); - return -1; - } - if (soap_socket_errno != SOAP_EINTR) - { soap->errnum = soap_socket_errno; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Could not connect to host\n")); - soap_set_sender_error(soap, tcp_error(soap), "TCP connect failed in tcp_connect()", SOAP_TCP_ERROR); - closesocket((SOAP_SOCKET)fd); - return -1; - } - } - n = sizeof(soap->errnum); - if (!getsockopt((SOAP_SOCKET)fd, SOL_SOCKET, SO_ERROR, (char*)&soap->errnum, &n) && !soap->errnum) - break; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Could not connect to host\n")); - soap_set_sender_error(soap, tcp_error(soap), "TCP connect failed in tcp_connect()", SOAP_TCP_ERROR); - closesocket((SOAP_SOCKET)fd); - return -1; - } - else -#endif - if (soap_socket_errno != SOAP_EINTR) - { soap->errnum = soap_socket_errno; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Could not connect to host\n")); - soap_set_sender_error(soap, tcp_error(soap), "TCP connect failed in tcp_connect()", SOAP_TCP_ERROR); - closesocket((SOAP_SOCKET)fd); - return -1; - } - } - else - break; - } -#ifndef WITH_LEAN - if (soap->connect_timeout) -#if defined(WIN32) - { u_long blocking = 0; - ioctlsocket((SOAP_SOCKET)fd, FIONBIO, &blocking); - } -/* WR[ */ -#elif defined(VXWORKS) - { - vx_nonblocking = FALSE; - ioctl((SOAP_SOCKET)fd, FIONBIO, (int)(&vx_nonblocking)); /* modified to use fd */ - } -/* ]WR */ -#else - fcntl((SOAP_SOCKET)fd, F_SETFL, fcntl((SOAP_SOCKET)fd, F_GETFL)&~O_NONBLOCK); -#endif -#endif - soap->socket = fd; -#ifdef WITH_OPENSSL - soap->imode &= ~SOAP_ENC_SSL; - soap->omode &= ~SOAP_ENC_SSL; - if (!strncmp(endpoint, "https:", 6)) - { int r; - if (soap->proxy_host) - { unsigned int k = soap->omode; /* make sure we only parse HTTP */ - size_t n = soap->count; /* save the content length */ - soap->omode &= ~0xFF; /* mask IO and ENC */ - soap->omode |= SOAP_IO_BUFFER; - soap_begin_send(soap); - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Connecting to proxy server\n")); - sprintf(soap->tmpbuf, "CONNECT %s:%d HTTP/%s", host, port, soap->http_version); - if ((soap->error = soap->fposthdr(soap, soap->tmpbuf, NULL))) - return -1; -#ifndef WITH_LEAN - if (soap->proxy_userid && soap->proxy_passwd && strlen(soap->proxy_userid) + strlen(soap->proxy_passwd) < 761) - { sprintf(soap->tmpbuf + 262, "%s:%s", soap->proxy_userid, soap->proxy_passwd); - strcpy(soap->tmpbuf, "Basic "); - soap_s2base64(soap, (const unsigned char*)(soap->tmpbuf + 262), soap->tmpbuf + 6, strlen(soap->tmpbuf + 262)); - if ((soap->error = soap->fposthdr(soap, "Proxy-Authorization", soap->tmpbuf))) - return soap->error; - } -#endif - if ((soap->error = soap->fposthdr(soap, NULL, NULL)) - || soap_flush(soap)) - return -1; - soap->omode = k; - k = soap->imode; - soap->imode &= ~0xFF; /* mask IO and ENC */ - if (soap_begin_recv(soap)) - return -1; - soap->imode = k; - soap->count = n; - soap_begin_send(soap); - } - if (!soap->ctx && (soap->error = soap->fsslauth(soap))) - { soap_set_sender_error(soap, "SSL error", "SSL authentication failed in tcp_connect(): check password, key file, and ca file.", SOAP_SSL_ERROR); - return -1; - } - soap->ssl = SSL_new(soap->ctx); - if (!soap->ssl) - { soap->error = SOAP_SSL_ERROR; - return -1; - } - if (soap->session) - { if (!strcmp(soap->session_host, host) && soap->session_port == port) - SSL_set_session(soap->ssl, soap->session); - SSL_SESSION_free(soap->session); - soap->session = NULL; - } - soap->imode |= SOAP_ENC_SSL; - soap->omode |= SOAP_ENC_SSL; - soap->bio = BIO_new_socket((SOAP_SOCKET)fd, BIO_NOCLOSE); - SSL_set_bio(soap->ssl, soap->bio, soap->bio); -#ifndef WITH_LEAN - if (soap->connect_timeout) -#ifdef WIN32 - { u_long nonblocking = 1; - ioctlsocket((SOAP_SOCKET)fd, FIONBIO, &nonblocking); - } -#else - fcntl((SOAP_SOCKET)fd, F_SETFL, fcntl((SOAP_SOCKET)fd, F_GETFL)|O_NONBLOCK); -#endif -#endif - for (;;) - { if ((r = SSL_connect(soap->ssl)) <= 0) - { int err = SSL_get_error(soap->ssl, r); - if (err != SSL_ERROR_NONE && err != SSL_ERROR_WANT_READ && err != SSL_ERROR_WANT_WRITE) - { soap_set_sender_error(soap, ssl_error(soap, r), "SSL connect failed in tcp_connect()", SOAP_SSL_ERROR); - return -1; - } - if (soap->connect_timeout) - { struct timeval timeout; - fd_set fds; - if (soap->connect_timeout > 0) - { timeout.tv_sec = soap->connect_timeout; - timeout.tv_usec = 0; - } - else - { timeout.tv_sec = -soap->connect_timeout/1000000; - timeout.tv_usec = -soap->connect_timeout%1000000; - } - FD_ZERO(&fds); - FD_SET((SOAP_SOCKET)(soap->socket), &fds); - for (;;) - { int r = select((SOAP_SOCKET)(soap->socket + 1), &fds, NULL, &fds, &timeout); - if (r > 0) - break; - if (!r) - { soap->errnum = 0; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Connect timeout\n")); - soap_set_sender_error(soap, "Timeout", "TCP connect failed in tcp_connect()", SOAP_TCP_ERROR); - return -1; - } - } - continue; - } - } - break; - } -#ifndef WITH_LEAN - if (soap->connect_timeout) -#ifdef WIN32 - { u_long blocking = 0; - ioctlsocket((SOAP_SOCKET)fd, FIONBIO, &blocking); - } -#else - fcntl((SOAP_SOCKET)fd, F_SETFL, fcntl((SOAP_SOCKET)fd, F_GETFL)&~O_NONBLOCK); -#endif -#endif - if (soap->require_server_auth) - { X509 *peer; - int err; - if ((err = SSL_get_verify_result(soap->ssl)) != X509_V_OK) - { soap_set_sender_error(soap, X509_verify_cert_error_string(err), "SSL certificate cannot be verified in tcp_connect()", SOAP_SSL_ERROR); - return -1; - } - peer = SSL_get_peer_certificate(soap->ssl); - if (!peer) - { soap_set_sender_error(soap, "SSL error", "No SSL certificate was presented by the peer in tcp_connect()", SOAP_SSL_ERROR); - return -1; - } - X509_NAME_get_text_by_NID(X509_get_subject_name(peer), NID_commonName, soap->msgbuf, sizeof(soap->msgbuf)); - X509_free(peer); - if (soap_tag_cmp(soap->msgbuf, host)) - { soap_set_sender_error(soap, "SSL error", "SSL certificate host name mismatch in tcp_connect()", SOAP_SSL_ERROR); - return -1; - } - } - } -#endif - return fd; -} -#endif -#endif - -/******************************************************************************/ -#ifndef MAC_CARBON -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_bind(struct soap *soap, const char *host, int port, int backlog) -{ struct sockaddr_in sockaddr; -/* WR[ */ -#ifdef WITH_IPV6 - struct addrinfo *addrinfo; - struct addrinfo hints; - struct addrinfo resaddr; - struct sockaddr_storage addrstorage; - int err; -#endif /* WITH_IPV6 */ -/* ]WR */ -#ifndef WITH_LEAN - int len = SOAP_BUFLEN; - int set = 1; -#endif - if (soap_valid_socket(soap->master)) - { closesocket((SOAP_SOCKET)soap->master); - soap->master = SOAP_INVALID_SOCKET; - } - soap->socket = SOAP_INVALID_SOCKET; - soap->errmode = 1; - if (tcp_init(soap)) - { soap_set_receiver_error(soap, tcp_error(soap), "TCP init failed in soap_bind()", SOAP_TCP_ERROR); - return -1; - } -/* WR[ */ -#ifdef WITH_IPV6 - memset(&hints, 0, sizeof(hints)); - hints.ai_family = PF_UNSPEC; - hints.ai_socktype = SOCK_STREAM; - hints.ai_flags = AI_PASSIVE; - soap->errmode = 2; - if (host) - err = getaddrinfo(host, soap_int2s(soap, port), &hints, &addrinfo); - else - err = getaddrinfo(NULL, soap_int2s(soap, port), &hints, &addrinfo); - if (NULL != addrinfo) - { - resaddr = *addrinfo; - addrstorage = *((struct sockaddr_storage *) addrinfo->ai_addr); - resaddr.ai_addr = (struct sockaddr *) &addrstorage; - freeaddrinfo(addrinfo); - } - if (err) - { soap_set_receiver_error(soap, gai_strerror(err), "TCP getaddrinfo failed in soap_bind()", SOAP_TCP_ERROR); - return -1; - } - soap->errmode = 0; - if ((soap->master = socket(resaddr.ai_family, resaddr.ai_socktype, resaddr.ai_protocol)) < 0) - { soap->errnum = soap_socket_errno; - soap_set_receiver_error(soap, tcp_error(soap), "TCP socket failed in soap_bind()", SOAP_TCP_ERROR); - return -1; - } -#else /* WITH_IPV6 */ -/* ]WR */ - soap->errmode = 0; - if ((soap->master = (int)socket(AF_INET, SOCK_STREAM, 0)) < 0) - { soap->errnum = soap_socket_errno; - soap_set_receiver_error(soap, tcp_error(soap), "TCP socket failed in soap_bind()", SOAP_TCP_ERROR); - return -1; - } -/* WR[ */ -#endif /* WITH_IPV6 */ -/* ]WR */ -#ifndef WITH_LEAN - if (soap->bind_flags && setsockopt((SOAP_SOCKET)soap->master, SOL_SOCKET, soap->bind_flags, (char*)&set, sizeof(int))) - { soap->errnum = soap_socket_errno; - soap_set_receiver_error(soap, tcp_error(soap), "TCP setsockopt failed in soap_bind()", SOAP_TCP_ERROR); - return -1; - } - if (soap->keep_alive && setsockopt((SOAP_SOCKET)soap->master, SOL_SOCKET, SO_KEEPALIVE, (char*)&set, sizeof(int))) - { soap->errnum = soap_socket_errno; - soap_set_receiver_error(soap, tcp_error(soap), "TCP setsockopt SO_KEEPALIVE failed in soap_bind()", SOAP_TCP_ERROR); - return -1; - } - if (setsockopt((SOAP_SOCKET)soap->master, SOL_SOCKET, SO_SNDBUF, (char*)&len, sizeof(int))) - { soap->errnum = soap_socket_errno; - soap_set_receiver_error(soap, tcp_error(soap), "TCP setsockopt SO_SNDBUF failed in soap_bind()", SOAP_TCP_ERROR); - return -1; - } - if (setsockopt((SOAP_SOCKET)soap->master, SOL_SOCKET, SO_RCVBUF, (char*)&len, sizeof(int))) - { soap->errnum = soap_socket_errno; - soap_set_receiver_error(soap, tcp_error(soap), "TCP setsockopt SO_RCVBUF failed in soap_bind()", SOAP_TCP_ERROR); - return -1; - } -#ifdef TCP_NODELAY - if (setsockopt((SOAP_SOCKET)soap->master, IPPROTO_TCP, TCP_NODELAY, (char*)&set, sizeof(int))) - { soap->errnum = soap_socket_errno; - soap_set_receiver_error(soap, tcp_error(soap), "TCP setsockopt TCP_NODELAY failed in soap_bind()", SOAP_TCP_ERROR); - return -1; - } -#endif -#endif -/* WR[ */ -#ifdef WITH_IPV6 - soap->errmode = 0; - if (bind(soap->master, resaddr.ai_addr, resaddr.ai_addrlen) || listen(soap->master, backlog)) - { - soap->errnum = soap_socket_errno; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Could not bind to host\n")); - soap_closesock(soap); - soap_set_receiver_error(soap, tcp_error(soap), "TCP bind failed in soap_bind()", SOAP_TCP_ERROR); - return -1; - } -#else /* WITH_IPV6 */ -/* ]WR */ - memset(&sockaddr, 0, sizeof(sockaddr)); - sockaddr.sin_family = AF_INET; - soap->errmode = 2; - if (host) - { if (soap_gethost(soap, host, &sockaddr.sin_addr)) - { soap_set_receiver_error(soap, tcp_error(soap), "TCP get host by name failed in soap_bind()", SOAP_TCP_ERROR); - return -1; - } - } - else - sockaddr.sin_addr.s_addr = htonl(INADDR_ANY); - sockaddr.sin_port = htons((short)port); - soap->errmode = 0; - if (bind((SOAP_SOCKET)soap->master, (struct sockaddr*)&sockaddr, sizeof(sockaddr)) || listen((SOAP_SOCKET)soap->master, backlog)) - { soap->errnum = soap_socket_errno; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Could not bind to host\n")); - soap_closesock(soap); - soap_set_receiver_error(soap, tcp_error(soap), "TCP bind failed in soap_bind()", SOAP_TCP_ERROR); - return -1; - } -/* WR[ */ -#endif /* WITH_IPV6 */ -/* ]WR */ -#ifdef WITH_OPENSSL - if (!soap->ctx && (soap->error = soap->fsslauth(soap))) - return -1; -#endif - return soap->master; -} -#endif -#endif - -/******************************************************************************/ -#ifndef MAC_CARBON -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_poll(struct soap *soap) -{ -#ifndef WITH_LEAN - struct timeval timeout; - fd_set sfd,rfd; - int r; - timeout.tv_sec = 0; - timeout.tv_usec = 0; - FD_ZERO(&rfd); - FD_ZERO(&sfd); - if (soap->socket >= 0) - { FD_SET(soap->socket, &rfd); - FD_SET(soap->socket, &sfd); - r = select(soap->socket + 1, &rfd, &sfd, NULL, &timeout); - } - else if (soap->master >= 0) - { FD_SET(soap->master, &rfd); - r = select(soap->master + 1, &rfd, &sfd, NULL, &timeout); - } - else - { FD_SET(soap->sendfd, &sfd); - FD_SET(soap->recvfd, &rfd); - r = select((soap->sendfd > soap->recvfd ? soap->sendfd : soap->recvfd) + 1, &rfd, &sfd, NULL, &timeout); - } - if (r > 0) - { -#ifdef WITH_OPENSSL - if (soap->ssl) - { if ((soap->socket >= 0) && FD_ISSET(soap->socket, &rfd)) - { char buf = '\0'; - if (SSL_peek(soap->ssl, &buf, 1) <= 0) - return SOAP_EOF; - } - } -#endif - return SOAP_OK; - } - if (r < 0 && (soap_valid_socket(soap->master) || soap_valid_socket(soap->socket)) && soap_socket_errno != SOAP_EINTR) - { soap->errnum = soap_socket_errno; - soap_set_receiver_error(soap, tcp_error(soap), "select failed in soap_poll()", SOAP_TCP_ERROR); - return soap->error = SOAP_TCP_ERROR; - } - else - soap->errnum = soap_errno; - return SOAP_EOF; -#else - return SOAP_OK; -#endif -} -#endif -#endif - -/******************************************************************************/ -#ifndef MAC_CARBON -#ifndef PALM_1 -static int -tcp_accept(struct soap *soap, int s, struct sockaddr *a, int *n) -{ -#if defined(SOCKLEN_T) - return (int)accept((SOAP_SOCKET)s, a, (SOCKLEN_T*)n); -#elif defined(__socklen_t_defined) || defined(_SOCKLEN_T) || defined(CYGWIN) - return (int)accept((SOAP_SOCKET)s, a, (socklen_t*)n); -#elif defined(WIN32) || defined(__APPLE__) || defined(HP_UX) || defined(SUN_OS) || defined(OPENSERVER) || defined(TRU64) || defined(VXWORKS) - return (int)accept((SOAP_SOCKET)s, a, n); -#else - return (int)accept((SOAP_SOCKET)s, a, (size_t*)n); -#endif -} -#endif -#endif - -/******************************************************************************/ -#ifndef MAC_CARBON -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_accept(struct soap *soap) -{ -/* WR[ */ -#ifdef WITH_IPV6 - struct sockaddr_storage sockaddr; -#else /* WITH_IPV6 */ -/* ]WR */ - struct sockaddr_in sockaddr; -/* WR[ */ -#endif -/* ]WR */ - int n = (int)sizeof(struct sockaddr); -#ifndef WITH_LEAN - int len = SOAP_BUFLEN; - int set = 1; -#endif - memset(&sockaddr, 0, sizeof(sockaddr)); - soap->socket = SOAP_INVALID_SOCKET; - soap->errmode = 0; - if (soap_valid_socket(soap->master)) - { for (;;) - { -#ifndef WITH_LEAN - if (soap->accept_timeout) - { struct timeval timeout; - fd_set fd; - if (soap->accept_timeout > 0) - { timeout.tv_sec = soap->accept_timeout; - timeout.tv_usec = 0; - } - else - { timeout.tv_sec = -soap->accept_timeout/1000000; - timeout.tv_usec = -soap->accept_timeout%1000000; - } - FD_ZERO(&fd); - FD_SET((SOAP_SOCKET)soap->master, &fd); - for (;;) - { int r = select((SOAP_SOCKET)(soap->master + 1), &fd, &fd, NULL, &timeout); - if (r > 0) - break; - if (!r) - { soap->errnum = 0; - soap_set_receiver_error(soap, "Timeout", "TCP accept failed in soap_accept()", SOAP_TCP_ERROR); - return -1; - } - if (soap_socket_errno != SOAP_EINTR) - { soap->errnum = soap_socket_errno; - soap_closesock(soap); - soap_set_sender_error(soap, tcp_error(soap), "TCP accept failed in soap_accept()", SOAP_TCP_ERROR); - return -1; - } - } -#if defined(WIN32) - { u_long nonblocking = 1; - ioctlsocket((SOAP_SOCKET)soap->master, FIONBIO, &nonblocking); - } -#elif defined(VXWORKS) - { vx_nonblocking = TRUE; - ioctl((SOAP_SOCKET)soap->master, FIONBIO, (int)(&vx_nonblocking)); - } -#else - fcntl((SOAP_SOCKET)soap->master, F_SETFL, fcntl((SOAP_SOCKET)soap->master, F_GETFL)|O_NONBLOCK); -#endif - } - else -#if defined(WIN32) - { u_long blocking = 0; - ioctlsocket((SOAP_SOCKET)soap->master, FIONBIO, &blocking); - } -/* WR[ */ -#elif defined(VXWORKS) - { - vx_nonblocking = FALSE; - ioctl((SOAP_SOCKET)soap->master, FIONBIO, (int)(&vx_nonblocking)); - } -/* ]WR */ -#else - fcntl((SOAP_SOCKET)soap->master, F_SETFL, fcntl((SOAP_SOCKET)soap->master, F_GETFL)&~O_NONBLOCK); -#endif -#endif - if ((soap->socket = soap->faccept(soap, soap->master, (struct sockaddr*)&sockaddr, &n)) >= 0) - { -/* WR[ */ -#ifdef WITH_IPV6 -/* Use soap->host to store the numeric form of the remote host */ - getnameinfo((struct sockaddr*)&sockaddr, n, soap->host, sizeof(soap->host), NULL, 0, NI_NUMERICHOST | NI_NUMERICSERV); - soap->ip = 0; /* info stored in soap->host */ - soap->port = 0; /* info stored in soap->host */ -#else /* WITH_IPV6 */ -/* ]WR */ - soap->ip = ntohl(sockaddr.sin_addr.s_addr); - soap->port = (int)ntohs(sockaddr.sin_port); -/* WR[ */ -#endif /* WITH_IPV6 */ -/* ]WR */ - soap->keep_alive = ((soap->imode & SOAP_IO_KEEPALIVE) != 0); -#ifndef WITH_LEAN - if (soap->accept_flags & SO_LINGER) - { struct linger linger; - memset(&linger, 0, sizeof(struct linger)); - linger.l_onoff = 1; - linger.l_linger = 0; - if (setsockopt((SOAP_SOCKET)soap->socket, SOL_SOCKET, SO_LINGER, (char*)&linger, sizeof(struct linger))) - { soap->errnum = soap_socket_errno; - soap_set_receiver_error(soap, tcp_error(soap), "TCP setsockopt SO_LINGER failed in soap_accept()", SOAP_TCP_ERROR); - return -1; - } - } - if ((soap->accept_flags & ~SO_LINGER) && setsockopt((SOAP_SOCKET)soap->socket, SOL_SOCKET, soap->accept_flags & ~SO_LINGER, (char*)&set, sizeof(int))) - { soap->errnum = soap_socket_errno; - soap_set_receiver_error(soap, tcp_error(soap), "TCP setsockopt failed in soap_accept()", SOAP_TCP_ERROR); - return -1; - } - if (soap->keep_alive && setsockopt((SOAP_SOCKET)soap->socket, SOL_SOCKET, SO_KEEPALIVE, (char*)&set, sizeof(int))) - { soap->errnum = soap_socket_errno; - soap_set_receiver_error(soap, tcp_error(soap), "TCP setsockopt SO_KEEPALIVE failed in soap_accept()", SOAP_TCP_ERROR); - return -1; - } - if (setsockopt((SOAP_SOCKET)soap->socket, SOL_SOCKET, SO_SNDBUF, (char*)&len, sizeof(int))) - { soap->errnum = soap_socket_errno; - soap_set_receiver_error(soap, tcp_error(soap), "TCP setsockopt SO_SNDBUF failed in soap_accept()", SOAP_TCP_ERROR); - return -1; - } - if (setsockopt((SOAP_SOCKET)soap->socket, SOL_SOCKET, SO_RCVBUF, (char*)&len, sizeof(int))) - { soap->errnum = soap_socket_errno; - soap_set_receiver_error(soap, tcp_error(soap), "TCP setsockopt SO_RCVBUF failed in soap_accept()", SOAP_TCP_ERROR); - return -1; - } -#ifdef TCP_NODELAY - if (setsockopt((SOAP_SOCKET)soap->socket, IPPROTO_TCP, TCP_NODELAY, (char*)&set, sizeof(int))) - { soap->errnum = soap_socket_errno; - soap_set_receiver_error(soap, tcp_error(soap), "TCP setsockopt TCP_NODELAY failed in soap_accept()", SOAP_TCP_ERROR); - return -1; - } -#endif -#endif - if (soap->accept_timeout) - { -#if defined(WIN32) - u_long blocking = 0; - ioctlsocket((SOAP_SOCKET)soap->master, FIONBIO, &blocking); - ioctlsocket((SOAP_SOCKET)soap->socket, FIONBIO, &blocking); -/* WR[ */ -#elif defined(VXWORKS) - vx_nonblocking = FALSE; - ioctl((SOAP_SOCKET)soap->master, FIONBIO, (int)(&vx_nonblocking)); - ioctl((SOAP_SOCKET)soap->socket, FIONBIO, (int)(&vx_nonblocking)); -/* ]WR */ -#else - fcntl((SOAP_SOCKET)soap->master, F_SETFL, fcntl((SOAP_SOCKET)soap->master, F_GETFL)&~O_NONBLOCK); - fcntl((SOAP_SOCKET)soap->socket, F_SETFL, fcntl((SOAP_SOCKET)soap->socket, F_GETFL)&~O_NONBLOCK); -#endif - } - return soap->socket; - } - if (soap_socket_errno != SOAP_EINTR && soap_socket_errno != SOAP_EAGAIN) - { soap->errnum = soap_socket_errno; - soap_set_receiver_error(soap, tcp_error(soap), "TCP accept failed in soap_accept()", SOAP_TCP_ERROR); - return -1; - } - } - } - else - { soap_set_receiver_error(soap, tcp_error(soap), "TCP no master socket in soap_accept()", SOAP_TCP_ERROR); - return -1; - } -} -#endif -#endif - -/******************************************************************************/ -#ifndef MAC_CARBON -#ifndef PALM_1 -static int -tcp_disconnect(struct soap *soap) -{ -#ifdef WITH_OPENSSL - if (soap->ssl) - { int r, s = 0; - if (soap->session) - SSL_SESSION_free(soap->session); - if (*soap->host) - { soap->session = SSL_get1_session(soap->ssl); - if (soap->session) - { strcpy(soap->session_host, soap->host); - soap->session_port = soap->port; - } - } - r = SSL_shutdown(soap->ssl); - if (r != 1) - { s = ERR_get_error(); - if (s) - { if (soap_valid_socket(soap->socket)) - { shutdown((SOAP_SOCKET)soap->socket, 1); - soap->socket = SOAP_INVALID_SOCKET; - } - r = SSL_shutdown(soap->ssl); - } - } - DBGLOG(TEST, if (s) SOAP_MESSAGE(fdebug, "Shutdown failed: %d\n", SSL_get_error(soap->ssl, r))); - SSL_free(soap->ssl); - soap->ssl = NULL; - if (s) - return SOAP_SSL_ERROR; - ERR_remove_state(0); - } -#endif - if (soap_valid_socket(soap->socket)) - { DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Closing socket %d\n", soap->socket)); - shutdown((SOAP_SOCKET)soap->socket, 2); - closesocket((SOAP_SOCKET)soap->socket); - soap->socket = SOAP_INVALID_SOCKET; - } - return SOAP_OK; -} -#endif -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_closesock(struct soap *soap) -{ register int status = soap->error; -#ifndef MAC_CARBON - if (status == SOAP_EOF || !soap->keep_alive) - { if ((soap->error = soap->fclose(soap))) - return soap->error; - soap->socket = SOAP_INVALID_SOCKET; - } -#endif -#ifdef WITH_ZLIB - if (soap->zlib_state == SOAP_ZLIB_DEFLATE) - deflateEnd(&soap->d_stream); - else if (soap->zlib_state == SOAP_ZLIB_INFLATE) - inflateEnd(&soap->d_stream); - soap->zlib_state = SOAP_ZLIB_NONE; -#endif - return soap->error = status; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_hash(register const char *s) -{ register int h = 0; - while (*s) - h += *s++ & 0x1F; - return h % SOAP_IDHASH; -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -static void -soap_init_pht(struct soap *soap) -{ register int i; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Initializing pointer hashtable\n")); - for (i = 0; i < SOAP_PTRHASH; i++) - soap->pht[i] = NULL; -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -struct soap* -SOAP_FMAC2 -soap_new() -{ struct soap *soap = (struct soap*)SOAP_MALLOC(sizeof(struct soap)); - if (soap) - soap_init(soap); - return soap; -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -struct soap* -SOAP_FMAC2 -soap_new1(int mode) -{ return soap_new2(mode, mode); -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -struct soap* -SOAP_FMAC2 -soap_new2(int imode, int omode) -{ struct soap *soap = (struct soap*)SOAP_MALLOC(sizeof(struct soap)); - if (soap) - soap_init2(soap, imode, omode); - return soap; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -static void -soap_free_pht(struct soap *soap) -{ register struct soap_plist *pp, *next; - register int i; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Free pointer hashtable\n")); - for (i = 0; i < SOAP_PTRHASH; i++) - { for (pp = soap->pht[i]; pp; pp = next) - { next = pp->next; - SOAP_FREE(pp); - } - soap->pht[i] = NULL; - } -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_embed_element(struct soap *soap, const void *p, const char *tag, int type) -{ register int i; - struct soap_plist *pp; - if (soap->version != 1) - soap->encoding = 1; - if ((i = soap_pointer_lookup(soap, p, type, &pp))) - { if (soap_is_embedded(soap, pp) || soap_is_single(soap, pp)) - return 0; - soap_set_embedded(soap, pp); - } - return i; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_embed_array(struct soap *soap, const void *p, const struct soap_array *a, int n, const char *tag, int type) -{ register int i; - struct soap_plist *pp; - if (soap->version != 1) - soap->encoding = 1; - if ((i = soap_array_pointer_lookup(soap, p, a, n, type, &pp))) - { if (soap_is_embedded(soap, pp) || soap_is_single(soap, pp)) - return 0; - soap_set_embedded(soap, pp); - } - return i; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_pointer_lookup(struct soap *soap, const void *p, int type, struct soap_plist **ppp) -{ register struct soap_plist *pp; - *ppp = NULL; - if (p) - for (pp = soap->pht[soap_hash_ptr(p)]; pp; pp = pp->next) - if (pp->ptr == p && pp->type == type) - { *ppp = pp; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Lookup location=%p type=%d id=%d\n", p, type, pp->id)); - return pp->id; - } - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Lookup location=%p type=%d: not found\n", p, type)); - return 0; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_array_pointer_lookup(struct soap *soap, const void *p, const struct soap_array *a, int n, int type, struct soap_plist **ppp) -{ struct soap_plist *pp; - *ppp = NULL; - if (!p || !a->__ptr) - return 0; - for (pp = soap->pht[soap_hash_ptr(a->__ptr)]; pp; pp = pp->next) - if (pp->type == type && pp->array && pp->array->__ptr == a->__ptr && pp->array->__size == n) - { *ppp = pp; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Array lookup location=%p type=%d id=%d\n", a->__ptr, type, pp->id)); - return pp->id; - } - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Array lookup location=%p type=%d: not found\n", a->__ptr, type)); - return 0; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_pointer_enter(struct soap *soap, const void *p, int type, struct soap_plist **ppp) -{ register struct soap_plist *pp; - if (!p) - { *ppp = NULL; - return 0; - } - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Enter location=%p type=%d id=%lu\n", p, type, soap->idnum+1)); - *ppp = pp = (struct soap_plist*)SOAP_MALLOC(sizeof(struct soap_plist)); - if (pp) - { register int h = soap_hash_ptr(p); - pp->next = soap->pht[h]; - pp->type = type; - if ((soap->mode & SOAP_XML_TREE) || soap->part == SOAP_IN_HEADER) - { pp->mark1 = 0; - pp->mark2 = 0; - } - else - { pp->mark1 = 1; - pp->mark2 = 1; - } - pp->ptr = p; - pp->array = NULL; - soap->pht[h] = pp; - return pp->id = ++soap->idnum; - } - return 0; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_array_pointer_enter(struct soap *soap, const void *p, const struct soap_array *a, int type, struct soap_plist **ppp) -{ struct soap_plist *pp; - *ppp = NULL; - if (!p || !a->__ptr) - return 0; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Array enter location=%p size=%d type=%d id=%lu\n", a->__ptr, a->__size, type, soap->idnum+1)); - *ppp = pp = (struct soap_plist*)SOAP_MALLOC(sizeof(struct soap_plist)); - if (pp) - { register int h = soap_hash_ptr(a->__ptr); - pp->next = soap->pht[h]; - pp->type = type; - if ((soap->mode & SOAP_XML_TREE) || soap->part == SOAP_IN_HEADER) - { pp->mark1 = 0; - pp->mark2 = 0; - } - else - { pp->mark1 = 1; - pp->mark2 = 1; - } - pp->ptr = p; - pp->array = a; - soap->pht[h] = pp; - return pp->id = ++soap->idnum; - } - return 0; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_begin_count(struct soap *soap) -{ soap_clr_attr(soap); - soap_set_local_namespaces(soap); - if (soap->mode & SOAP_ENC_DIME) - soap->mode = soap->omode | SOAP_IO_LENGTH | SOAP_ENC_DIME; - else - { soap->mode = soap->omode; - if (((soap->mode & (SOAP_IO_STORE | SOAP_IO_CHUNK)) || (soap->mode & SOAP_ENC_XML)) && !soap->fprepare) - soap->mode &= ~SOAP_IO_LENGTH; - else - soap->mode |= SOAP_IO_LENGTH; - } - if ((soap->mode & SOAP_ENC_ZLIB) && (soap->mode & SOAP_IO) == SOAP_IO_FLUSH) - { if (!(soap->mode & SOAP_ENC_DIME)) - soap->mode &= ~SOAP_IO_LENGTH; - if (soap->mode & SOAP_ENC_XML) - soap->mode |= SOAP_IO_BUFFER; - else - soap->mode |= SOAP_IO_STORE; - } - soap->count = 0; - soap->ns = 0; - soap->null = 0; - soap->position = 0; - soap->mustUnderstand = 0; - soap->encoding = 0; - soap->part = SOAP_BEGIN; - soap->idnum = 0; - soap->dime_count = 0; /* count # of attachments */ - soap->dime_size = 0; /* accumulate total size of attachments */ - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Begin count phase (socket=%d mode=%hd count=%lu)\n", soap->socket, soap->mode, (unsigned long)soap->count)); -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_begin_send(struct soap *soap) -{ soap_clr_attr(soap); - soap_set_local_namespaces(soap); - soap->mode = (soap->omode & ~SOAP_IO_LENGTH) | (soap->mode & SOAP_ENC_DIME); - if ((soap->mode & SOAP_ENC_ZLIB) && (soap->mode & SOAP_IO) == SOAP_IO_FLUSH) - { if (soap->mode & SOAP_ENC_XML) - soap->mode |= SOAP_IO_BUFFER; - else - soap->mode |= SOAP_IO_STORE; - } - if ((soap->mode & SOAP_IO) == SOAP_IO_FLUSH && soap_valid_socket(soap->socket)) - { if (soap->count || (soap->mode & SOAP_ENC_XML)) - soap->mode |= SOAP_IO_BUFFER; - else - soap->mode |= SOAP_IO_STORE; - } - if ((soap->mode & SOAP_IO) == SOAP_IO_STORE) - soap_new_block(soap); - if (!(soap->mode & SOAP_IO_KEEPALIVE)) - soap->keep_alive = 0; -#ifdef WIN32 -#ifndef UNDER_CE -#ifndef WITH_FASTCGI - if (!soap_valid_socket(soap->socket)) /* Set win32 stdout or soap->sendfd to BINARY, e.g. to support DIME */ -#ifdef __BORLANDC__ - setmode((SOAP_SOCKET)soap->sendfd, O_BINARY); -#else - _setmode((SOAP_SOCKET)soap->sendfd, _O_BINARY); -#endif -#endif -#endif -#endif - if (soap->mode & SOAP_IO) - { soap->bufidx = 0; - soap->buflen = 0; - } - soap->chunksize = 0; - soap->ns = 0; - soap->null = 0; - soap->position = 0; - soap->mustUnderstand = 0; - soap->encoding = 0; - soap->part = SOAP_BEGIN; - soap->idnum = 0; - soap->level = 0; -#ifdef WITH_ZLIB - soap->z_ratio_out = 1.0; - if ((soap->mode & SOAP_ENC_ZLIB) && soap->zlib_state != SOAP_ZLIB_DEFLATE) - { -#ifdef WITH_GZIP - memcpy(soap->z_buf, "\37\213\10\0\0\0\0\0\0\377", 10); - soap->d_stream.next_out = (Byte*)soap->z_buf + 10; - soap->d_stream.avail_out = SOAP_BUFLEN - 10; - soap->z_crc = crc32(0L, NULL, 0); - if (deflateInit2(&soap->d_stream, soap->z_level, Z_DEFLATED, -MAX_WBITS, 8, Z_DEFAULT_STRATEGY) != Z_OK) -#else - soap->d_stream.next_out = (Byte*)soap->z_buf; - soap->d_stream.avail_out = SOAP_BUFLEN; - if (deflateInit(&soap->d_stream, soap->z_level) != Z_OK) -#endif - return soap->error = SOAP_ZLIB_ERROR; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Deflate initialized\n")); - soap->zlib_state = SOAP_ZLIB_DEFLATE; - } -#endif - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Begin send phase (socket=%d mode=%hd count=%lu)\n", soap->socket, soap->mode, (unsigned long)soap->count)); - return SOAP_OK; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_embedded(struct soap *soap, const void *p, int t) -{ struct soap_plist *pp; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Embedded %p type=%d\n", p, t)); - if (soap_pointer_lookup(soap, p, t, &pp)) - { pp->mark1 = 1; - pp->mark2 = 1; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Embedded %p type=%d set to %d\n", p, t, (int)pp->mark1)); - } -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_reference(struct soap *soap, const void *p, int t) -{ register int i; - struct soap_plist *pp; - if (!p) - return 1; - i = soap_pointer_lookup(soap, p, t, &pp); - if (i) - { if (pp->mark1 == 0) - { pp->mark1 = 2; - pp->mark2 = 2; - } - } - else - { soap_pointer_enter(soap, p, t, &pp); - pp->mark1 = 0; - pp->mark2 = 0; - } - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Reference %p type = %d (%d %d)\n", p, t, (int)pp->mark1, (int)pp->mark2)); - return pp->mark1; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_array_reference(struct soap *soap, const void *p, const struct soap_array *a, int n, int t) -{ register int i; - struct soap_plist *pp; - if (!p) - return 1; - i = soap_array_pointer_lookup(soap, p, a, n, t, &pp); - if (i) - { if (pp->mark1 == 0) - { pp->mark1 = 2; - pp->mark2 = 2; - } - } - else if (!soap_array_pointer_enter(soap, p, a, t, &pp)) - return 1; - pp->mark1 = 0; - pp->mark2 = 0; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Array reference %p ptr=%p size=%d type = %d (%d %d)\n", p, a->__ptr, n, t, (int)pp->mark1, (int)pp->mark2)); - return pp->mark1; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_embedded_id(struct soap *soap, int id, const void *p, int t) -{ struct soap_plist *pp; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Embedded_id %p type=%d id=%d\n", p, t, id)); - if (soap->version == 1 && soap->encodingStyle && !(soap->mode & (SOAP_XML_TREE | SOAP_XML_GRAPH)) && soap->part != SOAP_IN_HEADER) - { if (id < 0) - { id = soap_pointer_lookup(soap, p, t, &pp); - if (id > 0 && pp) - { if (soap->mode & SOAP_IO_LENGTH) - pp->mark1 = 2; - else - pp->mark2 = 2; - } - return -1; - } - return id; - } - if (id < 0) - id = soap_pointer_lookup(soap, p, t, &pp); - else - soap_pointer_lookup(soap, p, t, &pp); - if (id > 0 && pp) - { if (soap->mode & SOAP_IO_LENGTH) - pp->mark1 = 1; - else - pp->mark2 = 1; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Embedded_id id=%d %p type=%d = (%d %d)\n", id, p, t, (int)pp->mark1, (int)pp->mark2)); - } - return id; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_is_embedded(struct soap *soap, struct soap_plist *pp) -{ if (!pp) - return 0; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Is embedded? %d %d\n", (int)pp->mark1, (int)pp->mark2)); - if (soap->version == 1 && soap->encodingStyle && !(soap->mode & (SOAP_XML_TREE | SOAP_XML_GRAPH)) && soap->part != SOAP_IN_HEADER) - { if (soap->mode & SOAP_IO_LENGTH) - return pp->mark1 != 0; - return pp->mark2 != 0; - } - if (soap->mode & SOAP_IO_LENGTH) - return pp->mark1 == 1; - return pp->mark2 == 1; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_is_single(struct soap *soap, struct soap_plist *pp) -{ if ((soap->mode & SOAP_XML_TREE) || soap->part == SOAP_IN_HEADER) - return 1; - if (!pp) - return 0; - if (soap->mode & SOAP_IO_LENGTH) - return pp->mark1 == 0; - return pp->mark2 == 0; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_is_multi(struct soap *soap, struct soap_plist *pp) -{ if (soap->mode & SOAP_IO_LENGTH) - return pp->mark1 == 2; - return pp->mark2 == 2; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_set_embedded(struct soap *soap, struct soap_plist *pp) -{ if (!pp) - return; - if (soap->mode & SOAP_IO_LENGTH) - pp->mark1 = 1; - else - pp->mark2 = 1; -} -#endif - -/******************************************************************************/ -#ifndef WITH_LEANER -#ifndef PALM_2 -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_set_attached(struct soap *soap, struct soap_plist *pp, const char *id, const char *type, const char *options, size_t size) -{ DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Set attached id='%s' type='%s'\n", id?id:"", type?type:"")); - if (soap->mode & SOAP_IO_LENGTH) - { if (pp->mark1 != 3) - { pp->mark1 = 3; - soap->dime_count++; /* one more attachment found */ - soap->dime_size += 12; /* increase total size (DIME fields) */ - if (id) - soap->dime_size += (strlen(id)+3)&(~3); - if (type) - soap->dime_size += (strlen(type)+3)&(~3); - if (options) - soap->dime_size += 4 + (((((unsigned char)options[2] << 8 | (unsigned char)options[3]))+3)&(~3)); - soap->dime_size += (size+3)&(~3); - } - } - else if (pp->mark2 != 3) - pp->mark2 = 3; -} -#endif -#endif - -/******************************************************************************/ -#ifndef PALM_1 -static void -soap_init_iht(struct soap *soap) -{ register int i; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Initializing ID hashtable\n")); - for (i = 0; i < SOAP_IDHASH; i++) - soap->iht[i] = NULL; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -static void -soap_free_iht(struct soap *soap) -{ register int i; - register struct soap_ilist *ip, *p; - register struct soap_flist *fp, *q; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Free ID hashtable\n")); - for (i = 0; i < SOAP_IDHASH; i++) - { for (ip = soap->iht[i]; ip; ip = p) - { for (fp = ip->flist; fp; fp = q) - { q = fp->next; - SOAP_FREE(fp); - } - p = ip->next; - SOAP_FREE(ip); - } - soap->iht[i] = NULL; - } -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -static struct soap_ilist * -soap_hlookup(struct soap *soap, const char *id) -{ register struct soap_ilist *ip; - for (ip = soap->iht[soap_hash(id)]; ip; ip = ip->next) - if (!strcmp(ip->id, id)) - return ip; - return NULL; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -struct soap_ilist * -SOAP_FMAC2 -soap_lookup(struct soap *soap, const char *id) -{ register struct soap_ilist *ip; - ip = soap_hlookup(soap, id); -#ifndef WITH_LEANER - if (!ip && *id != '#' && !strchr(id, ':')) /* try content id "cid:" with DIME attachments */ - { char cid[SOAP_TAGLEN]; - strcpy(cid, "cid:"); - strncat(cid + 4, id, sizeof(cid) - 5); - cid[sizeof(cid) - 1] = '\0'; - ip = soap_hlookup(soap, cid); - } -#endif - return ip; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -struct soap_ilist * -SOAP_FMAC2 -soap_enter(struct soap *soap, const char *id) -{ register int h; - register struct soap_ilist *ip; - ip = (struct soap_ilist*)SOAP_MALLOC(sizeof(struct soap_ilist) + strlen(id)); - if (ip) - { h = soap_hash(id); - strcpy(ip->id, id); - ip->next = soap->iht[h]; - soap->iht[h] = ip; - return ip; - } - return NULL; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -void* -SOAP_FMAC2 -soap_malloc(struct soap *soap, size_t n) -{ register char *p; - if (!n) - return NULL; - if (!soap) - return SOAP_MALLOC(n); - n += (-(long)n) & 7; - if (!(p = (char*)SOAP_MALLOC(n + sizeof(void*) + sizeof(size_t)))) - { soap->error = SOAP_EOM; - return NULL; - } - /* keep chain of alloced cells for later destruction */ - soap->alloced = 1; - *(void**)(p + n) = soap->alist; - *(size_t*)(p + n + sizeof(void*)) = n; - soap->alist = p + n; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Malloc %u bytes at location %p\n", (unsigned int)n, p)); - return p; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_dealloc(struct soap *soap, void *p) -{ if (!soap) - return; - if (p) - { register char **q; - for (q = (char**)&soap->alist; *q; q = *(char***)q) - { if (p == (void*)(*q - *(size_t*)(*q + sizeof(void*)))) - { *q = **(char***)q; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Freed data at %p\n", p)); - SOAP_FREE(p); - return; - } - } - soap_delete(soap, p); - } - else - { register char *q; - while (soap->alist) - { q = (char*)soap->alist; - soap->alist = *(void**)q; - q -= *(size_t*)(q + sizeof(void*)); - if (q == (char*)soap->fault) - soap->fault = NULL; /* this was deallocated */ - else if (q == (char*)soap->header) - soap->header = NULL; /* this was deallocated */ - SOAP_FREE(q); - } - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Dealloc all data done\n")); - } -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_delete(struct soap *soap, void *p) -{ register struct soap_clist **cp = &soap->clist; - if (p) - { while (*cp) - { if (p == (*cp)->ptr) - { register struct soap_clist *q = *cp; - *cp = q->next; - q->fdelete(q); - SOAP_FREE(q); - return; - } - cp = &(*cp)->next; - } - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Could not dealloc data %p: address not in list\n", p)); - } - else - { while (*cp) - { register struct soap_clist *q = *cp; - *cp = q->next; - if (q->ptr == (void*)soap->fault) - soap->fault = NULL; /* this was deallocated */ - else if (q->ptr == (void*)soap->header) - soap->header = NULL; /* this was deallocated */ - q->fdelete(q); - SOAP_FREE(q); - } - } -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -struct soap_clist * -SOAP_FMAC2 -soap_link(struct soap *soap, void *p, int t, int n, void (*fdelete)(struct soap_clist*)) -{ register struct soap_clist *cp; - if ((cp = (struct soap_clist*)SOAP_MALLOC(sizeof(struct soap_clist)))) - { cp->next = soap->clist; - cp->type = t; - cp->size = n; - cp->ptr = p; - cp->fdelete = fdelete; - soap->clist = cp; - } - return cp; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_unlink(struct soap *soap, const void *p) -{ register char **q; - register struct soap_clist **cp; - if (!soap || !p) - return; - for (q = (char**)&soap->alist; *q; q = *(char***)q) - { if (p == (void*)(*q - *(size_t*)(*q + sizeof(void*)))) - { *q = **(char***)q; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Unlinked data %p\n", p)); - return; - } - } - for (cp = &soap->clist; *cp; cp = &(*cp)->next) - { if (p == (*cp)->ptr) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Unlinked class instance %p\n", p)); - q = (char**)*cp; - *cp = (*cp)->next; - SOAP_FREE(q); - return; - } - } -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_lookup_type(struct soap *soap, const char *id) -{ register struct soap_ilist *ip; - if (*id) - { ip = soap_lookup(soap, id); - if (ip) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Lookup id='%s' type=%d\n", id, ip->type)); - return ip->type; - } - } - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "lookup type id='%s' NOT FOUND! Need to get it from xsi:type\n", id)); - return 0; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -void* -SOAP_FMAC2 -soap_id_lookup(struct soap *soap, const char *id, void **p, int t, size_t n, unsigned int k) -{ struct soap_ilist *ip; - void **q; - if (*id == '\0') - return p; - soap->alloced = 0; - if (!p) - p = (void**)soap_malloc(soap, sizeof(void*)); - ip = soap_lookup(soap, id); /* lookup pointer to hash table entry for string id */ - if (!ip) - { ip = soap_enter(soap, id); /* new hash table entry for string id */ - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Forwarding first href='%s' %p (%u bytes)\n", id, p, (unsigned int)n)); - ip->type = t; - ip->size = n; - ip->link = p; - ip->copy = NULL; - ip->flist = NULL; - ip->ptr = NULL; - ip->level = k; - *p = NULL; - } - else if (!soap->blist && ip->ptr) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Resolved href='%s' type='%d' (%u bytes)\n", id, t, (unsigned int)n)); - if (ip->type != t) - { soap->error = SOAP_HREF; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Object mismatch: id's type='%d' href's type='%d'\n", ip->type, t)); - return NULL; - } - while (ip->level < k) - { q = (void**)soap_malloc(soap, sizeof(void*)); - if (!q) - return NULL; - *p = (void*)q; - p = q; - k--; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Descending one level...\n")); - } - *p = ip->ptr; - } - else if (ip->level > k) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Resolving level %u pointers to href='%s'\n", ip->level, id)); - while (ip->level > k) - { void *s, **r = &ip->link; - q = (void**)ip->link; - while (q) - { *r = (void*)soap_malloc(soap, sizeof(void*)); - s = *q; - *q = *r; - r = *(void***)q; - q = (void**)s; - } - *r = NULL; - ip->size = n; - ip->copy = NULL; - ip->level = ip->level - 1; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Descending one level...\n")); - } - q = (void**)ip->link; - ip->link = p; - *p = (void*)q; - } - else - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Forwarded href='%s' (%u bytes)\n", id, (unsigned int)n)); - while (ip->level < k) - { q = (void**)soap_malloc(soap, sizeof(void*)); - *p = q; - p = q; - k--; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Descending one level...\n")); - } - q = (void**)ip->link; - ip->link = p; - *p = (void*)q; - } - return p; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -void* -SOAP_FMAC2 -soap_id_forward(struct soap *soap, const char *href, void *p, int t, size_t n) -{ struct soap_ilist *ip; - if (!p || !*href) - return p; - ip = soap_lookup(soap, soap->href); /* lookup pointer to hash table entry for string id */ - if (!ip) - { if (n >= sizeof(void*)) - { ip = soap_enter(soap, href); /* new hash table entry for string id */ - ip->type = t; - ip->size = n; - ip->link = NULL; - ip->copy = p; - ip->flist = NULL; - *(void**)p = NULL; - ip->ptr = NULL; - ip->level = 0; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Forwarding first copying address %p for type %d href='%s'\n", p, t, href)); - return p; - } - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Forwarding problem: copying location %p too small (%u) for href='%s'\n", p, (unsigned int)n, href)); - soap->error = SOAP_HREF; - return NULL; - } - else if (ip->ptr) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copying value from location %p to location %p to resolve href='%s'\n", ip->ptr, p, href)); - memcpy(p, ip->ptr, n); - } - else if (n >= sizeof(void*)) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Forwarding copying address %p for type %d href='%s' (prev in chain = %p)\n", p, t, href, ip->copy)); - *(void**)p = ip->copy; - ip->copy = p; - return p; - } - else - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Forwarding problem: copying location %p too small (%u) for href='%s'\n", p, (unsigned int)n, href)); - soap->error = SOAP_HREF; /* href to object too small to hold pointer */ - return NULL; - } - return ip->ptr; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -void* -SOAP_FMAC2 -soap_id_enter(struct soap *soap, const char *id, void *p, int t, size_t n, int k) -{ struct soap_ilist *ip; - DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Enter id='%s' type=%d loc=%p size=%d level=%d\n", id, t, p, (int)n, k)); - soap->alloced = 0; - if (*id == '\0') - { if (!p) - return soap_malloc(soap, n); - else - return p; - } - ip = soap_lookup(soap, id); /* lookup pointer to hash table entry for string id */ - DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Lookup entry id='%s'\n", id)); - if (!ip) - { ip = soap_enter(soap, id); /* new hash table entry for string id */ - DBGLOG(TEST,SOAP_MESSAGE(fdebug, "New entry id='%s' type=%d size=%u\n", id, t, (unsigned int)n)); - ip->type = t; - ip->size = n; - ip->link = NULL; - ip->copy = NULL; - ip->flist = NULL; - if (!p) - p = soap_malloc(soap, n); - ip->ptr = p; - ip->level = k; - } - else if (ip->ptr) /* storage address was forwarded */ - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Multiply defined id='%s'\n", id)); - if (p) - { soap->error = SOAP_MULTI_ID; - return NULL; - } - } - else - { if (!p) - p = soap_malloc(soap, n); - ip->ptr = p; - if (!soap->blist) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Resolve link chain to point to %p\n", ip->ptr)); - soap_resolve_ptr(ip); - } - } - return ip->ptr; -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_end_send(struct soap *soap) -{ DBGLOG(TEST, SOAP_MESSAGE(fdebug, "End send\n")); - if (soap->mode & SOAP_IO) /* need to flush the remaining data in buffer */ - { if (soap_flush(soap)) -#ifdef WITH_ZLIB - { if (soap->mode & SOAP_ENC_ZLIB && soap->zlib_state == SOAP_ZLIB_DEFLATE) - { soap->zlib_state = SOAP_ZLIB_NONE; - deflateEnd(&soap->d_stream); - } - return soap->error; - } -#else - return soap->error; -#endif -#ifdef WITH_ZLIB - if (soap->mode & SOAP_ENC_ZLIB) - { int r; - soap->d_stream.avail_in = 0; - do - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Deflating remainder\n")); - r = deflate(&soap->d_stream, Z_FINISH); - if (soap->d_stream.avail_out != SOAP_BUFLEN) - { if (soap_flush_raw(soap, soap->z_buf, SOAP_BUFLEN - soap->d_stream.avail_out)) - { soap->zlib_state = SOAP_ZLIB_NONE; - deflateEnd(&soap->d_stream); - return soap->error; - } - soap->d_stream.next_out = (Byte*)soap->z_buf; - soap->d_stream.avail_out = SOAP_BUFLEN; - } - } while (r == Z_OK); - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Deflated %lu->%lu bytes\n", soap->d_stream.total_in, soap->d_stream.total_out)); - soap->z_ratio_out = (float)soap->d_stream.total_out / (float)soap->d_stream.total_in; - soap->mode &= ~SOAP_ENC_ZLIB; - soap->zlib_state = SOAP_ZLIB_NONE; - if (deflateEnd(&soap->d_stream) != Z_OK || r != Z_STREAM_END) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Unable to end deflate: %s\n", soap->d_stream.msg?soap->d_stream.msg:"")); - return soap->error = SOAP_ZLIB_ERROR; - } -#ifdef WITH_GZIP - soap->z_buf[0] = soap->z_crc & 0xFF; - soap->z_buf[1] = (soap->z_crc >> 8) & 0xFF; - soap->z_buf[2] = (soap->z_crc >> 16) & 0xFF; - soap->z_buf[3] = (soap->z_crc >> 24) & 0xFF; - soap->z_buf[4] = soap->d_stream.total_in & 0xFF; - soap->z_buf[5] = (soap->d_stream.total_in >> 8) & 0xFF; - soap->z_buf[6] = (soap->d_stream.total_in >> 16) & 0xFF; - soap->z_buf[7] = (soap->d_stream.total_in >> 24) & 0xFF; - if (soap_flush_raw(soap, soap->z_buf, 8)) - return soap->error; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "gzip crc32=%lu\n", soap->z_crc)); -#endif - } -#endif -#ifndef WITH_LEAN - if ((soap->mode & SOAP_IO) == SOAP_IO_STORE) - { char *p; - if (!(soap->mode & SOAP_ENC_XML)) - { soap->mode--; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Sending buffered message of length %u\n", (unsigned int)soap->blist->size)); - if (soap->status >= SOAP_POST) - soap->error = soap->fpost(soap, soap->endpoint, soap->host, soap->port, soap->path, soap->action, soap->blist->size); - else if (soap->status != SOAP_STOP) - soap->error = soap->fresponse(soap, soap->status, soap->blist->size); - if (soap->error || soap_flush(soap)) - return soap->error; - soap->mode++; - } - for (p = soap_first_block(soap); p; p = soap_next_block(soap)) - { DBGMSG(SENT, p, soap_block_size(soap)); - if ((soap->error = soap->fsend(soap, p, soap_block_size(soap)))) - { soap_end_block(soap); - return soap->error; - } - } - soap_end_block(soap); - } - else if ((soap->mode & SOAP_IO) == SOAP_IO_CHUNK) - { DBGMSG(SENT, "\r\n0\r\n\r\n", 7); - if ((soap->error = soap->fsend(soap, "\r\n0\r\n\r\n", 7))) - return soap->error; - } -#endif - } -#ifdef WITH_OPENSSL - if (!soap->ssl && soap_valid_socket(soap->socket) && !soap->keep_alive) - shutdown((SOAP_SOCKET)soap->socket, 1); /* Send TCP FIN */ -#else - if (soap_valid_socket(soap->socket) && !soap->keep_alive) - shutdown((SOAP_SOCKET)soap->socket, 1); /* Send TCP FIN */ -#endif - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "End of send message ok\n")); - soap->part = SOAP_END; - soap->count = 0; - return SOAP_OK; -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_end_recv(struct soap *soap) -{ soap->part = SOAP_END; - DBGLOG(TEST,SOAP_MESSAGE(fdebug, "End of receive message ok\n")); -#ifdef WITH_ZLIB - if (soap->mode & SOAP_ENC_ZLIB) - { soap->mode &= ~SOAP_ENC_ZLIB; - memcpy(soap->buf, soap->z_buf, SOAP_BUFLEN); - soap->bufidx = (char*)soap->d_stream.next_in - soap->z_buf; - soap->buflen = soap->z_buflen; - soap->zlib_state = SOAP_ZLIB_NONE; - if (inflateEnd(&soap->d_stream) != Z_OK) - return soap->error = SOAP_ZLIB_ERROR; -#ifdef WITH_GZIP - if (soap->zlib_in == SOAP_ZLIB_GZIP) - { wchar c; - short i; - for (i = 0; i < 8; i++) - { if ((int)(c = soap_getchar(soap)) == EOF) - return soap->error = SOAP_EOF; - soap->z_buf[i] = (char)c; - } - if (soap->z_crc != ((unsigned char)soap->z_buf[0] | (unsigned long)((unsigned char)soap->z_buf[1] << 8) | (unsigned long)((unsigned char)soap->z_buf[2] << 16) | (unsigned long)((unsigned char)soap->z_buf[3] << 24))) - { DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Gzip error: crc check failed, message corrupted? (crc32=%lu)\n", soap->z_crc)); - return soap->error = SOAP_ZLIB_ERROR; - } - if (soap->d_stream.total_out != ((unsigned char)soap->z_buf[4] | (unsigned long)((unsigned char)soap->z_buf[5] << 8) | (unsigned long)((unsigned char)soap->z_buf[6] << 16) | (unsigned long)((unsigned char)soap->z_buf[7] << 24))) - { DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Gzip error: incorrect message length\n")); - return soap->error = SOAP_ZLIB_ERROR; - } - } -#endif - } -#endif - if ((soap->mode & SOAP_IO) == SOAP_IO_CHUNK) - while ((int)soap_getchar(soap) != EOF) /* advance to last chunk */ - ; - if (soap->fdisconnect) - if ((soap->error = soap->fdisconnect(soap))) - return soap->error; - return soap_resolve(soap); -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_free(struct soap *soap) -{ register struct soap_nlist *np; - register struct soap_attribute *tp; - register struct Namespace *ns; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Free namespace stack\n")); - while (soap->nlist) - { np = soap->nlist->next; - if (soap->nlist->ns) - SOAP_FREE(soap->nlist->ns); - SOAP_FREE(soap->nlist); - soap->nlist = np; - } - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Free any remaining temp blocks\n")); - while (soap->blist) - soap_end_block(soap); - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Free attributes\n")); - while (soap->attributes) - { tp = soap->attributes->next; - if (soap->attributes->value) - SOAP_FREE(soap->attributes->value); - SOAP_FREE(soap->attributes); - soap->attributes = tp; - } - if (soap->labbuf) - SOAP_FREE(soap->labbuf); - soap->labbuf = NULL; - soap->lablen = 0; - soap->labidx = 0; - soap_free_pht(soap); - soap_free_iht(soap); - ns = soap->local_namespaces; - if (ns) - { for (; ns->id; ns++) - { if (ns->out) - { SOAP_FREE(ns->out); - if (soap->encodingStyle == ns->out) - soap->encodingStyle = SOAP_STR_EOS; - ns->out = NULL; - } - if (soap->encodingStyle == ns->ns) - soap->encodingStyle = SOAP_STR_EOS; - } - SOAP_FREE(soap->local_namespaces); - soap->local_namespaces = NULL; - } -} -#endif - -/******************************************************************************/ -#ifndef WITH_LEAN -static void -soap_init_logs(struct soap *soap) -{ int i; - for (i = 0; i < SOAP_MAXLOGS; i++) - { soap->logfile[i] = NULL; - soap->fdebug[i] = NULL; - } -#ifdef SOAP_DEBUG - soap_set_recv_logfile(soap, "RECV.log"); - soap_set_sent_logfile(soap, "SENT.log"); - soap_set_test_logfile(soap, "TEST.log"); -#endif -} -#endif - -/******************************************************************************/ -#ifndef WITH_LEAN -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_open_logfile(struct soap *soap, int i) -{ if (soap->logfile[i]) - soap->fdebug[i] = fopen(soap->logfile[i], i < 2 ? "ab" : "a"); -} -#endif - -/******************************************************************************/ -#ifndef WITH_LEAN -static void -soap_close_logfile(struct soap *soap, int i) -{ if (soap->fdebug[i]) - { fclose(soap->fdebug[i]); - soap->fdebug[i] = NULL; - } -} -#endif - -/******************************************************************************/ -#ifndef WITH_LEAN -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_close_logfiles(struct soap *soap) -{ int i; - for (i = 0; i < SOAP_MAXLOGS; i++) - soap_close_logfile(soap, i); -} -#endif - -/******************************************************************************/ -#ifndef WITH_LEAN -static void -soap_set_logfile(struct soap *soap, int i, const char *logfile) -{ char *s = NULL; - soap_close_logfile(soap, i); - if (soap->logfile[i]) - SOAP_FREE((void*)soap->logfile[i]); - if (logfile) - if ((s = (char*)SOAP_MALLOC(strlen(logfile) + 1))) - strcpy(s, logfile); - soap->logfile[i] = s; -} -#endif - -/******************************************************************************/ -#ifndef WITH_LEAN -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_set_recv_logfile(struct soap *soap, const char *logfile) -{ soap_set_logfile(soap, SOAP_INDEX_RECV, logfile); -} -#endif - -/******************************************************************************/ -#ifndef WITH_LEAN -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_set_sent_logfile(struct soap *soap, const char *logfile) -{ soap_set_logfile(soap, SOAP_INDEX_SENT, logfile); -} -#endif - -/******************************************************************************/ -#ifndef WITH_LEAN -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_set_test_logfile(struct soap *soap, const char *logfile) -{ soap_set_logfile(soap, SOAP_INDEX_TEST, logfile); -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -struct soap* -SOAP_FMAC2 -soap_copy(struct soap *soap) -{ return soap_copy_context((struct soap*)SOAP_MALLOC(sizeof(struct soap)), soap); -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -struct soap* -SOAP_FMAC2 -soap_copy_context(struct soap *copy, struct soap *soap) -{ if (copy) - { register struct soap_plugin *p; - memcpy(copy, soap, sizeof(struct soap)); - copy->copy = 1; - copy->user = NULL; - copy->userid = NULL; - copy->passwd = NULL; - copy->nlist = NULL; - copy->blist = NULL; - copy->clist = NULL; - copy->alist = NULL; - copy->attributes = NULL; - copy->local_namespaces = NULL; - soap_set_local_namespaces(copy); - soap_init_iht(copy); - soap_init_pht(copy); - copy->header = NULL; - copy->fault = NULL; - copy->action = NULL; - *copy->host = '\0'; -#ifndef WITH_LEAN -#ifdef WITH_COOKIES - copy->cookies = soap_copy_cookies(soap); -#else - copy->cookies = NULL; -#endif - soap_init_logs(copy); -#endif - copy->plugins = NULL; - for (p = soap->plugins; p; p = p->next) - { register struct soap_plugin *q = (struct soap_plugin*)SOAP_MALLOC(sizeof(struct soap_plugin)); - if (!q) - return NULL; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copying plugin '%s'\n", p->id)); - *q = *p; - if (p->fcopy && (soap->error = p->fcopy(soap, q, p))) - { SOAP_FREE(q); - return NULL; - } - q->next = copy->plugins; - copy->plugins = q; - } - } - else - soap->error = SOAP_EOM; - return copy; -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_init(struct soap *soap) -{ soap->version = 1; /* default SOAP 1.1 */ - soap_imode(soap, SOAP_IO_DEFAULT); - soap_omode(soap, SOAP_IO_DEFAULT); - soap->copy = 0; - soap->plugins = NULL; - soap->user = NULL; - soap->userid = NULL; - soap->passwd = NULL; - soap->fpost = http_post; - soap->fget = http_get; - soap->fposthdr = http_post_header; - soap->fresponse = http_response; - soap->fparse = http_parse; - soap->fparsehdr = http_parse_header; - soap->fconnect = NULL; - soap->fdisconnect = NULL; -#ifndef MAC_CARBON - soap->faccept = tcp_accept; - soap->fopen = tcp_connect; - soap->fclose = tcp_disconnect; - soap->fsend = fsend; - soap->frecv = frecv; -#endif - soap->fprepare = NULL; - soap->fignore = NULL; - soap->fplugin = fplugin; - soap->fdimereadopen = NULL; - soap->fdimewriteopen = NULL; - soap->fdimereadclose = NULL; - soap->fdimewriteclose = NULL; - soap->fdimeread = NULL; - soap->fdimewrite = NULL; - soap->float_format = "%.8g"; /* .8 preserves single FP precision as much as possible, but might not be very efficient */ - soap->double_format = "%.17lg"; /* .17 preserves double FP precision as much as possible, but might not be very efficient */ - soap->dime_id_format = "cid:id%d"; /* default DIME id format */ - soap->http_version = "1.1"; - soap->encodingStyle = SOAP_STR_EOS; - soap->actor = NULL; - soap->max_keep_alive = SOAP_MAXKEEPALIVE; - soap->keep_alive = 0; - soap->recv_timeout = 0; - soap->send_timeout = 0; - soap->connect_timeout = 0; - soap->accept_timeout = 0; - soap->socket_flags = 0; - soap->connect_flags = 0; - soap->bind_flags = 0; - soap->accept_flags = 0; - soap->ip = 0; - soap->labbuf = NULL; - soap->lablen = 0; - soap->labidx = 0; -#ifndef WITH_NONAMESPACES - soap->namespaces = namespaces; -#else - soap->namespaces = NULL; -#endif - soap->local_namespaces = NULL; - soap->nlist = NULL; - soap->blist = NULL; - soap->clist = NULL; - soap->alist = NULL; - soap->attributes = NULL; - soap->header = NULL; - soap->fault = NULL; - soap->master = SOAP_INVALID_SOCKET; - soap->socket = SOAP_INVALID_SOCKET; - soap->os = NULL; - soap->is = NULL; - soap->dom = NULL; -#ifndef UNDER_CE - soap->recvfd = 0; - soap->sendfd = 1; -#else - soap->recvfd = stdin; - soap->sendfd = stdout; -#endif - soap->host[0] = '\0'; - soap->port = 0; - soap->action = NULL; - soap->proxy_host = NULL; - soap->proxy_port = 8080; - soap->proxy_userid = NULL; - soap->proxy_passwd = NULL; -#ifdef WITH_OPENSSL - soap->fsslauth = ssl_auth_init; - soap->fsslverify = ssl_verify_callback; - soap->bio = NULL; - soap->ssl = NULL; - soap->ctx = NULL; - soap->require_server_auth = 0; - soap->require_client_auth = 0; - soap->rsa = 0; - soap->keyfile = NULL; - soap->password = NULL; - soap->dhfile = NULL; - soap->cafile = NULL; - soap->capath = NULL; - soap->randfile = NULL; - soap->session = NULL; -#endif -#ifdef WITH_ZLIB - soap->zlib_state = SOAP_ZLIB_NONE; - soap->zlib_in = SOAP_ZLIB_NONE; - soap->zlib_out = SOAP_ZLIB_NONE; - soap->d_stream.zalloc = NULL; - soap->d_stream.zfree = NULL; - soap->d_stream.opaque = NULL; - soap->z_level = 6; -#endif -#ifndef WITH_LEAN - soap->cookies = NULL; - soap->cookie_domain = NULL; - soap->cookie_path = NULL; - soap->cookie_max = 32; - soap_init_logs(soap); -#endif -/* WR[ */ -#ifdef WMW_RPM_IO - soap->rpmreqid = NULL; -#endif /* WMW_RPM_IO */ -/* ]WR */ - soap_init_iht(soap); - soap_init_pht(soap); - soap_begin(soap); -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_init1(struct soap *soap, int mode) -{ soap_init2(soap, mode, mode); -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_init2(struct soap *soap, int imode, int omode) -{ soap_init(soap); - soap_imode(soap, imode); - soap_omode(soap, omode); -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_begin(struct soap *soap) -{ DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Initializing\n")); - if (!soap->keep_alive) - { soap->buflen = 0; - soap->bufidx = 0; - } - soap->keep_alive = (((soap->imode | soap->omode) & SOAP_IO_KEEPALIVE) != 0); - soap->null = 0; - soap->position = 0; - soap->encoding = 0; - soap->mustUnderstand = 0; - soap->mode = 0; - soap->ns = 0; - soap->part = SOAP_BEGIN; - soap->alloced = 0; - soap->count = 0; - soap->length = 0; - soap->cdata = 0; - soap->error = SOAP_OK; - soap->peeked = 0; - soap->ahead = 0; - soap->idnum = 0; - soap->level = 0; - soap->endpoint[0] = '\0'; - soap->dime_chunksize = 0; - soap->dime_buflen = 0; - soap->dot_net_bug = 0; - soap_free(soap); -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_end(struct soap *soap) -{ register struct soap_clist *cp; - soap_free(soap); - soap_dealloc(soap, NULL); - while (soap->clist) - { cp = soap->clist->next; - SOAP_FREE(soap->clist); - soap->clist = cp; - } - soap_closesock(soap); -#ifndef WITH_LEAN - soap_close_logfiles(soap); -#endif -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_set_namespaces(struct soap *soap, struct Namespace *p) -{ struct Namespace *ns = soap->local_namespaces; - struct soap_nlist *np, *nq, *nr; - unsigned int level = soap->level; - soap->namespaces = p; - soap->local_namespaces = NULL; - soap_set_local_namespaces(soap); - /* reverse the list */ - np = soap->nlist; - soap->nlist = NULL; - if (np) - { nq = np->next; - np->next = NULL; - while (nq) - { nr = nq->next; - nq->next = np; - np = nq; - nq = nr; - } - } - while (np) - { soap->level = np->level; /* preserve element nesting level */ - if (np->ns) - { if (soap_push_namespace(soap, np->id, np->ns)) - return soap->error; - } - else if (np->index >= 0 && ns) - { if (ns[np->index].out) - { if (soap_push_namespace(soap, np->id, ns[np->index].out)) - return soap->error; - } - else if (soap_push_namespace(soap, np->id, ns[np->index].ns)) - return soap->error; - } - if (np->ns) - SOAP_FREE(np->ns); - nq = np; - np = np->next; - SOAP_FREE(nq); - } - if (ns) - { int i; - for (i = 0; ns[i].id; i++) - { if (ns[i].out) - { SOAP_FREE(ns[i].out); - ns[i].out = NULL; - } - } - SOAP_FREE(ns); - } - soap->level = level; /* restore level */ - return SOAP_OK; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -static void -soap_set_local_namespaces(struct soap *soap) -{ if (soap->namespaces && !soap->local_namespaces) - { register struct Namespace *ns; - register size_t n = 1; - for (ns = soap->namespaces; ns->id; ns++) - n++; - if (n > 3) - { n *= sizeof(struct Namespace); - ns = (struct Namespace*)SOAP_MALLOC(n); - if (ns) - { memcpy(ns, soap->namespaces, n); - ns[0].id = "SOAP-ENV"; - ns[1].id = "SOAP-ENC"; - ns[2].id = "xsi"; - if (ns[0].ns) - { if (!strcmp(ns[0].ns, soap_env1)) - soap->version = 1; - else - soap->version = 2; - } - soap->local_namespaces = ns; - } - } - } -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_element(struct soap *soap, const char *tag, int id, const char *type) -{ struct Namespace *ns = soap->local_namespaces; - register const char *s; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Element begin tag='%s' id='%d' type='%s'\n", tag, id, type?type:"")); -/**/ -#ifdef WITH_DOM - if (soap->mode & SOAP_XML_DOM) - { register struct soap_dom_element *p, *e = (struct soap_dom_element*)soap_malloc(soap, sizeof(struct soap_dom_element)); - e->next = NULL; - e->prnt = soap->dom; - e->nstr = NULL; - e->name = soap_strdup(soap, tag); /* check EOM? */ - e->data = NULL; - e->type = 0; - e->node = NULL; - e->elts = NULL; - e->atts = NULL; - if (soap->dom) - { p = soap->dom->elts; - if (p) - { while (p->next) - p = p->next; - p->next = e; - } - else - soap->dom->elts = e; - } - soap->dom = e; - } - else -#endif -{ - soap->level++; - if (!soap->ns && !(soap->mode & SOAP_XML_CANONICAL)) - if (soap_send(soap, "")) - return soap->error; - if (soap_send_raw(soap, "<", 1)) - return soap->error; - s = tag; - if (ns && soap->part != SOAP_IN_ENVELOPE && (soap->part == SOAP_IN_HEADER || !soap->encodingStyle)) - { register const char *t = strchr(s, ':'); - if (t) - { s = t + 1; - for (ns++; ns->id; ns++) - { if ((ns->out || ns->ns) && !strncmp(ns->id, tag, t - tag) && !ns->id[t - tag]) - { if (soap_send(soap, s) || soap_attribute(soap, "xmlns", ns->out ? ns->out : ns->ns)) - return soap->error; - s = NULL; - break; - } - } - } - } - if (s) - if (soap_send(soap, tag)) - return soap->error; -} -/**/ - if (!soap->ns) - { for (ns = soap->local_namespaces; ns && ns->id; ns++) - { if (*ns->id && (ns->out || ns->ns)) - { sprintf(soap->tmpbuf, "xmlns:%s", ns->id); - if (soap_attribute(soap, soap->tmpbuf, ns->out ? ns->out : ns->ns)) - return soap->error; - } - } - soap->ns = 1; - } - if (id > 0) - { sprintf(soap->tmpbuf, "_%d", id); - if (soap_attribute(soap, "id", soap->tmpbuf)) - return soap->error; - } - if (type && *type) - { if (soap_attribute(soap, "xsi:type", type)) - return soap->error; - } - if (soap->null && soap->position > 0) - { int i; - sprintf(soap->tmpbuf, "[%d", soap->positions[0]); - for (i = 1; i < soap->position; i++) - sprintf(soap->tmpbuf + strlen(soap->tmpbuf), ",%d", soap->positions[i]); - strcat(soap->tmpbuf, "]"); - if (soap_attribute(soap, "SOAP-ENC:position", soap->tmpbuf)) - return soap->error; - } - if (soap->mustUnderstand) - { if (soap->actor && *soap->actor) - { if (soap_attribute(soap, soap->version == 2 ? "SOAP-ENV:role" : "SOAP-ENV:actor", soap->actor)) - return soap->error; - } - if (soap_attribute(soap, "SOAP-ENV:mustUnderstand", soap->version == 2 ? "true" : "1")) - return soap->error; - soap->mustUnderstand = 0; - } - if (soap->encoding) - { if (soap->encodingStyle) - { if (!*soap->encodingStyle && soap->local_namespaces) - { if (soap->local_namespaces[1].out) - soap->encodingStyle = soap->local_namespaces[1].out; - else - soap->encodingStyle = soap->local_namespaces[1].ns; - } - if (soap_attribute(soap, "SOAP-ENV:encodingStyle", soap->encodingStyle)) - return soap->error; - } - soap->encoding = 0; - } - soap->null = 0; - soap->position = 0; - return SOAP_OK; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_element_begin_out(struct soap *soap, const char *tag, int id, const char *type) -{ if (*tag == '-') - return SOAP_OK; - if (soap_element(soap, tag, id, type)) - return soap->error; - return soap_element_start_end_out(soap, NULL); -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -#ifndef HAVE_STRRCHR -SOAP_FMAC1 -char* -SOAP_FMAC2 -soap_strrchr(const char *s, int t) -{ register char *r = NULL; - while (*s) - if (*s++ == t) - r = (char*)s - 1; - return r; -} -#endif -#endif - -/******************************************************************************/ -#ifndef PALM_2 -#ifndef HAVE_STRTOL -SOAP_FMAC1 -long -SOAP_FMAC2 -soap_strtol(const char *s, char **t, int b) -{ register long n = 0; - register int c; - while (*s > 0 && *s <= 32) - s++; - if (b == 10) - { short neg = 0; - if (*s == '-') - { s++; - neg = 1; - } - else if (*s == '+') - s++; - while ((c = *s) && c >= '0' && c <= '9') - { if (n > 214748364) - break; - n *= 10; - n += c - '0'; - s++; - } - if (neg) - n = -n; - } - else /* b == 16 and value is always positive */ - { while ((c = *s)) - { if (c >= '0' && c <= '9') - c -= '0'; - else if (c >= 'A' && c <= 'F') - c -= 'A' - 10; - else if (c >= 'a' && c <= 'f') - c -= 'a' - 10; - if (n > 0x07FFFFFF) - break; - n <<= 4; - n += c; - s++; - } - } - if (t) - *t = (char*)s; - return n; -} -#endif -#endif - -/******************************************************************************/ -#ifndef PALM_2 -#ifndef HAVE_STRTOUL -SOAP_FMAC1 -unsigned long -SOAP_FMAC2 -soap_strtoul(const char *s, char **t, int b) -{ unsigned long n = 0; - register int c; - while (*s > 0 && *s <= 32) - s++; - if (b == 10) - { if (*s == '+') - s++; - while ((c = *s) && c >= '0' && c <= '9') - { if (n > 429496729) - break; - n *= 10; - n += c - '0'; - s++; - } - } - else /* b == 16 */ - { while ((c = *s)) - { if (c >= '0' && c <= '9') - c -= '0'; - else if (c >= 'A' && c <= 'F') - c -= 'A' - 10; - else if (c >= 'a' && c <= 'f') - c -= 'a' - 10; - if (n > 0x0FFFFFFF) - break; - n <<= 4; - n += c; - s++; - } - } - if (t) - *t = (char*)s; - return n; -} -#endif -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_array_begin_out(struct soap *soap, const char *tag, int id, const char *type, const char *offset) -{ if (soap_element(soap, tag, id, "SOAP-ENC:Array")) - return soap->error; - if (soap->version == 2) - { const char *s; - s = soap_strrchr(type, '['); - if ((size_t)(s - type) < sizeof(soap->tmpbuf)) - { strncpy(soap->tmpbuf, type, s - type); - soap->tmpbuf[s - type] = '\0'; - if (type && *type && (soap_attribute(soap, "SOAP-ENC:itemType", soap->tmpbuf))) - return soap->error; - if (s && (soap_attribute(soap, "SOAP-ENC:arraySize", s + 1))) - return soap->error; - } - } - else - { if (offset && (soap_attribute(soap, "SOAP-ENC:offset", offset))) - return soap->error; - if (type && *type && (soap_attribute(soap, "SOAP-ENC:arrayType", type))) - return soap->error; - } - return soap_element_start_end_out(soap, NULL); -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_element_start_end_out(struct soap *soap, const char *tag) -{ register struct soap_attribute *tp; -/**/ -#ifdef WITH_DOM - if ((soap->mode & SOAP_XML_DOM) && soap->dom) - { for (tp = soap->attributes; tp; tp = tp->next) - { if (tp->visible) - { register struct soap_dom_attribute *a = (struct soap_dom_attribute*)soap_malloc(soap, sizeof(struct soap_dom_attribute)); - a->next = soap->dom->atts; - a->nstr = NULL; - a->name = soap_strdup(soap, tp->name); /* check EOM */ - a->data = soap_strdup(soap, tp->value); /* check EOM */ - a->wide = NULL; - soap->dom->atts = a; - tp->visible = 0; - } - } - return SOAP_OK; - } -#endif -/**/ - for (tp = soap->attributes; tp; tp = tp->next) - { if (tp->visible) - { if (soap_send_raw(soap, " ", 1) - || soap_send(soap, tp->name)) - return soap->error; - if (tp->visible == 2 && tp->value) - if (soap_send_raw(soap, "=\"", 2) - || soap_string_out(soap, tp->value, 1) - || soap_send_raw(soap, "\"", 1)) - return soap->error; - tp->visible = 0; - } - } - if (tag) - { soap->level--; -#ifndef WITH_LEAN - if (soap->mode & SOAP_XML_CANONICAL) - { if (soap_send_raw(soap, ">", 1) - || soap_element_end_out(soap, tag)) - return soap->error; - return SOAP_OK; - } -#endif - return soap_send_raw(soap, "/>", 2); - } - return soap_send_raw(soap, ">", 1); -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_element_end_out(struct soap *soap, const char *tag) -{ if (*tag == '-') - return SOAP_OK; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Element ending tag='%s'\n", tag)); -/**/ -#ifdef WITH_DOM - if ((soap->mode & SOAP_XML_DOM) && soap->dom) - { if (soap->dom->prnt) - soap->dom = soap->dom->prnt; - return SOAP_OK; - } -#endif -/**/ - if (soap->part != SOAP_IN_ENVELOPE && (soap->part == SOAP_IN_HEADER || !soap->encodingStyle) && soap->local_namespaces) - { const char *s = strchr(tag, ':'); - if (s && strncmp(tag, "SOAP-ENV", s - tag)) - tag = s + 1; - } - soap->level--; - if (soap_send_raw(soap, "", 1)) - return soap->error; - return SOAP_OK; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_element_ref(struct soap *soap, const char *tag, int id, int href) -{ int n = 0; - if (soap_element(soap, tag, id, NULL)) - return soap->error; - if (soap->version == 2) - n = 1; - sprintf(soap->tmpbuf, "#_%d", href); - if (soap_attribute(soap, "href" + n, soap->tmpbuf + n) - || soap_element_start_end_out(soap, tag)) - return soap->error; - return SOAP_OK; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_element_href(struct soap *soap, const char *tag, int id, const char *href) -{ if (soap_element(soap, tag, id, NULL) - || soap_attribute(soap, "href", href) - || soap_element_start_end_out(soap, tag)) - return soap->error; - return SOAP_OK; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_element_null(struct soap *soap, const char *tag, int id, const char *type) -{ struct soap_attribute *tp; - for (tp = soap->attributes; tp; tp = tp->next) - if (tp->visible) - break; - if (tp || (soap->version == 2 && soap->position > 0) || id > 0 || (soap->mode & SOAP_XML_NIL)) - { if (soap_element(soap, tag, id, type)) - return soap->error; - if (soap->part != SOAP_IN_HEADER && soap->encodingStyle) - if (soap_attribute(soap, "xsi:nil", "true")) - return soap->error; - return soap_element_start_end_out(soap, tag); - } - soap->null = 1; - soap->position = 0; - soap->mustUnderstand = 0; - return SOAP_OK; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_element_result(struct soap *soap, const char *tag) -{ if (soap->version == 2 && soap->encodingStyle) - if (soap_element(soap, "SOAP-RPC:result", 0, NULL) - || soap_attribute(soap, "xmlns:SOAP-RPC", soap_rpc) - || soap_element_start_end_out(soap, NULL) - || soap_string_out(soap, tag, 0) - || soap_element_end_out(soap, "SOAP-RPC:result")) - return soap->error; - return SOAP_OK; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_attribute(struct soap *soap, const char *name, const char *value) -{ -/**/ -#ifdef WITH_DOM - if ((soap->mode & SOAP_XML_DOM) && soap->dom) - { register struct soap_dom_attribute *a = (struct soap_dom_attribute*)soap_malloc(soap, sizeof(struct soap_dom_attribute)); - a->next = soap->dom->atts; - a->nstr = NULL; - a->name = soap_strdup(soap, name); /* check EOM */ - a->data = soap_strdup(soap, value); /* check EOM */ - a->wide = NULL; - soap->dom->atts = a; - return SOAP_OK; - } -#endif -/**/ -#ifndef WITH_LEAN - if (soap->mode & SOAP_XML_CANONICAL) - { if (soap_set_attr(soap, name, value)) - return soap->error; - } - else -#endif - { if (soap_send_raw(soap, " ", 1) - || soap_send(soap, name)) - return soap->error; - if (value) - if (soap_send_raw(soap, "=\"", 2) - || soap_string_out(soap, value, 1) - || soap_send_raw(soap, "\"", 1)) - return soap->error; - } - return SOAP_OK; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_element_begin_in(struct soap *soap, const char *tag) -{ if (tag && *tag == '-') - return SOAP_OK; - if (!soap_peek_element(soap)) - { if (soap->other) - return soap->error = SOAP_TAG_MISMATCH; - if (!(soap->error = soap_match_tag(soap, soap->tag, tag))) - { if (tag && !soap->encodingStyle) - { const char *s = strchr(tag, ':'); - if (s) - soap_push_default_namespace(soap, tag, s - tag); - } - soap->peeked = 0; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Begin element found (level=%u) '%s'='%s'\n", soap->level, soap->tag, tag?tag:"" )); - if (soap->body) - soap->level++; - } - } - return soap->error; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_element_end_in(struct soap *soap, const char *tag) -{ register wchar c; - register char *s; - register const char *t; - if (tag && *tag == '-') - return SOAP_OK; - soap->level--; - soap_pop_namespace(soap); - if (soap->peeked) - { if (*soap->tag == '\0') - { soap->peeked = 0; - soap->error = SOAP_OK; - } - else - return soap->error = SOAP_SYNTAX_ERROR; - } - else - { while (((c = soap_get(soap)) != TT)) - { if ((int)c == EOF) - return soap->error = SOAP_EOF; - if (c == LT) - return soap->error = SOAP_SYNTAX_ERROR; - } - } - s = soap->tag; - do c = soap_get(soap); - while (soap_blank(c)); - do - { *s++ = (char)c; - c = soap_get(soap); - } while (soap_notblank(c)); - *s = '\0'; - if ((int)c == EOF) - return soap->error = SOAP_EOF; - while (soap_blank(c)) - c = soap_get(soap); - if (c != GT) - return soap->error = SOAP_SYNTAX_ERROR; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "End element found (level=%u) '%s'='%s'\n", soap->level, soap->tag, tag?tag:"")); - if (!tag) - return SOAP_OK; - if ((s = strchr(soap->tag, ':'))) - s++; - else - s = soap->tag; - if ((t = strchr(tag, ':'))) - t++; - else - t = tag; - if (!SOAP_STRCMP(s, t)) - return SOAP_OK; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "End element does not match\n")); - return soap->error = SOAP_SYNTAX_ERROR; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -struct soap_attribute * -SOAP_FMAC2 -soap_attr(struct soap *soap, const char *name) -{ register struct soap_attribute *tp; - for (tp = soap->attributes; tp; tp = tp->next) - if (!soap_match_tag(soap, tp->name, name)) - return tp; - return NULL; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -const char * -SOAP_FMAC2 -soap_attr_value(struct soap *soap, const char *name) -{ register struct soap_attribute *tp = soap_attr(soap, name); - if (tp && tp->visible == 2) - return tp->value; - return NULL; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_set_attr(struct soap *soap, const char *name, const char *value) -{ register struct soap_attribute *tp; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Set attribute %s='%s'\n", name, value?value:"")); - for (tp = soap->attributes; tp; tp = tp->next) - if (!strcmp(tp->name, name)) - break; - if (!tp) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Allocate attribute %s\n", name)); - if (!(tp = (struct soap_attribute*)SOAP_MALLOC(sizeof(struct soap_attribute) + strlen(name)))) - return soap->error = SOAP_EOM; - tp->ns = NULL; -#ifndef WITH_LEAN - if (soap->mode & SOAP_XML_CANONICAL) - { struct soap_attribute **tpp = &soap->attributes; - const char *s = strchr(name, ':'); - if (!strncmp(name, "xmlns", 5)) - { for (; *tpp; tpp = &(*tpp)->next) - if (strncmp((*tpp)->name, "xmlns", 5) || strcmp((*tpp)->name + 5, name + 5) > 0) - break; - } - else if (!s) - { for (; *tpp; tpp = &(*tpp)->next) - if (strncmp((*tpp)->name, "xmlns", 5) && ((*tpp)->ns || strcmp((*tpp)->name, name) > 0)) - break; - } - else - { int k; - for (; *tpp; tpp = &(*tpp)->next) - { if (!strncmp((*tpp)->name, "xmlns:", 6) && !strncmp((*tpp)->name + 6, name, s - name) && !(*tpp)->name[6 + s - name]) - { if (!tp->ns) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Canonicalization: prefix %s=%p(%s)\n", name, (*tpp)->ns, (*tpp)->ns)); - tp->ns = (*tpp)->ns; - } - } - else if (strncmp((*tpp)->name, "xmlns", 5) && (*tpp)->ns && tp->ns && ((k = strcmp((*tpp)->ns, tp->ns)) > 0 || (!k && strcmp((*tpp)->name, name) > 0))) - break; - } - } - tp->next = *tpp; - *tpp = tp; - } - else -#endif - { tp->next = soap->attributes; - soap->attributes = tp; - } - strcpy(tp->name, name); - tp->value = NULL; - } - else if (value && tp->value && tp->size <= strlen(value)) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Free attribute value of %s (free %p)\n", name, tp->value)); - SOAP_FREE(tp->value); - tp->value = NULL; - tp->ns = NULL; - } - if (value) - { if (!tp->value) - { tp->size = strlen(value) + 1; - if (!(tp->value = (char*)SOAP_MALLOC(tp->size))) - return soap->error = SOAP_EOM; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Allocate attribute value of %s (%p)\n", tp->name, tp->value)); - } - strcpy(tp->value, value); - if (!strncmp(tp->name, "xmlns:", 6)) - tp->ns = tp->value; - tp->visible = 2; - } - else - tp->visible = 1; - return SOAP_OK; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_clr_attr(struct soap *soap) -{ register struct soap_attribute *tp; -#ifndef WITH_LEAN - if (soap->mode & SOAP_XML_CANONICAL) - { while (soap->attributes) - { tp = soap->attributes->next; - SOAP_FREE(soap->attributes->value); - SOAP_FREE(soap->attributes); - soap->attributes = tp; - } - } - else -#endif - { for (tp = soap->attributes; tp; tp = tp->next) - tp->visible = 0; - } -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -static int -soap_getattrval(struct soap *soap, char *s, size_t n, wchar d) -{ size_t i; - wchar c; - for (i = 0; i < n; i++) - { c = soap_getutf8(soap); - switch (c) - { - case TT: - *s++ = '<'; - soap_unget(soap, '/'); - break; - case LT: - *s++ = '<'; - break; - case GT: - if (d == ' ') - { soap_unget(soap, c); - *s = '\0'; - return SOAP_OK; - } - *s++ = '>'; - break; - case QT: - if (c == d) - { *s = '\0'; - return SOAP_OK; - } - *s++ = '"'; - break; - case AP: - if (c == d) - { *s = '\0'; - return SOAP_OK; - } - *s++ = '\''; - break; - case '\t': - case '\n': - case '\r': - case ' ': - case '/': - if (d == ' ') - { soap_unget(soap, c); - *s = '\0'; - return SOAP_OK; - } - default: - if ((int)c == EOF) - return soap->error = SOAP_EOF; - *s++ = (char)c; - } - } - return soap->error = SOAP_EOM; -} -#endif - -/******************************************************************************/ -#ifdef WITH_FAST -#ifndef PALM_2 -static int -soap_append_lab(struct soap *soap, const char *s, size_t n) -{ if (soap->labidx + n >= soap->lablen) - { register char *t = soap->labbuf; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Enlarging look-aside buffer to append data, old size=%lu", (unsigned long)soap->lablen)); - if (soap->lablen == 0) - soap->lablen = SOAP_LABLEN; - while (soap->labidx + n >= soap->lablen) - soap->lablen <<= 1; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, ", new size=%lu\n", (unsigned long)soap->lablen)); - soap->labbuf = (char*)SOAP_MALLOC(soap->lablen); - if (!soap->labbuf) - { if (t) - free(t); - return soap->error = SOAP_EOM; - } - if (t && soap->labidx) - { memcpy(soap->labbuf, t, soap->labidx); - free(t); - } - } - if (s) - { memcpy(soap->labbuf + soap->labidx, s, n); - soap->labidx += n; - } - return SOAP_OK; -} -#endif -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_peek_element(struct soap *soap) -{ struct soap_attribute *tp; - const char *t; - register char *s; - register wchar c; - register int i; - if (soap->peeked) - { if (*soap->tag == '\0') - return soap->error = SOAP_NO_TAG; - return SOAP_OK; - } - soap->peeked = 1; - for (;;) - { while (((c = soap_get(soap)) != LT) && c != TT) - { if ((int)c == EOF) - return soap->error = SOAP_EOF; - } - if (c == TT) - { *soap->tag = '\0'; - return soap->error = SOAP_NO_TAG; /* ending tag found */ - } - s = soap->tag; - do c = soap_get(soap); - while (soap_blank(c)); - i = sizeof(soap->tag); - while (c != '/' && soap_notblank(c)) - { if (--i > 0) - *s++ = (char)c; - c = soap_get(soap); - } - while (soap_blank(c)) - c = soap_get(soap); - *s = '\0'; - if (*soap->tag != '?') - break; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "XML PI <%s?>\n", soap->tag)); - while ((int)c != EOF && c != GT && c != '?') - { s = soap->tmpbuf; - i = sizeof(soap->tmpbuf) - 2; - while (c != '=' && c != GT && c != '?' && soap_notblank(c)) - { if (--i > 0) - *s++ = (char)c; - c = soap_get(soap); - } - while (soap_blank(c)) - c = soap_get(soap); - if (c == '=') - { *s++ = '='; - do c = soap_get(soap); - while (soap_blank(c)); - if (c != QT && c != AP) - { soap_unget(soap, c); - c = ' '; /* blank delimiter */ - } - if (soap_getattrval(soap, s, i, c) == SOAP_EOM) - while (soap_getattrval(soap, soap->tmpbuf, sizeof(soap->tmpbuf), c) == SOAP_EOM) - ; - else if (!strcmp(soap->tag, "?xml") && (!soap_tag_cmp(soap->tmpbuf, "encoding=iso-8859-1") || !soap_tag_cmp(soap->tmpbuf, "encoding=latin1"))) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "XML latin1 encoding\n")); - soap->mode |= SOAP_C_LATIN; - } - } - do c = soap_get(soap); - while (soap_blank(c)); - } - } - soap->id[0] = '\0'; - soap->href[0] = '\0'; - soap->type[0] = '\0'; - soap->arrayType[0] = '\0'; - soap->arraySize[0] = '\0'; - soap->arrayOffset[0] = '\0'; - soap->other = 0; - soap->root = -1; - soap->position = 0; - soap->null = 0; - soap->mustUnderstand = 0; - soap_clr_attr(soap); - soap_pop_namespace(soap); - while ((int)c != EOF && c != GT && c != '/') - { s = soap->tmpbuf; - i = sizeof(soap->tmpbuf); - while (c != '=' && c != '/' && soap_notblank(c)) - { if (--i > 0) - *s++ = (char)c; - c = soap_get(soap); - } - *s = '\0'; - if (i == sizeof(soap->tmpbuf)) - return soap->error = SOAP_SYNTAX_ERROR; - if (!strncmp(soap->tmpbuf, "xmlns:", 6)) - { soap->tmpbuf[5] = '\0'; - t = soap->tmpbuf + 6; - } - else if (!strcmp(soap->tmpbuf, "xmlns")) - t = SOAP_STR_EOS; - else - t = NULL; - tp = soap_attr(soap, soap->tmpbuf); - if (!tp) - { tp = (struct soap_attribute*)SOAP_MALLOC(sizeof(struct soap_attribute) + strlen(soap->tmpbuf)); - if (!tp) - return soap->error = SOAP_EOM; - strcpy(tp->name, soap->tmpbuf); - tp->value = NULL; - tp->size = 0; - tp->next = soap->attributes; - soap->attributes = tp; - } - while (soap_blank(c)) - c = soap_get(soap); - if (c == '=') - { do c = soap_get(soap); - while (soap_blank(c)); - if (c != QT && c != AP) - { soap_unget(soap, c); - c = ' '; /* blank delimiter */ - } - if (soap_getattrval(soap, tp->value, tp->size, c)) - { -#ifdef WITH_FAST - if (soap->error != SOAP_EOM) - return soap->error; - soap->error = SOAP_OK; - soap->labidx = 0; - if (soap_append_lab(soap, tp->value, tp->size)) - return soap->error; - SOAP_FREE(tp->value); - for (;;) - { if (soap_getattrval(soap, soap->labbuf + soap->labidx, soap->lablen - soap->labidx, c)) - { if (soap->error != SOAP_EOM) - return soap->error; - soap->error = SOAP_OK; - soap->labidx = soap->lablen; - if (soap_append_lab(soap, NULL, 0)) - return soap->error; - } - else - break; - } - tp->size = soap->lablen; - if (!(tp->value = (char*)SOAP_MALLOC(tp->size))) - return soap->error = SOAP_EOM; - memcpy(tp->value, soap->labbuf, soap->lablen); -#else - size_t n; - if (soap->error != SOAP_EOM) - return soap->error; - soap->error = SOAP_OK; - if (soap_new_block(soap)) - return soap->error; - for (;;) - { if (!(s = (char*)soap_push_block(soap, SOAP_BLKLEN))) - return soap->error; - if (soap_getattrval(soap, s, SOAP_BLKLEN, c)) - { if (soap->error != SOAP_EOM) - return soap->error; - soap->error = SOAP_OK; - } - else - break; - } - n = tp->size + soap->blist->size; - if (!(s = (char*)SOAP_MALLOC(n))) - return soap->error = SOAP_EOM; - if (tp->value) - { memcpy(s, tp->value, tp->size); - SOAP_FREE(tp->value); - } - soap_save_block(soap, s + tp->size); - tp->value = s; - tp->size = n; -#endif - } - do c = soap_get(soap); - while (soap_blank(c)); - tp->visible = 2; /* seen this attribute w/ value */ - } - else - tp->visible = 1; /* seen this attribute w/o value */ - if (t && tp->value) - { if (soap_push_namespace(soap, t, tp->value)) - return soap->error; - tp->visible = 0; - } - } - if ((int)c == EOF) - return soap->error = SOAP_EOF; - for (tp = soap->attributes; tp; tp = tp->next) - { if (tp->visible && tp->value) - { if (!strcmp(tp->name, "id")) - { if (soap->part != SOAP_IN_HEADER || !soap->dot_net_bug) - { *soap->id = '#'; - strncpy(soap->id + 1, tp->value, sizeof(soap->id) - 2); - } - } - else if (soap->version == 1 && !strcmp(tp->name, "href")) - strncpy(soap->href, tp->value, sizeof(soap->href) - 1); - else if (soap->version == 2 && !strcmp(tp->name, "ref")) - { *soap->href = '#'; - strncpy(soap->href + 1, tp->value, sizeof(soap->href) - 2); - } - else if (!soap_match_tag(soap, tp->name, "xsi:type")) - strncpy(soap->type, tp->value, sizeof(soap->type) - 1); - else if (soap->version == 1 && !soap_match_tag(soap, tp->name, "SOAP-ENC:arrayType")) - { s = soap_strrchr(tp->value, '['); - if (s && (size_t)(s - tp->value) < sizeof(soap->arrayType)) - { strncpy(soap->arrayType, tp->value, s - tp->value); - soap->arrayType[s - tp->value] = '\0'; - strncpy(soap->arraySize, s, sizeof(soap->arraySize) - 1); - } - else - strncpy(soap->arrayType, tp->value, sizeof(soap->arrayType) - 1); - } - else if (soap->version == 2 && !soap_match_tag(soap, tp->name, "SOAP-ENC:itemType")) - strncpy(soap->arrayType, tp->value, sizeof(soap->arrayType) - 1); - else if (soap->version == 2 && !soap_match_tag(soap, tp->name, "SOAP-ENC:arraySize")) - strncpy(soap->arraySize, tp->value, sizeof(soap->arraySize) - 1); - else if (soap->version == 1 && !soap_match_tag(soap, tp->name, "SOAP-ENC:offset")) - strncpy(soap->arrayOffset, tp->value, sizeof(soap->arrayOffset)); - else if (soap->version == 1 && !soap_match_tag(soap, tp->name, "SOAP-ENC:position")) - soap->position = soap_getposition(tp->value, soap->positions); - else if (soap->version == 1 && !soap_match_tag(soap, tp->name, "SOAP-ENC:root")) - soap->root = ((!strcmp(tp->value, "1") || !strcmp(tp->value, "true"))); - else if (!soap_match_tag(soap, tp->name, "SOAP-ENV:actor") - || !soap_match_tag(soap, tp->name, "SOAP-ENV:role")) - { if ((!soap->actor || strcmp(soap->actor, tp->value)) - && strcmp(tp->value, "http://schemas.xmlsoap.org/soap/actor/next") - && strcmp(tp->value, "http://www.w3.org/2003/05/soap-envelope/role/next")) - soap->other = 1; - } - else if (!soap_match_tag(soap, tp->name, "SOAP-ENV:mustUnderstand") - && (!strcmp(tp->value, "1") || !strcmp(tp->value, "true"))) - soap->mustUnderstand = 1; - else if ((!soap_match_tag(soap, tp->name, "xsi:null") - || !soap_match_tag(soap, tp->name, "xsi:nil")) - && (!strcmp(tp->value, "1") - || !strcmp(tp->value, "true"))) - soap->null = 1; - } - } - if (!(soap->body = (c != '/'))) - do c = soap_get(soap); - while (soap_blank(c)); - return SOAP_OK; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_retry(struct soap *soap) -{ soap->peeked = 1; - soap->error = SOAP_OK; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_revert(struct soap *soap) -{ soap->peeked = 1; - if (soap->body) - soap->level--; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Reverting last element (level=%u)\n", soap->level)); -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_string_out(struct soap *soap, const char *s, int flag) -{ register const char *t; - register wchar c; - register wchar mask = 0x80000000; -#ifdef WITH_DOM - if ((soap->mode & SOAP_XML_DOM) && soap->dom) - { soap->dom->data = soap_strdup(soap, s); /* check EOM */ - return SOAP_OK; - } -#endif - if (soap->mode & SOAP_C_UTFSTRING) - mask = 0; - t = s; - while ((c = *t++)) - { switch (c) - { - case 9: - if (flag) - { if (soap_send_raw(soap, s, t - s - 1) || soap_send_raw(soap, " ", 5)) - return soap->error; - s = t; - } - break; - case 10: - if (flag || !(soap->mode & SOAP_XML_CANONICAL)) - { if (soap_send_raw(soap, s, t - s - 1) || soap_send_raw(soap, " ", 5)) - return soap->error; - s = t; - } - break; - case 13: - if (soap_send_raw(soap, s, t - s - 1) || soap_send_raw(soap, " ", 5)) - return soap->error; - s = t; - break; - case '&': - if (soap_send_raw(soap, s, t - s - 1) || soap_send_raw(soap, "&", 5)) - return soap->error; - s = t; - break; - case '<': - if (soap_send_raw(soap, s, t - s - 1) || soap_send_raw(soap, "<", 4)) - return soap->error; - s = t; - break; - case '>': - if (!flag) - { if (soap_send_raw(soap, s, t - s - 1) || soap_send_raw(soap, ">", 4)) - return soap->error; - s = t; - } - break; - case '"': - if (flag) - { if (soap_send_raw(soap, s, t - s - 1) || soap_send_raw(soap, """, 6)) - return soap->error; - s = t; - } - break; - default: -#ifdef HAVE_MBTOWC - if (soap->mode & SOAP_C_MBSTRING) - { wchar_t wc; - register int m = mbtowc(&wc, t - 1, MB_CUR_MAX); - if (m > 0 && wc != c) - { if (soap_send_raw(soap, s, t - s - 1) || soap_pututf8(soap, wc)) - return soap->error; - s = t + m - 1; - continue; - } - } -#endif - if (c & mask) - { if (soap_send_raw(soap, s, t - s - 1) || soap_pututf8(soap, (unsigned char)c)) - return soap->error; - s = t; - } - } - } - return soap_send_raw(soap, s, t - s - 1); -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -char * -SOAP_FMAC2 -soap_string_in(struct soap *soap, int flag) -{ register char *s; - char *t = NULL; - register size_t i; - register int n = 0; - register int m = 0; - register wchar c; -#ifdef HAVE_WCTOMB - char buf[MB_LEN_MAX > 8 ? MB_LEN_MAX : 8]; -#else - char buf[8]; -#endif -#ifdef WITH_CDATA - if (!flag) - { register int state = 0; -#ifdef WITH_FAST - soap->labidx = 0; /* use look-aside buffer */ -#else - if (soap_new_block(soap)) - return NULL; -#endif - for (;;) - { -#ifdef WITH_FAST - register size_t k; - if (soap_append_lab(soap, NULL, 0)) /* allocate more space in look-aside buffer if necessary */ - return NULL; - s = soap->labbuf + soap->labidx; /* space to populate */ - k = soap->lablen - soap->labidx; /* number of bytes available */ - soap->labidx = soap->lablen; /* claim this space */ -#else - register size_t k = SOAP_BLKLEN; - if (!(s = (char*)soap_push_block(soap, k))) - return NULL; -#endif - for (i = 0; i < k; i++) - { if (m > 0) - { *s++ = *t++; /* copy multibyte characters */ - m--; - continue; - } - c = soap_getchar(soap); - if ((int)c == EOF) - goto end; - if (c >= 0x80 && !(soap->mode & SOAP_C_LATIN)) - { soap_unget(soap, c); - c = soap_getutf8(soap); - if (soap->mode & SOAP_C_UTFSTRING) - { if ((c & 0x80000000) && c >= -0x7FFFFF80 && c < AP) - { c &= 0x7FFFFFFF; - t = buf; - if (c < 0x0800) - *t++ = (char)(0xC0 | ((c >> 6) & 0x1F)); - else - { if (c < 0x010000) - *t++ = (char)(0xE0 | ((c >> 12) & 0x0F)); - else - { if (c < 0x200000) - *t++ = (char)(0xF0 | ((c >> 18) & 0x07)); - else - { if (c < 0x04000000) - *t++ = (char)(0xF8 | ((c >> 24) & 0x03)); - else - { *t++ = (char)(0xFC | ((c >> 30) & 0x01)); - *t++ = (char)(0x80 | ((c >> 24) & 0x3F)); - } - *t++ = (char)(0x80 | ((c >> 18) & 0x3F)); - } - *t++ = (char)(0x80 | ((c >> 12) & 0x3F)); - } - *t++ = (char)(0x80 | ((c >> 6) & 0x3F)); - } - *t++ = (char)(0x80 | (c & 0x3F)); - m = (int)(t - buf) - 1; - t = buf; - *s++ = *t++; - continue; - } - } - } - switch (state) - { case 1: - if (c == ']') - state = 4; - *s++ = c; - continue; - case 2: - if (c == '-') - state = 6; - *s++ = c; - continue; - case 3: - if (c == '?') - state = 8; - *s++ = c; - continue; - /* CDATA */ - case 4: - if (c == ']') - state = 5; - else - state = 1; - *s++ = c; - continue; - case 5: - if (c == '>') - state = 0; - else - state = 1; - *s++ = c; - continue; - /* comment */ - case 6: - if (c == '-') - state = 7; - else - state = 2; - *s++ = c; - continue; - case 7: - if (c == '>') - state = 0; - else - state = 2; - *s++ = c; - continue; - /* PI */ - case 8: - if (c == '>') - state = 0; - else - state = 3; - *s++ = c; - continue; - } - switch (c) - { - case '/': - if (n > 0) - { c = soap_get1(soap); - if (c == '>') - n--; - soap_unget(soap, c); - } - *s++ = '/'; - break; - case '<': - c = soap_get1(soap); - if (c == '/') - { if (n == 0) - { c = TT; - goto end; - } - n--; - } - else if (c == '!') - { c = soap_get1(soap); - if (c == '[') - { do c = soap_get1(soap); - while ((int)c != EOF && c != '['); - if ((int)c == EOF) - goto end; - t = (char*)"![CDATA["; - state = 1; - } - else if (c == '-') - { if ((c = soap_get1(soap)) == '-') - state = 2; - t = (char*)"!-"; - soap_unget(soap, c); - } - else - { t = (char*)"!"; - soap_unget(soap, c); - } - *s++ = '<'; - break; - } - else if (c == '?') - state = 3; - else - n++; - soap_unget(soap, c); - *s++ = '<'; - break; - case '>': - *s++ = '>'; - break; - case '"': - *s++ = '"'; - break; - default: -#ifdef HAVE_WCTOMB - if (soap->mode & SOAP_C_MBSTRING) - { m = wctomb(buf, c & 0x7FFFFFFF); - if (m >= 1) - { t = buf; - *s++ = *t++; - m--; - } - else - *s++ = SOAP_UNKNOWN_CHAR; - } - else -#endif - *s++ = (char)(c & 0xFF); - } - } - } - } -#endif -#ifdef WITH_FAST - soap->labidx = 0; /* use look-aside buffer */ -#else - if (soap_new_block(soap)) - return NULL; -#endif - for (;;) - { -#ifdef WITH_FAST - register size_t k; - if (soap_append_lab(soap, NULL, 0)) /* allocate more space in look-aside buffer if necessary */ - return NULL; - s = soap->labbuf + soap->labidx; /* space to populate */ - k = soap->lablen - soap->labidx; /* number of bytes available */ - soap->labidx = soap->lablen; /* claim this space */ -#else - register size_t k = SOAP_BLKLEN; - if (!(s = (char*)soap_push_block(soap, k))) - return NULL; -#endif - for (i = 0; i < k; i++) - { if (m > 0) - { *s++ = *t++; /* copy multibyte characters */ - m--; - continue; - } - if (soap->mode & SOAP_C_UTFSTRING) - { if (((c = soap_get(soap)) & 0x80000000) && c >= -0x7FFFFF80 && c < AP) - { c &= 0x7FFFFFFF; - t = buf; - if (c < 0x0800) - *t++ = (char)(0xC0 | ((c >> 6) & 0x1F)); - else - { if (c < 0x010000) - *t++ = (char)(0xE0 | ((c >> 12) & 0x0F)); - else - { if (c < 0x200000) - *t++ = (char)(0xF0 | ((c >> 18) & 0x07)); - else - { if (c < 0x04000000) - *t++ = (char)(0xF8 | ((c >> 24) & 0x03)); - else - { *t++ = (char)(0xFC | ((c >> 30) & 0x01)); - *t++ = (char)(0x80 | ((c >> 24) & 0x3F)); - } - *t++ = (char)(0x80 | ((c >> 18) & 0x3F)); - } - *t++ = (char)(0x80 | ((c >> 12) & 0x3F)); - } - *t++ = (char)(0x80 | ((c >> 6) & 0x3F)); - } - *t++ = (char)(0x80 | (c & 0x3F)); - m = (int)(t - buf) - 1; - t = buf; - *s++ = *t++; - continue; - } - } - else if (soap->mode & SOAP_C_LATIN) - c = soap_get(soap); - else - c = soap_getutf8(soap); - switch (c) - { - case TT: - if (n == 0) - goto end; - n--; - *s++ = '<'; - soap_unget(soap, '/'); - break; - case LT: - n++; - *s++ = '<'; - break; - case GT: - *s++ = '>'; - break; - case QT: - *s++ = '"'; - break; - case AP: - *s++ = '\''; - break; - case '/': - if (n > 0) - { c = soap_get(soap); - if (c == GT) - n--; - soap_unget(soap, c); - } - *s++ = '/'; - break; - case '<': - if (flag) - *s++ = '<'; - else - { *s++ = '&'; - t = (char*)"lt;"; - } - break; - case '>': - if (flag) - *s++ = '>'; - else - { *s++ = '&'; - t = (char*)"gt;"; - } - break; - case '"': - if (flag) - *s++ = '"'; - else - { *s++ = '&'; - t = (char*)"quot;"; - } - break; - default: - if ((int)c == EOF) - goto end; -#ifdef HAVE_WCTOMB - if (soap->mode & SOAP_C_MBSTRING) - { m = wctomb(buf, c & 0x7FFFFFFF); - if (m >= 1) - { t = buf; - *s++ = *t++; - m--; - } - else - *s++ = SOAP_UNKNOWN_CHAR; - } - else -#endif - *s++ = (char)(c & 0xFF); - } - } - } -end: - soap_unget(soap, c); - *s = '\0'; -#ifdef WITH_FAST - t = soap_strdup(soap, soap->labbuf); -#else - soap_size_block(soap, i+1); - t = soap_save_block(soap, NULL); -#endif - if (flag == 2) - if (soap_s2QName(soap, t, &t)) - return NULL; - return t; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_wstring_out(struct soap *soap, const wchar_t *s, int flag) -{ const char *t; - char tmp; - register wchar c; -#ifdef WITH_DOM - if ((soap->mode & SOAP_XML_DOM) && soap->dom) - { soap->dom->wide = NULL; /* soap_malloc() ??? */ - return SOAP_OK; - } -#endif - while ((c = *s++)) - { switch (c) - { - case 9: - if (flag) - t = " "; - else - t = "\t"; - break; - case 10: - if (flag || !(soap->mode & SOAP_XML_CANONICAL)) - t = " "; - else - t = "\n"; - break; - case 13: - t = " "; - break; - case '&': - t = "&"; - break; - case '<': - t = "<"; - break; - case '>': - if (flag) - t = ">"; - else - t = ">"; - break; - case '"': - if (flag) - t = """; - else - t = "\""; - break; - default: - if (c > 0 && c < 0x80) - { tmp = (char)c; - if (soap_send_raw(soap, &tmp, 1)) - return soap->error; - } - else if (soap_pututf8(soap, (unsigned long)c)) - return soap->error; - continue; - } - if (soap_send(soap, t)) - return soap->error; - } - return SOAP_OK; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -wchar_t * -SOAP_FMAC2 -soap_wstring_in(struct soap *soap, int flag) -{ wchar_t *s; - register int i, n = 0; - register wchar c; - const char *t = NULL; - if (soap_new_block(soap)) - return NULL; - for (;;) - { if (!(s = (wchar_t*)soap_push_block(soap, sizeof(wchar_t)*SOAP_BLKLEN))) - return NULL; - for (i = 0; i < SOAP_BLKLEN; i++) - { if (t) - { *s++ = (wchar_t)*t++; - if (!*t) - t = NULL; - continue; - } - if (soap->mode & SOAP_C_LATIN) - c = soap_get(soap); - else - c = soap_getutf8(soap); - switch (c) - { - case TT: - if (n == 0) - goto end; - n--; - *s++ = '<'; - soap_unget(soap, '/'); - break; - case LT: - n++; - *s++ = '<'; - break; - case GT: - *s++ = '>'; - break; - case QT: - *s++ = '"'; - break; - case AP: - *s++ = '\''; - break; - case '/': - if (n > 0) - { c = soap_getutf8(soap); - if (c == GT) - n--; - soap_unget(soap, c); - } - *s++ = '/'; - break; - case '<': - if (flag) - *s++ = (wchar)'<'; - else - { *s++ = (wchar)'&'; - t = "lt;"; - } - break; - case '>': - if (flag) - *s++ = (wchar)'>'; - else - { *s++ = (wchar)'&'; - t = "gt;"; - } - break; - case '"': - if (flag) - *s++ = (wchar)'"'; - else - { *s++ = (wchar)'&'; - t = "quot;"; - } - break; - default: - if ((int)c == EOF) - goto end; - *s++ = (wchar_t)c & 0x7FFFFFFF; - } - } - } -end: - soap_unget(soap, c); - *s = '\0'; - soap_size_block(soap, sizeof(wchar_t) * (i + 1)); - return (wchar_t*)soap_save_block(soap, NULL); -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -const char* -SOAP_FMAC2 -soap_int2s(struct soap *soap, int n) -{ return soap_long2s(soap, (long)n); -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_outint(struct soap *soap, const char *tag, int id, const int *p, const char *type, int n) -{ long m = (long)*p; - return soap_outlong(soap, tag, id, &m, type, n); -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_s2int(struct soap *soap, const char *s, int *p) -{ if (s) - { char *r; - *p = (int)soap_strtol(s, &r, 10); - if (*r) - return soap->error = SOAP_TYPE; - } - return SOAP_OK; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int * -SOAP_FMAC2 -soap_inint(struct soap *soap, const char *tag, int *p, const char *type, int t) -{ if (soap_element_begin_in(soap, tag)) - return NULL; - if (soap->null) - { if (soap->mode & SOAP_XML_NIL) - { soap->error = SOAP_NULL; - return NULL; - } - return p; - } - if (*soap->type - && soap_match_tag(soap, soap->type, type) - && soap_match_tag(soap, soap->type, ":int") - && soap_match_tag(soap, soap->type, ":short") - && soap_match_tag(soap, soap->type, ":byte")) - { soap->error = SOAP_TYPE; - soap_revert(soap); - return NULL; - } - p = (int*)soap_id_enter(soap, soap->id, p, t, sizeof(int), 0); - if (p && soap->body && !*soap->href) - soap_s2int(soap, soap_value(soap), p); - else - p = (int*)soap_id_forward(soap, soap->href, p, t, sizeof(int)); - if (soap->body && soap_element_end_in(soap, tag)) - return NULL; - return p; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -const char* -SOAP_FMAC2 -soap_long2s(struct soap *soap, long n) -{ sprintf(soap->tmpbuf, "%ld", n); - return soap->tmpbuf; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_outlong(struct soap *soap, const char *tag, int id, const long *p, const char *type, int n) -{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type) - || soap_string_out(soap, soap_long2s(soap, *p), 0)) - return soap->error; - return soap_element_end_out(soap, tag); -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_s2long(struct soap *soap, const char *s, long *p) -{ if (s) - { char *r; - *p = soap_strtol(s, &r, 10); - if (*r) - return soap->error = SOAP_TYPE; - } - return SOAP_OK; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -long * -SOAP_FMAC2 -soap_inlong(struct soap *soap, const char *tag, long *p, const char *type, int t) -{ if (soap_element_begin_in(soap, tag)) - return NULL; - if (soap->null) - { if (soap->mode & SOAP_XML_NIL) - { soap->error = SOAP_NULL; - return NULL; - } - return p; - } - if (*soap->type - && soap_match_tag(soap, soap->type, type) - && soap_match_tag(soap, soap->type, ":int") - && soap_match_tag(soap, soap->type, ":short") - && soap_match_tag(soap, soap->type, ":byte")) - { soap->error = SOAP_TYPE; - soap_revert(soap); - return NULL; - } - p = (long*)soap_id_enter(soap, soap->id, p, t, sizeof(long), 0); - if (p && soap->body && !*soap->href) - soap_s2long(soap, soap_value(soap), p); - else - p = (long*)soap_id_forward(soap, soap->href, p, t, sizeof(long)); - if (soap->body && soap_element_end_in(soap, tag)) - return NULL; - return p; -} -#endif - -/******************************************************************************/ -#ifndef WITH_LEAN -SOAP_FMAC1 -const char* -SOAP_FMAC2 -soap_LONG642s(struct soap *soap, LONG64 n) -{ sprintf(soap->tmpbuf, SOAP_LONG_FORMAT, n); - return soap->tmpbuf; -} -#endif - -/******************************************************************************/ -#ifndef WITH_LEAN -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_outLONG64(struct soap *soap, const char *tag, int id, const LONG64 *p, const char *type, int n) -{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type) - || soap_string_out(soap, soap_LONG642s(soap, *p), 0)) - return soap->error; - return soap_element_end_out(soap, tag); -} -#endif - -/******************************************************************************/ -#ifndef WITH_LEAN -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_s2LONG64(struct soap *soap, const char *s, LONG64 *p) -{ if (s && sscanf(s, SOAP_LONG_FORMAT, p) != 1) - return soap->error = SOAP_TYPE; - return SOAP_OK; -} -#endif - -/******************************************************************************/ -#ifndef WITH_LEAN -SOAP_FMAC1 -LONG64 * -SOAP_FMAC2 -soap_inLONG64(struct soap *soap, const char *tag, LONG64 *p, const char *type, int t) -{ if (soap_element_begin_in(soap, tag)) - return NULL; - if (soap->null) - { if (soap->mode & SOAP_XML_NIL) - { soap->error = SOAP_NULL; - return NULL; - } - return p; - } - if (*soap->type - && soap_match_tag(soap, soap->type, type) - && soap_match_tag(soap, soap->type, ":integer") - && soap_match_tag(soap, soap->type, ":positiveInteger") - && soap_match_tag(soap, soap->type, ":negativeInteger") - && soap_match_tag(soap, soap->type, ":nonPositiveInteger") - && soap_match_tag(soap, soap->type, ":nonNegativeInteger") - && soap_match_tag(soap, soap->type, ":long") - && soap_match_tag(soap, soap->type, ":int") - && soap_match_tag(soap, soap->type, ":short") - && soap_match_tag(soap, soap->type, ":byte")) - { soap->error = SOAP_TYPE; - soap_revert(soap); - return NULL; - } - p = (LONG64*)soap_id_enter(soap, soap->id, p, t, sizeof(LONG64), 0); - if (soap->body && !*soap->href) - soap_s2LONG64(soap, soap_value(soap), p); - else - p = (LONG64*)soap_id_forward(soap, soap->href, p, t, sizeof(LONG64)); - if (soap->body && soap_element_end_in(soap, tag)) - return NULL; - return p; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -const char* -SOAP_FMAC2 -soap_byte2s(struct soap *soap, char n) -{ return soap_long2s(soap, (long)n); -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_outbyte(struct soap *soap, const char *tag, int id, const char *p, const char *type, int n) -{ long m = (long)*p; - return soap_outlong(soap, tag, id, &m, type, n); -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_s2byte(struct soap *soap, const char *s, char *p) -{ if (s) - { long n; - char *r; - n = soap_strtol(s, &r, 10); - if (*r || n < -128 || n > 127) - return soap->error = SOAP_TYPE; - *p = (char)n; - } - return SOAP_OK; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -char * -SOAP_FMAC2 -soap_inbyte(struct soap *soap, const char *tag, char *p, const char *type, int t) -{ if (soap_element_begin_in(soap, tag)) - return NULL; - if (soap->null) - { if (soap->mode & SOAP_XML_NIL) - { soap->error = SOAP_NULL; - return NULL; - } - return p; - } - if (*soap->type - && soap_match_tag(soap, soap->type, type) - && soap_match_tag(soap, soap->type, ":byte")) - { soap->error = SOAP_TYPE; - soap_revert(soap); - return NULL; - } - p = (char*)soap_id_enter(soap, soap->id, p, t, sizeof(char), 0); - if (soap->body && !*soap->href) - soap_s2byte(soap, soap_value(soap), p); - else - p = (char*)soap_id_forward(soap, soap->href, p, t, sizeof(char)); - if (soap->body && soap_element_end_in(soap, tag)) - return NULL; - return p; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -const char* -SOAP_FMAC2 -soap_short2s(struct soap *soap, short n) -{ return soap_long2s(soap, (long)n); -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_outshort(struct soap *soap, const char *tag, int id, const short *p, const char *type, int n) -{ long m = (long)*p; - return soap_outlong(soap, tag, id, &m, type, n); -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_s2short(struct soap *soap, const char *s, short *p) -{ if (s) - { long n; - char *r; - n = soap_strtol(s, &r, 10); - if (*r || n < -32768 || n > 32767) - return soap->error = SOAP_TYPE; - *p = (char)n; - } - return SOAP_OK; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -short * -SOAP_FMAC2 -soap_inshort(struct soap *soap, const char *tag, short *p, const char *type, int t) -{ if (soap_element_begin_in(soap, tag)) - return NULL; - if (soap->null) - { if (soap->mode & SOAP_XML_NIL) - { soap->error = SOAP_NULL; - return NULL; - } - return p; - } - if (*soap->type - && soap_match_tag(soap, soap->type, type) - && soap_match_tag(soap, soap->type, ":short") - && soap_match_tag(soap, soap->type, ":byte")) - { soap->error = SOAP_TYPE; - soap_revert(soap); - return NULL; - } - p = (short*)soap_id_enter(soap, soap->id, p, t, sizeof(short), 0); - if (soap->body && !*soap->href) - soap_s2short(soap, soap_value(soap), p); - else - p = (short*)soap_id_forward(soap, soap->href, p, t, sizeof(short)); - if (soap->body && soap_element_end_in(soap, tag)) - return NULL; - return p; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -const char* -SOAP_FMAC2 -soap_float2s(struct soap *soap, float n) -{ const char *s; - if (isnan(n)) - s = "NaN"; - else if (n >= FLT_PINFTY) - s = "INF"; - else if (n <= FLT_NINFTY) - s = "-INF"; - else - { sprintf(soap->tmpbuf, soap->float_format, n); - s = soap->tmpbuf; - } - return s; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_outfloat(struct soap *soap, const char *tag, int id, const float *p, const char *type, int n) -{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type) - || soap_string_out(soap, soap_float2s(soap, *p), 0)) - return soap->error; - return soap_element_end_out(soap, tag); -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_s2float(struct soap *soap, const char *s, float *p) -{ if (s) - { if (!soap_tag_cmp(s, "INF")) - *p = FLT_PINFTY; - else if (!soap_tag_cmp(s, "+INF")) - *p = FLT_PINFTY; - else if (!soap_tag_cmp(s, "-INF")) - *p = FLT_NINFTY; - else if (!soap_tag_cmp(s, "NaN")) - *p = FLT_NAN; - else - { -#ifdef HAVE_STRTOD - char *r; - *p = (float)strtod(s, &r); - if (*r) -#endif - if (sscanf(s, soap->float_format, p) != 1) - return soap->error = SOAP_TYPE; - } - } - return SOAP_OK; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -static int soap_isnumeric(struct soap *soap, const char *type) -{ if (soap_match_tag(soap, soap->type, type) - && soap_match_tag(soap, soap->type, ":float") - && soap_match_tag(soap, soap->type, ":double") - && soap_match_tag(soap, soap->type, ":decimal") - && soap_match_tag(soap, soap->type, ":integer") - && soap_match_tag(soap, soap->type, ":positiveInteger") - && soap_match_tag(soap, soap->type, ":negativeInteger") - && soap_match_tag(soap, soap->type, ":nonPositiveInteger") - && soap_match_tag(soap, soap->type, ":nonNegativeInteger") - && soap_match_tag(soap, soap->type, ":long") - && soap_match_tag(soap, soap->type, ":int") - && soap_match_tag(soap, soap->type, ":short") - && soap_match_tag(soap, soap->type, ":byte") - && soap_match_tag(soap, soap->type, ":unsignedLong") - && soap_match_tag(soap, soap->type, ":unsignedInt") - && soap_match_tag(soap, soap->type, ":unsignedShort") - && soap_match_tag(soap, soap->type, ":unsignedByte")) - { soap->error = SOAP_TYPE; - soap_revert(soap); - return SOAP_ERR; - } - return SOAP_OK; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -float * -SOAP_FMAC2 -soap_infloat(struct soap *soap, const char *tag, float *p, const char *type, int t) -{ if (soap_element_begin_in(soap, tag)) - return NULL; - if (soap->null) - { if (soap->mode & SOAP_XML_NIL) - { soap->error = SOAP_NULL; - return NULL; - } - return p; - } - if (*soap->type != '\0' && soap_isnumeric(soap, type)) - return NULL; - p = (float*)soap_id_enter(soap, soap->id, p, t, sizeof(float), 0); - if (soap->body && !*soap->href) - soap_s2float(soap, soap_value(soap), p); - else - p = (float*)soap_id_forward(soap, soap->href, p, t, sizeof(float)); - if (soap->body && soap_element_end_in(soap, tag)) - return NULL; - return p; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -const char* -SOAP_FMAC2 -soap_double2s(struct soap *soap, double n) -{ const char *s; - if (isnan(n)) - s = "NaN"; - else if (n >= DBL_PINFTY) - s = "INF"; - else if (n <= DBL_NINFTY) - s = "-INF"; - else - { sprintf(soap->tmpbuf, soap->double_format, n); - s = soap->tmpbuf; - } - return s; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_outdouble(struct soap *soap, const char *tag, int id, const double *p, const char *type, int n) -{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type) - || soap_string_out(soap, soap_double2s(soap, *p), 0)) - return soap->error; - return soap_element_end_out(soap, tag); -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_s2double(struct soap *soap, const char *s, double *p) -{ if (s) - { if (!soap_tag_cmp(s, "INF")) - *p = DBL_PINFTY; - else if (!soap_tag_cmp(s, "+INF")) - *p = DBL_PINFTY; - else if (!soap_tag_cmp(s, "-INF")) - *p = DBL_NINFTY; - else if (!soap_tag_cmp(s, "NaN")) - *p = DBL_NAN; - else - { -#ifdef HAVE_STRTOD - char *r; - *p = strtod(s, &r); - if (*r) -#endif - if (sscanf(s, soap->double_format, p) != 1) - return soap->error = SOAP_TYPE; - } - } - return SOAP_OK; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -double * -SOAP_FMAC2 -soap_indouble(struct soap *soap, const char *tag, double *p, const char *type, int t) -{ if (soap_element_begin_in(soap, tag)) - return NULL; - if (soap->null) - { if (soap->mode & SOAP_XML_NIL) - { soap->error = SOAP_NULL; - return NULL; - } - return p; - } - if (*soap->type != '\0' && soap_isnumeric(soap, type)) - return NULL; - p = (double*)soap_id_enter(soap, soap->id, p, t, sizeof(double), 0); - if (soap->body && !*soap->href) - soap_s2double(soap, soap_value(soap), p); - else - p = (double*)soap_id_forward(soap, soap->href, p, t, sizeof(double)); - if (soap->body && soap_element_end_in(soap, tag)) - return NULL; - return p; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -const char* -SOAP_FMAC2 -soap_unsignedByte2s(struct soap *soap, unsigned char n) -{ return soap_unsignedLong2s(soap, (unsigned long)n); -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_outunsignedByte(struct soap *soap, const char *tag, int id, const unsigned char *p, const char *type, int n) -{ unsigned long m = (unsigned long)*p; - return soap_outunsignedLong(soap, tag, id, &m, type, n); -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_s2unsignedByte(struct soap *soap, const char *s, unsigned char *p) -{ if (s) - { unsigned long n; - char *r; - n = soap_strtoul(s, &r, 10); - if (*r || n > 255) - return soap->error = SOAP_TYPE; - *p = (unsigned char)n; - } - return SOAP_OK; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -unsigned char * -SOAP_FMAC2 -soap_inunsignedByte(struct soap *soap, const char *tag, unsigned char *p, const char *type, int t) -{ if (soap_element_begin_in(soap, tag)) - return NULL; - if (soap->null) - { if (soap->mode & SOAP_XML_NIL) - { soap->error = SOAP_NULL; - return NULL; - } - return p; - } - if (*soap->type - && soap_match_tag(soap, soap->type, type) - && soap_match_tag(soap, soap->type, ":unsignedByte")) - { soap->error = SOAP_TYPE; - soap_revert(soap); - return NULL; - } - p = (unsigned char*)soap_id_enter(soap, soap->id, p, t, sizeof(unsigned char), 0); - if (soap->body && !*soap->href) - soap_s2unsignedByte(soap, soap_value(soap), p); - else - p = (unsigned char*)soap_id_forward(soap, soap->href, p, t, sizeof(unsigned char)); - if (soap->body && soap_element_end_in(soap, tag)) - return NULL; - return p; -} -#endif - -/******************************************************************************/ -#ifndef WITH_LEAN -SOAP_FMAC1 -const char* -SOAP_FMAC2 -soap_unsignedShort2s(struct soap *soap, unsigned short n) -{ return soap_unsignedLong2s(soap, (unsigned long)n); -} -#endif - -/******************************************************************************/ -#ifndef WITH_LEAN -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_outunsignedShort(struct soap *soap, const char *tag, int id, const unsigned short *p, const char *type, int n) -{ unsigned long m = (unsigned long)*p; - return soap_outunsignedLong(soap, tag, id, &m, type, n); -} -#endif - -/******************************************************************************/ -#ifndef WITH_LEAN -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_s2unsignedShort(struct soap *soap, const char *s, unsigned short *p) -{ if (s) - { unsigned long n; - char *r; - n = soap_strtoul(s, &r, 10); - if (*r || n > 65535) - return soap->error = SOAP_TYPE; - *p = (unsigned short)n; - } - return SOAP_OK; -} -#endif - -/******************************************************************************/ -#ifndef WITH_LEAN -SOAP_FMAC1 -unsigned short * -SOAP_FMAC2 -soap_inunsignedShort(struct soap *soap, const char *tag, unsigned short *p, const char *type, int t) -{ if (soap_element_begin_in(soap, tag)) - return NULL; - if (soap->null) - { if (soap->mode & SOAP_XML_NIL) - { soap->error = SOAP_NULL; - return NULL; - } - return p; - } - if (*soap->type - && soap_match_tag(soap, soap->type, type) - && soap_match_tag(soap, soap->type, ":unsignedShort") - && soap_match_tag(soap, soap->type, ":unsignedByte")) - { soap->error = SOAP_TYPE; - soap_revert(soap); - return NULL; - } - p = (unsigned short*)soap_id_enter(soap, soap->id, p, t, sizeof(unsigned short), 0); - if (soap->body && !*soap->href) - soap_s2unsignedShort(soap, soap_value(soap), p); - else - p = (unsigned short*)soap_id_forward(soap, soap->href, p, t, sizeof(unsigned short)); - if (soap->body && soap_element_end_in(soap, tag)) - return NULL; - return p; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -const char* -SOAP_FMAC2 -soap_unsignedInt2s(struct soap *soap, unsigned int n) -{ return soap_unsignedLong2s(soap, (unsigned long)n); -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_outunsignedInt(struct soap *soap, const char *tag, int id, const unsigned int *p, const char *type, int n) -{ unsigned long m = (unsigned long)*p; - return soap_outunsignedLong(soap, tag, id, &m, type, n); -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_s2unsignedInt(struct soap *soap, const char *s, unsigned int *p) -{ if (s) - { char *r; - *p = (unsigned int)soap_strtoul(s, &r, 10); - if (*r) - return soap->error = SOAP_TYPE; - } - return SOAP_OK; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -unsigned int * -SOAP_FMAC2 -soap_inunsignedInt(struct soap *soap, const char *tag, unsigned int *p, const char *type, int t) -{ if (soap_element_begin_in(soap, tag)) - return NULL; - if (soap->null) - { if (soap->mode & SOAP_XML_NIL) - { soap->error = SOAP_NULL; - return NULL; - } - return p; - } - if (*soap->type - && soap_match_tag(soap, soap->type, type) - && soap_match_tag(soap, soap->type, ":unsignedInt") - && soap_match_tag(soap, soap->type, ":unsignedShort") - && soap_match_tag(soap, soap->type, ":unsignedByte")) - { soap->error = SOAP_TYPE; - soap_revert(soap); - return NULL; - } - p = (unsigned int*)soap_id_enter(soap, soap->id, p, t, sizeof(unsigned int), 0); - if (soap->body && !*soap->href) - soap_s2unsignedInt(soap, soap_value(soap), p); - else - p = (unsigned int*)soap_id_forward(soap, soap->href, p, t, sizeof(unsigned int)); - if (soap->body && soap_element_end_in(soap, tag)) - return NULL; - return p; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -const char* -SOAP_FMAC2 -soap_unsignedLong2s(struct soap *soap, unsigned long n) -{ sprintf(soap->tmpbuf, "%lu", n); - return soap->tmpbuf; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_outunsignedLong(struct soap *soap, const char *tag, int id, const unsigned long *p, const char *type, int n) -{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type) - || soap_string_out(soap, soap_unsignedLong2s(soap, *p), 0)) - return soap->error; - return soap_element_end_out(soap, tag); -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_s2unsignedLong(struct soap *soap, const char *s, unsigned long *p) -{ if (s) - { char *r; - *p = soap_strtoul(s, &r, 10); - if (*r) - return soap->error = SOAP_TYPE; - } - return SOAP_OK; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -unsigned long * -SOAP_FMAC2 -soap_inunsignedLong(struct soap *soap, const char *tag, unsigned long *p, const char *type, int t) -{ if (soap_element_begin_in(soap, tag)) - return NULL; - if (soap->null) - { if (soap->mode & SOAP_XML_NIL) - { soap->error = SOAP_NULL; - return NULL; - } - return p; - } - if (*soap->type - && soap_match_tag(soap, soap->type, type) - && soap_match_tag(soap, soap->type, ":unsignedInt") - && soap_match_tag(soap, soap->type, ":unsignedShort") - && soap_match_tag(soap, soap->type, ":unsignedByte")) - { soap->error = SOAP_TYPE; - soap_revert(soap); - return NULL; - } - p = (unsigned long*)soap_id_enter(soap, soap->id, p, t, sizeof(unsigned long), 0); - if (soap->body && !*soap->href) - soap_s2unsignedLong(soap, soap_value(soap), p); - else - p = (unsigned long*)soap_id_forward(soap, soap->href, p, t, sizeof(unsigned long)); - if (soap->body && soap_element_end_in(soap, tag)) - return NULL; - return p; -} -#endif - -/******************************************************************************/ -#ifndef WITH_LEAN -SOAP_FMAC1 -const char* -SOAP_FMAC2 -soap_ULONG642s(struct soap *soap, ULONG64 n) -{ sprintf(soap->tmpbuf, SOAP_ULONG_FORMAT, n); - return soap->tmpbuf; -} -#endif - -/******************************************************************************/ -#ifndef WITH_LEAN -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_outULONG64(struct soap *soap, const char *tag, int id, const ULONG64 *p, const char *type, int n) -{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type) - || soap_string_out(soap, soap_ULONG642s(soap, *p), 0)) - return soap->error; - return soap_element_end_out(soap, tag); -} -#endif - -/******************************************************************************/ -#ifndef WITH_LEAN -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_s2ULONG64(struct soap *soap, const char *s, ULONG64 *p) -{ if (s && sscanf(s, SOAP_ULONG_FORMAT, p) != 1) - return soap->error = SOAP_TYPE; - return SOAP_OK; -} -#endif - -/******************************************************************************/ -#ifndef WITH_LEAN -SOAP_FMAC1 -ULONG64 * -SOAP_FMAC2 -soap_inULONG64(struct soap *soap, const char *tag, ULONG64 *p, const char *type, int t) -{ if (soap_element_begin_in(soap, tag)) - return NULL; - if (soap->null) - { if (soap->mode & SOAP_XML_NIL) - { soap->error = SOAP_NULL; - return NULL; - } - return p; - } - if (*soap->type - && soap_match_tag(soap, soap->type, type) - && soap_match_tag(soap, soap->type, ":positiveInteger") - && soap_match_tag(soap, soap->type, ":nonNegativeInteger") - && soap_match_tag(soap, soap->type, ":unsignedLong") - && soap_match_tag(soap, soap->type, ":unsignedInt") - && soap_match_tag(soap, soap->type, ":unsignedShort") - && soap_match_tag(soap, soap->type, ":unsignedByte")) - { soap->error = SOAP_TYPE; - soap_revert(soap); - return NULL; - } - p = (ULONG64*)soap_id_enter(soap, soap->id, p, t, sizeof(ULONG64), 0); - if (soap->body && !*soap->href) - soap_s2ULONG64(soap, soap_value(soap), p); - else - p = (ULONG64*)soap_id_forward(soap, soap->href, p, t, sizeof(ULONG64)); - if (soap->body && soap_element_end_in(soap, tag)) - return NULL; - return p; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_s2string(struct soap *soap, const char *s, char **t) -{ *t = NULL; - if (s && !(*t = soap_strdup(soap, s))) - return soap->error = SOAP_EOM; - return SOAP_OK; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_s2QName(struct soap *soap, const char *s, char **t) -{ if (s) - { struct soap_nlist *np = soap->nlist; - const char *p = strchr(s, ':'); - if (p) - { int n = p - s; - while (np && (np->index == -2 || strncmp(np->id, s, n) || np->id[n])) - np = np->next; - p++; - } - else - { while (np && *np->id) - np = np->next; - p = s; - } - if (np) - { if (np->index >= 0 && soap->local_namespaces) - { const char *q = soap->local_namespaces[np->index].id; - if (q) - { if ((*t = (char*)soap_malloc(soap, strlen(p) + strlen(q) + 2))) - sprintf(*t, "%s:%s", q, p); - return SOAP_OK; - } - } - if (np->ns) - { if ((*t = (char*)soap_malloc(soap, strlen(p) + strlen(np->ns) + 4))) - sprintf(*t, "\"%s\":%s", np->ns, p); - return SOAP_OK; - } - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Namespace prefix of '%s' not defined (index=%d, URI=%s)\n", s, np->index, np->ns?np->ns:"")); - return soap->error = SOAP_NAMESPACE; - } - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Namespace prefix of '%s' not defined, assuming empty namespace\n", s)); - if ((*t = (char*)soap_malloc(soap, strlen(p) + 4))) - sprintf(*t, "\"\":%s", p); - } - return SOAP_OK; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -const char* -SOAP_FMAC2 -soap_QName2s(struct soap *soap, const char *s) -{ struct Namespace *p; - char *t; - int n; - if (!s || *s != '"') - return s; - s++; - if ((p = soap->local_namespaces)) - { for (; p->id; p++) - { if (p->ns) - if (!soap_tag_cmp(s, p->ns)) - break; - if (p->in) - if (!soap_tag_cmp(s, p->in)) - break; - } - if (p && p->id) - { s = strchr(s, '"'); - if (s) - { t = (char*)soap_malloc(soap, strlen(p->id) + strlen(s)); - strcpy(t, p->id); - strcat(t, s + 1); - return t; - } - } - } - t = (char*)strchr(s, '"'); - if (t) - n = t - s; - else - n = 0; - t = soap_strdup(soap, s); - t[n] = '\0'; - sprintf(soap->tmpbuf, "xmlns:_%lu", soap->idnum++); - soap_set_attr(soap, soap->tmpbuf, t); - s = strchr(s, '"'); - if (s) - { t = (char*)soap_malloc(soap, strlen(soap->tmpbuf) + strlen(s) - 6); - strcpy(t, soap->tmpbuf + 6); - strcat(t, s + 1); - } - return t; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_outstring(struct soap *soap, const char *tag, int id, char *const*p, const char *type, int n) -{ if (!*p) - { if (soap_element_null(soap, tag, id, type)) - return soap->error; - } - else - { struct soap_plist *pp; - int i = soap_pointer_lookup(soap, *p, n, &pp); - if (id > 0) - { if (i) - { if (soap_element_begin_out(soap, tag, id, type) || soap_string_out(soap, *p, 0) || soap_element_end_out(soap, tag)) - return soap->error; - soap_set_embedded(soap, pp); - } - else - { i = soap_pointer_enter(soap, *p, n, &pp); - if (soap_element_begin_out(soap, tag, id, type) || soap_string_out(soap, *p, 0) || soap_element_end_out(soap, tag)) - return soap->error; - if (soap->mode & SOAP_IO_LENGTH) - pp->mark1 = 0; - else - pp->mark2 = 0; - } - } - else if (i) - { if (soap_is_embedded(soap, pp)) - { if (soap_element_ref(soap, tag, 0, i)) - return soap->error; - } - else if (soap_is_single(soap, pp)) - { if (soap_element_begin_out(soap, tag, 0, type) || soap_string_out(soap, *p, 0) || soap_element_end_out(soap, tag)) - return soap->error; - } - else - { if (soap_element_begin_out(soap, tag, i, type) || soap_string_out(soap, *p, 0) || soap_element_end_out(soap, tag)) - return soap->error; - soap_set_embedded(soap, pp); - } - } - else - { soap_pointer_enter(soap, *p, n, &pp); - if (soap_element_begin_out(soap, tag, id, type) || soap_string_out(soap, *p, 0) || soap_element_end_out(soap, tag)) - return soap->error; - if (soap->mode & SOAP_IO_LENGTH) - pp->mark1 = 0; - else - pp->mark2 = 0; - } - } - return SOAP_OK; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -char ** -SOAP_FMAC2 -soap_instring(struct soap *soap, const char *tag, char **p, const char *type, int t, int flag) -{ if (soap_element_begin_in(soap, tag)) - return NULL; - if (soap->null) - { p = (char**)soap_id_enter(soap, soap->id, p, t, sizeof(char**), 0); - if (p) - *p = NULL; - } - else if (soap->body && !*soap->href) - { if (soap_match_tag(soap, soap->type, "PointerTostring") == 0) - { p = (char**)soap_id_enter(soap, soap->id, p, t, sizeof(char**), 0); - p = (char**)soap_instring(soap, "string", p, type, t, flag); - } - else - { if (!p) - if ((p = (char**)soap_id_enter(soap, SOAP_STR_EOS, p, t, sizeof(char**), 0)) == NULL) - return NULL; - *p = (char*)soap_id_enter(soap, soap->id, soap_string_in(soap, flag), t, 0, 0); - } - } - else - p = (char**)soap_id_lookup(soap, soap->href, (void**)p, t, sizeof(char*), 0); - if (soap->body && soap_element_end_in(soap, tag)) - return NULL; - return p; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_outwstring(struct soap *soap, const char *tag, int id, wchar_t *const*p, const char *type, int n) -{ if (!*p) - { if (soap_element_null(soap, tag, id, type)) - return soap->error; - } - else - { struct soap_plist *pp; - int i = soap_pointer_lookup(soap, *p, n, &pp); - if (id > 0) - { if (i) - { if (soap_element_begin_out(soap, tag, id, type) || soap_wstring_out(soap, *p, 0) || soap_element_end_out(soap, tag)) - return soap->error; - soap_set_embedded(soap, pp); - } - else - { i = soap_pointer_enter(soap, *p, n, &pp); - if (soap_element_begin_out(soap, tag, id, type) || soap_wstring_out(soap, *p, 0) || soap_element_end_out(soap, tag)) - return soap->error; - if (soap->mode & SOAP_IO_LENGTH) - pp->mark1 = 0; - else - pp->mark2 = 0; - } - } - else if (i) - { if (soap_is_embedded(soap, pp)) - { if (soap_element_ref(soap, tag, 0, i)) - return soap->error; - } - else if (soap_is_single(soap, pp)) - { if (soap_element_begin_out(soap, tag, 0, type) || soap_wstring_out(soap, *p, 0) || soap_element_end_out(soap, tag)) - return soap->error; - } - else - { if (soap_element_begin_out(soap, tag, i, type) || soap_wstring_out(soap, *p, 0) || soap_element_end_out(soap, tag)) - return soap->error; - soap_set_embedded(soap, pp); - } - } - else - { if (soap_element_begin_out(soap, tag, id, type) || soap_wstring_out(soap, *p, 0) || soap_element_end_out(soap, tag)) - return soap->error; - if (soap->mode & SOAP_IO_LENGTH) - pp->mark1 = 0; - else - pp->mark2 = 0; - } - } - return SOAP_OK; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -wchar_t ** -SOAP_FMAC2 -soap_inwstring(struct soap *soap, const char *tag, wchar_t **p, const char *type, int t) -{ if (soap_element_begin_in(soap, tag)) - return NULL; - if (soap->null) - { p = (wchar_t**)soap_id_enter(soap, soap->id, p, t, sizeof(wchar_t**), 0); - if (p) - *p = NULL; - } - else if (soap->body && !*soap->href) - { if (soap_match_tag(soap, soap->type, "PointerTostring") == 0) - p = (wchar_t**)soap_inwstring(soap, "string", (wchar_t**)soap_id_enter(soap, soap->id, p, t, sizeof(wchar_t**), 0), type, t); - else - { if (!p) - if (!(p = (wchar_t**)soap_id_enter(soap, SOAP_STR_EOS, p, t, sizeof(wchar_t**), 0))) - return NULL; - *p = (wchar_t*)soap_id_enter(soap, soap->id, soap_wstring_in(soap, 1), t, 0, 0); - } - } - else - p = (wchar_t**)soap_id_lookup(soap, soap->href, (void**)p, t, sizeof(wchar_t*), 0); - if (soap->body && soap_element_end_in(soap, tag)) - return NULL; - return p; -} -#endif - -/******************************************************************************/ -#ifndef WITH_LEAN -static time_t -soap_timegm(struct tm *T) -{ -#if defined(HAVE_TIMEGM) - return timegm(T); -#elif defined(HAVE_GETTIMEOFDAY) - struct timezone t; - struct timeval tv; - gettimeofday(&tv, &t); /* doesn't work properly on Solaris */ - T->tm_min -= t.tz_minuteswest; - T->tm_isdst = (t.tz_dsttime != 0); - return mktime(T); -/* WR[ */ - /* The following define was added for VxWorks*/ -#elif defined(HAVE_MKTIME) - /* FOR VXWORKS: - vxWorks does not seem to have any variable representation of time zones, but - timezone information can be set in INSTALL_DIR/target/h/private/timeP.h header - file, by setting the ZONEBUFFER define. The ZONEBUFFER define follows this - format: - - name_of_zone:<(unused)>:time_in_minutes_from_UTC:daylight_start:daylight_end - - To calculate local time, the value of time_in_minutes_from_UTC is subtracted - from UTC; time_in_minutes_from_UTC must be positive. Daylight information is - expressed as mmddhh (month-day-hour), for example: - - UTC::0:040102:100102 - - */ - return mktime(T); -/* ]WR */ -#elif defined(HAVE_FTIME) - struct timeb t; - t.timezone = 0; - t.dstflag = -1; - ftime(&t); - T->tm_min -= t.timezone; - T->tm_isdst = t.dstflag; /* doesn't work properly on Solaris */ - return mktime(T); -#else -#warning "time_t (de)serialization is not MT safe on this platform" - time_t t; - char *tz = getenv("TZ"); - putenv("TZ=UTC"); - tzset(); - t = mktime(T); - if (tz) - { char tmp[16]; - strcpy(tmp, "TZ="); - strncat(tmp, tz, 12); - tmp[15] = '\0'; - putenv(tmp); - } - else - putenv("TZ="); - tzset(); - return t; -#endif -} -#endif - -/******************************************************************************/ -#ifndef WITH_LEAN -SOAP_FMAC1 -const char* -SOAP_FMAC2 -soap_dateTime2s(struct soap *soap, time_t n) -{ struct tm T; - struct tm *pT = &T; -#if defined(HAVE_GMTIME_R) - if (gmtime_r(&n, pT)) - strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%SZ", pT); -/* WR[ */ - /* The following defines were added for VxWorks*/ -#elif defined(HAVE_PGMTIME_R) - if (gmtime_r(&n, pT)) - strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%SZ", pT); -#elif defined(HAVE_PGMTIME) - if (gmtime(&n, pT)) - strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%SZ", pT); -/* ]WR */ -#elif defined(HAVE_GMTIME) - if ((pT = gmtime(&n))) - strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%SZ", pT); -#elif defined(HAVE_GETTIMEOFDAY) - struct timezone t; -#if defined(HAVE_LOCALTIME_R) - if (localtime_r(&n, pT)) - { struct timeval tv; - gettimeofday(&tv, &t); - strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%S", pT); - sprintf(soap->tmpbuf + strlen(soap->tmpbuf), "%+03d:%02d", -t.tz_minuteswest/60-(t.tz_dsttime!=0), abs(t.tz_minuteswest)%60); - } -#else - if ((pT = localtime(&n))) - { struct timeval tv; - gettimeofday(&tv, &t); - strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%S", pT); - sprintf(soap->tmpbuf + strlen(soap->tmpbuf), "%+03d:%02d", -t.tz_minuteswest/60-(t.tz_dsttime!=0), abs(t.tz_minuteswest)%60); - } -#endif -#elif defined(HAVE_FTIME) - struct timeb t; -#if defined(HAVE_LOCALTIME_R) - if (localtime_r(&n, pT)) - { ftime(&t); - strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%S", pT); - sprintf(soap->tmpbuf + strlen(soap->tmpbuf), "%+03d:%02d", -t.timezone/60-(t.dstflag!=0), abs(t.timezone)%60); - } -/* WR[ */ - /* The following defines were added for VxWorks*/ -#elif defined(HAVE_PLOCALTIME_R) - if (localtime_r(&n, pT)) - { strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%S", pT); - sprintf(soap->tmpbuf+strlen(soap->tmpbuf), "%+03d:%02d", t.timezone/60, abs(t.timezone)%60); - } -/* ]WR */ -#else - if ((pT = localtime(&n))) - { ftime(&t); - strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%S", pT); - sprintf(soap->tmpbuf + strlen(soap->tmpbuf), "%+03d:%02d", -t.timezone/60-(t.dstflag!=0), abs(t.timezone)%60); - } -#endif -#elif defined(HAVE_LOCALTIME_R) - if (localtime_r(&n, pT)) - strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%S", pT); -/* WR[ */ - /* The following defines were added for VxWorks*/ -#elif defined(HAVE_PLOCALTIME_R) - if (localtime_r(&n, pT)) - strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%S", pT); -/* ]WR */ -#else - if ((pT = localtime(&n))) - strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%S", pT); -#endif - else - strcpy(soap->tmpbuf, "1969-12-31T23:59:59Z"); - return soap->tmpbuf; -} -#endif - -/******************************************************************************/ -#ifndef WITH_LEAN -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_outdateTime(struct soap *soap, const char *tag, int id, const time_t *p, const char *type, int n) -{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type) - || soap_string_out(soap, soap_dateTime2s(soap, *p), 0)) - return soap->error; - return soap_element_end_out(soap, tag); -} -#endif - -/******************************************************************************/ -#ifndef WITH_LEAN -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_s2dateTime(struct soap *soap, const char *s, time_t *p) -{ if (s) - { struct tm T; - char zone[16]; - memset(&T, 0, sizeof(struct tm)); - zone[sizeof(zone)-1] = '\0'; - sscanf(s, "%d-%d-%dT%d:%d:%d%15s", &T.tm_year, &T.tm_mon, &T.tm_mday, &T.tm_hour, &T.tm_min, &T.tm_sec, zone); - if (T.tm_year == 1) - T.tm_year = 70; - else - T.tm_year -= 1900; - T.tm_mon--; - if (*zone) - { if (*zone == '.') - { for (s = zone + 1; *s; s++) - if (*s < '0' || *s > '9') - break; - } - else - s = zone; - if (*s != 'Z') - { int h = 0, m = 0; - sscanf(s, "%d:%d", &h, &m); - T.tm_hour -= h; - if (h >= 0) - T.tm_min -= m; - else - T.tm_min += m; - } - *p = soap_timegm(&T); - } - else - *p = mktime(&T); /* no time zone: suppose it is localtime? */ - } - return SOAP_OK; -} -#endif - -/******************************************************************************/ -#ifndef WITH_LEAN -SOAP_FMAC1 -time_t * -SOAP_FMAC2 -soap_indateTime(struct soap *soap, const char *tag, time_t *p, const char * type, int t) -{ if (soap_element_begin_in(soap, tag)) - return NULL; - if (soap->null) - { if (soap->mode & SOAP_XML_NIL) - { soap->error = SOAP_NULL; - return NULL; - } - return p; - } - if (*soap->type - && soap_match_tag(soap, soap->type, type) - && soap_match_tag(soap, soap->type, ":dateTime")) - { soap->error = SOAP_TYPE; - soap_revert(soap); - return NULL; - } - p = (time_t*)soap_id_enter(soap, soap->id, p, t, sizeof(time_t), 0); - if (soap->body && !*soap->href) - soap_s2dateTime(soap, soap_value(soap), p); - else - p = (time_t*)soap_id_forward(soap, soap->href, p, t, sizeof(time_t)); - if (soap->body && soap_element_end_in(soap, tag)) - return NULL; - return p; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_outliteral(struct soap *soap, const char *tag, char *const*p) -{ int i; - const char *t = NULL; - if (tag && *tag != '-') - { if ((t = strchr(tag, ':'))) - { strncpy(soap->tmpbuf, tag, t-tag); - soap->tmpbuf[t-tag] = '\0'; - for (i = 0; soap->local_namespaces[i].id; i++) - if (!strcmp(soap->tmpbuf, soap->local_namespaces[i].id)) - break; - t++; - sprintf(soap->tmpbuf, "<%s xmlns=\"%s\">", t, soap->local_namespaces[i].ns ? soap->local_namespaces[i].ns : SOAP_STR_EOS); - } - else - { t = tag; - sprintf(soap->tmpbuf, "<%s>", tag); - } - if (soap_send(soap, soap->tmpbuf)) - return soap->error; - } - if (p && *p) - { if (soap_send(soap, *p)) - return soap->error; - } - if (t) - { sprintf(soap->tmpbuf, "", t); - return soap_send(soap, soap->tmpbuf); - } - return SOAP_OK; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -char ** -SOAP_FMAC2 -soap_inliteral(struct soap *soap, const char *tag, char **p) -{ if (soap_element_begin_in(soap, tag)) - return NULL; - if (!p) - if (!(p = (char**)soap_malloc(soap, sizeof(char*)))) - return NULL; - if (soap->null) - *p = NULL; - else if (soap->body) - *p = soap_string_in(soap, 0); - else - *p = NULL; - if (soap->body && soap_element_end_in(soap, tag)) - return NULL; - return p; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_outwliteral(struct soap *soap, const char *tag, wchar_t *const*p) -{ int i; - const char *t = NULL; - wchar_t c; - const wchar_t *s; - if (tag && *tag != '-') - { if (tag && (t = strchr(tag, ':'))) - { strncpy(soap->tmpbuf, tag, t-tag); - soap->tmpbuf[t-tag] = '\0'; - for (i = 0; soap->local_namespaces[i].id; i++) - if (!strcmp(soap->tmpbuf, soap->local_namespaces[i].id)) - break; - t++; - sprintf(soap->tmpbuf, "<%s xmlns=\"%s\">", t, soap->local_namespaces[i].ns ? soap->local_namespaces[i].ns : SOAP_STR_EOS); - } - else - { t = tag; - sprintf(soap->tmpbuf, "<%s>", tag); - } - if (soap_send(soap, soap->tmpbuf)) - return soap->error; - } - if (p) - { s = *p; - while ((c = *s++)) - if (soap_pututf8(soap, (unsigned char)c)) - return soap->error; - } - if (t) - { sprintf(soap->tmpbuf, "", t); - return soap_send(soap, soap->tmpbuf); - } - return SOAP_OK; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -wchar_t ** -SOAP_FMAC2 -soap_inwliteral(struct soap *soap, const char *tag, wchar_t **p) -{ if (soap_element_begin_in(soap, tag)) - return NULL; - if (!p) - if (!(p = (wchar_t**)soap_malloc(soap, sizeof(wchar_t*)))) - return NULL; - if (soap->null) - *p = NULL; - else if (soap->body) - *p = soap_wstring_in(soap, 0); - else - *p = NULL; - if (soap->body && soap_element_end_in(soap, tag)) - return NULL; - return p; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -char * -SOAP_FMAC2 -soap_value(struct soap *soap) -{ size_t i; - wchar c = 0; - char *s; - s = soap->tmpbuf; - for (i = 0; i < sizeof(soap->tmpbuf) - 1; i++) - { c = soap_get(soap); - if (c == TT || (int)c == EOF || soap_blank(c)) - break; - *s++ = (char)c; - } - if ((int)c == EOF || c == TT) - soap_unget(soap, c); - *s = '\0'; - return soap->tmpbuf; /* return non-null pointer */ -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_getline(struct soap *soap, char *s, int len) -{ int i = len; - wchar c = 0; - for (;;) - { while (--i > 0) - { c = soap_getchar(soap); - if (c == '\r' || c == '\n' || (int)c == EOF) - break; - *s++ = (char)c; - } - *s = '\0'; - while (c != '\n' && (int)c != EOF) - c = soap_getchar(soap); - if ((int)c == EOF) - return SOAP_EOF; - if (i+1 == len) /* empty line: end of HTTP header */ - break; - c = soap_unget(soap, soap_getchar(soap)); - if (c != ' ' && c != '\t') /* HTTP line continuation? */ - break; - } - return SOAP_OK; -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -static size_t -soap_begin_dime(struct soap *soap) -{ -#ifndef WITH_LEANER - if (soap->mode & SOAP_ENC_DIME) - { size_t count; - sprintf(soap->id, soap->dime_id_format, 0); - soap->dime_id = soap->id; - if (soap->local_namespaces) - { if (soap->local_namespaces[0].out) - soap->dime_type = (char*)soap->local_namespaces[0].out; - else - soap->dime_type = (char*)soap->local_namespaces[0].ns; - } - soap->dime_options = NULL; - count = soap->dime_size + 12 + ((soap->count+3)&(~3)) + ((strlen(soap->dime_id)+3)&(~3)) + ((strlen(soap->dime_type)+3)&(~3)); - soap->dime_size = soap->count; - if (soap->dime_count) - soap->dime_flags = SOAP_DIME_MB | SOAP_DIME_ABSURI; - else - soap->dime_flags = SOAP_DIME_MB | SOAP_DIME_ME | SOAP_DIME_ABSURI; - return count; - } -#endif - return soap->count; -} -#endif - -/******************************************************************************/ -#ifndef WITH_LEANER -#ifndef PALM_1 -static int -soap_putdimefield(struct soap *soap, const char *s, size_t n) -{ if (soap_send_raw(soap, s, n)) - return soap->error; - return soap_send_raw(soap, SOAP_STR_PADDING, -(long)n&3); -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_LEANER -#ifndef PALM_1 -SOAP_FMAC1 -char * -SOAP_FMAC2 -soap_dime_option(struct soap *soap, unsigned short type, const char *option) -{ size_t n; - char *s = NULL; - if (option) - { n = strlen(option); - s = (char*)soap_malloc(soap, n + 5); - if (s) - { s[0] = type >> 8; - s[1] = type & 0xFF; - s[2] = n >> 8; - s[3] = n & 0xFF; - strcpy(s + 4, option); - } - } - return s; -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_LEANER -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_putdimehdr(struct soap *soap) -{ unsigned char tmp[12]; - size_t optlen = 0, idlen = 0, typelen = 0; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Put DIME header id='%s'\n", soap->dime_id?soap->dime_id:"")); - if (soap->dime_options) - optlen = (((unsigned char)soap->dime_options[2] << 8) | ((unsigned char)soap->dime_options[3])) + 4; - if (soap->dime_id) - idlen = strlen(soap->dime_id); - if (soap->dime_type) - typelen = strlen(soap->dime_type); - tmp[0] = SOAP_DIME_VERSION | (soap->dime_flags & 0x7); - tmp[1] = soap->dime_flags & 0xF0; - tmp[2] = optlen >> 8; - tmp[3] = optlen & 0xFF; - tmp[4] = idlen >> 8; - tmp[5] = idlen & 0xFF; - tmp[6] = typelen >> 8; - tmp[7] = typelen & 0xFF; - tmp[8] = soap->dime_size >> 24; - tmp[9] = (soap->dime_size >> 16) & 0xFF; - tmp[10] = (soap->dime_size >> 8) & 0xFF; - tmp[11] = soap->dime_size & 0xFF; - if (soap_send_raw(soap, (char*)tmp, 12) - || soap_putdimefield(soap, soap->dime_options, optlen) - || soap_putdimefield(soap, soap->dime_id, idlen) - || soap_putdimefield(soap, soap->dime_type, typelen)) - return soap->error; - return SOAP_OK; -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_LEANER -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_putdime(struct soap *soap, int i, char *id, char *type, char *options, void *ptr, size_t size) -{ void *h; - if (id) - soap->dime_id = id; - else - { sprintf(soap->id, soap->dime_id_format, i); - soap->dime_id = soap->id; - } - soap->dime_type = type; - soap->dime_options = options; - soap->dime_size = size; - soap->dime_flags = SOAP_DIME_VERSION | SOAP_DIME_MEDIA; - if (soap->fdimereadopen && ((h = soap->fdimereadopen(soap, (void*)ptr, soap->dime_id, type, options)) || soap->error)) - { size_t n; - if (!h) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "fdimereadopen failed\n")); - return soap->error; - } - if (!size && ((soap->mode & SOAP_ENC_XML) || (soap->mode & SOAP_IO) == SOAP_IO_CHUNK || (soap->mode & SOAP_IO) == SOAP_IO_STORE)) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Chunked streaming DIME\n")); - n = sizeof(soap->tmpbuf); - do - { size = soap->fdimeread(soap, h, soap->tmpbuf, n); - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "fdimeread returned %lu bytes\n", (unsigned long)size)); - if (size == n) - soap->dime_flags |= SOAP_DIME_CF; - else - { soap->dime_flags &= ~SOAP_DIME_CF; - if (--soap->dime_count == 0) - soap->dime_flags |= SOAP_DIME_ME; - } - soap->dime_size = size; - if (soap_putdimehdr(soap) - || soap_send_raw(soap, soap->tmpbuf, size) - || soap_send_raw(soap, SOAP_STR_PADDING, -(long)soap->dime_size&3)) - break; - if (soap->dime_id) - { soap->dime_flags &= ~(SOAP_DIME_MB | SOAP_DIME_MEDIA); - soap->dime_id = NULL; - soap->dime_type = NULL; - soap->dime_options = NULL; - } - } while (size >= n); - } - else - { if (--soap->dime_count == 0) - soap->dime_flags |= SOAP_DIME_ME; - if (soap_putdimehdr(soap)) - return soap->error; - do - { if (size < sizeof(soap->tmpbuf)) - n = size; - else - n = sizeof(soap->tmpbuf); - if (!(n = soap->fdimeread(soap, h, soap->tmpbuf, n))) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "fdimeread failed: insufficient data (%lu bytes remaining from %lu bytes)\n", (unsigned long)size, (unsigned long)soap->dime_size)); - soap->error = SOAP_EOF; - break; - } - if (soap_send_raw(soap, soap->tmpbuf, n)) - break; - size -= n; - } while (size); - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "fdimereadclose\n")); - soap_send_raw(soap, SOAP_STR_PADDING, -(long)soap->dime_size&3); - } - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "fdimereadclose\n")); - if (soap->fdimereadclose) - soap->fdimereadclose(soap, h); - return soap->error; - } - if (--soap->dime_count == 0) - soap->dime_flags |= SOAP_DIME_ME; - if (soap_putdimehdr(soap)) - return soap->error; - return soap_putdimefield(soap, (char*)ptr, size); -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_LEANER -#ifndef PALM_1 -static char * -soap_getdimefield(struct soap *soap, size_t n) -{ register wchar c; - register int i; - register char *s; - char *p = NULL; - if (n) - { p = (char*)soap_malloc(soap, n + 1); - if (p) - { s = p; - for (i = n; i > 0; i--) - { if ((int)(c = soap_get1(soap)) == EOF) - { soap->error = SOAP_EOF; - return NULL; - } - *s++ = (char)c; - } - *s = '\0'; - if ((soap->error = soap_move(soap, -(long)n&3))) - return NULL; - } - else - soap->error = SOAP_EOM; - } - return p; -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_LEANER -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_getdimehdr(struct soap *soap) -{ register wchar c; - register char *s; - register int i; - unsigned char tmp[12]; - size_t optlen, idlen, typelen; - if (!(soap->mode & SOAP_ENC_DIME)) - return soap->error = SOAP_EOD; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Get DIME header\n")); - if (soap->dime_buflen || soap->dime_chunksize) - { if (soap_move(soap, (long)(soap->dime_size - soap_tell(soap)))) - return soap->error = SOAP_EOF; - soap_unget(soap, soap_getchar(soap)); /* skip padding and get hdr */ - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "... From chunked\n")); - return SOAP_OK; - } - s = (char*)tmp; - for (i = 12; i > 0; i--) - { if ((int)(c = soap_getchar(soap)) == EOF) - return soap->error = SOAP_EOF; - *s++ = (char)c; - } - if ((tmp[0] & 0xF8) != SOAP_DIME_VERSION) - return soap->error = SOAP_DIME_MISMATCH; - soap->dime_flags = (tmp[0] & 0x7) | (tmp[1] & 0xF0); - optlen = (tmp[2] << 8) | tmp[3]; - idlen = (tmp[4] << 8) | tmp[5]; - typelen = (tmp[6] << 8) | tmp[7]; - soap->dime_size = (tmp[8] << 24) | (tmp[9] << 16) | (tmp[10] << 8) | tmp[11]; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "DIME size=%u flags=0x%X\n", (unsigned int)soap->dime_size, soap->dime_flags)); - if (!(soap->dime_options = soap_getdimefield(soap, optlen)) && soap->error) - return soap->error; - if (!(soap->dime_id = soap_getdimefield(soap, idlen)) && soap->error) - return soap->error; - if (!(soap->dime_type = soap_getdimefield(soap, typelen)) && soap->error) - return soap->error; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "DIME id=%s, type=%s, options=%s\n", soap->dime_id?soap->dime_id:"", soap->dime_type?soap->dime_type:"", soap->dime_options?soap->dime_options+4:"")); - if (soap->dime_flags & SOAP_DIME_ME) - soap->mode &= ~SOAP_ENC_DIME; - return SOAP_OK; -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_LEANER -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_getdime(struct soap *soap) -{ if (soap_getdimehdr(soap)) - return soap->error; - if (soap->fdimewriteopen && ((soap->dime_ptr = (char*)soap->fdimewriteopen(soap, soap->dime_id, soap->dime_type, soap->dime_options)) || soap->error)) - { char *id, *type, *options; - size_t size, n; - if (!soap->dime_ptr) - return soap->error; - id = soap->dime_id; - type = soap->dime_type; - options = soap->dime_options; - for (;;) - { size = soap->dime_size; - for (;;) - { n = soap->buflen - soap->bufidx; - if (size < n) - n = size; - if ((soap->error = soap->fdimewrite(soap, (void*)soap->dime_ptr, soap->buf + soap->bufidx, n))) - break; - size -= n; - if (!size) - { soap->bufidx += n; - break; - } - if (soap_recv(soap)) - { soap->error = SOAP_EOF; - goto end; - } - } - if (soap_move(soap, -(long)soap->dime_size&3)) - { soap->error = SOAP_EOF; - break; - } - if (!(soap->dime_flags & SOAP_DIME_CF)) - break; - if (soap_getdimehdr(soap)) - break; - } -end: - if (soap->fdimewriteclose) - soap->fdimewriteclose(soap, (void*)soap->dime_ptr); - soap->dime_size = 0; - soap->dime_id = id; - soap->dime_type = type; - soap->dime_options = options; - } - else if (soap->dime_flags & SOAP_DIME_CF) - { char *id, *type, *options; - register wchar c; - register char *s; - register int i; - id = soap->dime_id; - type = soap->dime_type; - options = soap->dime_options; - if (soap_new_block(soap)) - return SOAP_EOM; - for (;;) - { s = (char*)soap_push_block(soap, soap->dime_size); - if (!s) - return soap->error = SOAP_EOM; - for (i = soap->dime_size; i > 0; i--) - { if ((int)(c = soap_get1(soap)) == EOF) - return soap->error = SOAP_EOF; - *s++ = (char)c; - } - if (soap_move(soap, -(long)soap->dime_size&3)) - return soap->error = SOAP_EOF; - if (!(soap->dime_flags & SOAP_DIME_CF)) - break; - if (soap_getdimehdr(soap)) - return soap->error; - } - soap->dime_size = soap->blist->size++; /* allocate one more for '\0' */ - if (!(soap->dime_ptr = soap_save_block(soap, NULL))) - return soap->error; - soap->dime_ptr[soap->dime_size] = '\0'; /* make 0-terminated to enable string-based attachments */ - soap->dime_id = id; - soap->dime_type = type; - soap->dime_options = options; - } - else - soap->dime_ptr = soap_getdimefield(soap, soap->dime_size); - return soap->error; -} -#endif -#endif - -/******************************************************************************/ - -#ifdef WITH_COOKIES -/******************************************************************************/ -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_encode_cookie(const char *s, char *t, int len) -{ register int c; - register int n = len; - while ((c = *s++) && --n > 0) - { if (c > ' ' && c < 128 && c != ';' && c != ',') - *t++ = c; - else if (n > 2) - { *t++ = '%'; - *t++ = (c >> 4) + (c > 159 ? '7' : '0'); - c &= 0xF; - *t++ = c + (c > 9 ? '7' : '0'); - n -= 2; - } - else - break; - } - *t = '\0'; - return len - n; -} - -/******************************************************************************/ -SOAP_FMAC1 -const char* -SOAP_FMAC2 -soap_decode_cookie(char *buf, int len, const char *val) -{ const char *s; - char *t; - for (s = val; *s; s++) - if (*s != ' ' && *s != '=') - break; - if (*s == '"') - { t = buf; - s++; - while (*s && *s != '"' && --len) - *t++ = *s++; - *t = '\0'; - do s++; - while (*s && *s != ';' && *s != '='); - } - else - { t = buf; - while (*s && *s != ';' && *s != '=' && --len) - switch (*s) - { case ' ': - s++; - break; - case '%': - *t++ = ((s[1] >= 'A' ? (s[1] & 0x7) + 9 : s[1] - '0') << 4) - + (s[2] >= 'A' ? (s[2] & 0x7) + 9 : s[2] - '0'); - s += 3; - break; - default: - *t++ = *s++; - } - *t = '\0'; - } - return s; -} - -/******************************************************************************/ -SOAP_FMAC1 -struct soap_cookie* -SOAP_FMAC2 -soap_cookie(struct soap *soap, const char *name, const char *domain, const char *path) -{ struct soap_cookie *p; - size_t n; - if (!domain) - domain = soap->cookie_domain; - if (!path) - path = soap->cookie_path; - if (*path == '/') - path++; - n = strlen(path); - for (p = soap->cookies; p; p = p->next) - if (!strcmp(p->name, name) - && domain - && p->domain - && !strcmp(p->domain, domain) - && !strncmp(p->path, path, n)) - break; - return p; -} - -/******************************************************************************/ -SOAP_FMAC1 -struct soap_cookie* -SOAP_FMAC2 -soap_set_cookie(struct soap *soap, const char *name, const char *value, const char *domain, const char *path) -{ struct soap_cookie **p, *q; - int n; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Set cookie: %s=%s domain=%s path=%s\n", name, value?value:"", domain?domain:"", path?path:"")); - if (!domain) - domain = soap->cookie_domain; - if (!path) - path = soap->cookie_path; - if (!path) - { soap_set_receiver_error(soap, "Cookie path not set", NULL, SOAP_HTTP_ERROR); - return NULL; - } - if (*path == '/') - path++; - q = soap_cookie(soap, name, domain, path); - if (!q) - { if ((q = (struct soap_cookie*)SOAP_MALLOC(sizeof(struct soap_cookie)))) - { if ((q->name = (char*)SOAP_MALLOC(strlen(name)+1))) - strcpy(q->name, name); - q->value = NULL; - q->domain = NULL; - q->path = NULL; - q->expire = -1; - q->version = 0; - q->secure = 0; - q->env = 0; - q->modified = 0; - for (p = &soap->cookies, n = soap->cookie_max; *p && n; p = &(*p)->next, n--) - if (!strcmp((*p)->name, name) && (*p)->path && strcmp((*p)->path, path) < 0) - break; - if (n) - { q->next = *p; - *p = q; - } - else - { SOAP_FREE(q->name); - SOAP_FREE(q); - q = NULL; - } - } - } - else - q->modified = 1; - if (q) - { if (q->value) - { SOAP_FREE(q->value); - q->value = NULL; - } - if (q->domain) - { SOAP_FREE(q->domain); - q->domain = NULL; - } - if (q->path) - { SOAP_FREE(q->path); - q->path = NULL; - } - if (value && *value && (q->value = (char*)SOAP_MALLOC(strlen(value)+1))) - strcpy(q->value, value); - if (domain && *domain && (q->domain = (char*)SOAP_MALLOC(strlen(domain)+1))) - strcpy(q->domain, domain); - if (path && *path && (q->path = (char*)SOAP_MALLOC(strlen(path)+1))) - strcpy(q->path, path); - q->session = 1; - } - return q; -} - -/******************************************************************************/ -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_clr_cookie(struct soap *soap, const char *name, const char *domain, const char *path) -{ struct soap_cookie **p, *q; - if (!domain) - domain = soap->cookie_domain; - if (!domain) - { soap_set_receiver_error(soap, "Cookie domain not set", SOAP_STR_EOS, SOAP_HTTP_ERROR); - return; - } - if (!path) - path = soap->cookie_path; - if (!path) - { soap_set_receiver_error(soap, "Cookie path not set", SOAP_STR_EOS, SOAP_HTTP_ERROR); - return; - } - if (*path == '/') - path++; - for (p = &soap->cookies, q = *p; q; q = *p) - if (!strcmp(q->name, name) && !strcmp(q->domain, domain) && !strncmp(q->path, path, strlen(q->path))) - { if (q->value) - SOAP_FREE(q->value); - if (q->domain) - SOAP_FREE(q->domain); - if (q->path) - SOAP_FREE(q->path); - *p = q->next; - SOAP_FREE(q); - } - else - p = &q->next; -} - -/******************************************************************************/ -SOAP_FMAC1 -char * -SOAP_FMAC2 -soap_cookie_value(struct soap *soap, const char *name, const char *domain, const char *path) -{ struct soap_cookie *p; - if ((p = soap_cookie(soap, name, domain, path))) - return p->value; - return NULL; -} - -/******************************************************************************/ -SOAP_FMAC1 -long -SOAP_FMAC2 -soap_cookie_expire(struct soap *soap, const char *name, const char *domain, const char *path) -{ struct soap_cookie *p; - if ((p = soap_cookie(soap, name, domain, path))) - return p->expire; - return -1; -} - -/******************************************************************************/ -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_set_cookie_expire(struct soap *soap, const char *name, long expire, const char *domain, const char *path) -{ struct soap_cookie *p; - if ((p = soap_cookie(soap, name, domain, path))) - { p->expire = expire; - p->modified = 1; - return SOAP_OK; - } - return SOAP_ERR; -} - -/******************************************************************************/ -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_set_cookie_session(struct soap *soap, const char *name, const char *domain, const char *path) -{ struct soap_cookie *p; - if ((p = soap_cookie(soap, name, domain, path))) - { p->session = 1; - p->modified = 1; - return SOAP_OK; - } - return SOAP_ERR; -} - -/******************************************************************************/ -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_clr_cookie_session(struct soap *soap, const char *name, const char *domain, const char *path) -{ struct soap_cookie *p; - if ((p = soap_cookie(soap, name, domain, path))) - { p->session = 0; - p->modified = 1; - return SOAP_OK; - } - return SOAP_ERR; -} - -/******************************************************************************/ -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_putsetcookies(struct soap *soap) -{ struct soap_cookie *p; - char *s, tmp[4096]; - const char *t; - for (p = soap->cookies; p; p = p->next) - if (p->modified || !p->env) - { s = tmp; - if (p->name) - s += soap_encode_cookie(p->name, s, tmp-s+4064); - if (p->value) - { *s++ = '='; - s += soap_encode_cookie(p->value, s, tmp-s+4064); - } - if (p->domain && (int)strlen(p->domain) < tmp-s+4064) - sprintf(s, ";Domain=%s", p->domain); - else if (soap->cookie_domain && (int)strlen(soap->cookie_domain) < tmp-s+4064) - sprintf(s, ";Domain=%s", soap->cookie_domain); - strcpy(s, ";Path=/"); - if (p->path) - t = p->path; - else - t = soap->cookie_path; - if (t) - { if (*t == '/') - t++; - if ((int)strlen(t) < tmp-s+4064) - strcat(s, t); - } - s += strlen(s); - if (p->version > 0) - { sprintf(s, ";Version=%u", p->version); - s += strlen(s); - } - if (p->expire >= 0) - { sprintf(s, ";Max-Age=%ld", p->expire); - s += strlen(s); - } - if (p->secure) - strcpy(s, ";Secure"); - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Set-Cookie: %s\n", tmp)); - if (soap->fposthdr(soap, "Set-Cookie", tmp)) - return soap->error; - } - return SOAP_OK; -} - -/******************************************************************************/ -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_putcookies(struct soap *soap, const char *domain, const char *path, int secure) -{ struct soap_cookie **p, *q; - unsigned int version = 0; - time_t now = time(NULL); - char *s, tmp[4096]; - p = &soap->cookies; - while ((q = *p)) - { if (q->expire && now > q->expire) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Cookie %s expired\n", q->name)); - SOAP_FREE(q->name); - if (q->value) - SOAP_FREE(q->value); - if (q->domain) - SOAP_FREE(q->domain); - if (q->path) - SOAP_FREE(q->path); - *p = q->next; - SOAP_FREE(q); - } - else if ((!q->domain || !strcmp(q->domain, domain)) - && (!q->path || !strncmp(q->path, path, strlen(q->path))) - && (!q->secure || secure)) - { s = tmp; - if (q->version != version) - { sprintf(s, "$Version=%u;", q->version); - version = q->version; - } - if (q->name) - s += soap_encode_cookie(q->name, s, tmp-s+4080); - if (q->value) - { *s++ = '='; - s += soap_encode_cookie(q->value, s, tmp-s+4080); - } - if (q->path && (int)strlen(q->path) < tmp-s+4080) - { sprintf(s, ";$Path=/%s", q->path); - s += strlen(s); - } - if (q->domain && (int)strlen(q->domain) < tmp-s+4080) - sprintf(s, ";$Domain=%s", q->domain); - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Cookie: %s\n", tmp)); - if (soap->fposthdr(soap, "Cookie", tmp)) - return soap->error; - p = &q->next; - } - else - p = &q->next; - } - return SOAP_OK; -} - -/******************************************************************************/ -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_getcookies(struct soap *soap, const char *val) -{ struct soap_cookie *p = NULL, *q; - const char *s; - char *t, tmp[4096]; /* cookie size is up to 4096 bytes [RFC2109] */ - char *domain = NULL; - char *path = NULL; - unsigned int version = 0; - time_t now = time(NULL); - if (!val) - return; - s = val; - while (*s) - { s = soap_decode_cookie(tmp, sizeof(tmp), s); - if (!soap_tag_cmp(tmp, "$Version")) - { if ((s = soap_decode_cookie(tmp, sizeof(tmp), s))) - { if (p) - p->version = (int)atol(tmp); - else - version = (int)atol(tmp); - } - } - else if (!soap_tag_cmp(tmp, "$Path")) - { s = soap_decode_cookie(tmp, sizeof(tmp), s); - if (*tmp) - { if ((t = (char*)SOAP_MALLOC(strlen(tmp)+1))) - strcpy(t, tmp); - } - else - t = NULL; - if (p) - { if (p->path) - SOAP_FREE(p->path); - p->path = t; - } - else - { if (path) - SOAP_FREE(path); - path = t; - } - } - else if (!soap_tag_cmp(tmp, "$Domain")) - { s = soap_decode_cookie(tmp, sizeof(tmp), s); - if (*tmp) - { if ((t = (char*)SOAP_MALLOC(strlen(tmp)+1))) - strcpy(t, tmp); - } - else - t = NULL; - if (p) - { if (p->domain) - SOAP_FREE(p->domain); - p->domain = t; - } - else - { if (domain) - SOAP_FREE(domain); - domain = t; - } - } - else if (p && !soap_tag_cmp(tmp, "Path")) - { s = soap_decode_cookie(tmp, sizeof(tmp), s); - if (p->path) - SOAP_FREE(p->path); - if (*tmp) - { if ((p->path = (char*)SOAP_MALLOC(strlen(tmp)+1))) - strcpy(p->path, tmp); - } - else - p->path = NULL; - } - else if (p && !soap_tag_cmp(tmp, "Domain")) - { s = soap_decode_cookie(tmp, sizeof(tmp), s); - if (p->domain) - SOAP_FREE(p->domain); - if (*tmp) - { if ((p->domain = (char*)SOAP_MALLOC(strlen(tmp)+1))) - strcpy(p->domain, tmp); - } - else - p->domain = NULL; - } - else if (p && !soap_tag_cmp(tmp, "Version")) - { s = soap_decode_cookie(tmp, sizeof(tmp), s); - p->version = (unsigned int)atol(tmp); - } - else if (p && !soap_tag_cmp(tmp, "Max-Age")) - { s = soap_decode_cookie(tmp, sizeof(tmp), s); - p->expire = now + atol(tmp); - } - else if (p && !soap_tag_cmp(tmp, "Expires")) - { struct tm T; - char a[3]; - static const char mns[] = "anebarprayunulugepctovec"; - s = soap_decode_cookie(tmp, sizeof(tmp), s); - memset(&T, 0, sizeof(struct tm)); - a[0] = tmp[4]; - a[1] = tmp[5]; - a[2] = '\0'; - T.tm_mday = (int)atol(a); - a[0] = tmp[8]; - a[1] = tmp[9]; - T.tm_mon = (strstr(mns, a) - mns) / 2; - a[0] = tmp[11]; - a[1] = tmp[12]; - T.tm_year = 100 + (int)atol(a); - a[0] = tmp[13]; - a[1] = tmp[14]; - T.tm_hour = (int)atol(a); - a[0] = tmp[16]; - a[1] = tmp[17]; - T.tm_min = (int)atol(a); - a[0] = tmp[19]; - a[1] = tmp[20]; - T.tm_sec = (int)atol(a); - p->expire = soap_timegm(&T); - } - else if (p && !soap_tag_cmp(tmp, "Secure")) - p->secure = 1; - else - { if (p) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Got environment cookie %s=%s domain=%s path=%s expire=%ld secure=%d\n", p->name, p->value?p->value:"", p->domain?p->domain:"", p->path?p->path:"", p->expire, p->secure)); - if ((q = soap_set_cookie(soap, p->name, p->value, p->domain, p->path))) - { q->version = p->version; - q->expire = p->expire; - q->secure = p->secure; - q->env = 1; - } - if (p->name) - SOAP_FREE(p->name); - if (p->value) - SOAP_FREE(p->value); - if (p->domain) - SOAP_FREE(p->domain); - if (p->path) - SOAP_FREE(p->path); - SOAP_FREE(p); - } - if ((p = (struct soap_cookie*)SOAP_MALLOC(sizeof(struct soap_cookie)))) - { p->name = (char*)SOAP_MALLOC(strlen(tmp)+1); - strcpy(p->name, tmp); - s = soap_decode_cookie(tmp, sizeof(tmp), s); - if (*tmp) - { p->value = (char*)SOAP_MALLOC(strlen(tmp)+1); - strcpy(p->value, tmp); - } - else - p->value = NULL; - p->domain = domain; - p->path = path; - p->expire = 0; - p->secure = 0; - p->version = version; - } - } - if (*s == ';') - s++; - } - if (p) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Got cookie %s=%s domain=%s path=%s expire=%ld secure=%d\n", p->name, p->value?p->value:"", p->domain?p->domain:"", p->path?p->path:"", p->expire, p->secure)); - if ((q = soap_set_cookie(soap, p->name, p->value, p->domain, p->path))) - { q->version = p->version; - q->expire = p->expire; - q->secure = p->secure; - } - if (p->name) - SOAP_FREE(p->name); - if (p->value) - SOAP_FREE(p->value); - if (p->domain) - SOAP_FREE(p->domain); - if (p->path) - SOAP_FREE(p->path); - SOAP_FREE(p); - } - if (domain) - SOAP_FREE(domain); - if (path) - SOAP_FREE(path); -} - -/******************************************************************************/ -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_getenv_cookies(struct soap *soap) -{ struct soap_cookie *p; - const char *s; - char key[4096], val[4096]; /* cookie size is up to 4096 bytes [RFC2109] */ - if (!(s = getenv("HTTP_COOKIE"))) - return SOAP_ERR; - do - { s = soap_decode_cookie(key, sizeof(key), s); - s = soap_decode_cookie(val, sizeof(val), s); - p = soap_set_cookie(soap, key, val, NULL, NULL); - if (p) - p->env = 1; - if (*s == ';') - s++; - } while (*s); - return SOAP_OK; -} - -/******************************************************************************/ -SOAP_FMAC1 -struct soap_cookie* -SOAP_FMAC2 -soap_copy_cookies(struct soap *soap) -{ struct soap_cookie *p, **q, *r; - q = &r; - for (p = soap->cookies; p; p = p->next) - { if (!(*q = (struct soap_cookie*)SOAP_MALLOC(sizeof(struct soap_cookie)))) - return r; - **q = *p; - if (p->name) - { if (((*q)->name = (char*)SOAP_MALLOC(strlen(p->name)+1))) - strcpy((*q)->name, p->name); - } - if (p->value) - { if (((*q)->value = (char*)SOAP_MALLOC(strlen(p->value)+1))) - strcpy((*q)->value, p->value); - } - if (p->domain) - { if (((*q)->domain = (char*)SOAP_MALLOC(strlen(p->domain)+1))) - strcpy((*q)->domain, p->domain); - } - if (p->path) - { if (((*q)->path = (char*)SOAP_MALLOC(strlen(p->path)+1))) - strcpy((*q)->path, p->path); - } - q = &(*q)->next; - } - *q = NULL; - return r; -} - -/******************************************************************************/ -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_free_cookies(struct soap *soap) -{ struct soap_cookie *p; - for (p = soap->cookies; p; p = soap->cookies) - { soap->cookies = p->next; - SOAP_FREE(p->name); - if (p->value) - SOAP_FREE(p->value); - if (p->domain) - SOAP_FREE(p->domain); - if (p->path) - SOAP_FREE(p->path); - SOAP_FREE(p); - } -} - -/******************************************************************************/ -#endif /* WITH_COOKIES */ - -/******************************************************************************/ -#ifdef WITH_GZIP -#ifndef PALM_2 -static int -soap_getgzipheader(struct soap *soap) -{ int i; - wchar c, f = 0; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Get gzip header\n")); - for (i = 0; i < 9; i++) - { if ((int)(c = soap_get1(soap) == EOF)) - return soap->error = SOAP_EOF; - if (i == 2) - f = c; - } - if (f & 0x04) /* FEXTRA */ - { for (i = soap_get1(soap) | (soap_get1(soap) << 8); i; i--) - if ((int)soap_get1(soap) == EOF) - return soap->error = SOAP_EOF; - } - if (f & 0x08) /* FNAME */ - do - c = soap_get1(soap); - while (c && (int)c != EOF); - if ((int)c != EOF && (f & 0x10)) /* FCOMMENT */ - do - c = soap_get1(soap); - while (c && (int)f != EOF); - if ((int)c != EOF && (f & 0x01)) /* FHCRC */ - { if ((int)(c = soap_get1(soap)) != EOF) - c = soap_get1(soap); - } - if ((int)c == EOF) - return soap->error = SOAP_EOF; - return SOAP_OK; -} -#endif -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_begin_recv(struct soap *soap) -{ wchar c; - soap_set_local_namespaces(soap); - soap->version = 0; /* don't assume we're parsing SOAP content by default */ - soap_free_iht(soap); - if ((soap->imode & SOAP_IO) == SOAP_IO_CHUNK) - soap->omode |= SOAP_IO_CHUNK; - soap->imode &= ~SOAP_IO; - soap->mode = soap->imode; - if (!soap->keep_alive) - { soap->buflen = 0; - soap->bufidx = 0; - } - if (!(soap->mode & SOAP_IO_KEEPALIVE)) - soap->keep_alive = 0; - soap->ahead = 0; - soap->peeked = 0; - soap->level = 0; - soap->part = SOAP_BEGIN; - soap->alloced = 0; - soap->count = 0; - soap->length = 0; - soap->cdata = 0; - *soap->endpoint = '\0'; - soap->userid = NULL; - soap->passwd = NULL; - soap->action = NULL; - soap->dime_chunksize = 0; - soap->dime_buflen = 0; -#ifdef WIN32 -#ifndef UNDER_CE -#ifndef WITH_FASTCGI - if (!soap_valid_socket(soap->socket)) -#ifdef __BORLANDC__ - setmode((SOAP_SOCKET)soap->recvfd, O_BINARY); -#else - _setmode((SOAP_SOCKET)soap->recvfd, _O_BINARY); -#endif -#endif -#endif -#endif -#ifdef WITH_ZLIB - soap->mode &= ~SOAP_ENC_ZLIB; - soap->zlib_in = SOAP_ZLIB_NONE; - soap->zlib_out = SOAP_ZLIB_NONE; - soap->d_stream.next_in = Z_NULL; - soap->d_stream.avail_in = 0; - soap->d_stream.next_out = (Byte*)soap->buf; - soap->d_stream.avail_out = SOAP_BUFLEN; - soap->z_ratio_in = 1.0; -#endif - c = soap_getchar(soap); - if ((c & 0xFFFC) == (SOAP_DIME_VERSION | SOAP_DIME_MB) && (soap_get0(soap) & 0xFFF0) == 0x20) - soap->mode |= SOAP_ENC_DIME; -#ifdef WITH_GZIP - else if (c == 0x1F) - { if (soap_getgzipheader(soap)) - return soap->error; - if (inflateInit2(&soap->d_stream, -MAX_WBITS) != Z_OK) - return soap->error = SOAP_ZLIB_ERROR; - soap->zlib_state = SOAP_ZLIB_INFLATE; - soap->mode |= SOAP_ENC_ZLIB; - soap->zlib_in = SOAP_ZLIB_GZIP; - soap->z_crc = crc32(0L, NULL, 0); - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "gzip initialized\n")); - memcpy(soap->z_buf, soap->buf, SOAP_BUFLEN); - /* should not chunk over plain transport, so why bother to check? */ - /* if ((soap->mode & SOAP_IO) == SOAP_IO_CHUNK) */ - /* soap->z_buflen = soap->bufidx; */ - /* else */ - soap->d_stream.next_in = (Byte*)(soap->z_buf + soap->bufidx); - soap->d_stream.avail_in = soap->buflen - soap->bufidx; - soap->z_buflen = soap->buflen; - soap->buflen = soap->bufidx; - } -#endif - else - { if (c == 0xEF && !(soap->mode & SOAP_C_LATIN)) - { soap_unget(soap, c); - c = soap_getutf8(soap); - if (c == 0xFEFF) - c = soap_getchar(soap); - } - while (soap_blank(c)) - c = soap_getchar(soap); - } - if ((int)c == EOF) - return soap->error = SOAP_EOF; - soap_unget(soap, c); - if (c != '<' && !(soap->mode & (SOAP_ENC_DIME | SOAP_ENC_ZLIB))) - { soap->mode &= ~SOAP_IO; - if ((soap->error = soap->fparse(soap))) - { if (soap->error == 307) /* HTTP redirect */ - { soap_getline(soap, soap->endpoint, sizeof(soap->endpoint)); - soap->keep_alive = 0; /* force close when soap_closesock() */ - } - return soap->error; - } - if ((soap->mode & SOAP_IO) == SOAP_IO_CHUNK) - { soap->chunkbuflen = soap->buflen; - soap->buflen = soap->bufidx; - soap->chunksize = 0; - } -#ifdef WITH_ZLIB - if (soap->zlib_in) - { /* fparse should not use soap_unget */ -#ifdef WITH_GZIP - c = soap_get1(soap); - if (c == 0x1F) - { if (soap_getgzipheader(soap)) - return soap->error; - if (inflateInit2(&soap->d_stream, -MAX_WBITS) != Z_OK) - return soap->error = SOAP_ZLIB_ERROR; - soap->zlib_state = SOAP_ZLIB_INFLATE; - soap->z_crc = crc32(0L, NULL, 0); - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "gzip initialized\n")); - } - else - { soap_revget1(soap); -#else - { -#endif - if (inflateInit(&soap->d_stream) != Z_OK) - return soap->error = SOAP_ZLIB_ERROR; - soap->zlib_state = SOAP_ZLIB_INFLATE; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Inflate initialized\n")); - } - soap->mode |= SOAP_ENC_ZLIB; - memcpy(soap->z_buf, soap->buf, SOAP_BUFLEN); - soap->d_stream.next_in = (Byte*)(soap->z_buf + soap->bufidx); - soap->d_stream.avail_in = soap->buflen - soap->bufidx; - soap->z_buflen = soap->buflen; - soap->buflen = soap->bufidx; - } -#endif - } -#ifndef WITH_LEANER - if (soap->mode & SOAP_ENC_DIME) - { if (soap_getdimehdr(soap)) - return soap->error; - if (soap->dime_flags & SOAP_DIME_CF) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Chunked DIME SOAP message\n")); - soap->dime_chunksize = soap->dime_size; - if (soap->buflen - soap->bufidx >= soap->dime_chunksize) - { soap->dime_buflen = soap->buflen; - soap->buflen = soap->bufidx + soap->dime_chunksize; - } - else - soap->dime_chunksize -= soap->buflen - soap->bufidx; - } - soap->count = soap->buflen - soap->bufidx; - } -#endif - return SOAP_OK; -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -static int -http_parse(struct soap *soap) -{ char header[SOAP_HDRLEN], *s; - unsigned short g = 0, k; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Waiting for response...\n")); - *soap->endpoint = '\0'; - soap->length = 0; - do - { if (soap_getline(soap, soap->msgbuf, sizeof(soap->msgbuf))) - return SOAP_EOF; - DBGLOG(TEST,SOAP_MESSAGE(fdebug, "HTTP status: %s\n", soap->msgbuf)); - for (;;) - { if (soap_getline(soap, header, SOAP_HDRLEN)) - return SOAP_EOF; - if (!*header) - break; - DBGLOG(TEST,SOAP_MESSAGE(fdebug, "HTTP header: %s\n", header)); - s = strchr(header, ':'); - if (s) - { *s = '\0'; - do s++; - while (*s && *s <= 32); - if ((soap->error = soap->fparsehdr(soap, header, s))) - return soap->error; - } - } - if ((s = strchr(soap->msgbuf, ' '))) - k = (unsigned short)soap_strtoul(s, NULL, 10); - else - k = 0; - } while (k == 100); - DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Finished HTTP header parsing\n")); - s = strstr(soap->msgbuf, "HTTP/"); - if (s && s[7] != '1') - { if (soap->keep_alive == 1) - soap->keep_alive = 0; - if (k == 0 && (soap->omode & SOAP_IO) == SOAP_IO_CHUNK) /* k == 0 for HTTP request */ - { soap->imode |= SOAP_IO_CHUNK; - soap->omode = (soap->omode & ~SOAP_IO) | SOAP_IO_STORE; - } - } - if (soap->keep_alive < 0) - soap->keep_alive = 1; - DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Keep alive connection = %d\n", soap->keep_alive)); - if (s && (((g = !strncmp(soap->msgbuf, "GET ", 4))) || !strncmp(soap->msgbuf, "POST ", 5))) - { size_t m = strlen(soap->endpoint); - size_t n = m + (s - soap->msgbuf) - 5 - (!g); - if (n >= sizeof(soap->endpoint)) - n = sizeof(soap->endpoint) - 1; - strncpy(soap->path, soap->msgbuf + 4 + (!g), n - m); - soap->path[n - m] = '\0'; - strcat(soap->endpoint, soap->path); - DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Target endpoint='%s'\n", soap->endpoint)); - if (g) - { soap->error = soap->fget(soap); - if (soap->error == SOAP_OK) - soap->error = SOAP_STOP; /* prevents further processing */ - return soap->error; - } - return SOAP_OK; - } - if (k == 0 || (k >= 200 && k <= 299) || k == 400 || k == 500) - return SOAP_OK; - return soap_set_receiver_error(soap, "HTTP error", soap->msgbuf, k); -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -static int -http_parse_header(struct soap *soap, const char *key, const char *val) -{ if (!soap_tag_cmp(key, "Host")) - { -#ifdef WITH_OPENSSL - if (soap->imode & SOAP_ENC_SSL) - strcpy(soap->endpoint, "https://"); - else -#endif - strcpy(soap->endpoint, "http://"); - strncat(soap->endpoint, val, sizeof(soap->endpoint) - 8); - soap->endpoint[sizeof(soap->endpoint) - 1] = '\0'; - } - else if (!soap_tag_cmp(key, "Content-Type")) - { if (!soap_tag_cmp(val, "*application/dime*")) - soap->mode |= SOAP_ENC_DIME; - } - else if (!soap_tag_cmp(key, "Content-Length")) - soap->length = soap_strtoul(val, NULL, 10); - else if (!soap_tag_cmp(key, "Content-Encoding")) - { if (!soap_tag_cmp(val, "deflate*")) -#ifdef WITH_ZLIB - soap->zlib_in = SOAP_ZLIB_DEFLATE; -#else - return SOAP_ZLIB_ERROR; -#endif - else if (!soap_tag_cmp(val, "gzip*")) -#ifdef WITH_GZIP - soap->zlib_in = SOAP_ZLIB_GZIP; -#else - return SOAP_ZLIB_ERROR; -#endif - } -#ifdef WITH_ZLIB - else if (!soap_tag_cmp(key, "Accept-Encoding")) - { -#ifdef WITH_GZIP - if (strchr(val, '*') || !soap_tag_cmp(val, "*gzip*")) - soap->zlib_out = SOAP_ZLIB_GZIP; - else -#endif - if (strchr(val, '*') || !soap_tag_cmp(val, "*deflate*")) - soap->zlib_out = SOAP_ZLIB_DEFLATE; - else - soap->zlib_out = SOAP_ZLIB_NONE; - } -#endif - else if (!soap_tag_cmp(key, "Transfer-Encoding")) - { soap->mode &= ~SOAP_IO; - if (!soap_tag_cmp(val, "chunked*")) - soap->mode |= SOAP_IO_CHUNK; - } - else if (!soap_tag_cmp(key, "Connection")) - { if (!soap_tag_cmp(val, "keep-alive*")) - soap->keep_alive = -soap->keep_alive; - else if (!soap_tag_cmp(val, "close*")) - soap->keep_alive = 0; - } -#ifndef WITH_LEAN - else if (!soap_tag_cmp(key, "Authorization")) - { if (!soap_tag_cmp(val, "basic *")) - { size_t n; - char *s; - soap_base642s(soap, val + 6, soap->tmpbuf, sizeof(soap->tmpbuf) - 1, &n); - soap->tmpbuf[n] = '\0'; - if ((s = strchr(soap->tmpbuf, ':'))) - { *s = '\0'; - soap->userid = soap_strdup(soap, soap->tmpbuf); - soap->passwd = soap_strdup(soap, s + 1); - } - } - } -#endif - else if (!soap_tag_cmp(key, "SOAPAction")) - { if (val[0] && val[1]) - { soap->action = soap_strdup(soap, val + 1); - soap->action[strlen(soap->action) - 1] = '\0'; - } - } -/* [ Deal with .NET bug (invalid XML id-ref) */ - else if (!soap_tag_cmp(key, "Server")) - { if (!soap_tag_cmp(val, "Microsoft-IIS*")) - soap->dot_net_bug = 1; - } - else if (!soap_tag_cmp(key, "User-Agent")) - { if (!soap_tag_cmp(val, "*.NET CLR*") || !soap_tag_cmp(val, "*MS Web Services Client Protocol*")) - soap->dot_net_bug = 1; - } -/* ] */ -#ifdef WITH_COOKIES - else if (!soap_tag_cmp(key, "Cookie") || !soap_tag_cmp(key, "Set-Cookie")) - soap_getcookies(soap, val); -#endif - return SOAP_OK; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_envelope_begin_out(struct soap *soap) -{ soap->part = SOAP_IN_ENVELOPE; - return soap_element_begin_out(soap, "SOAP-ENV:Envelope", 0, NULL); -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_envelope_end_out(struct soap *soap) -{ if (soap_element_end_out(soap, "SOAP-ENV:Envelope")) - return soap->error; - soap->part = SOAP_END_ENVELOPE; -#ifndef WITH_LEANER - if (!(soap->mode & SOAP_IO_LENGTH) && (soap->mode & SOAP_ENC_DIME)) - return soap_send_raw(soap, SOAP_STR_PADDING, -(long)soap->count&3); -#endif - return SOAP_OK; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_envelope_begin_in(struct soap *soap) -{ soap->part = SOAP_IN_ENVELOPE; - if (soap_element_begin_in(soap, "SOAP-ENV:Envelope")) - return soap->error = SOAP_VERSIONMISMATCH; - return soap->error; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_envelope_end_in(struct soap *soap) -{ if (soap_element_end_in(soap, "SOAP-ENV:Envelope")) - return soap->error; - soap->part = SOAP_END_ENVELOPE; - return SOAP_OK; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_body_begin_out(struct soap *soap) -{ soap->part = SOAP_IN_BODY; - if (soap->version == 1) - soap->encoding = 1; - if (soap_element(soap, "SOAP-ENV:Body", 0, NULL)) - return soap->error; - if (soap_attribute(soap, "id", "_0")) - return soap->error; - return soap_element_start_end_out(soap, NULL); -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_body_end_out(struct soap *soap) -{ if (soap_element_end_out(soap, "SOAP-ENV:Body")) - return soap->error; - soap->part = SOAP_IN_BODY; - return SOAP_OK; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_body_begin_in(struct soap *soap) -{ soap->part = SOAP_IN_BODY; - return soap_element_begin_in(soap, "SOAP-ENV:Body"); -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_body_end_in(struct soap *soap) -{ if (soap_element_end_in(soap, "SOAP-ENV:Body")) - return soap->error; - soap->part = SOAP_END_BODY; - return SOAP_OK; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_recv_header(struct soap *soap) -{ if (soap_getheader(soap) && soap->error == SOAP_TAG_MISMATCH) - soap->error = SOAP_OK; - return soap->error; -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_set_endpoint(struct soap *soap, const char *endpoint) -{ register const char *s; - register size_t i, n; - *soap->endpoint = '\0'; - *soap->host = '\0'; - *soap->path = '\0'; - soap->port = 80; - if (!endpoint || !*endpoint) - return; -#ifdef WITH_OPENSSL - if (!strncmp(endpoint, "https:", 6)) - soap->port = 443; -#endif - strncpy(soap->endpoint, endpoint, sizeof(soap->endpoint) - 1); - s = strchr(endpoint, ':'); - if (s && s[1] == '/' && s[2] == '/') - s += 3; - else - s = endpoint; - n = strlen(s); - if (n >= sizeof(soap->host)) - n = sizeof(soap->host) - 1; -/* WR[ */ -#ifdef WITH_IPV6 - if ('[' == s[0]) - { - s++; - for (i = 0; i < n; i++) - { soap->host[i] = s[i]; - if (']' == s[i]) - { - s++; - break; - } - } - } - else - { - for (i = 0; i < n; i++) - { soap->host[i] = s[i]; - if (s[i] == '/' || s[i] == ':') - break; - } - } -#else /* WITH_IPV6 */ -/* ]WR */ - for (i = 0; i < n; i++) - { soap->host[i] = s[i]; - if (s[i] == '/' || s[i] == ':') - break; - } -/* WR[ */ -#endif /* WITH_IPV6 */ -/* ]WR */ - soap->host[i] = '\0'; - if (s[i] == ':') - { soap->port = (int)atol(s + i + 1); - for (i++; i < n; i++) - if (s[i] == '/') - break; - } - if (s[i]) - { strncpy(soap->path, s + i + 1, sizeof(soap->path)); - soap->path[sizeof(soap->path) - 1] = '\0'; - } -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_connect(struct soap *soap, const char *endpoint, const char *action) -{ return soap_connect_command(soap, SOAP_POST, endpoint, action); -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_connect_command(struct soap *soap, int http_command, const char *endpoint, const char *action) -{ char host[sizeof(soap->host)]; - int port; - size_t count; - strcpy(host, soap->host); /* save to compare */ - port = soap->port; /* save to compare */ - soap_set_endpoint(soap, endpoint); - if (action) - soap->action = soap_strdup(soap, action); - if (soap->fconnect) - { - if ((soap->error = soap->fconnect(soap, endpoint, soap->host, soap->port))) - return soap->error; - } - else if (*soap->host) - { soap->status = http_command; - if (!soap_valid_socket(soap->socket) || strcmp(soap->host, host) || soap->port != port) - { soap->keep_alive = 0; /* force close */ - soap_closesock(soap); - DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Connect to host='%s' path='%s' port=%d\n", soap->host, soap->path, soap->port)); - soap->socket = soap->fopen(soap, endpoint, soap->host, soap->port); - if (soap->error) - return soap->error; - soap->keep_alive = ((soap->omode & SOAP_IO_KEEPALIVE) != 0); - } - else if (!soap->keep_alive || soap_poll(soap)) - { soap->keep_alive = 0; /* force close */ - soap_closesock(soap); - DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Reconnect to host='%s' path='%s' port=%d\n", soap->host, soap->path, soap->port)); - soap->socket = soap->fopen(soap, endpoint, soap->host, soap->port); - if (soap->error) - return soap->error; - } - } - count = soap_begin_dime(soap); - if (soap_begin_send(soap)) - return soap->error; - if ((soap->mode & SOAP_IO) != SOAP_IO_STORE && !(soap->mode & SOAP_ENC_XML) && endpoint) - { unsigned int k = soap->mode; - soap->mode &= ~(SOAP_IO | SOAP_ENC_ZLIB); - if ((k & SOAP_IO) != SOAP_IO_FLUSH) - soap->mode |= SOAP_IO_BUFFER; - if ((soap->error = soap->fpost(soap, endpoint, soap->host, soap->port, soap->path, action, count))) - return soap->error; - if ((k & SOAP_IO) == SOAP_IO_CHUNK) - { if (soap_flush(soap)) - return soap->error; - } - soap->mode = k; - } - if (http_command != SOAP_POST) - return soap_end_send(soap); -#ifndef WITH_LEANER - if (soap->mode & SOAP_ENC_DIME) - return soap_putdimehdr(soap); -#endif - return SOAP_OK; -} -#endif - -/******************************************************************************/ -#ifndef WITH_LEAN -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_s2base64(struct soap *soap, const unsigned char *s, char *t, size_t n) -{ register size_t i; - register unsigned long m; - if (!t) - return SOAP_EOM; - t[0] = '\0'; - if (!s) - return SOAP_OK; - for (; n > 2; n -= 3, s += 3) - { m = ((unsigned long)((unsigned char*)s)[0] << 16) | ((unsigned long)((unsigned char*)s)[1] << 8) | (unsigned long)((unsigned char*)s)[2]; - for (i = 4; i > 0; m >>= 6) - t[--i] = soap_base64o[m & 0x3F]; - t += 4; - } - t[0] = '\0'; - if (n > 0) - { m = 0; - for (i = 0; i < n; i++) - m = (m << 8) | *s++; - for (; i < 3; i++) - m <<= 8; - for (i++; i > 0; m >>= 6) - t[--i] = soap_base64o[m & 0x3F]; - for (i = 3; i > n; i--) - t[i] = '='; - t[4] = '\0'; - } - return SOAP_OK; -} -#endif - -/******************************************************************************/ -#ifndef WITH_LEAN -SOAP_FMAC1 -const char* -SOAP_FMAC2 -soap_base642s(struct soap *soap, const char *s, char *t, size_t l, size_t *n) -{ register int i, j, c; - register unsigned long m; - char *p = t; - if (n) - *n = 0; - for (;;) - { for (i = 0; i < SOAP_BLKLEN; i++) - { m = 0; - j = 0; - while (j < 4) - { c = *s++; - if (c == '=' || !c) - { i *= 3; - switch (j) - { case 2: - *t++ = (char)((m >> 4) & 0xFF); - i++; - break; - case 3: - *t++ = (char)((m >> 10) & 0xFF); - *t++ = (char)((m >> 2) & 0xFF); - i += 2; - } - if (n) - *n += i; - return p; - } - c -= '+'; - if (c >= 0 && c <= 79) - { m = (m << 6) + soap_base64i[c]; - j++; - } - } - *t++ = (char)((m >> 16) & 0xFF); - *t++ = (char)((m >> 8) & 0xFF); - *t++ = (char)(m & 0xFF); - if (l < 3) - { if (n) - *n += i; - return p; - } - l -= 3; - } - if (n) - *n += 3 * SOAP_BLKLEN; - } -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_puthttphdr(struct soap *soap, int status, size_t count) -{ const char *s; - if (status == SOAP_FILE) - s = soap->http_content; - else if (status == SOAP_HTML) - s = "text/html; charset=utf-8"; - else if (soap->mode & SOAP_ENC_DIME) - s = "application/dime"; - else if (soap->version == 2) - s = "application/soap+xml; charset=utf-8"; - else - s = "text/xml; charset=utf-8"; - soap->error = soap->fposthdr(soap, "Content-Type", s); - if (soap->error) - return soap->error; -#ifdef WITH_ZLIB - if (soap->omode & SOAP_ENC_ZLIB) -#ifdef WITH_GZIP - soap->error = soap->fposthdr(soap, "Content-Encoding", "gzip"); -#else - soap->error = soap->fposthdr(soap, "Content-Encoding", "deflate"); -#endif -#endif - if ((soap->omode & SOAP_IO) == SOAP_IO_CHUNK) - soap->error = soap->fposthdr(soap, "Transfer-Encoding", "chunked"); - else if (count > 0) - { sprintf(soap->tmpbuf, "%lu", (unsigned long)count); - soap->error = soap->fposthdr(soap, "Content-Length", soap->tmpbuf); - } - if (soap->error) - return soap->error; - return soap->error = soap->fposthdr(soap, "Connection", soap->keep_alive ? "keep-alive" : "close"); -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -static int -http_get(struct soap *soap) -{ return SOAP_GET_METHOD; -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -static int -http_post(struct soap *soap, const char *endpoint, const char *host, int port, const char *path, const char *action, size_t count) -{ const char *s; - if (soap->status == SOAP_GET) - { s = "GET"; - count = 0; - } - else - s = "POST"; -#ifndef PALM - if (!endpoint || (strncmp(endpoint, "http:", 5) && strncmp(endpoint, "https:", 6) && strncmp(endpoint, "httpg:", 6))) -#else - if (!endpoint || (strncmp(endpoint, "http:", 5) && strncmp(endpoint, "https:", 6) && strncmp(endpoint, "httpg:", 6)) && strncmp(endpoint, "_beam:", 6) && strncmp(endpoint, "_local:", 7) && strncmp(endpoint, "_btobex:", 8)) -#endif - return SOAP_OK; - if (soap->proxy_host) - sprintf(soap->tmpbuf, "%s %s HTTP/%s", s, endpoint, soap->http_version); - else - sprintf(soap->tmpbuf, "%s /%s HTTP/%s", s, path, soap->http_version); - if ((soap->error = soap->fposthdr(soap, soap->tmpbuf, NULL))) - return soap->error; - if (port != 80) - sprintf(soap->tmpbuf, "%s:%d", host, port); - else - strcpy(soap->tmpbuf, host); - if ((soap->error = soap->fposthdr(soap, "Host", soap->tmpbuf)) - || (soap->error = soap->fposthdr(soap, "User-Agent", "gSOAP/2.6")) - || (soap->error = soap_puthttphdr(soap, SOAP_OK, count))) - return soap->error; -#ifdef WITH_ZLIB -#ifdef WITH_GZIP - if ((soap->error = soap->fposthdr(soap, "Accept-Encoding", "gzip, deflate"))) -#else - if ((soap->error = soap->fposthdr(soap, "Accept-Encoding", "deflate"))) -#endif - return soap->error; -#endif -#ifndef WITH_LEAN - if (soap->userid && soap->passwd && strlen(soap->userid) + strlen(soap->passwd) < 761) - { sprintf(soap->tmpbuf + 262, "%s:%s", soap->userid, soap->passwd); - strcpy(soap->tmpbuf, "Basic "); - soap_s2base64(soap, (const unsigned char*)(soap->tmpbuf + 262), soap->tmpbuf + 6, strlen(soap->tmpbuf + 262)); - if ((soap->error = soap->fposthdr(soap, "Authorization", soap->tmpbuf))) - return soap->error; - } - if (soap->proxy_userid && soap->proxy_passwd && strlen(soap->proxy_userid) + strlen(soap->proxy_passwd) < 761) - { sprintf(soap->tmpbuf + 262, "%s:%s", soap->proxy_userid, soap->proxy_passwd); - strcpy(soap->tmpbuf, "Basic "); - soap_s2base64(soap, (const unsigned char*)(soap->tmpbuf + 262), soap->tmpbuf + 6, strlen(soap->tmpbuf + 262)); - if ((soap->error = soap->fposthdr(soap, "Proxy-Authorization", soap->tmpbuf))) - return soap->error; - } -#endif -#ifdef WITH_COOKIES -#ifdef WITH_OPENSSL - if (soap_putcookies(soap, host, path, soap->ssl != NULL)) - return soap->error; -#else - if (soap_putcookies(soap, host, path, 0)) - return soap->error; -#endif -#endif - if (action) - { sprintf(soap->tmpbuf, "\"%s\"", action); - if ((soap->error = soap->fposthdr(soap, "SOAPAction", soap->tmpbuf))) - return soap->error; - } - return soap->error = soap->fposthdr(soap, NULL, NULL); -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -static int -http_post_header(struct soap *soap, const char *key, const char *val) -{ if (key) - { if (soap_send(soap, key)) - return soap->error; - if (val && (soap_send(soap, ": ") || soap_send(soap, val))) - return soap->error; - } - return soap_send(soap, "\r\n"); -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -static int -http_response(struct soap *soap, int status, size_t count) -{ -/* WR[ */ -#ifdef WMW_RPM_IO - if (soap->rpmreqid) - { - httpOutputEnable(soap->rpmreqid); - } -#endif /* WMW_RPM_IO */ -/* ]WR */ - if (!status || status == SOAP_HTML || status == SOAP_FILE) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "OK 200\n")); -/* WR[ */ -#ifdef WMW_RPM_IO - if (soap->rpmreqid || soap_valid_socket(soap->master) || soap_valid_socket(soap->socket)) /* RPM behaves as if standalone */ -#else -/* ]WR */ - if (soap_valid_socket(soap->master) || soap_valid_socket(soap->socket)) /* standalone application */ -/* WR[ */ -#endif /* WMW_RPM_IO */ -/* ]WR */ - { sprintf(soap->tmpbuf, "HTTP/%s 200 OK", soap->http_version); - if ((soap->error = soap->fposthdr(soap, soap->tmpbuf, NULL))) - return soap->error; - } - else if ((soap->error = soap->fposthdr(soap, "Status", "200 OK"))) - return soap->error; - } - else if (status > 200 && status < 600) - { sprintf(soap->tmpbuf, "HTTP/%s %d %s", soap->http_version, status, http_error(soap, status)); - if ((soap->error = soap->fposthdr(soap, soap->tmpbuf, NULL))) - return soap->error; - if (status == 401) - if ((soap->error = soap->fposthdr(soap, "WWW-Authenticate", "Basic realm=\"gSOAP Service\""))) - return soap->error; - } - else - { const char *s = *soap_faultcode(soap); - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Error\n")); - if (soap->version == 2 && !strcmp(s, "SOAP-ENV:Sender")) - s = "400 Bad Request"; - else - s = "500 Internal Server Error"; -/* WR[ */ -#ifdef WMW_RPM_IO - if (soap->rpmreqid || soap_valid_socket(soap->master) || soap_valid_socket(soap->socket)) /* RPM behaves as if standalone */ -#else -/* ]WR */ - if (soap_valid_socket(soap->master) || soap_valid_socket(soap->socket)) /* standalone application */ -/* WR[ */ -#endif /* WMW_RPM_IO */ -/* ]WR */ - { sprintf(soap->tmpbuf, "HTTP/%s %s", soap->http_version, s); - if ((soap->error = soap->fposthdr(soap, soap->tmpbuf, NULL))) - return soap->error; - } - else if ((soap->error = soap->fposthdr(soap, "Status", s))) - return soap->error; - } - if ((soap->error = soap->fposthdr(soap, "Server", "gSOAP/2.6")) - || (soap->error = soap_puthttphdr(soap, status, count))) - return soap->error; -#ifdef WITH_COOKIES - if (soap_putsetcookies(soap)) - return soap->error; -#endif - return soap->error = soap->fposthdr(soap, NULL, NULL); -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_response(struct soap *soap, int status) -{ register size_t count; - if (!(soap->omode & (SOAP_ENC_XML | SOAP_IO_STORE /* this tests for chunking too */)) - && (status == SOAP_HTML || status == SOAP_FILE)) - { soap->omode &= ~SOAP_IO; - soap->omode |= SOAP_IO_STORE; - } - soap->status = status; - count = soap_begin_dime(soap); - if (soap_begin_send(soap)) - return soap->error; - if ((soap->mode & SOAP_IO) != SOAP_IO_STORE && !(soap->mode & SOAP_ENC_XML)) - { register int n = soap->mode; - soap->mode &= ~(SOAP_IO | SOAP_ENC_ZLIB); - if ((n & SOAP_IO) != SOAP_IO_FLUSH) - soap->mode |= SOAP_IO_BUFFER; - if ((soap->error = soap->fresponse(soap, status, count))) - return soap->error; - if ((n & SOAP_IO) == SOAP_IO_CHUNK) - { if (soap_flush(soap)) - return soap->error; - } - soap->mode = n; - } -#ifndef WITH_LEANER - if (soap->mode & SOAP_ENC_DIME) - return soap_putdimehdr(soap); -#endif - return SOAP_OK; -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_set_fault(struct soap *soap) -{ const char **c = soap_faultcode(soap); - const char **s = soap_faultstring(soap); - if (!*c) - { if (soap->version == 2) - *c = "SOAP-ENV:Sender"; - else - *c = "SOAP-ENV:Client"; - } - if (*s) - return; - switch (soap->error) - { case SOAP_CLI_FAULT: - *s = "Client fault"; - break; - case SOAP_SVR_FAULT: - *s = "Server fault"; - break; - case SOAP_TAG_MISMATCH: - sprintf(soap->msgbuf, "Tag mismatch: element '%s' does not correspond to expected element", soap->tag); - *s = soap->msgbuf; - break; - case SOAP_TYPE: - sprintf(soap->msgbuf, "Data type '%s' mismatch in element '%s'", soap->type, soap->tag); - *s = soap->msgbuf; - break; - case SOAP_SYNTAX_ERROR: - *s = "XML syntax error"; - break; - case SOAP_NO_TAG: - *s = "No XML element tag found"; - break; - case SOAP_MUSTUNDERSTAND: - *c = "SOAP-ENV:MustUnderstand"; - sprintf(soap->msgbuf, "The data in element '%s' must be understood but cannot be handled", soap->tag); - *s = soap->msgbuf; - break; - case SOAP_VERSIONMISMATCH: - *c = "SOAP-ENV:VersionMismatch"; - *s = "SOAP version mismatch or invalid SOAP message"; - break; - case SOAP_DATAENCODINGUNKNOWN: - *c = "SOAP-ENV:DataEncodingUnknown"; - *s = "Unsupported SOAP data encoding"; - break; - case SOAP_DIME_MISMATCH: - *s = "DIME version mismatch"; - break; - case SOAP_NAMESPACE: - sprintf(soap->msgbuf, "Namespace URI mismatch in element '%s'", soap->tag); - *s = soap->msgbuf; - break; - case SOAP_OBJ_MISMATCH: - *s = "Object mismatch"; - break; - case SOAP_FATAL_ERROR: - *s = "Fatal error"; - break; - case SOAP_NO_METHOD: - sprintf(soap->msgbuf, "Method '%s' not implemented", soap->tag); - *s = soap->msgbuf; - break; - case SOAP_GET_METHOD: - *s = "HTTP GET method not implemented"; - break; - case SOAP_EOM: - *s = "Out of memory"; - break; - case SOAP_IOB: - *s = "Array index out of bounds"; - break; - case SOAP_NULL: - sprintf(soap->msgbuf, "Cannot create nilable object for type '%s' in element '%s'", soap->type, soap->tag); - *s = soap->msgbuf; - break; - case SOAP_MULTI_ID: - *s = "Non-unique id attribute"; - break; - case SOAP_MISSING_ID: - *s = "Missing id: referenced data is missing or had to be ignored"; - break; - case SOAP_HREF: - *s = "Invalid XML: object reference with href attribute is incompatible with actual object referred to"; - break; - case SOAP_FAULT: - break; - case SOAP_TCP_ERROR: - *s = tcp_error(soap); - break; - case SOAP_HTTP_ERROR: - *s = "HTTP error"; - break; - case SOAP_SSL_ERROR: - *s = "SSL error"; - break; - case SOAP_PLUGIN_ERROR: - *s = "Plugin registry error"; - break; - case SOAP_DIME_ERROR: - *s = "DIME error"; - break; - case SOAP_ZLIB_ERROR: -#ifdef WITH_ZLIB - sprintf(soap->msgbuf, "Zlib/gzip error: '%s'", soap->d_stream.msg?soap->d_stream.msg:""); - *s = soap->msgbuf; -#else - *s = "Zlib not installed for required message (de)compression"; -#endif - break; - case SOAP_EOD: - *s = "End of DIME error"; - break; - case SOAP_REQUIRED: - *s = "Validation failure: XML attribute required"; - break; - case SOAP_OCCURS: - *s = "Validation failure: XML element occurs count"; - break; - case SOAP_EOF: - sprintf(soap->msgbuf, "End of file or no input: '%s'", soap_strerror(soap)); - *s = soap->msgbuf; - break; - default: - if (soap->error > 200 && soap->error < 600) - { sprintf(soap->msgbuf, "HTTP Error: '%s'", http_error(soap, soap->error)); - *s = soap->msgbuf; - } - else - *s = "Unknown error code"; - } -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_send_fault(struct soap *soap) -{ register int status = soap->error; - if (status == SOAP_STOP) - return status; - DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Sending back fault struct for error code %d\n", soap->error)); - soap->keep_alive = 0; /* to terminate connection */ - soap_set_fault(soap); - if ((status != SOAP_EOF || (!soap->recv_timeout && !soap->send_timeout)) && soap_poll(soap) == SOAP_OK) - { soap->error = SOAP_OK; - soap_serializeheader(soap); - soap_serializefault(soap); - soap_begin_count(soap); - if (soap->mode & SOAP_IO_LENGTH) - { soap_envelope_begin_out(soap); - soap_putheader(soap); - soap_body_begin_out(soap); - soap_putfault(soap); - soap_body_end_out(soap); - soap_envelope_end_out(soap); - } - if (soap_response(soap, status) - || soap_envelope_begin_out(soap) - || soap_putheader(soap) - || soap_body_begin_out(soap) - || soap_putfault(soap) - || soap_body_end_out(soap) - || soap_envelope_end_out(soap)) - return soap_closesock(soap); - soap_end_send(soap); - } - soap_closesock(soap); - return soap->error = status; -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_recv_fault(struct soap *soap) -{ register int status = soap->error; - DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Receiving SOAP Fault\n")); - soap->error = SOAP_OK; - if (soap_getfault(soap)) - { DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Error: soap_get_soapfault() failed. Is this a SOAP message at all?\n")); - *soap_faultcode(soap) = (soap->version == 2 ? "SOAP-ENV:Sender" : "SOAP-ENV:Client"); - soap->error = status; - soap_set_fault(soap); - } - else - { register const char *s = *soap_faultcode(soap); - if (!soap_match_tag(soap, s, "SOAP-ENV:Server") || !soap_match_tag(soap, s, "SOAP-ENV:Receiver")) - status = SOAP_SVR_FAULT; - else if (!soap_match_tag(soap, s, "SOAP-ENV:Client") || !soap_match_tag(soap, s, "SOAP-ENV:Sender")) - status = SOAP_CLI_FAULT; - else if (!soap_match_tag(soap, s, "SOAP-ENV:MustUnderstand")) - status = SOAP_MUSTUNDERSTAND; - else if (!soap_match_tag(soap, s, "SOAP-ENV:VersionMismatch")) - status = SOAP_VERSIONMISMATCH; - else - { DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Fault code %s\n", s)); - status = SOAP_FAULT; - } - if (soap_body_end_in(soap) - || soap_envelope_end_in(soap) - || soap_end_recv(soap)) - return soap_closesock(soap); - soap->error = status; - } - return soap_closesock(soap); -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -static const char* -soap_strerror(struct soap *soap) -{ int err = soap->errnum; - if (!err) - err = soap_errno; - if (err) - { -#ifndef UNDER_CE - return strerror(err); -#else - FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM|FORMAT_MESSAGE_IGNORE_INSERTS, NULL, err, 0, (LPTSTR)&soap->werrorstr, 256, NULL); - wcstombs(soap->errorstr, soap->werrorstr, 256); - return soap->errorstr; -#endif - } - return "Operation interrupted or timed out"; -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -static int -soap_set_error(struct soap *soap, const char *faultcode, const char *faultstring, const char *faultdetail, int soaperror) -{ *soap_faultcode(soap) = faultcode; - *soap_faultstring(soap) = faultstring; - if (faultdetail && *faultdetail) - { register const char **s = soap_faultdetail(soap); - if (s) - *s = faultdetail; - } - return soap->error = soaperror; -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_set_sender_error(struct soap *soap, const char *faultstring, const char *faultdetail, int soaperror) -{ return soap_set_error(soap, soap->version == 2 ? "SOAP-ENV:Sender" : "SOAP-ENV:Client", faultstring, faultdetail, soaperror); -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_set_receiver_error(struct soap *soap, const char *faultstring, const char *faultdetail, int soaperror) -{ return soap_set_error(soap, soap->version == 2 ? "SOAP-ENV:Receiver" : "SOAP-ENV:Server", faultstring, faultdetail, soaperror); -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -static int -soap_copy_fault(struct soap *soap, const char *faultcode, const char *faultstring, const char *faultdetail) -{ char *s = NULL, *t = NULL; - if (faultstring) - s = soap_strdup(soap, faultstring); - if (faultdetail) - t = soap_strdup(soap, faultdetail); - return soap_set_error(soap, faultcode, s, t, SOAP_FAULT); -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_sender_fault(struct soap *soap, const char *faultstring, const char *faultdetail) -{ return soap_copy_fault(soap, soap->version == 2 ? "SOAP-ENV:Sender" : "SOAP-ENV:Client", faultstring, faultdetail); -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_receiver_fault(struct soap *soap, const char *faultstring, const char *faultdetail) -{ return soap_copy_fault(soap, soap->version == 2 ? "SOAP-ENV:Receiver" : "SOAP-ENV:Server", faultstring, faultdetail); -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_print_fault(struct soap *soap, FILE *fd) -{ if (soap->error) - { const char **s; - if (!*soap_faultcode(soap)) - soap_set_fault(soap); - fprintf(fd, "SOAP FAULT: %s\n\"%s\"\n", *soap_faultcode(soap), *soap_faultstring(soap)); - s = soap_faultdetail(soap); - if (s && *s) - fprintf(fd, "Detail: %s\n", *s); - } -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_print_fault_location(struct soap *soap, FILE *fd) -{ -#ifndef WITH_LEAN - int c; - if (soap->error && soap->buflen > 0) - { if (soap->bufidx == 0) - soap->bufidx = 1; - c = soap->buf[soap->bufidx - 1]; - soap->buf[soap->bufidx - 1] = '\0'; - soap->buf[soap->buflen - 1] = '\0'; - if (soap->bufidx < soap->buflen) - fprintf(fd, "%s%c\n** HERE **\n%s\n", soap->buf, c, soap->buf + soap->bufidx); - else - fprintf(fd, "%s%c\n** HERE **\n", soap->buf, c); - } -#endif -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_register_plugin_arg(struct soap *soap, int (*fcreate)(struct soap*, struct soap_plugin*, void*), void *arg) -{ register struct soap_plugin *p; - register int r; - if (!(p = (struct soap_plugin*)SOAP_MALLOC(sizeof(struct soap_plugin)))) - return soap->error = SOAP_EOM; - p->id = NULL; - p->data = NULL; - p->fcopy = NULL; - p->fdelete = NULL; - r = fcreate(soap, p, arg); - if (!r && p->fdelete) - { p->next = soap->plugins; - soap->plugins = p; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Registered '%s' plugin\n", p->id)); - return SOAP_OK; - } - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Could not register plugin '%s': plugin returned error %d (or fdelete callback not set)\n", p->id?p->id:"?", r)); - SOAP_FREE(p); - return r; -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -static void * -fplugin(struct soap *soap, const char *id) -{ register struct soap_plugin *p; - for (p = soap->plugins; p; p = p->next) - if (p->id == id || !strcmp(p->id, id)) - return p->data; - return NULL; -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -void * -SOAP_FMAC2 -soap_lookup_plugin(struct soap *soap, const char *id) -{ return soap->fplugin(soap, id); -} -#endif - -/******************************************************************************/ -#ifdef __cplusplus -} -#endif - diff --git a/org.glite.security.gsoap-plugin/src/stdsoap2_2.6.2.h b/org.glite.security.gsoap-plugin/src/stdsoap2_2.6.2.h deleted file mode 100644 index 15a47fa..0000000 --- a/org.glite.security.gsoap-plugin/src/stdsoap2_2.6.2.h +++ /dev/null @@ -1,1647 +0,0 @@ -/* - -stdsoap2.h 2.6.2 - -Runtime environment. - -gSOAP XML Web services tools -Copyright (C) 2000-2004, Robert van Engelen, Genivia, Inc. All Rights Reserved. - -Contributors: - -Wind River Systems, Inc., for the following additions (marked WR[...]) : - - vxWorks compatible - - Support for IPv6. - --------------------------------------------------------------------------------- -gSOAP public license. - -The contents of this file are subject to the gSOAP Public License Version 1.3 -(the "License"); you may not use this file except in compliance with the -License. You may obtain a copy of the License at -http://www.cs.fsu.edu/~engelen/soaplicense.html -Software distributed under the License is distributed on an "AS IS" basis, -WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License -for the specific language governing rights and limitations under the License. - -The Initial Developer of the Original Code is Robert A. van Engelen. -Copyright (C) 2000-2004 Robert A. van Engelen, Genivia inc. All Rights Reserved. --------------------------------------------------------------------------------- -GPL license. - -This program is free software; you can redistribute it and/or modify it under -the terms of the GNU General Public License as published by the Free Software -Foundation; either version 2 of the License, or (at your option) any later -version. - -This program is distributed in the hope that it will be useful, but WITHOUT ANY -WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A -PARTICULAR PURPOSE. See the GNU General Public License for more details. - -You should have received a copy of the GNU General Public License along with -this program; if not, write to the Free Software Foundation, Inc., 59 Temple -Place, Suite 330, Boston, MA 02111-1307 USA - -Author contact information: -engelen@genivia.com / engelen@acm.org --------------------------------------------------------------------------------- -*/ - -#ifdef WITH_SOAPDEFS_H -# include "soapdefs.h" /* include user-defined stuff */ -#endif - -#ifndef _THREAD_SAFE -# define _THREAD_SAFE -#endif - -#ifndef OPENSERVER -# ifndef _REENTRANT -# define _REENTRANT -# endif -#endif - -#ifndef SOAP_BEGIN_NAMESPACE -# define SOAP_BEGIN_NAMESPACE(name) -#endif - -#ifndef SOAP_END_NAMESPACE -# define SOAP_END_NAMESPACE(name) -#endif - -#ifndef SOAP_FMAC1 /* stdsoap2.h declaration macro */ -# define SOAP_FMAC1 -#endif - -#ifndef SOAP_FMAC2 /* stdsoap2.h declaration macro */ -# define SOAP_FMAC2 -#endif - -#ifndef SOAP_FMAC3 /* (de)serializer declaration macro */ -# define SOAP_FMAC3 -#endif - -#ifndef SOAP_FMAC4 /* (de)serializer declaration macro */ -# define SOAP_FMAC4 -#endif - -#ifndef SOAP_FMAC5 /* stub/skeleton declaration macro */ -# define SOAP_FMAC5 -#endif - -#ifndef SOAP_FMAC6 /* stub/skeleton declaration macro */ -# define SOAP_FMAC6 -#endif - -#ifndef SOAP_CMAC /* class declaration macro */ -# define SOAP_CMAC -#endif - -#ifndef SOAP_NMAC /* namespace table declaration macro */ -# define SOAP_NMAC -#endif - -#ifndef SOAP_SOURCE_STAMP -# define SOAP_SOURCE_STAMP(str) -#endif - -#ifdef WITH_LEANER -# ifndef WITH_LEAN -# define WITH_LEAN -# endif -#endif - -#ifdef WITH_LEAN -# ifdef WITH_COOKIES -# error "Cannot build WITH_LEAN code WITH_COOKIES enabled" -# endif -#endif - -#ifndef STDSOAP_H -#define STDSOAP_H - -/* WR[ */ -#if (defined(__vxworks) || defined(__VXWORKS__)) -# define VXWORKS -#endif -/* ]WR */ - -#ifdef _WIN32 -# ifndef WIN32 -# define WIN32 -# endif -#endif - -#ifdef UNDER_CE -# ifndef WIN32 -# define WIN32 -# endif -#endif - -#ifdef __BORLANDC__ -# ifdef __WIN32__ -# ifndef WIN32 -# define WIN32 -# endif -# endif -#endif - -#ifdef __CYGWIN__ -# ifndef CYGWIN -# define CYGWIN -# endif -#endif - -#ifdef __SYMBIAN32__ -# define SYMBIAN -#endif - -#ifdef __palmos__ -# define PALM -#endif - -#ifdef PALM_GCC -# define PALM -#endif - -#ifdef HAVE_CONFIG_H -# include "config.h" -#else -# if defined(UNDER_CE) -# define WITH_LEAN -# elif defined(WIN32) -# define HAVE_STRRCHR -# define HAVE_STRTOD -# define HAVE_STRTOL -# define HAVE_STRTOUL -# define HAVE_SYS_TIMEB_H -# define HAVE_FTIME -# define HAVE_WCTOMB -# define HAVE_MBTOWC -# elif defined(CYGWIN) -# define HAVE_STRRCHR -# define HAVE_STRTOD -# define HAVE_STRTOL -# define HAVE_STRTOUL -# define HAVE_SYS_TIMEB_H -# define HAVE_FTIME -# define HAVE_RAND_R -# define HAVE_GMTIME_R -# define HAVE_LOCALTIME_R -# define HAVE_WCTOMB -# define HAVE_MBTOWC -# elif defined(__APPLE__) -# define HAVE_STRRCHR -# define HAVE_STRTOD -# define HAVE_STRTOL -# define HAVE_STRTOUL -# define HAVE_RAND_R -# define HAVE_GMTIME_R -# define HAVE_LOCALTIME_R -# define HAVE_TIMEGM -# define HAVE_WCTOMB -# define HAVE_MBTOWC -# elif defined(_AIXVERSION_431) -# define HAVE_STRRCHR -# define HAVE_STRTOD -# define HAVE_STRTOL -# define HAVE_STRTOUL -# define HAVE_SYS_TIMEB_H -# define HAVE_FTIME -# define HAVE_RAND_R -# define HAVE_GMTIME_R -# define HAVE_LOCALTIME_R -# define HAVE_WCTOMB -# define HAVE_MBTOWC -# elif defined(HP_UX) -# define HAVE_STRRCHR -# define HAVE_STRTOD -# define HAVE_STRTOL -# define HAVE_STRTOUL -# define HAVE_SYS_TIMEB_H -# define HAVE_FTIME -# define HAVE_RAND_R -# define HAVE_GMTIME_R -# define HAVE_LOCALTIME_R -# define HAVE_WCTOMB -# define HAVE_MBTOWC -# elif defined(FREEBSD) -# define HAVE_STRRCHR -# define HAVE_STRTOD -# define HAVE_STRTOL -# define HAVE_STRTOUL -# define HAVE_GETTIMEOFDAY -# define HAVE_RAND_R -# define HAVE_GMTIME_R -# define HAVE_LOCALTIME_R -# define HAVE_WCTOMB -# define HAVE_MBTOWC -# elif defined(__VMS) -# define HAVE_STRRCHR -# define HAVE_STRTOD -# define HAVE_STRTOL -# define HAVE_STRTOUL -# define HAVE_SYS_TIMEB_H -# define HAVE_FTIME -# define HAVE_RAND_R -# define HAVE_GMTIME_R -# define HAVE_LOCALTIME_R -# define HAVE_WCTOMB -# define HAVE_MBTOWC -# elif defined(__GLIBC__) -# define HAVE_STRRCHR -# define HAVE_STRTOD -# define HAVE_STRTOL -# define HAVE_STRTOUL -# define HAVE_SYS_TIMEB_H -# define HAVE_FTIME -# define HAVE_RAND_R -# define HAVE_GMTIME_R -# define HAVE_LOCALTIME_R -# define HAVE_TIMEGM -# define HAVE_WCTOMB -# define HAVE_MBTOWC -# elif defined(TRU64) -# define HAVE_STRRCHR -# define HAVE_STRTOD -# define HAVE_STRTOL -# define HAVE_STRTOUL -# define HAVE_GETTIMEOFDAY -# define HAVE_SYS_TIMEB_H -# define HAVE_RAND_R -# define HAVE_GMTIME_R -# define HAVE_LOCALTIME_R -# define HAVE_WCTOMB -# define HAVE_MBTOWC -# elif defined(MAC_CARBON) -# define HAVE_STRRCHR -# define HAVE_STRTOD -# define HAVE_STRTOL -# define HAVE_STRTOUL -# define HAVE_FTIME -# define HAVE_RAND_R -# define HAVE_GETHOSTBYNAME_R -# define HAVE_GMTIME_R -# define HAVE_LOCALTIME_R -# define HAVE_WCTOMB -# define HAVE_MBTOWC -# elif defined(PALM) -# define HAVE_STRTOD /* strtod() is defined in palmmissing.h */ -# ifndef CONST2 -# define CONST2 -# endif -# define WITH_LEAN -# define WITH_NONAMESPACES -# define _LINUX_CTYPE_H -# include - typedef WChar wchar_t; -# define IGNORE_STDIO_STUBS - typedef Int32 time_t; -# define tm HostTmType -# define strftime HostStrFTime -# define mktime HostMkTime -# define localtime HostLocalTime -# define tm_year tm_year_ -# define tm_hour tm_hour_ -# define tm_mon tm_mon_ -# define tm_min tm_min_ -# define tm_sec tm_sec_ -# define tm_mday tm_mday_ -# define tm_isdst tm_isdst_ -# include -# define O_NONBLOCK FNONBIO -# include -# if 1 - void displayText(char *text); -# define pdebug(s) displayText(s) -# define pdebugV(s,p) sprintf(buff,s,p); displayText(buff) -# else -# define pdebug(s) WinDrawChars(s,strlen(s),10,10) -# define pdebugV(s,p) sprintf(buff,s,p); WinDrawChars(buff,strlen(buff),10,10) -# endif -# include "palmmissing.h" -# include "slib_socket.h" -# elif defined(SYMBIAN) -# define WITH_LEAN -# define WITH_NONAMESPACES -# define CONST2 const -# undef SOAP_FMAC1 -# define SOAP_FMAC1 EXPORT_C -# ifdef __cplusplus -# include -# else -# define TInt64 long -# endif -/* WR[ */ -# elif defined(VXWORKS) -# define HAVE_STRRCHR -# define HAVE_STRTOD -# define HAVE_STRTOL -# define HAVE_STRTOUL -# define HAVE_RAND_R -# define HAVE_PGMTIME_R -# define HAVE_PLOCALTIME_R -# define HAVE_MKTIME -/* ]WR */ -# else -/* Default asumptions on supported functions */ -# define HAVE_STRRCHR -# define HAVE_STRTOD -# define HAVE_STRTOL -# define HAVE_STRTOUL -# define HAVE_SYS_TIMEB_H -# define HAVE_FTIME -# define HAVE_RAND_R -# define HAVE_GETHOSTBYNAME_R -# define HAVE_GMTIME_R -# define HAVE_LOCALTIME_R -# define HAVE_WCTOMB -# define HAVE_MBTOWC -# endif -#endif - -#if defined(TRU64) -# define SOAP_LONG_FORMAT "%ld" -# define SOAP_ULONG_FORMAT "%lu" -#elif defined(WIN32) -# define SOAP_LONG_FORMAT "%I64d" -# define SOAP_ULONG_FORMAT "%I64u" -#endif - -#ifndef SOAP_LONG_FORMAT -# define SOAP_LONG_FORMAT "%lld" /* printf format for 64 bit ints */ -#endif - -#ifndef SOAP_ULONG_FORMAT -# define SOAP_ULONG_FORMAT "%llu" /* printf format for unsigned 64 bit ints */ -#endif - -#ifndef SOAP_MALLOC /* use libc malloc */ -# define SOAP_MALLOC(n) malloc(n) -#endif - -#ifndef SOAP_FREE /* use libc free */ -# define SOAP_FREE(p) free(p) -#endif - -#include - -#ifndef PALM -# include -#endif - -#ifndef PALM_GCC -# include -#endif - -#include /* for tolower() */ -#include - -#if defined(__cplusplus) && !defined(UNDER_CE) -# include -# include - using namespace std; -#endif - -#ifndef UNDER_CE -# ifndef PALM -# include -# ifndef MAC_CARBON -# include -# endif -# ifndef WITH_LEAN -# ifdef HAVE_SYS_TIMEB_H -# include /* for ftime() */ -# endif -# include -# endif -# endif -#endif - -#ifdef OPENSERVER -# include -# include -# include - extern int h_errno; -#endif - -#ifndef MAC_CARBON -# ifndef WIN32 -# ifndef PALM -# include -/* WR[ */ -# ifdef VXWORKS -# include -# endif -# ifndef VXWORKS -/* ]WR */ -# ifndef SYMBIAN -# include -# endif -/* WR[ */ -# endif -/* ]WR */ -# ifdef SUN_OS -# include /* SUN */ -# include /* SUN < 2.8 (?) */ -# endif -/* WR[ */ -# ifdef VXWORKS -# include -# else -/* ]WR */ -# include -/* WR[ */ -# endif -/* ]WR */ -# include -# include /* TCP_NODELAY */ -# include -# endif -# endif -#endif - -#ifdef WITH_FASTCGI -# include -#endif - -#ifdef WITH_OPENSSL -# define OPENSSL_NO_KRB5 -# include -# include -# include -# ifndef ALLOW_OLD_VERSIONS -# if (OPENSSL_VERSION_NUMBER < 0x00905100L) -# error "Must use OpenSSL 0.9.6 or later" -# endif -# endif -#endif - -#ifdef WITH_GZIP -# ifndef WITH_ZLIB -# define WITH_ZLIB -# endif -#endif - -#ifdef WITH_CASEINSENSITIVETAGS -# define SOAP_STRCMP soap_tag_cmp /* case insensitve XML element/attribute names */ -#else -# define SOAP_STRCMP strcmp /* case sensitive XML element/attribute names */ -#endif - -#ifdef WITH_ZLIB -# include -#endif - -#ifndef PALM_GCC -# include /* for isnan() */ -#endif - -/* #define DEBUG */ /* Uncomment to debug sending (in file SENT.log) receiving (in file RECV.log) and messages (in file TEST.log) */ - -#ifdef __cplusplus -extern "C" { -#endif - -#define soap_get0(soap) (((soap)->bufidx>=(soap)->buflen && soap_recv(soap)) ? EOF : (unsigned char)(soap)->buf[(soap)->bufidx]) -#define soap_get1(soap) (((soap)->bufidx>=(soap)->buflen && soap_recv(soap)) ? EOF : (unsigned char)(soap)->buf[(soap)->bufidx++]) -#define soap_revget1(soap) ((soap)->bufidx--) -#define soap_unget(soap, c) ((soap)->ahead = c) -#define soap_register_plugin(soap, plugin) soap_register_plugin_arg(soap, plugin, NULL) -#define soap_imode(soap, n) ((soap)->mode = (soap)->imode = (n)) -#define soap_set_imode(soap, n) ((soap)->mode = (soap)->imode |= (n)) -#define soap_clr_imode(soap, n) ((soap)->mode = (soap)->imode &= ~(n)) -#define soap_omode(soap, n) ((soap)->mode = (soap)->omode = (n)) -#define soap_set_omode(soap, n) ((soap)->mode = (soap)->omode |= (n)) -#define soap_clr_omode(soap, n) ((soap)->mode = (soap)->omode &= ~(n)) -#define soap_destroy(soap) soap_delete((soap), NULL) - -#ifdef WIN32 -# ifndef UNDER_CE -# include -# include -# endif -# include -/* # include */ /* Alternative: use winsock2 (not available with eVC) */ -/* WR[ */ -# ifdef WITH_IPV6 -# include -# include -# endif -#else -# ifdef VXWORKS -# include -# include -# include -# endif -/* ]WR */ -# ifndef MAC_CARBON -# ifndef PALM -# include -# include -# endif -# include -# include -# endif -#endif - -#ifdef WIN32 -# define SOAP_SOCKET SOCKET -#else -# define SOAP_SOCKET int -# define closesocket(n) close(n) -#endif - -#define soap_valid_socket(n) ((n) >= 0) -#define SOAP_INVALID_SOCKET (-1) - -/* WR[ */ -#ifdef VXWORKS -# ifdef __INCmathh -# define _MATH_H -# include -# define isnan(num) isNan(num) -# endif -#endif - -#ifdef WIN32 -# define _MATH_H -# include -# define isnan(num) _isnan(num) -#endif -/* ]WR */ - -#if (!defined(_MATH_H) && !defined(_MATH_INCLUDED)) -# ifndef isnan -# define isnan(_) (0) -# endif -#endif - -extern const struct soap_double_nan { unsigned int n1, n2; } soap_double_nan; - -#if defined(SYMBIAN) -# define LONG64 TInt64 -# define ULONG64 TInt64 -#elif !defined(WIN32) -# define LONG64 long long -# define ULONG64 unsigned LONG64 -#elif defined(UNDER_CE) -# define LONG64 __int64 -# define ULONG64 unsigned LONG64 -#elif defined(__BORLANDC__) -# define LONG64 __int64 -# define ULONG64 unsigned LONG64 -#endif - -#ifdef WIN32 -# define SOAP_EINTR WSAEINTR -# define SOAP_EAGAIN WSAEWOULDBLOCK -# define SOAP_EWOULDBLOCK WSAEWOULDBLOCK -# define SOAP_EINPROGRESS WSAEINPROGRESS -#else -# define SOAP_EINTR EINTR -# define SOAP_EAGAIN EAGAIN -# ifdef SYMBIAN -# define SOAP_EWOULDBLOCK 9898 -# define SOAP_EINPROGRESS 9899 -# else -# define SOAP_EWOULDBLOCK EWOULDBLOCK -# define SOAP_EINPROGRESS EINPROGRESS -# endif -#endif - -#ifdef WIN32 -# ifdef UNDER_CE -# define soap_errno GetLastError() -# define soap_socket_errno GetLastError() -# else -# define soap_errno GetLastError() -# define soap_socket_errno WSAGetLastError() -# endif -#else -# define soap_errno errno -# define soap_socket_errno errno -#endif - -#ifndef SOAP_BUFLEN -# ifndef WITH_LEAN -# define SOAP_BUFLEN (32768) /* buffer length for socket packets, also used by gethostbyname_r so don't make this too small */ -# else -# define SOAP_BUFLEN (2048) -# endif -#endif -#ifndef SOAP_LABLEN -# ifndef WITH_LEAN -# define SOAP_LABLEN (256) /* initial look-aside buffer length */ -# else -# define SOAP_LABLEN (64) -# endif -#endif -#ifndef SOAP_PTRHASH -# ifndef WITH_LEAN -# define SOAP_PTRHASH (1024) /* size of pointer analysis hash table (must be power of 2) */ -# else -# define SOAP_PTRHASH (16) -# endif -#endif -#ifndef SOAP_IDHASH -# ifndef WITH_LEAN -# define SOAP_IDHASH (256) /* size of hash table for receiving id/href's */ -# else -# define SOAP_IDHASH (16) -# endif -#endif -#ifndef SOAP_BLKLEN -# define SOAP_BLKLEN (256) /* size of blocks to collect long strings and XML attributes */ -#endif -#ifndef SOAP_TAGLEN -# define SOAP_TAGLEN (256) /* maximum length of XML element tag/attribute name + 1 */ -#endif -#ifndef SOAP_HDRLEN -# ifndef WITH_LEAN -# define SOAP_HDRLEN (8192) /* maximum length of HTTP header line (must be >4096 to read cookies) */ -# else -# define SOAP_HDRLEN (1024) -# endif -#endif -#ifndef SOAP_MAXDIMS -# define SOAP_MAXDIMS (16) /* maximum array dimensions (array nestings) must be less than 64 to protect soap->tmpbuf */ -#endif - -#ifndef SOAP_MAXLOGS -# define SOAP_MAXLOGS (3) /* max number of debug logs per struct soap environment */ -# define SOAP_INDEX_RECV (0) -# define SOAP_INDEX_SENT (1) -# define SOAP_INDEX_TEST (2) -#endif - -#ifndef SOAP_MAXKEEPALIVE -# define SOAP_MAXKEEPALIVE (100) /* max iterations to keep server connection alive */ -#endif - -#ifndef SOAP_MAXARRAYSIZE -# define SOAP_MAXARRAYSIZE (100000) /* "trusted" max size of inbound SOAP array for compound array allocation */ -#endif - -/* WR[ */ -#ifdef VXWORKS -# ifndef FLT_MAX -# define FLT_MAX _ARCH_FLT_MAX -# endif -# ifndef DBL_MAX -# define DBL_MAX _ARCH_DBL_MAX -# endif -#endif -/* ]WR */ - -#ifndef FLT_NAN -# if (defined(_MATH_H) || defined(_MATH_INCLUDED)) -# define FLT_NAN (*(float*)&soap_double_nan) -# else -# define FLT_NAN (0.0) -# endif -#endif - -#ifndef FLT_PINFTY -# ifdef FLT_MAX -# define FLT_PINFTY FLT_MAX -# else -# ifdef HUGE_VAL -# define FLT_PINFTY (float)HUGE_VAL -# else -# ifdef FLOAT_MAX -# define FLT_PINFTY FLOAT_MAX -# else -# define FLT_PINFTY (3.40282347e+38) -# endif -# endif -# endif -#endif - -#ifndef FLT_NINFTY -# define FLT_NINFTY (-FLT_PINFTY) -#endif - -#ifndef DBL_NAN -# if (defined(_MATH_H) || defined(_MATH_INCLUDED)) -# define DBL_NAN (*(double*)&soap_double_nan) -# else -# define DBL_NAN (0.0) -# endif -#endif -#ifndef DBL_PINFTY -# ifdef DBL_MAX -# define DBL_PINFTY DBL_MAX -# else -# ifdef HUGE_VAL -# define DBL_PINFTY (double)HUGE_VAL -# else -# ifdef DOUBLE_MAX -# define DBL_PINFTY DOUBLE_MAX -# else -# define DBL_PINFTY (1.7976931348623157e+308) -# endif -# endif -# endif -#endif - -#ifndef DBL_NINFTY -# define DBL_NINFTY (-DBL_PINFTY) -#endif - -/* gSOAP error codes */ - -#define SOAP_EOF EOF -#define SOAP_ERR EOF -#define SOAP_OK 0 -#define SOAP_CLI_FAULT 1 -#define SOAP_SVR_FAULT 2 -#define SOAP_TAG_MISMATCH 3 -#define SOAP_TYPE 4 -#define SOAP_SYNTAX_ERROR 5 -#define SOAP_NO_TAG 6 -#define SOAP_IOB 7 -#define SOAP_MUSTUNDERSTAND 8 -#define SOAP_NAMESPACE 9 -#define SOAP_OBJ_MISMATCH 10 -#define SOAP_FATAL_ERROR 11 -#define SOAP_FAULT 12 -#define SOAP_NO_METHOD 13 -#define SOAP_GET_METHOD 14 -#define SOAP_EOM 15 -#define SOAP_NULL 16 -#define SOAP_MULTI_ID 17 -#define SOAP_MISSING_ID 18 -#define SOAP_HREF 19 -#define SOAP_TCP_ERROR 20 -#define SOAP_HTTP_ERROR 21 -#define SOAP_SSL_ERROR 22 -#define SOAP_ZLIB_ERROR 23 -#define SOAP_DIME_ERROR 24 -#define SOAP_EOD 25 -#define SOAP_VERSIONMISMATCH 26 -#define SOAP_DIME_MISMATCH 27 -#define SOAP_PLUGIN_ERROR 28 -#define SOAP_DATAENCODINGUNKNOWN 29 -#define SOAP_REQUIRED 30 -#define SOAP_OCCURS 31 - -#define soap_xml_error_check(e) ((e) == SOAP_TAG_MISMATCH || (e) == SOAP_SYNTAX_ERROR || (e) == SOAP_NAMESPACE || (e) == SOAP_MULTI_ID || (e) == SOAP_MISSING_ID || (e) == SOAP_REQUIRED || (e) == SOAP_OCCURS) -#define soap_soap_error_check(e) ((e) == SOAP_CLI_FAULT || (e) == SOAP_SVR_FAULT || (e) == SOAP_VERSIONMISMATCH || (e) == SOAP_MUSTUNDERSTAND || (e) == SOAP_FAULT || (e) == SOAP_NO_METHOD || (e) == SOAP_OBJ_MISMATCH || (e) == SOAP_NULL) -#define soap_tcp_error_check(e) ((e) == SOAP_EOF || (e) == SOAP_TCP_ERROR) -#define soap_ssl_error_check(e) ((e) == SOAP_SSL_ERROR) -#define soap_zlib_error_check(e) ((e) == SOAP_ZLIB_ERROR) -#define soap_dime_error_check(e) ((e) == SOAP_DIME_ERROR || (e) == SOAP_DIME_MISMATCH) -#define soap_http_error_check(e) ((e) == SOAP_HTTP_ERROR || (e) == SOAP_GET_METHOD || ((e) >= 100 && (e) < 600)) - -/* gSOAP HTTP response status codes 100 to 600 are reserved */ - -/* Special gSOAP HTTP response status codes */ - -#define SOAP_STOP 1000 /* No HTTP response */ -#define SOAP_HTML 1001 /* Custom HTML response */ -#define SOAP_FILE 1002 /* Custom file-based response */ - -/* gSOAP HTTP request status codes */ - -#define SOAP_POST 1003 -#define SOAP_GET 1104 - -/* gSOAP DIME */ - -#define SOAP_DIME_CF 0x01 -#define SOAP_DIME_ME 0x02 -#define SOAP_DIME_MB 0x04 -#define SOAP_DIME_VERSION 0x08 /* DIME version 1 */ -#define SOAP_DIME_MEDIA 0x10 -#define SOAP_DIME_ABSURI 0x20 - -/* gSOAP ZLIB */ - -#define SOAP_ZLIB_NONE 0x00 -#define SOAP_ZLIB_DEFLATE 0x01 -#define SOAP_ZLIB_INFLATE 0x02 -#define SOAP_ZLIB_GZIP 0x02 - -/* gSOAP transport, connection, and content encoding modes */ - -#define SOAP_IO 0x000003 -#define SOAP_IO_FLUSH 0x000000 /* flush output immediately, no buffering */ -#define SOAP_IO_BUFFER 0x000001 /* buffer output in packets of size SOAP_BUFLEN */ -#define SOAP_IO_STORE 0x000002 /* store entire output to determine length for transport */ -#define SOAP_IO_CHUNK 0x000003 /* use HTTP chunked transfer AND buffer packets */ - -#define SOAP_IO_LENGTH 0x000004 -#define SOAP_IO_KEEPALIVE 0x000008 - -#define SOAP_ENC_XML 0x000010 /* plain XML encoding, no HTTP header */ -#define SOAP_ENC_DIME 0x000020 -#define SOAP_ENC_ZLIB 0x000040 -#define SOAP_ENC_SSL 0x000080 - -#define SOAP_XML_STRICT 0x000100 /* input mode flag */ -#define SOAP_XML_CANONICAL 0x000200 /* output mode flag */ -#define SOAP_XML_TREE 0x000400 -#define SOAP_XML_GRAPH 0x000800 -#define SOAP_XML_NIL 0x001000 -#define SOAP_XML_DOM 0x002000 - -#define SOAP_C_NOIOB 0x010000 -#define SOAP_C_UTFSTRING 0x020000 -#define SOAP_C_MBSTRING 0x040000 -#define SOAP_C_LATIN 0x080000 - -#define SOAP_DOM_TREE 0x100000 -#define SOAP_DOM_NODE 0x200000 - -#define SOAP_IO_DEFAULT SOAP_IO_FLUSH - -/* SSL client/server authentication settings */ - -#define SOAP_SSL_NO_AUTHENTICATION 0x00 /* for testing purposes */ -#define SOAP_SSL_REQUIRE_SERVER_AUTHENTICATION 0x01 /* client requires server to authenticate */ -#define SOAP_SSL_REQUIRE_CLIENT_AUTHENTICATION 0x02 /* server requires client to authenticate */ - -#define SOAP_SSL_DEFAULT SOAP_SSL_REQUIRE_SERVER_AUTHENTICATION - -/* */ - -#define SOAP_BEGIN 0 -#define SOAP_IN_ENVELOPE 2 -#define SOAP_IN_HEADER 3 -#define SOAP_END_HEADER 4 -#define SOAP_IN_BODY 5 -#define SOAP_END_BODY 6 -#define SOAP_END_ENVELOPE 7 -#define SOAP_END 8 - -/* DEBUG macros */ - -#ifndef WITH_LEAN -# ifdef DEBUG -# ifndef SOAP_DEBUG -# define SOAP_DEBUG -# endif -# endif -#endif - -#ifdef SOAP_DEBUG -# ifndef SOAP_MESSAGE -# define SOAP_MESSAGE fprintf -# endif -# ifndef DBGLOG -# define DBGLOG(DBGFILE, CMD) \ -{ if (soap)\ - { if (!soap->fdebug[SOAP_INDEX_##DBGFILE])\ - soap_open_logfile(soap, SOAP_INDEX_##DBGFILE);\ - if (soap->fdebug[SOAP_INDEX_##DBGFILE])\ - { FILE *fdebug = soap->fdebug[SOAP_INDEX_##DBGFILE];\ - CMD;\ - fflush(fdebug);\ - }\ - }\ -} -# endif -# ifndef DBGMSG -# define DBGMSG(DBGFILE, MSG, LEN) \ -{ if (soap)\ - { if (!soap->fdebug[SOAP_INDEX_##DBGFILE])\ - soap_open_logfile(soap, SOAP_INDEX_##DBGFILE);\ - if (soap->fdebug[SOAP_INDEX_##DBGFILE])\ - { fwrite((MSG), 1, (LEN), soap->fdebug[SOAP_INDEX_##DBGFILE]);\ - fflush(soap->fdebug[SOAP_INDEX_##DBGFILE]);\ - }\ - }\ -} -# endif -#else -# define DBGLOG(DBGFILE, CMD) -# define DBGMSG(DBGFILE, MSG, LEN) -#endif - -typedef long wchar; /* 32 bit, for compatibility */ - -struct Namespace -{ const char *id; - const char *ns; - const char *in; - char *out; -}; - -struct soap_nlist -{ struct soap_nlist *next; - unsigned int level; - short index; /* corresponding entry in ns mapping table */ - char *ns; /* only set when parsed ns URI is not in the ns mapping table */ - char id[1]; /* the actual string value overflows into allocated region below this struct */ -}; - -struct soap_blist -{ struct soap_blist *next; - char *ptr; - size_t size; -}; - -struct soap_array -{ void *__ptr; - int __size; -}; - -/* pointer serialization management */ -struct soap_plist -{ struct soap_plist *next; - const void *ptr; - const struct soap_array *array; - int type; - int id; - char mark1; - char mark2; -}; - -/* class allocation list */ -struct soap_clist -{ struct soap_clist *next; - void *ptr; - int type; - int size; - void (*fdelete)(struct soap_clist*); -}; - -/* id-ref forwarding list */ -struct soap_ilist -{ struct soap_ilist *next; - int type; - size_t size; - void *link; - void *copy; - struct soap_flist *flist; - void *ptr; - unsigned int level; - char id[1]; /* the actual id string value overflows into allocated region below this struct */ -}; - -struct soap_attribute -{ struct soap_attribute *next; - short visible; - char *value; - size_t size; - char *ns; - char name[1]; /* the actual name string overflows into allocated region below this struct */ -}; - -struct soap_cookie -{ struct soap_cookie *next; - char *name; - char *value; - char *domain; - char *path; - long expire; /* client-side: local time to expire; server-side: seconds to expire */ - unsigned int version; - short secure; - short session; /* server-side */ - short env; /* server-side: got cookie from client */ - short modified; /* server-side: client cookie was modified */ -}; - -struct soap_dom_attribute -{ struct soap_dom_attribute *next; - const char *nstr; - char *name; - char *data; - wchar_t *wide; - struct soap *soap; -#ifdef __cplusplus - struct soap_dom_attribute &set(const char *nstr, const char *name); // set namespace and name - struct soap_dom_attribute &set(const char *data); // set data - void unlink(); - soap_dom_attribute(); - soap_dom_attribute(struct soap *soap); - soap_dom_attribute(struct soap *soap, const char *nstr, const char *name, const char *data); - ~soap_dom_attribute(); -#endif -}; - -#ifdef __cplusplus -class soap_dom_iterator -{ public: - struct soap_dom_element *elt; - const char *nstr; - const char *name; - int type; - bool operator==(const soap_dom_iterator&) const; - bool operator!=(const soap_dom_iterator&) const; - struct soap_dom_element &operator*() const; - soap_dom_iterator &operator++(); - soap_dom_iterator(); - soap_dom_iterator(struct soap_dom_element*); - ~soap_dom_iterator(); -}; -#endif - -struct soap_dom_element -{ struct soap_dom_element *next; /* next sibling */ - struct soap_dom_element *prnt; /* parent */ - struct soap_dom_element *elts; /* first child element */ - struct soap_dom_attribute *atts; /* first child attribute */ - const char *nstr; /* namespace string */ - char *name; /* element tag name */ - char *data; /* element content data (with SOAP_C_UTFSTRING flag set) */ - wchar_t *wide; /* element content data */ - int type; /* optional: serialized C/C++ data type */ - void *node; /* optional: pointer to serialized C/C++ data */ - struct soap *soap; -#ifdef __cplusplus - typedef soap_dom_iterator iterator; - struct soap_dom_element &set(const char *nstr, const char *name); - struct soap_dom_element &set(const char *data); - struct soap_dom_element &set(void *node, int type); - struct soap_dom_element &add(struct soap_dom_element*); - struct soap_dom_element &add(struct soap_dom_element&); - struct soap_dom_element &add(struct soap_dom_attribute*); - struct soap_dom_element &add(struct soap_dom_attribute&); - soap_dom_iterator begin(); - soap_dom_iterator end(); - soap_dom_iterator find(const char *nstr, const char *name); - soap_dom_iterator find(int type); - void unlink(); - soap_dom_element(); - soap_dom_element(struct soap *soap); - soap_dom_element(struct soap *soap, const char *nstr, const char *name); - soap_dom_element(struct soap *soap, const char *nstr, const char *name, const char *data); - soap_dom_element(struct soap *soap, const char *nstr, const char *name, void *node, int type); - ~soap_dom_element(); -#endif -}; - -#if defined(__cplusplus) && !defined(UNDER_CE) -} -extern ostream &operator<<(ostream&, const struct soap_dom_element&); -extern istream &operator>>(istream&, struct soap_dom_element&); -extern "C" { -#endif - -struct soap -{ short version; /* 1 = SOAP1.1 and 2 = SOAP1.2 (set automatically from namespace URI in nsmap table) */ - unsigned int mode; - unsigned int imode; - unsigned int omode; - short copy; /* 1 = copy of another soap struct */ - const char *float_format; /* points to user-definable format string for floats (<1024 chars) */ - const char *double_format; /* points to user-definable format string for doubles (<1024 chars) */ - const char *dime_id_format; /* points to user-definable format string for integer DIME id ( 0, gives socket recv timeout in seconds, < 0 in usec */ - int send_timeout; /* when > 0, gives socket send timeout in seconds, < 0 in usec */ - int connect_timeout; /* when > 0, gives socket connect() timeout in seconds, < 0 in usec */ - int accept_timeout; /* when > 0, gives socket accept() timeout in seconds, < 0 in usec */ - int socket_flags; /* socket recv() and send() flags, e.g. set to MSG_NOSIGNAL to disable sigpipe */ - int connect_flags; /* connect() SOL_SOCKET sockopt flags, e.g. set to SO_DEBUG to debug socket */ - int bind_flags; /* bind() SOL_SOCKET sockopt flags, e.g. set to SO_REUSEADDR to enable reuse */ - int accept_flags; /* accept() SOL_SOCKET sockopt flags */ - struct Namespace *namespaces; /* Pointer to global namespace mapping table */ - struct Namespace *local_namespaces; /* Local namespace mapping table */ - struct soap_nlist *nlist; /* namespace stack */ - struct soap_blist *blist; /* block allocation stack */ - struct soap_clist *clist; /* class instance allocation list */ - void *alist; /* memory allocation list */ - struct soap_ilist *iht[SOAP_IDHASH]; - struct soap_plist *pht[SOAP_PTRHASH]; - struct SOAP_ENV__Header *header; - struct SOAP_ENV__Fault *fault; - void *user; /* to pass user-defined data */ - struct soap_plugin *plugins; /* linked list of plug-in data */ - char *userid; /* HTTP Basic authorization userid */ - char *passwd; /* HTTP Basic authorization passwd */ - int (*fpost)(struct soap*, const char*, const char*, int, const char*, const char*, size_t); - int (*fget)(struct soap*); - int (*fposthdr)(struct soap*, const char*, const char*); - int (*fresponse)(struct soap*, int, size_t); - int (*fparse)(struct soap*); - int (*fparsehdr)(struct soap*, const char*, const char*); - int (*fconnect)(struct soap*, const char*, const char*, int); - int (*fdisconnect)(struct soap*); - int (*fopen)(struct soap*, const char*, const char*, int); - int (*faccept)(struct soap*, int, struct sockaddr*, int *n); - int (*fclose)(struct soap*); - int (*fsend)(struct soap*, const char*, size_t); - size_t (*frecv)(struct soap*, char*, size_t); - int (*fprepare)(struct soap*, const char*, size_t); - int (*fignore)(struct soap*, const char*); - void *(*fplugin)(struct soap*, const char*); - void *(*fdimereadopen)(struct soap*, void*, const char*, const char*, const char*); - void *(*fdimewriteopen)(struct soap*, const char*, const char*, const char*); - void (*fdimereadclose)(struct soap*, void*); - void (*fdimewriteclose)(struct soap*, void*); - size_t (*fdimeread)(struct soap*, void*, char*, size_t); - int (*fdimewrite)(struct soap*, void*, const char*, size_t); - int master; - int socket; -#if defined(__cplusplus) && !defined(UNDER_CE) - ostream *os; - istream *is; -#else - void *os; /* preserve alignment */ - void *is; /* preserve alignment */ -#endif -#ifndef UNDER_CE - int sendfd; - int recvfd; -#else - FILE *sendfd; - FILE *recvfd; - char errorstr[256]; - wchar_t werrorstr[256]; -#endif - size_t bufidx; - size_t buflen; - wchar ahead; - short cdata; - short body; - unsigned int level; - size_t count; /* message length counter */ - size_t length; /* message length as set by HTTP header */ - char *labbuf; /* look-aside buffer */ - size_t lablen; /* look-aside buffer allocated length */ - size_t labidx; /* look-aside buffer index to available part */ - char buf[SOAP_BUFLEN];/* send and receive buffer */ - char msgbuf[1024]; /* output buffer for (error) messages <=1024 bytes */ - char tmpbuf[1024]; /* output buffer for HTTP headers, simpleType values, attribute names, and DIME >=1024 bytes */ - char tag[SOAP_TAGLEN]; - char id[SOAP_TAGLEN]; - char href[SOAP_TAGLEN]; - char type[SOAP_TAGLEN]; - char arrayType[SOAP_TAGLEN]; - char arraySize[SOAP_TAGLEN]; - char arrayOffset[SOAP_TAGLEN]; - short other; - short root; - short position; - int positions[SOAP_MAXDIMS]; - struct soap_attribute *attributes; /* attribute list */ - short encoding; - short mustUnderstand; - short null; - short ns; - short part; - short alloced; - short peeked; - short dot_net_bug; - short keep_alive; - size_t chunksize; - size_t chunkbuflen; - char endpoint[SOAP_TAGLEN]; - char path[SOAP_TAGLEN]; - char host[SOAP_TAGLEN]; - char *action; - int port; - unsigned int max_keep_alive; - const char *proxy_host; /* Proxy Server host name */ - int proxy_port; /* Proxy Server port (default = 8080) */ - const char *proxy_userid; /* Proxy Authorization user name */ - const char *proxy_passwd; /* Proxy Authorization password */ - int status; /* -1 when request, else error code to be returned by server */ - int error; - int errmode; - int errnum; - unsigned long idnum; - unsigned long ip; - size_t dime_count; - int dime_flags; - size_t dime_size; - size_t dime_chunksize; - size_t dime_buflen; - char *dime_ptr; - char *dime_id; - char *dime_type; - char *dime_options; - struct soap_dom_element *dom; -#ifndef WITH_LEAN - const char *logfile[SOAP_MAXLOGS]; - FILE *fdebug[SOAP_MAXLOGS]; - struct soap_cookie *cookies; - const char *cookie_domain; - const char *cookie_path; - int cookie_max; -#endif -#ifdef WITH_OPENSSL - int (*fsslauth)(struct soap*); - int (*fsslverify)(int, X509_STORE_CTX*); - BIO *bio; - SSL *ssl; - SSL_CTX *ctx; - short require_server_auth; - short require_client_auth; - short rsa; /* when set, use RSA instead of DH */ - const char *keyfile; - const char *password; - const char *dhfile; - const char *cafile; - const char *capath; - const char *randfile; - SSL_SESSION *session; - char session_host[SOAP_TAGLEN]; - int session_port; -#endif -#ifdef WITH_ZLIB - short zlib_state; /* SOAP_ZLIB_NONE, SOAP_ZLIB_DEFLATE, or SOAP_ZLIB_INFLATE */ - short zlib_in; /* SOAP_ZLIB_NONE, SOAP_ZLIB_DEFLATE, or SOAP_ZLIB_GZIP */ - short zlib_out; /* SOAP_ZLIB_NONE, SOAP_ZLIB_DEFLATE, or SOAP_ZLIB_GZIP */ - z_stream d_stream; /* decompression stream */ - char z_buf[SOAP_BUFLEN]; /* buffer */ - size_t z_buflen; - unsigned short z_level; /* compression level to be used (0=none, 1=fast to 9=best) */ - unsigned long z_crc; /* internal gzip crc */ - float z_ratio_in; /* detected compression ratio compressed_length/length of inbound message */ - float z_ratio_out; /* detected compression ratio compressed_length/length of outbound message */ -#endif -#ifdef PALM - UInt16 stdLibNum; - UInt16 stdLib2Num; - UInt16 stdLib3Num; - UInt16 genLibNum; - Err fH_errno; - Err fErrno; - Int32 timeout; - NetHostInfoBufType hostInfo; - UInt16 socketLibNum; -#endif -/* WR[ */ -#ifdef WMW_RPM_IO - void *rpmreqid; -#endif /* WMW_RPM_IO */ -/* ]WR */ -}; - -struct soap_code_map -{ long code; - const char *string; -}; - -/* forwarding list for container elements */ -struct soap_flist -{ struct soap_flist *next; - int type; - void *ptr; - unsigned int level; - void (*finsert)(struct soap*, int, void*, void*); -}; - -struct soap_plugin -{ struct soap_plugin *next; - const char *id; - void *data; - int (*fcopy)(struct soap *soap, struct soap_plugin *dst, struct soap_plugin *src); - void (*fdelete)(struct soap *soap, struct soap_plugin *p); /* should delete fields of plugin only and not free(p) */ -}; - -#ifndef WITH_NONAMESPACES -extern SOAP_NMAC struct Namespace namespaces[]; -#endif - -#ifdef HAVE_STRRCHR - #define soap_strrchr(s, t) strrchr(s, t) -#else - SOAP_FMAC1 char* SOAP_FMAC2 soap_strrchr(const char *s, int t); -#endif - -#ifdef HAVE_STRTOL - #define soap_strtol(s, t, b) strtol(s, t, b) -#else - SOAP_FMAC1 long SOAP_FMAC2 soap_strtol(const char *s, char **t, int b); -#endif - -#ifdef HAVE_STRTOUL - #define soap_strtoul(s, t, b) strtoul(s, t, b) -#else - SOAP_FMAC1 unsigned long SOAP_FMAC2 soap_strtoul(const char *s, char **t, int b); -#endif - -SOAP_FMAC1 void SOAP_FMAC2 soap_fault(struct soap*); -SOAP_FMAC1 const char** SOAP_FMAC2 soap_faultcode(struct soap*); -SOAP_FMAC1 const char** SOAP_FMAC2 soap_faultstring(struct soap*); -SOAP_FMAC1 const char** SOAP_FMAC2 soap_faultdetail(struct soap*); -SOAP_FMAC1 void SOAP_FMAC2 soap_serializeheader(struct soap*); -SOAP_FMAC1 int SOAP_FMAC2 soap_putheader(struct soap*); -SOAP_FMAC1 int SOAP_FMAC2 soap_getheader(struct soap*); -SOAP_FMAC1 void SOAP_FMAC2 soap_serializefault(struct soap*); -SOAP_FMAC1 int SOAP_FMAC2 soap_putfault(struct soap*); -SOAP_FMAC1 int SOAP_FMAC2 soap_getfault(struct soap*); - -SOAP_FMAC1 int SOAP_FMAC2 soap_poll(struct soap*); -SOAP_FMAC1 int SOAP_FMAC2 soap_connect_command(struct soap*, int, const char*, const char*); -SOAP_FMAC1 int SOAP_FMAC2 soap_connect(struct soap*, const char*, const char*); -SOAP_FMAC1 int SOAP_FMAC2 soap_bind(struct soap*, const char*, int, int); -SOAP_FMAC1 int SOAP_FMAC2 soap_accept(struct soap*); -SOAP_FMAC1 int SOAP_FMAC2 soap_ssl_accept(struct soap*); - -SOAP_FMAC1 int SOAP_FMAC2 soap_ssl_server_context(struct soap*, unsigned short, const char*, const char*, const char*, const char*, const char*, const char*, const char*); -SOAP_FMAC1 int SOAP_FMAC2 soap_ssl_client_context(struct soap*, unsigned short, const char*, const char*, const char*, const char*, const char*); - -SOAP_FMAC1 int SOAP_FMAC2 soap_puthttphdr(struct soap*, int status, size_t count); - -SOAP_FMAC1 int SOAP_FMAC2 soap_hash(const char*); -SOAP_FMAC1 void SOAP_FMAC2 soap_set_endpoint(struct soap*, const char*); -SOAP_FMAC1 int SOAP_FMAC2 soap_flush_raw(struct soap*, const char*, size_t); -SOAP_FMAC1 int SOAP_FMAC2 soap_flush(struct soap*); -SOAP_FMAC1 wchar SOAP_FMAC2 soap_get(struct soap*); -SOAP_FMAC1 wchar SOAP_FMAC2 soap_getchar(struct soap*); -SOAP_FMAC1 int SOAP_FMAC2 soap_tag_cmp(const char*, const char*); -SOAP_FMAC1 void SOAP_FMAC2 soap_set_fault(struct soap*); -SOAP_FMAC1 int SOAP_FMAC2 soap_sender_fault(struct soap*, const char*, const char*); -SOAP_FMAC1 int SOAP_FMAC2 soap_receiver_fault(struct soap*, const char*, const char*); -SOAP_FMAC1 int SOAP_FMAC2 soap_set_sender_error(struct soap*, const char*, const char*, int); -SOAP_FMAC1 int SOAP_FMAC2 soap_set_receiver_error(struct soap*, const char*, const char*, int); - -SOAP_FMAC1 int SOAP_FMAC2 soap_send_raw(struct soap*, const char*, size_t); -SOAP_FMAC1 int SOAP_FMAC2 soap_recv_raw(struct soap*); -SOAP_FMAC1 int SOAP_FMAC2 soap_send(struct soap*, const char*); -SOAP_FMAC1 int SOAP_FMAC2 soap_recv(struct soap*); - -SOAP_FMAC1 int SOAP_FMAC2 soap_pututf8(struct soap*, unsigned long); -SOAP_FMAC1 wchar SOAP_FMAC2 soap_getutf8(struct soap*); - -SOAP_FMAC1 int SOAP_FMAC2 soap_putbase64(struct soap*, const unsigned char*, int); -SOAP_FMAC1 unsigned char* SOAP_FMAC2 soap_getbase64(struct soap*, int*, int); -SOAP_FMAC1 int SOAP_FMAC2 soap_puthex(struct soap*, const unsigned char*, int); -SOAP_FMAC1 unsigned char* SOAP_FMAC2 soap_gethex(struct soap*, int*); - - -SOAP_FMAC1 struct soap_ilist* SOAP_FMAC2 soap_lookup(struct soap*, const char*); -SOAP_FMAC1 struct soap_ilist* SOAP_FMAC2 soap_enter(struct soap*, const char*); -SOAP_FMAC1 void SOAP_FMAC2 soap_resolve_ptr(struct soap_ilist*); -SOAP_FMAC1 int SOAP_FMAC2 soap_resolve(struct soap*); - -SOAP_FMAC1 int SOAP_FMAC2 soap_pointer_lookup(struct soap*, const void *p, int t, struct soap_plist**); -SOAP_FMAC1 int SOAP_FMAC2 soap_array_pointer_lookup(struct soap*, const void *p, const struct soap_array *a, int n, int t, struct soap_plist**); -SOAP_FMAC1 int SOAP_FMAC2 soap_pointer_lookup_id(struct soap*, void *p, int t, struct soap_plist**); -SOAP_FMAC1 int SOAP_FMAC2 soap_pointer_enter(struct soap*, const void *p, int t, struct soap_plist**); -SOAP_FMAC1 int SOAP_FMAC2 soap_array_pointer_enter(struct soap*, const void *p, const struct soap_array *a, int t, struct soap_plist**); - -SOAP_FMAC1 int SOAP_FMAC2 soap_embed_element(struct soap *soap, const void *p, const char *tag, int type); -SOAP_FMAC1 int SOAP_FMAC2 soap_embed_array(struct soap *soap, const void *p, const struct soap_array *a, int n, const char *tag, int type); - -SOAP_FMAC1 void SOAP_FMAC2 soap_begin_count(struct soap*); -SOAP_FMAC1 int SOAP_FMAC2 soap_begin_send(struct soap*); -SOAP_FMAC1 int SOAP_FMAC2 soap_end_send(struct soap*); - -SOAP_FMAC1 void SOAP_FMAC2 soap_embedded(struct soap*, const void *p, int t); -SOAP_FMAC1 int SOAP_FMAC2 soap_reference(struct soap*, const void *p, int t); -SOAP_FMAC1 int SOAP_FMAC2 soap_array_reference(struct soap*, const void *p, const struct soap_array *a, int n, int t); -SOAP_FMAC1 int SOAP_FMAC2 soap_embedded_id(struct soap*, int id, const void *p, int t); -SOAP_FMAC1 int SOAP_FMAC2 soap_is_embedded(struct soap*, struct soap_plist*); -SOAP_FMAC1 int SOAP_FMAC2 soap_is_single(struct soap*, struct soap_plist*); -SOAP_FMAC1 int SOAP_FMAC2 soap_is_multi(struct soap*, struct soap_plist*); -SOAP_FMAC1 void SOAP_FMAC2 soap_set_embedded(struct soap*, struct soap_plist*); - -SOAP_FMAC1 const struct soap_code_map* SOAP_FMAC2 soap_code(const struct soap_code_map*, const char *str); -SOAP_FMAC1 long SOAP_FMAC2 soap_int_code(const struct soap_code_map*, const char *str, long other); -SOAP_FMAC1 const char* SOAP_FMAC2 soap_str_code(const struct soap_code_map*, long code); - -SOAP_FMAC1 int SOAP_FMAC2 soap_getline(struct soap*, char*, int); -SOAP_FMAC1 int SOAP_FMAC2 soap_begin_recv(struct soap*); -SOAP_FMAC1 int SOAP_FMAC2 soap_end_recv(struct soap*); - -SOAP_FMAC1 void* SOAP_FMAC2 soap_malloc(struct soap*, size_t); -SOAP_FMAC1 void SOAP_FMAC2 soap_dealloc(struct soap*, void*); -SOAP_FMAC1 struct soap_clist * SOAP_FMAC2 soap_link(struct soap*, void*, int, int, void (*fdelete)(struct soap_clist*)); -SOAP_FMAC1 void SOAP_FMAC2 soap_unlink(struct soap*, const void*); -SOAP_FMAC1 void SOAP_FMAC2 soap_free(struct soap*); - -SOAP_FMAC1 int SOAP_FMAC2 soap_lookup_type(struct soap*, const char *id); - -SOAP_FMAC1 void* SOAP_FMAC2 soap_id_lookup(struct soap*, const char *id, void **p, int t, size_t n, unsigned int k); -SOAP_FMAC1 void* SOAP_FMAC2 soap_id_forward(struct soap*, const char *id, void *p, int t, size_t n); -SOAP_FMAC1 void* SOAP_FMAC2 soap_id_enter(struct soap*, const char *id, void *p, int t, size_t n, int k); - -SOAP_FMAC1 int SOAP_FMAC2 soap_size(const int *, int); -SOAP_FMAC1 int SOAP_FMAC2 soap_getoffsets(const char *, const int *, int *, int); -SOAP_FMAC1 int SOAP_FMAC2 soap_getsize(const char *, const char *, int *); -SOAP_FMAC1 int SOAP_FMAC2 soap_getsizes(const char *, int *, int); -SOAP_FMAC1 int SOAP_FMAC2 soap_getposition(const char *, int *); - -SOAP_FMAC1 char* SOAP_FMAC2 soap_putsize(struct soap*, const char *, int); -SOAP_FMAC1 char* SOAP_FMAC2 soap_putsizesoffsets(struct soap*, const char *, const int *, const int *, int); -SOAP_FMAC1 char* SOAP_FMAC2 soap_putsizes(struct soap*, const char *, const int *, int); -SOAP_FMAC1 char* SOAP_FMAC2 soap_putoffset(struct soap*, int); -SOAP_FMAC1 char* SOAP_FMAC2 soap_putoffsets(struct soap*, const int *, int); - -SOAP_FMAC1 int SOAP_FMAC2 soap_closesock(struct soap*); - -SOAP_FMAC1 struct soap *SOAP_FMAC2 soap_new(void); -SOAP_FMAC1 struct soap *SOAP_FMAC2 soap_new1(int); -SOAP_FMAC1 struct soap *SOAP_FMAC2 soap_new2(int, int); -SOAP_FMAC1 struct soap *SOAP_FMAC2 soap_copy(struct soap*); -SOAP_FMAC1 struct soap *SOAP_FMAC2 soap_copy_context(struct soap*,struct soap*); -SOAP_FMAC1 void SOAP_FMAC2 soap_init(struct soap*); -SOAP_FMAC1 void SOAP_FMAC2 soap_init1(struct soap*, int); -SOAP_FMAC1 void SOAP_FMAC2 soap_init2(struct soap*, int, int); -SOAP_FMAC1 void SOAP_FMAC2 soap_done(struct soap*); -SOAP_FMAC1 void SOAP_FMAC2 soap_cleanup(struct soap*); -SOAP_FMAC1 void SOAP_FMAC2 soap_begin(struct soap*); -SOAP_FMAC1 void SOAP_FMAC2 soap_end(struct soap*); -SOAP_FMAC1 void SOAP_FMAC2 soap_delete(struct soap*, void*); - -#ifndef WITH_LEAN -SOAP_FMAC1 void SOAP_FMAC2 soap_set_recv_logfile(struct soap*, const char*); -SOAP_FMAC1 void SOAP_FMAC2 soap_set_sent_logfile(struct soap*, const char*); -SOAP_FMAC1 void SOAP_FMAC2 soap_set_test_logfile(struct soap*, const char*); -SOAP_FMAC1 void SOAP_FMAC2 soap_close_logfiles(struct soap*); -SOAP_FMAC1 void SOAP_FMAC2 soap_open_logfile(struct soap*, int); -#endif - -SOAP_FMAC1 char* SOAP_FMAC2 soap_value(struct soap*); - -SOAP_FMAC1 wchar SOAP_FMAC2 soap_advance(struct soap*); -SOAP_FMAC1 wchar SOAP_FMAC2 soap_skip(struct soap*); - -SOAP_FMAC1 int SOAP_FMAC2 soap_match_tag(struct soap*, const char*, const char *); -SOAP_FMAC1 int SOAP_FMAC2 soap_match_array(struct soap*, const char*); - -SOAP_FMAC1 int SOAP_FMAC2 soap_element(struct soap*, const char*, int, const char*); -SOAP_FMAC1 int SOAP_FMAC2 soap_element_begin_out(struct soap*, const char *tag, int id, const char *type); -SOAP_FMAC1 int SOAP_FMAC2 soap_array_begin_out(struct soap*, const char *tag, int id, const char *type, const char *offset); -SOAP_FMAC1 int SOAP_FMAC2 soap_element_ref(struct soap*, const char *tag, int id, int href); -SOAP_FMAC1 int SOAP_FMAC2 soap_element_href(struct soap*, const char *tag, int id, const char *href); -SOAP_FMAC1 int SOAP_FMAC2 soap_element_null(struct soap*, const char *tag, int id, const char *type); -SOAP_FMAC1 int SOAP_FMAC2 soap_element_result(struct soap*, const char *tag); -SOAP_FMAC1 int SOAP_FMAC2 soap_element_end_out(struct soap*, const char *tag); -SOAP_FMAC1 int SOAP_FMAC2 soap_element_start_end_out(struct soap*, const char *tag); - -SOAP_FMAC1 int SOAP_FMAC2 soap_attribute(struct soap*, const char*, const char*); - -SOAP_FMAC1 int SOAP_FMAC2 soap_element_begin_in(struct soap*, const char *tag); - -SOAP_FMAC1 int SOAP_FMAC2 soap_element_end_in(struct soap*, const char *tag); - -SOAP_FMAC1 int SOAP_FMAC2 soap_peek_element(struct soap*); - -SOAP_FMAC1 void SOAP_FMAC2 soap_retry(struct soap*); -SOAP_FMAC1 void SOAP_FMAC2 soap_revert(struct soap*); - -SOAP_FMAC1 char* SOAP_FMAC2 soap_strdup(struct soap*, const char*); - -SOAP_FMAC1 int SOAP_FMAC2 soap_string_out(struct soap*, const char *s, int flag); -SOAP_FMAC1 char* SOAP_FMAC2 soap_string_in(struct soap*, int); -SOAP_FMAC1 int SOAP_FMAC2 soap_wstring_out(struct soap*, const wchar_t *s, int flag); -SOAP_FMAC1 wchar_t* SOAP_FMAC2 soap_wstring_in(struct soap*, int); - -SOAP_FMAC1 int SOAP_FMAC2 soap_match_namespace(struct soap*, const char *, const char*, int n1, int n2); -SOAP_FMAC1 const char* SOAP_FMAC2 soap_default_namespace(struct soap*); - -SOAP_FMAC1 int SOAP_FMAC2 soap_set_namespaces(struct soap*, struct Namespace*); - -SOAP_FMAC1 void SOAP_FMAC2 soap_pop_namespace(struct soap*); -SOAP_FMAC1 int SOAP_FMAC2 soap_push_namespace(struct soap*, const char *,const char *); -SOAP_FMAC1 int SOAP_FMAC2 soap_push_default_namespace(struct soap*, const char *, int); - -SOAP_FMAC1 int SOAP_FMAC2 soap_new_block(struct soap*); -SOAP_FMAC1 void* SOAP_FMAC2 soap_push_block(struct soap*, size_t); -SOAP_FMAC1 void SOAP_FMAC2 soap_pop_block(struct soap*); -SOAP_FMAC1 size_t SOAP_FMAC2 soap_size_block(struct soap*, size_t); -SOAP_FMAC1 char* SOAP_FMAC2 soap_first_block(struct soap*); -SOAP_FMAC1 char* SOAP_FMAC2 soap_next_block(struct soap*); -SOAP_FMAC1 size_t SOAP_FMAC2 soap_block_size(struct soap*); -SOAP_FMAC1 char* SOAP_FMAC2 soap_save_block(struct soap*, char*); -SOAP_FMAC1 char* SOAP_FMAC2 soap_store_block(struct soap*, char*); -SOAP_FMAC1 void SOAP_FMAC2 soap_end_block(struct soap*); - -SOAP_FMAC1 int SOAP_FMAC2 soap_envelope_begin_out(struct soap*); -SOAP_FMAC1 int soap_envelope_end_out(struct soap*); - -SOAP_FMAC1 int SOAP_FMAC2 soap_envelope_begin_in(struct soap*); -SOAP_FMAC1 int SOAP_FMAC2 soap_envelope_end_in(struct soap*); - -SOAP_FMAC1 int SOAP_FMAC2 soap_body_begin_out(struct soap*); -SOAP_FMAC1 int SOAP_FMAC2 soap_body_end_out(struct soap*); - -SOAP_FMAC1 int SOAP_FMAC2 soap_body_begin_in(struct soap*); -SOAP_FMAC1 int SOAP_FMAC2 soap_body_end_in(struct soap*); - -SOAP_FMAC1 int SOAP_FMAC2 soap_recv_header(struct soap*); - -SOAP_FMAC1 int SOAP_FMAC2 soap_response(struct soap*, int); - -SOAP_FMAC1 int SOAP_FMAC2 soap_send_fault(struct soap*); - -SOAP_FMAC1 int SOAP_FMAC2 soap_recv_fault(struct soap*); - -SOAP_FMAC1 void SOAP_FMAC2 soap_print_fault(struct soap*, FILE*); -SOAP_FMAC1 void SOAP_FMAC2 soap_print_fault_location(struct soap*, FILE*); - -SOAP_FMAC1 int SOAP_FMAC2 soap_s2byte(struct soap*, const char*, char*); -SOAP_FMAC1 int SOAP_FMAC2 soap_s2short(struct soap*, const char*, short*); -SOAP_FMAC1 int SOAP_FMAC2 soap_s2int(struct soap*, const char*, int*); -SOAP_FMAC1 int SOAP_FMAC2 soap_s2long(struct soap*, const char*, long*); -SOAP_FMAC1 int SOAP_FMAC2 soap_s2LONG64(struct soap*, const char*, LONG64*); -SOAP_FMAC1 int SOAP_FMAC2 soap_s2float(struct soap*, const char*, float*); -SOAP_FMAC1 int SOAP_FMAC2 soap_s2double(struct soap*, const char*, double*); -SOAP_FMAC1 int SOAP_FMAC2 soap_s2unsignedByte(struct soap*, const char*, unsigned char*); -SOAP_FMAC1 int SOAP_FMAC2 soap_s2unsignedShort(struct soap*, const char*, unsigned short*); -SOAP_FMAC1 int SOAP_FMAC2 soap_s2unsignedInt(struct soap*, const char*, unsigned int*); -SOAP_FMAC1 int SOAP_FMAC2 soap_s2unsignedLong(struct soap*, const char*, unsigned long*); -SOAP_FMAC1 int SOAP_FMAC2 soap_s2ULONG64(struct soap*, const char*, ULONG64*); -SOAP_FMAC1 int SOAP_FMAC2 soap_s2dateTime(struct soap*, const char*, time_t*); -SOAP_FMAC1 int SOAP_FMAC2 soap_s2string(struct soap*, const char*, char**); -SOAP_FMAC1 int SOAP_FMAC2 soap_s2QName(struct soap*, const char*, char**); -SOAP_FMAC1 int SOAP_FMAC2 soap_s2base64(struct soap*, const unsigned char*, char*, size_t); - -SOAP_FMAC1 const char* SOAP_FMAC2 soap_byte2s(struct soap*, char); -SOAP_FMAC1 const char* SOAP_FMAC2 soap_short2s(struct soap*, short); -SOAP_FMAC1 const char* SOAP_FMAC2 soap_int2s(struct soap*, int); -SOAP_FMAC1 const char* SOAP_FMAC2 soap_long2s(struct soap*, long); -SOAP_FMAC1 const char* SOAP_FMAC2 soap_LONG642s(struct soap*, LONG64); -SOAP_FMAC1 const char* SOAP_FMAC2 soap_float2s(struct soap*, float); -SOAP_FMAC1 const char* SOAP_FMAC2 soap_double2s(struct soap*, double); -SOAP_FMAC1 const char* SOAP_FMAC2 soap_unsignedByte2s(struct soap*, unsigned char); -SOAP_FMAC1 const char* SOAP_FMAC2 soap_unsignedShort2s(struct soap*, unsigned short); -SOAP_FMAC1 const char* SOAP_FMAC2 soap_unsignedInt2s(struct soap*, unsigned int); -SOAP_FMAC1 const char* SOAP_FMAC2 soap_unsignedLong2s(struct soap*, unsigned long); -SOAP_FMAC1 const char* SOAP_FMAC2 soap_ULONG642s(struct soap*, ULONG64); -SOAP_FMAC1 const char* SOAP_FMAC2 soap_dateTime2s(struct soap*, time_t); -SOAP_FMAC1 const char* SOAP_FMAC2 soap_QName2s(struct soap*, const char*); -SOAP_FMAC1 const char* SOAP_FMAC2 soap_base642s(struct soap*, const char*, char*, size_t, size_t*); - -SOAP_FMAC1 int* SOAP_FMAC2 soap_inint(struct soap*, const char *tag, int *p, const char *, int); -SOAP_FMAC1 char* SOAP_FMAC2 soap_inbyte(struct soap*, const char *tag, char *p, const char *, int); -SOAP_FMAC1 long* SOAP_FMAC2 soap_inlong(struct soap*, const char *tag, long *p, const char *, int); -SOAP_FMAC1 LONG64* SOAP_FMAC2 soap_inLONG64(struct soap*, const char *tag, LONG64 *p, const char *, int); -SOAP_FMAC1 short* SOAP_FMAC2 soap_inshort(struct soap*, const char *tag, short *p, const char *, int); -SOAP_FMAC1 float* SOAP_FMAC2 soap_infloat(struct soap*, const char *tag, float *p, const char *, int); -SOAP_FMAC1 double* SOAP_FMAC2 soap_indouble(struct soap*, const char *tag, double *p, const char *, int); -SOAP_FMAC1 unsigned char* SOAP_FMAC2 soap_inunsignedByte(struct soap*, const char *tag, unsigned char *p, const char *, int); -SOAP_FMAC1 unsigned short* SOAP_FMAC2 soap_inunsignedShort(struct soap*, const char *tag, unsigned short *p, const char *, int); -SOAP_FMAC1 unsigned int* SOAP_FMAC2 soap_inunsignedInt(struct soap*, const char *tag, unsigned int *p, const char *, int); -SOAP_FMAC1 unsigned long* SOAP_FMAC2 soap_inunsignedLong(struct soap*, const char *tag, unsigned long *p, const char *, int); -SOAP_FMAC1 ULONG64* SOAP_FMAC2 soap_inULONG64(struct soap*, const char *tag, ULONG64 *p, const char *, int); -SOAP_FMAC1 time_t* SOAP_FMAC2 soap_indateTime(struct soap*, const char *tag, time_t *p, const char *, int); -SOAP_FMAC1 char** SOAP_FMAC2 soap_instring(struct soap*, const char *tag, char **p, const char *, int, int); -SOAP_FMAC1 wchar_t** SOAP_FMAC2 soap_inwstring(struct soap*, const char *tag, wchar_t **p, const char *, int); -SOAP_FMAC1 char** SOAP_FMAC2 soap_inliteral(struct soap*, const char *tag, char **p); -SOAP_FMAC1 wchar_t** SOAP_FMAC2 soap_inwliteral(struct soap*, const char *tag, wchar_t **p); - -SOAP_FMAC1 int SOAP_FMAC2 soap_outbyte(struct soap*, const char *tag, int id, const char *p, const char *, int); -SOAP_FMAC1 int SOAP_FMAC2 soap_outshort(struct soap*, const char *tag, int id, const short *p, const char *, int); -SOAP_FMAC1 int SOAP_FMAC2 soap_outint(struct soap*, const char *tag, int id, const int *p, const char *, int); -SOAP_FMAC1 int SOAP_FMAC2 soap_outlong(struct soap*, const char *tag, int id, const long *p, const char *, int); -SOAP_FMAC1 int SOAP_FMAC2 soap_outLONG64(struct soap*, const char *tag, int id, const LONG64 *p, const char *, int); -SOAP_FMAC1 int SOAP_FMAC2 soap_outfloat(struct soap*, const char *tag, int id, const float *p, const char *, int); -SOAP_FMAC1 int SOAP_FMAC2 soap_outdouble(struct soap*, const char *tag, int id, const double *p, const char *, int); -SOAP_FMAC1 int SOAP_FMAC2 soap_outunsignedByte(struct soap*, const char *tag, int id, const unsigned char *p, const char *, int); -SOAP_FMAC1 int SOAP_FMAC2 soap_outunsignedShort(struct soap*, const char *tag, int id, const unsigned short *p, const char *, int); -SOAP_FMAC1 int SOAP_FMAC2 soap_outunsignedInt(struct soap*, const char *tag, int id, const unsigned int *p, const char *, int); -SOAP_FMAC1 int SOAP_FMAC2 soap_outunsignedLong(struct soap*, const char *tag, int id, const unsigned long *p, const char *, int); -SOAP_FMAC1 int SOAP_FMAC2 soap_outULONG64(struct soap*, const char *tag, int id, const ULONG64 *p, const char *, int); -SOAP_FMAC1 int SOAP_FMAC2 soap_outdateTime(struct soap*, const char *tag, int id, const time_t *p, const char *, int); -SOAP_FMAC1 int SOAP_FMAC2 soap_outstring(struct soap*, const char *tag, int id, char *const*p, const char *, int); -SOAP_FMAC1 int SOAP_FMAC2 soap_outwstring(struct soap*, const char *tag, int id, wchar_t *const*p, const char *, int); -SOAP_FMAC1 int SOAP_FMAC2 soap_outliteral(struct soap*, const char *tag, char *const*p); -SOAP_FMAC1 int SOAP_FMAC2 soap_outwliteral(struct soap*, const char *tag, wchar_t *const*p); - -#ifndef WITH_LEANER -SOAP_FMAC1 void SOAP_FMAC2 soap_set_attached(struct soap*, struct soap_plist*, const char*, const char*, const char*, size_t); -SOAP_FMAC1 int SOAP_FMAC2 soap_move(struct soap*, long); -SOAP_FMAC1 size_t SOAP_FMAC2 soap_tell(struct soap*); -SOAP_FMAC1 char* SOAP_FMAC2 soap_dime_option(struct soap*, unsigned short, const char*); -SOAP_FMAC1 int SOAP_FMAC2 soap_getdimehdr(struct soap*); -SOAP_FMAC1 int SOAP_FMAC2 soap_getdime(struct soap*); -SOAP_FMAC1 int SOAP_FMAC2 soap_putdimehdr(struct soap*); -SOAP_FMAC1 int SOAP_FMAC2 soap_putdime(struct soap*, int, char*, char*, char*, void*, size_t); -#endif - -SOAP_FMAC1 int SOAP_FMAC2 soap_register_plugin_arg(struct soap*, int (*fcreate)(struct soap*, struct soap_plugin*, void*), void*); -SOAP_FMAC1 void* SOAP_FMAC2 soap_lookup_plugin(struct soap*, const char*); - -SOAP_FMAC1 struct soap_attribute * SOAP_FMAC2 soap_attr(struct soap *soap, const char *name); -SOAP_FMAC1 const char* SOAP_FMAC2 soap_attr_value(struct soap *soap, const char *name); -SOAP_FMAC1 int SOAP_FMAC2 soap_set_attr(struct soap *soap, const char *name, const char *value); -SOAP_FMAC1 void SOAP_FMAC2 soap_clr_attr(struct soap *soap); - -#ifdef WITH_COOKIES -SOAP_FMAC1 int SOAP_FMAC2 soap_encode_cookie(const char*, char*, int); -SOAP_FMAC1 const char* SOAP_FMAC2 soap_decode_cookie(char*, int, const char*); -SOAP_FMAC1 extern struct soap_cookie* SOAP_FMAC2 soap_set_cookie(struct soap*, const char*, const char*, const char*, const char*); -SOAP_FMAC1 extern struct soap_cookie* SOAP_FMAC2 soap_cookie(struct soap*, const char*, const char*, const char*); -SOAP_FMAC1 extern char* SOAP_FMAC2 soap_cookie_value(struct soap*, const char*, const char*, const char*); -SOAP_FMAC1 extern long SOAP_FMAC2 soap_cookie_expire(struct soap*, const char*, const char*, const char*); -SOAP_FMAC1 extern int SOAP_FMAC2 soap_set_cookie_expire(struct soap*, const char*, long, const char*, const char*); -SOAP_FMAC1 extern int SOAP_FMAC2 soap_set_cookie_session(struct soap*, const char*, const char*, const char*); -SOAP_FMAC1 extern int SOAP_FMAC2 soap_clr_cookie_session(struct soap*, const char*, const char*, const char*); -SOAP_FMAC1 extern void SOAP_FMAC2 soap_clr_cookie(struct soap*, const char*, const char*, const char*); -SOAP_FMAC1 extern int SOAP_FMAC2 soap_getenv_cookies(struct soap*); -SOAP_FMAC1 extern struct soap_cookie* SOAP_FMAC2 soap_copy_cookies(struct soap*); -SOAP_FMAC1 extern void SOAP_FMAC2 soap_free_cookies(struct soap*); -#endif - -#if defined(PALM) && !defined(NOSHAREDLIB) && !(defined(BUILDING_STDSOAP) || defined(BUILDING_STDSOAP2) || defined(BUILDING_STDLIB) || defined(BUILDING_STDLIB2) || defined(PALM_1) || defined(PALM_2)) -# include "palmSharedLib.h" -#endif - -#ifdef __cplusplus -} -#endif - -#endif - diff --git a/org.glite.security.gsoap-plugin/src/stdsoap2_2.7.0.c b/org.glite.security.gsoap-plugin/src/stdsoap2_2.7.0.c deleted file mode 100644 index fab9eee..0000000 --- a/org.glite.security.gsoap-plugin/src/stdsoap2_2.7.0.c +++ /dev/null @@ -1,11692 +0,0 @@ -/* - -stdsoap2.c[pp] 2.7.0d - -Runtime environment. - -gSOAP XML Web services tools -Copyright (C) 2000-2004, Robert van Engelen, Genivia, Inc., All Rights Reserved. - -Contributors: - -Wind River Systems, Inc., for the following additions (marked WR[...]): - - vxWorks compatible - - Support for IPv6. - --------------------------------------------------------------------------------- -gSOAP public license. - -The contents of this file are subject to the gSOAP Public License Version 1.3 -(the "License"); you may not use this file except in compliance with the -License. You may obtain a copy of the License at -http://www.cs.fsu.edu/~engelen/soaplicense.html -Software distributed under the License is distributed on an "AS IS" basis, -WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License -for the specific language governing rights and limitations under the License. - -The Initial Developer of the Original Code is Robert A. van Engelen. -Copyright (C) 2000-2004, Robert van Engelen, Genivia, Inc., All Rights Reserved. --------------------------------------------------------------------------------- -GPL license. - -This program is free software; you can redistribute it and/or modify it under -the terms of the GNU General Public License as published by the Free Software -Foundation; either version 2 of the License, or (at your option) any later -version. - -This program is distributed in the hope that it will be useful, but WITHOUT ANY -WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A -PARTICULAR PURPOSE. See the GNU General Public License for more details. - -You should have received a copy of the GNU General Public License along with -this program; if not, write to the Free Software Foundation, Inc., 59 Temple -Place, Suite 330, Boston, MA 02111-1307 USA - -Author contact information: -engelen@genivia.com / engelen@acm.org --------------------------------------------------------------------------------- - -Installation note: - -Win32 build needs winsock.dll (Visual C++ "wsock32.lib") -To do this in Visual C++ 6.0, go to "Project", "settings", select the "Link" -tab (the project file needs to be selected in the file view) and add -"wsock32.lib" to the "Object/library modules" entry - -On Mac OS X with gcc (GCC) 3.1 20020420 (prerelease) you MUST compile with --fstack_check when using -O2 because gcc 3.1 has a bug that smashes the stack -when locally allocated data exceeds 64K. - -*/ - -#include "stdsoap2.h" - -#ifdef __cplusplus -SOAP_SOURCE_STAMP("@(#) stdsoap2.cpp ver 2.7.0c 2004-09-27 12:00:00 GMT") -extern "C" { -#else -SOAP_SOURCE_STAMP("@(#) stdsoap2.c ver 2.7.0c 2004-09-27 12:00:00 GMT") -#endif - -/* 8bit character representing unknown/nonrepresentable character data (e.g. not supported by current locale) */ -#ifndef SOAP_UNKNOWN_CHAR -#define SOAP_UNKNOWN_CHAR (127) -#endif - -/* EOF=-1 */ -#define SOAP_LT (soap_wchar)(-2) /* XML character '<' */ -#define SOAP_TT (soap_wchar)(-3) /* XML character '' */ -#define SOAP_QT (soap_wchar)(-5) /* XML character '"' */ -#define SOAP_AP (soap_wchar)(-6) /* XML character ''' */ - -#define soap_blank(c) ((c) >= 0 && (c) <= 32) -#define soap_notblank(c) ((c) > 32) -#define soap_hash_ptr(p) (((unsigned long)(p) >> 3) & (SOAP_PTRHASH - 1)) - -static int soap_isxdigit(int); -static soap_wchar soap_char(struct soap*); -static soap_wchar soap_getchunkchar(struct soap*); -static void soap_update_ptrs(struct soap*, char*, char*, long); -static int soap_has_copies(struct soap*, const char*, const char*); -static struct soap_ilist *soap_hlookup(struct soap*, const char*); -static void soap_init_iht(struct soap*); -static void soap_free_iht(struct soap*); -static void soap_init_pht(struct soap*); -static void soap_free_pht(struct soap*); -static int soap_set_error(struct soap*, const char*, const char*, const char*, int); -static const char *soap_set_validation_fault(struct soap*, const char*, const char*); -static int soap_copy_fault(struct soap*, const char*, const char*, const char*); -static int soap_getattrval(struct soap*, char*, size_t, soap_wchar); -static void soap_set_local_namespaces(struct soap*); -static int soap_isnumeric(struct soap*, const char*); -static void *fplugin(struct soap*, const char*); -static const char *soap_decode(char*, size_t, const char*, const char*); - -#ifndef WITH_LEAN -static time_t soap_timegm(struct tm*); -#endif - -#ifdef SOAP_DEBUG -static void soap_init_logs(struct soap*); -static void soap_close_logfile(struct soap*, int); -static void soap_set_logfile(struct soap*, int, const char*); -#endif - -#ifdef WITH_FAST -static int soap_append_lab(struct soap*, const char*, size_t); -#endif - -#ifndef WITH_LEANER -static struct soap_multipart *soap_new_multipart(struct soap*, struct soap_multipart**, struct soap_multipart**, char*, size_t); -static int soap_putdimefield(struct soap*, const char*, size_t); -static char *soap_getdimefield(struct soap*, size_t); -static void soap_select_mime_boundary(struct soap*); -static int soap_valid_mime_boundary(struct soap*); -#endif - -#ifdef WITH_GZIP -static int soap_getgziphdr(struct soap*); -#endif - -#ifdef WITH_OPENSSL -static int ssl_auth_init(struct soap*); -static int ssl_verify_callback(int, X509_STORE_CTX*); -static int ssl_password(char*, int, int, void *); -static const char *ssl_error(struct soap*, int); -/* This callback is included for future references. It should not be deleted -static DH *ssl_tmp_dh(SSL*, int, int); -*/ -#endif - -static const char *soap_strerror(struct soap*); -static const char *tcp_error(struct soap*); -static const char *http_error(struct soap*, int); -static int http_post(struct soap*, const char*, const char*, int, const char*, const char*, size_t); -static int http_get(struct soap*); -static int http_send_header(struct soap*, const char*); -static int http_post_header(struct soap*, const char*, const char*); -static int http_response(struct soap*, int, size_t); -static int http_parse(struct soap*); -static int http_parse_header(struct soap*, const char*, const char*); -#ifndef MAC_CARBON -static int tcp_gethost(struct soap*, const char *addr, struct in_addr *inaddr); -static int tcp_connect(struct soap*, const char *endpoint, const char *host, int port); -static int tcp_accept(struct soap*, int, struct sockaddr*, int*); -static int tcp_disconnect(struct soap*); -static int tcp_closesocket(struct soap*, SOAP_SOCKET); -static int tcp_shutdownsocket(struct soap*, SOAP_SOCKET, int); -static int fsend(struct soap*, const char*, size_t); -static size_t frecv(struct soap*, char*, size_t); -#endif - -/* WR[ */ -#ifdef VXWORKS -static int vx_nonblocking = TRUE; /* ioctl argument */ -#endif -/* ]WR */ - -#if defined(PALM) && !defined(PALM_2) -unsigned short errno; -#endif - -#ifndef PALM_1 -static const char soap_env1[42] = "http://schemas.xmlsoap.org/soap/envelope/"; -static const char soap_enc1[42] = "http://schemas.xmlsoap.org/soap/encoding/"; -static const char soap_env2[40] = "http://www.w3.org/2003/05/soap-envelope"; -static const char soap_enc2[40] = "http://www.w3.org/2003/05/soap-encoding"; -static const char soap_rpc[35] = "http://www.w3.org/2003/05/soap-rpc"; -#endif - -#ifndef PALM_1 -const struct soap_double_nan soap_double_nan = {0xFFFFFFFF, 0xFFFFFFFF}; -static const char soap_base64o[65] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; -static const char soap_base64i[81] = "\76XXX\77\64\65\66\67\70\71\72\73\74\75XXXXXXX\00\01\02\03\04\05\06\07\10\11\12\13\14\15\16\17\20\21\22\23\24\25\26\27\30\31XXXXXX\32\33\34\35\36\37\40\41\42\43\44\45\46\47\50\51\52\53\54\55\56\57\60\61\62\63"; -#endif - -static const char soap_padding[3] = "\0\0"; -#define SOAP_STR_PADDING (soap_padding) -#define SOAP_STR_EOS (soap_padding) - -#ifndef WITH_LEAN -static const struct soap_code_map html_entity_codes[] = /* entities for XHTML parsing */ -{ { 160, "nbsp" }, - { 161, "iexcl" }, - { 162, "cent" }, - { 163, "pound" }, - { 164, "curren" }, - { 165, "yen" }, - { 166, "brvbar" }, - { 167, "sect" }, - { 168, "uml" }, - { 169, "copy" }, - { 170, "ordf" }, - { 171, "laquo" }, - { 172, "not" }, - { 173, "shy" }, - { 174, "reg" }, - { 175, "macr" }, - { 176, "deg" }, - { 177, "plusmn" }, - { 178, "sup2" }, - { 179, "sup3" }, - { 180, "acute" }, - { 181, "micro" }, - { 182, "para" }, - { 183, "middot" }, - { 184, "cedil" }, - { 185, "sup1" }, - { 186, "ordm" }, - { 187, "raquo" }, - { 188, "frac14" }, - { 189, "frac12" }, - { 190, "frac34" }, - { 191, "iquest" }, - { 192, "Agrave" }, - { 193, "Aacute" }, - { 194, "Acirc" }, - { 195, "Atilde" }, - { 196, "Auml" }, - { 197, "Aring" }, - { 198, "AElig" }, - { 199, "Ccedil" }, - { 200, "Egrave" }, - { 201, "Eacute" }, - { 202, "Ecirc" }, - { 203, "Euml" }, - { 204, "Igrave" }, - { 205, "Iacute" }, - { 206, "Icirc" }, - { 207, "Iuml" }, - { 208, "ETH" }, - { 209, "Ntilde" }, - { 210, "Ograve" }, - { 211, "Oacute" }, - { 212, "Ocirc" }, - { 213, "Otilde" }, - { 214, "Ouml" }, - { 215, "times" }, - { 216, "Oslash" }, - { 217, "Ugrave" }, - { 218, "Uacute" }, - { 219, "Ucirc" }, - { 220, "Uuml" }, - { 221, "Yacute" }, - { 222, "THORN" }, - { 223, "szlig" }, - { 224, "agrave" }, - { 225, "aacute" }, - { 226, "acirc" }, - { 227, "atilde" }, - { 228, "auml" }, - { 229, "aring" }, - { 230, "aelig" }, - { 231, "ccedil" }, - { 232, "egrave" }, - { 233, "eacute" }, - { 234, "ecirc" }, - { 235, "euml" }, - { 236, "igrave" }, - { 237, "iacute" }, - { 238, "icirc" }, - { 239, "iuml" }, - { 240, "eth" }, - { 241, "ntilde" }, - { 242, "ograve" }, - { 243, "oacute" }, - { 244, "ocirc" }, - { 245, "otilde" }, - { 246, "ouml" }, - { 247, "divide" }, - { 248, "oslash" }, - { 249, "ugrave" }, - { 250, "uacute" }, - { 251, "ucirc" }, - { 252, "uuml" }, - { 253, "yacute" }, - { 254, "thorn" }, - { 255, "yuml" }, - { 0, NULL } -}; -#endif - -#ifndef WITH_LEAN -static const struct soap_code_map h_error_codes[] = -{ -#ifdef HOST_NOT_FOUND - { HOST_NOT_FOUND, "Host not found" }, -#endif -#ifdef TRY_AGAIN - { TRY_AGAIN, "Try Again" }, -#endif -#ifdef NO_RECOVERY - { NO_RECOVERY, "No Recovery" }, -#endif -#ifdef NO_DATA - { NO_DATA, "No Data" }, -#endif -#ifdef NO_ADDRESS - { NO_ADDRESS, "No Address" }, -#endif - { 0, NULL } -}; -#endif - -#ifndef WITH_LEAN -static const struct soap_code_map h_http_error_codes[] = -{ { 201, "Created" }, - { 202, "Accepted" }, - { 203, "Non-Authoritative Information" }, - { 204, "No Content" }, - { 205, "Reset Content" }, - { 206, "Partial Content" }, - { 300, "Multiple Choices" }, - { 301, "Moved Permanently" }, - { 302, "Found" }, - { 303, "See Other" }, - { 304, "Not Modified" }, - { 305, "Use Proxy" }, - { 307, "Temporary Redirect" }, - { 400, "Bad Request" }, - { 401, "Unauthorized" }, - { 402, "Payment Required" }, - { 403, "Forbidden" }, - { 404, "Not Found" }, - { 405, "Method Not Allowed" }, - { 406, "Not Acceptable" }, - { 407, "Proxy Authentication Required" }, - { 408, "Request Time-out" }, - { 409, "Conflict" }, - { 410, "Gone" }, - { 411, "Length Required" }, - { 412, "Precondition Failed" }, - { 413, "Request Entity Too Large" }, - { 414, "Request-URI Too Large" }, - { 415, "Unsupported Media Type" }, - { 416, "Requested range not satisfiable" }, - { 417, "Expectation Failed" }, - { 500, "Internal Server Error" }, - { 501, "Not Implemented" }, - { 502, "Bad Gateway" }, - { 503, "Service Unavailable" }, - { 504, "Gateway Time-out" }, - { 505, "HTTP Version not supported" }, - { 0, NULL } -}; -#endif - -#ifdef WITH_OPENSSL -static const struct soap_code_map h_ssl_error_codes[] = -{ -#define _SSL_ERROR(e) { e, #e } - _SSL_ERROR(SSL_ERROR_SSL), - _SSL_ERROR(SSL_ERROR_ZERO_RETURN), - _SSL_ERROR(SSL_ERROR_WANT_READ), - _SSL_ERROR(SSL_ERROR_WANT_WRITE), - _SSL_ERROR(SSL_ERROR_WANT_CONNECT), - _SSL_ERROR(SSL_ERROR_WANT_X509_LOOKUP), - _SSL_ERROR(SSL_ERROR_SYSCALL), - { 0, NULL } -}; -#endif - -#ifndef WITH_LEANER -static const struct soap_code_map mime_codes[] = -{ { SOAP_MIME_7BIT, "7bit" }, - { SOAP_MIME_8BIT, "8bit" }, - { SOAP_MIME_BINARY, "binary" }, - { SOAP_MIME_QUOTED_PRINTABLE, "quoted-printable" }, - { SOAP_MIME_BASE64, "base64" }, - { SOAP_MIME_IETF_TOKEN, "ietf-token" }, - { SOAP_MIME_X_TOKEN, "x-token" }, - { 0, NULL } -}; -#endif - -#ifdef WIN32 -static int tcp_done = 0; -#endif - -/******************************************************************************/ -#ifndef MAC_CARBON -#ifndef PALM_1 -static int -fsend(struct soap *soap, const char *s, size_t n) -{ register int nwritten; -#if defined(__cplusplus) && !defined(WITH_LEAN) - if (soap->os) - { soap->os->write(s, n); - if (soap->os->good()) - return SOAP_OK; - return SOAP_EOF; - } -#endif - while (n) - { if (soap_valid_socket(soap->socket)) - { -#ifndef WITH_LEAN - if (soap->send_timeout) - { struct timeval timeout; - fd_set fd; - if (soap->send_timeout > 0) - { timeout.tv_sec = soap->send_timeout; - timeout.tv_usec = 0; - } - else - { timeout.tv_sec = -soap->send_timeout/1000000; - timeout.tv_usec = -soap->send_timeout%1000000; - } - FD_ZERO(&fd); - FD_SET((SOAP_SOCKET)soap->socket, &fd); - for (;;) - { register int r = select((SOAP_SOCKET)(soap->socket + 1), NULL, &fd, &fd, &timeout); - if (r > 0) - break; - if (!r) - { soap->errnum = 0; - return SOAP_EOF; - } - if (soap_socket_errno != SOAP_EINTR) - { soap->errnum = soap_socket_errno; - return SOAP_EOF; - } - } - } -#endif -#ifdef WITH_OPENSSL - if (soap->ssl) - nwritten = SSL_write(soap->ssl, s, n); - else -#endif -#ifndef PALM - nwritten = send((SOAP_SOCKET)soap->socket, s, n, soap->socket_flags); -#else - nwritten = send((SOAP_SOCKET)soap->socket, (void*)s, n, soap->socket_flags); -#endif - if (nwritten <= 0) - { -#ifdef WITH_OPENSSL - int err; - if (soap->ssl && (err = SSL_get_error(soap->ssl, nwritten)) != SSL_ERROR_NONE && err != SSL_ERROR_WANT_READ && err != SSL_ERROR_WANT_WRITE) - return SOAP_EOF; -#endif - if (soap_socket_errno != SOAP_EINTR && soap_socket_errno != SOAP_EWOULDBLOCK && soap_socket_errno != SOAP_EAGAIN) - { soap->errnum = soap_socket_errno; - return SOAP_EOF; - } - nwritten = 0; /* and call write() again */ - } - } - else - { -#ifdef WITH_FASTCGI - nwritten = fwrite((void*)s, 1, n, stdout); - fflush(stdout); -#else -#ifdef UNDER_CE - nwritten = fwrite(s, 1, n, soap->sendfd); -#else -/* WR[ */ -#ifdef VXWORKS -#ifdef WMW_RPM_IO - if (soap->rpmreqid) - { - httpBlockPut(soap->rpmreqid, s, n); - nwritten = n; - } - else - { - nwritten = fwrite(s, sizeof(char), n, fdopen(soap->sendfd, "w")); - } -#else - nwritten = fwrite(s, sizeof(char), n, fdopen(soap->sendfd, "w")); -#endif /* WMW_RPM_IO */ -#else -/* ]WR */ - nwritten = write((SOAP_SOCKET)soap->sendfd, s, n); -/* WR[ */ -#endif -/* ]WR */ -#endif -#endif - if (nwritten <= 0) - { if (soap_errno != SOAP_EINTR && soap_errno != SOAP_EWOULDBLOCK && soap_errno != SOAP_EAGAIN) - { soap->errnum = soap_errno; - return SOAP_EOF; - } - nwritten = 0; /* and call write() again */ - } - } - n -= nwritten; - s += nwritten; - } - return SOAP_OK; -} -#endif -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_flush_raw(struct soap *soap, const char *s, size_t n) -{ if ((soap->mode & SOAP_IO) == SOAP_IO_STORE) - { register char *t; - if (!(t = (char*)soap_push_block(soap, n))) - return soap->error = SOAP_EOM; - memcpy(t, s, n); - if (soap->fpreparesend) - return soap->fpreparesend(soap, s, n); - return SOAP_OK; - } - if ((soap->mode & SOAP_IO) == SOAP_IO_CHUNK) - { char t[16]; - sprintf(t, "\r\n%lX\r\n" + (soap->chunksize ? 0 : 2), (unsigned long)n); - DBGMSG(SENT, t, strlen(t)); - if ((soap->error = soap->fsend(soap, t, strlen(t)))) - return soap->error; - soap->chunksize += n; - } - DBGMSG(SENT, s, n); - return soap->error = soap->fsend(soap, s, n); -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_flush(struct soap *soap) -{ if (soap->bufidx) - { -#ifdef WITH_ZLIB - if (soap->mode & SOAP_ENC_ZLIB) - { soap->d_stream.next_in = (Byte*)soap->buf; - soap->d_stream.avail_in = (unsigned int)soap->bufidx; -#ifdef WITH_GZIP - soap->z_crc = crc32(soap->z_crc, (Byte*)soap->buf, (unsigned int)soap->bufidx); -#endif - do - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Deflating %u bytes\n", soap->d_stream.avail_in)); - if (deflate(&soap->d_stream, Z_NO_FLUSH) != Z_OK) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Unable to deflate: %s\n", soap->d_stream.msg?soap->d_stream.msg:"")); - return soap->error = SOAP_ZLIB_ERROR; - } - if (!soap->d_stream.avail_out) - { if (soap_flush_raw(soap, soap->z_buf, SOAP_BUFLEN)) - return soap->error; - soap->d_stream.next_out = (Byte*)soap->z_buf; - soap->d_stream.avail_out = SOAP_BUFLEN; - } - } while (soap->d_stream.avail_in); - } - else -#endif - if (soap_flush_raw(soap, soap->buf, soap->bufidx)) - return soap->error; - soap->bufidx = 0; - } - return SOAP_OK; -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_send_raw(struct soap *soap, const char *s, size_t n) -{ if (!n) - return SOAP_OK; - if (soap->mode & SOAP_IO_LENGTH) - { soap->count += n; - if (soap->fpreparesend && (soap->mode & SOAP_IO) != SOAP_IO_STORE) - return soap->fpreparesend(soap, s, n); - return SOAP_OK; - } - if (soap->mode & SOAP_IO) - { register size_t i = SOAP_BUFLEN - soap->bufidx; - while (n >= i) - { memcpy(soap->buf + soap->bufidx, s, i); - soap->bufidx = SOAP_BUFLEN; - if (soap_flush(soap)) - return soap->error; - s += i; - n -= i; - i = SOAP_BUFLEN; - } - memcpy(soap->buf + soap->bufidx, s, n); - soap->bufidx += n; - return SOAP_OK; - } - return soap_flush_raw(soap, s, n); -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_send(struct soap *soap, const char *s) -{ if (s) - return soap_send_raw(soap, s, strlen(s)); - return SOAP_OK; -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_send2(struct soap *soap, const char *s1, const char *s2) -{ if (soap_send(soap, s1)) - return soap->error; - return soap_send(soap, s2); -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_send3(struct soap *soap, const char *s1, const char *s2, const char *s3) -{ if (soap_send(soap, s1) - || soap_send(soap, s2)) - return soap->error; - return soap_send(soap, s3); -} -#endif - -/******************************************************************************/ -#ifndef MAC_CARBON -#ifndef PALM_1 -static size_t -frecv(struct soap *soap, char *s, size_t n) -{ register int r; - soap->errnum = 0; -#if defined(__cplusplus) && !defined(WITH_LEAN) - if (soap->is) - { if (soap->is->good()) - return soap->is->read(s, n).gcount(); - return 0; - } -#endif - if (soap_valid_socket(soap->socket)) - { for (;;) - { -#ifndef WITH_LEAN - struct timeval timeout; - fd_set fd; - if (soap->recv_timeout) - { if (soap->recv_timeout > 0) - { timeout.tv_sec = soap->recv_timeout; - timeout.tv_usec = 0; - } - else - { timeout.tv_sec = -soap->recv_timeout/1000000; - timeout.tv_usec = -soap->recv_timeout%1000000; - } - FD_ZERO(&fd); - FD_SET((SOAP_SOCKET)soap->socket, &fd); - for (;;) - { r = select((SOAP_SOCKET)(soap->socket + 1), &fd, NULL, &fd, &timeout); - if (r > 0) - break; - if (r == 0) - return 0; - if (soap_socket_errno != SOAP_EINTR) - { soap->errnum = soap_socket_errno; - return 0; - } - } - } -#endif -#ifdef WITH_OPENSSL - if (soap->ssl) - { int err; - r = SSL_read(soap->ssl, s, n); - if ((err = SSL_get_error(soap->ssl, r)) == SSL_ERROR_NONE) - return (size_t)r; - if (err != SSL_ERROR_WANT_READ && err != SSL_ERROR_WANT_WRITE) - return 0; - } - else -#endif - { r = recv((SOAP_SOCKET)soap->socket, s, n, soap->socket_flags); - if (r >= 0) - return (size_t)r; - if (soap_socket_errno != SOAP_EINTR && soap_socket_errno != SOAP_EAGAIN) - { soap->errnum = soap_socket_errno; - return 0; - } - } -#ifndef WITH_LEAN - { struct timeval timeout; - fd_set fd; - timeout.tv_sec = 0; - timeout.tv_usec = 10000; - FD_ZERO(&fd); - FD_SET((SOAP_SOCKET)soap->socket, &fd); - r = select((SOAP_SOCKET)(soap->socket + 1), &fd, NULL, &fd, &timeout); - if (r < 0 && soap_socket_errno != SOAP_EINTR) - { soap->errnum = soap_socket_errno; - return 0; - } - } -#endif - } - } -#ifdef WITH_FASTCGI - return fread(s, 1, n, stdin); -#else -#ifdef UNDER_CE - return fread(s, 1, n, soap->recvfd); -#else -/* WR[ */ -#ifdef WMW_RPM_IO - if (soap->rpmreqid) - r = httpBlockRead(soap->rpmreqid, s, n); - else - r = read(soap->recvfd, s, n); - if (r >= 0) - return r; - return 0; -#else -/* ]WR */ - r = read((SOAP_SOCKET)soap->recvfd, s, n); - if (r >= 0) - return (size_t)r; - soap->errnum = soap_errno; - return 0; -/* WR[ */ -#endif -/* ]WR */ -#endif -#endif -} -#endif -#endif - -/******************************************************************************/ -#ifndef PALM_1 -static soap_wchar -soap_getchunkchar(struct soap *soap) -{ if (soap->bufidx < soap->buflen) - return soap->buf[soap->bufidx++]; - soap->bufidx = 0; - soap->buflen = soap->chunkbuflen = soap->frecv(soap, soap->buf, SOAP_BUFLEN); - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Read %u bytes\n", (unsigned int)soap->buflen)); - DBGMSG(RECV, soap->buf, soap->buflen); - if (soap->buflen) - return soap->buf[soap->bufidx++]; - return EOF; -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -static int -soap_isxdigit(int c) -{ switch (c) - { case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': - case 'A': case 'B': case 'C': case 'D': case 'E': case 'F': - case 'a': case 'b': case 'c': case 'd': case 'e': case 'f': - return 1; - } - return 0; -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_recv_raw(struct soap *soap) -{ register size_t ret; -#ifdef WITH_ZLIB - if (soap->mode & SOAP_ENC_ZLIB) - { if (soap->d_stream.next_out == Z_NULL) - return EOF; - if (soap->d_stream.avail_in || !soap->d_stream.avail_out) - { register int r; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Inflating\n")); - soap->d_stream.next_out = (Byte*)soap->buf; - soap->d_stream.avail_out = SOAP_BUFLEN; - r = inflate(&soap->d_stream, Z_NO_FLUSH); - if (r == Z_OK || r == Z_STREAM_END) - { soap->bufidx = 0; - soap->buflen = SOAP_BUFLEN - soap->d_stream.avail_out; - if (soap->zlib_in == SOAP_ZLIB_GZIP) - soap->z_crc = crc32(soap->z_crc, (Byte*)soap->buf, (unsigned int)soap->buflen); - if (r == Z_STREAM_END) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Inflated %lu->%lu bytes\n", soap->d_stream.total_in, soap->d_stream.total_out)); - soap->z_ratio_in = (float)soap->d_stream.total_in / (float)soap->d_stream.total_out; - soap->d_stream.next_out = Z_NULL; - } - if (soap->buflen) - { soap->count += soap->buflen; - return SOAP_OK; - } - } - else if (r != Z_BUF_ERROR) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Inflate error: %s\n", soap->d_stream.msg?soap->d_stream.msg:"")); - soap->d_stream.next_out = Z_NULL; - return EOF; - } - } -zlib_again: - if ((soap->mode & SOAP_IO) == SOAP_IO_CHUNK && !soap->chunksize) - { memcpy(soap->buf, soap->z_buf, SOAP_BUFLEN); - soap->buflen = soap->z_buflen; - } - } -#endif - if ((soap->mode & SOAP_IO) == SOAP_IO_CHUNK) /* read HTTP chunked transfer */ - { -chunk_again: - if (soap->chunksize) - { soap->buflen = ret = soap->frecv(soap, soap->buf, soap->chunksize > SOAP_BUFLEN ? SOAP_BUFLEN : soap->chunksize); - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Getting chunk: read %u bytes\n", (unsigned int)ret)); - DBGMSG(RECV, soap->buf, ret); - soap->bufidx = 0; - soap->chunksize -= ret; - } - else - { register soap_wchar c; - char *t, tmp[8]; - t = tmp; - if (!soap->chunkbuflen) - { soap->chunkbuflen = ret = soap->frecv(soap, soap->buf, SOAP_BUFLEN); - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Read %u bytes\n", (unsigned int)ret)); - DBGMSG(RECV, soap->buf, ret); - soap->bufidx = 0; - if (!ret) - return EOF; - } - else - soap->bufidx = soap->buflen; - soap->buflen = soap->chunkbuflen; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Getting chunk size (%u %u)\n", (unsigned int)soap->bufidx, (unsigned int)soap->buflen)); - while (!soap_isxdigit((int)(c = soap_getchunkchar(soap)))) - if ((int)c == EOF) - return EOF; - do - *t++ = (char)c; - while (soap_isxdigit((int)(c = soap_getchunkchar(soap))) && t - tmp < 7); - while ((int)c != EOF && c != '\n') - c = soap_getchunkchar(soap); - if ((int)c == EOF) - return EOF; - *t = '\0'; - soap->chunksize = soap_strtoul(tmp, &t, 16); - if (!soap->chunksize) - { soap->chunkbuflen = 0; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "End of chunked message\n")); - while ((int)c != EOF && c != '\n') - c = soap_getchunkchar(soap); - return EOF; - } - soap->buflen = soap->bufidx + soap->chunksize; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Moving buf len to %u (%u %s)\n", (unsigned int)soap->buflen, (unsigned int)soap->bufidx, tmp)); - if (soap->buflen > soap->chunkbuflen) - { soap->buflen = soap->chunkbuflen; - soap->chunksize -= soap->buflen - soap->bufidx; - soap->chunkbuflen = 0; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Passed end of buffer for chunked HTTP (%lu bytes left)\n", (unsigned long)(soap->buflen - soap->bufidx))); - } - else if (soap->chunkbuflen) - soap->chunksize = 0; - ret = soap->buflen - soap->bufidx; - if (!ret) - goto chunk_again; - } - } - else - { soap->bufidx = 0; - soap->buflen = ret = soap->frecv(soap, soap->buf, SOAP_BUFLEN); - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Read %u bytes\n", (unsigned int)ret)); - DBGMSG(RECV, soap->buf, ret); - } - if (soap->fpreparerecv && (soap->error = soap->fpreparerecv(soap, soap->buf, ret))) - return soap->error; -#ifdef WITH_ZLIB - if (soap->mode & SOAP_ENC_ZLIB) - { register int r; - memcpy(soap->z_buf, soap->buf, SOAP_BUFLEN); - soap->d_stream.next_in = (Byte*)(soap->z_buf + soap->bufidx); - soap->d_stream.avail_in = (unsigned int)ret; - soap->d_stream.next_out = (Byte*)soap->buf; - soap->d_stream.avail_out = SOAP_BUFLEN; - r = inflate(&soap->d_stream, Z_NO_FLUSH); - if (r == Z_OK || r == Z_STREAM_END) - { soap->bufidx = 0; - soap->z_buflen = soap->buflen; - soap->buflen = ret = SOAP_BUFLEN - soap->d_stream.avail_out; - if (soap->zlib_in == SOAP_ZLIB_GZIP) - soap->z_crc = crc32(soap->z_crc, (Byte*)soap->buf, (unsigned int)soap->buflen); - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Inflated %u bytes\n", (unsigned int)ret)); - if (!ret) - goto zlib_again; - if (r == Z_STREAM_END) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Inflated %lu->%lu bytes\n", soap->d_stream.total_in, soap->d_stream.total_out)); - soap->z_ratio_in = (float)soap->d_stream.total_in / (float)soap->d_stream.total_out; - soap->d_stream.next_out = Z_NULL; - } - } - else - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Unable to inflate: (%d) %s\n", r, soap->d_stream.msg?soap->d_stream.msg:"")); - soap->d_stream.next_out = Z_NULL; - return EOF; - } - } -#endif - soap->count += ret; - return !ret; -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_recv(struct soap *soap) -{ -#ifndef WITH_LEANER - if (soap->mode & SOAP_ENC_DIME) - { if (soap->dime.buflen) - { char *s; - int i; - unsigned char tmp[12]; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "DIME hdr for chunked DIME is in buffer\n")); - soap->count += soap->dime.buflen - soap->buflen; - soap->buflen = soap->dime.buflen; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Skip padding (%ld bytes)\n", -(long)soap->dime.size&3)); - for (i = -(long)soap->dime.size&3; i > 0; i--) - { soap->bufidx++; - if (soap->bufidx >= soap->buflen) - if (soap_recv_raw(soap)) - return EOF; - } - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Get DIME hdr for next chunk\n")); - s = (char*)tmp; - for (i = 12; i > 0; i--) - { *s++ = soap->buf[soap->bufidx++]; - if (soap->bufidx >= soap->buflen) - if (soap_recv_raw(soap)) - return EOF; - } - soap->dime.flags = tmp[0] & 0x7; - soap->dime.size = ((size_t)tmp[8] << 24) | ((size_t)tmp[9] << 16) | ((size_t)tmp[10] << 8) | ((size_t)tmp[11]); - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Get DIME chunk (%u bytes)\n", (unsigned int)soap->dime.size)); - if (soap->dime.flags & SOAP_DIME_CF) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "More chunking\n")); - soap->dime.chunksize = soap->dime.size; - if (soap->buflen - soap->bufidx >= soap->dime.size) - { soap->dime.buflen = soap->buflen; - soap->buflen = soap->bufidx + soap->dime.chunksize; - } - else - soap->dime.chunksize -= soap->buflen - soap->bufidx; - } - else - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Last chunk\n")); - soap->dime.buflen = 0; - soap->dime.chunksize = 0; - } - soap->count = soap->buflen - soap->bufidx; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "%u bytes remaining\n", (unsigned int)soap->count)); - return SOAP_OK; - } - if (soap->dime.chunksize) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Get next DIME hdr for chunked DIME (%u bytes chunk)\n", (unsigned int)soap->dime.chunksize)); - if (soap_recv_raw(soap)) - return EOF; - if (soap->buflen - soap->bufidx >= soap->dime.chunksize) - { soap->dime.buflen = soap->buflen; - soap->count -= soap->buflen - soap->bufidx - soap->dime.chunksize; - soap->buflen = soap->bufidx + soap->dime.chunksize; - } - else - soap->dime.chunksize -= soap->buflen - soap->bufidx; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "%lu bytes remaining, count=%u\n", (unsigned long)(soap->buflen-soap->bufidx), (unsigned int)soap->count)); - return SOAP_OK; - } - } -#endif - return soap_recv_raw(soap); -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -soap_wchar -SOAP_FMAC2 -soap_getchar(struct soap *soap) -{ register soap_wchar c; - if (soap->ahead) - { c = soap->ahead; - soap->ahead = 0; - return c; - } - return soap_get1(soap); -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -const struct soap_code_map* -SOAP_FMAC2 -soap_code(const struct soap_code_map *map, const char *str) -{ while (map->string) - { if (!strcmp(str, map->string)) /* case sensitive */ - return map; - map++; - } - return NULL; -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -long -SOAP_FMAC2 -soap_int_code(const struct soap_code_map *map, const char *str, long other) -{ while (map->string) - { if (!soap_tag_cmp(str, map->string)) /* case insensitive */ - return map->code; - map++; - } - return other; -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -const char* -SOAP_FMAC2 -soap_str_code(const struct soap_code_map *map, long code) -{ while (map->code != code && map->string) - map++; - return map->string; -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -static soap_wchar -soap_char(struct soap *soap) -{ char tmp[8]; - register int i; - register soap_wchar c; - register char *s = tmp; - for (i = 0; i < 7; i++) - { c = soap_get1(soap); - if (c == ';' || (int)c == EOF) - break; - *s++ = (char)c; - } - *s = '\0'; - if (*tmp == '#') - { if (tmp[1] == 'x' || tmp[1] == 'X') - return soap_strtol(tmp + 2, NULL, 16); - return atol(tmp + 1); - } - if (!strcmp(tmp, "lt")) - return '<'; - if (!strcmp(tmp, "gt")) - return '>'; - if (!strcmp(tmp, "amp")) - return '&'; - if (!strcmp(tmp, "quot")) - return '"'; - if (!strcmp(tmp, "apos")) - return '\''; -#ifndef WITH_LEAN - return (soap_wchar)soap_int_code(html_entity_codes, tmp, SOAP_UNKNOWN_CHAR); -#else - return SOAP_UNKNOWN_CHAR; /* use this to represent unknown code */ -#endif -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -soap_wchar -SOAP_FMAC2 -soap_get(struct soap *soap) -{ register soap_wchar c; - c = soap->ahead; - if (c) - soap->ahead = 0; - else - c = soap_get1(soap); - for (;;) - { if (soap->cdata) - { if (c == ']') - { c = soap_get1(soap); - if (c == ']') - { soap->cdata = 0; - soap_get1(soap); /* skip > */ - c = soap_get1(soap); - } - else - { soap_revget1(soap); - return ']'; - } - } - else - return c; - } - switch (c) - { case '<': - do c = soap_get1(soap); - while (soap_blank(c)); - if (c == '!' || c == '?' || c == '%') - { if (c == '!') - { c = soap_get1(soap); - if (c == '[') - { do c = soap_get1(soap); - while ((int)c != EOF && c != '['); - if ((int)c == EOF) - break; - soap->cdata = 1; - c = soap_get1(soap); - continue; - } - if (c == '-' && (c = soap_get1(soap)) == '-') - { do - { c = soap_get1(soap); - if (c == '-' && (c = soap_get1(soap)) == '-') - break; - } while ((int)c != EOF); - } - } - while ((int)c != EOF && c != '>') - c = soap_get1(soap); - if ((int)c == EOF) - break; - c = soap_get1(soap); - continue; - } - if (c == '/') - return SOAP_TT; - soap_revget1(soap); - return SOAP_LT; - case '>': - return SOAP_GT; - case '"': - return SOAP_QT; - case '\'': - return SOAP_AP; - case '&': - return soap_char(soap) | 0x80000000; - } - break; - } - return c; -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -soap_wchar -SOAP_FMAC2 -soap_advance(struct soap *soap) -{ register soap_wchar c; - while ((int)((c = soap_get(soap)) != EOF) && c != SOAP_LT && c != SOAP_TT) - ; - return c; -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -soap_wchar -SOAP_FMAC2 -soap_skip(struct soap *soap) -{ register soap_wchar c; - do c = soap_get(soap); - while (soap_blank(c)); - return c; -} -#endif - -/******************************************************************************/ -#ifndef WITH_LEANER -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_move(struct soap *soap, long n) -{ DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Moving %ld bytes forward\n", (long)n)); - for (; n > 0; n--) - if ((int)soap_getchar(soap) == EOF) - return SOAP_EOF; - return SOAP_OK; -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_LEANER -#ifndef PALM_1 -SOAP_FMAC1 -size_t -SOAP_FMAC2 -soap_tell(struct soap *soap) -{ return soap->count - soap->buflen + soap->bufidx - (soap->ahead != 0); -} -#endif -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_pututf8(struct soap *soap, register unsigned long c) -{ char tmp[16]; - if (c > 0 && c < 0x80) - { *tmp = (char)c; - return soap_send_raw(soap, tmp, 1); - } -#ifndef WITH_LEAN - if (soap->mode & SOAP_XML_CANONICAL) - { register char *t = tmp; - if (c < 0x0800) - *t++ = (char)(0xC0 | ((c >> 6) & 0x1F)); - else - { if (c < 0x010000) - *t++ = (char)(0xE0 | ((c >> 12) & 0x0F)); - else - { if (c < 0x200000) - *t++ = (char)(0xF0 | ((c >> 18) & 0x07)); - else - { if (c < 0x04000000) - *t++ = (char)(0xF8 | ((c >> 24) & 0x03)); - else - { *t++ = (char)(0xFC | ((c >> 30) & 0x01)); - *t++ = (char)(0x80 | ((c >> 24) & 0x3F)); - } - *t++ = (char)(0x80 | ((c >> 18) & 0x3F)); - } - *t++ = (char)(0x80 | ((c >> 12) & 0x3F)); - } - *t++ = (char)(0x80 | ((c >> 6) & 0x3F)); - } - *t++ = (char)(0x80 | (c & 0x3F)); - *t = '\0'; - } - else -#endif - sprintf(tmp, "&#%lu;", c); - return soap_send(soap, tmp); -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -soap_wchar -SOAP_FMAC2 -soap_getutf8(struct soap *soap) -{ register soap_wchar c, c1, c2, c3, c4; - c = soap_get(soap); - if (c < 0x80 || (soap->mode & SOAP_ENC_LATIN)) - return c; - c1 = soap_get(soap); - if (c1 < 0x80) - { soap_unget(soap, c1); - return c; - } - c1 &= 0x3F; - if (c < 0xE0) - return ((soap_wchar)(c & 0x1F) << 6) | c1; - c2 = (soap_wchar)soap_get1(soap) & 0x3F; - if (c < 0xF0) - return ((soap_wchar)(c & 0x0F) << 12) | (c1 << 6) | c2; - c3 = (soap_wchar)soap_get1(soap) & 0x3F; - if (c < 0xF8) - return ((soap_wchar)(c & 0x07) << 18) | (c1 << 12) | (c2 << 6) | c3; - c4 = (soap_wchar)soap_get1(soap) & 0x3F; - if (c < 0xFC) - return ((soap_wchar)(c & 0x03) << 24) | (c1 << 18) | (c2 << 12) | (c3 << 6) | c4; - return ((soap_wchar)(c & 0x01) << 30) | (c1 << 24) | (c2 << 18) | (c3 << 12) | (c4 << 6) | (soap_wchar)(soap_get1(soap) & 0x3F); -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_puthex(struct soap *soap, const unsigned char *s, int n) -{ /* TODO: serialize to DOM (as an option) using new soap_s2hex() */ - char d[2]; - register int i; - for (i = 0; i < n; i++) - { register int m = *s++; - d[0] = (char)((m >> 4) + (m > 159 ? '7' : '0')); - m &= 0x0F; - d[1] = (char)(m + (m > 9 ? '7' : '0')); - if (soap_send_raw(soap, d, 2)) - return soap->error; - } - return SOAP_OK; -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -unsigned char* -SOAP_FMAC2 -soap_gethex(struct soap *soap, int *n) -{ -#ifdef WITH_FAST - soap->labidx = 0; - for (;;) - { register char *s; - register int i, k; - if (soap_append_lab(soap, NULL, 0)) - return NULL; - s = soap->labbuf + soap->labidx; - k = soap->lablen - soap->labidx; - soap->labidx = soap->lablen; - for (i = 0; i < k; i++) - { register char d1, d2; - register soap_wchar c; - c = soap_get(soap); - if (soap_isxdigit(c)) - { d1 = (char)c; - c = soap_get(soap); - if (soap_isxdigit(c)) - d2 = (char)c; - else - { soap->error = SOAP_TYPE; - return NULL; - } - } - else - { unsigned char *p; - soap_unget(soap, c); - if (n) - *n = (int)(soap->lablen - k + i); - p = (unsigned char*)soap_malloc(soap, soap->lablen - k + i); - if (p) - memcpy(p, soap->labbuf, soap->lablen - k + i); - return p; - } - *s++ = ((d1 >= 'A' ? (d1 & 0x7) + 9 : d1 - '0') << 4) + (d2 >= 'A' ? (d2 & 0x7) + 9 : d2 - '0'); - } - } -#else - if (soap_new_block(soap)) - return NULL; - for (;;) - { register int i; - register char *s = (char*)soap_push_block(soap, SOAP_BLKLEN); - if (!s) - { soap_end_block(soap); - return NULL; - } - for (i = 0; i < SOAP_BLKLEN; i++) - { register char d1, d2; - register soap_wchar c = soap_get(soap); - if (soap_isxdigit(c)) - { d1 = (char)c; - c = soap_get(soap); - if (soap_isxdigit(c)) - d2 = (char)c; - else - { soap_end_block(soap); - soap->error = SOAP_TYPE; - return NULL; - } - } - else - { unsigned char *p; - soap_unget(soap, c); - if (n) - *n = soap_size_block(soap, i); - p = (unsigned char*)soap_save_block(soap, NULL, 0); - return p; - } - *s++ = ((d1 >= 'A' ? (d1 & 0x7) + 9 : d1 - '0') << 4) + (d2 >= 'A' ? (d2 & 0x7) + 9 : d2 - '0'); - } - } -#endif -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_putbase64(struct soap *soap, const unsigned char *s, int n) -{ register int i; - register unsigned long m; - char d[4]; - if (!s) - return SOAP_OK; -#ifdef WITH_DOM - if ((soap->mode & SOAP_XML_DOM) && soap->dom) - { if (!(soap->dom->data = soap_s2base64(soap, s, soap->dom->data, n))) - return soap->error; - return SOAP_OK; - } -#endif - for (; n > 2; n -= 3, s += 3) - { m = s[0]; - m = (m << 8) | s[1]; - m = (m << 8) | s[2]; - for (i = 4; i > 0; m >>= 6) - d[--i] = soap_base64o[m & 0x3F]; - if (soap_send_raw(soap, d, 4)) - return soap->error; - } - if (n > 0) - { m = 0; - for (i = 0; i < n; i++) - m = (m << 8) | *s++; - for (; i < 3; i++) - m <<= 8; - for (i++; i > 0; m >>= 6) - d[--i] = soap_base64o[m & 0x3F]; - for (i = 3; i > n; i--) - d[i] = '='; - if (soap_send_raw(soap, d, 4)) - return soap->error; - } - return SOAP_OK; -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -unsigned char* -SOAP_FMAC2 -soap_getbase64(struct soap *soap, int *n, int malloc_flag) -{ -#ifdef WITH_FAST - soap->labidx = 0; - for (;;) - { register int i, k; - register char *s; - if (soap_append_lab(soap, NULL, 2)) - return NULL; - s = soap->labbuf + soap->labidx; - k = 3 * ((soap->lablen - soap->labidx) / 3); - soap->labidx = 3 * (soap->lablen / 3); - if (!s) - return NULL; - for (i = 0; i < k; i += 3) - { register unsigned long m = 0; - register int j = 0; - do - { register soap_wchar c = soap_get(soap); - if (c == '=' || c < 0) - { unsigned char *p; - switch (j) - { case 2: - *s++ = (char)((m >> 4) & 0xFF); - i++; - break; - case 3: - *s++ = (char)((m >> 10) & 0xFF); - *s++ = (char)((m >> 2) & 0xFF); - i += 2; - } - if (n) - *n = (int)(soap->lablen - k + i); - p = (unsigned char*)soap_malloc(soap, soap->lablen - k + i); - if (p) - memcpy(p, soap->labbuf, soap->lablen - k + i); - if (c >= 0) - { while ((int)((c = soap_get(soap)) != EOF) && c != SOAP_LT && c != SOAP_TT) - ; - } - soap_unget(soap, c); - return p; - } - c -= '+'; - if (c >= 0 && c <= 79) - { m = (m << 6) + soap_base64i[c]; - j++; - } - } while (j < 4); - *s++ = (char)((m >> 16) & 0xFF); - *s++ = (char)((m >> 8) & 0xFF); - *s++ = (char)(m & 0xFF); - } - } -#else - if (soap_new_block(soap)) - return NULL; - for (;;) - { register int i; - register char *s = (char*)soap_push_block(soap, 3 * SOAP_BLKLEN); /* must be multiple of 3 */ - if (!s) - { soap_end_block(soap); - return NULL; - } - for (i = 0; i < SOAP_BLKLEN; i++) - { register unsigned long m = 0; - register int j = 0; - do - { register soap_wchar c = soap_get(soap); - if (c == '=' || c < 0) - { unsigned char *p; - i *= 3; - switch (j) - { case 2: - *s++ = (char)((m >> 4) & 0xFF); - i++; - break; - case 3: - *s++ = (char)((m >> 10) & 0xFF); - *s++ = (char)((m >> 2) & 0xFF); - i += 2; - } - if (n) - *n = (int)soap_size_block(soap, i); - p = (unsigned char*)soap_save_block(soap, NULL, 0); - if (c >= 0) - { while ((int)((c = soap_get(soap)) != EOF) && c != SOAP_LT && c != SOAP_TT) - ; - } - soap_unget(soap, c); - return p; - } - c -= '+'; - if (c >= 0 && c <= 79) - { m = (m << 6) + soap_base64i[c]; - j++; - } - } while (j < 4); - *s++ = (char)((m >> 16) & 0xFF); - *s++ = (char)((m >> 8) & 0xFF); - *s++ = (char)(m & 0xFF); - } - } -#endif -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -char * -SOAP_FMAC2 -soap_strdup(struct soap *soap, const char *s) -{ char *t = NULL; - if (s && (t = (char*)soap_malloc(soap, strlen(s) + 1))) - strcpy(t, s); - return t; -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_new_block(struct soap *soap) -{ struct soap_blist *p; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "New block sequence (prev=%p)\n", soap->blist)); - if (!(p = (struct soap_blist*)SOAP_MALLOC(sizeof(struct soap_blist)))) - return SOAP_EOM; - p->next = soap->blist; - p->ptr = NULL; - p->size = 0; - soap->blist = p; - return SOAP_OK; -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -void* -SOAP_FMAC2 -soap_push_block(struct soap *soap, size_t n) -{ char *p; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Push block of %u bytes (%u bytes total)\n", (unsigned int)n, (unsigned int)soap->blist->size + (unsigned int)n)); - if (!(p = (char*)SOAP_MALLOC(n + sizeof(char*) + sizeof(size_t)))) - { soap->error = SOAP_EOM; - return NULL; - } - *(char**)p = soap->blist->ptr; - *(size_t*)(p + sizeof(char*)) = n; - soap->blist->ptr = p; - soap->blist->size += n; - return p + sizeof(char*) + sizeof(size_t); -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_pop_block(struct soap *soap) -{ char *p; - if (!soap->blist->ptr) - return; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Pop block\n")); - p = soap->blist->ptr; - soap->blist->size -= *(size_t*)(p + sizeof(char*)); - soap->blist->ptr = *(char**)p; - SOAP_FREE(p); -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -static void -soap_update_ptrs(struct soap *soap, char *start, char *end, long offset) -{ int i; - register struct soap_ilist *ip; - register struct soap_flist *fp; - register void *p, **q; - for (i = 0; i < SOAP_IDHASH; i++) - for (ip = soap->iht[i]; ip; ip = ip->next) - { if (ip->ptr && (char*)ip->ptr >= start && (char*)ip->ptr < end) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Update id='%s' %p -> %p\n", ip->id, ip->ptr, (char*)ip->ptr + offset)); - ip->ptr = (char*)ip->ptr + offset; - } - for (q = &ip->link; q; q = (void**)p) - { p = *q; - if (p && (char*)p >= start && (char*)p < end) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Link update id='%s' %p\n", ip->id, p)); - *q = (char*)p + offset; - } - } - for (q = &ip->copy; q; q = (void**)p) - { p = *q; - if (p && (char*)p >= start && (char*)p < end) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copy chain update id='%s' %p\n", ip->id, p)); - *q = (char*)p + offset; - } - } - for (fp = ip->flist; fp; fp = fp->next) - { if ((char*)fp->ptr >= start && (char*)fp->ptr < end) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copy list update id='%s' %p\n", ip->id, fp)); - fp->ptr = (char*)fp->ptr + offset; - } - } - } -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -static int -soap_has_copies(struct soap *soap, register const char *start, register const char *end) -{ register int i; - register struct soap_ilist *ip; - register struct soap_flist *fp; - register const char *p; - for (i = 0; i < SOAP_IDHASH; i++) - { for (ip = soap->iht[i]; ip; ip = ip->next) - { for (p = (const char*)ip->copy; p; p = *(const char**)p) - if (p >= start && p < end) - return SOAP_ERR; - for (fp = ip->flist; fp; fp = fp->next) - if ((const char*)fp->ptr >= start && (const char*)fp->ptr < end) - return SOAP_ERR; - } - } - return SOAP_OK; -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_resolve(struct soap *soap) -{ register int i; - register struct soap_ilist *ip; - register struct soap_flist *fp; - short flag; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Resolving forwarded data\n")); - for (i = 0; i < SOAP_IDHASH; i++) - { for (ip = soap->iht[i]; ip; ip = ip->next) - { if (ip->ptr) - { register void *p, **q, *r; - q = (void**)ip->link; - ip->link = NULL; - r = ip->ptr; - DBGLOG(TEST, if (q) SOAP_MESSAGE(fdebug, "Traversing link chain to resolve id='%s'\n", ip->id)); - while (q) - { p = *q; - *q = r; - DBGLOG(TEST,SOAP_MESSAGE(fdebug, "... link %p -> %p\n", q, r)); - q = (void**)p; - } - } - else if (*ip->id == '#') - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Missing data for id='%s'\n", ip->id)); - strcpy(soap->id, ip->id + 1); - return soap->error = SOAP_MISSING_ID; - } - } - } - do - { flag = 0; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Resolution phase\n")); - for (i = 0; i < SOAP_IDHASH; i++) - { for (ip = soap->iht[i]; ip; ip = ip->next) - { if (ip->ptr && !soap_has_copies(soap, (const char*)ip->ptr, (const char*)ip->ptr + ip->size)) - { if (ip->copy) - { register void *p, **q = (void**)ip->copy; - DBGLOG(TEST, if (q) SOAP_MESSAGE(fdebug, "Traversing copy chain to resolve id='%s'\n", ip->id)); - ip->copy = NULL; - do - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "... copy %p -> %p (%u bytes)\n", ip->ptr, q, (unsigned int)ip->size)); - p = *q; - memcpy(q, ip->ptr, ip->size); - q = (void**)p; - } while (q); - flag = 1; - } - for (fp = ip->flist; fp; fp = ip->flist) - { register unsigned int k = fp->level; - register void *p = ip->ptr; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Resolving forwarded data type=%d location=%p level=%u,%u id='%s'\n", ip->type, p, ip->level, fp->level, ip->id)); - while (ip->level < k) - { register void **q = (void**)soap_malloc(soap, sizeof(void*)); - if (!q) - return soap->error; - *q = p; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Descending one level, new location=%p holds=%p...\n", q, *q)); - p = (void*)q; - k--; - } - if (fp->fcopy) - fp->fcopy(soap, ip->type, fp->type, fp->ptr, p, ip->size); - else - soap_fcopy(soap, ip->type, fp->type, fp->ptr, p, ip->size); - ip->flist = fp->next; - SOAP_FREE(fp); - flag = 1; - } - } - } - } - } while (flag); -#ifdef SOAP_DEBUG - for (i = 0; i < SOAP_IDHASH; i++) - { for (ip = soap->iht[i]; ip; ip = ip->next) - { if (ip->copy || ip->flist) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Resolution error: forwarded data for id='%s' could not be propagated, please report this problem to the developers\n", ip->id)); - } - } - } -#endif - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Resolution done\n")); - return SOAP_OK; -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -size_t -SOAP_FMAC2 -soap_size_block(struct soap *soap, size_t n) -{ if (soap->blist->ptr) - { soap->blist->size -= *(size_t*)(soap->blist->ptr + sizeof(char*)) - n; - *(size_t*)(soap->blist->ptr + sizeof(char*)) = n; - } - return soap->blist->size; -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -char* -SOAP_FMAC2 -soap_first_block(struct soap *soap) -{ char *p, *q, *r; - p = soap->blist->ptr; - if (!p) - return NULL; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "First block\n")); - r = NULL; - do - { q = *(char**)p; - *(char**)p = r; - r = p; - p = q; - } while (p); - soap->blist->ptr = r; - return r + sizeof(char*) + sizeof(size_t); -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -char* -SOAP_FMAC2 -soap_next_block(struct soap *soap) -{ char *p; - p = soap->blist->ptr; - if (p) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Next block\n")); - soap->blist->ptr = *(char**)p; - SOAP_FREE(p); - if (soap->blist->ptr) - return soap->blist->ptr + sizeof(char*) + sizeof(size_t); - } - return NULL; -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -size_t -SOAP_FMAC2 -soap_block_size(struct soap *soap) -{ return *(size_t*)(soap->blist->ptr + sizeof(char*)); -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_end_block(struct soap *soap) -{ struct soap_blist *bp; - char *p, *q; - bp = soap->blist; - if (bp) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "End of block sequence, free all remaining blocks\n")); - for (p = bp->ptr; p; p = q) - { q = *(char**)p; - SOAP_FREE(p); - } - soap->blist = bp->next; - SOAP_FREE(bp); - } - DBGLOG(TEST, if (soap->blist) SOAP_MESSAGE(fdebug, "Restore previous block sequence\n")); -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -char* -SOAP_FMAC2 -soap_save_block(struct soap *soap, char *p, int flag) -{ register size_t n; - register char *q, *s; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Save all blocks in contiguous memory space of %u bytes (%p->%p)\n", (unsigned int)soap->blist->size, soap->blist->ptr, p)); - if (soap->blist->size) - { if (!p) - p = (char*)soap_malloc(soap, soap->blist->size); - if (p) - { for (s = p, q = soap_first_block(soap); q; q = soap_next_block(soap)) - { n = soap_block_size(soap); - if (flag) - soap_update_ptrs(soap, q, q + n, (long)s - (long)q); /* pointers s and q may or may not be related */ - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copy %u bytes from %p to %p\n", (unsigned int)n, q, s)); - memcpy(s, q, n); - s += n; - } - } - else - soap->error = SOAP_EOM; - } - soap_end_block(soap); - return p; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -char * -SOAP_FMAC2 -soap_putsize(struct soap *soap, const char *type, int size) -{ return soap_putsizes(soap, type, &size, 1); -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -char * -SOAP_FMAC2 -soap_putsizes(struct soap *soap, const char *type, const int *size, int dim) -{ return soap_putsizesoffsets(soap, type, size, NULL, dim); -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -char * -SOAP_FMAC2 -soap_putsizesoffsets(struct soap *soap, const char *type, const int *size, const int *offset, int dim) -{ int i; - if (!type) - return NULL; - if (soap->version == 2) - { sprintf(soap->type, "%s[%d", type, size[0]); - for (i = 1; i < dim; i++) - sprintf(soap->type + strlen(soap->type), " %d", size[i]); - } - else - { if (offset) - { sprintf(soap->type, "%s[%d", type, size[0] + offset[0]); - for (i = 1; i < dim; i++) - sprintf(soap->type + strlen(soap->type), ",%d", size[i] + offset[i]); - } - else - { sprintf(soap->type, "%s[%d", type, size[0]); - for (i = 1; i < dim; i++) - sprintf(soap->type + strlen(soap->type), ",%d", size[i]); - } - strcat(soap->type, "]"); - } - return soap->type; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -char * -SOAP_FMAC2 -soap_putoffset(struct soap *soap, int offset) -{ return soap_putoffsets(soap, &offset, 1); -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -char * -SOAP_FMAC2 -soap_putoffsets(struct soap *soap, const int *offset, int dim) -{ register int i; - sprintf(soap->arrayOffset, "[%d", offset[0]); - for (i = 1; i < dim; i++) - sprintf(soap->arrayOffset + strlen(soap->arrayOffset), ",%d", offset[i]); - strcat(soap->arrayOffset, "]"); - return soap->arrayOffset; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_size(const int *size, int dim) -{ register int i, n = size[0]; - for (i = 1; i < dim; i++) - n *= size[i]; - return n; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_getoffsets(const char *attr, const int *size, int *offset, int dim) -{ register int i, j = 0; - if (offset) - for (i = 0; i < dim && attr && *attr; i++) - { attr++; - j *= size[i]; - j += offset[i] = (int)atol(attr); - attr = strchr(attr, ','); - } - else - for (i = 0; i < dim && attr && *attr; i++) - { attr++; - j *= size[i]; - j += (int)atol(attr); - attr = strchr(attr, ','); - } - return j; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_getsize(const char *attr1, const char *attr2, int *j) -{ register int n, k; - char *s; - *j = 0; - if (!*attr1) - return -1; - n = 1; - do - { attr1++; - k = (int)soap_strtol(attr1, &s, 10); - n *= k; - if (k < 0 || n > SOAP_MAXARRAYSIZE || s == attr1) - return -1; - attr1 = strchr(s, ','); - if (!attr1) - attr1 = strchr(s, ' '); - if (attr2 && *attr2) - { attr2++; - *j *= k; - k = (int)soap_strtol(attr2, &s, 10); - *j += k; - if (k < 0) - return -1; - attr2 = s; - } - } while (attr1 && *attr1 != ']'); - return n - *j; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_getsizes(const char *attr, int *size, int dim) -{ register int i, k, n; - if (!*attr) - return -1; - i = strlen(attr); - n = 1; - do - { for (i = i-1; i >= 0; i--) - if (attr[i] == '[' || attr[i] == ',' || attr[i] == ' ') - break; - k = (int)atol(attr + i + 1); - n *= size[--dim] = k; - if (k < 0 || n > SOAP_MAXARRAYSIZE) - return -1; - } while (i >= 0 && attr[i] != '['); - return n; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_getposition(const char *attr, int *pos) -{ register int i, n; - if (!*attr) - return -1; - n = 0; - i = 1; - do - { pos[n++] = (int)atol(attr + i); - while (attr[i] && attr[i] != ',' && attr[i] != ']') - i++; - if (attr[i] == ',') - i++; - } while (n < SOAP_MAXDIMS && attr[i] && attr[i] != ']'); - return n; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_push_namespace(struct soap *soap, const char *id, const char *ns) -{ register struct soap_nlist *np; - register struct Namespace *p; - np = (struct soap_nlist*)SOAP_MALLOC(sizeof(struct soap_nlist) + strlen(id)); - if (!np) - return soap->error = SOAP_EOM; - np->next = soap->nlist; - soap->nlist = np; - strcpy(np->id, id); - np->level = soap->level; - np->index = -1; - np->ns = NULL; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Push namespace binding (level=%u) '%s' '%s'\n", soap->level, id, ns)); - p = soap->local_namespaces; - if (p) - { register short i = 0; - for (; p->id; p++, i++) - { if (p->ns && !strcmp(ns, p->ns)) - { if (p->out) - { SOAP_FREE(p->out); - p->out = NULL; - } - break; - } - if (p->out) - { if (!SOAP_STRCMP(ns, p->out)) - break; - } - else if (p->in) - { if (!soap_tag_cmp(ns, p->in)) - { if ((p->out = (char*)SOAP_MALLOC(strlen(ns) + 1))) - strcpy(p->out, ns); - break; - } - } - } - if (p && p->id) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Push OK ('%s' matches '%s' in namespace table)\n", id, p->id)); - np->index = i; - } - } - if (!p || !p->id) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Push NOT OK: no match found for '%s' in namespace mapping table (added to stack anyway)\n", ns)); - np->ns = (char*)SOAP_MALLOC(strlen(ns) + 1); - if (!np->ns) - return soap->error = SOAP_EOM; - strcpy(np->ns, ns); - } - return SOAP_OK; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_pop_namespace(struct soap *soap) -{ register struct soap_nlist *np; - while (soap->nlist && soap->nlist->level >= soap->level) - { np = soap->nlist->next; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Popped namespace binding (level=%u) '%s'\n", soap->level, soap->nlist->id)); - if (soap->nlist->ns) - SOAP_FREE(soap->nlist->ns); - SOAP_FREE(soap->nlist); - soap->nlist = np; - } -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_match_namespace(struct soap *soap, const char *id1, const char *id2, int n1, int n2) -{ register struct soap_nlist *np = soap->nlist; - while (np && (strncmp(np->id, id1, n1) || np->id[n1])) - np = np->next; - if (np) - { if (np->index < 0 || (np->index >= 0 && soap->local_namespaces[np->index].id && (strncmp(soap->local_namespaces[np->index].id, id2, n2) || soap->local_namespaces[np->index].id[n2]))) - return SOAP_NAMESPACE; - return SOAP_OK; - } - if (n1 == 3 && n1 == n2 && !strcmp(id1, "xml") && !strcmp(id1, id2)) - return SOAP_OK; - return SOAP_SYNTAX_ERROR; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_tag_cmp(const char *s, const char *t) -{ for (;;) - { register int c1 = *s; - register int c2 = *t; - if (!c1 || c1 == '"') - break; - if (c2 != '-') - { if (c1 != c2) - { if (c1 >= 'A' && c1 <= 'Z') - c1 += 'a' - 'A'; - if (c2 >= 'A' && c2 <= 'Z') - c2 += 'a' - 'A'; - } - if (c1 != c2) - { if (c2 != '*') - return 1; - c2 = *++t; - if (!c2) - return 0; - if (c2 >= 'A' && c2 <= 'Z') - c2 += 'a' - 'A'; - for (;;) - { c1 = *s; - if (!c1 || c1 == '"') - break; - if (c1 >= 'A' && c1 <= 'Z') - c1 += 'a' - 'A'; - if (c1 == c2) - if (!soap_tag_cmp(s + 1, t + 1)) - return 0; - s++; - } - break; - } - } - s++; - t++; - } - if (*t == '*' && !t[1]) - return 0; - return *t; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_match_tag(struct soap *soap, const char *tag1, const char *tag2) -{ register const char *s, *t; - if (!tag1 || !tag2 || !*tag2) - return SOAP_OK; - s = strchr(tag1, ':'); - t = strchr(tag2, ':'); - if (t) - { if (s) - { if (t[1] && SOAP_STRCMP(s + 1, t + 1)) - return SOAP_TAG_MISMATCH; - if (t != tag2 && soap_match_namespace(soap, tag1, tag2, s - tag1, t - tag2)) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Tags '%s' and '%s' match but namespaces differ\n", tag1, tag2)); - return SOAP_TAG_MISMATCH; - } - } - else if (SOAP_STRCMP(tag1, t + 1)) - return SOAP_TAG_MISMATCH; - else if (t != tag2 && soap_match_namespace(soap, tag1, tag2, 0, t - tag2)) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Tags '%s' and '%s' match but namespaces differ\n", tag1, tag2)); - return SOAP_TAG_MISMATCH; - } - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Tags and (default) namespaces match: '%s' '%s'\n", tag1, tag2)); - return SOAP_OK; - } - if (s) - { if (SOAP_STRCMP(s + 1, tag2)) - return SOAP_TAG_MISMATCH; - } - else if (SOAP_STRCMP(tag1, tag2)) - return SOAP_TAG_MISMATCH; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Tags match: '%s' '%s'\n", tag1, tag2)); - return SOAP_OK; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_match_array(struct soap *soap, const char *type) -{ if (*soap->arrayType) - if (soap_match_tag(soap, soap->arrayType, type) - && soap_match_tag(soap, soap->arrayType, "xsd:anyType") - && soap_match_tag(soap, soap->arrayType, "xsd:ur-type") - ) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Array type mismatch: '%s' '%s'\n", soap->arrayType, type)); - return SOAP_TAG_MISMATCH; - } - return SOAP_OK; -} -#endif - -/******************************************************************************/ - -#ifdef WITH_OPENSSL -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_ssl_server_context(struct soap *soap, unsigned short flags, const char *keyfile, const char *password, const char *cafile, const char *capath, const char *dhfile, const char *randfile, const char *sid) -{ int err; - soap->keyfile = keyfile; - soap->password = password; - soap->cafile = cafile; - soap->capath = capath; - if (dhfile) - { soap->dhfile = dhfile; - soap->rsa = 0; - } - else - { soap->dhfile = NULL; - soap->rsa = 1; - } - soap->randfile = randfile; - soap->require_client_auth = (flags & SOAP_SSL_REQUIRE_CLIENT_AUTHENTICATION); - if (!(err = soap->fsslauth(soap))) - if (sid) - SSL_CTX_set_session_id_context(soap->ctx, (unsigned char*)sid, strlen(sid)); - return err; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_ssl_client_context(struct soap *soap, unsigned short flags, const char *keyfile, const char *password, const char *cafile, const char *capath, const char *randfile) -{ soap->keyfile = keyfile; - soap->password = password; - soap->cafile = cafile; - soap->capath = capath; - soap->dhfile = NULL; - soap->rsa = 0; - soap->randfile = randfile; - soap->require_server_auth = (flags & SOAP_SSL_REQUIRE_SERVER_AUTHENTICATION); - return soap->fsslauth(soap); -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -static void -ssl_init() -{ static int done = 0; - if (!done) - { done = 1; - SSL_library_init(); -#ifndef WITH_LEAN - SSL_load_error_strings(); -#endif - if (!RAND_load_file("/dev/urandom", 1024)) - { int r; -#ifdef HAVE_RAND_R - unsigned int s = (unsigned int)time(NULL); -#endif - char buf[SOAP_BUFLEN]; - RAND_seed(buf, sizeof(buf)); - while (!RAND_status()) - { -#ifdef HAVE_RAND_R - r = rand_r(&s); -#else - r = rand(); -#endif - RAND_seed(&r, sizeof(int)); - } - } - } -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -static const char * -ssl_error(struct soap *soap, int ret) -{ int err = SSL_get_error(soap->ssl, ret); - const char *msg = soap_str_code(h_ssl_error_codes, err); - if (msg) - strcpy(soap->msgbuf, msg); - else - return ERR_error_string(err, soap->msgbuf); - if (ERR_peek_error()) - { unsigned long r; - strcat(soap->msgbuf, "\n"); - while ((r = ERR_get_error())) - ERR_error_string_n(r, soap->msgbuf + strlen(soap->msgbuf), sizeof(soap->msgbuf) - strlen(soap->msgbuf)); - } - else - { switch (ret) - { case 0: - strcpy(soap->msgbuf, "EOF was observed that violates the protocol. The client probably provided invalid authentication information."); - break; - case -1: - sprintf(soap->msgbuf, "Error observed by underlying BIO: %s", strerror(errno)); - break; - } - } - return soap->msgbuf; -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -static int -ssl_password(char *buf, int num, int rwflag, void *userdata) -{ if (num < (int)strlen((char*)userdata) + 1) - return 0; - return strlen(strcpy(buf, (char*)userdata)); -} -#endif - -/******************************************************************************/ -/* This callback is included for future references. It should not be deleted -#ifndef PALM_2 -static DH * -ssl_tmp_dh(SSL *ssl, int is_export, int keylength) -{ static DH *dh512 = NULL; - static DH *dh1024 = NULL; - DH *dh; - switch (keylength) - { case 512: - if (!dh512) - { BIO *bio = BIO_new_file("dh512.pem", "r"); - if (bio) - { dh512 = PEM_read_bio_DHparams(bio, NULL, NULL, NULL); - BIO_free(bio); - return dh512; - } - } - else - return dh512; - default: - if (!dh1024) - { BIO *bio = BIO_new_file("dh1024.pem", "r"); - if (bio) - { dh1024 = PEM_read_bio_DHparams(bio, NULL, NULL, NULL); - BIO_free(bio); - } - } - dh = dh1024; - } - return dh; -} -#endif -*/ -/******************************************************************************/ -#ifndef PALM_1 -static int -ssl_auth_init(struct soap *soap) -{ ssl_init(); - if (!soap->ctx) - if (!(soap->ctx = SSL_CTX_new(SSLv23_method()))) - return soap_set_receiver_error(soap, "SSL error", "Can't setup context", SOAP_SSL_ERROR); - if (soap->randfile) - { if (!RAND_load_file(soap->randfile, -1)) - return soap_set_receiver_error(soap, "SSL error", "Can't load randomness", SOAP_SSL_ERROR); - } - if (soap->cafile || soap->capath) - if (!SSL_CTX_load_verify_locations(soap->ctx, soap->cafile, soap->capath)) - return soap_set_receiver_error(soap, "SSL error", "Can't read CA file and/or directory", SOAP_SSL_ERROR); - if (!SSL_CTX_set_default_verify_paths(soap->ctx)) - return soap_set_receiver_error(soap, "SSL error", "Can't read default CA file and/or directory", SOAP_SSL_ERROR); - if (soap->keyfile) - { if (!SSL_CTX_use_certificate_chain_file(soap->ctx, soap->keyfile)) - return soap_set_receiver_error(soap, "SSL error", "Can't read certificate key file", SOAP_SSL_ERROR); - if (soap->password) - { SSL_CTX_set_default_passwd_cb_userdata(soap->ctx, (void*)soap->password); - SSL_CTX_set_default_passwd_cb(soap->ctx, ssl_password); - if (!SSL_CTX_use_PrivateKey_file(soap->ctx, soap->keyfile, SSL_FILETYPE_PEM)) - return soap_set_receiver_error(soap, "SSL error", "Can't read key file", SOAP_SSL_ERROR); - } - } - if (soap->rsa) - { RSA *rsa = RSA_generate_key(512, RSA_F4, NULL, NULL); - if (!SSL_CTX_set_tmp_rsa(soap->ctx, rsa)) - { if (rsa) - RSA_free(rsa); - return soap_set_receiver_error(soap, "SSL error", "Can't set RSA key", SOAP_SSL_ERROR); - } - RSA_free(rsa); - } - else if (soap->dhfile) - { DH *dh = 0; - BIO *bio; - bio = BIO_new_file(soap->dhfile, "r"); - if (!bio) - return soap_set_receiver_error(soap, "SSL error", "Can't read DH file", SOAP_SSL_ERROR); - dh = PEM_read_bio_DHparams(bio, NULL, NULL, NULL); - BIO_free(bio); - if (SSL_CTX_set_tmp_dh(soap->ctx, dh) < 0) - { if (dh) - DH_free(dh); - return soap_set_receiver_error(soap, "SSL error", "Can't set DH parameters", SOAP_SSL_ERROR); - } - DH_free(dh); - } - SSL_CTX_set_options(soap->ctx, SSL_OP_ALL | SSL_OP_NO_SSLv2); - SSL_CTX_set_verify(soap->ctx, soap->require_client_auth ? (SSL_VERIFY_PEER | SSL_VERIFY_FAIL_IF_NO_PEER_CERT) : soap->require_server_auth ? SSL_VERIFY_PEER : SSL_VERIFY_NONE, soap->fsslverify); -#if (OPENSSL_VERSION_NUMBER < 0x00905100L) - SSL_CTX_set_verify_depth(soap->ctx, 1); -#else - SSL_CTX_set_verify_depth(soap->ctx, 9); -#endif - return SOAP_OK; -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -static int -ssl_verify_callback(int ok, X509_STORE_CTX *store) -{ -#ifdef SOAP_DEBUG - if (!ok) - { char data[256]; - X509 *cert = X509_STORE_CTX_get_current_cert(store); - fprintf(stderr, "SSL Verify error with certificate at depth %d: %s\n", X509_STORE_CTX_get_error_depth(store), X509_verify_cert_error_string(X509_STORE_CTX_get_error(store))); - X509_NAME_oneline(X509_get_issuer_name(cert), data, sizeof(data)); - fprintf(stderr, "certificate issuer %s\n", data); - X509_NAME_oneline(X509_get_subject_name(cert), data, sizeof(data)); - fprintf(stderr, "certificate subject %s\n", data); - } -#endif - /* return 1 to always continue, but unsafe progress will be terminated by SSL */ - return ok; -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_ssl_accept(struct soap *soap) -{ int i, r; - if (!soap_valid_socket(soap->socket)) - return soap_set_receiver_error(soap, "SSL error", "No socket in soap_ssl_accept()", SOAP_SSL_ERROR); - if (!soap->ssl) - { soap->ssl = SSL_new(soap->ctx); - if (!soap->ssl) - return soap_set_receiver_error(soap, "SSL error", "SSL_new() failed in soap_ssl_accept()", SOAP_SSL_ERROR); - } - else - SSL_clear(soap->ssl); - soap->imode |= SOAP_ENC_SSL; - soap->omode |= SOAP_ENC_SSL; -#ifdef WIN32 - { u_long nonblocking = 1; - ioctlsocket((SOAP_SOCKET)soap->socket, FIONBIO, &nonblocking); - } -#else - fcntl((SOAP_SOCKET)soap->socket, F_SETFL, fcntl((SOAP_SOCKET)soap->socket, F_GETFL)|O_NONBLOCK); -#endif - soap->bio = BIO_new_socket((SOAP_SOCKET)soap->socket, BIO_NOCLOSE); - SSL_set_bio(soap->ssl, soap->bio, soap->bio); - i = 100; /* 100 * 0.1 ms retries */ - while ((r = SSL_accept(soap->ssl)) <= 0) - { int err = SSL_get_error(soap->ssl, r); - if (err == SSL_ERROR_WANT_READ || err == SSL_ERROR_WANT_WRITE) - { struct timeval timeout; - fd_set fd; - if (i-- <= 0) - break; - timeout.tv_sec = 0; - timeout.tv_usec = 100000; - FD_ZERO(&fd); - FD_SET((SOAP_SOCKET)soap->socket, &fd); - r = select((SOAP_SOCKET)(soap->socket + 1), &fd, NULL, &fd, &timeout); - if (r < 0 && soap_socket_errno != SOAP_EINTR) - { soap->errnum = soap_socket_errno; - return SOAP_EOF; - } - } - else - { soap->errnum = err; - break; - } - } -#ifdef WIN32 - { u_long blocking = 0; - ioctlsocket((SOAP_SOCKET)soap->socket, FIONBIO, &blocking); - } -#else - fcntl((SOAP_SOCKET)soap->socket, F_SETFL, fcntl((SOAP_SOCKET)soap->socket, F_GETFL)&~O_NONBLOCK); -#endif - if (r <= 0) - { soap_set_receiver_error(soap, ssl_error(soap, r), "SSL_accept() failed in soap_ssl_accept()", SOAP_SSL_ERROR); - soap_closesock(soap); - return SOAP_SSL_ERROR; - } - if (soap->require_client_auth) - { X509 *peer; - int err; - if ((err = SSL_get_verify_result(soap->ssl)) != X509_V_OK) - { soap_closesock(soap); - return soap_set_sender_error(soap, X509_verify_cert_error_string(err), "SSL certificate presented by peer cannot be verified in soap_ssl_accept()", SOAP_SSL_ERROR); - } - peer = SSL_get_peer_certificate(soap->ssl); - if (!peer) - { soap_closesock(soap); - return soap_set_sender_error(soap, "SSL error", "No SSL certificate was presented by the peer in soap_ssl_accept()", SOAP_SSL_ERROR); - } - X509_free(peer); - } - return SOAP_OK; -} -#endif - -/******************************************************************************/ -#endif /* WITH_OPENSSL */ - -/******************************************************************************/ -#ifndef PALM_1 -static int -tcp_init(struct soap *soap) -{ soap->errmode = 1; -#ifdef WIN32 - if (tcp_done) - return 0; - else - { WSADATA w; - if (WSAStartup(MAKEWORD(1, 1), &w)) - return -1; - tcp_done = 1; - } -#endif - return 0; -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_done(struct soap *soap) -{ -#ifdef SOAP_DEBUG - int i; -#endif - soap_free(soap); - while (soap->clist) - { struct soap_clist *p = soap->clist->next; - SOAP_FREE(soap->clist); - soap->clist = p; - } - soap->keep_alive = 0; /* to force close the socket */ - soap_closesock(soap); -#ifdef WITH_COOKIES - soap_free_cookies(soap); -#endif - while (soap->plugins) - { register struct soap_plugin *p = soap->plugins->next; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Removing plugin '%s'\n", soap->plugins->id)); - if (soap->plugins->fcopy || !soap->copy) - soap->plugins->fdelete(soap, soap->plugins); - SOAP_FREE(soap->plugins); - soap->plugins = p; - } - soap->fplugin = fplugin; - soap->fpost = http_post; - soap->fget = http_get; - soap->fposthdr = http_post_header; - soap->fresponse = http_response; - soap->fparse = http_parse; - soap->fparsehdr = http_parse_header; -#ifndef MAC_CARBON -#ifndef WITH_IPV6 - soap->fresolve = tcp_gethost; -#else - soap->fresolve = NULL; -#endif - soap->faccept = tcp_accept; - soap->fopen = tcp_connect; - soap->fclose = tcp_disconnect; - soap->fclosesocket = tcp_closesocket; - soap->fshutdownsocket = tcp_shutdownsocket; - soap->fsend = fsend; - soap->frecv = frecv; - soap->fpoll = soap_poll; -#else - soap->fpoll = NULL; -#endif - soap->fprepareinit = NULL; - soap->fpreparesend = NULL; - soap->fpreparerecv = NULL; - soap->fignore = NULL; - soap->fserveloop = NULL; -#ifdef WITH_OPENSSL - if (soap->session) - { SSL_SESSION_free(soap->session); - soap->session = NULL; - } -#endif - if (!soap->copy) - { if (soap_valid_socket(soap->master)) - { soap->fclosesocket(soap, (SOAP_SOCKET)soap->master); - soap->master = SOAP_INVALID_SOCKET; - } -#ifdef WITH_OPENSSL - if (soap->ctx) - { SSL_CTX_free(soap->ctx); - soap->ctx = NULL; - } -#endif - } -#ifdef SOAP_DEBUG - for (i = 0; i < SOAP_MAXLOGS; i++) - { soap_close_logfile(soap, i); - if (soap->logfile[i]) - { SOAP_FREE((void*)soap->logfile[i]); - soap->logfile[i] = NULL; - } - } -#endif -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_cleanup(struct soap *soap) -{ soap_done(soap); -#ifdef WIN32 - if (!tcp_done) - return; - tcp_done = 0; - WSACleanup(); -#endif -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -static const char* -tcp_error(struct soap *soap) -{ register const char *msg = NULL; - switch (soap->errmode) - { case 0: - msg = soap_strerror(soap); - break; - case 1: - msg = "WSAStartup failed"; - break; - case 2: - { -#ifndef WITH_LEAN - msg = soap_str_code(h_error_codes, soap->errnum); - if (!msg) -#endif - { sprintf(soap->msgbuf, "TCP error %d", soap->errnum); - msg = soap->msgbuf; - } - } - } - return msg; -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -static const char* -http_error(struct soap *soap, int status) -{ register const char *msg = NULL; -#ifndef WITH_LEAN - msg = soap_str_code(h_http_error_codes, status); - if (!msg) -#endif - { sprintf(soap->msgbuf, "HTTP error %d", status); - msg = soap->msgbuf; - } - return msg; -} -#endif - -/******************************************************************************/ -/* WR[ */ -#ifndef WITH_IPV6 -/* ]WR */ -#ifndef MAC_CARBON -#ifndef PALM_1 -static int -tcp_gethost(struct soap *soap, const char *addr, struct in_addr *inaddr) -{ unsigned long iadd; - struct hostent hostent, *host = &hostent; -/* WR[ */ -#ifdef VXWORKS - int hostint; - char *addrcopy = (char*)malloc(strlen(addr) + 1); /*copy of addr. */ - /* inet_addr(), and hostGetByName() expect "char *"; addr is a "const char *". */ - strncpy(addrcopy, addr, strlen(addr)+1); - iadd = inet_addr(addrcopy); -#else -/* ]WR */ -#if defined(_AIXVERSION_431) || defined(TRU64) - struct hostent_data ht_data; -#endif - iadd = inet_addr(addr); -/* WR[ */ -#endif -/* ]WR */ - if ((int)iadd != -1) - { memcpy(inaddr, &iadd, sizeof(iadd)); -/* WR[ */ -#ifdef VXWORKS - free(addrcopy); -#endif -/* ]WR */ - return SOAP_OK; - } -#if defined(__GLIBC__) - if (gethostbyname_r(addr, &hostent, soap->buf, SOAP_BUFLEN, &host, &soap->errnum) < 0) - host = NULL; -#elif defined(_AIXVERSION_431) || defined(TRU64) - memset((void*)&ht_data, 0, sizeof(ht_data)); - if (gethostbyname_r(addr, &hostent, &ht_data) < 0) - { host = NULL; - soap->errnum = h_errno; - } -#elif defined(HAVE_GETHOSTBYNAME_R) - host = gethostbyname_r(addr, &hostent, soap->buf, SOAP_BUFLEN, &soap->errnum); -/* WR[ */ -#elif defined(VXWORKS) - /* If the DNS resolver library resolvLib has been configured in the vxWorks - * image, a query for the host IP address is sent to the DNS server, if the - * name was not found in the local host table. */ - hostint = hostGetByName(addrcopy); - if (hostint == ERROR) - { host = NULL; - soap->errnum = soap_errno; - } - free(addrcopy); /*free() is placed after the error checking to assure that - * errno captured is that from hostGetByName() */ -/* ]WR */ -#else - if (!(host = gethostbyname(addr))) - soap->errnum = h_errno; -#endif - if (!host) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Host name not found\n")); - return SOAP_ERR; - } -/* WR[ */ -#ifdef VXWORKS - inaddr->s_addr = hostint; -#else -/* ]WR */ - memcpy(inaddr, host->h_addr, host->h_length); -/* WR[ */ -#endif -/* ]WR */ - return SOAP_OK; -} -#endif -#endif -/* WR[ */ -#endif /* WITH_IPV6 */ -/* ]WR */ - -/******************************************************************************/ -#ifndef MAC_CARBON -#ifndef PALM_1 -static int -tcp_connect(struct soap *soap, const char *endpoint, const char *host, int port) -{ struct sockaddr_in sockaddr; -/* WR[ */ -#ifdef WITH_IPV6 - struct addrinfo *addrinfo; - struct addrinfo hints; - struct addrinfo resaddr; - struct sockaddr_storage addrstorage; - int err; -#endif /* WITH_IPV6 */ -/* ]WR */ - register int fd; -#ifndef WITH_LEAN - int len = SOAP_BUFLEN; - int set = 1; -#endif - if (soap_valid_socket(soap->socket)) - soap->fclosesocket(soap, (SOAP_SOCKET)soap->socket); - soap->socket = SOAP_INVALID_SOCKET; - if (tcp_init(soap)) - { soap_set_sender_error(soap, tcp_error(soap), "TCP initialization failed in tcp_connect()", SOAP_TCP_ERROR); - return -1; - } - soap->errmode = 0; -/* WR[ */ -#ifdef WITH_IPV6 - memset((void*)&hints, 0, sizeof(hints)); - hints.ai_family = PF_UNSPEC; - hints.ai_socktype = SOCK_STREAM; - soap->errmode = 2; - if (soap->proxy_host) - err = getaddrinfo(soap->proxy_host, soap_int2s(soap, soap->proxy_port), &hints, &addrinfo); - else - err = getaddrinfo(host, soap_int2s(soap, port), &hints, &addrinfo); - if (addrinfo) - { resaddr = *addrinfo; - addrstorage = *((struct sockaddr_storage*)addrinfo->ai_addr); - resaddr.ai_addr = (struct sockaddr*)&addrstorage; - freeaddrinfo(addrinfo); - } - if (err) - { soap_set_sender_error(soap, gai_strerror(err), - "TCP getaddrinfo on proxy host failed in tcp_connect()", SOAP_TCP_ERROR); - return -1; - } - fd = (int)socket(resaddr.ai_family, resaddr.ai_socktype, resaddr.ai_protocol); /* modified to use fd */ - soap->errmode = 0; -#else /* WITH_IPV6 */ -/* ]WR */ - fd = (int)socket(AF_INET, SOCK_STREAM, 0); -/* WR[ */ -#endif /* WITH_IPV6 */ -/* ]WR */ - if (fd < 0) - { soap->errnum = soap_socket_errno; - soap_set_sender_error(soap, tcp_error(soap), "TCP socket failed in tcp_connect()", SOAP_TCP_ERROR); - return -1; - } -#ifdef SOCKET_CLOSE_ON_EXEC -#ifdef WIN32 -#ifndef UNDER_CE - SetHandleInformation((HANDLE)fd, HANDLE_FLAG_INHERIT, 0); -#endif -#else - fcntl (fd, F_SETFD, 1); -#endif -#endif -#ifndef WITH_LEAN - if (soap->connect_flags & SO_LINGER) - { struct linger linger; - memset((void*)&linger, 0, sizeof(linger)); - linger.l_onoff = 1; - linger.l_linger = 0; - if (setsockopt((SOAP_SOCKET)fd, SOL_SOCKET, SO_LINGER, (char*)&linger, sizeof(struct linger))) - { soap->errnum = soap_socket_errno; - soap_set_sender_error(soap, tcp_error(soap), "TCP setsockopt SO_LINGER failed in tcp_connect()", SOAP_TCP_ERROR); - soap->fclosesocket(soap, (SOAP_SOCKET)fd); - return -1; - } - } - if ((soap->connect_flags & ~SO_LINGER) && setsockopt((SOAP_SOCKET)fd, SOL_SOCKET, soap->connect_flags & ~SO_LINGER, (char*)&set, sizeof(int))) - { soap->errnum = soap_socket_errno; - soap_set_sender_error(soap, tcp_error(soap), "TCP setsockopt failed in tcp_connect()", SOAP_TCP_ERROR); - soap->fclosesocket(soap, (SOAP_SOCKET)fd); - return -1; - } - if (soap->keep_alive && setsockopt((SOAP_SOCKET)fd, SOL_SOCKET, SO_KEEPALIVE, (char*)&set, sizeof(int))) - { soap->errnum = soap_socket_errno; - soap_set_sender_error(soap, tcp_error(soap), "TCP setsockopt SO_KEEPALIVE failed in tcp_connect()", SOAP_TCP_ERROR); - soap->fclosesocket(soap, (SOAP_SOCKET)fd); - return -1; - } - if (setsockopt((SOAP_SOCKET)fd, SOL_SOCKET, SO_SNDBUF, (char*)&len, sizeof(int))) - { soap->errnum = soap_socket_errno; - soap_set_sender_error(soap, tcp_error(soap), "TCP setsockopt SO_SNDBUF failed in tcp_connect()", SOAP_TCP_ERROR); - soap->fclosesocket(soap, (SOAP_SOCKET)fd); - return -1; - } - if (setsockopt((SOAP_SOCKET)fd, SOL_SOCKET, SO_RCVBUF, (char*)&len, sizeof(int))) - { soap->errnum = soap_socket_errno; - soap_set_sender_error(soap, tcp_error(soap), "TCP setsockopt SO_RCVBUF failed in tcp_connect()", SOAP_TCP_ERROR); - soap->fclosesocket(soap, (SOAP_SOCKET)fd); - return -1; - } -#ifdef TCP_NODELAY - if (setsockopt((SOAP_SOCKET)fd, IPPROTO_TCP, TCP_NODELAY, (char*)&set, sizeof(int))) - { soap->errnum = soap_socket_errno; - soap_set_sender_error(soap, tcp_error(soap), "TCP setsockopt TCP_NODELAY failed in tcp_connect()", SOAP_TCP_ERROR); - soap->fclosesocket(soap, (SOAP_SOCKET)fd); - return -1; - } -#endif -#endif -/* WR[ */ -#ifndef WITH_IPV6 -/* ]WR */ - memset((void*)&sockaddr, 0, sizeof(sockaddr)); - sockaddr.sin_family = AF_INET; - DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Open socket %d to host='%s'\n", fd, host)); - soap->errmode = 2; - if (soap->proxy_host) - { if (soap->fresolve(soap, soap->proxy_host, &sockaddr.sin_addr)) - { soap_set_sender_error(soap, tcp_error(soap), "TCP get proxy host by name failed in tcp_connect()", SOAP_TCP_ERROR); - soap->fclosesocket(soap, (SOAP_SOCKET)fd); - return -1; - } - sockaddr.sin_port = htons((short)soap->proxy_port); - } - else - { if (soap->fresolve(soap, host, &sockaddr.sin_addr)) - { soap_set_sender_error(soap, tcp_error(soap), "TCP get host by name failed in tcp_connect()", SOAP_TCP_ERROR); - soap->fclosesocket(soap, (SOAP_SOCKET)fd); - return -1; - } - sockaddr.sin_port = htons((short)port); - } - soap->errmode = 0; -/* WR[ */ -#endif /* WITH_IPV6 */ -/* ]WR */ -#ifndef WITH_LEAN - if (soap->connect_timeout) -#if defined(WIN32) - { u_long nonblocking = 1; - ioctlsocket((SOAP_SOCKET)fd, FIONBIO, &nonblocking); - } -/* WR[ */ -#elif defined(VXWORKS) - { vx_nonblocking = TRUE; - ioctl((SOAP_SOCKET)fd, FIONBIO, (int)(&vx_nonblocking)); /* modified to use fd */ - } -/* ]WR */ -#else - fcntl((SOAP_SOCKET)fd, F_SETFL, fcntl((SOAP_SOCKET)fd, F_GETFL)|O_NONBLOCK); -#endif - else -#if defined(WIN32) - { u_long blocking = 0; - ioctlsocket((SOAP_SOCKET)fd, FIONBIO, &blocking); - } -/* WR[ */ -#elif defined(VXWORKS) - { vx_nonblocking = FALSE; - ioctl((SOAP_SOCKET)fd, FIONBIO, (int)(&vx_nonblocking)); /* modified to use fd */ - } -/* ]WR */ -#else - fcntl((SOAP_SOCKET)fd, F_SETFL, fcntl((SOAP_SOCKET)fd, F_GETFL)&~O_NONBLOCK); -#endif -#endif - for (;;) - { -/* WR[ */ -#ifdef WITH_IPV6 - if (connect((SOAP_SOCKET)fd, resaddr.ai_addr, resaddr.ai_addrlen)) /* modified to use fd */ -#else /* WITH_IPV6 */ - if (connect((SOAP_SOCKET)fd, (struct sockaddr*)&sockaddr, sizeof(sockaddr))) -#endif /* WITH_IPV6 */ -/* ]WR */ - { -#ifndef WITH_LEAN - if (soap->connect_timeout && (soap_socket_errno == SOAP_EINPROGRESS || soap_socket_errno == SOAP_EWOULDBLOCK)) - { struct timeval timeout; -#if defined(SOCKLEN_T) - SOCKLEN_T n = sizeof(struct sockaddr_in); -#elif defined(__socklen_t_defined) || defined(_SOCKLEN_T) || defined(CYGWIN) - socklen_t n = sizeof(struct sockaddr_in); -#elif defined(WIN32) || defined(__APPLE__) || defined(HP_UX) || defined(SUN_OS) || defined(OPENSERVER) || defined(TRU64) || defined(VXWORKS) - int n = sizeof(struct sockaddr_in); -#else - size_t n = sizeof(struct sockaddr_in); -#endif - fd_set fds; - if (soap->connect_timeout > 0) - { timeout.tv_sec = soap->connect_timeout; - timeout.tv_usec = 0; - } - else - { timeout.tv_sec = -soap->connect_timeout/1000000; - timeout.tv_usec = -soap->connect_timeout%1000000; - } - FD_ZERO(&fds); - FD_SET((SOAP_SOCKET)fd, &fds); - for (;;) - { int r = select((SOAP_SOCKET)(fd + 1), NULL, &fds, NULL, &timeout); - if (r > 0) - break; - if (!r) - { soap->errnum = 0; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Connect timeout\n")); - soap_set_sender_error(soap, "Timeout", "TCP connect failed in tcp_connect()", SOAP_TCP_ERROR); - soap->fclosesocket(soap, (SOAP_SOCKET)fd); - return -1; - } - if (soap_socket_errno != SOAP_EINTR) - { soap->errnum = soap_socket_errno; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Could not connect to host\n")); - soap_set_sender_error(soap, tcp_error(soap), "TCP connect failed in tcp_connect()", SOAP_TCP_ERROR); - soap->fclosesocket(soap, (SOAP_SOCKET)fd); - return -1; - } - } - n = sizeof(soap->errnum); - if (!getsockopt((SOAP_SOCKET)fd, SOL_SOCKET, SO_ERROR, (char*)&soap->errnum, &n) && !soap->errnum) - break; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Could not connect to host\n")); - soap_set_sender_error(soap, tcp_error(soap), "TCP connect failed in tcp_connect()", SOAP_TCP_ERROR); - soap->fclosesocket(soap, (SOAP_SOCKET)fd); - return -1; - } - else -#endif - if (soap_socket_errno != SOAP_EINTR) - { soap->errnum = soap_socket_errno; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Could not connect to host\n")); - soap_set_sender_error(soap, tcp_error(soap), "TCP connect failed in tcp_connect()", SOAP_TCP_ERROR); - soap->fclosesocket(soap, (SOAP_SOCKET)fd); - return -1; - } - } - else - break; - } -#ifndef WITH_LEAN - if (soap->connect_timeout) -#if defined(WIN32) - { u_long blocking = 0; - ioctlsocket((SOAP_SOCKET)fd, FIONBIO, &blocking); - } -/* WR[ */ -#elif defined(VXWORKS) - { vx_nonblocking = FALSE; - ioctl((SOAP_SOCKET)fd, FIONBIO, (int)(&vx_nonblocking)); /* modified to use fd */ - } -/* ]WR */ -#else - fcntl((SOAP_SOCKET)fd, F_SETFL, fcntl((SOAP_SOCKET)fd, F_GETFL)&~O_NONBLOCK); -#endif -#endif - soap->socket = fd; -#ifdef WITH_OPENSSL - soap->imode &= ~SOAP_ENC_SSL; - soap->omode &= ~SOAP_ENC_SSL; - if (!strncmp(endpoint, "https:", 6)) - { int r; - if (soap->proxy_host) - { unsigned int k = soap->omode; /* make sure we only parse HTTP */ - size_t n = soap->count; /* save the content length */ - soap->omode &= ~0xFF; /* mask IO and ENC */ - soap->omode |= SOAP_IO_BUFFER; - soap_begin_send(soap); - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Connecting to proxy server\n")); - sprintf(soap->tmpbuf, "CONNECT %s:%d HTTP/%s", host, port, soap->http_version); - if ((soap->error = soap->fposthdr(soap, soap->tmpbuf, NULL))) - return -1; -#ifndef WITH_LEAN - if (soap->proxy_userid && soap->proxy_passwd && strlen(soap->proxy_userid) + strlen(soap->proxy_passwd) < 761) - { sprintf(soap->tmpbuf + 262, "%s:%s", soap->proxy_userid, soap->proxy_passwd); - strcpy(soap->tmpbuf, "Basic "); - soap_s2base64(soap, (const unsigned char*)(soap->tmpbuf + 262), soap->tmpbuf + 6, strlen(soap->tmpbuf + 262)); - if ((soap->error = soap->fposthdr(soap, "Proxy-Authorization", soap->tmpbuf))) - return soap->error; - } -#endif - if ((soap->error = soap->fposthdr(soap, NULL, NULL)) - || soap_flush(soap)) - return -1; - soap->omode = k; - k = soap->imode; - soap->imode &= ~0xFF; /* mask IO and ENC */ - if (soap_begin_recv(soap)) - return -1; - soap->imode = k; - soap->count = n; - soap_begin_send(soap); - } - if (!soap->ctx && (soap->error = soap->fsslauth(soap))) - { soap_set_sender_error(soap, "SSL error", "SSL authentication failed in tcp_connect(): check password, key file, and ca file.", SOAP_SSL_ERROR); - return -1; - } - soap->ssl = SSL_new(soap->ctx); - if (!soap->ssl) - { soap->error = SOAP_SSL_ERROR; - return -1; - } - if (soap->session) - { if (!strcmp(soap->session_host, host) && soap->session_port == port) - SSL_set_session(soap->ssl, soap->session); - SSL_SESSION_free(soap->session); - soap->session = NULL; - } - soap->imode |= SOAP_ENC_SSL; - soap->omode |= SOAP_ENC_SSL; - soap->bio = BIO_new_socket((SOAP_SOCKET)fd, BIO_NOCLOSE); - SSL_set_bio(soap->ssl, soap->bio, soap->bio); -#ifndef WITH_LEAN - if (soap->connect_timeout) -#ifdef WIN32 - { u_long nonblocking = 1; - ioctlsocket((SOAP_SOCKET)fd, FIONBIO, &nonblocking); - } -#else - fcntl((SOAP_SOCKET)fd, F_SETFL, fcntl((SOAP_SOCKET)fd, F_GETFL)|O_NONBLOCK); -#endif -#endif - for (;;) - { if ((r = SSL_connect(soap->ssl)) <= 0) - { int err = SSL_get_error(soap->ssl, r); - if (err != SSL_ERROR_NONE && err != SSL_ERROR_WANT_READ && err != SSL_ERROR_WANT_WRITE) - { soap_set_sender_error(soap, ssl_error(soap, r), "SSL connect failed in tcp_connect()", SOAP_SSL_ERROR); - return -1; - } - if (soap->connect_timeout) - { struct timeval timeout; - fd_set fds; - if (soap->connect_timeout > 0) - { timeout.tv_sec = soap->connect_timeout; - timeout.tv_usec = 0; - } - else - { timeout.tv_sec = -soap->connect_timeout/1000000; - timeout.tv_usec = -soap->connect_timeout%1000000; - } - FD_ZERO(&fds); - FD_SET((SOAP_SOCKET)(soap->socket), &fds); - for (;;) - { int r = select((SOAP_SOCKET)(soap->socket + 1), &fds, NULL, &fds, &timeout); - if (r > 0) - break; - if (!r) - { soap->errnum = 0; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Connect timeout\n")); - soap_set_sender_error(soap, "Timeout", "TCP connect failed in tcp_connect()", SOAP_TCP_ERROR); - return -1; - } - } - continue; - } - } - break; - } -#ifndef WITH_LEAN - if (soap->connect_timeout) -#ifdef WIN32 - { u_long blocking = 0; - ioctlsocket((SOAP_SOCKET)fd, FIONBIO, &blocking); - } -#else - fcntl((SOAP_SOCKET)fd, F_SETFL, fcntl((SOAP_SOCKET)fd, F_GETFL)&~O_NONBLOCK); -#endif -#endif - if (soap->require_server_auth) - { X509 *peer; - int err; - if ((err = SSL_get_verify_result(soap->ssl)) != X509_V_OK) - { soap_set_sender_error(soap, X509_verify_cert_error_string(err), "SSL certificate presented by peer cannot be verified in tcp_connect()", SOAP_SSL_ERROR); - return -1; - } - peer = SSL_get_peer_certificate(soap->ssl); - if (!peer) - { soap_set_sender_error(soap, "SSL error", "No SSL certificate was presented by the peer in tcp_connect()", SOAP_SSL_ERROR); - return -1; - } - X509_NAME_get_text_by_NID(X509_get_subject_name(peer), NID_commonName, soap->msgbuf, sizeof(soap->msgbuf)); - X509_free(peer); - if (soap_tag_cmp(soap->msgbuf, host)) - { soap_set_sender_error(soap, "SSL error", "SSL certificate host name mismatch in tcp_connect()", SOAP_SSL_ERROR); - return -1; - } - } - } -#endif - return fd; -} -#endif -#endif - -/******************************************************************************/ -#ifndef MAC_CARBON -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_bind(struct soap *soap, const char *host, int port, int backlog) -{ struct sockaddr_in sockaddr; -/* WR[ */ -#ifdef WITH_IPV6 - struct addrinfo *addrinfo; - struct addrinfo hints; - struct addrinfo resaddr; - struct sockaddr_storage addrstorage; - int err; -#endif /* WITH_IPV6 */ -/* ]WR */ -#ifndef WITH_LEAN - int len = SOAP_BUFLEN; - int set = 1; -#endif - if (soap_valid_socket(soap->master)) - { soap->fclosesocket(soap, (SOAP_SOCKET)soap->master); - soap->master = SOAP_INVALID_SOCKET; - } - soap->socket = SOAP_INVALID_SOCKET; - soap->errmode = 1; - if (tcp_init(soap)) - { soap_set_receiver_error(soap, tcp_error(soap), "TCP init failed in soap_bind()", SOAP_TCP_ERROR); - return -1; - } -/* WR[ */ -#ifdef WITH_IPV6 - memset((void*)&hints, 0, sizeof(hints)); - hints.ai_family = PF_UNSPEC; - hints.ai_socktype = SOCK_STREAM; - hints.ai_flags = AI_PASSIVE; - soap->errmode = 2; - if (host) - err = getaddrinfo(host, soap_int2s(soap, port), &hints, &addrinfo); - else - err = getaddrinfo(NULL, soap_int2s(soap, port), &hints, &addrinfo); - if (NULL != addrinfo) - { - resaddr = *addrinfo; - addrstorage = *((struct sockaddr_storage *) addrinfo->ai_addr); - resaddr.ai_addr = (struct sockaddr *) &addrstorage; - freeaddrinfo(addrinfo); - } - if (err) - { soap_set_receiver_error(soap, gai_strerror(err), "TCP getaddrinfo failed in soap_bind()", SOAP_TCP_ERROR); - return -1; - } - soap->errmode = 0; - if ((soap->master = socket(resaddr.ai_family, resaddr.ai_socktype, resaddr.ai_protocol)) < 0) - { soap->errnum = soap_socket_errno; - soap_set_receiver_error(soap, tcp_error(soap), "TCP socket failed in soap_bind()", SOAP_TCP_ERROR); - return -1; - } -#else /* WITH_IPV6 */ -/* ]WR */ - soap->errmode = 0; - if ((soap->master = (int)socket(AF_INET, SOCK_STREAM, 0)) < 0) - { soap->errnum = soap_socket_errno; - soap_set_receiver_error(soap, tcp_error(soap), "TCP socket failed in soap_bind()", SOAP_TCP_ERROR); - return -1; - } -/* WR[ */ -#endif /* WITH_IPV6 */ -/* ]WR */ -#ifdef SOCKET_CLOSE_ON_EXEC -#ifdef WIN32 -#ifndef UNDER_CE - SetHandleInformation((HANDLE)soap->master, HANDLE_FLAG_INHERIT, 0); -#endif -#else - fcntl (soap->master, F_SETFD, 1); -#endif -#endif -#ifndef WITH_LEAN - if (soap->bind_flags && setsockopt((SOAP_SOCKET)soap->master, SOL_SOCKET, soap->bind_flags, (char*)&set, sizeof(int))) - { soap->errnum = soap_socket_errno; - soap_set_receiver_error(soap, tcp_error(soap), "TCP setsockopt failed in soap_bind()", SOAP_TCP_ERROR); - return -1; - } - if (soap->keep_alive && setsockopt((SOAP_SOCKET)soap->master, SOL_SOCKET, SO_KEEPALIVE, (char*)&set, sizeof(int))) - { soap->errnum = soap_socket_errno; - soap_set_receiver_error(soap, tcp_error(soap), "TCP setsockopt SO_KEEPALIVE failed in soap_bind()", SOAP_TCP_ERROR); - return -1; - } - if (setsockopt((SOAP_SOCKET)soap->master, SOL_SOCKET, SO_SNDBUF, (char*)&len, sizeof(int))) - { soap->errnum = soap_socket_errno; - soap_set_receiver_error(soap, tcp_error(soap), "TCP setsockopt SO_SNDBUF failed in soap_bind()", SOAP_TCP_ERROR); - return -1; - } - if (setsockopt((SOAP_SOCKET)soap->master, SOL_SOCKET, SO_RCVBUF, (char*)&len, sizeof(int))) - { soap->errnum = soap_socket_errno; - soap_set_receiver_error(soap, tcp_error(soap), "TCP setsockopt SO_RCVBUF failed in soap_bind()", SOAP_TCP_ERROR); - return -1; - } -#ifdef TCP_NODELAY - if (setsockopt((SOAP_SOCKET)soap->master, IPPROTO_TCP, TCP_NODELAY, (char*)&set, sizeof(int))) - { soap->errnum = soap_socket_errno; - soap_set_receiver_error(soap, tcp_error(soap), "TCP setsockopt TCP_NODELAY failed in soap_bind()", SOAP_TCP_ERROR); - return -1; - } -#endif -#endif -/* WR[ */ -#ifdef WITH_IPV6 - soap->errmode = 0; - if (bind(soap->master, resaddr.ai_addr, resaddr.ai_addrlen) || listen(soap->master, backlog)) - { - soap->errnum = soap_socket_errno; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Could not bind to host\n")); - soap_closesock(soap); - soap_set_receiver_error(soap, tcp_error(soap), "TCP bind failed in soap_bind()", SOAP_TCP_ERROR); - return -1; - } -#else /* WITH_IPV6 */ -/* ]WR */ - memset((void*)&sockaddr, 0, sizeof(sockaddr)); - sockaddr.sin_family = AF_INET; - soap->errmode = 2; - if (host) - { if (soap->fresolve(soap, host, &sockaddr.sin_addr)) - { soap_set_receiver_error(soap, tcp_error(soap), "TCP get host by name failed in soap_bind()", SOAP_TCP_ERROR); - return -1; - } - } - else - sockaddr.sin_addr.s_addr = htonl(INADDR_ANY); - sockaddr.sin_port = htons((short)port); - soap->errmode = 0; - if (bind((SOAP_SOCKET)soap->master, (struct sockaddr*)&sockaddr, sizeof(sockaddr)) || listen((SOAP_SOCKET)soap->master, backlog)) - { soap->errnum = soap_socket_errno; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Could not bind to host\n")); - soap_closesock(soap); - soap_set_receiver_error(soap, tcp_error(soap), "TCP bind failed in soap_bind()", SOAP_TCP_ERROR); - return -1; - } -/* WR[ */ -#endif /* WITH_IPV6 */ -/* ]WR */ -#ifdef WITH_OPENSSL - if (!soap->ctx && (soap->error = soap->fsslauth(soap))) - return -1; -#endif - return soap->master; -} -#endif -#endif - -/******************************************************************************/ -#ifndef MAC_CARBON -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_poll(struct soap *soap) -{ -#ifndef WITH_LEAN - struct timeval timeout; - fd_set sfd,rfd; - int r; - timeout.tv_sec = 0; - timeout.tv_usec = 0; - FD_ZERO(&rfd); - FD_ZERO(&sfd); - if (soap->socket >= 0) - { FD_SET(soap->socket, &rfd); - FD_SET(soap->socket, &sfd); - r = select(soap->socket + 1, &rfd, &sfd, NULL, &timeout); - } - else if (soap->master >= 0) - { FD_SET(soap->master, &rfd); - r = select(soap->master + 1, &rfd, &sfd, NULL, &timeout); - } - else - { FD_SET(soap->sendfd, &sfd); - FD_SET(soap->recvfd, &rfd); - r = select((soap->sendfd > soap->recvfd ? soap->sendfd : soap->recvfd) + 1, &rfd, &sfd, NULL, &timeout); - } - if (r > 0) - { -#ifdef WITH_OPENSSL - if (soap->ssl) - { if ((soap->socket >= 0) && FD_ISSET(soap->socket, &rfd)) - { char buf = '\0'; - if (SSL_peek(soap->ssl, &buf, 1) <= 0) - return SOAP_EOF; - } - } -#endif - return SOAP_OK; - } - if (r < 0 && (soap_valid_socket(soap->master) || soap_valid_socket(soap->socket)) && soap_socket_errno != SOAP_EINTR) - { soap->errnum = soap_socket_errno; - soap_set_receiver_error(soap, tcp_error(soap), "select failed in soap_poll()", SOAP_TCP_ERROR); - return soap->error = SOAP_TCP_ERROR; - } - else - soap->errnum = soap_errno; - return SOAP_EOF; -#else - return SOAP_OK; -#endif -} -#endif -#endif - -/******************************************************************************/ -#ifndef MAC_CARBON -#ifndef PALM_1 -static int -tcp_accept(struct soap *soap, int s, struct sockaddr *a, int *n) -{ int fd; -#if defined(SOCKLEN_T) - fd = (int)accept((SOAP_SOCKET)s, a, (SOCKLEN_T*)n); -#elif defined(__socklen_t_defined) || defined(_SOCKLEN_T) || defined(CYGWIN) - fd = (int)accept((SOAP_SOCKET)s, a, (socklen_t*)n); -#elif defined(WIN32) || defined(__APPLE__) || defined(HP_UX) || defined(SUN_OS) || defined(OPENSERVER) || defined(TRU64) || defined(VXWORKS) - fd = (int)accept((SOAP_SOCKET)s, a, n); -#else - fd = (int)accept((SOAP_SOCKET)s, a, (size_t*)n); -#endif -#ifdef SOCKET_CLOSE_ON_EXEC -#ifdef WIN32 -#ifndef UNDER_CE - SetHandleInformation((HANDLE)fd, HANDLE_FLAG_INHERIT, 0); -#endif -#else - fcntl(fd, F_SETFD, FD_CLOEXEC); -#endif -#endif - return fd; -} -#endif -#endif - -/******************************************************************************/ -#ifndef MAC_CARBON -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_accept(struct soap *soap) -{ -/* WR[ */ -#ifdef WITH_IPV6 - struct sockaddr_storage sockaddr; -#else /* WITH_IPV6 */ -/* ]WR */ - struct sockaddr_in sockaddr; -/* WR[ */ -#endif -/* ]WR */ - int n = (int)sizeof(sockaddr); -#ifndef WITH_LEAN - int len = SOAP_BUFLEN; - int set = 1; -#endif - soap->error = SOAP_OK; - memset((void*)&sockaddr, 0, sizeof(sockaddr)); - soap->socket = SOAP_INVALID_SOCKET; - soap->errmode = 0; - if (soap_valid_socket(soap->master)) - { for (;;) - { -#ifndef WITH_LEAN - if (soap->accept_timeout) - { struct timeval timeout; - fd_set fd; - if (soap->accept_timeout > 0) - { timeout.tv_sec = soap->accept_timeout; - timeout.tv_usec = 0; - } - else - { timeout.tv_sec = -soap->accept_timeout/1000000; - timeout.tv_usec = -soap->accept_timeout%1000000; - } - FD_ZERO(&fd); - FD_SET((SOAP_SOCKET)soap->master, &fd); - for (;;) - { int r = select((SOAP_SOCKET)(soap->master + 1), &fd, &fd, NULL, &timeout); - if (r > 0) - break; - if (!r) - { soap->errnum = 0; - soap_set_receiver_error(soap, "Timeout", "TCP accept failed in soap_accept()", SOAP_TCP_ERROR); - return -1; - } - if (soap_socket_errno != SOAP_EINTR) - { soap->errnum = soap_socket_errno; - soap_closesock(soap); - soap_set_sender_error(soap, tcp_error(soap), "TCP accept failed in soap_accept()", SOAP_TCP_ERROR); - return -1; - } - } -#if defined(WIN32) - { u_long nonblocking = 1; - ioctlsocket((SOAP_SOCKET)soap->master, FIONBIO, &nonblocking); - } -#elif defined(VXWORKS) - { vx_nonblocking = TRUE; - ioctl((SOAP_SOCKET)soap->master, FIONBIO, (int)(&vx_nonblocking)); - } -#else - fcntl((SOAP_SOCKET)soap->master, F_SETFL, fcntl((SOAP_SOCKET)soap->master, F_GETFL)|O_NONBLOCK); -#endif - } - else -#if defined(WIN32) - { u_long blocking = 0; - ioctlsocket((SOAP_SOCKET)soap->master, FIONBIO, &blocking); - } -/* WR[ */ -#elif defined(VXWORKS) - { vx_nonblocking = FALSE; - ioctl((SOAP_SOCKET)soap->master, FIONBIO, (int)(&vx_nonblocking)); - } -/* ]WR */ -#else - fcntl((SOAP_SOCKET)soap->master, F_SETFL, fcntl((SOAP_SOCKET)soap->master, F_GETFL)&~O_NONBLOCK); -#endif -#endif - if ((soap->socket = soap->faccept(soap, soap->master, (struct sockaddr*)&sockaddr, &n)) >= 0) - { -/* WR[ */ -#ifdef WITH_IPV6 -/* Use soap->host to store the numeric form of the remote host */ - getnameinfo((struct sockaddr*)&sockaddr, n, soap->host, sizeof(soap->host), NULL, 0, NI_NUMERICHOST | NI_NUMERICSERV); - DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Accept socket %d from %s\n", soap->socket, soap->host)); - soap->ip = 0; /* info stored in soap->host */ - soap->port = 0; /* info stored in soap->host */ -#else /* WITH_IPV6 */ -/* ]WR */ - soap->ip = ntohl(sockaddr.sin_addr.s_addr); - soap->port = (int)ntohs(sockaddr.sin_port); /* does not return port number on some systems */ - DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Accept socket %d at port %d from IP %d.%d.%d.%d\n", soap->socket, soap->port, (int)(soap->ip>>24)&0xFF, (int)(soap->ip>>16)&0xFF, (int)(soap->ip>>8)&0xFF, (int)soap->ip&0xFF)); -/* WR[ */ -#endif /* WITH_IPV6 */ -/* ]WR */ - soap->keep_alive = ((soap->imode & SOAP_IO_KEEPALIVE) != 0); -#ifndef WITH_LEAN - if (soap->accept_flags & SO_LINGER) - { struct linger linger; - memset((void*)&linger, 0, sizeof(linger)); - linger.l_onoff = 1; - linger.l_linger = 0; - if (setsockopt((SOAP_SOCKET)soap->socket, SOL_SOCKET, SO_LINGER, (char*)&linger, sizeof(struct linger))) - { soap->errnum = soap_socket_errno; - soap_set_receiver_error(soap, tcp_error(soap), "TCP setsockopt SO_LINGER failed in soap_accept()", SOAP_TCP_ERROR); - return -1; - } - } - if ((soap->accept_flags & ~SO_LINGER) && setsockopt((SOAP_SOCKET)soap->socket, SOL_SOCKET, soap->accept_flags & ~SO_LINGER, (char*)&set, sizeof(int))) - { soap->errnum = soap_socket_errno; - soap_set_receiver_error(soap, tcp_error(soap), "TCP setsockopt failed in soap_accept()", SOAP_TCP_ERROR); - return -1; - } - if (soap->keep_alive && setsockopt((SOAP_SOCKET)soap->socket, SOL_SOCKET, SO_KEEPALIVE, (char*)&set, sizeof(int))) - { soap->errnum = soap_socket_errno; - soap_set_receiver_error(soap, tcp_error(soap), "TCP setsockopt SO_KEEPALIVE failed in soap_accept()", SOAP_TCP_ERROR); - return -1; - } - if (setsockopt((SOAP_SOCKET)soap->socket, SOL_SOCKET, SO_SNDBUF, (char*)&len, sizeof(int))) - { soap->errnum = soap_socket_errno; - soap_set_receiver_error(soap, tcp_error(soap), "TCP setsockopt SO_SNDBUF failed in soap_accept()", SOAP_TCP_ERROR); - return -1; - } - if (setsockopt((SOAP_SOCKET)soap->socket, SOL_SOCKET, SO_RCVBUF, (char*)&len, sizeof(int))) - { soap->errnum = soap_socket_errno; - soap_set_receiver_error(soap, tcp_error(soap), "TCP setsockopt SO_RCVBUF failed in soap_accept()", SOAP_TCP_ERROR); - return -1; - } -#ifdef TCP_NODELAY - if (setsockopt((SOAP_SOCKET)soap->socket, IPPROTO_TCP, TCP_NODELAY, (char*)&set, sizeof(int))) - { soap->errnum = soap_socket_errno; - soap_set_receiver_error(soap, tcp_error(soap), "TCP setsockopt TCP_NODELAY failed in soap_accept()", SOAP_TCP_ERROR); - return -1; - } -#endif -#endif - if (soap->accept_timeout) - { -#if defined(WIN32) - u_long blocking = 0; - ioctlsocket((SOAP_SOCKET)soap->master, FIONBIO, &blocking); - ioctlsocket((SOAP_SOCKET)soap->socket, FIONBIO, &blocking); -/* WR[ */ -#elif defined(VXWORKS) - vx_nonblocking = FALSE; - ioctl((SOAP_SOCKET)soap->master, FIONBIO, (int)(&vx_nonblocking)); - ioctl((SOAP_SOCKET)soap->socket, FIONBIO, (int)(&vx_nonblocking)); -/* ]WR */ -#elif defined(PALM) - fcntl((SOAP_SOCKET)soap->master, F_SETFL, fcntl((SOAP_SOCKET)soap->master, F_GETFL,0)&~O_NONBLOCK); - fcntl((SOAP_SOCKET)soap->socket, F_SETFL, fcntl((SOAP_SOCKET)soap->socket, F_GETFL,0)&~O_NONBLOCK); -#elif defined(SYMBIAN) - long blocking = 0; - ioctl((SOAP_SOCKET)soap->master, 0/*FIONBIO*/, &blocking); -#else - fcntl((SOAP_SOCKET)soap->master, F_SETFL, fcntl((SOAP_SOCKET)soap->master, F_GETFL)&~O_NONBLOCK); - fcntl((SOAP_SOCKET)soap->socket, F_SETFL, fcntl((SOAP_SOCKET)soap->socket, F_GETFL)&~O_NONBLOCK); -#endif - } - return soap->socket; - } - if (soap_socket_errno != SOAP_EINTR && soap_socket_errno != SOAP_EAGAIN) - { soap->errnum = soap_socket_errno; - soap_set_receiver_error(soap, tcp_error(soap), "TCP accept failed in soap_accept()", SOAP_TCP_ERROR); - return -1; - } - } - } - else - { soap_set_receiver_error(soap, tcp_error(soap), "TCP no master socket in soap_accept()", SOAP_TCP_ERROR); - return -1; - } -} -#endif -#endif - -/******************************************************************************/ -#ifndef MAC_CARBON -#ifndef PALM_1 -static int -tcp_disconnect(struct soap *soap) -{ -#ifdef WITH_OPENSSL - if (soap->ssl) - { int r, s = 0; - if (soap->session) - SSL_SESSION_free(soap->session); - if (*soap->host) - { soap->session = SSL_get1_session(soap->ssl); - if (soap->session) - { strcpy(soap->session_host, soap->host); - soap->session_port = soap->port; - } - } - r = SSL_shutdown(soap->ssl); - if (r != 1) - { s = ERR_get_error(); - if (s) - { if (soap_valid_socket(soap->socket)) - { soap->fshutdownsocket(soap, (SOAP_SOCKET)soap->socket, 1); - soap->socket = SOAP_INVALID_SOCKET; - } - r = SSL_shutdown(soap->ssl); - } - } - DBGLOG(TEST, if (s) SOAP_MESSAGE(fdebug, "Shutdown failed: %d\n", SSL_get_error(soap->ssl, r))); - SSL_free(soap->ssl); - soap->ssl = NULL; - if (s) - return SOAP_SSL_ERROR; - ERR_remove_state(0); - } -#endif - if (soap_valid_socket(soap->socket)) - { DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Closing socket %d\n", soap->socket)); - soap->fshutdownsocket(soap, (SOAP_SOCKET)soap->socket, 2); - soap->fclosesocket(soap, (SOAP_SOCKET)soap->socket); - soap->socket = SOAP_INVALID_SOCKET; - } - return SOAP_OK; -} -#endif -#endif - -/******************************************************************************/ -#ifndef MAC_CARBON -#ifndef PALM_1 -static int -tcp_closesocket(struct soap *soap, SOAP_SOCKET fd) -{ return closesocket(fd); -} -#endif -#endif - -/******************************************************************************/ -#ifndef MAC_CARBON -#ifndef PALM_1 -static int -tcp_shutdownsocket(struct soap *soap, SOAP_SOCKET fd, int how) -{ return shutdown(fd, how); -} -#endif -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_closesock(struct soap *soap) -{ register int status = soap->error; -#ifndef MAC_CARBON - if (status == SOAP_EOF || status == SOAP_TCP_ERROR || status == SOAP_SSL_ERROR || !soap->keep_alive) - { if ((soap->error = soap->fclose(soap))) - return soap->error; - soap->socket = SOAP_INVALID_SOCKET; - } -#endif -#ifdef WITH_ZLIB - if (soap->zlib_state == SOAP_ZLIB_DEFLATE) - deflateEnd(&soap->d_stream); - else if (soap->zlib_state == SOAP_ZLIB_INFLATE) - inflateEnd(&soap->d_stream); - soap->zlib_state = SOAP_ZLIB_NONE; -#endif - return soap->error = status; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -size_t -SOAP_FMAC2 -soap_hash(register const char *s) -{ register size_t h = 0; - while (*s) - h = 65599*h + *s++; - return h % SOAP_IDHASH; -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -static void -soap_init_pht(struct soap *soap) -{ register int i; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Initializing pointer hashtable\n")); - for (i = 0; i < (int)SOAP_PTRHASH; i++) - soap->pht[i] = NULL; -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -struct soap* -SOAP_FMAC2 -soap_new() -{ struct soap *soap = (struct soap*)SOAP_MALLOC(sizeof(struct soap)); - if (soap) - soap_init(soap); - return soap; -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -struct soap* -SOAP_FMAC2 -soap_new1(int mode) -{ return soap_new2(mode, mode); -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -struct soap* -SOAP_FMAC2 -soap_new2(int imode, int omode) -{ struct soap *soap = (struct soap*)SOAP_MALLOC(sizeof(struct soap)); - if (soap) - soap_init2(soap, imode, omode); - return soap; -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -static void -soap_free_pht(struct soap *soap) -{ register struct soap_plist *pp, *next; - register int i; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Free pointer hashtable\n")); - for (i = 0; i < (int)SOAP_PTRHASH; i++) - { for (pp = soap->pht[i]; pp; pp = next) - { next = pp->next; - SOAP_FREE(pp); - } - soap->pht[i] = NULL; - } -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_embed(struct soap *soap, const void *p, const struct soap_array *a, int n, const char *tag, int type) -{ register int i; - struct soap_plist *pp; - if (soap->version != 1) - soap->encoding = 1; - if (a) - i = soap_array_pointer_lookup(soap, p, a, n, type, &pp); - else - i = soap_pointer_lookup(soap, p, type, &pp); - if (i) - { if (soap_is_embedded(soap, pp) - || soap_is_single(soap, pp)) - return 0; - soap_set_embedded(soap, pp); - } - return i; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_pointer_lookup(struct soap *soap, const void *p, int type, struct soap_plist **ppp) -{ register struct soap_plist *pp; - *ppp = NULL; - if (p) - for (pp = soap->pht[soap_hash_ptr(p)]; pp; pp = pp->next) - if (pp->ptr == p && pp->type == type) - { *ppp = pp; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Lookup location=%p type=%d id=%d\n", p, type, pp->id)); - return pp->id; - } - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Lookup location=%p type=%d: not found\n", p, type)); - return 0; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_pointer_enter(struct soap *soap, const void *p, const struct soap_array *a, int n, int type, struct soap_plist **ppp) -{ register int h; - register struct soap_plist *pp = *ppp = (struct soap_plist*)SOAP_MALLOC(sizeof(struct soap_plist)); - if (!pp) - return 0; - if (a) - h = soap_hash_ptr(a->__ptr); - else - h = soap_hash_ptr(p); - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Pointer enter location=%p array=%p size=%d dim=%d type=%d id=%lu\n", p, a?a->__ptr:NULL, a?a->__size:0, n, type, soap->idnum+1)); - pp->next = soap->pht[h]; - pp->type = type; - pp->mark1 = 0; - pp->mark2 = 0; - pp->ptr = p; - pp->array = a; - soap->pht[h] = pp; - pp->id = ++soap->idnum; - return pp->id; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_array_pointer_lookup(struct soap *soap, const void *p, const struct soap_array *a, int n, int type, struct soap_plist **ppp) -{ register struct soap_plist *pp; - *ppp = NULL; - if (!p || !a->__ptr) - return 0; - for (pp = soap->pht[soap_hash_ptr(a->__ptr)]; pp; pp = pp->next) - { if (pp->type == type && pp->array && pp->array->__ptr == a->__ptr) - { register int i; - for (i = 0; i < n; i++) - if (((const int*)&pp->array->__size)[i] != ((const int*)&a->__size)[i]) - break; - if (i == n) - { *ppp = pp; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Array lookup location=%p type=%d id=%d\n", a->__ptr, type, pp->id)); - return pp->id; - } - } - } - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Array lookup location=%p type=%d: not found\n", a->__ptr, type)); - return 0; -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_begin_count(struct soap *soap) -{ soap_clr_attr(soap); - soap_set_local_namespaces(soap); -#ifndef WITH_LEANER - if ((soap->mode & SOAP_ENC_DIME) || (soap->omode & SOAP_ENC_DIME)) - soap->mode = soap->omode | SOAP_IO_LENGTH | SOAP_ENC_DIME; - else -#endif - { soap->mode = soap->omode; - if ((soap->mode & SOAP_IO) == SOAP_IO_STORE - || (((soap->mode & SOAP_IO) == SOAP_IO_CHUNK || (soap->mode & SOAP_ENC_XML)) && !soap->fpreparesend)) - soap->mode &= ~SOAP_IO_LENGTH; - else - soap->mode |= SOAP_IO_LENGTH; - } - if ((soap->mode & SOAP_ENC_ZLIB) && (soap->mode & SOAP_IO) == SOAP_IO_FLUSH) - { if (!(soap->mode & SOAP_ENC_DIME)) - soap->mode &= ~SOAP_IO_LENGTH; - if (soap->mode & SOAP_ENC_XML) - soap->mode |= SOAP_IO_BUFFER; - else - soap->mode |= SOAP_IO_STORE; - } - if (!soap->encodingStyle && !(soap->mode & SOAP_XML_GRAPH)) - soap->mode |= SOAP_XML_TREE; -#ifndef WITH_LEANER - if (soap->mode & SOAP_ENC_MIME) - soap_select_mime_boundary(soap); - soap->dime.list = soap->dime.last; /* keep track of last DIME attachment */ -#endif - soap->count = 0; - soap->ns = 0; - soap->null = 0; - soap->position = 0; - soap->mustUnderstand = 0; - soap->encoding = 0; - soap->part = SOAP_BEGIN; - soap->idnum = 0; - soap->dime.count = 0; /* count # of attachments */ - soap->dime.size = 0; /* accumulate total size of attachments */ - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Begin count phase (socket=%d mode=%x count=%lu)\n", soap->socket, soap->mode, (unsigned long)soap->count)); - if (soap->fprepareinit && (soap->mode & SOAP_IO) != SOAP_IO_STORE) - soap->fprepareinit(soap); -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_begin_send(struct soap *soap) -{ soap->error = SOAP_OK; - soap_clr_attr(soap); - soap_set_local_namespaces(soap); - soap->mode = (soap->omode & ~SOAP_IO_LENGTH) | (soap->mode & SOAP_ENC_DIME); - if ((soap->mode & SOAP_ENC_ZLIB) && (soap->mode & SOAP_IO) == SOAP_IO_FLUSH) - { if (soap->mode & SOAP_ENC_XML) - soap->mode |= SOAP_IO_BUFFER; - else - soap->mode |= SOAP_IO_STORE; - } - if ((soap->mode & SOAP_IO) == SOAP_IO_FLUSH && soap_valid_socket(soap->socket)) - { if (soap->count || (soap->mode & SOAP_ENC_XML)) - soap->mode |= SOAP_IO_BUFFER; - else - soap->mode |= SOAP_IO_STORE; - } - if ((soap->mode & SOAP_IO) == SOAP_IO_STORE) - soap_new_block(soap); - if (!(soap->mode & SOAP_IO_KEEPALIVE)) - soap->keep_alive = 0; - if (!soap->encodingStyle && !(soap->mode & SOAP_XML_GRAPH)) - soap->mode |= SOAP_XML_TREE; -#ifndef WITH_LEANER - if (soap->mode & SOAP_ENC_MIME) - soap_select_mime_boundary(soap); -#endif -#ifdef WIN32 -#ifndef UNDER_CE -#ifndef WITH_FASTCGI - if (!soap_valid_socket(soap->socket)) /* Set win32 stdout or soap->sendfd to BINARY, e.g. to support DIME */ -#ifdef __BORLANDC__ - setmode((SOAP_SOCKET)soap->sendfd, O_BINARY); -#else - _setmode((SOAP_SOCKET)soap->sendfd, _O_BINARY); -#endif -#endif -#endif -#endif - if (soap->mode & SOAP_IO) - { soap->bufidx = 0; - soap->buflen = 0; - } - soap->chunksize = 0; - soap->ns = 0; - soap->null = 0; - soap->position = 0; - soap->mustUnderstand = 0; - soap->encoding = 0; - soap->part = SOAP_BEGIN; - soap->idnum = 0; - soap->level = 0; -#ifdef WITH_ZLIB - soap->z_ratio_out = 1.0; - if ((soap->mode & SOAP_ENC_ZLIB) && soap->zlib_state != SOAP_ZLIB_DEFLATE) - { -#ifdef WITH_GZIP - memcpy(soap->z_buf, "\37\213\10\0\0\0\0\0\0\377", 10); - soap->d_stream.next_out = (Byte*)soap->z_buf + 10; - soap->d_stream.avail_out = SOAP_BUFLEN - 10; - soap->z_crc = crc32(0L, NULL, 0); - if (deflateInit2(&soap->d_stream, soap->z_level, Z_DEFLATED, -MAX_WBITS, 8, Z_DEFAULT_STRATEGY) != Z_OK) -#else - soap->d_stream.next_out = (Byte*)soap->z_buf; - soap->d_stream.avail_out = SOAP_BUFLEN; - if (deflateInit(&soap->d_stream, soap->z_level) != Z_OK) -#endif - return soap->error = SOAP_ZLIB_ERROR; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Deflate initialized\n")); - soap->zlib_state = SOAP_ZLIB_DEFLATE; - } -#endif - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Begin send phase (socket=%d mode=%x count=%lu)\n", soap->socket, soap->mode, (unsigned long)soap->count)); - if (soap->fprepareinit && (soap->mode & SOAP_IO) == SOAP_IO_STORE) - soap->fprepareinit(soap); - return SOAP_OK; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_embedded(struct soap *soap, const void *p, int t) -{ struct soap_plist *pp; - if (soap_pointer_lookup(soap, p, t, &pp)) - { pp->mark1 = 1; - pp->mark2 = 1; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Embedded %p type=%d mark set to 1\n", p, t)); - } -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_reference(struct soap *soap, const void *p, int t) -{ struct soap_plist *pp; - if (!p || (soap->mode & SOAP_XML_TREE)) - return 1; - if (soap_pointer_lookup(soap, p, t, &pp)) - { if (pp->mark1 == 0) - { pp->mark1 = 2; - pp->mark2 = 2; - } - } - else if (soap_pointer_enter(soap, p, NULL, 0, t, &pp)) - { pp->mark1 = 0; - pp->mark2 = 0; - } - else - return 1; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Reference %p type=%d (%d %d)\n", p, t, (int)pp->mark1, (int)pp->mark2)); - return pp->mark1; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_array_reference(struct soap *soap, const void *p, const struct soap_array *a, int n, int t) -{ register int i; - struct soap_plist *pp; - if (!p) - return 1; - i = soap_array_pointer_lookup(soap, p, a, n, t, &pp); - if (i) - { if (pp->mark1 == 0) - { pp->mark1 = 2; - pp->mark2 = 2; - } - } - else if (!soap_pointer_enter(soap, p, a, n, t, &pp)) - return 1; - else - { pp->mark1 = 0; - pp->mark2 = 0; - } - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Array reference %p ptr=%p dim=%d type=%d (%d %d)\n", p, a->__ptr, n, t, (int)pp->mark1, (int)pp->mark2)); - return pp->mark1; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_embedded_id(struct soap *soap, int id, const void *p, int t) -{ struct soap_plist *pp; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Embedded_id %p type=%d id=%d\n", p, t, id)); - if (soap->mode & SOAP_XML_TREE) - return id; - if (soap->version == 1 && soap->encodingStyle && !(soap->mode & SOAP_XML_GRAPH) && soap->part != SOAP_IN_HEADER) - { if (id < 0) - { id = soap_pointer_lookup(soap, p, t, &pp); - if (id) - { if (soap->mode & SOAP_IO_LENGTH) - pp->mark1 = 2; - else - pp->mark2 = 2; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Embedded_id multiref id=%d %p type=%d = (%d %d)\n", id, p, t, (int)pp->mark1, (int)pp->mark2)); - } - return -1; - } - return id; - } - if (id < 0) - id = soap_pointer_lookup(soap, p, t, &pp); - else if (id && !soap_pointer_lookup(soap, p, t, &pp)) - return 0; - if (id && pp) - { if (soap->mode & SOAP_IO_LENGTH) - pp->mark1 = 1; - else - pp->mark2 = 1; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Embedded_id embedded ref id=%d %p type=%d = (%d %d)\n", id, p, t, (int)pp->mark1, (int)pp->mark2)); - } - return id; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_is_embedded(struct soap *soap, struct soap_plist *pp) -{ if (!pp) - return 0; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Is embedded? %d %d\n", (int)pp->mark1, (int)pp->mark2)); - if (soap->version == 1 && soap->encodingStyle && !(soap->mode & SOAP_XML_GRAPH) && soap->part != SOAP_IN_HEADER) - { if (soap->mode & SOAP_IO_LENGTH) - return pp->mark1 != 0; - return pp->mark2 != 0; - } - if (soap->mode & SOAP_IO_LENGTH) - return pp->mark1 == 1; - return pp->mark2 == 1; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_is_single(struct soap *soap, struct soap_plist *pp) -{ if (soap->part == SOAP_IN_HEADER) - return 1; - if (!pp) - return 0; - if (soap->mode & SOAP_IO_LENGTH) - return pp->mark1 == 0; - return pp->mark2 == 0; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_set_embedded(struct soap *soap, struct soap_plist *pp) -{ if (!pp) - return; - if (soap->mode & SOAP_IO_LENGTH) - pp->mark1 = 1; - else - pp->mark2 = 1; -} -#endif - -/******************************************************************************/ -#ifndef WITH_LEANER -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_element_dime(struct soap *soap, const char *tag, int id, const void *p, const struct soap_array *a, const char *aid, const char *atype, const char *aoptions, int n, const char *type, int t) -{ struct soap_plist *pp; - if (!p || !a->__ptr || (!aid && !atype)) - return soap_element_id(soap, tag, id, p, a, n, type, t); - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Attachment tag='%s' id='%s' (%d) type='%s'\n", tag, aid?aid:"", id, atype?atype:"")); - if (id < 0) - id = soap_array_pointer_lookup(soap, p, a, n, t, &pp); - if (!aid) - { sprintf(soap->tmpbuf, soap->dime_id_format, id); - aid = soap_strdup(soap, soap->tmpbuf); - } - if (soap_element_href(soap, tag, 0, "href", aid)) - return soap->error; - if (soap->mode & SOAP_IO_LENGTH) - { if (pp->mark1 != 3) - { struct soap_multipart *content = soap_new_multipart(soap, &soap->dime.first, &soap->dime.last, (char*)a->__ptr, a->__size); - if (!content) - return soap->error = SOAP_EOM; - content->id = aid; - content->type = atype; - content->options = aoptions; - pp->mark1 = 3; - } - } - else - pp->mark2 = 3; - return SOAP_OK; -} -#endif -#endif - -/******************************************************************************/ -#ifndef PALM_1 -static void -soap_init_iht(struct soap *soap) -{ register int i; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Initializing ID hashtable\n")); - for (i = 0; i < SOAP_IDHASH; i++) - soap->iht[i] = NULL; -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -static void -soap_free_iht(struct soap *soap) -{ register int i; - register struct soap_ilist *ip, *p; - register struct soap_flist *fp, *fq; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Free ID hashtable\n")); - for (i = 0; i < SOAP_IDHASH; i++) - { for (ip = soap->iht[i]; ip; ip = p) - { for (fp = ip->flist; fp; fp = fq) - { fq = fp->next; - SOAP_FREE(fp); - } - p = ip->next; - SOAP_FREE(ip); - } - soap->iht[i] = NULL; - } -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -static struct soap_ilist * -soap_hlookup(struct soap *soap, const char *id) -{ register struct soap_ilist *ip; - for (ip = soap->iht[soap_hash(id)]; ip; ip = ip->next) - if (!strcmp(ip->id, id)) - return ip; - return NULL; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -struct soap_ilist * -SOAP_FMAC2 -soap_lookup(struct soap *soap, const char *id) -{ register struct soap_ilist *ip; - ip = soap_hlookup(soap, id); -#ifndef WITH_LEANER - if (!ip && *id != '#' && !strchr(id, ':')) /* try content id "cid:" with DIME attachments */ - { char cid[SOAP_TAGLEN]; - strcpy(cid, "cid:"); - strncat(cid + 4, id, sizeof(cid) - 5); - cid[sizeof(cid) - 1] = '\0'; - ip = soap_hlookup(soap, cid); - } -#endif - return ip; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -struct soap_ilist * -SOAP_FMAC2 -soap_enter(struct soap *soap, const char *id) -{ register size_t h; - register struct soap_ilist *ip; - ip = (struct soap_ilist*)SOAP_MALLOC(sizeof(struct soap_ilist) + strlen(id)); - if (ip) - { h = soap_hash(id); - strcpy(ip->id, id); - ip->next = soap->iht[h]; - soap->iht[h] = ip; - return ip; - } - return NULL; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -void* -SOAP_FMAC2 -soap_malloc(struct soap *soap, size_t n) -{ register char *p; - if (!n) - return NULL; - if (!soap) - return SOAP_MALLOC(n); - n += (-(long)n) & 7; - if (!(p = (char*)SOAP_MALLOC(n + sizeof(void*) + sizeof(size_t)))) - { soap->error = SOAP_EOM; - return NULL; - } - /* keep chain of alloced cells for later destruction */ - soap->alloced = 1; - *(void**)(p + n) = soap->alist; - *(size_t*)(p + n + sizeof(void*)) = n; - soap->alist = p + n; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Malloc %u bytes at location %p\n", (unsigned int)n, p)); - return p; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_dealloc(struct soap *soap, void *p) -{ if (!soap) - return; - if (p) - { register char **q; - for (q = (char**)&soap->alist; *q; q = *(char***)q) - { if (p == (void*)(*q - *(size_t*)(*q + sizeof(void*)))) - { *q = **(char***)q; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Freed data at %p\n", p)); - SOAP_FREE(p); - return; - } - } - soap_delete(soap, p); - } - else - { register char *q; - while (soap->alist) - { q = (char*)soap->alist; - soap->alist = *(void**)q; - q -= *(size_t*)(q + sizeof(void*)); - SOAP_FREE(q); - } - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Dealloc all data done\n")); - } - /* we must assume these were deallocated: */ - soap->action = NULL; - soap->fault = NULL; - soap->header = NULL; - soap->authrealm = NULL; -#ifndef WITH_LEANER - soap_clr_mime(soap); -#endif -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_delete(struct soap *soap, void *p) -{ register struct soap_clist **cp = &soap->clist; - if (p) - { while (*cp) - { if (p == (*cp)->ptr) - { register struct soap_clist *q = *cp; - *cp = q->next; - q->fdelete(q); - SOAP_FREE(q); - return; - } - cp = &(*cp)->next; - } - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Could not dealloc data %p: address not in list\n", p)); - } - else - { while (*cp) - { register struct soap_clist *q = *cp; - *cp = q->next; - if (q->ptr == (void*)soap->fault) - soap->fault = NULL; /* this was deallocated */ - else if (q->ptr == (void*)soap->header) - soap->header = NULL; /* this was deallocated */ - q->fdelete(q); - SOAP_FREE(q); - } - } -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -struct soap_clist * -SOAP_FMAC2 -soap_link(struct soap *soap, void *p, int t, int n, void (*fdelete)(struct soap_clist*)) -{ register struct soap_clist *cp; - if ((cp = (struct soap_clist*)SOAP_MALLOC(sizeof(struct soap_clist)))) - { cp->next = soap->clist; - cp->type = t; - cp->size = n; - cp->ptr = p; - cp->fdelete = fdelete; - soap->clist = cp; - } - return cp; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_unlink(struct soap *soap, const void *p) -{ register char **q; - register struct soap_clist **cp; - if (!soap || !p) - return; - for (q = (char**)&soap->alist; *q; q = *(char***)q) - { if (p == (void*)(*q - *(size_t*)(*q + sizeof(void*)))) - { *q = **(char***)q; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Unlinked data %p\n", p)); - return; - } - } - for (cp = &soap->clist; *cp; cp = &(*cp)->next) - { if (p == (*cp)->ptr) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Unlinked class instance %p\n", p)); - q = (char**)*cp; - *cp = (*cp)->next; - SOAP_FREE(q); - return; - } - } -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_lookup_type(struct soap *soap, const char *id) -{ register struct soap_ilist *ip; - if (id && *id) - { ip = soap_lookup(soap, id); - if (ip) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Lookup id='%s' type=%d\n", id, ip->type)); - return ip->type; - } - } - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "lookup type id='%s' NOT FOUND! Need to get it from xsi:type\n", id)); - return 0; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -void* -SOAP_FMAC2 -soap_id_lookup(struct soap *soap, const char *id, void **p, int t, size_t n, unsigned int k) -{ struct soap_ilist *ip; - void **q; - if (!id || !*id) - return p; - soap->alloced = 0; - if (!p) - p = (void**)soap_malloc(soap, sizeof(void*)); - ip = soap_lookup(soap, id); /* lookup pointer to hash table entry for string id */ - if (!ip) - { ip = soap_enter(soap, id); /* new hash table entry for string id */ - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Forwarding first href='%s' type=%d %p (%u bytes)\n", id, t, p, (unsigned int)n)); - ip->type = t; - ip->size = n; - ip->link = p; - ip->copy = NULL; - ip->flist = NULL; - ip->ptr = NULL; - ip->level = k; - *p = NULL; - } - else if (ip->ptr) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Resolved href='%s' type=%d location=%p (%u bytes)\n", id, t, ip->ptr, (unsigned int)n)); - if (ip->type != t) - { strcpy(soap->id, id); - soap->error = SOAP_HREF; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Type incompatibility: id type=%d href type=%d\n", ip->type, t)); - return NULL; - } - while (ip->level < k) - { q = (void**)soap_malloc(soap, sizeof(void*)); - if (!q) - return NULL; - *p = (void*)q; - p = q; - k--; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Descending one level...\n")); - } - *p = ip->ptr; - } - else if (ip->level > k) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Resolving level %u pointers to href='%s'\n", ip->level, id)); - while (ip->level > k) - { void *s, **r = &ip->link; - q = (void**)ip->link; - while (q) - { *r = (void*)soap_malloc(soap, sizeof(void*)); - s = *q; - *q = *r; - r = (void**)*r; - q = (void**)s; - } - *r = NULL; - ip->size = n; - ip->copy = NULL; - ip->level = ip->level - 1; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Descending one level...\n")); - } - q = (void**)ip->link; - ip->link = p; - *p = (void*)q; - } - else - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Forwarded href='%s' type=%d location=%p (%u bytes)\n", id, t, p, (unsigned int)n)); - while (ip->level < k) - { q = (void**)soap_malloc(soap, sizeof(void*)); - *p = q; - p = q; - k--; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Descending one level...\n")); - } - q = (void**)ip->link; - ip->link = p; - *p = (void*)q; - } - return p; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -void* -SOAP_FMAC2 -soap_id_forward(struct soap *soap, const char *href, void *p, int st, int tt, size_t n, unsigned int k, void (*fcopy)(struct soap*, int, int, void*, const void*, size_t)) -{ struct soap_ilist *ip; - if (!p || !href || !*href) - return p; - ip = soap_lookup(soap, href); /* lookup pointer to hash table entry for string id */ - if (!ip) - { ip = soap_enter(soap, href); /* new hash table entry for string id */ - ip->type = st; - ip->size = n; - ip->link = NULL; - ip->copy = NULL; - ip->ptr = NULL; - ip->level = 0; - ip->flist = NULL; - DBGLOG(TEST,SOAP_MESSAGE(fdebug, "New entry href='%s' type=%d size=%lu level=%d location=%p\n", href, st, (unsigned long)n, k, p)); - } - else if (ip->type != st || (ip->level == k && ip->size != n)) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Type incompatibility id='%s' expect type=%d size=%lu level=%u got type=%d size=%lu\n", href, ip->type, (unsigned long)ip->size, k, st, (unsigned long)n)); - strcpy(soap->id, href); - soap->error = SOAP_HREF; - return NULL; - } - if (fcopy || n < sizeof(void*) || *href != '#') - { register struct soap_flist *fp = (struct soap_flist*)SOAP_MALLOC(sizeof(struct soap_flist)); - if (!fp) - { soap->error = SOAP_EOM; - return NULL; - } - fp->next = ip->flist; - fp->type = tt; - fp->ptr = p; - fp->level = k; - if (fcopy) - fp->fcopy = fcopy; - else - fp->fcopy = soap_fcopy; - ip->flist = fp; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Forwarding type=%d (target type=%d) size=%lu location=%p level=%u href='%s'\n", st, tt, (unsigned long)n, p, k, href)); - } - else - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Forwarding copying address %p for type=%d href='%s'\n", p, st, href)); - *(void**)p = ip->copy; - ip->copy = p; - } - return p; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -void* -SOAP_FMAC2 -soap_id_enter(struct soap *soap, const char *id, void *p, int t, size_t n, unsigned int k, const char *type, const char *arrayType, void *(*finstantiate)(struct soap*, int, const char*, const char*, size_t*)) -{ struct soap_ilist *ip; - DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Enter id='%s' type=%d loc=%p size=%lu level=%u\n", id, t, p, (unsigned long)n, k)); - soap->alloced = 0; - if (!p) - { if (finstantiate) - p = finstantiate(soap, t, type, arrayType, &n); - else - p = soap_malloc(soap, n); - if (p) - soap->alloced = 1; - } - if (!id || !*id) - return p; - ip = soap_lookup(soap, id); /* lookup pointer to hash table entry for string id */ - DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Lookup entry id='%s for location=%p'\n", id, p)); - if (!ip) - { ip = soap_enter(soap, id); /* new hash table entry for string id */ - ip->type = t; - ip->link = NULL; - ip->copy = NULL; - ip->flist = NULL; - ip->size = n; - ip->ptr = p; - ip->level = k; - DBGLOG(TEST,SOAP_MESSAGE(fdebug, "New entry id='%s' type=%d size=%lu level=%u location=%p\n", id, t, (unsigned long)n, k, p)); - } - else if ((ip->type != t || (ip->level == k && ip->size != n)) && (ip->copy || ip->flist)) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Type incompatibility id='%s' expect type=%d size=%lu level=%u got type=%d size=%lu\n", id, ip->type, (unsigned long)ip->size, k, t, (unsigned long)n)); - strcpy(soap->id, id); - soap->error = SOAP_HREF; - return NULL; - } - else if (ip->ptr) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Multiply defined id='%s'\n", id)); - strcpy(soap->id, id); - soap->error = SOAP_MULTI_ID; - return NULL; - } - else - { ip->size = n; - ip->ptr = p; - ip->level = k; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Update entry id='%s' type=%d location=%p size=%lu level=%u\n", id, t, p, (unsigned long)n, k)); - } - return ip->ptr; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_fcopy(struct soap *soap, int st, int tt, void *p, const void *q, size_t n) -{ DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Copying data type=%d (target type=%d) %p -> %p (%lu bytes)\n", st, tt, q, p, (unsigned long)n)); - memcpy(p, q, n); -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_end_send(struct soap *soap) -{ -#ifndef WITH_LEANER - if (soap->dime.list) - { /* SOAP body referenced attachments must appear first */ - soap->dime.last->next = soap->dime.first; - soap->dime.first = soap->dime.list->next; - soap->dime.list->next = NULL; - soap->dime.last = soap->dime.list; - } - if (soap_putdime(soap) || soap_putmime(soap)) - return soap->error; - soap->mime.list = NULL; - soap->mime.first = NULL; - soap->mime.last = NULL; - soap->dime.list = NULL; - soap->dime.first = NULL; - soap->dime.last = NULL; -#endif - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "End send\n")); - if (soap->mode & SOAP_IO) /* need to flush the remaining data in buffer */ - { if (soap_flush(soap)) -#ifdef WITH_ZLIB - { if (soap->mode & SOAP_ENC_ZLIB && soap->zlib_state == SOAP_ZLIB_DEFLATE) - { soap->zlib_state = SOAP_ZLIB_NONE; - deflateEnd(&soap->d_stream); - } - return soap->error; - } -#else - return soap->error; -#endif -#ifdef WITH_ZLIB - if (soap->mode & SOAP_ENC_ZLIB) - { int r; - soap->d_stream.avail_in = 0; - do - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Deflating remainder\n")); - r = deflate(&soap->d_stream, Z_FINISH); - if (soap->d_stream.avail_out != SOAP_BUFLEN) - { if (soap_flush_raw(soap, soap->z_buf, SOAP_BUFLEN - soap->d_stream.avail_out)) - { soap->zlib_state = SOAP_ZLIB_NONE; - deflateEnd(&soap->d_stream); - return soap->error; - } - soap->d_stream.next_out = (Byte*)soap->z_buf; - soap->d_stream.avail_out = SOAP_BUFLEN; - } - } while (r == Z_OK); - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Deflated %lu->%lu bytes\n", soap->d_stream.total_in, soap->d_stream.total_out)); - soap->z_ratio_out = (float)soap->d_stream.total_out / (float)soap->d_stream.total_in; - soap->mode &= ~SOAP_ENC_ZLIB; - soap->zlib_state = SOAP_ZLIB_NONE; - if (deflateEnd(&soap->d_stream) != Z_OK || r != Z_STREAM_END) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Unable to end deflate: %s\n", soap->d_stream.msg?soap->d_stream.msg:"")); - return soap->error = SOAP_ZLIB_ERROR; - } -#ifdef WITH_GZIP - soap->z_buf[0] = soap->z_crc & 0xFF; - soap->z_buf[1] = (soap->z_crc >> 8) & 0xFF; - soap->z_buf[2] = (soap->z_crc >> 16) & 0xFF; - soap->z_buf[3] = (soap->z_crc >> 24) & 0xFF; - soap->z_buf[4] = soap->d_stream.total_in & 0xFF; - soap->z_buf[5] = (soap->d_stream.total_in >> 8) & 0xFF; - soap->z_buf[6] = (soap->d_stream.total_in >> 16) & 0xFF; - soap->z_buf[7] = (soap->d_stream.total_in >> 24) & 0xFF; - if (soap_flush_raw(soap, soap->z_buf, 8)) - return soap->error; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "gzip crc32=%lu\n", (unsigned long)soap->z_crc)); -#endif - } -#endif - if ((soap->mode & SOAP_IO) == SOAP_IO_STORE) - { char *p; - if (!(soap->mode & SOAP_ENC_XML)) - { soap->mode--; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Sending buffered message of length %u\n", (unsigned int)soap->blist->size)); - if (soap->status >= SOAP_POST) - soap->error = soap->fpost(soap, soap->endpoint, soap->host, soap->port, soap->path, soap->action, soap->blist->size); - else if (soap->status != SOAP_STOP) - soap->error = soap->fresponse(soap, soap->status, soap->blist->size); - if (soap->error || soap_flush(soap)) - return soap->error; - soap->mode++; - } - for (p = soap_first_block(soap); p; p = soap_next_block(soap)) - { DBGMSG(SENT, p, soap_block_size(soap)); - if ((soap->error = soap->fsend(soap, p, soap_block_size(soap)))) - { soap_end_block(soap); - return soap->error; - } - } - soap_end_block(soap); - } - else if ((soap->mode & SOAP_IO) == SOAP_IO_CHUNK) - { DBGMSG(SENT, "\r\n0\r\n\r\n", 7); - if ((soap->error = soap->fsend(soap, "\r\n0\r\n\r\n", 7))) - return soap->error; - } - } -#ifdef WITH_OPENSSL - if (!soap->ssl && soap_valid_socket(soap->socket) && !soap->keep_alive) - soap->fshutdownsocket(soap, (SOAP_SOCKET)soap->socket, 1); /* Send TCP FIN */ -#else - if (soap_valid_socket(soap->socket) && !soap->keep_alive) - soap->fshutdownsocket(soap, (SOAP_SOCKET)soap->socket, 1); /* Send TCP FIN */ -#endif - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "End of send message ok\n")); - soap->part = SOAP_END; - soap->count = 0; - return SOAP_OK; -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_end_recv(struct soap *soap) -{ soap->part = SOAP_END; -#ifndef WITH_LEANER - if ((soap->mode & SOAP_ENC_MIME) && soap_getmime(soap)) - return soap->error; - soap->mime.list = soap->mime.first; - soap->mime.first = NULL; - soap->mime.last = NULL; - soap->dime.list = soap->dime.first; - soap->dime.first = NULL; - soap->dime.last = NULL; -#endif - DBGLOG(TEST,SOAP_MESSAGE(fdebug, "End of receive message ok\n")); -#ifdef WITH_ZLIB - if (soap->mode & SOAP_ENC_ZLIB) - { soap->mode &= ~SOAP_ENC_ZLIB; - memcpy(soap->buf, soap->z_buf, SOAP_BUFLEN); - soap->bufidx = (char*)soap->d_stream.next_in - soap->z_buf; - soap->buflen = soap->z_buflen; - soap->zlib_state = SOAP_ZLIB_NONE; - if (inflateEnd(&soap->d_stream) != Z_OK) - return soap->error = SOAP_ZLIB_ERROR; -#ifdef WITH_GZIP - if (soap->zlib_in == SOAP_ZLIB_GZIP) - { soap_wchar c; - short i; - for (i = 0; i < 8; i++) - { if ((int)(c = soap_getchar(soap)) == EOF) - return soap->error = SOAP_EOF; - soap->z_buf[i] = (char)c; - } - if (soap->z_crc != ((uLong)(unsigned char)soap->z_buf[0] | ((uLong)(unsigned char)soap->z_buf[1] << 8) | ((uLong)(unsigned char)soap->z_buf[2] << 16) | ((uLong)(unsigned char)soap->z_buf[3] << 24))) - { DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Gzip error: crc check failed, message corrupted? (crc32=%lu)\n", (unsigned long)soap->z_crc)); - return soap->error = SOAP_ZLIB_ERROR; - } - if (soap->d_stream.total_out != ((uLong)(unsigned char)soap->z_buf[4] | ((uLong)(unsigned char)soap->z_buf[5] << 8) | ((uLong)(unsigned char)soap->z_buf[6] << 16) | ((uLong)(unsigned char)soap->z_buf[7] << 24))) - { DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Gzip error: incorrect message length\n")); - return soap->error = SOAP_ZLIB_ERROR; - } - } -#endif - } -#endif - if ((soap->mode & SOAP_IO) == SOAP_IO_CHUNK) - while ((int)soap_getchar(soap) != EOF) /* advance to last chunk */ - ; - if (soap->fdisconnect && (soap->error = soap->fdisconnect(soap))) - return soap->error; - return soap_resolve(soap); -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_free(struct soap *soap) -{ register struct soap_nlist *np; - register struct soap_attribute *tp; - register struct Namespace *ns; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Free namespace stack\n")); - while (soap->nlist) - { np = soap->nlist->next; - if (soap->nlist->ns) - SOAP_FREE(soap->nlist->ns); - SOAP_FREE(soap->nlist); - soap->nlist = np; - } - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Free any remaining temp blocks\n")); - while (soap->blist) - soap_end_block(soap); - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Free attributes\n")); - while (soap->attributes) - { tp = soap->attributes->next; - if (soap->attributes->value) - SOAP_FREE(soap->attributes->value); - SOAP_FREE(soap->attributes); - soap->attributes = tp; - } -#ifdef WITH_FAST - if (soap->labbuf) - SOAP_FREE(soap->labbuf); - soap->labbuf = NULL; - soap->lablen = 0; - soap->labidx = 0; -#endif - soap_free_pht(soap); - soap_free_iht(soap); - ns = soap->local_namespaces; - if (ns) - { for (; ns->id; ns++) - { if (ns->out) - { SOAP_FREE(ns->out); - if (soap->encodingStyle == ns->out) - soap->encodingStyle = SOAP_STR_EOS; - ns->out = NULL; - } - if (soap->encodingStyle == ns->ns) - soap->encodingStyle = SOAP_STR_EOS; - } - SOAP_FREE(soap->local_namespaces); - soap->local_namespaces = NULL; - } -} -#endif - -/******************************************************************************/ -#ifdef SOAP_DEBUG -static void -soap_init_logs(struct soap *soap) -{ int i; - for (i = 0; i < SOAP_MAXLOGS; i++) - { soap->logfile[i] = NULL; - soap->fdebug[i] = NULL; - } -} -#endif - -/******************************************************************************/ -#if !defined(WITH_LEAN) || defined(SOAP_DEBUG) -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_open_logfile(struct soap *soap, int i) -{ if (soap->logfile[i]) - soap->fdebug[i] = fopen(soap->logfile[i], i < 2 ? "ab" : "a"); -} -#endif - -/******************************************************************************/ -#ifdef SOAP_DEBUG -static void -soap_close_logfile(struct soap *soap, int i) -{ if (soap->fdebug[i]) - { fclose(soap->fdebug[i]); - soap->fdebug[i] = NULL; - } -} -#endif - -/******************************************************************************/ -#ifdef SOAP_DEBUG -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_close_logfiles(struct soap *soap) -{ int i; - for (i = 0; i < SOAP_MAXLOGS; i++) - soap_close_logfile(soap, i); -} -#endif - -/******************************************************************************/ -#ifdef SOAP_DEBUG -static void -soap_set_logfile(struct soap *soap, int i, const char *logfile) -{ char *s = NULL; - soap_close_logfile(soap, i); - if (soap->logfile[i]) - SOAP_FREE((void*)soap->logfile[i]); - if (logfile) - if ((s = (char*)SOAP_MALLOC(strlen(logfile) + 1))) - strcpy(s, logfile); - soap->logfile[i] = s; -} -#endif - -/******************************************************************************/ -#ifdef SOAP_DEBUG -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_set_recv_logfile(struct soap *soap, const char *logfile) -{ soap_set_logfile(soap, SOAP_INDEX_RECV, logfile); -} -#endif - -/******************************************************************************/ -#ifdef SOAP_DEBUG -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_set_sent_logfile(struct soap *soap, const char *logfile) -{ soap_set_logfile(soap, SOAP_INDEX_SENT, logfile); -} -#endif - -/******************************************************************************/ -#ifdef SOAP_DEBUG -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_set_test_logfile(struct soap *soap, const char *logfile) -{ soap_set_logfile(soap, SOAP_INDEX_TEST, logfile); -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -struct soap* -SOAP_FMAC2 -soap_copy(struct soap *soap) -{ return soap_copy_context((struct soap*)SOAP_MALLOC(sizeof(struct soap)), soap); -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -struct soap* -SOAP_FMAC2 -soap_copy_context(struct soap *copy, struct soap *soap) -{ if (copy) - { register struct soap_plugin *p; - memcpy(copy, soap, sizeof(struct soap)); - copy->copy = 1; - copy->user = NULL; - copy->userid = NULL; - copy->passwd = NULL; - copy->nlist = NULL; - copy->blist = NULL; - copy->clist = NULL; - copy->alist = NULL; - copy->attributes = NULL; - copy->local_namespaces = NULL; - soap_set_local_namespaces(copy); - soap_init_iht(copy); - soap_init_pht(copy); - copy->header = NULL; - copy->fault = NULL; - copy->action = NULL; - *copy->host = '\0'; -#ifndef WITH_LEAN -#ifdef WITH_COOKIES - copy->cookies = soap_copy_cookies(soap); -#else - copy->cookies = NULL; -#endif -#endif -#ifdef SOAP_DEBUG - soap_init_logs(copy); - soap_set_recv_logfile(copy, "RECV.log"); - soap_set_sent_logfile(copy, "SENT.log"); - soap_set_test_logfile(copy, "TEST.log"); -#endif - copy->plugins = NULL; - for (p = soap->plugins; p; p = p->next) - { register struct soap_plugin *q = (struct soap_plugin*)SOAP_MALLOC(sizeof(struct soap_plugin)); - if (!q) - return NULL; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copying plugin '%s'\n", p->id)); - *q = *p; - if (p->fcopy && (soap->error = p->fcopy(soap, q, p))) - { SOAP_FREE(q); - return NULL; - } - q->next = copy->plugins; - copy->plugins = q; - } - } - else - soap->error = SOAP_EOM; - return copy; -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_init(struct soap *soap) -{ soap->version = 0; - soap_imode(soap, SOAP_IO_DEFAULT); - soap_omode(soap, SOAP_IO_DEFAULT); - soap->copy = 0; - soap->plugins = NULL; - soap->user = NULL; - soap->userid = NULL; - soap->passwd = NULL; - soap->fpost = http_post; - soap->fget = http_get; - soap->fposthdr = http_post_header; - soap->fresponse = http_response; - soap->fparse = http_parse; - soap->fparsehdr = http_parse_header; - soap->fconnect = NULL; - soap->fdisconnect = NULL; -#ifndef MAC_CARBON -#ifndef WITH_IPV6 - soap->fresolve = tcp_gethost; -#else - soap->fresolve = NULL; -#endif - soap->faccept = tcp_accept; - soap->fopen = tcp_connect; - soap->fclose = tcp_disconnect; - soap->fclosesocket = tcp_closesocket; - soap->fshutdownsocket = tcp_shutdownsocket; - soap->fsend = fsend; - soap->frecv = frecv; - soap->fpoll = soap_poll; -#else - soap->fpoll = NULL; -#endif - soap->fprepareinit = NULL; - soap->fpreparesend = NULL; - soap->fpreparerecv = NULL; - soap->fignore = NULL; - soap->fserveloop = NULL; - soap->fplugin = fplugin; - soap->fdimereadopen = NULL; - soap->fdimewriteopen = NULL; - soap->fdimereadclose = NULL; - soap->fdimewriteclose = NULL; - soap->fdimeread = NULL; - soap->fdimewrite = NULL; - soap->float_format = "%.8g"; /* .8 preserves single FP precision as much as possible, but might not be very efficient */ - soap->double_format = "%.17lg"; /* .17 preserves double FP precision as much as possible, but might not be very efficient */ - soap->dime_id_format = "cid:id%d"; /* default DIME id format */ - soap->http_version = "1.1"; - soap->actor = NULL; - soap->max_keep_alive = SOAP_MAXKEEPALIVE; - soap->keep_alive = 0; - soap->recv_timeout = 0; - soap->send_timeout = 0; - soap->connect_timeout = 0; - soap->accept_timeout = 0; - soap->socket_flags = 0; - soap->connect_flags = 0; - soap->bind_flags = 0; - soap->accept_flags = 0; - soap->ip = 0; - soap->labbuf = NULL; - soap->lablen = 0; - soap->labidx = 0; - soap->encodingStyle = SOAP_STR_EOS; -#ifndef WITH_NONAMESPACES - soap->namespaces = namespaces; -#else - soap->namespaces = NULL; -#endif - soap->local_namespaces = NULL; - soap->nlist = NULL; - soap->blist = NULL; - soap->clist = NULL; - soap->alist = NULL; - soap->attributes = NULL; - soap->header = NULL; - soap->fault = NULL; - soap->master = SOAP_INVALID_SOCKET; - soap->socket = SOAP_INVALID_SOCKET; - soap->os = NULL; - soap->is = NULL; - soap->dom = NULL; - soap->dime.list = NULL; - soap->dime.first = NULL; - soap->dime.last = NULL; - soap->mime.list = NULL; - soap->mime.first = NULL; - soap->mime.last = NULL; - soap->mime.boundary = NULL; - soap->mime.start = NULL; -#ifndef UNDER_CE - soap->recvfd = 0; - soap->sendfd = 1; -#else - soap->recvfd = stdin; - soap->sendfd = stdout; -#endif - soap->host[0] = '\0'; - soap->port = 0; - soap->action = NULL; - soap->proxy_host = NULL; - soap->proxy_port = 8080; - soap->proxy_userid = NULL; - soap->proxy_passwd = NULL; - soap->authrealm = NULL; - soap->prolog = NULL; -#ifdef WITH_OPENSSL - soap->fsslauth = ssl_auth_init; - soap->fsslverify = ssl_verify_callback; - soap->bio = NULL; - soap->ssl = NULL; - soap->ctx = NULL; - soap->require_server_auth = 0; - soap->require_client_auth = 0; - soap->rsa = 0; - soap->keyfile = NULL; - soap->password = NULL; - soap->dhfile = NULL; - soap->cafile = NULL; - soap->capath = NULL; - soap->randfile = NULL; - soap->session = NULL; -#endif -#ifdef WITH_ZLIB - soap->zlib_state = SOAP_ZLIB_NONE; - soap->zlib_in = SOAP_ZLIB_NONE; - soap->zlib_out = SOAP_ZLIB_NONE; - soap->d_stream.zalloc = NULL; - soap->d_stream.zfree = NULL; - soap->d_stream.opaque = NULL; - soap->z_level = 6; -#endif -#ifndef WITH_LEAN - soap->cookies = NULL; - soap->cookie_domain = NULL; - soap->cookie_path = NULL; - soap->cookie_max = 32; -#endif -#ifdef SOAP_DEBUG - soap_init_logs(soap); - soap_set_recv_logfile(soap, "RECV.log"); - soap_set_sent_logfile(soap, "SENT.log"); - soap_set_test_logfile(soap, NULL); -#endif -/* WR[ */ -#ifdef WMW_RPM_IO - soap->rpmreqid = NULL; -#endif /* WMW_RPM_IO */ -/* ]WR */ -#ifdef PALM - palmNetLibOpen(); -#endif - soap_init_iht(soap); - soap_init_pht(soap); - soap_begin(soap); -#ifdef SOAP_DEBUG - soap_set_test_logfile(soap, "TEST.log"); -#endif -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_init1(struct soap *soap, int mode) -{ soap_init2(soap, mode, mode); -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_init2(struct soap *soap, int imode, int omode) -{ soap_init(soap); - soap_imode(soap, imode); - soap_omode(soap, omode); -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_begin(struct soap *soap) -{ DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Initializing\n")); - if (!soap->keep_alive) - { soap->buflen = 0; - soap->bufidx = 0; - } - soap->keep_alive = (((soap->imode | soap->omode) & SOAP_IO_KEEPALIVE) != 0); - soap->null = 0; - soap->position = 0; - soap->encoding = 0; - soap->mustUnderstand = 0; - soap->mode = 0; - soap->ns = 0; - soap->part = SOAP_BEGIN; - soap->alloced = 0; - soap->count = 0; - soap->length = 0; - soap->cdata = 0; - soap->error = SOAP_OK; - soap->peeked = 0; - soap->ahead = 0; - soap->idnum = 0; - soap->level = 0; - soap->endpoint[0] = '\0'; - soap->dime.chunksize = 0; - soap->dime.buflen = 0; - soap_free(soap); -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_end(struct soap *soap) -{ register struct soap_clist *cp; - soap_free(soap); - soap_dealloc(soap, NULL); - while (soap->clist) - { cp = soap->clist->next; - SOAP_FREE(soap->clist); - soap->clist = cp; - } - soap_closesock(soap); -#ifdef SOAP_DEBUG - soap_close_logfiles(soap); -#endif -#ifdef PALM - palmNetLibClose(); -#endif -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_set_namespaces(struct soap *soap, struct Namespace *p) -{ struct Namespace *ns = soap->local_namespaces; - struct soap_nlist *np, *nq, *nr; - unsigned int level = soap->level; - soap->namespaces = p; - soap->local_namespaces = NULL; - soap_set_local_namespaces(soap); - /* reverse the list */ - np = soap->nlist; - soap->nlist = NULL; - if (np) - { nq = np->next; - np->next = NULL; - while (nq) - { nr = nq->next; - nq->next = np; - np = nq; - nq = nr; - } - } - while (np) - { soap->level = np->level; /* preserve element nesting level */ - if (np->ns) - { if (soap_push_namespace(soap, np->id, np->ns)) - return soap->error; - } - else if (np->index >= 0 && ns) - { if (ns[np->index].out) - { if (soap_push_namespace(soap, np->id, ns[np->index].out)) - return soap->error; - } - else if (soap_push_namespace(soap, np->id, ns[np->index].ns)) - return soap->error; - } - if (np->ns) - SOAP_FREE(np->ns); - nq = np; - np = np->next; - SOAP_FREE(nq); - } - if (ns) - { int i; - for (i = 0; ns[i].id; i++) - { if (ns[i].out) - { SOAP_FREE(ns[i].out); - ns[i].out = NULL; - } - } - SOAP_FREE(ns); - } - soap->level = level; /* restore level */ - return SOAP_OK; -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -static void -soap_set_local_namespaces(struct soap *soap) -{ if (soap->namespaces && !soap->local_namespaces) - { register const struct Namespace *ns1; - register struct Namespace *ns2; - register size_t n = 1; - for (ns1 = soap->namespaces; ns1->id; ns1++) - n++; - if (n > 3) - { n *= sizeof(struct Namespace); - ns2 = (struct Namespace*)SOAP_MALLOC(n); - if (ns2) - { memcpy(ns2, soap->namespaces, n); - ns2[0].id = "SOAP-ENV"; - ns2[1].id = "SOAP-ENC"; - ns2[2].id = "xsi"; - if (ns2[0].ns) - { if (!strcmp(ns2[0].ns, soap_env1)) - soap->version = 1; - else - soap->version = 2; - } - soap->local_namespaces = ns2; - } - } - } -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_element(struct soap *soap, const char *tag, int id, const char *type) -{ struct Namespace *ns = soap->local_namespaces; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Element begin tag='%s' id='%d' type='%s'\n", tag, id, type?type:"")); -/**/ -#ifdef WITH_DOM - if (soap->mode & SOAP_XML_DOM) - { register struct soap_dom_element *p, *e = (struct soap_dom_element*)soap_malloc(soap, sizeof(struct soap_dom_element)); - e->next = NULL; - e->prnt = soap->dom; - e->nstr = NULL; - e->name = soap_strdup(soap, tag); /* check EOM? */ - e->data = NULL; - e->type = 0; - e->node = NULL; - e->elts = NULL; - e->atts = NULL; - if (soap->dom) - { p = soap->dom->elts; - if (p) - { while (p->next) - p = p->next; - p->next = e; - } - else - soap->dom->elts = e; - } - soap->dom = e; - } - else -#endif -{ - soap->level++; - if (!soap->ns && !(soap->mode & SOAP_XML_CANONICAL)) - if (soap_send(soap, soap->prolog ? soap->prolog : "")) - return soap->error; - if (soap_send_raw(soap, "<", 1) - || soap_send(soap, tag)) - return soap->error; -} -/**/ - if (!soap->ns) - { for (ns = soap->local_namespaces; ns && ns->id; ns++) - { if (*ns->id && (ns->out || ns->ns)) - { sprintf(soap->tmpbuf, "xmlns:%s", ns->id); - if (soap_attribute(soap, soap->tmpbuf, ns->out ? ns->out : ns->ns)) - return soap->error; - } - } - soap->ns = 1; - } - if (id > 0) - { sprintf(soap->tmpbuf, "_%d", id); - if (soap_attribute(soap, "id", soap->tmpbuf)) - return soap->error; - } - if (type && *type) - { if (soap_attribute(soap, "xsi:type", type)) - return soap->error; - } - if (soap->null && soap->position > 0) - { int i; - sprintf(soap->tmpbuf, "[%d", soap->positions[0]); - for (i = 1; i < soap->position; i++) - sprintf(soap->tmpbuf + strlen(soap->tmpbuf), ",%d", soap->positions[i]); - strcat(soap->tmpbuf, "]"); - if (soap_attribute(soap, "SOAP-ENC:position", soap->tmpbuf)) - return soap->error; - } - if (soap->mustUnderstand) - { if (soap->actor && *soap->actor) - { if (soap_attribute(soap, soap->version == 2 ? "SOAP-ENV:role" : "SOAP-ENV:actor", soap->actor)) - return soap->error; - } - if (soap_attribute(soap, "SOAP-ENV:mustUnderstand", soap->version == 2 ? "true" : "1")) - return soap->error; - soap->mustUnderstand = 0; - } - if (soap->encoding) - { if (soap->encodingStyle && soap->local_namespaces) - { if (!*soap->encodingStyle) - { if (soap->local_namespaces[1].out) - soap->encodingStyle = soap->local_namespaces[1].out; - else - soap->encodingStyle = soap->local_namespaces[1].ns; - } - if (soap_attribute(soap, "SOAP-ENV:encodingStyle", soap->encodingStyle)) - return soap->error; - } - soap->encoding = 0; - } - soap->null = 0; - soap->position = 0; - return SOAP_OK; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_element_begin_out(struct soap *soap, const char *tag, int id, const char *type) -{ if (*tag == '-') - return SOAP_OK; - if (soap_element(soap, tag, id, type)) - return soap->error; - return soap_element_start_end_out(soap, NULL); -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -#ifndef HAVE_STRRCHR -SOAP_FMAC1 -char* -SOAP_FMAC2 -soap_strrchr(const char *s, int t) -{ register char *r = NULL; - while (*s) - if (*s++ == t) - r = (char*)s - 1; - return r; -} -#endif -#endif - -/******************************************************************************/ -#ifndef PALM_2 -#ifndef HAVE_STRTOL -SOAP_FMAC1 -long -SOAP_FMAC2 -soap_strtol(const char *s, char **t, int b) -{ register long n = 0; - register int c; - while (*s > 0 && *s <= 32) - s++; - if (b == 10) - { short neg = 0; - if (*s == '-') - { s++; - neg = 1; - } - else if (*s == '+') - s++; - while ((c = *s) && c >= '0' && c <= '9') - { if (n > 214748364) - break; - n *= 10; - n += c - '0'; - s++; - } - if (neg) - n = -n; - } - else /* b == 16 and value is always positive */ - { while ((c = *s)) - { if (c >= '0' && c <= '9') - c -= '0'; - else if (c >= 'A' && c <= 'F') - c -= 'A' - 10; - else if (c >= 'a' && c <= 'f') - c -= 'a' - 10; - if (n > 0x07FFFFFF) - break; - n <<= 4; - n += c; - s++; - } - } - if (t) - *t = (char*)s; - return n; -} -#endif -#endif - -/******************************************************************************/ -#ifndef PALM_2 -#ifndef HAVE_STRTOUL -SOAP_FMAC1 -unsigned long -SOAP_FMAC2 -soap_strtoul(const char *s, char **t, int b) -{ unsigned long n = 0; - register int c; - while (*s > 0 && *s <= 32) - s++; - if (b == 10) - { if (*s == '+') - s++; - while ((c = *s) && c >= '0' && c <= '9') - { if (n > 429496729) - break; - n *= 10; - n += c - '0'; - s++; - } - } - else /* b == 16 */ - { while ((c = *s)) - { if (c >= '0' && c <= '9') - c -= '0'; - else if (c >= 'A' && c <= 'F') - c -= 'A' - 10; - else if (c >= 'a' && c <= 'f') - c -= 'a' - 10; - if (n > 0x0FFFFFFF) - break; - n <<= 4; - n += c; - s++; - } - } - if (t) - *t = (char*)s; - return n; -} -#endif -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_array_begin_out(struct soap *soap, const char *tag, int id, const char *type, const char *offset) -{ if (soap_element(soap, tag, id, "SOAP-ENC:Array")) - return soap->error; - if (soap->version == 2) - { const char *s; - s = soap_strrchr(type, '['); - if ((size_t)(s - type) < sizeof(soap->tmpbuf)) - { strncpy(soap->tmpbuf, type, s - type); - soap->tmpbuf[s - type] = '\0'; - if (type && *type && (soap_attribute(soap, "SOAP-ENC:itemType", soap->tmpbuf))) - return soap->error; - if (s && (soap_attribute(soap, "SOAP-ENC:arraySize", s + 1))) - return soap->error; - } - } - else - { if (offset && (soap_attribute(soap, "SOAP-ENC:offset", offset))) - return soap->error; - if (type && *type && (soap_attribute(soap, "SOAP-ENC:arrayType", type))) - return soap->error; - } - return soap_element_start_end_out(soap, NULL); -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_element_start_end_out(struct soap *soap, const char *tag) -{ register struct soap_attribute *tp; -/**/ -#ifdef WITH_DOM - if ((soap->mode & SOAP_XML_DOM) && soap->dom) - { for (tp = soap->attributes; tp; tp = tp->next) - { if (tp->visible) - { register struct soap_dom_attribute *a = (struct soap_dom_attribute*)soap_malloc(soap, sizeof(struct soap_dom_attribute)); - a->next = soap->dom->atts; - a->nstr = NULL; - a->name = soap_strdup(soap, tp->name); /* check EOM */ - a->data = soap_strdup(soap, tp->value); /* check EOM */ - a->wide = NULL; - soap->dom->atts = a; - tp->visible = 0; - } - } - return SOAP_OK; - } -#endif -/**/ - for (tp = soap->attributes; tp; tp = tp->next) - { if (tp->visible) - { if (soap_send2(soap, " ", tp->name)) - return soap->error; - if (tp->visible == 2 && tp->value) - if (soap_send_raw(soap, "=\"", 2) - || soap_string_out(soap, tp->value, 1) - || soap_send_raw(soap, "\"", 1)) - return soap->error; - tp->visible = 0; - } - } - if (tag) - { soap->level--; -#ifndef WITH_LEAN - if (soap->mode & SOAP_XML_CANONICAL) - { if (soap_send_raw(soap, ">", 1) - || soap_element_end_out(soap, tag)) - return soap->error; - return SOAP_OK; - } -#endif - return soap_send_raw(soap, "/>", 2); - } - return soap_send_raw(soap, ">", 1); -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_element_end_out(struct soap *soap, const char *tag) -{ if (*tag == '-') - return SOAP_OK; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Element ending tag='%s'\n", tag)); -/**/ -#ifdef WITH_DOM - if ((soap->mode & SOAP_XML_DOM) && soap->dom) - { if (soap->dom->prnt) - soap->dom = soap->dom->prnt; - return SOAP_OK; - } -#endif -/**/ - soap->level--; - if (soap_send_raw(soap, "error; - return soap_send_raw(soap, ">", 1); -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_element_ref(struct soap *soap, const char *tag, int id, int href) -{ register int n = 0; - if (soap->version == 2) - n = 1; - sprintf(soap->href, "#_%d", href); - return soap_element_href(soap, tag, id, "href" + n, soap->href + n); -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_element_href(struct soap *soap, const char *tag, int id, const char *ref, const char *val) -{ DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Element '%s' reference %s='%s'\n", tag, ref, val)); - if (soap_element(soap, tag, id, NULL) - || soap_attribute(soap, ref, val) - || soap_element_start_end_out(soap, tag)) - return soap->error; - return SOAP_OK; -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_element_null(struct soap *soap, const char *tag, int id, const char *type) -{ struct soap_attribute *tp; - for (tp = soap->attributes; tp; tp = tp->next) - if (tp->visible) - break; - if (tp || (soap->version == 2 && soap->position > 0) || id > 0 || (soap->mode & SOAP_XML_NIL)) - { if (soap_element(soap, tag, id, type)) - return soap->error; - if (soap->part != SOAP_IN_HEADER && soap->encodingStyle) - if (soap_attribute(soap, "xsi:nil", "true")) - return soap->error; - return soap_element_start_end_out(soap, tag); - } - soap->null = 1; - soap->position = 0; - soap->mustUnderstand = 0; - return SOAP_OK; -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_element_id(struct soap *soap, const char *tag, int id, const void *p, const struct soap_array *a, int n, const char *type, int t) -{ struct soap_plist *pp; - if (!p || (a && !a->__ptr)) - { soap_element_null(soap, tag, id, type); - return -1; - } - if (soap->mode & SOAP_XML_TREE) - return 0; - if (id < 0) - { if (a) - id = soap_array_pointer_lookup(soap, p, a, n, t, &pp); - else - id = soap_pointer_lookup(soap, p, t, &pp); - if (id) - { if (soap_is_embedded(soap, pp)) - { soap_element_ref(soap, tag, 0, id); - return -1; - } - if (soap_is_single(soap, pp)) - return 0; - soap_set_embedded(soap, pp); - } - } - return id; -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_element_result(struct soap *soap, const char *tag) -{ if (soap->version == 2 && soap->encodingStyle) - if (soap_element(soap, "SOAP-RPC:result", 0, NULL) - || soap_attribute(soap, "xmlns:SOAP-RPC", soap_rpc) - || soap_element_start_end_out(soap, NULL) - || soap_string_out(soap, tag, 0) - || soap_element_end_out(soap, "SOAP-RPC:result")) - return soap->error; - return SOAP_OK; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_attribute(struct soap *soap, const char *name, const char *value) -{ -/**/ -#ifdef WITH_DOM - if ((soap->mode & SOAP_XML_DOM) && soap->dom) - { register struct soap_dom_attribute *a = (struct soap_dom_attribute*)soap_malloc(soap, sizeof(struct soap_dom_attribute)); - a->next = soap->dom->atts; - a->nstr = NULL; - a->name = soap_strdup(soap, name); /* check EOM */ - a->data = soap_strdup(soap, value); /* check EOM */ - a->wide = NULL; - soap->dom->atts = a; - return SOAP_OK; - } -#endif -/**/ -#ifndef WITH_LEAN - if (soap->mode & SOAP_XML_CANONICAL) - { if (soap_set_attr(soap, name, value)) - return soap->error; - } - else -#endif - { if (soap_send2(soap, " ", name)) - return soap->error; - if (value) - if (soap_send_raw(soap, "=\"", 2) - || soap_string_out(soap, value, 1) - || soap_send_raw(soap, "\"", 1)) - return soap->error; - } - return SOAP_OK; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_element_begin_in(struct soap *soap, const char *tag, int nillable) -{ if (!soap_peek_element(soap)) - { if (soap->other) - return soap->error = SOAP_TAG_MISMATCH; - if (tag && *tag == '-') - return SOAP_OK; - if (!(soap->error = soap_match_tag(soap, soap->tag, tag))) - { soap->peeked = 0; - if (soap->body) - soap->level++; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Begin element found (level=%u) '%s'='%s'\n", soap->level, soap->tag, tag?tag:"" )); - if (!nillable && soap->null && (soap->mode & SOAP_XML_STRICT)) - return soap->error = SOAP_NULL; - } - } - return soap->error; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_element_end_in(struct soap *soap, const char *tag) -{ register soap_wchar c; - register char *s; - register const char *t; - if (tag && *tag == '-') - return SOAP_OK; - soap->level--; - soap_pop_namespace(soap); - if (soap->peeked) - { if (*soap->tag == '\0') - { soap->peeked = 0; - if (soap->error == SOAP_NO_TAG || soap->error == SOAP_TAG_END) - soap->error = SOAP_OK; - } - else - return soap->error = SOAP_TAG_END; - } - else - { while (((c = soap_get(soap)) != SOAP_TT)) - { if ((int)c == EOF) - return soap->error = SOAP_EOF; - if (c == SOAP_LT) - return soap->error = SOAP_TAG_END; - } - } - s = soap->tag; - do c = soap_get(soap); - while (soap_blank(c)); - do - { *s++ = (char)c; - c = soap_get(soap); - } while (soap_notblank(c)); - *s = '\0'; - if ((int)c == EOF) - return soap->error = SOAP_EOF; - while (soap_blank(c)) - c = soap_get(soap); - if (c != SOAP_GT) - return soap->error = SOAP_SYNTAX_ERROR; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "End element found (level=%u) '%s'='%s'\n", soap->level, soap->tag, tag?tag:"")); - if (!tag) - return SOAP_OK; - if ((s = strchr(soap->tag, ':'))) - s++; - else - s = soap->tag; - if ((t = strchr(tag, ':'))) - t++; - else - t = tag; - if (!SOAP_STRCMP(s, t)) - return SOAP_OK; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "End element tag name does not match\n")); - return soap->error = SOAP_SYNTAX_ERROR; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -const char * -SOAP_FMAC2 -soap_attr_value(struct soap *soap, const char *name, int flag) -{ register struct soap_attribute *tp; - for (tp = soap->attributes; tp; tp = tp->next) - if (!soap_match_tag(soap, tp->name, name)) - break; - if (tp && tp->visible == 2) - { if (flag == 2 && (soap->mode & SOAP_XML_STRICT)) - soap->error = SOAP_PROHIBITED; - else - return tp->value; - } - else if (flag == 1 && (soap->mode & SOAP_XML_STRICT)) - soap->error = SOAP_REQUIRED; - return NULL; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_set_attr(struct soap *soap, const char *name, const char *value) -{ register struct soap_attribute *tp; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Set attribute %s='%s'\n", name, value?value:"")); - for (tp = soap->attributes; tp; tp = tp->next) - if (!strcmp(tp->name, name)) - break; - if (!tp) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Allocate attribute %s\n", name)); - if (!(tp = (struct soap_attribute*)SOAP_MALLOC(sizeof(struct soap_attribute) + strlen(name)))) - return soap->error = SOAP_EOM; - tp->ns = NULL; -#ifndef WITH_LEAN - if (soap->mode & SOAP_XML_CANONICAL) - { struct soap_attribute **tpp = &soap->attributes; - const char *s = strchr(name, ':'); - if (!strncmp(name, "xmlns", 5)) - { for (; *tpp; tpp = &(*tpp)->next) - if (strncmp((*tpp)->name, "xmlns", 5) || strcmp((*tpp)->name + 5, name + 5) > 0) - break; - } - else if (!s) - { for (; *tpp; tpp = &(*tpp)->next) - if (strncmp((*tpp)->name, "xmlns", 5) && ((*tpp)->ns || strcmp((*tpp)->name, name) > 0)) - break; - } - else - { int k; - for (; *tpp; tpp = &(*tpp)->next) - { if (!strncmp((*tpp)->name, "xmlns:", 6) && !strncmp((*tpp)->name + 6, name, s - name) && !(*tpp)->name[6 + s - name]) - { if (!tp->ns) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Canonicalization: prefix %s=%p(%s)\n", name, (*tpp)->ns, (*tpp)->ns)); - tp->ns = (*tpp)->ns; - } - } - else if (strncmp((*tpp)->name, "xmlns", 5) && (*tpp)->ns && tp->ns && ((k = strcmp((*tpp)->ns, tp->ns)) > 0 || (!k && strcmp((*tpp)->name, name) > 0))) - break; - } - } - tp->next = *tpp; - *tpp = tp; - } - else -#endif - { tp->next = soap->attributes; - soap->attributes = tp; - } - strcpy(tp->name, name); - tp->value = NULL; - } - else if (value && tp->value && tp->size <= strlen(value)) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Free attribute value of %s (free %p)\n", name, tp->value)); - SOAP_FREE(tp->value); - tp->value = NULL; - tp->ns = NULL; - } - if (value) - { if (!tp->value) - { tp->size = strlen(value) + 1; - if (!(tp->value = (char*)SOAP_MALLOC(tp->size))) - return soap->error = SOAP_EOM; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Allocate attribute value of %s (%p)\n", tp->name, tp->value)); - } - strcpy(tp->value, value); - if (!strncmp(tp->name, "xmlns:", 6)) - tp->ns = tp->value; - tp->visible = 2; - } - else - tp->visible = 1; - return SOAP_OK; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_clr_attr(struct soap *soap) -{ register struct soap_attribute *tp; -#ifndef WITH_LEAN - if (soap->mode & SOAP_XML_CANONICAL) - { while (soap->attributes) - { tp = soap->attributes->next; - SOAP_FREE(soap->attributes->value); - SOAP_FREE(soap->attributes); - soap->attributes = tp; - } - } - else -#endif - { for (tp = soap->attributes; tp; tp = tp->next) - tp->visible = 0; - } -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -static int -soap_getattrval(struct soap *soap, char *s, size_t n, soap_wchar d) -{ size_t i; - soap_wchar c; - for (i = 0; i < n; i++) - { c = soap_getutf8(soap); - switch (c) - { - case SOAP_TT: - *s++ = '<'; - soap_unget(soap, '/'); - break; - case SOAP_LT: - *s++ = '<'; - break; - case SOAP_GT: - if (d == ' ') - { soap_unget(soap, c); - *s = '\0'; - return SOAP_OK; - } - *s++ = '>'; - break; - case SOAP_QT: - if (c == d) - { *s = '\0'; - return SOAP_OK; - } - *s++ = '"'; - break; - case SOAP_AP: - if (c == d) - { *s = '\0'; - return SOAP_OK; - } - *s++ = '\''; - break; - case '\t': - case '\n': - case '\r': - case ' ': - case '/': - if (d == ' ') - { soap_unget(soap, c); - *s = '\0'; - return SOAP_OK; - } - default: - if ((int)c == EOF) - return soap->error = SOAP_EOF; - *s++ = (char)c; - } - } - return soap->error = SOAP_EOM; -} -#endif - -/******************************************************************************/ -#ifdef WITH_FAST -#ifndef PALM_2 -static int -soap_append_lab(struct soap *soap, const char *s, size_t n) -{ if (soap->labidx + n >= soap->lablen) - { register char *t = soap->labbuf; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Enlarging look-aside buffer to append data, old size=%lu", (unsigned long)soap->lablen)); - if (soap->lablen == 0) - soap->lablen = SOAP_LABLEN; - while (soap->labidx + n >= soap->lablen) - soap->lablen <<= 1; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, ", new size=%lu\n", (unsigned long)soap->lablen)); - soap->labbuf = (char*)SOAP_MALLOC(soap->lablen); - if (!soap->labbuf) - { if (t) - free(t); - return soap->error = SOAP_EOM; - } - if (t && soap->labidx) - { memcpy(soap->labbuf, t, soap->labidx); - free(t); - } - } - if (s) - { memcpy(soap->labbuf + soap->labidx, s, n); - soap->labidx += n; - } - return SOAP_OK; -} -#endif -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_peek_element(struct soap *soap) -{ register struct soap_attribute *tp; - const char *t; - register char *s; - register soap_wchar c; - register int i; - if (soap->error == SOAP_NO_TAG || soap->error == SOAP_TAG_END || soap->error == SOAP_TAG_MISMATCH) - soap->error = SOAP_OK; /* retry */ - if (soap->peeked) - { if (*soap->tag == '\0') - return soap->error = SOAP_NO_TAG; - return SOAP_OK; - } - soap->peeked = 1; - for (;;) - { while (((c = soap_getutf8(soap)) != SOAP_LT) && c != SOAP_TT) - { if ((int)c == EOF) - return soap->error = SOAP_EOF; - } - if (c == SOAP_TT) - { *soap->tag = '\0'; - return soap->error = SOAP_NO_TAG; /* ending tag found */ - } - s = soap->tag; - do c = soap_get(soap); - while (soap_blank(c)); - i = sizeof(soap->tag); - while (c != '/' && soap_notblank(c)) - { if (--i > 0) - *s++ = (char)c; - c = soap_get(soap); - } - while (soap_blank(c)) - c = soap_get(soap); - *s = '\0'; - if (*soap->tag != '?') - break; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "XML PI <%s?>\n", soap->tag)); - while ((int)c != EOF && c != SOAP_GT && c != '?') - { s = soap->tmpbuf; - i = sizeof(soap->tmpbuf) - 2; - while (c != '=' && c != SOAP_GT && c != '?' && soap_notblank(c)) - { if (--i > 0) - *s++ = (char)c; - c = soap_get(soap); - } - while (soap_blank(c)) - c = soap_get(soap); - if (c == '=') - { *s++ = '='; - do c = soap_get(soap); - while (soap_blank(c)); - if (c != SOAP_QT && c != SOAP_AP) - { soap_unget(soap, c); - c = ' '; /* blank delimiter */ - } - if (soap_getattrval(soap, s, i, c) == SOAP_EOM) - while (soap_getattrval(soap, soap->tmpbuf, sizeof(soap->tmpbuf), c) == SOAP_EOM) - ; - else if (!strcmp(soap->tag, "?xml") && (!soap_tag_cmp(soap->tmpbuf, "encoding=iso-8859-1") || !soap_tag_cmp(soap->tmpbuf, "encoding=latin1"))) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "XML latin1 encoding\n")); - soap->mode |= SOAP_ENC_LATIN; - } - } - do c = soap_get(soap); - while (soap_blank(c)); - } - } - soap->id[0] = '\0'; - soap->href[0] = '\0'; - soap->type[0] = '\0'; - soap->arrayType[0] = '\0'; - soap->arraySize[0] = '\0'; - soap->arrayOffset[0] = '\0'; - soap->other = 0; - soap->root = -1; - soap->position = 0; - soap->null = 0; - soap->mustUnderstand = 0; - soap_clr_attr(soap); - while ((int)c != EOF && c != SOAP_GT && c != '/') - { s = soap->tmpbuf; - i = sizeof(soap->tmpbuf); - while (c != '=' && c != '/' && soap_notblank(c)) - { if (--i > 0) - *s++ = (char)c; - c = soap_get(soap); - } - *s = '\0'; - if (i == sizeof(soap->tmpbuf)) - return soap->error = SOAP_SYNTAX_ERROR; - if (!strncmp(soap->tmpbuf, "xmlns:", 6)) - { soap->tmpbuf[5] = '\0'; - t = soap->tmpbuf + 6; - } - else if (!strcmp(soap->tmpbuf, "xmlns")) - t = SOAP_STR_EOS; - else - t = NULL; - for (tp = soap->attributes; tp; tp = tp->next) - if (!SOAP_STRCMP(tp->name, soap->tmpbuf)) - break; - if (!tp) - { tp = (struct soap_attribute*)SOAP_MALLOC(sizeof(struct soap_attribute) + strlen(soap->tmpbuf)); - if (!tp) - return soap->error = SOAP_EOM; - strcpy(tp->name, soap->tmpbuf); - tp->value = NULL; - tp->size = 0; - tp->next = soap->attributes; - soap->attributes = tp; - } - while (soap_blank(c)) - c = soap_get(soap); - if (c == '=') - { do c = soap_get(soap); - while (soap_blank(c)); - if (c != SOAP_QT && c != SOAP_AP) - { soap_unget(soap, c); - c = ' '; /* blank delimiter */ - } - if (soap_getattrval(soap, tp->value, tp->size, c)) - { -#ifdef WITH_FAST - if (soap->error != SOAP_EOM) - return soap->error; - soap->error = SOAP_OK; - soap->labidx = 0; - if (soap_append_lab(soap, tp->value, tp->size)) - return soap->error; - SOAP_FREE(tp->value); - for (;;) - { if (soap_getattrval(soap, soap->labbuf + soap->labidx, soap->lablen - soap->labidx, c)) - { if (soap->error != SOAP_EOM) - return soap->error; - soap->error = SOAP_OK; - soap->labidx = soap->lablen; - if (soap_append_lab(soap, NULL, 0)) - return soap->error; - } - else - break; - } - tp->size = soap->lablen; - if (!(tp->value = (char*)SOAP_MALLOC(tp->size))) - return soap->error = SOAP_EOM; - memcpy(tp->value, soap->labbuf, soap->lablen); -#else - size_t n; - if (soap->error != SOAP_EOM) - return soap->error; - soap->error = SOAP_OK; - if (soap_new_block(soap)) - return soap->error; - for (;;) - { if (!(s = (char*)soap_push_block(soap, SOAP_BLKLEN))) - return soap->error; - if (soap_getattrval(soap, s, SOAP_BLKLEN, c)) - { if (soap->error != SOAP_EOM) - return soap->error; - soap->error = SOAP_OK; - } - else - break; - } - n = tp->size + soap->blist->size; - if (!(s = (char*)SOAP_MALLOC(n))) - return soap->error = SOAP_EOM; - if (tp->value) - { memcpy(s, tp->value, tp->size); - SOAP_FREE(tp->value); - } - soap_save_block(soap, s + tp->size, 0); - tp->value = s; - tp->size = n; -#endif - } - do c = soap_get(soap); - while (soap_blank(c)); - tp->visible = 2; /* seen this attribute w/ value */ - } - else - tp->visible = 1; /* seen this attribute w/o value */ - if (t && tp->value) - { if (soap_push_namespace(soap, t, tp->value)) - return soap->error; - tp->visible = 0; - } - } - if ((int)c == EOF) - return soap->error = SOAP_EOF; - for (tp = soap->attributes; tp; tp = tp->next) - { if (tp->visible && tp->value) - { if (!strcmp(tp->name, "id")) - { *soap->id = '#'; - strncpy(soap->id + 1, tp->value, sizeof(soap->id) - 2); - soap->id[sizeof(soap->id)-1] = '\0'; - } - else if (!strcmp(tp->name, "href")) - { strncpy(soap->href, tp->value, sizeof(soap->href) - 1); - soap->href[sizeof(soap->href)-1] = '\0'; - } - else if ((soap->version == 2 || (soap->mode & SOAP_XML_GRAPH)) && !strcmp(tp->name, "ref")) - { *soap->href = '#'; - strncpy(soap->href + 1, tp->value, sizeof(soap->href) - 2); - soap->href[sizeof(soap->href)-1] = '\0'; - } - else if (!soap_match_tag(soap, tp->name, "xsi:type")) - { strncpy(soap->type, tp->value, sizeof(soap->type) - 1); - soap->type[sizeof(soap->type)-1] = '\0'; - } - else if (soap->version == 1 && !soap_match_tag(soap, tp->name, "SOAP-ENC:arrayType")) - { s = soap_strrchr(tp->value, '['); - if (s && (size_t)(s - tp->value) < sizeof(soap->arrayType)) - { strncpy(soap->arrayType, tp->value, s - tp->value); - soap->arrayType[s - tp->value] = '\0'; - strncpy(soap->arraySize, s, sizeof(soap->arraySize) - 1); - } - else - strncpy(soap->arrayType, tp->value, sizeof(soap->arrayType) - 1); - soap->arraySize[sizeof(soap->arrayType)-1] = '\0'; - soap->arrayType[sizeof(soap->arrayType)-1] = '\0'; - } - else if (soap->version == 2 && !soap_match_tag(soap, tp->name, "SOAP-ENC:itemType")) - strncpy(soap->arrayType, tp->value, sizeof(soap->arrayType) - 1); - else if (soap->version == 2 && !soap_match_tag(soap, tp->name, "SOAP-ENC:arraySize")) - strncpy(soap->arraySize, tp->value, sizeof(soap->arraySize) - 1); - else if (soap->version == 1 && !soap_match_tag(soap, tp->name, "SOAP-ENC:offset")) - strncpy(soap->arrayOffset, tp->value, sizeof(soap->arrayOffset)); - else if (soap->version == 1 && !soap_match_tag(soap, tp->name, "SOAP-ENC:position")) - soap->position = soap_getposition(tp->value, soap->positions); - else if (soap->version == 1 && !soap_match_tag(soap, tp->name, "SOAP-ENC:root")) - soap->root = ((!strcmp(tp->value, "1") || !strcmp(tp->value, "true"))); - else if (!soap_match_tag(soap, tp->name, "SOAP-ENV:actor") - || !soap_match_tag(soap, tp->name, "SOAP-ENV:role")) - { if ((!soap->actor || strcmp(soap->actor, tp->value)) - && strcmp(tp->value, "http://schemas.xmlsoap.org/soap/actor/next") - && strcmp(tp->value, "http://www.w3.org/2003/05/soap-envelope/role/next")) - soap->other = 1; - } - else if (!soap_match_tag(soap, tp->name, "SOAP-ENV:mustUnderstand") - && (!strcmp(tp->value, "1") || !strcmp(tp->value, "true"))) - soap->mustUnderstand = 1; - else if ((!soap_match_tag(soap, tp->name, "xsi:null") - || !soap_match_tag(soap, tp->name, "xsi:nil")) - && (!strcmp(tp->value, "1") - || !strcmp(tp->value, "true"))) - soap->null = 1; - } - } - if (!(soap->body = (c != '/'))) - do c = soap_get(soap); - while (soap_blank(c)); - return SOAP_OK; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_retry(struct soap *soap) -{ soap->peeked = 1; - soap->error = SOAP_OK; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_revert(struct soap *soap) -{ if (!soap->peeked) - { soap->peeked = 1; - if (soap->body) - soap->level--; - } - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Reverting last element (level=%u)\n", soap->level)); -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_string_out(struct soap *soap, const char *s, int flag) -{ register const char *t; - register soap_wchar c; - register soap_wchar mask = 0x80000000; -#ifdef WITH_DOM - if ((soap->mode & SOAP_XML_DOM) && soap->dom) - { soap->dom->data = soap_strdup(soap, s); /* check EOM */ - return SOAP_OK; - } -#endif - if (soap->mode & SOAP_C_UTFSTRING) - mask = 0; - t = s; - while ((c = *t++)) - { switch (c) - { - case 9: - if (flag) - { if (soap_send_raw(soap, s, t - s - 1) || soap_send_raw(soap, " ", 5)) - return soap->error; - s = t; - } - break; - case 10: - if (flag || !(soap->mode & SOAP_XML_CANONICAL)) - { if (soap_send_raw(soap, s, t - s - 1) || soap_send_raw(soap, " ", 5)) - return soap->error; - s = t; - } - break; - case 13: - if (soap_send_raw(soap, s, t - s - 1) || soap_send_raw(soap, " ", 5)) - return soap->error; - s = t; - break; - case '&': - if (soap_send_raw(soap, s, t - s - 1) || soap_send_raw(soap, "&", 5)) - return soap->error; - s = t; - break; - case '<': - if (soap_send_raw(soap, s, t - s - 1) || soap_send_raw(soap, "<", 4)) - return soap->error; - s = t; - break; - case '>': - if (!flag) - { if (soap_send_raw(soap, s, t - s - 1) || soap_send_raw(soap, ">", 4)) - return soap->error; - s = t; - } - break; - case '"': - if (flag) - { if (soap_send_raw(soap, s, t - s - 1) || soap_send_raw(soap, """, 6)) - return soap->error; - s = t; - } - break; - default: -#ifdef HAVE_MBTOWC - if (soap->mode & SOAP_C_MBSTRING) - { wchar_t wc; - register int m = mbtowc(&wc, t - 1, MB_CUR_MAX); - if (m > 0 && wc != c) - { if (soap_send_raw(soap, s, t - s - 1) || soap_pututf8(soap, wc)) - return soap->error; - s = t + m - 1; - continue; - } - } -#endif - if (c & mask) - { if (soap_send_raw(soap, s, t - s - 1) || soap_pututf8(soap, (unsigned char)c)) - return soap->error; - s = t; - } - } - } - return soap_send_raw(soap, s, t - s - 1); -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -char * -SOAP_FMAC2 -soap_string_in(struct soap *soap, int flag, long minlen, long maxlen) -{ register char *s; - char *t = NULL; - register size_t i; - register long l = 0; - register int n = 0; - register int m = 0; - register soap_wchar c; -#ifdef HAVE_WCTOMB - char buf[MB_LEN_MAX > 8 ? MB_LEN_MAX : 8]; -#else - char buf[8]; -#endif -#ifdef WITH_CDATA - if (!flag) - { register int state = 0; -#ifdef WITH_FAST - soap->labidx = 0; /* use look-aside buffer */ -#else - if (soap_new_block(soap)) - return NULL; -#endif - for (;;) - { -#ifdef WITH_FAST - register size_t k; - if (soap_append_lab(soap, NULL, 0)) /* allocate more space in look-aside buffer if necessary */ - return NULL; - s = soap->labbuf + soap->labidx; /* space to populate */ - k = soap->lablen - soap->labidx; /* number of bytes available */ - soap->labidx = soap->lablen; /* claim this space */ -#else - register size_t k = SOAP_BLKLEN; - if (!(s = (char*)soap_push_block(soap, k))) - return NULL; -#endif - for (i = 0; i < k; i++) - { if (m > 0) - { *s++ = *t++; /* copy multibyte characters */ - m--; - continue; - } - c = soap_getchar(soap); - if ((int)c == EOF) - goto end; - if (c >= 0x80 && !(soap->mode & SOAP_ENC_LATIN)) - { soap_unget(soap, c); - c = soap_getutf8(soap); - if (soap->mode & SOAP_C_UTFSTRING) - { if ((c & 0x80000000) && c >= -0x7FFFFF80 && c < SOAP_AP) - { c &= 0x7FFFFFFF; - t = buf; - if (c < 0x0800) - *t++ = (char)(0xC0 | ((c >> 6) & 0x1F)); - else - { if (c < 0x010000) - *t++ = (char)(0xE0 | ((c >> 12) & 0x0F)); - else - { if (c < 0x200000) - *t++ = (char)(0xF0 | ((c >> 18) & 0x07)); - else - { if (c < 0x04000000) - *t++ = (char)(0xF8 | ((c >> 24) & 0x03)); - else - { *t++ = (char)(0xFC | ((c >> 30) & 0x01)); - *t++ = (char)(0x80 | ((c >> 24) & 0x3F)); - } - *t++ = (char)(0x80 | ((c >> 18) & 0x3F)); - } - *t++ = (char)(0x80 | ((c >> 12) & 0x3F)); - } - *t++ = (char)(0x80 | ((c >> 6) & 0x3F)); - } - *t++ = (char)(0x80 | (c & 0x3F)); - m = (int)(t - buf) - 1; - t = buf; - *s++ = *t++; - continue; - } - } - } - switch (state) - { case 1: - if (c == ']') - state = 4; - *s++ = c; - continue; - case 2: - if (c == '-') - state = 6; - *s++ = c; - continue; - case 3: - if (c == '?') - state = 8; - *s++ = c; - continue; - /* CDATA */ - case 4: - if (c == ']') - state = 5; - else - state = 1; - *s++ = c; - continue; - case 5: - if (c == '>') - state = 0; - else - state = 1; - *s++ = c; - continue; - /* comment */ - case 6: - if (c == '-') - state = 7; - else - state = 2; - *s++ = c; - continue; - case 7: - if (c == '>') - state = 0; - else - state = 2; - *s++ = c; - continue; - /* PI */ - case 8: - if (c == '>') - state = 0; - else - state = 3; - *s++ = c; - continue; - } - switch (c) - { - case '/': - if (n > 0) - { c = soap_getchar(soap); - if (c == '>') - n--; - soap_unget(soap, c); - } - *s++ = '/'; - break; - case '<': - c = soap_getchar(soap); - if (c == '/') - { if (n == 0) - { c = SOAP_TT; - goto end; - } - n--; - } - else if (c == '!') - { c = soap_getchar(soap); - if (c == '[') - { do c = soap_getchar(soap); - while ((int)c != EOF && c != '['); - if ((int)c == EOF) - goto end; - t = (char*)"![CDATA["; - m = 8; - state = 1; - } - else if (c == '-') - { if ((c = soap_getchar(soap)) == '-') - state = 2; - t = (char*)"!-"; - m = 2; - soap_unget(soap, c); - } - else - { t = (char*)"!"; - m = 1; - soap_unget(soap, c); - } - *s++ = '<'; - break; - } - else if (c == '?') - state = 3; - else - n++; - soap_unget(soap, c); - *s++ = '<'; - break; - case '>': - *s++ = '>'; - break; - case '"': - *s++ = '"'; - break; - default: -#ifdef HAVE_WCTOMB - if (soap->mode & SOAP_C_MBSTRING) - { m = wctomb(buf, c & 0x7FFFFFFF); - if (m >= 1) - { t = buf; - *s++ = *t++; - m--; - } - else - *s++ = SOAP_UNKNOWN_CHAR; - } - else -#endif - *s++ = (char)(c & 0xFF); - } - l++; - if ((soap->mode & SOAP_XML_STRICT) && maxlen >= 0 && l > maxlen) - { DBGLOG(TEST,SOAP_MESSAGE(fdebug, "String too long: maxlen=%ld\n", maxlen)); - soap->error = SOAP_LENGTH; - return NULL; - } - } - } - } -#endif -#ifdef WITH_FAST - soap->labidx = 0; /* use look-aside buffer */ -#else - if (soap_new_block(soap)) - return NULL; -#endif - for (;;) - { -#ifdef WITH_FAST - register size_t k; - if (soap_append_lab(soap, NULL, 0)) /* allocate more space in look-aside buffer if necessary */ - return NULL; - s = soap->labbuf + soap->labidx; /* space to populate */ - k = soap->lablen - soap->labidx; /* number of bytes available */ - soap->labidx = soap->lablen; /* claim this space */ -#else - register size_t k = SOAP_BLKLEN; - if (!(s = (char*)soap_push_block(soap, k))) - return NULL; -#endif - for (i = 0; i < k; i++) - { if (m > 0) - { *s++ = *t++; /* copy multibyte characters */ - m--; - continue; - } - if (soap->mode & SOAP_C_UTFSTRING) - { if (((c = soap_get(soap)) & 0x80000000) && c >= -0x7FFFFF80 && c < SOAP_AP) - { c &= 0x7FFFFFFF; - t = buf; - if (c < 0x0800) - *t++ = (char)(0xC0 | ((c >> 6) & 0x1F)); - else - { if (c < 0x010000) - *t++ = (char)(0xE0 | ((c >> 12) & 0x0F)); - else - { if (c < 0x200000) - *t++ = (char)(0xF0 | ((c >> 18) & 0x07)); - else - { if (c < 0x04000000) - *t++ = (char)(0xF8 | ((c >> 24) & 0x03)); - else - { *t++ = (char)(0xFC | ((c >> 30) & 0x01)); - *t++ = (char)(0x80 | ((c >> 24) & 0x3F)); - } - *t++ = (char)(0x80 | ((c >> 18) & 0x3F)); - } - *t++ = (char)(0x80 | ((c >> 12) & 0x3F)); - } - *t++ = (char)(0x80 | ((c >> 6) & 0x3F)); - } - *t++ = (char)(0x80 | (c & 0x3F)); - m = (int)(t - buf) - 1; - t = buf; - *s++ = *t++; - continue; - } - } - else - c = soap_getutf8(soap); - switch (c) - { - case SOAP_TT: - if (n == 0) - goto end; - n--; - *s++ = '<'; - t = (char*)"/"; - m = 1; - break; - case SOAP_LT: - n++; - *s++ = '<'; - break; - case SOAP_GT: - *s++ = '>'; - break; - case SOAP_QT: - *s++ = '"'; - break; - case SOAP_AP: - *s++ = '\''; - break; - case '/': - if (n > 0) - { c = soap_get(soap); - if (c == SOAP_GT) - n--; - soap_unget(soap, c); - } - *s++ = '/'; - break; - case '<' | 0x80000000: - if (flag) - *s++ = '<'; - else - { *s++ = '&'; - t = (char*)"lt;"; - m = 3; - } - break; - case '>' | 0x80000000: - if (flag) - *s++ = '>'; - else - { *s++ = '&'; - t = (char*)"gt;"; - m = 3; - } - break; - case '"' | 0x80000000: - if (flag) - *s++ = '"'; - else - { *s++ = '&'; - t = (char*)"quot;"; - m = 5; - } - break; - case '\'' | 0x80000000: - if (flag) - *s++ = '\''; - else - { *s++ = '&'; - t = (char*)"apos;"; - m = 5; - } - break; - default: - if ((int)c == EOF) - goto end; -#ifdef HAVE_WCTOMB - if (soap->mode & SOAP_C_MBSTRING) - { m = wctomb(buf, c & 0x7FFFFFFF); - if (m >= 1) - { t = buf; - *s++ = *t++; - m--; - } - else - *s++ = SOAP_UNKNOWN_CHAR; - } - else -#endif - *s++ = (char)(c & 0xFF); - } - l++; - if ((soap->mode & SOAP_XML_STRICT) && maxlen >= 0 && l > maxlen) - { DBGLOG(TEST,SOAP_MESSAGE(fdebug, "String too long: maxlen=%ld\n", maxlen)); - soap->error = SOAP_LENGTH; - return NULL; - } - } - } -end: - soap_unget(soap, c); - *s = '\0'; -#ifdef WITH_FAST - t = soap_strdup(soap, soap->labbuf); -#else - soap_size_block(soap, i+1); - t = soap_save_block(soap, NULL, 0); -#endif - if ((soap->mode & SOAP_XML_STRICT) && l < minlen) - { DBGLOG(TEST,SOAP_MESSAGE(fdebug, "String too short: %ld chars, minlen=%ld\n", l, minlen)); - soap->error = SOAP_LENGTH; - return NULL; - } - if (flag == 2) - if (soap_s2QName(soap, t, &t)) - return NULL; - return t; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_wstring_out(struct soap *soap, const wchar_t *s, int flag) -{ const char *t; - char tmp; - register soap_wchar c; -#ifdef WITH_DOM - if ((soap->mode & SOAP_XML_DOM) && soap->dom) - { soap->dom->wide = NULL; /* soap_malloc() ??? */ - return SOAP_OK; - } -#endif - while ((c = *s++)) - { switch (c) - { - case 9: - if (flag) - t = " "; - else - t = "\t"; - break; - case 10: - if (flag || !(soap->mode & SOAP_XML_CANONICAL)) - t = " "; - else - t = "\n"; - break; - case 13: - t = " "; - break; - case '&': - t = "&"; - break; - case '<': - t = "<"; - break; - case '>': - if (flag) - t = ">"; - else - t = ">"; - break; - case '"': - if (flag) - t = """; - else - t = "\""; - break; - default: - if (c > 0 && c < 0x80) - { tmp = (char)c; - if (soap_send_raw(soap, &tmp, 1)) - return soap->error; - } - else if (soap_pututf8(soap, (unsigned long)c)) - return soap->error; - continue; - } - if (soap_send(soap, t)) - return soap->error; - } - return SOAP_OK; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -wchar_t * -SOAP_FMAC2 -soap_wstring_in(struct soap *soap, int flag, long minlen, long maxlen) -{ wchar_t *s; - register int i, n = 0; - register long l = 0; - register soap_wchar c; - const char *t = NULL; - if (soap_new_block(soap)) - return NULL; - for (;;) - { if (!(s = (wchar_t*)soap_push_block(soap, sizeof(wchar_t)*SOAP_BLKLEN))) - return NULL; - for (i = 0; i < SOAP_BLKLEN; i++) - { if (t) - { *s++ = (wchar_t)*t++; - if (!*t) - t = NULL; - continue; - } - c = soap_getutf8(soap); - switch (c) - { - case SOAP_TT: - if (n == 0) - goto end; - n--; - *s++ = '<'; - soap_unget(soap, '/'); - break; - case SOAP_LT: - n++; - *s++ = '<'; - break; - case SOAP_GT: - *s++ = '>'; - break; - case SOAP_QT: - *s++ = '"'; - break; - case SOAP_AP: - *s++ = '\''; - break; - case '/': - if (n > 0) - { c = soap_getutf8(soap); - if (c == SOAP_GT) - n--; - soap_unget(soap, c); - } - *s++ = '/'; - break; - case '<': - if (flag) - *s++ = (soap_wchar)'<'; - else - { *s++ = (soap_wchar)'&'; - t = "lt;"; - } - break; - case '>': - if (flag) - *s++ = (soap_wchar)'>'; - else - { *s++ = (soap_wchar)'&'; - t = "gt;"; - } - break; - case '"': - if (flag) - *s++ = (soap_wchar)'"'; - else - { *s++ = (soap_wchar)'&'; - t = "quot;"; - } - break; - default: - if ((int)c == EOF) - goto end; - *s++ = (wchar_t)c & 0x7FFFFFFF; - } - l++; - if ((soap->mode & SOAP_XML_STRICT) && maxlen >= 0 && l > maxlen) - { DBGLOG(TEST,SOAP_MESSAGE(fdebug, "String too long: maxlen=%ld\n", maxlen)); - soap->error = SOAP_LENGTH; - return NULL; - } - } - } -end: - soap_unget(soap, c); - *s = '\0'; - soap_size_block(soap, sizeof(wchar_t) * (i + 1)); - if ((soap->mode & SOAP_XML_STRICT) && l < minlen) - { DBGLOG(TEST,SOAP_MESSAGE(fdebug, "String too short: %ld chars, minlen=%ld\n", l, minlen)); - soap->error = SOAP_LENGTH; - return NULL; - } - return (wchar_t*)soap_save_block(soap, NULL, 0); -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -const char* -SOAP_FMAC2 -soap_int2s(struct soap *soap, int n) -{ return soap_long2s(soap, (long)n); -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_outint(struct soap *soap, const char *tag, int id, const int *p, const char *type, int n) -{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type) - || soap_string_out(soap, soap_long2s(soap, (long)*p), 0)) - return soap->error; - return soap_element_end_out(soap, tag); -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_s2int(struct soap *soap, const char *s, int *p) -{ if (s) - { char *r; - *p = (int)soap_strtol(s, &r, 10); - if (*r) - soap->error = SOAP_TYPE; - } - return soap->error; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int * -SOAP_FMAC2 -soap_inint(struct soap *soap, const char *tag, int *p, const char *type, int t) -{ if (soap_element_begin_in(soap, tag, 0)) - return NULL; -#ifndef WITH_LEAN - if (*soap->type - && soap_match_tag(soap, soap->type, type) - && soap_match_tag(soap, soap->type, ":int") - && soap_match_tag(soap, soap->type, ":short") - && soap_match_tag(soap, soap->type, ":byte")) - { soap->error = SOAP_TYPE; - soap_revert(soap); - return NULL; - } -#endif - p = (int*)soap_id_enter(soap, soap->id, p, t, sizeof(int), 0, NULL, NULL, NULL); - if (p) - { if (soap_s2int(soap, soap_value(soap), p)) - return NULL; - } - p = (int*)soap_id_forward(soap, soap->href, p, t, 0, sizeof(int), 0, NULL); - if (soap->body && soap_element_end_in(soap, tag)) - return NULL; - return p; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -const char* -SOAP_FMAC2 -soap_long2s(struct soap *soap, long n) -{ sprintf(soap->tmpbuf, "%ld", n); - return soap->tmpbuf; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_outlong(struct soap *soap, const char *tag, int id, const long *p, const char *type, int n) -{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type) - || soap_string_out(soap, soap_long2s(soap, *p), 0)) - return soap->error; - return soap_element_end_out(soap, tag); -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_s2long(struct soap *soap, const char *s, long *p) -{ if (s) - { char *r; - *p = soap_strtol(s, &r, 10); - if (*r) - soap->error = SOAP_TYPE; - } - return soap->error; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -long * -SOAP_FMAC2 -soap_inlong(struct soap *soap, const char *tag, long *p, const char *type, int t) -{ if (soap_element_begin_in(soap, tag, 0)) - return NULL; -#ifndef WITH_LEAN - if (*soap->type - && soap_match_tag(soap, soap->type, type) - && soap_match_tag(soap, soap->type, ":int") - && soap_match_tag(soap, soap->type, ":short") - && soap_match_tag(soap, soap->type, ":byte")) - { soap->error = SOAP_TYPE; - soap_revert(soap); - return NULL; - } -#endif - p = (long*)soap_id_enter(soap, soap->id, p, t, sizeof(long), 0, NULL, NULL, NULL); - if (p) - { if (soap_s2long(soap, soap_value(soap), p)) - return NULL; - } - p = (long*)soap_id_forward(soap, soap->href, p, t, 0, sizeof(long), 0, NULL); - if (soap->body && soap_element_end_in(soap, tag)) - return NULL; - return p; -} -#endif - -/******************************************************************************/ -#ifndef WITH_LEAN -SOAP_FMAC1 -const char* -SOAP_FMAC2 -soap_LONG642s(struct soap *soap, LONG64 n) -{ sprintf(soap->tmpbuf, SOAP_LONG_FORMAT, n); - return soap->tmpbuf; -} -#endif - -/******************************************************************************/ -#ifndef WITH_LEAN -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_outLONG64(struct soap *soap, const char *tag, int id, const LONG64 *p, const char *type, int n) -{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type) - || soap_string_out(soap, soap_LONG642s(soap, *p), 0)) - return soap->error; - return soap_element_end_out(soap, tag); -} -#endif - -/******************************************************************************/ -#ifndef WITH_LEAN -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_s2LONG64(struct soap *soap, const char *s, LONG64 *p) -{ if (s && sscanf(s, SOAP_LONG_FORMAT, p) != 1) - soap->error = SOAP_TYPE; - return soap->error; -} -#endif - -/******************************************************************************/ -#ifndef WITH_LEAN -SOAP_FMAC1 -LONG64 * -SOAP_FMAC2 -soap_inLONG64(struct soap *soap, const char *tag, LONG64 *p, const char *type, int t) -{ if (soap_element_begin_in(soap, tag, 0)) - return NULL; -#ifndef WITH_LEAN - if (*soap->type - && soap_match_tag(soap, soap->type, type) - && soap_match_tag(soap, soap->type, ":integer") - && soap_match_tag(soap, soap->type, ":positiveInteger") - && soap_match_tag(soap, soap->type, ":negativeInteger") - && soap_match_tag(soap, soap->type, ":nonPositiveInteger") - && soap_match_tag(soap, soap->type, ":nonNegativeInteger") - && soap_match_tag(soap, soap->type, ":long") - && soap_match_tag(soap, soap->type, ":int") - && soap_match_tag(soap, soap->type, ":short") - && soap_match_tag(soap, soap->type, ":byte")) - { soap->error = SOAP_TYPE; - soap_revert(soap); - return NULL; - } -#endif - p = (LONG64*)soap_id_enter(soap, soap->id, p, t, sizeof(LONG64), 0, NULL, NULL, NULL); - if (p) - { if (soap_s2LONG64(soap, soap_value(soap), p)) - return NULL; - } - p = (LONG64*)soap_id_forward(soap, soap->href, p, t, 0, sizeof(LONG64), 0, NULL); - if (soap->body && soap_element_end_in(soap, tag)) - return NULL; - return p; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -const char* -SOAP_FMAC2 -soap_byte2s(struct soap *soap, char n) -{ return soap_long2s(soap, (long)n); -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_outbyte(struct soap *soap, const char *tag, int id, const char *p, const char *type, int n) -{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type) - || soap_string_out(soap, soap_long2s(soap, (long)*p), 0)) - return soap->error; - return soap_element_end_out(soap, tag); -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_s2byte(struct soap *soap, const char *s, char *p) -{ if (s) - { long n; - char *r; - n = soap_strtol(s, &r, 10); - if (*r || n < -128 || n > 127) - soap->error = SOAP_TYPE; - *p = (char)n; - } - return soap->error; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -char * -SOAP_FMAC2 -soap_inbyte(struct soap *soap, const char *tag, char *p, const char *type, int t) -{ if (soap_element_begin_in(soap, tag, 0)) - return NULL; -#ifndef WITH_LEAN - if (*soap->type - && soap_match_tag(soap, soap->type, type) - && soap_match_tag(soap, soap->type, ":byte")) - { soap->error = SOAP_TYPE; - soap_revert(soap); - return NULL; - } -#endif - p = (char*)soap_id_enter(soap, soap->id, p, t, sizeof(char), 0, NULL, NULL, NULL); - if (p) - { if (soap_s2byte(soap, soap_value(soap), p)) - return NULL; - } - p = (char*)soap_id_forward(soap, soap->href, p, t, 0, sizeof(char), 0, NULL); - if (soap->body && soap_element_end_in(soap, tag)) - return NULL; - return p; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -const char* -SOAP_FMAC2 -soap_short2s(struct soap *soap, short n) -{ return soap_long2s(soap, (long)n); -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_outshort(struct soap *soap, const char *tag, int id, const short *p, const char *type, int n) -{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type) - || soap_string_out(soap, soap_long2s(soap, (long)*p), 0)) - return soap->error; - return soap_element_end_out(soap, tag); -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_s2short(struct soap *soap, const char *s, short *p) -{ if (s) - { long n; - char *r; - n = soap_strtol(s, &r, 10); - if (*r || n < -32768 || n > 32767) - soap->error = SOAP_TYPE; - *p = (short)n; - } - return soap->error; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -short * -SOAP_FMAC2 -soap_inshort(struct soap *soap, const char *tag, short *p, const char *type, int t) -{ if (soap_element_begin_in(soap, tag, 0)) - return NULL; -#ifndef WITH_LEAN - if (*soap->type - && soap_match_tag(soap, soap->type, type) - && soap_match_tag(soap, soap->type, ":short") - && soap_match_tag(soap, soap->type, ":byte")) - { soap->error = SOAP_TYPE; - soap_revert(soap); - return NULL; - } -#endif - p = (short*)soap_id_enter(soap, soap->id, p, t, sizeof(short), 0, NULL, NULL, NULL); - if (p) - { if (soap_s2short(soap, soap_value(soap), p)) - return NULL; - } - p = (short*)soap_id_forward(soap, soap->href, p, t, 0, sizeof(short), 0, NULL); - if (soap->body && soap_element_end_in(soap, tag)) - return NULL; - return p; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -const char* -SOAP_FMAC2 -soap_float2s(struct soap *soap, float n) -{ const char *s; - if (soap_isnan((double)n)) - s = "NaN"; - else if (soap_ispinff(n)) - s = "INF"; - else if (soap_isninff(n)) - s = "-INF"; - else - { sprintf(soap->tmpbuf, soap->float_format, n); - s = soap->tmpbuf; - } - return s; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_outfloat(struct soap *soap, const char *tag, int id, const float *p, const char *type, int n) -{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type) - || soap_string_out(soap, soap_float2s(soap, *p), 0)) - return soap->error; - return soap_element_end_out(soap, tag); -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_s2float(struct soap *soap, const char *s, float *p) -{ if (s) - { if (!soap_tag_cmp(s, "INF")) - *p = FLT_PINFTY; - else if (!soap_tag_cmp(s, "+INF")) - *p = FLT_PINFTY; - else if (!soap_tag_cmp(s, "-INF")) - *p = FLT_NINFTY; - else if (!soap_tag_cmp(s, "NaN")) - *p = FLT_NAN; - else - { -#ifdef HAVE_STRTOD - char *r; - *p = (float)strtod(s, &r); - if (*r) -#endif -#ifdef HAVE_SSCANF - if (sscanf(s, soap->float_format, p) != 1) - soap->error = SOAP_TYPE; -#else - soap->error = SOAP_TYPE; -#endif - } - } - return soap->error; -} -#endif - -/******************************************************************************/ -#ifndef WITH_LEAN -static int soap_isnumeric(struct soap *soap, const char *type) -{ if (soap_match_tag(soap, soap->type, type) - && soap_match_tag(soap, soap->type, ":float") - && soap_match_tag(soap, soap->type, ":double") - && soap_match_tag(soap, soap->type, ":decimal") - && soap_match_tag(soap, soap->type, ":integer") - && soap_match_tag(soap, soap->type, ":positiveInteger") - && soap_match_tag(soap, soap->type, ":negativeInteger") - && soap_match_tag(soap, soap->type, ":nonPositiveInteger") - && soap_match_tag(soap, soap->type, ":nonNegativeInteger") - && soap_match_tag(soap, soap->type, ":long") - && soap_match_tag(soap, soap->type, ":int") - && soap_match_tag(soap, soap->type, ":short") - && soap_match_tag(soap, soap->type, ":byte") - && soap_match_tag(soap, soap->type, ":unsignedLong") - && soap_match_tag(soap, soap->type, ":unsignedInt") - && soap_match_tag(soap, soap->type, ":unsignedShort") - && soap_match_tag(soap, soap->type, ":unsignedByte")) - { soap->error = SOAP_TYPE; - soap_revert(soap); - return SOAP_ERR; - } - return SOAP_OK; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -float * -SOAP_FMAC2 -soap_infloat(struct soap *soap, const char *tag, float *p, const char *type, int t) -{ if (soap_element_begin_in(soap, tag, 0)) - return NULL; -#ifndef WITH_LEAN - if (*soap->type != '\0' && soap_isnumeric(soap, type)) - return NULL; -#endif - p = (float*)soap_id_enter(soap, soap->id, p, t, sizeof(float), 0, NULL, NULL, NULL); - if (p) - { if (soap_s2float(soap, soap_value(soap), p)) - return NULL; - } - p = (float*)soap_id_forward(soap, soap->href, p, t, 0, sizeof(float), 0, NULL); - if (soap->body && soap_element_end_in(soap, tag)) - return NULL; - return p; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -const char* -SOAP_FMAC2 -soap_double2s(struct soap *soap, double n) -{ const char *s; - if (soap_isnan(n)) - s = "NaN"; - else if (soap_ispinfd(n)) - s = "INF"; - else if (soap_isninfd(n)) - s = "-INF"; - else - { sprintf(soap->tmpbuf, soap->double_format, n); - s = soap->tmpbuf; - } - return s; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_outdouble(struct soap *soap, const char *tag, int id, const double *p, const char *type, int n) -{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type) - || soap_string_out(soap, soap_double2s(soap, *p), 0)) - return soap->error; - return soap_element_end_out(soap, tag); -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_s2double(struct soap *soap, const char *s, double *p) -{ if (s) - { if (!soap_tag_cmp(s, "INF")) - *p = DBL_PINFTY; - else if (!soap_tag_cmp(s, "+INF")) - *p = DBL_PINFTY; - else if (!soap_tag_cmp(s, "-INF")) - *p = DBL_NINFTY; - else if (!soap_tag_cmp(s, "NaN")) - *p = DBL_NAN; - else - { -#ifdef HAVE_STRTOD - char *r; - *p = strtod(s, &r); - if (*r) -#endif -#ifdef HAVE_SSCANF - if (sscanf(s, soap->double_format, p) != 1) - soap->error = SOAP_TYPE; -#else - soap->error = SOAP_TYPE; -#endif - } - } - return soap->error; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -double * -SOAP_FMAC2 -soap_indouble(struct soap *soap, const char *tag, double *p, const char *type, int t) -{ if (soap_element_begin_in(soap, tag, 0)) - return NULL; -#ifndef WITH_LEAN - if (*soap->type != '\0' && soap_isnumeric(soap, type)) - return NULL; -#endif - p = (double*)soap_id_enter(soap, soap->id, p, t, sizeof(double), 0, NULL, NULL, NULL); - if (p) - { if (soap_s2double(soap, soap_value(soap), p)) - return NULL; - } - p = (double*)soap_id_forward(soap, soap->href, p, t, 0, sizeof(double), 0, NULL); - if (soap->body && soap_element_end_in(soap, tag)) - return NULL; - return p; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -const char* -SOAP_FMAC2 -soap_unsignedByte2s(struct soap *soap, unsigned char n) -{ return soap_unsignedLong2s(soap, (unsigned long)n); -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_outunsignedByte(struct soap *soap, const char *tag, int id, const unsigned char *p, const char *type, int n) -{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type) - || soap_string_out(soap, soap_unsignedLong2s(soap, (unsigned long)*p), 0)) - return soap->error; - return soap_element_end_out(soap, tag); -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_s2unsignedByte(struct soap *soap, const char *s, unsigned char *p) -{ if (s) - { unsigned long n; - char *r; - n = soap_strtoul(s, &r, 10); - if (*r || n > 255) - soap->error = SOAP_TYPE; - *p = (unsigned char)n; - } - return soap->error; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -unsigned char * -SOAP_FMAC2 -soap_inunsignedByte(struct soap *soap, const char *tag, unsigned char *p, const char *type, int t) -{ if (soap_element_begin_in(soap, tag, 0)) - return NULL; -#ifndef WITH_LEAN - if (*soap->type - && soap_match_tag(soap, soap->type, type) - && soap_match_tag(soap, soap->type, ":unsignedByte")) - { soap->error = SOAP_TYPE; - soap_revert(soap); - return NULL; - } -#endif - p = (unsigned char*)soap_id_enter(soap, soap->id, p, t, sizeof(unsigned char), 0, NULL, NULL, NULL); - if (p) - { if (soap_s2unsignedByte(soap, soap_value(soap), p)) - return NULL; - } - p = (unsigned char*)soap_id_forward(soap, soap->href, p, t, 0, sizeof(unsigned char), 0, NULL); - if (soap->body && soap_element_end_in(soap, tag)) - return NULL; - return p; -} -#endif - -/******************************************************************************/ -#ifndef WITH_LEAN -SOAP_FMAC1 -const char* -SOAP_FMAC2 -soap_unsignedShort2s(struct soap *soap, unsigned short n) -{ return soap_unsignedLong2s(soap, (unsigned long)n); -} -#endif - -/******************************************************************************/ -#ifndef WITH_LEAN -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_outunsignedShort(struct soap *soap, const char *tag, int id, const unsigned short *p, const char *type, int n) -{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type) - || soap_string_out(soap, soap_unsignedLong2s(soap, (unsigned long)*p), 0)) - return soap->error; - return soap_element_end_out(soap, tag); -} -#endif - -/******************************************************************************/ -#ifndef WITH_LEAN -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_s2unsignedShort(struct soap *soap, const char *s, unsigned short *p) -{ if (s) - { unsigned long n; - char *r; - n = soap_strtoul(s, &r, 10); - if (*r || n > 65535) - soap->error = SOAP_TYPE; - *p = (unsigned short)n; - } - return soap->error; -} -#endif - -/******************************************************************************/ -#ifndef WITH_LEAN -SOAP_FMAC1 -unsigned short * -SOAP_FMAC2 -soap_inunsignedShort(struct soap *soap, const char *tag, unsigned short *p, const char *type, int t) -{ if (soap_element_begin_in(soap, tag, 0)) - return NULL; -#ifndef WITH_LEAN - if (*soap->type - && soap_match_tag(soap, soap->type, type) - && soap_match_tag(soap, soap->type, ":unsignedShort") - && soap_match_tag(soap, soap->type, ":unsignedByte")) - { soap->error = SOAP_TYPE; - soap_revert(soap); - return NULL; - } -#endif - p = (unsigned short*)soap_id_enter(soap, soap->id, p, t, sizeof(unsigned short), 0, NULL, NULL, NULL); - if (p) - { if (soap_s2unsignedShort(soap, soap_value(soap), p)) - return NULL; - } - p = (unsigned short*)soap_id_forward(soap, soap->href, p, t, 0, sizeof(unsigned short), 0, NULL); - if (soap->body && soap_element_end_in(soap, tag)) - return NULL; - return p; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -const char* -SOAP_FMAC2 -soap_unsignedInt2s(struct soap *soap, unsigned int n) -{ return soap_unsignedLong2s(soap, (unsigned long)n); -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_outunsignedInt(struct soap *soap, const char *tag, int id, const unsigned int *p, const char *type, int n) -{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type) - || soap_string_out(soap, soap_unsignedLong2s(soap, (unsigned long)*p), 0)) - return soap->error; - return soap_element_end_out(soap, tag); -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_s2unsignedInt(struct soap *soap, const char *s, unsigned int *p) -{ if (s) - { char *r; - *p = (unsigned int)soap_strtoul(s, &r, 10); - if (*r) - soap->error = SOAP_TYPE; - } - return soap->error; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -unsigned int * -SOAP_FMAC2 -soap_inunsignedInt(struct soap *soap, const char *tag, unsigned int *p, const char *type, int t) -{ if (soap_element_begin_in(soap, tag, 0)) - return NULL; -#ifndef WITH_LEAN - if (*soap->type - && soap_match_tag(soap, soap->type, type) - && soap_match_tag(soap, soap->type, ":unsignedInt") - && soap_match_tag(soap, soap->type, ":unsignedShort") - && soap_match_tag(soap, soap->type, ":unsignedByte")) - { soap->error = SOAP_TYPE; - soap_revert(soap); - return NULL; - } -#endif - p = (unsigned int*)soap_id_enter(soap, soap->id, p, t, sizeof(unsigned int), 0, NULL, NULL, NULL); - if (p) - { if (soap_s2unsignedInt(soap, soap_value(soap), p)) - return NULL; - } - p = (unsigned int*)soap_id_forward(soap, soap->href, p, t, 0, sizeof(unsigned int), 0, NULL); - if (soap->body && soap_element_end_in(soap, tag)) - return NULL; - return p; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -const char* -SOAP_FMAC2 -soap_unsignedLong2s(struct soap *soap, unsigned long n) -{ sprintf(soap->tmpbuf, "%lu", n); - return soap->tmpbuf; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_outunsignedLong(struct soap *soap, const char *tag, int id, const unsigned long *p, const char *type, int n) -{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type) - || soap_string_out(soap, soap_unsignedLong2s(soap, *p), 0)) - return soap->error; - return soap_element_end_out(soap, tag); -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_s2unsignedLong(struct soap *soap, const char *s, unsigned long *p) -{ if (s) - { char *r; - *p = soap_strtoul(s, &r, 10); - if (*r) - soap->error = SOAP_TYPE; - } - return soap->error; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -unsigned long * -SOAP_FMAC2 -soap_inunsignedLong(struct soap *soap, const char *tag, unsigned long *p, const char *type, int t) -{ if (soap_element_begin_in(soap, tag, 0)) - return NULL; -#ifndef WITH_LEAN - if (*soap->type - && soap_match_tag(soap, soap->type, type) - && soap_match_tag(soap, soap->type, ":unsignedInt") - && soap_match_tag(soap, soap->type, ":unsignedShort") - && soap_match_tag(soap, soap->type, ":unsignedByte")) - { soap->error = SOAP_TYPE; - soap_revert(soap); - return NULL; - } -#endif - p = (unsigned long*)soap_id_enter(soap, soap->id, p, t, sizeof(unsigned long), 0, NULL, NULL, NULL); - if (p) - { if (soap_s2unsignedLong(soap, soap_value(soap), p)) - return NULL; - } - p = (unsigned long*)soap_id_forward(soap, soap->href, p, t, 0, sizeof(unsigned long), 0, NULL); - if (soap->body && soap_element_end_in(soap, tag)) - return NULL; - return p; -} -#endif - -/******************************************************************************/ -#ifndef WITH_LEAN -SOAP_FMAC1 -const char* -SOAP_FMAC2 -soap_ULONG642s(struct soap *soap, ULONG64 n) -{ sprintf(soap->tmpbuf, SOAP_ULONG_FORMAT, n); - return soap->tmpbuf; -} -#endif - -/******************************************************************************/ -#ifndef WITH_LEAN -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_outULONG64(struct soap *soap, const char *tag, int id, const ULONG64 *p, const char *type, int n) -{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type) - || soap_string_out(soap, soap_ULONG642s(soap, *p), 0)) - return soap->error; - return soap_element_end_out(soap, tag); -} -#endif - -/******************************************************************************/ -#ifndef WITH_LEAN -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_s2ULONG64(struct soap *soap, const char *s, ULONG64 *p) -{ if (s && sscanf(s, SOAP_ULONG_FORMAT, p) != 1) - soap->error = SOAP_TYPE; - return soap->error; -} -#endif - -/******************************************************************************/ -#ifndef WITH_LEAN -SOAP_FMAC1 -ULONG64 * -SOAP_FMAC2 -soap_inULONG64(struct soap *soap, const char *tag, ULONG64 *p, const char *type, int t) -{ if (soap_element_begin_in(soap, tag, 0)) - return NULL; - if (*soap->type - && soap_match_tag(soap, soap->type, type) - && soap_match_tag(soap, soap->type, ":positiveInteger") - && soap_match_tag(soap, soap->type, ":nonNegativeInteger") - && soap_match_tag(soap, soap->type, ":unsignedLong") - && soap_match_tag(soap, soap->type, ":unsignedInt") - && soap_match_tag(soap, soap->type, ":unsignedShort") - && soap_match_tag(soap, soap->type, ":unsignedByte")) - { soap->error = SOAP_TYPE; - soap_revert(soap); - return NULL; - } - p = (ULONG64*)soap_id_enter(soap, soap->id, p, t, sizeof(ULONG64), 0, NULL, NULL, NULL); - if (p) - { if (soap_s2ULONG64(soap, soap_value(soap), p)) - return NULL; - } - p = (ULONG64*)soap_id_forward(soap, soap->href, p, t, 0, sizeof(ULONG64), 0, NULL); - if (soap->body && soap_element_end_in(soap, tag)) - return NULL; - return p; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_s2string(struct soap *soap, const char *s, char **t) -{ *t = NULL; - if (s && !(*t = soap_strdup(soap, s))) - soap->error = SOAP_EOM; - return soap->error; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_s2QName(struct soap *soap, const char *s, char **t) -{ if (s) - { struct soap_nlist *np; - const char *p; - if (!strncmp(s, "xml:", 4)) - { *t = soap_strdup(soap, s); - return SOAP_OK; - } - np = soap->nlist; - p = strchr(s, ':'); - if (p) - { register int n = p - s; - while (np && (strncmp(np->id, s, n) || np->id[n])) - np = np->next; - p++; - } - else - { while (np && *np->id) - np = np->next; - p = s; - } - if (np) - { if (np->index >= 0 && soap->local_namespaces) - { register const char *q = soap->local_namespaces[np->index].id; - if (q) - { if ((*t = (char*)soap_malloc(soap, strlen(p) + strlen(q) + 2))) - sprintf(*t, "%s:%s", q, p); - return SOAP_OK; - } - } - if (np->ns) - { if ((*t = (char*)soap_malloc(soap, strlen(p) + strlen(np->ns) + 4))) - sprintf(*t, "\"%s\":%s", np->ns, p); - return SOAP_OK; - } - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Namespace prefix of '%s' not defined (index=%d, URI=%s)\n", s, np->index, np->ns?np->ns:"")); - return soap->error = SOAP_NAMESPACE; - } - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Namespace prefix of '%s' not defined, assuming empty namespace\n", s)); - if ((*t = (char*)soap_malloc(soap, strlen(p) + 4))) - sprintf(*t, "\"\":%s", p); - } - return soap->error; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -const char* -SOAP_FMAC2 -soap_QName2s(struct soap *soap, const char *s) -{ struct Namespace *p; - char *t; - int n; - if (!s || *s != '"') - return s; - s++; - if ((p = soap->local_namespaces)) - { for (; p->id; p++) - { if (p->ns) - if (!soap_tag_cmp(s, p->ns)) - break; - if (p->in) - if (!soap_tag_cmp(s, p->in)) - break; - } - if (p && p->id) - { s = strchr(s, '"'); - if (s) - { t = (char*)soap_malloc(soap, strlen(p->id) + strlen(s)); - strcpy(t, p->id); - strcat(t, s + 1); - return t; - } - } - } - t = (char*)strchr(s, '"'); - if (t) - n = t - s; - else - n = 0; - t = soap_strdup(soap, s); - t[n] = '\0'; - sprintf(soap->tmpbuf, "xmlns:_%lu", soap->idnum++); - soap_set_attr(soap, soap->tmpbuf, t); - s = strchr(s, '"'); - if (s) - { t = (char*)soap_malloc(soap, strlen(soap->tmpbuf) + strlen(s) - 6); - strcpy(t, soap->tmpbuf + 6); - strcat(t, s + 1); - } - return t; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_outstring(struct soap *soap, const char *tag, int id, char *const*p, const char *type, int n) -{ id = soap_element_id(soap, tag, id, *p, NULL, 0, type, n); - if (id < 0 - || soap_element_begin_out(soap, tag, id, type) - || soap_string_out(soap, *p, 0) - || soap_element_end_out(soap, tag)) - return soap->error; - return SOAP_OK; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -char ** -SOAP_FMAC2 -soap_instring(struct soap *soap, const char *tag, char **p, const char *type, int t, int flag, long minlen, long maxlen) -{ if (soap_element_begin_in(soap, tag, 1)) - return NULL; - if (!p) - if (!(p = (char**)soap_malloc(soap, sizeof(char*)))) - return NULL; - if (soap->body) - { *p = soap_string_in(soap, flag, minlen, maxlen); - if (!*p || !(char*)soap_id_enter(soap, soap->id, *p, t, sizeof(char*), 0, NULL, NULL, NULL)) - return NULL; - } - else - *p = NULL; - p = (char**)soap_id_lookup(soap, soap->href, (void**)p, t, sizeof(char**), 0); - if (soap->body && soap_element_end_in(soap, tag)) - return NULL; - return p; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_outwstring(struct soap *soap, const char *tag, int id, wchar_t *const*p, const char *type, int n) -{ id = soap_element_id(soap, tag, id, *p, NULL, 0, type, n); - if (id < 0 - || soap_element_begin_out(soap, tag, id, type) - || soap_wstring_out(soap, *p, 0) - || soap_element_end_out(soap, tag)) - return soap->error; - return SOAP_OK; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -wchar_t ** -SOAP_FMAC2 -soap_inwstring(struct soap *soap, const char *tag, wchar_t **p, const char *type, int t, long minlen, long maxlen) -{ if (soap_element_begin_in(soap, tag, 1)) - return NULL; - if (!p) - if (!(p = (wchar_t**)soap_malloc(soap, sizeof(wchar_t*)))) - return NULL; - if (soap->body) - { *p = soap_wstring_in(soap, 1, minlen, maxlen); - if (!*p || !(wchar_t*)soap_id_enter(soap, soap->id, *p, t, sizeof(wchar_t*), 0, NULL, NULL, NULL)) - return NULL; - } - else - *p = NULL; - p = (wchar_t**)soap_id_lookup(soap, soap->href, (void**)p, t, sizeof(wchar_t**), 0); - if (soap->body && soap_element_end_in(soap, tag)) - return NULL; - return p; -} -#endif - -/******************************************************************************/ -#ifndef WITH_LEAN -static time_t -soap_timegm(struct tm *T) -{ -#if defined(HAVE_TIMEGM) - return timegm(T); -#elif defined(HAVE_GETTIMEOFDAY) - struct timezone t; - struct timeval tv; - memset((void*)&t, 0, sizeof(t)); - gettimeofday(&tv, &t); - T->tm_min -= t.tz_minuteswest - (t.tz_dsttime != 0)*60; - T->tm_isdst = 0; - return mktime(T); -/* WR[ */ - /* The following define was added for VxWorks*/ -#elif defined(HAVE_MKTIME) - /* FOR VXWORKS: - vxWorks does not seem to have any variable representation of time zones, but - timezone information can be set in INSTALL_DIR/target/h/private/timeP.h header - file, by setting the ZONEBUFFER define. The ZONEBUFFER define follows this - format: - name_of_zone:<(unused)>:time_in_minutes_from_UTC:daylight_start:daylight_end - To calculate local time, the value of time_in_minutes_from_UTC is subtracted - from UTC; time_in_minutes_from_UTC must be positive. Daylight information is - expressed as mmddhh (month-day-hour), for example: - UTC::0:040102:100102 - */ - return mktime(T); -/* ]WR */ -#elif defined(HAVE_FTIME) - struct timeb t; - memset((void*)&t, 0, sizeof(t)); - t.timezone = 0; - t.dstflag = -1; - ftime(&t); - T->tm_min -= t.timezone - (t.dstflag != 0)*60; - T->tm_isdst = 0; - return mktime(T); -#else -#warning "time_t (de)serialization is not MT safe on this platform" - time_t t; - char *tz = getenv("TZ"); - putenv("TZ=UTC"); - tzset(); - t = mktime(T); - if (tz) - { char tmp[16]; - strcpy(tmp, "TZ="); - strncat(tmp, tz, 12); - tmp[15] = '\0'; - putenv(tmp); - } - else - putenv("TZ="); - tzset(); - return t; -#endif -} -#endif - -/******************************************************************************/ -#ifndef WITH_LEAN -SOAP_FMAC1 -const char* -SOAP_FMAC2 -soap_dateTime2s(struct soap *soap, time_t n) -{ struct tm T; - struct tm *pT = &T; -#if defined(HAVE_GMTIME_R) - if (gmtime_r(&n, pT)) - strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%SZ", pT); -/* WR[ */ - /* The following defines were added for VxWorks*/ -#elif defined(HAVE_PGMTIME_R) - if (gmtime_r(&n, pT)) - strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%SZ", pT); -#elif defined(HAVE_PGMTIME) - if (gmtime(&n, pT)) - strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%SZ", pT); -/* ]WR */ -#elif defined(HAVE_GMTIME) - if ((pT = gmtime(&n))) - strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%SZ", pT); -#elif defined(HAVE_GETTIMEOFDAY) - struct timezone tz; - memset((void*)&tz, 0, sizeof(tz)); -#if defined(HAVE_LOCALTIME_R) - if (localtime_r(&n, pT)) - { struct timeval tv; - gettimeofday(&tv, &tz); - strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%S", pT); - sprintf(soap->tmpbuf + strlen(soap->tmpbuf), "%+03d:%02d", -tz.tz_minuteswest/60+(tz.tz_dsttime!=0), abs(tz.tz_minuteswest)%60); - } -#else - if ((pT = localtime(&n))) - { struct timeval tv; - gettimeofday(&tv, &tz); - strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%S", pT); - sprintf(soap->tmpbuf + strlen(soap->tmpbuf), "%+03d:%02d", -tz.tz_minuteswest/60+(tz.tz_dsttime!=0), abs(tz.tz_minuteswest)%60); - } -#endif -#elif defined(HAVE_FTIME) - struct timeb t; - memset((void*)&t, 0, sizeof(t)); -#if defined(HAVE_LOCALTIME_R) - if (localtime_r(&n, pT)) - { ftime(&t); - strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%S", pT); - sprintf(soap->tmpbuf + strlen(soap->tmpbuf), "%+03d:%02d", -t.timezone/60+(t.dstflag!=0), abs(t.timezone)%60); - } -/* WR[ */ - /* The following defines were added for VxWorks*/ -#elif defined(HAVE_PLOCALTIME_R) - if (localtime_r(&n, pT)) - { strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%S", pT); - sprintf(soap->tmpbuf+strlen(soap->tmpbuf), "%+03d:%02d", t.timezone/60, abs(t.timezone)%60); - } -/* ]WR */ -#else - if ((pT = localtime(&n))) - { ftime(&t); - strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%S", pT); - sprintf(soap->tmpbuf + strlen(soap->tmpbuf), "%+03d:%02d", -t.timezone/60+(t.dstflag!=0), abs(t.timezone)%60); - } -#endif -#elif defined(HAVE_LOCALTIME_R) - if (localtime_r(&n, pT)) - strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%S", pT); -/* WR[ */ - /* The following defines were added for VxWorks*/ -#elif defined(HAVE_PLOCALTIME_R) - if (localtime_r(&n, pT)) - strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%S", pT); -/* ]WR */ -#else - if ((pT = localtime(&n))) - strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%S", pT); -#endif - else - strcpy(soap->tmpbuf, "1969-12-31T23:59:59Z"); - return soap->tmpbuf; -} -#endif - -/******************************************************************************/ -#ifndef WITH_LEAN -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_outdateTime(struct soap *soap, const char *tag, int id, const time_t *p, const char *type, int n) -{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type) - || soap_string_out(soap, soap_dateTime2s(soap, *p), 0)) - return soap->error; - return soap_element_end_out(soap, tag); -} -#endif - -/******************************************************************************/ -#ifndef WITH_LEAN -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_s2dateTime(struct soap *soap, const char *s, time_t *p) -{ if (s) - { struct tm T; - char zone[16]; - memset((void*)&T, 0, sizeof(T)); - zone[sizeof(zone)-1] = '\0'; - sscanf(s, "%d-%d-%dT%d:%d:%d%15s", &T.tm_year, &T.tm_mon, &T.tm_mday, &T.tm_hour, &T.tm_min, &T.tm_sec, zone); - if (T.tm_year == 1) - T.tm_year = 70; - else - T.tm_year -= 1900; - T.tm_mon--; - if (*zone) - { if (*zone == '.') - { for (s = zone + 1; *s; s++) - if (*s < '0' || *s > '9') - break; - } - else - s = zone; - if (*s != 'Z') - { int h = 0, m = 0; - sscanf(s, "%d:%d", &h, &m); - T.tm_hour -= h; - if (h >= 0) - T.tm_min -= m; - else - T.tm_min += m; - } - *p = soap_timegm(&T); - } - else - *p = mktime(&T); /* no time zone: suppose it is localtime? */ - } - return soap->error; -} -#endif - -/******************************************************************************/ -#ifndef WITH_LEAN -SOAP_FMAC1 -time_t * -SOAP_FMAC2 -soap_indateTime(struct soap *soap, const char *tag, time_t *p, const char * type, int t) -{ if (soap_element_begin_in(soap, tag, 0)) - return NULL; - if (*soap->type - && soap_match_tag(soap, soap->type, type) - && soap_match_tag(soap, soap->type, ":dateTime")) - { soap->error = SOAP_TYPE; - soap_revert(soap); - return NULL; - } - p = (time_t*)soap_id_enter(soap, soap->id, p, t, sizeof(time_t), 0, NULL, NULL, NULL); - if (p) - { if (soap_s2dateTime(soap, soap_value(soap), p)) - return NULL; - } - p = (time_t*)soap_id_forward(soap, soap->href, p, t, 0, sizeof(time_t), 0, NULL); - if (soap->body && soap_element_end_in(soap, tag)) - return NULL; - return p; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_outliteral(struct soap *soap, const char *tag, char *const*p) -{ int i; - const char *t = NULL; - if (tag && *tag != '-') - { if ((t = strchr(tag, ':'))) - { strncpy(soap->tmpbuf, tag, t-tag); - soap->tmpbuf[t-tag] = '\0'; - for (i = 0; soap->local_namespaces[i].id; i++) - if (!strcmp(soap->tmpbuf, soap->local_namespaces[i].id)) - break; - t++; - sprintf(soap->tmpbuf, "<%s xmlns=\"%s\">", t, soap->local_namespaces[i].ns ? soap->local_namespaces[i].ns : SOAP_STR_EOS); - } - else - { t = tag; - sprintf(soap->tmpbuf, "<%s>", tag); - } - if (soap_send(soap, soap->tmpbuf)) - return soap->error; - } - if (p && *p) - { if (soap_send(soap, *p)) - return soap->error; - } - if (t) - { sprintf(soap->tmpbuf, "", t); - return soap_send(soap, soap->tmpbuf); - } - return SOAP_OK; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -char ** -SOAP_FMAC2 -soap_inliteral(struct soap *soap, const char *tag, char **p) -{ if (soap_element_begin_in(soap, tag, 1)) - return NULL; - if (!p) - if (!(p = (char**)soap_malloc(soap, sizeof(char*)))) - return NULL; - if (soap->null) - *p = NULL; - else if (soap->body) - *p = soap_string_in(soap, 0, -1, -1); - else - *p = NULL; - if (soap->body && soap_element_end_in(soap, tag)) - return NULL; - return p; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_outwliteral(struct soap *soap, const char *tag, wchar_t *const*p) -{ int i; - const char *t = NULL; - wchar_t c; - const wchar_t *s; - if (tag && *tag != '-') - { if (tag && (t = strchr(tag, ':'))) - { strncpy(soap->tmpbuf, tag, t-tag); - soap->tmpbuf[t-tag] = '\0'; - for (i = 0; soap->local_namespaces[i].id; i++) - if (!strcmp(soap->tmpbuf, soap->local_namespaces[i].id)) - break; - t++; - sprintf(soap->tmpbuf, "<%s xmlns=\"%s\">", t, soap->local_namespaces[i].ns ? soap->local_namespaces[i].ns : SOAP_STR_EOS); - } - else - { t = tag; - sprintf(soap->tmpbuf, "<%s>", tag); - } - if (soap_send(soap, soap->tmpbuf)) - return soap->error; - } - if (p) - { s = *p; - while ((c = *s++)) - if (soap_pututf8(soap, (unsigned char)c)) - return soap->error; - } - if (t) - { sprintf(soap->tmpbuf, "", t); - return soap_send(soap, soap->tmpbuf); - } - return SOAP_OK; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -wchar_t ** -SOAP_FMAC2 -soap_inwliteral(struct soap *soap, const char *tag, wchar_t **p) -{ if (soap_element_begin_in(soap, tag, 1)) - return NULL; - if (!p) - if (!(p = (wchar_t**)soap_malloc(soap, sizeof(wchar_t*)))) - return NULL; - if (soap->null) - *p = NULL; - else if (soap->body) - *p = soap_wstring_in(soap, 0, -1, -1); - else - *p = NULL; - if (soap->body && soap_element_end_in(soap, tag)) - return NULL; - return p; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -const char * -SOAP_FMAC2 -soap_value(struct soap *soap) -{ size_t i; - soap_wchar c = 0; - char *s = soap->tmpbuf; - if (!soap->body) - return SOAP_STR_EOS; - for (i = 0; i < sizeof(soap->tmpbuf) - 1; i++) - { c = soap_get(soap); - if (c == SOAP_TT || (int)c == EOF || soap_blank(c)) - break; - *s++ = (char)c; - } - if ((int)c == EOF || c == SOAP_TT) - soap_unget(soap, c); - *s = '\0'; - return soap->tmpbuf; /* return non-null pointer */ -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_getline(struct soap *soap, char *s, int len) -{ int i = len; - soap_wchar c = 0; - for (;;) - { while (--i > 0) - { c = soap_getchar(soap); - if (c == '\r') - break; - if ((int)c == EOF) - return soap->error = SOAP_EOF; - *s++ = (char)c; - } - c = soap_getchar(soap); - if (c == '\n') - { *s = '\0'; - if (i+1 == len) /* empty line: end of HTTP header */ - break; - c = soap_unget(soap, soap_getchar(soap)); - if (c != ' ' && c != '\t') /* HTTP line continuation? */ - break; - } - else if ((int)c == EOF) - return soap->error = SOAP_EOF; - } - return SOAP_OK; -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -static size_t -soap_count_attachments(struct soap *soap) -{ -#ifndef WITH_LEANER - register struct soap_multipart *content; - register size_t count = soap->count; - if (soap->mode & SOAP_ENC_DIME) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Calculating the size of DIME attachments\n")); - for (content = soap->dime.first; content; content = content->next) - { count += 12 + ((content->size+3)&(~3)); - if (content->id) - count += ((strlen(content->id)+3)&(~3)); - if (content->type) - count += ((strlen(content->type)+3)&(~3)); - if (content->options) - count += ((((unsigned char)content->options[2] << 8) | ((unsigned char)content->options[3]))+7)&(~3); - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Size of DIME attachment %lu bytes\n", (unsigned long)content->size)); - } - } - if ((soap->mode & SOAP_ENC_MIME) && soap->mime.boundary) - { register size_t n = strlen(soap->mime.boundary); - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Calculating the size of MIME attachments\n")); - for (content = soap->mime.first; content; content = content->next) - { register const char *s; - /* count \r\n--boundary\r\n */ - count += 6 + n; - /* count Content-Type: ...\r\n */ - if (content->type) - count += 16 + strlen(content->type); - s = soap_str_code(mime_codes, content->encoding); - /* count Content-Transfer-Encoding: ...\r\n */ - if (s) - count += 29 + strlen(s); - /* count Content-ID: ...\r\n */ - if (content->id) - count += 14 + strlen(content->id); - /* count Content-Location: ...\r\n */ - if (content->location) - count += 20 + strlen(content->location); - /* count Content-Description: ...\r\n */ - if (content->description) - count += 23 + strlen(content->location); - /* count \r\n...content */ - count += 2 + content->size; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Size of MIME attachment %lu bytes\n", (unsigned long)content->size)); - } - /* count \r\n--boundary--\r\n */ - count += 8 + n; - } - return count; -#else - return soap->count; -#endif -} -#endif - -/******************************************************************************/ -#ifndef WITH_LEANER -#ifndef PALM_1 -static int -soap_putdimefield(struct soap *soap, const char *s, size_t n) -{ if (soap_send_raw(soap, s, n)) - return soap->error; - return soap_send_raw(soap, SOAP_STR_PADDING, -(long)n&3); -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_LEANER -#ifndef PALM_1 -SOAP_FMAC1 -char * -SOAP_FMAC2 -soap_dime_option(struct soap *soap, unsigned short optype, const char *option) -{ size_t n; - char *s = NULL; - if (option) - { n = strlen(option); - s = (char*)soap_malloc(soap, n + 5); - if (s) - { s[0] = optype >> 8; - s[1] = optype & 0xFF; - s[2] = n >> 8; - s[3] = n & 0xFF; - strcpy(s + 4, option); - } - } - return s; -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_LEANER -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_putdimehdr(struct soap *soap) -{ unsigned char tmp[12]; - size_t optlen = 0, idlen = 0, typelen = 0; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Put DIME header id='%s'\n", soap->dime.id?soap->dime.id:"")); - if (soap->dime.options) - optlen = (((unsigned char)soap->dime.options[2] << 8) | ((unsigned char)soap->dime.options[3])) + 4; - if (soap->dime.id) - idlen = strlen(soap->dime.id); - if (soap->dime.type) - typelen = strlen(soap->dime.type); - tmp[0] = SOAP_DIME_VERSION | (soap->dime.flags & 0x7); - tmp[1] = soap->dime.flags & 0xF0; - tmp[2] = optlen >> 8; - tmp[3] = optlen & 0xFF; - tmp[4] = idlen >> 8; - tmp[5] = idlen & 0xFF; - tmp[6] = typelen >> 8; - tmp[7] = typelen & 0xFF; - tmp[8] = soap->dime.size >> 24; - tmp[9] = (soap->dime.size >> 16) & 0xFF; - tmp[10] = (soap->dime.size >> 8) & 0xFF; - tmp[11] = soap->dime.size & 0xFF; - if (soap_send_raw(soap, (char*)tmp, 12) - || soap_putdimefield(soap, soap->dime.options, optlen) - || soap_putdimefield(soap, soap->dime.id, idlen) - || soap_putdimefield(soap, soap->dime.type, typelen)) - return soap->error; - return SOAP_OK; -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_LEANER -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_putdime(struct soap *soap) -{ struct soap_multipart *content; - if (!(soap->mode & SOAP_ENC_DIME)) - return SOAP_OK; - for (content = soap->dime.first; content; content = content->next) - { void *handle; - soap->dime.size = content->size; - soap->dime.id = content->id; - soap->dime.type = content->type; - soap->dime.options = content->options; - soap->dime.flags = SOAP_DIME_VERSION | SOAP_DIME_MEDIA; - if (soap->fdimereadopen && ((handle = soap->fdimereadopen(soap, (void*)content->ptr, content->id, content->type, content->options)) || soap->error)) - { size_t size = content->size; - if (!handle) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "fdimereadopen failed\n")); - return soap->error; - } - if (!content->size && ((soap->mode & SOAP_ENC_XML) || (soap->mode & SOAP_IO) == SOAP_IO_CHUNK || (soap->mode & SOAP_IO) == SOAP_IO_STORE)) - { size_t chunksize = sizeof(soap->tmpbuf); - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Chunked streaming DIME\n")); - do - { size = soap->fdimeread(soap, handle, soap->tmpbuf, chunksize); - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "fdimeread returned %lu bytes\n", (unsigned long)size)); - if (size < chunksize) - { soap->dime.flags &= ~SOAP_DIME_CF; - if (!content->next) - soap->dime.flags |= SOAP_DIME_ME; - } - else - soap->dime.flags |= SOAP_DIME_CF; - soap->dime.size = size; - if (soap_putdimehdr(soap) - || soap_putdimefield(soap, soap->tmpbuf, size)) - break; - if (soap->dime.id) - { soap->dime.flags &= ~(SOAP_DIME_MB | SOAP_DIME_MEDIA); - soap->dime.id = NULL; - soap->dime.type = NULL; - soap->dime.options = NULL; - } - } while (size >= chunksize); - } - else - { if (!content->next) - soap->dime.flags |= SOAP_DIME_ME; - if (soap_putdimehdr(soap)) - return soap->error; - do - { size_t bufsize; - if (size < sizeof(soap->tmpbuf)) - bufsize = size; - else - bufsize = sizeof(soap->tmpbuf); - if (!(bufsize = soap->fdimeread(soap, handle, soap->tmpbuf, bufsize))) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "fdimeread failed: insufficient data (%lu bytes remaining from %lu bytes)\n", (unsigned long)size, (unsigned long)soap->dime.size)); - soap->error = SOAP_EOF; - break; - } - if (soap_send_raw(soap, soap->tmpbuf, bufsize)) - break; - size -= bufsize; - } while (size); - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "fdimereadclose\n")); - soap_send_raw(soap, SOAP_STR_PADDING, -(long)soap->dime.size&3); - } - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "fdimereadclose\n")); - if (soap->fdimereadclose) - soap->fdimereadclose(soap, handle); - } - else - { if (!content->next) - soap->dime.flags |= SOAP_DIME_ME; - if (soap_putdimehdr(soap) - || soap_putdimefield(soap, (char*)content->ptr, content->size)) - return soap->error; - } - } - return SOAP_OK; -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_LEANER -#ifndef PALM_1 -static char * -soap_getdimefield(struct soap *soap, size_t n) -{ register soap_wchar c; - register int i; - register char *s; - char *p = NULL; - if (n) - { p = (char*)soap_malloc(soap, n + 1); - if (p) - { s = p; - for (i = n; i > 0; i--) - { if ((int)(c = soap_get1(soap)) == EOF) - { soap->error = SOAP_EOF; - return NULL; - } - *s++ = (char)c; - } - *s = '\0'; - if ((soap->error = soap_move(soap, -(long)n&3))) - return NULL; - } - else - soap->error = SOAP_EOM; - } - return p; -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_LEANER -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_getdimehdr(struct soap *soap) -{ register soap_wchar c; - register char *s; - register int i; - unsigned char tmp[12]; - size_t optlen, idlen, typelen; - if (!(soap->mode & SOAP_ENC_DIME)) - return soap->error = SOAP_DIME_END; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Get DIME header\n")); - if (soap->dime.buflen || soap->dime.chunksize) - { if (soap_move(soap, (long)(soap->dime.size - soap_tell(soap)))) - return soap->error = SOAP_EOF; - soap_unget(soap, soap_getchar(soap)); /* skip padding and get hdr */ - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "... From chunked\n")); - return SOAP_OK; - } - s = (char*)tmp; - for (i = 12; i > 0; i--) - { if ((int)(c = soap_getchar(soap)) == EOF) - return soap->error = SOAP_EOF; - *s++ = (char)c; - } - if ((tmp[0] & 0xF8) != SOAP_DIME_VERSION) - return soap->error = SOAP_DIME_MISMATCH; - soap->dime.flags = (tmp[0] & 0x7) | (tmp[1] & 0xF0); - optlen = (tmp[2] << 8) | tmp[3]; - idlen = (tmp[4] << 8) | tmp[5]; - typelen = (tmp[6] << 8) | tmp[7]; - soap->dime.size = (tmp[8] << 24) | (tmp[9] << 16) | (tmp[10] << 8) | tmp[11]; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "DIME size=%lu flags=0x%X\n", (unsigned long)soap->dime.size, soap->dime.flags)); - if (!(soap->dime.options = soap_getdimefield(soap, optlen)) && soap->error) - return soap->error; - if (!(soap->dime.id = soap_getdimefield(soap, idlen)) && soap->error) - return soap->error; - if (!(soap->dime.type = soap_getdimefield(soap, typelen)) && soap->error) - return soap->error; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "DIME id=%s, type=%s, options=%s\n", soap->dime.id?soap->dime.id:"", soap->dime.type?soap->dime.type:"", soap->dime.options?soap->dime.options+4:"")); - if (soap->dime.flags & SOAP_DIME_ME) - soap->mode &= ~SOAP_ENC_DIME; - return SOAP_OK; -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_LEANER -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_getdime(struct soap *soap) -{ struct soap_multipart *content; - if (soap_getdimehdr(soap)) - return soap->error; - if (soap->fdimewriteopen && ((soap->dime.ptr = (char*)soap->fdimewriteopen(soap, soap->dime.id, soap->dime.type, soap->dime.options)) || soap->error)) - { const char *id, *type, *options; - size_t size, n; - if (!soap->dime.ptr) - return soap->error; - id = soap->dime.id; - type = soap->dime.type; - options = soap->dime.options; - for (;;) - { size = soap->dime.size; - for (;;) - { n = soap->buflen - soap->bufidx; - if (size < n) - n = size; - if ((soap->error = soap->fdimewrite(soap, (void*)soap->dime.ptr, soap->buf + soap->bufidx, n))) - break; - size -= n; - if (!size) - { soap->bufidx += n; - break; - } - if (soap_recv(soap)) - { soap->error = SOAP_EOF; - goto end; - } - } - if (soap_move(soap, -(long)soap->dime.size&3)) - { soap->error = SOAP_EOF; - break; - } - if (!(soap->dime.flags & SOAP_DIME_CF)) - break; - if (soap_getdimehdr(soap)) - break; - } -end: - if (soap->fdimewriteclose) - soap->fdimewriteclose(soap, (void*)soap->dime.ptr); - soap->dime.size = 0; - soap->dime.id = id; - soap->dime.type = type; - soap->dime.options = options; - } - else if (soap->dime.flags & SOAP_DIME_CF) - { const char *id, *type, *options; - register soap_wchar c; - register char *s; - register int i; - id = soap->dime.id; - type = soap->dime.type; - options = soap->dime.options; - if (soap_new_block(soap)) - return SOAP_EOM; - for (;;) - { s = (char*)soap_push_block(soap, soap->dime.size); - if (!s) - return soap->error = SOAP_EOM; - for (i = soap->dime.size; i > 0; i--) - { if ((int)(c = soap_get1(soap)) == EOF) - return soap->error = SOAP_EOF; - *s++ = (char)c; - } - if (soap_move(soap, -(long)soap->dime.size&3)) - return soap->error = SOAP_EOF; - if (!(soap->dime.flags & SOAP_DIME_CF)) - break; - if (soap_getdimehdr(soap)) - return soap->error; - } - soap->dime.size = soap->blist->size++; /* allocate one more for '\0' */ - if (!(soap->dime.ptr = soap_save_block(soap, NULL, 0))) - return soap->error; - soap->dime.ptr[soap->dime.size] = '\0'; /* force 0-terminated */ - soap->dime.id = id; - soap->dime.type = type; - soap->dime.options = options; - } - else - soap->dime.ptr = soap_getdimefield(soap, soap->dime.size); - content = soap_new_multipart(soap, &soap->dime.first, &soap->dime.last, soap->dime.ptr, soap->dime.size); - if (!content) - return soap->error = SOAP_EOM; - content->id = soap->dime.id; - content->type = soap->dime.type; - content->options = soap->dime.options; - return soap->error; -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_LEANER -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_getmimehdr(struct soap *soap) -{ struct soap_multipart *content; - do - { if (soap_getline(soap, soap->msgbuf, sizeof(soap->msgbuf))) - return soap->error; - } - while (!*soap->msgbuf); - if (soap->msgbuf[0] == '-' && soap->msgbuf[1] == '-') - { char *s = soap->msgbuf + strlen(soap->msgbuf) - 1; - /* remove white space */ - while (soap_blank(*s)) - s--; - s[1] = '\0'; - if (soap->mime.boundary) - { if (strcmp(soap->msgbuf + 2, soap->mime.boundary)) - return soap->error = SOAP_MIME_ERROR; - } - else - soap->mime.boundary = soap_strdup(soap, soap->msgbuf + 2); - if (soap_getline(soap, soap->msgbuf, sizeof(soap->msgbuf))) - return soap->error; - } - if (soap_set_mime_attachment(soap, NULL, 0, SOAP_MIME_NONE, NULL, NULL, NULL, NULL)) - return soap->error = SOAP_EOM; - content = soap->mime.last; - for (;;) - { register char *key = soap->msgbuf; - register char *val; - if (!*key) - break; - DBGLOG(TEST,SOAP_MESSAGE(fdebug, "MIME header: %s\n", key)); - val = strchr(soap->msgbuf, ':'); - if (val) - { *val = '\0'; - do val++; - while (*val && *val <= 32); - if (!soap_tag_cmp(key, "Content-ID")) - content->id = soap_strdup(soap, val); - else if (!soap_tag_cmp(key, "Content-Location")) - content->location = soap_strdup(soap, val); - else if (!soap_tag_cmp(key, "Content-Type")) - content->type = soap_strdup(soap, val); - else if (!soap_tag_cmp(key, "Content-Description")) - content->description = soap_strdup(soap, val); - else if (!soap_tag_cmp(key, "Content-Transfer-Encoding")) - content->encoding = (enum soap_mime_encoding)soap_int_code(mime_codes, val, (long)SOAP_MIME_NONE); - } - if (soap_getline(soap, key, sizeof(soap->msgbuf))) - return soap->error; - } - return SOAP_OK; -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_LEANER -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_getmime(struct soap *soap) -{ register soap_wchar c; - if (!soap->mime.last) - return SOAP_OK; - for (;;) - { register size_t i, m = 0; - register char *s; - struct soap_multipart *content = soap->mime.last; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Parsing MIME content id=%s type=%s\n", content->id?content->id:"", content->type?content->type:"")); - if (soap_new_block(soap)) - return soap->error = SOAP_EOM; - for (;;) - { register char *t = NULL; - if (!(s = (char*)soap_push_block(soap, SOAP_BLKLEN))) - return soap->error = SOAP_EOM; - for (i = 0; i < SOAP_BLKLEN; i++) - { if (m > 0) - { *s++ = *t++; - m--; - } - else - { c = soap_get1(soap); - if ((int)c == EOF) - return soap->error = SOAP_EOF; - if (c == '\r') - { t = soap->tmpbuf; - strcpy(t, "\n--"); - strncat(t, soap->mime.boundary, sizeof(soap->tmpbuf)-3); - t[sizeof(soap->tmpbuf)-1] = '\0'; - do c = soap_getchar(soap); - while (c == *t++); - if ((int)c == EOF) - return soap->error = SOAP_EOF; - if (!*--t) - goto end; - *t = (char)c; - m = t - soap->tmpbuf + 1; - t = soap->tmpbuf; - c = '\r'; - } - *s++ = (char)c; - } - } - } -end: - *s = '\0'; /* force 0-terminated */ - content->size = soap_size_block(soap, i+1)-1; - content->ptr = soap_save_block(soap, NULL, 0); - if (c == '-' && soap_getchar(soap) == '-') - break; - while (c != '\r' && (int)c != EOF && soap_blank(c)) - c = soap_getchar(soap); - if (c != '\r' || soap_getchar(soap) != '\n') - return soap->error = SOAP_MIME_ERROR; - if (soap_getmimehdr(soap)) - return soap->error; - } - do c = soap_getchar(soap); - while ((int)c != EOF && c != '\r'); - if ((int)c == EOF) - return soap->error = SOAP_EOF; - if (soap_getchar(soap) != '\n') - return soap->error = SOAP_MIME_ERROR; - return SOAP_OK; -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_LEANER -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_putmimehdr(struct soap *soap, struct soap_multipart *content) -{ const char *s; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "MIME attachment type=%s\n", content->type?content->type:"")); - if (soap_send3(soap, "\r\n--", soap->mime.boundary, "\r\n")) - return soap->error; - if (content->type && soap_send3(soap, "Content-Type: ", content->type, "\r\n")) - return soap->error; - s = soap_str_code(mime_codes, content->encoding); - if (s && soap_send3(soap, "Content-Transfer-Encoding: ", s, "\r\n")) - return soap->error; - if (content->id && soap_send3(soap, "Content-ID: ", content->id, "\r\n")) - return soap->error; - if (content->location && soap_send3(soap, "Content-Location: ", content->location, "\r\n")) - return soap->error; - if (content->description && soap_send3(soap, "Content-Description: ", content->description, "\r\n")) - return soap->error; - return soap_send_raw(soap, "\r\n", 2); -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_LEANER -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_putmime(struct soap *soap) -{ struct soap_multipart *content; - if (!(soap->mode & SOAP_ENC_MIME) || !soap->mime.boundary) - return SOAP_OK; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Sending MIME attachments\n")); - for (content = soap->mime.first; content; content = content->next) - if (soap_putmimehdr(soap, content) - || soap_send_raw(soap, content->ptr, content->size)) - return soap->error; - return soap_send3(soap, "\r\n--", soap->mime.boundary, "--\r\n"); -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_LEANER -#ifndef PALM_1 -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_set_dime(struct soap *soap) -{ soap->omode |= SOAP_ENC_DIME; - soap->dime.first = NULL; - soap->dime.last = NULL; -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_LEANER -#ifndef PALM_1 -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_set_mime(struct soap *soap, const char *boundary, const char *start) -{ soap->omode |= SOAP_ENC_MIME; - soap->mime.first = NULL; - soap->mime.last = NULL; - soap->mime.boundary = soap_strdup(soap, boundary); - soap->mime.start = soap_strdup(soap, start); -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_LEANER -#ifndef PALM_1 -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_clr_dime(struct soap *soap) -{ soap->omode &= ~SOAP_ENC_DIME; - soap->dime.first = NULL; - soap->dime.last = NULL; -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_LEANER -#ifndef PALM_1 -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_clr_mime(struct soap *soap) -{ soap->omode &= ~SOAP_ENC_MIME; - soap->mime.first = NULL; - soap->mime.last = NULL; - soap->mime.boundary = NULL; - soap->mime.start = NULL; -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_LEANER -#ifndef PALM_1 -static struct soap_multipart* -soap_new_multipart(struct soap *soap, struct soap_multipart **first, struct soap_multipart **last, char *ptr, size_t size) -{ struct soap_multipart *content; - content = (struct soap_multipart*)soap_malloc(soap, sizeof(struct soap_multipart)); - if (content) - { content->next = NULL; - content->ptr = ptr; - content->size = size; - content->id = NULL; - content->type = NULL; - content->options = NULL; - content->encoding = SOAP_MIME_NONE; - content->location = NULL; - content->description = NULL; - if (!*first) - *first = content; - if (*last) - (*last)->next = content; - *last = content; - } - return content; -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_LEANER -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_set_dime_attachment(struct soap *soap, char *ptr, size_t size, const char *type, const char *id, unsigned short optype, const char *option) -{ struct soap_multipart *content = soap_new_multipart(soap, &soap->dime.first, &soap->dime.last, ptr, size); - if (!content) - return SOAP_EOM; - content->id = soap_strdup(soap, id); - content->type = soap_strdup(soap, type); - content->options = soap_dime_option(soap, optype, option); - return SOAP_OK; -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_LEANER -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_set_mime_attachment(struct soap *soap, char *ptr, size_t size, enum soap_mime_encoding encoding, const char *type, const char *id, const char *location, const char *description) -{ struct soap_multipart *content = soap_new_multipart(soap, &soap->mime.first, &soap->mime.last, ptr, size); - if (!content) - return SOAP_EOM; - content->id = soap_strdup(soap, id); - content->type = soap_strdup(soap, type); - content->encoding = encoding; - content->location = soap_strdup(soap, location); - content->description = soap_strdup(soap, description); - return SOAP_OK; -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_LEANER -#ifndef PALM_1 -SOAP_FMAC1 -struct soap_multipart* -SOAP_FMAC2 -soap_next_multipart(struct soap_multipart *content) -{ if (content) - return content->next; - return NULL; -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_LEANER -#ifndef PALM_1 -static void -soap_select_mime_boundary(struct soap *soap) -{ while (!soap->mime.boundary || soap_valid_mime_boundary(soap)) - { register char *s = soap->mime.boundary; - register size_t n = 0; - if (s) - n = strlen(s); - if (n < 16) - { n = 72; - s = soap->mime.boundary = (char*)soap_malloc(soap, n); - if (!s) - return; - } - strcpy(s, "<>"); - s += 2; - n -= 4; - while (n) - { *s++ = soap_base64o[rand()&0x3F]; - n--; - } - *s = '\0'; - strcat(s, "<>"); - } - if (!soap->mime.start) - soap->mime.start = ""; -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_LEANER -#ifndef PALM_1 -static int -soap_valid_mime_boundary(struct soap *soap) -{ register struct soap_multipart *content; - register size_t k = strlen(soap->mime.boundary); - for (content = soap->mime.first; content; content = content->next) - { if (content->ptr && content->size >= k) - { register const char *p = (const char*)content->ptr; - register size_t i; - for (i = 0; i < content->size - k; i++, p++) - if (!strncmp(p, soap->mime.boundary, k)) - return SOAP_ERR; - } - } - return SOAP_OK; -} -#endif -#endif - -/******************************************************************************/ - -#ifdef WITH_COOKIES -/******************************************************************************/ -SOAP_FMAC1 -size_t -SOAP_FMAC2 -soap_encode_cookie(const char *s, char *t, size_t len) -{ register int c; - register size_t n = len; - while ((c = *s++) && --n > 0) - { if (c > ' ' && c < 128 && c != ';' && c != ',') - *t++ = c; - else if (n > 2) - { *t++ = '%'; - *t++ = (c >> 4) + (c > 159 ? '7' : '0'); - c &= 0xF; - *t++ = c + (c > 9 ? '7' : '0'); - n -= 2; - } - else - break; - } - *t = '\0'; - return len - n; -} - -/******************************************************************************/ -SOAP_FMAC1 -struct soap_cookie* -SOAP_FMAC2 -soap_cookie(struct soap *soap, const char *name, const char *domain, const char *path) -{ struct soap_cookie *p; - size_t n; - if (!domain) - domain = soap->cookie_domain; - if (!path) - path = soap->cookie_path; - if (*path == '/') - path++; - n = strlen(path); - for (p = soap->cookies; p; p = p->next) - if (!strcmp(p->name, name) - && domain - && p->domain - && !strcmp(p->domain, domain) - && !strncmp(p->path, path, n)) - break; - return p; -} - -/******************************************************************************/ -SOAP_FMAC1 -struct soap_cookie* -SOAP_FMAC2 -soap_set_cookie(struct soap *soap, const char *name, const char *value, const char *domain, const char *path) -{ struct soap_cookie **p, *q; - int n; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Set cookie: %s=%s domain=%s path=%s\n", name, value?value:"", domain?domain:"", path?path:"")); - if (!domain) - domain = soap->cookie_domain; - if (!path) - path = soap->cookie_path; - if (!path) - { soap_set_receiver_error(soap, "Cookie path not set", NULL, SOAP_HTTP_ERROR); - return NULL; - } - if (*path == '/') - path++; - q = soap_cookie(soap, name, domain, path); - if (!q) - { if ((q = (struct soap_cookie*)SOAP_MALLOC(sizeof(struct soap_cookie)))) - { if ((q->name = (char*)SOAP_MALLOC(strlen(name)+1))) - strcpy(q->name, name); - q->value = NULL; - q->domain = NULL; - q->path = NULL; - q->expire = -1; - q->version = 0; - q->secure = 0; - q->env = 0; - q->modified = 0; - for (p = &soap->cookies, n = soap->cookie_max; *p && n; p = &(*p)->next, n--) - if (!strcmp((*p)->name, name) && (*p)->path && strcmp((*p)->path, path) < 0) - break; - if (n) - { q->next = *p; - *p = q; - } - else - { SOAP_FREE(q->name); - SOAP_FREE(q); - q = NULL; - } - } - } - else - q->modified = 1; - if (q) - { if (q->value) - { SOAP_FREE(q->value); - q->value = NULL; - } - if (q->domain) - { SOAP_FREE(q->domain); - q->domain = NULL; - } - if (q->path) - { SOAP_FREE(q->path); - q->path = NULL; - } - if (value && *value && (q->value = (char*)SOAP_MALLOC(strlen(value)+1))) - strcpy(q->value, value); - if (domain && *domain && (q->domain = (char*)SOAP_MALLOC(strlen(domain)+1))) - strcpy(q->domain, domain); - if (path && *path && (q->path = (char*)SOAP_MALLOC(strlen(path)+1))) - strcpy(q->path, path); - q->session = 1; - } - return q; -} - -/******************************************************************************/ -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_clr_cookie(struct soap *soap, const char *name, const char *domain, const char *path) -{ struct soap_cookie **p, *q; - if (!domain) - domain = soap->cookie_domain; - if (!domain) - { soap_set_receiver_error(soap, "Cookie domain not set", SOAP_STR_EOS, SOAP_HTTP_ERROR); - return; - } - if (!path) - path = soap->cookie_path; - if (!path) - { soap_set_receiver_error(soap, "Cookie path not set", SOAP_STR_EOS, SOAP_HTTP_ERROR); - return; - } - if (*path == '/') - path++; - for (p = &soap->cookies, q = *p; q; q = *p) - if (!strcmp(q->name, name) && !strcmp(q->domain, domain) && !strncmp(q->path, path, strlen(q->path))) - { if (q->value) - SOAP_FREE(q->value); - if (q->domain) - SOAP_FREE(q->domain); - if (q->path) - SOAP_FREE(q->path); - *p = q->next; - SOAP_FREE(q); - } - else - p = &q->next; -} - -/******************************************************************************/ -SOAP_FMAC1 -char * -SOAP_FMAC2 -soap_cookie_value(struct soap *soap, const char *name, const char *domain, const char *path) -{ struct soap_cookie *p; - if ((p = soap_cookie(soap, name, domain, path))) - return p->value; - return NULL; -} - -/******************************************************************************/ -SOAP_FMAC1 -long -SOAP_FMAC2 -soap_cookie_expire(struct soap *soap, const char *name, const char *domain, const char *path) -{ struct soap_cookie *p; - if ((p = soap_cookie(soap, name, domain, path))) - return p->expire; - return -1; -} - -/******************************************************************************/ -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_set_cookie_expire(struct soap *soap, const char *name, long expire, const char *domain, const char *path) -{ struct soap_cookie *p; - if ((p = soap_cookie(soap, name, domain, path))) - { p->expire = expire; - p->modified = 1; - return SOAP_OK; - } - return SOAP_ERR; -} - -/******************************************************************************/ -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_set_cookie_session(struct soap *soap, const char *name, const char *domain, const char *path) -{ struct soap_cookie *p; - if ((p = soap_cookie(soap, name, domain, path))) - { p->session = 1; - p->modified = 1; - return SOAP_OK; - } - return SOAP_ERR; -} - -/******************************************************************************/ -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_clr_cookie_session(struct soap *soap, const char *name, const char *domain, const char *path) -{ struct soap_cookie *p; - if ((p = soap_cookie(soap, name, domain, path))) - { p->session = 0; - p->modified = 1; - return SOAP_OK; - } - return SOAP_ERR; -} - -/******************************************************************************/ -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_putsetcookies(struct soap *soap) -{ struct soap_cookie *p; - char *s, tmp[4096]; - const char *t; - for (p = soap->cookies; p; p = p->next) - { if (p->modified || !p->env) - { s = tmp; - if (p->name) - s += soap_encode_cookie(p->name, s, tmp-s+4064); - if (p->value && *p->value) - { *s++ = '='; - s += soap_encode_cookie(p->value, s, tmp-s+4064); - } - if (p->domain && (int)strlen(p->domain) < tmp-s+4064) - sprintf(s, ";Domain=%s", p->domain); - else if (soap->cookie_domain && (int)strlen(soap->cookie_domain) < tmp-s+4064) - sprintf(s, ";Domain=%s", soap->cookie_domain); - strcat(s, ";Path=/"); - if (p->path) - t = p->path; - else - t = soap->cookie_path; - if (t) - { if (*t == '/') - t++; - if ((int)strlen(t) < tmp-s+4064) - strcat(s, t); - } - s += strlen(s); - if (p->version > 0) - sprintf(s, ";Version=%u", p->version); - if (p->expire >= 0) - sprintf(s, ";Max-Age=%ld", p->expire); - if (p->secure) - strcat(s, ";Secure"); - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Set-Cookie: %s\n", tmp)); - if (soap->fposthdr(soap, "Set-Cookie", tmp)) - return soap->error; - } - } - return SOAP_OK; -} - -/******************************************************************************/ -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_putcookies(struct soap *soap, const char *domain, const char *path, int secure) -{ struct soap_cookie **p, *q; - unsigned int version = 0; - time_t now = time(NULL); - char *s, tmp[4096]; - p = &soap->cookies; - while ((q = *p)) - { if (q->expire && now > q->expire) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Cookie %s expired\n", q->name)); - SOAP_FREE(q->name); - if (q->value) - SOAP_FREE(q->value); - if (q->domain) - SOAP_FREE(q->domain); - if (q->path) - SOAP_FREE(q->path); - *p = q->next; - SOAP_FREE(q); - } - else if ((!q->domain || !strcmp(q->domain, domain)) - && (!q->path || !strncmp(q->path, path, strlen(q->path))) - && (!q->secure || secure)) - { s = tmp; - if (q->version != version) - { sprintf(s, "$Version=%u;", q->version); - version = q->version; - } - if (q->name) - s += soap_encode_cookie(q->name, s, tmp-s+4080); - if (q->value && *q->value) - { *s++ = '='; - s += soap_encode_cookie(q->value, s, tmp-s+4080); - } - if (q->path && (int)strlen(q->path) < tmp-s+4080) - { sprintf(s, ";$Path=/%s", q->path); - s += strlen(s); - } - if (q->domain && (int)strlen(q->domain) < tmp-s+4080) - sprintf(s, ";$Domain=%s", q->domain); - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Cookie: %s\n", tmp)); - if (soap->fposthdr(soap, "Cookie", tmp)) - return soap->error; - p = &q->next; - } - else - p = &q->next; - } - return SOAP_OK; -} - -/******************************************************************************/ -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_getcookies(struct soap *soap, const char *val) -{ struct soap_cookie *p = NULL, *q; - const char *s; - char *t, tmp[4096]; /* cookie size is up to 4096 bytes [RFC2109] */ - char *domain = NULL; - char *path = NULL; - unsigned int version = 0; - time_t now = time(NULL); - if (!val) - return; - s = val; - while (*s) - { s = soap_decode_key(tmp, sizeof(tmp), s); - if (!soap_tag_cmp(tmp, "$Version")) - { if ((s = soap_decode_val(tmp, sizeof(tmp), s))) - { if (p) - p->version = (int)atol(tmp); - else - version = (int)atol(tmp); - } - } - else if (!soap_tag_cmp(tmp, "$Path")) - { s = soap_decode_val(tmp, sizeof(tmp), s); - if (*tmp) - { if ((t = (char*)SOAP_MALLOC(strlen(tmp)+1))) - strcpy(t, tmp); - } - else - t = NULL; - if (p) - { if (p->path) - SOAP_FREE(p->path); - p->path = t; - } - else - { if (path) - SOAP_FREE(path); - path = t; - } - } - else if (!soap_tag_cmp(tmp, "$Domain")) - { s = soap_decode_val(tmp, sizeof(tmp), s); - if (*tmp) - { if ((t = (char*)SOAP_MALLOC(strlen(tmp)+1))) - strcpy(t, tmp); - } - else - t = NULL; - if (p) - { if (p->domain) - SOAP_FREE(p->domain); - p->domain = t; - } - else - { if (domain) - SOAP_FREE(domain); - domain = t; - } - } - else if (p && !soap_tag_cmp(tmp, "Path")) - { if (p->path) - SOAP_FREE(p->path); - s = soap_decode_val(tmp, sizeof(tmp), s); - if (*tmp) - { if ((p->path = (char*)SOAP_MALLOC(strlen(tmp)+1))) - strcpy(p->path, tmp); - } - else - p->path = NULL; - } - else if (p && !soap_tag_cmp(tmp, "Domain")) - { if (p->domain) - SOAP_FREE(p->domain); - s = soap_decode_val(tmp, sizeof(tmp), s); - if (*tmp) - { if ((p->domain = (char*)SOAP_MALLOC(strlen(tmp)+1))) - strcpy(p->domain, tmp); - } - else - p->domain = NULL; - } - else if (p && !soap_tag_cmp(tmp, "Version")) - { s = soap_decode_val(tmp, sizeof(tmp), s); - p->version = (unsigned int)atol(tmp); - } - else if (p && !soap_tag_cmp(tmp, "Max-Age")) - { s = soap_decode_val(tmp, sizeof(tmp), s); - p->expire = now + atol(tmp); - } - else if (p && !soap_tag_cmp(tmp, "Expires")) - { struct tm T; - char a[3]; - static const char mns[] = "anebarprayunulugepctovec"; - s = soap_decode_val(tmp, sizeof(tmp), s); - if (strlen(tmp) > 20) - { memset((void*)&T, 0, sizeof(T)); - a[0] = tmp[4]; - a[1] = tmp[5]; - a[2] = '\0'; - T.tm_mday = (int)atol(a); - a[0] = tmp[8]; - a[1] = tmp[9]; - T.tm_mon = (strstr(mns, a) - mns) / 2; - a[0] = tmp[11]; - a[1] = tmp[12]; - T.tm_year = 100 + (int)atol(a); - a[0] = tmp[13]; - a[1] = tmp[14]; - T.tm_hour = (int)atol(a); - a[0] = tmp[16]; - a[1] = tmp[17]; - T.tm_min = (int)atol(a); - a[0] = tmp[19]; - a[1] = tmp[20]; - T.tm_sec = (int)atol(a); - p->expire = soap_timegm(&T); - } - } - else if (p && !soap_tag_cmp(tmp, "Secure")) - p->secure = 1; - else - { if (p) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Got environment cookie %s=%s domain=%s path=%s expire=%ld secure=%d\n", p->name, p->value?p->value:"", p->domain?p->domain:"", p->path?p->path:"", p->expire, p->secure)); - if ((q = soap_set_cookie(soap, p->name, p->value, p->domain, p->path))) - { q->version = p->version; - q->expire = p->expire; - q->secure = p->secure; - q->env = 1; - } - if (p->name) - SOAP_FREE(p->name); - if (p->value) - SOAP_FREE(p->value); - if (p->domain) - SOAP_FREE(p->domain); - if (p->path) - SOAP_FREE(p->path); - SOAP_FREE(p); - } - if ((p = (struct soap_cookie*)SOAP_MALLOC(sizeof(struct soap_cookie)))) - { p->name = (char*)SOAP_MALLOC(strlen(tmp)+1); - strcpy(p->name, tmp); - s = soap_decode_val(tmp, sizeof(tmp), s); - if (*tmp) - { p->value = (char*)SOAP_MALLOC(strlen(tmp)+1); - strcpy(p->value, tmp); - } - else - p->value = NULL; - p->domain = domain; - p->path = path; - p->expire = 0; - p->secure = 0; - p->version = version; - } - } - } - if (p) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Got cookie %s=%s domain=%s path=%s expire=%ld secure=%d\n", p->name, p->value?p->value:"", p->domain?p->domain:"", p->path?p->path:"", p->expire, p->secure)); - if ((q = soap_set_cookie(soap, p->name, p->value, p->domain, p->path))) - { q->version = p->version; - q->expire = p->expire; - q->secure = p->secure; - } - if (p->name) - SOAP_FREE(p->name); - if (p->value) - SOAP_FREE(p->value); - if (p->domain) - SOAP_FREE(p->domain); - if (p->path) - SOAP_FREE(p->path); - SOAP_FREE(p); - } - if (domain) - SOAP_FREE(domain); - if (path) - SOAP_FREE(path); -} - -/******************************************************************************/ -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_getenv_cookies(struct soap *soap) -{ struct soap_cookie *p; - const char *s; - char key[4096], val[4096]; /* cookie size is up to 4096 bytes [RFC2109] */ - if (!(s = getenv("HTTP_COOKIE"))) - return SOAP_ERR; - do - { s = soap_decode_key(key, sizeof(key), s); - s = soap_decode_val(val, sizeof(val), s); - p = soap_set_cookie(soap, key, val, NULL, NULL); - if (p) - p->env = 1; - } while (*s); - return SOAP_OK; -} - -/******************************************************************************/ -SOAP_FMAC1 -struct soap_cookie* -SOAP_FMAC2 -soap_copy_cookies(struct soap *soap) -{ struct soap_cookie *p, **q, *r; - q = &r; - for (p = soap->cookies; p; p = p->next) - { if (!(*q = (struct soap_cookie*)SOAP_MALLOC(sizeof(struct soap_cookie)))) - return r; - **q = *p; - if (p->name) - { if (((*q)->name = (char*)SOAP_MALLOC(strlen(p->name)+1))) - strcpy((*q)->name, p->name); - } - if (p->value) - { if (((*q)->value = (char*)SOAP_MALLOC(strlen(p->value)+1))) - strcpy((*q)->value, p->value); - } - if (p->domain) - { if (((*q)->domain = (char*)SOAP_MALLOC(strlen(p->domain)+1))) - strcpy((*q)->domain, p->domain); - } - if (p->path) - { if (((*q)->path = (char*)SOAP_MALLOC(strlen(p->path)+1))) - strcpy((*q)->path, p->path); - } - q = &(*q)->next; - } - *q = NULL; - return r; -} - -/******************************************************************************/ -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_free_cookies(struct soap *soap) -{ struct soap_cookie *p; - for (p = soap->cookies; p; p = soap->cookies) - { soap->cookies = p->next; - SOAP_FREE(p->name); - if (p->value) - SOAP_FREE(p->value); - if (p->domain) - SOAP_FREE(p->domain); - if (p->path) - SOAP_FREE(p->path); - SOAP_FREE(p); - } -} - -/******************************************************************************/ -#endif /* WITH_COOKIES */ - -/******************************************************************************/ -#ifdef WITH_GZIP -#ifndef PALM_1 -static int -soap_getgziphdr(struct soap *soap) -{ int i; - soap_wchar c, f = 0; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Get gzip header\n")); - for (i = 0; i < 9; i++) - { if ((int)(c = soap_get1(soap) == EOF)) - return soap->error = SOAP_EOF; - if (i == 2) - f = c; - } - if (f & 0x04) /* FEXTRA */ - { for (i = soap_get1(soap) | (soap_get1(soap) << 8); i; i--) - if ((int)soap_get1(soap) == EOF) - return soap->error = SOAP_EOF; - } - if (f & 0x08) /* FNAME */ - do - c = soap_get1(soap); - while (c && (int)c != EOF); - if ((int)c != EOF && (f & 0x10)) /* FCOMMENT */ - do - c = soap_get1(soap); - while (c && (int)f != EOF); - if ((int)c != EOF && (f & 0x01)) /* FHCRC */ - { if ((int)(c = soap_get1(soap)) != EOF) - c = soap_get1(soap); - } - if ((int)c == EOF) - return soap->error = SOAP_EOF; - return SOAP_OK; -} -#endif -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_begin_recv(struct soap *soap) -{ soap_wchar c; - soap->error = SOAP_OK; - soap_free(soap); - soap_set_local_namespaces(soap); - soap->version = 0; /* don't assume we're parsing SOAP content by default */ - soap_free_iht(soap); - if ((soap->imode & SOAP_IO) == SOAP_IO_CHUNK) - soap->omode |= SOAP_IO_CHUNK; - soap->imode &= ~SOAP_IO; - soap->mode = soap->imode; - if (!soap->keep_alive) - { soap->buflen = 0; - soap->bufidx = 0; - } - if (!(soap->mode & SOAP_IO_KEEPALIVE)) - soap->keep_alive = 0; - soap->ahead = 0; - soap->peeked = 0; - soap->level = 0; - soap->part = SOAP_BEGIN; - soap->alloced = 0; - soap->count = 0; - soap->length = 0; - soap->cdata = 0; - *soap->endpoint = '\0'; - soap->userid = NULL; - soap->passwd = NULL; - soap->action = NULL; - soap->authrealm = NULL; - soap->dime.chunksize = 0; - soap->dime.buflen = 0; - soap->dime.list = NULL; - soap->dime.first = NULL; - soap->dime.last = NULL; - soap->mime.list = NULL; - soap->mime.first = NULL; - soap->mime.last = NULL; - soap->mime.boundary = NULL; - soap->mime.start = NULL; -#ifdef WIN32 -#ifndef UNDER_CE -#ifndef WITH_FASTCGI - if (!soap_valid_socket(soap->socket)) -#ifdef __BORLANDC__ - setmode((SOAP_SOCKET)soap->recvfd, O_BINARY); -#else - _setmode((SOAP_SOCKET)soap->recvfd, _O_BINARY); -#endif -#endif -#endif -#endif -#ifdef WITH_ZLIB - soap->mode &= ~SOAP_ENC_ZLIB; - soap->zlib_in = SOAP_ZLIB_NONE; - soap->zlib_out = SOAP_ZLIB_NONE; - soap->d_stream.next_in = Z_NULL; - soap->d_stream.avail_in = 0; - soap->d_stream.next_out = (Byte*)soap->buf; - soap->d_stream.avail_out = SOAP_BUFLEN; - soap->z_ratio_in = 1.0; - if (soap->fprepareinit) - soap->fprepareinit(soap); -#endif - c = soap_getchar(soap); -#ifdef WITH_GZIP - if (c == 0x1F) - { if (soap_getgziphdr(soap)) - return soap->error; - if (inflateInit2(&soap->d_stream, -MAX_WBITS) != Z_OK) - return soap->error = SOAP_ZLIB_ERROR; - soap->zlib_state = SOAP_ZLIB_INFLATE; - soap->mode |= SOAP_ENC_ZLIB; - soap->zlib_in = SOAP_ZLIB_GZIP; - soap->z_crc = crc32(0L, NULL, 0); - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "gzip initialized\n")); - memcpy(soap->z_buf, soap->buf, SOAP_BUFLEN); - /* should not chunk over plain transport, so why bother to check? */ - /* if ((soap->mode & SOAP_IO) == SOAP_IO_CHUNK) */ - /* soap->z_buflen = soap->bufidx; */ - /* else */ - soap->d_stream.next_in = (Byte*)(soap->z_buf + soap->bufidx); - soap->d_stream.avail_in = soap->buflen - soap->bufidx; - soap->z_buflen = soap->buflen; - soap->buflen = soap->bufidx; - c = soap_getchar(soap); - } -#endif - if (c == '-' && soap_get0(soap) == '-') - soap->mode |= SOAP_ENC_MIME; - else if ((c & 0xFFFC) == (SOAP_DIME_VERSION | SOAP_DIME_MB) && (soap_get0(soap) & 0xFFF0) == 0x20) - soap->mode |= SOAP_ENC_DIME; - else - { while (soap_blank(c)) - c = soap_getchar(soap); - } - if ((int)c == EOF) - return soap->error = SOAP_EOF; - soap_unget(soap, c); - if (c != '<' && !(soap->mode & (SOAP_ENC_DIME | SOAP_ENC_ZLIB))) - { soap->mode &= ~SOAP_IO; - if ((soap->error = soap->fparse(soap))) - { soap->keep_alive = 0; /* force close later */ - return soap->error; - } - if ((soap->mode & SOAP_IO) == SOAP_IO_CHUNK) - { soap->chunkbuflen = soap->buflen; - soap->buflen = soap->bufidx; - soap->chunksize = 0; - } - else if (soap->fpreparerecv && soap->buflen != soap->bufidx) - soap->fpreparerecv(soap, soap->buf + soap->bufidx, soap->buflen - soap->bufidx); -#ifdef WITH_ZLIB - if (soap->zlib_in) - { /* fparse should not use soap_unget to push back last char */ -#ifdef WITH_GZIP - c = soap_get1(soap); - if (c == 0x1F) - { if (soap_getgziphdr(soap)) - return soap->error; - if (inflateInit2(&soap->d_stream, -MAX_WBITS) != Z_OK) - return soap->error = SOAP_ZLIB_ERROR; - soap->zlib_state = SOAP_ZLIB_INFLATE; - soap->z_crc = crc32(0L, NULL, 0); - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "gzip initialized\n")); - } - else - { soap_revget1(soap); -#else - { -#endif - if (inflateInit(&soap->d_stream) != Z_OK) - return soap->error = SOAP_ZLIB_ERROR; - soap->zlib_state = SOAP_ZLIB_INFLATE; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Inflate initialized\n")); - } - soap->mode |= SOAP_ENC_ZLIB; - memcpy(soap->z_buf, soap->buf, SOAP_BUFLEN); - soap->d_stream.next_in = (Byte*)(soap->z_buf + soap->bufidx); - soap->d_stream.avail_in = soap->buflen - soap->bufidx; - soap->z_buflen = soap->buflen; - soap->buflen = soap->bufidx; - } -#endif - } -#ifndef WITH_LEANER - if (soap->mode & SOAP_ENC_MIME) - { if (soap_getmimehdr(soap)) - return soap->error; - if (soap_get_header_attribute(soap, soap->mime.first->type, "application/dime")) - soap->mode |= SOAP_ENC_DIME; - } - if (soap->mode & SOAP_ENC_DIME) - { if (soap_getdimehdr(soap)) - return soap->error; - if (soap->dime.flags & SOAP_DIME_CF) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Chunked DIME SOAP message\n")); - soap->dime.chunksize = soap->dime.size; - if (soap->buflen - soap->bufidx >= soap->dime.chunksize) - { soap->dime.buflen = soap->buflen; - soap->buflen = soap->bufidx + soap->dime.chunksize; - } - else - soap->dime.chunksize -= soap->buflen - soap->bufidx; - } - soap->count = soap->buflen - soap->bufidx; - } -#endif - return SOAP_OK; -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -static int -http_parse(struct soap *soap) -{ char header[SOAP_HDRLEN], *s; - unsigned short g = 0, k; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Waiting for response...\n")); - *soap->endpoint = '\0'; - soap->length = 0; - do - { if (soap_getline(soap, soap->msgbuf, sizeof(soap->msgbuf))) - return soap->error; - DBGLOG(TEST,SOAP_MESSAGE(fdebug, "HTTP status: %s\n", soap->msgbuf)); - for (;;) - { if (soap_getline(soap, header, SOAP_HDRLEN)) - return soap->error; - if (!*header) - break; - DBGLOG(TEST,SOAP_MESSAGE(fdebug, "HTTP header: %s\n", header)); - s = strchr(header, ':'); - if (s) - { *s = '\0'; - do s++; - while (*s && *s <= 32); - if ((soap->error = soap->fparsehdr(soap, header, s))) - return soap->error; - } - } - if ((s = strchr(soap->msgbuf, ' '))) - k = (unsigned short)soap_strtoul(s, NULL, 10); - else - k = 0; - } while (k == 100); - DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Finished HTTP header parsing\n")); - s = strstr(soap->msgbuf, "HTTP/"); - if (s && s[7] != '1') - { if (soap->keep_alive == 1) - soap->keep_alive = 0; - if (k == 0 && (soap->omode & SOAP_IO) == SOAP_IO_CHUNK) /* k == 0 for HTTP request */ - { soap->imode |= SOAP_IO_CHUNK; - soap->omode = (soap->omode & ~SOAP_IO) | SOAP_IO_STORE; - } - } - if (soap->keep_alive < 0) - soap->keep_alive = 1; - DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Keep alive connection = %d\n", soap->keep_alive)); - if (s && (((g = !strncmp(soap->msgbuf, "GET ", 4))) || !strncmp(soap->msgbuf, "POST ", 5))) - { size_t m = strlen(soap->endpoint); - size_t n = m + (s - soap->msgbuf) - 5 - (!g); - if (n >= sizeof(soap->endpoint)) - n = sizeof(soap->endpoint) - 1; - strncpy(soap->path, soap->msgbuf + 4 + (!g), n - m); - soap->path[n - m] = '\0'; - strcat(soap->endpoint, soap->path); - DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Target endpoint='%s'\n", soap->endpoint)); - if (g) - { soap->error = soap->fget(soap); - if (soap->error == SOAP_OK) - soap->error = SOAP_STOP; /* prevents further processing */ - return soap->error; - } - return SOAP_OK; - } - if (k == 0 || (k >= 200 && k <= 299) || k == 400 || k == 500) - return SOAP_OK; - return soap_set_receiver_error(soap, "HTTP error", soap->msgbuf, k); -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -static int -http_parse_header(struct soap *soap, const char *key, const char *val) -{ if (!soap_tag_cmp(key, "Host")) - { -#ifdef WITH_OPENSSL - if (soap->imode & SOAP_ENC_SSL) - strcpy(soap->endpoint, "https://"); - else -#endif - strcpy(soap->endpoint, "http://"); - strncat(soap->endpoint, val, sizeof(soap->endpoint) - 8); - soap->endpoint[sizeof(soap->endpoint) - 1] = '\0'; - } -#ifndef WITH_LEANER - else if (!soap_tag_cmp(key, "Content-Type")) - { if (soap_get_header_attribute(soap, val, "application/dime")) - soap->mode |= SOAP_ENC_DIME; - else if (soap_get_header_attribute(soap, val, "multipart/related")) - { soap->mime.boundary = soap_strdup(soap, soap_get_header_attribute(soap, val, "boundary")); - soap->mime.start = soap_strdup(soap, soap_get_header_attribute(soap, val, "start")); - soap->mode |= SOAP_ENC_MIME; - } - } -#endif - else if (!soap_tag_cmp(key, "Content-Length")) - soap->length = soap_strtoul(val, NULL, 10); - else if (!soap_tag_cmp(key, "Content-Encoding")) - { if (!soap_tag_cmp(val, "deflate")) -#ifdef WITH_ZLIB - soap->zlib_in = SOAP_ZLIB_DEFLATE; -#else - return SOAP_ZLIB_ERROR; -#endif - else if (!soap_tag_cmp(val, "gzip")) -#ifdef WITH_GZIP - soap->zlib_in = SOAP_ZLIB_GZIP; -#else - return SOAP_ZLIB_ERROR; -#endif - } -#ifdef WITH_ZLIB - else if (!soap_tag_cmp(key, "Accept-Encoding")) - { -#ifdef WITH_GZIP - if (strchr(val, '*') || soap_get_header_attribute(soap, val, "gzip")) - soap->zlib_out = SOAP_ZLIB_GZIP; - else -#endif - if (strchr(val, '*') || soap_get_header_attribute(soap, val, "deflate")) - soap->zlib_out = SOAP_ZLIB_DEFLATE; - else - soap->zlib_out = SOAP_ZLIB_NONE; - } -#endif - else if (!soap_tag_cmp(key, "Transfer-Encoding")) - { soap->mode &= ~SOAP_IO; - if (!soap_tag_cmp(val, "chunked")) - soap->mode |= SOAP_IO_CHUNK; - } - else if (!soap_tag_cmp(key, "Connection")) - { if (!soap_tag_cmp(val, "keep-alive")) - soap->keep_alive = -soap->keep_alive; - else if (!soap_tag_cmp(val, "close")) - soap->keep_alive = 0; - } -#ifndef WITH_LEAN - else if (!soap_tag_cmp(key, "Authorization")) - { if (!soap_tag_cmp(val, "Basic *")) - { size_t n; - char *s; - soap_base642s(soap, val + 6, soap->tmpbuf, sizeof(soap->tmpbuf) - 1, &n); - soap->tmpbuf[n] = '\0'; - if ((s = strchr(soap->tmpbuf, ':'))) - { *s = '\0'; - soap->userid = soap_strdup(soap, soap->tmpbuf); - soap->passwd = soap_strdup(soap, s + 1); - } - } - } - else if (!soap_tag_cmp(key, "WWW-Authenticate")) - soap->authrealm = soap_strdup(soap, soap_get_header_attribute(soap, val+6, "realm")); - else if (!soap_tag_cmp(key, "Expect")) - { if (!soap_tag_cmp(val, "100-continue")) - { if ((soap->error = soap->fposthdr(soap, "HTTP/1.1 100 Continue", NULL)) - || (soap->error = soap->fposthdr(soap, NULL, NULL))) - return soap->error; - } - } -#endif - else if (!soap_tag_cmp(key, "SOAPAction")) - { if (val[0] && val[1]) - { soap->action = soap_strdup(soap, val + 1); - soap->action[strlen(soap->action) - 1] = '\0'; - } - } - else if (!soap_tag_cmp(key, "Location")) - { strncpy(soap->endpoint, val, sizeof(soap->endpoint)); - soap->endpoint[sizeof(soap->endpoint) - 1] = '\0'; - } -#ifdef WITH_COOKIES - else if (!soap_tag_cmp(key, "Cookie") || !soap_tag_cmp(key, "Set-Cookie")) - soap_getcookies(soap, val); -#endif - return SOAP_OK; -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -const char* -SOAP_FMAC2 -soap_get_header_attribute(struct soap *soap, const char *line, const char *key) -{ register const char *s = line; - if (s) - { while (*s) - { register short flag; - s = soap_decode_key(soap->tmpbuf, sizeof(soap->tmpbuf), s); - flag = soap_tag_cmp(soap->tmpbuf, key); - s = soap_decode_val(soap->tmpbuf, sizeof(soap->tmpbuf), s); - if (!flag) - return soap->tmpbuf; - } - } - return NULL; -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -const char* -SOAP_FMAC2 -soap_decode_key(char *buf, size_t len, const char *val) -{ return soap_decode(buf, len, val, "=,;"); -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -const char* -SOAP_FMAC2 -soap_decode_val(char *buf, size_t len, const char *val) -{ if (*val != '=') - { *buf = '\0'; - return val; - } - return soap_decode(buf, len, val + 1, ",;"); -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -static const char* -soap_decode(char *buf, size_t len, const char *val, const char *sep) -{ const char *s; - char *t = buf; - for (s = val; *s; s++) - if (*s != ' ' && *s != '\t' && !strchr(sep, *s)) - break; - if (*s == '"') - { s++; - while (*s && *s != '"' && --len) - *t++ = *s++; - } - else - { while (soap_notblank(*s) && !strchr(sep, *s) && --len) - { if (*s == '%') - { *t++ = ((s[1] >= 'A' ? (s[1] & 0x7) + 9 : s[1] - '0') << 4) - + (s[2] >= 'A' ? (s[2] & 0x7) + 9 : s[2] - '0'); - s += 3; - } - else - *t++ = *s++; - } - } - *t = '\0'; - while (*s && !strchr(sep, *s)) - s++; - return s; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_envelope_begin_out(struct soap *soap) -{ -#ifndef WITH_LEANER - size_t n = 0; - if ((soap->mode & SOAP_ENC_MIME) && soap->mime.boundary && soap->mime.start) - { const char *s; - if (soap->mode & SOAP_ENC_DIME) - s = "application/dime"; - else if (soap->version == 2) - s = "application/soap+xml; charset=utf-8"; - else - s = "text/xml; charset=utf-8"; - sprintf(soap->tmpbuf, "--%s\r\nContent-Type: %s\r\nContent-Transfer-Encoding: binary\r\nContent-ID: %s\r\n\r\n", soap->mime.boundary, s, soap->mime.start); - n = strlen(soap->tmpbuf); - if (soap_send_raw(soap, soap->tmpbuf, n)) - return soap->error; - } - if (soap->mode & SOAP_IO_LENGTH) - soap->dime.size = soap->count; /* DIME in MIME correction */ - if (!(soap->mode & SOAP_IO_LENGTH) && (soap->mode & SOAP_ENC_DIME)) - { if (soap_putdimehdr(soap)) - return soap->error; - } -#endif - soap->part = SOAP_IN_ENVELOPE; - return soap_element_begin_out(soap, "SOAP-ENV:Envelope", 0, NULL); -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_envelope_end_out(struct soap *soap) -{ if (soap_element_end_out(soap, "SOAP-ENV:Envelope")) - return soap->error; -#ifndef WITH_LEANER - if ((soap->mode & SOAP_IO_LENGTH) && (soap->mode & SOAP_ENC_DIME)) - { soap->dime.size = soap->count - soap->dime.size; /* DIME in MIME correction */ - sprintf(soap->id, soap->dime_id_format, 0); - soap->dime.id = soap->id; - if (soap->local_namespaces) - { if (soap->local_namespaces[0].out) - soap->dime.type = (char*)soap->local_namespaces[0].out; - else - soap->dime.type = (char*)soap->local_namespaces[0].ns; - } - soap->dime.options = NULL; - soap->dime.flags = SOAP_DIME_MB | SOAP_DIME_ABSURI; - if (!soap->dime.first) - soap->dime.flags |= SOAP_DIME_ME; - soap->count += 12 + ((strlen(soap->dime.id)+3)&(~3)) + ((strlen(soap->dime.type)+3)&(~3)); - } - if (soap->mode & SOAP_ENC_DIME) - return soap_send_raw(soap, SOAP_STR_PADDING, -(long)soap->dime.size&3); -#endif - soap->part = SOAP_END_ENVELOPE; - return SOAP_OK; -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_envelope_begin_in(struct soap *soap) -{ register struct Namespace *p; - soap->part = SOAP_IN_ENVELOPE; - if (soap_element_begin_in(soap, "SOAP-ENV:Envelope", 0)) - return soap->error = SOAP_VERSIONMISMATCH; - p = soap->local_namespaces; - if (p) - { const char *ns = p[0].out; - if (!ns) - ns = p[0].ns; - if (!strcmp(ns, soap_env1)) - { soap->version = 1; /* make sure we use SOAP 1.1 */ - if (p[1].out) - SOAP_FREE(p[1].out); - if ((p[1].out = (char*)SOAP_MALLOC(sizeof(soap_enc1)))) - strcpy(p[1].out, soap_enc1); - } - else if (!strcmp(ns, soap_env2)) - { soap->version = 2; /* make sure we use SOAP 1.2 */ - if (p[1].out) - SOAP_FREE(p[1].out); - if ((p[1].out = (char*)SOAP_MALLOC(sizeof(soap_enc2)))) - strcpy(p[1].out, soap_enc2); - } - } - return SOAP_OK; -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_envelope_end_in(struct soap *soap) -{ if (soap_element_end_in(soap, "SOAP-ENV:Envelope")) - return soap->error; - soap->part = SOAP_END_ENVELOPE; - return SOAP_OK; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_body_begin_out(struct soap *soap) -{ soap->part = SOAP_IN_BODY; - if (soap->version == 1) - soap->encoding = 1; - if (soap_element(soap, "SOAP-ENV:Body", 0, NULL)) - return soap->error; - if ((soap->mode & SOAP_XML_SEC) && soap_attribute(soap, "id", "_0")) - return soap->error; - return soap_element_start_end_out(soap, NULL); -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_body_end_out(struct soap *soap) -{ if (soap_element_end_out(soap, "SOAP-ENV:Body")) - return soap->error; - soap->part = SOAP_IN_BODY; - return SOAP_OK; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_body_begin_in(struct soap *soap) -{ soap->part = SOAP_IN_BODY; - return soap_element_begin_in(soap, "SOAP-ENV:Body", 0); -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_body_end_in(struct soap *soap) -{ if (soap_element_end_in(soap, "SOAP-ENV:Body")) - return soap->error; - soap->part = SOAP_END_BODY; - return SOAP_OK; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_recv_header(struct soap *soap) -{ if (soap_getheader(soap) && soap->error == SOAP_TAG_MISMATCH) - soap->error = SOAP_OK; - return soap->error; -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_set_endpoint(struct soap *soap, const char *endpoint) -{ register const char *s; - register size_t i, n; - *soap->endpoint = '\0'; - *soap->host = '\0'; - *soap->path = '\0'; - soap->port = 80; - if (!endpoint || !*endpoint) - return; -#ifdef WITH_OPENSSL - if (!strncmp(endpoint, "https:", 6)) - soap->port = 443; -#endif - strncpy(soap->endpoint, endpoint, sizeof(soap->endpoint) - 1); - s = strchr(endpoint, ':'); - if (s && s[1] == '/' && s[2] == '/') - s += 3; - else - s = endpoint; - n = strlen(s); - if (n >= sizeof(soap->host)) - n = sizeof(soap->host) - 1; -/* WR[ */ -#ifdef WITH_IPV6 - if ('[' == s[0]) - { s++; - for (i = 0; i < n; i++) - { soap->host[i] = s[i]; - if (']' == s[i]) - { - s++; - break; - } - } - } - else - { for (i = 0; i < n; i++) - { soap->host[i] = s[i]; - if (s[i] == '/' || s[i] == ':') - break; - } - } -#else /* WITH_IPV6 */ -/* ]WR */ - for (i = 0; i < n; i++) - { soap->host[i] = s[i]; - if (s[i] == '/' || s[i] == ':') - break; - } -/* WR[ */ -#endif /* WITH_IPV6 */ -/* ]WR */ - soap->host[i] = '\0'; - if (s[i] == ':') - { soap->port = (int)atol(s + i + 1); - for (i++; i < n; i++) - if (s[i] == '/') - break; - } - if (s[i]) - { strncpy(soap->path, s + i + 1, sizeof(soap->path)); - soap->path[sizeof(soap->path) - 1] = '\0'; - } -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_connect(struct soap *soap, const char *endpoint, const char *action) -{ return soap_connect_command(soap, SOAP_POST, endpoint, action); -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_connect_command(struct soap *soap, int http_command, const char *endpoint, const char *action) -{ char host[sizeof(soap->host)]; - int port; - size_t count; - soap->error = SOAP_OK; - strcpy(host, soap->host); /* save to compare */ - port = soap->port; /* save to compare */ - soap_set_endpoint(soap, endpoint); - if (action) - soap->action = soap_strdup(soap, action); - if (soap->fconnect) - { - if ((soap->error = soap->fconnect(soap, endpoint, soap->host, soap->port))) - return soap->error; - } - else if (*soap->host) - { soap->status = http_command; - if (!soap_valid_socket(soap->socket) || strcmp(soap->host, host) || soap->port != port) - { soap->keep_alive = 0; /* force close */ - soap_closesock(soap); - DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Connect to host='%s' path='%s' port=%d\n", soap->host, soap->path, soap->port)); - soap->socket = soap->fopen(soap, endpoint, soap->host, soap->port); - if (soap->error) - return soap->error; - soap->keep_alive = ((soap->omode & SOAP_IO_KEEPALIVE) != 0); - } - else if (!soap->keep_alive || !soap->fpoll || soap->fpoll(soap)) - { soap->keep_alive = 0; /* force close */ - soap_closesock(soap); - DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Reconnect to host='%s' path='%s' port=%d\n", soap->host, soap->path, soap->port)); - soap->socket = soap->fopen(soap, endpoint, soap->host, soap->port); - if (soap->error) - return soap->error; - } - } - if (soap_begin_send(soap)) - return soap->error; - count = soap_count_attachments(soap); - if ((soap->mode & SOAP_IO) != SOAP_IO_STORE && !(soap->mode & SOAP_ENC_XML) && endpoint) - { unsigned int k = soap->mode; - soap->mode &= ~(SOAP_IO | SOAP_ENC_ZLIB); - if ((k & SOAP_IO) != SOAP_IO_FLUSH) - soap->mode |= SOAP_IO_BUFFER; - if ((soap->error = soap->fpost(soap, endpoint, soap->host, soap->port, soap->path, action, count))) - return soap->error; - if ((k & SOAP_IO) == SOAP_IO_CHUNK) - { if (soap_flush(soap)) - return soap->error; - } - soap->mode = k; - } - if (http_command != SOAP_POST) - return soap_end_send(soap); - return SOAP_OK; -} -#endif - -/******************************************************************************/ -#ifndef WITH_LEAN -SOAP_FMAC1 -char* -SOAP_FMAC2 -soap_s2base64(struct soap *soap, const unsigned char *s, char *t, size_t n) -{ register size_t i; - register unsigned long m; - register char *p; - if (!t) - t = (char*)soap_malloc(soap, (n + 2) / 3 * 4 + 1); - if (!t) - { soap->error = SOAP_EOM; - return NULL; - } - p = t; - t[0] = '\0'; - if (!s) - return p; - for (; n > 2; n -= 3, s += 3) - { m = s[0]; - m = (m << 8) | s[1]; - m = (m << 8) | s[2]; - for (i = 4; i > 0; m >>= 6) - t[--i] = soap_base64o[m & 0x3F]; - t += 4; - } - t[0] = '\0'; - if (n > 0) - { m = 0; - for (i = 0; i < n; i++) - m = (m << 8) | *s++; - for (; i < 3; i++) - m <<= 8; - for (i++; i > 0; m >>= 6) - t[--i] = soap_base64o[m & 0x3F]; - for (i = 3; i > n; i--) - t[i] = '='; - t[4] = '\0'; - } - return p; -} -#endif - -/******************************************************************************/ -#ifndef WITH_LEAN -SOAP_FMAC1 -const char* -SOAP_FMAC2 -soap_base642s(struct soap *soap, const char *s, char *t, size_t l, size_t *n) -{ register int i, j, c; - register unsigned long m; - char *p = t; - if (n) - *n = 0; - for (;;) - { for (i = 0; i < SOAP_BLKLEN; i++) - { m = 0; - j = 0; - while (j < 4) - { c = *s++; - if (c == '=' || !c) - { i *= 3; - switch (j) - { case 2: - *t++ = (char)((m >> 4) & 0xFF); - i++; - break; - case 3: - *t++ = (char)((m >> 10) & 0xFF); - *t++ = (char)((m >> 2) & 0xFF); - i += 2; - } - if (n) - *n += i; - return p; - } - c -= '+'; - if (c >= 0 && c <= 79) - { m = (m << 6) + soap_base64i[c]; - j++; - } - } - *t++ = (char)((m >> 16) & 0xFF); - *t++ = (char)((m >> 8) & 0xFF); - *t++ = (char)(m & 0xFF); - if (l < 3) - { if (n) - *n += i; - return p; - } - l -= 3; - } - if (n) - *n += 3 * SOAP_BLKLEN; - } -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_puthttphdr(struct soap *soap, int status, size_t count) -{ register const char *s; - register int err; - if (status == SOAP_FILE) - s = soap->http_content; - else if (status == SOAP_HTML) - s = "text/html; charset=utf-8"; -#ifndef WITH_LEANER - else if (soap->mode & SOAP_ENC_DIME) - s = "application/dime"; -#endif - else if (soap->version == 2) - s = "application/soap+xml; charset=utf-8"; - else - s = "text/xml; charset=utf-8"; -#ifndef WITH_LEANER - if ((soap->mode & SOAP_ENC_MIME) && soap->mime.boundary && soap->mime.start && soap->status != SOAP_GET) - { sprintf(soap->tmpbuf, "multipart/related; boundary=\"%s\"; type=%s; start=\"%s\"", soap->mime.boundary, s, soap->mime.start); - s = soap->tmpbuf; - } -#endif - if ((err = soap->fposthdr(soap, "Content-Type", s))) - return err; -#ifdef WITH_ZLIB - if (soap->omode & SOAP_ENC_ZLIB) - { -#ifdef WITH_GZIP - err = soap->fposthdr(soap, "Content-Encoding", "gzip"); -#else - err = soap->fposthdr(soap, "Content-Encoding", "deflate"); -#endif - if (err) - return err; - } -#endif - if ((soap->omode & SOAP_IO) == SOAP_IO_CHUNK) - err = soap->fposthdr(soap, "Transfer-Encoding", "chunked"); - else if (count > 0) - { sprintf(soap->tmpbuf, "%lu", (unsigned long)count); - err = soap->fposthdr(soap, "Content-Length", soap->tmpbuf); - } - if (err) - return err; - return soap->fposthdr(soap, "Connection", soap->keep_alive ? "keep-alive" : "close"); -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -static int -http_get(struct soap *soap) -{ return SOAP_GET_METHOD; -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -static int -http_post(struct soap *soap, const char *endpoint, const char *host, int port, const char *path, const char *action, size_t count) -{ register const char *s; - register int err; - if (soap->status == SOAP_GET) - { s = "GET"; - count = 0; - } - else - s = "POST"; -#ifdef PALM - if (!endpoint || (strncmp(endpoint, "http:", 5) && strncmp(endpoint, "https:", 6) && strncmp(endpoint, "httpg:", 6)) && strncmp(endpoint, "_beam:", 6) && strncmp(endpoint, "_local:", 7) && strncmp(endpoint, "_btobex:", 8)) -#else - if (!endpoint || (strncmp(endpoint, "http:", 5) && strncmp(endpoint, "https:", 6) && strncmp(endpoint, "httpg:", 6))) -#endif - return SOAP_OK; - if (soap->proxy_host && strncmp(endpoint, "https:", 6)) - sprintf(soap->tmpbuf, "%s %s HTTP/%s", s, endpoint, soap->http_version); - else - sprintf(soap->tmpbuf, "%s /%s HTTP/%s", s, path, soap->http_version); - if ((err = soap->fposthdr(soap, soap->tmpbuf, NULL))) - return err; - if (port != 80) - sprintf(soap->tmpbuf, "%s:%d", host, port); - else - strcpy(soap->tmpbuf, host); - if ((err = soap->fposthdr(soap, "Host", soap->tmpbuf)) - || (err = soap->fposthdr(soap, "User-Agent", "gSOAP/2.7")) - || (err = soap_puthttphdr(soap, SOAP_OK, count))) - return err; -#ifdef WITH_ZLIB -#ifdef WITH_GZIP - if ((err = soap->fposthdr(soap, "Accept-Encoding", "gzip, deflate"))) -#else - if ((err = soap->fposthdr(soap, "Accept-Encoding", "deflate"))) -#endif - return err; -#endif -#ifndef WITH_LEAN - if (soap->userid && soap->passwd && strlen(soap->userid) + strlen(soap->passwd) < 761) - { sprintf(soap->tmpbuf + 262, "%s:%s", soap->userid, soap->passwd); - strcpy(soap->tmpbuf, "Basic "); - soap_s2base64(soap, (const unsigned char*)(soap->tmpbuf + 262), soap->tmpbuf + 6, strlen(soap->tmpbuf + 262)); - if ((err = soap->fposthdr(soap, "Authorization", soap->tmpbuf))) - return err; - } - if (soap->proxy_userid && soap->proxy_passwd && strlen(soap->proxy_userid) + strlen(soap->proxy_passwd) < 761) - { sprintf(soap->tmpbuf + 262, "%s:%s", soap->proxy_userid, soap->proxy_passwd); - strcpy(soap->tmpbuf, "Basic "); - soap_s2base64(soap, (const unsigned char*)(soap->tmpbuf + 262), soap->tmpbuf + 6, strlen(soap->tmpbuf + 262)); - if ((err = soap->fposthdr(soap, "Proxy-Authorization", soap->tmpbuf))) - return err; - } -#endif -#ifdef WITH_COOKIES -#ifdef WITH_OPENSSL - if (soap_putcookies(soap, host, path, soap->ssl != NULL)) - return soap->error; -#else - if (soap_putcookies(soap, host, path, 0)) - return soap->error; -#endif -#endif - if (action && soap->version == 1) - { sprintf(soap->tmpbuf, "\"%s\"", action); - if ((err = soap->fposthdr(soap, "SOAPAction", soap->tmpbuf))) - return err; - } - return soap->fposthdr(soap, NULL, NULL); -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -static int -http_send_header(struct soap *soap, const char *s) -{ register const char *t; - do - { t = strchr(s, '\n'); /* disallow \n in HTTP headers */ - if (!t) - t = s + strlen(s); - if (soap_send_raw(soap, s, t - s)) - return soap->error; - s = t + 1; - } while (*t); - return SOAP_OK; -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -static int -http_post_header(struct soap *soap, const char *key, const char *val) -{ if (key) - { if (http_send_header(soap, key)) - return soap->error; - if (val && (soap_send_raw(soap, ": ", 2) || http_send_header(soap, val))) - return soap->error; - } - return soap_send_raw(soap, "\r\n", 2); -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -static int -http_response(struct soap *soap, int status, size_t count) -{ register int err; -/* WR[ */ -#ifdef WMW_RPM_IO - if (soap->rpmreqid) - httpOutputEnable(soap->rpmreqid); -#endif /* WMW_RPM_IO */ -/* ]WR */ - if (!status || status == SOAP_HTML || status == SOAP_FILE) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "OK 200\n")); -/* WR[ */ -#ifdef WMW_RPM_IO - if (soap->rpmreqid || soap_valid_socket(soap->master) || soap_valid_socket(soap->socket)) /* RPM behaves as if standalone */ -#else -/* ]WR */ - if (soap_valid_socket(soap->master) || soap_valid_socket(soap->socket)) /* standalone application */ -/* WR[ */ -#endif /* WMW_RPM_IO */ -/* ]WR */ - { sprintf(soap->tmpbuf, "HTTP/%s 200 OK", soap->http_version); - if ((err = soap->fposthdr(soap, soap->tmpbuf, NULL))) - return err; - } - else if ((err = soap->fposthdr(soap, "Status", "200 OK"))) - return err; - } - else if (status > 200 && status < 600) - { sprintf(soap->tmpbuf, "HTTP/%s %d %s", soap->http_version, status, http_error(soap, status)); - if ((err = soap->fposthdr(soap, soap->tmpbuf, NULL))) - return err; - if (status == 401) - { sprintf(soap->tmpbuf, "Basic realm=\"%s\"", soap->authrealm ? soap->authrealm : "gSOAP Web Service"); - if ((err = soap->fposthdr(soap, "WWW-Authenticate", soap->tmpbuf))) - return err; - } - else if ((status >= 301 && status <= 303) || status == 307) - { if ((err = soap->fposthdr(soap, "Location", soap->endpoint))) - return err; - } - } - else - { const char *s = *soap_faultcode(soap); - if (soap->version == 2 && !strcmp(s, "SOAP-ENV:Sender")) - s = "400 Bad Request"; - else - s = "500 Internal Server Error"; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Error %s (status=%d)\n", s, status)); -/* WR[ */ -#ifdef WMW_RPM_IO - if (soap->rpmreqid || soap_valid_socket(soap->master) || soap_valid_socket(soap->socket)) /* RPM behaves as if standalone */ -#else -/* ]WR */ - if (soap_valid_socket(soap->master) || soap_valid_socket(soap->socket)) /* standalone application */ -/* WR[ */ -#endif /* WMW_RPM_IO */ -/* ]WR */ - { sprintf(soap->tmpbuf, "HTTP/%s %s", soap->http_version, s); - if ((err = soap->fposthdr(soap, soap->tmpbuf, NULL))) - return err; - } - else if ((err = soap->fposthdr(soap, "Status", s))) - return err; - } - if ((err = soap->fposthdr(soap, "Server", "gSOAP/2.7")) - || (err = soap_puthttphdr(soap, status, count))) - return err; -#ifdef WITH_COOKIES - if (soap_putsetcookies(soap)) - return soap->error; -#endif - return soap->fposthdr(soap, NULL, NULL); -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_response(struct soap *soap, int status) -{ register size_t count; - if (!(soap->omode & (SOAP_ENC_XML | SOAP_IO_STORE /* this tests for chunking too */)) - && (status == SOAP_HTML || status == SOAP_FILE)) - { soap->omode &= ~SOAP_IO; - soap->omode |= SOAP_IO_STORE; - } - soap->status = status; - count = soap_count_attachments(soap); - if (soap_begin_send(soap)) - return soap->error; - if ((soap->mode & SOAP_IO) != SOAP_IO_STORE && !(soap->mode & SOAP_ENC_XML)) - { register int n = soap->mode; - soap->mode &= ~(SOAP_IO | SOAP_ENC_ZLIB); - if ((n & SOAP_IO) != SOAP_IO_FLUSH) - soap->mode |= SOAP_IO_BUFFER; - if ((soap->error = soap->fresponse(soap, status, count))) - return soap->error; - if ((n & SOAP_IO) == SOAP_IO_CHUNK) - { if (soap_flush(soap)) - return soap->error; - } - soap->mode = n; - } - return SOAP_OK; -} -#endif - -/******************************************************************************/ -#ifndef WITH_LEAN -static const char* -soap_set_validation_fault(struct soap *soap, const char *s, const char *t) -{ sprintf(soap->msgbuf, "Validation constraint violation: %s%s in element <%s>", s, t?t:SOAP_STR_EOS, soap->tag); - return soap->msgbuf; -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_set_fault(struct soap *soap) -{ const char **c = soap_faultcode(soap); - const char **s = soap_faultstring(soap); - if (!*c) - { if (soap->version == 2) - *c = "SOAP-ENV:Sender"; - else - *c = "SOAP-ENV:Client"; - } - if (*s) - return; - switch (soap->error) - { -#ifndef WITH_LEAN - case SOAP_CLI_FAULT: - *s = "Client fault"; - break; - case SOAP_SVR_FAULT: - *s = "Server fault"; - break; - case SOAP_TAG_MISMATCH: - *s = soap_set_validation_fault(soap, "tag name or namespace mismatch", NULL); - break; - case SOAP_TAG_END: - *s = soap_set_validation_fault(soap, "incorrect end tag", NULL); - break; - case SOAP_TYPE: - *s = soap_set_validation_fault(soap, "data type mismatch ", soap->type); - break; - case SOAP_SYNTAX_ERROR: - *s = "Well-formedness constraint violation"; - break; - case SOAP_NO_TAG: - *s = "No XML element tag found"; - break; - case SOAP_MUSTUNDERSTAND: - *c = "SOAP-ENV:MustUnderstand"; - sprintf(soap->msgbuf, "The data in element '%s' must be understood but cannot be handled", soap->tag); - *s = soap->msgbuf; - break; - case SOAP_VERSIONMISMATCH: - *c = "SOAP-ENV:VersionMismatch"; - *s = "SOAP version mismatch or invalid SOAP message"; - break; - case SOAP_DATAENCODINGUNKNOWN: - *c = "SOAP-ENV:DataEncodingUnknown"; - *s = "Unsupported SOAP data encoding"; - break; - case SOAP_NAMESPACE: - *s = soap_set_validation_fault(soap, "namespace mismatch", NULL); - break; - case SOAP_FATAL_ERROR: - *s = "Fatal error"; - break; - case SOAP_NO_METHOD: - sprintf(soap->msgbuf, "Method '%s' not implemented: method name or namespace not recognized", soap->tag); - *s = soap->msgbuf; - break; - case SOAP_GET_METHOD: - *s = "HTTP GET method not implemented"; - break; - case SOAP_EOM: - *s = "Out of memory"; - break; - case SOAP_IOB: - *s = "Array index out of bounds"; - break; - case SOAP_NULL: - *s = soap_set_validation_fault(soap, "nil not allowed", NULL); - break; - case SOAP_MULTI_ID: - *s = soap_set_validation_fault(soap, "multiple definitions of id ", soap->id); - break; - case SOAP_MISSING_ID: - *s = soap_set_validation_fault(soap, "missing id for ref ", soap->id); - break; - case SOAP_HREF: - *s = soap_set_validation_fault(soap, "incompatible object ref ", soap->id); - break; - case SOAP_FAULT: - break; - case SOAP_TCP_ERROR: - *s = tcp_error(soap); - break; - case SOAP_HTTP_ERROR: - *s = "HTTP error"; - break; - case SOAP_SSL_ERROR: - *s = "SSL error"; - break; - case SOAP_PLUGIN_ERROR: - *s = "Plugin registry error"; - break; - case SOAP_DIME_MISMATCH: - *s = "DIME version/transmission error"; - break; - case SOAP_DIME_END: - *s = "End of DIME error"; - break; - case SOAP_DIME_ERROR: - *s = "DIME format error"; - break; - case SOAP_MIME_ERROR: - *s = "MIME format error"; - break; - case SOAP_ZLIB_ERROR: -#ifdef WITH_ZLIB - sprintf(soap->msgbuf, "Zlib/gzip error: '%s'", soap->d_stream.msg?soap->d_stream.msg:""); - *s = soap->msgbuf; -#else - *s = "Zlib not installed for required message (de)compression"; -#endif - break; - case SOAP_REQUIRED: - *s = soap_set_validation_fault(soap, "missing required attribute", NULL); - break; - case SOAP_PROHIBITED: - *s = soap_set_validation_fault(soap, "prohibited attribute present", NULL); - break; - case SOAP_OCCURS: - *s = soap_set_validation_fault(soap, "a min/maxOccurs violation was detected", NULL); - break; - case SOAP_LENGTH: - *s = soap_set_validation_fault(soap, "content length violation", NULL); - break; -#endif - case SOAP_EOF: - sprintf(soap->msgbuf, "End of file or no input: '%s'", soap_strerror(soap)); - *s = soap->msgbuf; - break; - default: - if (soap->error > 200 && soap->error < 600) - { sprintf(soap->msgbuf, "HTTP Error: '%s'", http_error(soap, soap->error)); - *s = soap->msgbuf; - } - else - { sprintf(soap->msgbuf, "Error code %d", soap->error); - *s = soap->msgbuf; - } - } -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_send_fault(struct soap *soap) -{ register int status = soap->error; - if (status == SOAP_STOP) - return status; - DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Sending back fault struct for error code %d\n", soap->error)); - soap->keep_alive = 0; /* to terminate connection */ - soap_set_fault(soap); - if ((status != SOAP_EOF || (!soap->recv_timeout && !soap->send_timeout)) && (!soap->fpoll || soap->fpoll(soap) == SOAP_OK)) - { soap->error = SOAP_OK; - soap_serializeheader(soap); - soap_serializefault(soap); - soap_begin_count(soap); - if (soap->mode & SOAP_IO_LENGTH) - { soap_envelope_begin_out(soap); - soap_putheader(soap); - soap_body_begin_out(soap); - soap_putfault(soap); - soap_body_end_out(soap); - soap_envelope_end_out(soap); - } - if (soap_response(soap, status) - || soap_envelope_begin_out(soap) - || soap_putheader(soap) - || soap_body_begin_out(soap) - || soap_putfault(soap) - || soap_body_end_out(soap) - || soap_envelope_end_out(soap)) - return soap_closesock(soap); - soap_end_send(soap); - } - soap->error = status; - return soap_closesock(soap); -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_recv_fault(struct soap *soap) -{ register int status = soap->error; - DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Receiving SOAP Fault\n")); - soap->error = SOAP_OK; - if (soap_getfault(soap)) - { DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Error: soap_get_soapfault() failed. Is this a SOAP message at all?\n")); - *soap_faultcode(soap) = (soap->version == 2 ? "SOAP-ENV:Sender" : "SOAP-ENV:Client"); - soap->error = status; - soap_set_fault(soap); - } - else - { register const char *s = *soap_faultcode(soap); - if (!soap_match_tag(soap, s, "SOAP-ENV:Server") || !soap_match_tag(soap, s, "SOAP-ENV:Receiver")) - status = SOAP_SVR_FAULT; - else if (!soap_match_tag(soap, s, "SOAP-ENV:Client") || !soap_match_tag(soap, s, "SOAP-ENV:Sender")) - status = SOAP_CLI_FAULT; - else if (!soap_match_tag(soap, s, "SOAP-ENV:MustUnderstand")) - status = SOAP_MUSTUNDERSTAND; - else if (!soap_match_tag(soap, s, "SOAP-ENV:VersionMismatch")) - status = SOAP_VERSIONMISMATCH; - else - { DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Fault code %s\n", s)); - status = SOAP_FAULT; - } - if (soap_body_end_in(soap) - || soap_envelope_end_in(soap) - || soap_end_recv(soap)) - return soap_closesock(soap); - soap->error = status; - } - return soap_closesock(soap); -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -static const char* -soap_strerror(struct soap *soap) -{ int err = soap->errnum; - if (!err) - err = soap_errno; - if (err) - { -#ifndef UNDER_CE - return strerror(err); -#else - FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM|FORMAT_MESSAGE_IGNORE_INSERTS, NULL, err, 0, (LPTSTR)&soap->werrorstr, sizeof(soap->werrorstr), NULL); - wcstombs(soap->errorstr, soap->werrorstr, sizeof(soap->errorstr)); - return soap->errorstr; -#endif - } - return "Operation interrupted or timed out"; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -static int -soap_set_error(struct soap *soap, const char *faultcode, const char *faultstring, const char *faultdetail, int soaperror) -{ *soap_faultcode(soap) = faultcode; - *soap_faultstring(soap) = faultstring; - if (faultdetail && *faultdetail) - { register const char **s = soap_faultdetail(soap); - if (s) - *s = faultdetail; - } - return soap->error = soaperror; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_set_sender_error(struct soap *soap, const char *faultstring, const char *faultdetail, int soaperror) -{ return soap_set_error(soap, soap->version == 2 ? "SOAP-ENV:Sender" : "SOAP-ENV:Client", faultstring, faultdetail, soaperror); -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_set_receiver_error(struct soap *soap, const char *faultstring, const char *faultdetail, int soaperror) -{ return soap_set_error(soap, soap->version == 2 ? "SOAP-ENV:Receiver" : "SOAP-ENV:Server", faultstring, faultdetail, soaperror); -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -static int -soap_copy_fault(struct soap *soap, const char *faultcode, const char *faultstring, const char *faultdetail) -{ char *s = NULL, *t = NULL; - if (faultstring) - s = soap_strdup(soap, faultstring); - if (faultdetail) - t = soap_strdup(soap, faultdetail); - return soap_set_error(soap, faultcode, s, t, SOAP_FAULT); -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_sender_fault(struct soap *soap, const char *faultstring, const char *faultdetail) -{ return soap_copy_fault(soap, soap->version == 2 ? "SOAP-ENV:Sender" : "SOAP-ENV:Client", faultstring, faultdetail); -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_receiver_fault(struct soap *soap, const char *faultstring, const char *faultdetail) -{ return soap_copy_fault(soap, soap->version == 2 ? "SOAP-ENV:Receiver" : "SOAP-ENV:Server", faultstring, faultdetail); -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_print_fault(struct soap *soap, FILE *fd) -{ if (soap->error) - { const char **s; - if (!*soap_faultcode(soap)) - soap_set_fault(soap); - fprintf(fd, "SOAP FAULT: %s\n\"%s\"\n", *soap_faultcode(soap), *soap_faultstring(soap)); - s = soap_faultdetail(soap); - if (s && *s) - fprintf(fd, "Detail: %s\n", *s); - } -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_print_fault_location(struct soap *soap, FILE *fd) -{ -#ifndef WITH_LEAN - int c; - if (soap->error && soap->buflen > 0) - { if (soap->bufidx == 0) - soap->bufidx = 1; - c = soap->buf[soap->bufidx - 1]; - soap->buf[soap->bufidx - 1] = '\0'; - if (soap->buflen - soap->bufidx > 1024) - soap->buf[soap->bufidx + 1024] = '\0'; - else - soap->buf[soap->buflen - 1] = '\0'; - fprintf(fd, "%s%c\n** HERE **\n", soap->buf, c); - if (soap->bufidx < soap->buflen) - fprintf(fd, "%s\n", soap->buf + soap->bufidx); - } -#endif -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_register_plugin_arg(struct soap *soap, int (*fcreate)(struct soap*, struct soap_plugin*, void*), void *arg) -{ register struct soap_plugin *p; - register int r; - if (!(p = (struct soap_plugin*)SOAP_MALLOC(sizeof(struct soap_plugin)))) - return soap->error = SOAP_EOM; - p->id = NULL; - p->data = NULL; - p->fcopy = NULL; - p->fdelete = NULL; - r = fcreate(soap, p, arg); - if (!r && p->fdelete) - { p->next = soap->plugins; - soap->plugins = p; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Registered '%s' plugin\n", p->id)); - return SOAP_OK; - } - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Could not register plugin '%s': plugin returned error %d (or fdelete callback not set)\n", p->id?p->id:"?", r)); - SOAP_FREE(p); - return r; -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -static void * -fplugin(struct soap *soap, const char *id) -{ register struct soap_plugin *p; - for (p = soap->plugins; p; p = p->next) - if (p->id == id || !strcmp(p->id, id)) - return p->data; - return NULL; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -void * -SOAP_FMAC2 -soap_lookup_plugin(struct soap *soap, const char *id) -{ return soap->fplugin(soap, id); -} -#endif - -/******************************************************************************/ -#ifdef __cplusplus -} -#endif - diff --git a/org.glite.security.gsoap-plugin/src/stdsoap2_2.7.0.h b/org.glite.security.gsoap-plugin/src/stdsoap2_2.7.0.h deleted file mode 100644 index ff1d52d..0000000 --- a/org.glite.security.gsoap-plugin/src/stdsoap2_2.7.0.h +++ /dev/null @@ -1,1764 +0,0 @@ -/* - -stdsoap2.h 2.7.0d - -gSOAP runtime environment. - -gSOAP XML Web services tools -Copyright (C) 2000-2004, Robert van Engelen, Genivia, Inc., All Rights Reserved. - -Contributors: - -Wind River Systems, Inc., for the following additions (marked WR[...]) : - - vxWorks compatible - - Support for IPv6. - --------------------------------------------------------------------------------- -gSOAP public license. - -The contents of this file are subject to the gSOAP Public License Version 1.3 -(the "License"); you may not use this file except in compliance with the -License. You may obtain a copy of the License at -http://www.cs.fsu.edu/~engelen/soaplicense.html -Software distributed under the License is distributed on an "AS IS" basis, -WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License -for the specific language governing rights and limitations under the License. - -The Initial Developer of the Original Code is Robert A. van Engelen. -Copyright (C) 2000-2004, Robert van Engelen, Genivia, Inc., All Rights Reserved. --------------------------------------------------------------------------------- -GPL license. - -This program is free software; you can redistribute it and/or modify it under -the terms of the GNU General Public License as published by the Free Software -Foundation; either version 2 of the License, or (at your option) any later -version. - -This program is distributed in the hope that it will be useful, but WITHOUT ANY -WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A -PARTICULAR PURPOSE. See the GNU General Public License for more details. - -You should have received a copy of the GNU General Public License along with -this program; if not, write to the Free Software Foundation, Inc., 59 Temple -Place, Suite 330, Boston, MA 02111-1307 USA - -Author contact information: -engelen@genivia.com / engelen@acm.org --------------------------------------------------------------------------------- -*/ - -#ifdef WITH_SOAPDEFS_H -# include "soapdefs.h" /* include user-defined stuff */ -#endif - -#ifndef _THREAD_SAFE -# define _THREAD_SAFE -#endif - -#ifndef OPENSERVER -# ifndef _REENTRANT -# define _REENTRANT -# endif -#endif - -#ifndef SOAP_BEGIN_NAMESPACE -# define SOAP_BEGIN_NAMESPACE(name) -#endif - -#ifndef SOAP_END_NAMESPACE -# define SOAP_END_NAMESPACE(name) -#endif - -#ifndef SOAP_FMAC1 /* stdsoap2.h declaration macro */ -# define SOAP_FMAC1 -#endif - -#ifndef SOAP_FMAC2 /* stdsoap2.h declaration macro */ -# define SOAP_FMAC2 -#endif - -#ifndef SOAP_FMAC3 /* (de)serializer declaration macro */ -# define SOAP_FMAC3 -#endif - -#ifndef SOAP_FMAC4 /* (de)serializer declaration macro */ -# define SOAP_FMAC4 -#endif - -#ifndef SOAP_FMAC5 /* stub/skeleton declaration macro */ -# define SOAP_FMAC5 -#endif - -#ifndef SOAP_FMAC6 /* stub/skeleton declaration macro */ -# define SOAP_FMAC6 -#endif - -#ifndef SOAP_CMAC /* class declaration macro */ -# define SOAP_CMAC -#endif - -#ifndef SOAP_NMAC /* namespace table declaration macro */ -# define SOAP_NMAC -#endif - -#ifndef SOAP_SOURCE_STAMP -# define SOAP_SOURCE_STAMP(str) -#endif - -#ifdef WITH_LEANER -# ifndef WITH_LEAN -# define WITH_LEAN -# endif -#endif - -#ifdef WITH_LEAN -# ifdef WITH_COOKIES -# error "Cannot build WITH_LEAN code WITH_COOKIES enabled" -# endif -#endif - -#ifndef STDSOAP_H -#define STDSOAP_H - -#if defined(__vxworks) || defined(__VXWORKS__) -# define VXWORKS -#endif - -#ifdef _WIN32 -# ifndef WIN32 -# define WIN32 -# endif -#endif - -#ifdef UNDER_CE -# ifndef WIN32 -# define WIN32 -# endif -#endif - -#ifdef __BORLANDC__ -# ifdef __WIN32__ -# ifndef WIN32 -# define WIN32 -# endif -# endif -#endif - -#ifdef __CYGWIN__ -# ifndef CYGWIN -# define CYGWIN -# endif -#endif - -#ifdef __SYMBIAN32__ -# define SYMBIAN -# undef WIN32 -#endif - -#if defined(__palmos__) || defined(PALM_GCC) || defined(__PALMOS_TRAPS__) -# define PALM -#endif - -#ifdef __hpux -# define HP_UX -#endif - -#ifdef __alpha -# define TRU64 -#endif - -#ifdef __MVS__ -# define OS390 -#endif - -#ifdef _AIX -# define __socklen_t_defined -#endif - -#ifdef HAVE_CONFIG_H -# include "config.h" -#else -# if defined(UNDER_CE) -# define WITH_LEAN -# define HAVE_SSCANF -# elif defined(WIN32) -# define HAVE_STRRCHR -# define HAVE_STRTOD -# define HAVE_SSCANF -# define HAVE_STRTOL -# define HAVE_STRTOUL -# define HAVE_SYS_TIMEB_H -# define HAVE_FTIME -# define HAVE_WCTOMB -# define HAVE_MBTOWC -# elif defined(CYGWIN) -# define HAVE_STRRCHR -# define HAVE_STRTOD -# define HAVE_SSCANF -# define HAVE_STRTOL -# define HAVE_STRTOUL -# define HAVE_SYS_TIMEB_H -# define HAVE_FTIME -# define HAVE_RAND_R -# define HAVE_GMTIME_R -# define HAVE_LOCALTIME_R -# define HAVE_WCTOMB -# define HAVE_MBTOWC -# elif defined(__APPLE__) -# define HAVE_STRRCHR -# define HAVE_STRTOD -# define HAVE_SSCANF -# define HAVE_STRTOL -# define HAVE_STRTOUL -# define HAVE_RAND_R -# define HAVE_GMTIME_R -# define HAVE_LOCALTIME_R -# define HAVE_TIMEGM -# define HAVE_WCTOMB -# define HAVE_MBTOWC -# elif defined(_AIXVERSION_431) -# define HAVE_STRRCHR -# define HAVE_STRTOD -# define HAVE_SSCANF -# define HAVE_STRTOL -# define HAVE_STRTOUL -# define HAVE_SYS_TIMEB_H -# define HAVE_FTIME -# define HAVE_RAND_R -# define HAVE_GMTIME_R -# define HAVE_LOCALTIME_R -# define HAVE_WCTOMB -# define HAVE_MBTOWC -# elif defined(HP_UX) -# define HAVE_STRRCHR -# define HAVE_STRTOD -# define HAVE_SSCANF -# define HAVE_STRTOL -# define HAVE_STRTOUL -# define HAVE_SYS_TIMEB_H -# define HAVE_FTIME -# define HAVE_RAND_R -# define HAVE_GMTIME_R -# define HAVE_LOCALTIME_R -# define HAVE_WCTOMB -# define HAVE_MBTOWC -# elif defined(FREEBSD) -# define HAVE_STRRCHR -# define HAVE_STRTOD -# define HAVE_SSCANF -# define HAVE_STRTOL -# define HAVE_STRTOUL -# define HAVE_GETTIMEOFDAY -# define HAVE_RAND_R -# define HAVE_GMTIME_R -# define HAVE_LOCALTIME_R -# define HAVE_WCTOMB -# define HAVE_MBTOWC -# elif defined(__VMS) -# define HAVE_STRRCHR -# define HAVE_STRTOD -# define HAVE_SSCANF -# define HAVE_STRTOL -# define HAVE_STRTOUL -# define HAVE_SYS_TIMEB_H -# define HAVE_FTIME -# define HAVE_RAND_R -# define HAVE_GMTIME_R -# define HAVE_LOCALTIME_R -# define HAVE_WCTOMB -# define HAVE_MBTOWC -# elif defined(__GLIBC__) -# define HAVE_STRRCHR -# define HAVE_STRTOD -# define HAVE_SSCANF -# define HAVE_STRTOL -# define HAVE_STRTOUL -# define HAVE_SYS_TIMEB_H -# define HAVE_FTIME -# define HAVE_RAND_R -# define HAVE_GMTIME_R -# define HAVE_LOCALTIME_R -# define HAVE_TIMEGM -# define HAVE_WCTOMB -# define HAVE_MBTOWC -# define HAVE_ISNAN -# elif defined(TRU64) -# define HAVE_STRRCHR -# define HAVE_STRTOD -# define HAVE_SSCANF -# define HAVE_STRTOL -# define HAVE_STRTOUL -# define HAVE_GETTIMEOFDAY -# define HAVE_SYS_TIMEB_H -# define HAVE_RAND_R -# define HAVE_GMTIME_R -# define HAVE_LOCALTIME_R -# define __USE_STD_IOSTREAM -# define HAVE_WCTOMB -# define HAVE_MBTOWC -# elif defined(MAC_CARBON) -# define HAVE_STRRCHR -# define HAVE_STRTOD -# define HAVE_SSCANF -# define HAVE_STRTOL -# define HAVE_STRTOUL -# define HAVE_FTIME -# define HAVE_RAND_R -# define HAVE_GETHOSTBYNAME_R -# define HAVE_GMTIME_R -# define HAVE_LOCALTIME_R -# define HAVE_WCTOMB -# define HAVE_MBTOWC -# elif defined(PALM) -# define WITH_LEAN -# define HAVE_STRTOD /* strtod() is defined in palmFunctions.h */ -# include /* Needs to be included before unix headers */ -# include -# define IGNORE_STDIO_STUBS -# include -# define O_NONBLOCK FNONBIO -# include -# include -# include "palmFunctions.h" -# elif defined(SYMBIAN) -# define WITH_LEAN -# define WITH_NONAMESPACES -# define HAVE_STRTOD /* use STRTOD since sscanf doesn't seem to work */ -# include -# elif defined(VXWORKS) -# define HAVE_STRRCHR -# define HAVE_STRTOD -# define HAVE_SSCANF -# define HAVE_STRTOL -# define HAVE_STRTOUL -# define HAVE_RAND_R -# define HAVE_PGMTIME_R -# define HAVE_PLOCALTIME_R -# define HAVE_MKTIME -# elif defined(OS390) -# define HAVE_STRRCHR -# define HAVE_STRTOD -# define HAVE_SSCANF -# define HAVE_STRTOL -# define HAVE_STRTOUL -# define HAVE_SYS_TIMEB_H -# define HAVE_FTIME -# define HAVE_RAND_R -# define HAVE_GMTIME_R -# define HAVE_LOCALTIME_R -# define HAVE_WCTOMB -# define HAVE_MB -# else -/* Default asumptions on supported functions */ -# define HAVE_STRRCHR -# define HAVE_STRTOD -# define HAVE_SSCANF -# define HAVE_STRTOL -# define HAVE_STRTOUL -# define HAVE_SYS_TIMEB_H -# define HAVE_FTIME -# define HAVE_RAND_R -# define HAVE_GETHOSTBYNAME_R -# define HAVE_GMTIME_R -# define HAVE_LOCALTIME_R -# define HAVE_WCTOMB -# define HAVE_MBTOWC -# endif -#endif - -#if defined(TRU64) -# define SOAP_LONG_FORMAT "%ld" -# define SOAP_ULONG_FORMAT "%lu" -#elif defined(WIN32) -# define SOAP_LONG_FORMAT "%I64d" -# define SOAP_ULONG_FORMAT "%I64u" -#endif - -#ifndef SOAP_LONG_FORMAT -# define SOAP_LONG_FORMAT "%lld" /* printf format for 64 bit ints */ -#endif - -#ifndef SOAP_ULONG_FORMAT -# define SOAP_ULONG_FORMAT "%llu" /* printf format for unsigned 64 bit ints */ -#endif - -#ifndef SOAP_MALLOC /* use libc malloc */ -# define SOAP_MALLOC(n) malloc(n) -#endif - -#ifndef SOAP_FREE /* use libc free */ -# define SOAP_FREE(p) free(p) -#endif - -#include - -#ifndef PALM -# include -# include -#endif - -#include -#include - -#if defined(__cplusplus) && !defined(WITH_LEAN) -# include -# include - using namespace std; -#endif - -#ifndef UNDER_CE -# ifndef PALM -# include -# ifndef MAC_CARBON -# include -# endif -# ifndef WITH_LEAN -# ifdef HAVE_SYS_TIMEB_H -# include /* for ftime() */ -# endif -# include -# endif -# endif -#endif - -#ifdef OPENSERVER -# include -# include -# include - extern int h_errno; -#endif - -#ifndef MAC_CARBON -# ifndef WIN32 -# ifndef PALM -# include -# ifdef VXWORKS -# include -# endif -# ifndef VXWORKS -# ifndef SYMBIAN -# include -# endif -# endif -# ifdef SUN_OS -# include /* SUN */ -# include /* SUN < 2.8 (?) */ -# endif -# ifdef VXWORKS -# include -# else -# include -# endif -# include -# ifdef OS390 -# include -# else -# include /* TCP_NODELAY */ -# endif -# include -# endif -# endif -#endif - -#ifdef WITH_FASTCGI -# include -#endif - -#ifdef WITH_OPENSSL -# define OPENSSL_NO_KRB5 -# include -# include -# include -# ifndef ALLOW_OLD_VERSIONS -# if (OPENSSL_VERSION_NUMBER < 0x00905100L) -# error "Must use OpenSSL 0.9.6 or later" -# endif -# endif -#endif - -#ifdef WITH_GZIP -# ifndef WITH_ZLIB -# define WITH_ZLIB -# endif -#endif - -#ifdef WITH_CASEINSENSITIVETAGS -# define SOAP_STRCMP soap_tag_cmp /* case insensitve XML element/attribute names */ -#else -# define SOAP_STRCMP strcmp /* case sensitive XML element/attribute names */ -#endif - -#ifdef WITH_ZLIB -# include -#endif - -#ifndef PALM -# include /* for isnan() */ -#endif - -/* #define DEBUG */ /* Uncomment to debug sending (in file SENT.log) receiving (in file RECV.log) and messages (in file TEST.log) */ - -#ifdef __cplusplus -extern "C" { -#endif - -#define soap_get0(soap) (((soap)->bufidx>=(soap)->buflen && soap_recv(soap)) ? EOF : (unsigned char)(soap)->buf[(soap)->bufidx]) -#define soap_get1(soap) (((soap)->bufidx>=(soap)->buflen && soap_recv(soap)) ? EOF : (unsigned char)(soap)->buf[(soap)->bufidx++]) -#define soap_revget1(soap) ((soap)->bufidx--) -#define soap_unget(soap, c) ((soap)->ahead = c) -#define soap_register_plugin(soap, plugin) soap_register_plugin_arg(soap, plugin, NULL) -#define soap_imode(soap, n) ((soap)->mode = (soap)->imode = (n)) -#define soap_set_imode(soap, n) ((soap)->mode = (soap)->imode |= (n)) -#define soap_clr_imode(soap, n) ((soap)->mode = (soap)->imode &= ~(n)) -#define soap_omode(soap, n) ((soap)->mode = (soap)->omode = (n)) -#define soap_set_omode(soap, n) ((soap)->mode = (soap)->omode |= (n)) -#define soap_clr_omode(soap, n) ((soap)->mode = (soap)->omode &= ~(n)) -#define soap_destroy(soap) soap_delete((soap), NULL) - -#ifdef WIN32 -# ifndef UNDER_CE -# include -# include -# endif -# include -/* # include */ /* Alternative: use winsock2 (not available with eVC) */ -/* WR[ */ -# ifdef WITH_IPV6 -# include -# include -# endif -#else -# ifdef VXWORKS -# include -# include -# include -# endif -/* ]WR */ -# ifndef MAC_CARBON -# ifndef PALM -# include -# include -# include -# include -# endif -# endif -#endif - -#ifdef WIN32 -# define SOAP_SOCKET SOCKET -#else -# define SOAP_SOCKET int -# define closesocket(n) close(n) -#endif - -#define soap_valid_socket(n) ((n) >= 0) -#define SOAP_INVALID_SOCKET (-1) - -#if defined(SYMBIAN) -# define LONG64 long -# define ULONG64 unsigned LONG64 -#elif !defined(WIN32) -# define LONG64 long long -# define ULONG64 unsigned LONG64 -#elif defined(UNDER_CE) -# define LONG64 __int64 -# define ULONG64 unsigned LONG64 -#elif defined(__BORLANDC__) -# define LONG64 __int64 -# define ULONG64 unsigned LONG64 -#endif - -#if defined(WIN32) -# define soap_int32 __int32 -#elif defined(SYMBIAN) -# define soap_int32 long -#elif defined(PALM) -# define soap_int32 Int32 -#else -# define soap_int32 int32_t -#endif - -/* UCS-4 requires 32 bits (0-7FFFFFFF, the sign bit is used by gSOAP to distinguish XML entities) */ -typedef soap_int32 soap_wchar; - -#ifdef WIN32 -# define SOAP_EINTR WSAEINTR -# define SOAP_EAGAIN WSAEWOULDBLOCK -# define SOAP_EWOULDBLOCK WSAEWOULDBLOCK -# define SOAP_EINPROGRESS WSAEINPROGRESS -#else -# define SOAP_EINTR EINTR -# define SOAP_EAGAIN EAGAIN -# ifdef SYMBIAN -# define SOAP_EWOULDBLOCK 9898 -# define SOAP_EINPROGRESS 9899 -# else -# define SOAP_EWOULDBLOCK EWOULDBLOCK -# define SOAP_EINPROGRESS EINPROGRESS -# endif -#endif - -#ifdef WIN32 -# ifdef UNDER_CE -# define soap_errno GetLastError() -# define soap_socket_errno GetLastError() -# else -# define soap_errno GetLastError() -# define soap_socket_errno WSAGetLastError() -# endif -#else -# define soap_errno errno -# define soap_socket_errno errno -#endif - -#ifndef SOAP_BUFLEN -# ifndef WITH_LEAN -# define SOAP_BUFLEN (32768) /* buffer length for socket packets, also used by gethostbyname_r so don't make this too small */ -# else -# define SOAP_BUFLEN (2048) -# endif -#endif -#ifndef SOAP_LABLEN -# ifndef WITH_LEAN -# define SOAP_LABLEN (256) /* initial look-aside buffer length */ -# else -# define SOAP_LABLEN (64) -# endif -#endif -#ifndef SOAP_PTRHASH -# ifndef WITH_LEAN -# define SOAP_PTRHASH (1024) /* size of pointer analysis hash table (must be power of 2) */ -# else -# define SOAP_PTRHASH (16) -# endif -#endif -#ifndef SOAP_IDHASH -# ifndef WITH_LEAN -# define SOAP_IDHASH (1999) /* prime size of hash table for parsed id/ref */ -# else -# define SOAP_IDHASH (199) -# endif -#endif -#ifndef SOAP_BLKLEN -# define SOAP_BLKLEN (256) /* size of blocks to collect long strings and XML attributes */ -#endif -#ifndef SOAP_TAGLEN -# define SOAP_TAGLEN (256) /* maximum length of XML element tag/attribute name + 1 */ -#endif -#ifndef SOAP_HDRLEN -# ifndef WITH_LEAN -# define SOAP_HDRLEN (8192) /* maximum length of HTTP header line (must be >4096 to read cookies) */ -# else -# define SOAP_HDRLEN (1024) -# endif -#endif -#ifndef SOAP_MAXDIMS -# define SOAP_MAXDIMS (16) /* maximum array dimensions (array nestings) must be less than 64 to protect soap->tmpbuf */ -#endif - -#ifndef SOAP_MAXLOGS -# define SOAP_MAXLOGS (3) /* max number of debug logs per struct soap environment */ -# define SOAP_INDEX_RECV (0) -# define SOAP_INDEX_SENT (1) -# define SOAP_INDEX_TEST (2) -#endif - -#ifndef SOAP_MAXKEEPALIVE -# define SOAP_MAXKEEPALIVE (100) /* max iterations to keep server connection alive */ -#endif - -#ifndef SOAP_MAXARRAYSIZE -# define SOAP_MAXARRAYSIZE (100000) /* "trusted" max size of inbound SOAP array for compound array allocation */ -#endif - -#ifdef VXWORKS -# ifdef __INCmathh -# include -# ifndef HAVE_ISNAN -# define HAVE_ISNAN -# endif -# define soap_isnan(num) isNan(num) -# endif -#endif - -#ifdef WIN32 -# include -# ifndef HAVE_ISNAN -# define HAVE_ISNAN -# endif -# define soap_isnan(num) _isnan(num) -#endif - -#ifdef SUN_OS -# define soap_isnan(n) isnan(n) -#endif - -#if !defined(HAVE_ISNAN) && (defined(_MATH_H) || defined(_MATH_INCLUDED)) -# define HAVE_ISNAN -#endif - -#ifndef soap_isnan -# ifdef HAVE_ISNAN -# define soap_isnan(n) isnan(n) -# else -# define soap_isnan(_) (0) -# endif -#endif - -extern const struct soap_double_nan { unsigned int n1, n2; } soap_double_nan; - -#ifdef VXWORKS -# ifndef FLT_MAX -# define FLT_MAX _ARCH_FLT_MAX -# endif -# ifndef DBL_MAX -# define DBL_MAX _ARCH_DBL_MAX -# endif -#endif - -#ifndef FLT_NAN -# ifdef HAVE_ISNAN -# define FLT_NAN (*(float*)&soap_double_nan) -# else -# define FLT_NAN (0.0) -# endif -#endif - -#ifndef FLT_PINFTY -# ifdef FLT_MAX -# define FLT_PINFTY FLT_MAX -# else -# ifdef HUGE_VAL -# define FLT_PINFTY (float)HUGE_VAL -# else -# ifdef FLOAT_MAX -# define FLT_PINFTY FLOAT_MAX -# else -# define FLT_PINFTY (3.40282347e+38) -# endif -# endif -# endif -#endif - -#ifndef FLT_NINFTY -# define FLT_NINFTY (-FLT_PINFTY) -#endif - -#ifndef DBL_NAN -# ifdef HAVE_ISNAN -# define DBL_NAN (*(double*)&soap_double_nan) -# else -# define DBL_NAN (0.0) -# endif -#endif - -#ifndef DBL_PINFTY -# ifdef DBL_MAX -# define DBL_PINFTY DBL_MAX -# else -# ifdef HUGE_VAL -# define DBL_PINFTY (double)HUGE_VAL -# else -# ifdef DOUBLE_MAX -# define DBL_PINFTY DOUBLE_MAX -# else -# define DBL_PINFTY (1.7976931348623157e+308) -# endif -# endif -# endif -#endif - -#ifndef DBL_NINFTY -# define DBL_NINFTY (-DBL_PINFTY) -#endif - -#define soap_ispinfd(n) ((n) >= DBL_PINFTY) -#define soap_ispinff(n) ((n) >= FLT_PINFTY) -#define soap_isninfd(n) ((n) <= DBL_NINFTY) -#define soap_isninff(n) ((n) <= FLT_NINFTY) - -/* gSOAP error codes */ - -#define SOAP_EOF EOF -#define SOAP_ERR EOF -#define SOAP_OK 0 -#define SOAP_CLI_FAULT 1 -#define SOAP_SVR_FAULT 2 -#define SOAP_TAG_MISMATCH 3 -#define SOAP_TYPE 4 -#define SOAP_SYNTAX_ERROR 5 -#define SOAP_NO_TAG 6 -#define SOAP_IOB 7 -#define SOAP_MUSTUNDERSTAND 8 -#define SOAP_NAMESPACE 9 -/* #define SOAP_OBJ_MISMATCH 10 obsolete */ -#define SOAP_TAG_END 10 -#define SOAP_FATAL_ERROR 11 -#define SOAP_FAULT 12 -#define SOAP_NO_METHOD 13 -#define SOAP_GET_METHOD 14 -#define SOAP_EOM 15 -#define SOAP_NULL 16 -#define SOAP_MULTI_ID 17 -#define SOAP_MISSING_ID 18 -#define SOAP_HREF 19 -#define SOAP_TCP_ERROR 20 -#define SOAP_HTTP_ERROR 21 -#define SOAP_SSL_ERROR 22 -#define SOAP_ZLIB_ERROR 23 -#define SOAP_DIME_ERROR 24 -#define SOAP_DIME_HREF 25 -#define SOAP_DIME_MISMATCH 26 -#define SOAP_DIME_END 27 -#define SOAP_MIME_ERROR 28 -#define SOAP_VERSIONMISMATCH 29 -#define SOAP_PLUGIN_ERROR 30 -#define SOAP_DATAENCODINGUNKNOWN 31 -#define SOAP_REQUIRED 32 -#define SOAP_PROHIBITED 33 -#define SOAP_OCCURS 34 -#define SOAP_LENGTH 35 - -#define soap_xml_error_check(e) ((e) == SOAP_TAG_MISMATCH || (e) == SOAP_TAG_END || (e) == SOAP_SYNTAX_ERROR || (e) == SOAP_NAMESPACE || (e) == SOAP_MULTI_ID || (e) == SOAP_MISSING_ID || (e) == SOAP_REQUIRED || (e) == SOAP_PROHIBITED || (e) == SOAP_OCCURS || (e) == SOAP_LENGTH || (e) == SOAP_NULL || (e) == SOAP_HREF) -#define soap_soap_error_check(e) ((e) == SOAP_CLI_FAULT || (e) == SOAP_SVR_FAULT || (e) == SOAP_VERSIONMISMATCH || (e) == SOAP_MUSTUNDERSTAND || (e) == SOAP_FAULT || (e) == SOAP_NO_METHOD) -#define soap_tcp_error_check(e) ((e) == SOAP_EOF || (e) == SOAP_TCP_ERROR) -#define soap_ssl_error_check(e) ((e) == SOAP_SSL_ERROR) -#define soap_zlib_error_check(e) ((e) == SOAP_ZLIB_ERROR) -#define soap_mime_error_check(e) ((e) == SOAP_MIME_ERROR) -#define soap_dime_error_check(e) ((e) == SOAP_DIME_ERROR || (e) == SOAP_DIME_MISMATCH) -#define soap_http_error_check(e) ((e) == SOAP_HTTP_ERROR || (e) == SOAP_GET_METHOD || ((e) >= 100 && (e) < 600)) - -/* gSOAP HTTP response status codes 100 to 600 are reserved */ - -/* Special gSOAP HTTP response status codes */ - -#define SOAP_STOP 1000 /* No HTTP response */ -#define SOAP_HTML 1001 /* Custom HTML response */ -#define SOAP_FILE 1002 /* Custom file-based response */ - -/* gSOAP HTTP request status codes */ - -#define SOAP_POST 1003 -#define SOAP_GET 1104 - -/* gSOAP DIME */ - -#define SOAP_DIME_CF 0x01 -#define SOAP_DIME_ME 0x02 -#define SOAP_DIME_MB 0x04 -#define SOAP_DIME_VERSION 0x08 /* DIME version 1 */ -#define SOAP_DIME_MEDIA 0x10 -#define SOAP_DIME_ABSURI 0x20 - -/* gSOAP ZLIB */ - -#define SOAP_ZLIB_NONE 0x00 -#define SOAP_ZLIB_DEFLATE 0x01 -#define SOAP_ZLIB_INFLATE 0x02 -#define SOAP_ZLIB_GZIP 0x02 - -/* gSOAP transport, connection, and content encoding modes */ - -typedef soap_int32 soap_mode; - -#define SOAP_IO 0x00000003 /* IO mask */ -#define SOAP_IO_FLUSH 0x00000000 /* flush output immediately, no buffering */ -#define SOAP_IO_BUFFER 0x00000001 /* buffer output in packets of size SOAP_BUFLEN */ -#define SOAP_IO_STORE 0x00000002 /* store entire output to determine length for transport */ -#define SOAP_IO_CHUNK 0x00000003 /* use HTTP chunked transfer AND buffer packets */ - -#define SOAP_IO_LENGTH 0x00000004 -#define SOAP_IO_KEEPALIVE 0x00000008 - -#define SOAP_ENC_LATIN 0x00800010 /* iso-8859-1 encoding */ -#define SOAP_ENC_XML 0x00000020 /* plain XML encoding, no HTTP header */ -#define SOAP_ENC_DIME 0x00000040 -#define SOAP_ENC_MIME 0x00000080 -#define SOAP_ENC_ZLIB 0x00000100 -#define SOAP_ENC_SSL 0x00000200 - -#define SOAP_XML_STRICT 0x00001000 /* strict validation */ -#define SOAP_XML_CANONICAL 0x00002000 /* C14N canonical XML */ -#define SOAP_XML_TREE 0x00004000 -#define SOAP_XML_GRAPH 0x00008000 -#define SOAP_XML_NIL 0x00010000 -#define SOAP_XML_DOM 0x00020000 -#define SOAP_XML_SEC 0x00040000 /* reserved for WS security */ - -#define SOAP_C_NOIOB 0x00100000 -#define SOAP_C_UTFSTRING 0x00200000 -#define SOAP_C_MBSTRING 0x00400000 - -#define SOAP_DOM_TREE 0x01000000 -#define SOAP_DOM_NODE 0x02000000 - -#define SOAP_IO_DEFAULT SOAP_IO_FLUSH - -/* SSL client/server authentication settings */ - -#define SOAP_SSL_NO_AUTHENTICATION 0x00 /* for testing purposes */ -#define SOAP_SSL_REQUIRE_SERVER_AUTHENTICATION 0x01 /* client requires server to authenticate */ -#define SOAP_SSL_REQUIRE_CLIENT_AUTHENTICATION 0x02 /* server requires client to authenticate */ - -#define SOAP_SSL_DEFAULT SOAP_SSL_REQUIRE_SERVER_AUTHENTICATION - -/* */ - -#define SOAP_BEGIN 0 -#define SOAP_IN_ENVELOPE 2 -#define SOAP_IN_HEADER 3 -#define SOAP_END_HEADER 4 -#define SOAP_IN_BODY 5 -#define SOAP_END_BODY 6 -#define SOAP_END_ENVELOPE 7 -#define SOAP_END 8 - -/* DEBUG macros */ - -#ifndef WITH_LEAN -# ifdef DEBUG -# ifndef SOAP_DEBUG -# define SOAP_DEBUG -# endif -# endif -#endif - -#ifdef SOAP_DEBUG -# ifndef SOAP_MESSAGE -# define SOAP_MESSAGE fprintf -# endif -# ifndef DBGLOG -# define DBGLOG(DBGFILE, CMD) \ -{ if (soap)\ - { if (!soap->fdebug[SOAP_INDEX_##DBGFILE])\ - soap_open_logfile(soap, SOAP_INDEX_##DBGFILE);\ - if (soap->fdebug[SOAP_INDEX_##DBGFILE])\ - { FILE *fdebug = soap->fdebug[SOAP_INDEX_##DBGFILE];\ - CMD;\ - fflush(fdebug);\ - }\ - }\ -} -# endif -# ifndef DBGMSG -# define DBGMSG(DBGFILE, MSG, LEN) \ -{ if (soap)\ - { if (!soap->fdebug[SOAP_INDEX_##DBGFILE])\ - soap_open_logfile(soap, SOAP_INDEX_##DBGFILE);\ - if (soap->fdebug[SOAP_INDEX_##DBGFILE])\ - { fwrite((MSG), 1, (LEN), soap->fdebug[SOAP_INDEX_##DBGFILE]);\ - fflush(soap->fdebug[SOAP_INDEX_##DBGFILE]);\ - }\ - }\ -} -# endif -#else -# define DBGLOG(DBGFILE, CMD) -# define DBGMSG(DBGFILE, MSG, LEN) -#endif - -struct Namespace -{ const char *id; - const char *ns; - const char *in; - char *out; -}; - -struct soap_nlist -{ struct soap_nlist *next; - unsigned int level; - short index; /* corresponding entry in ns mapping table */ - char *ns; /* only set when parsed ns URI is not in the ns mapping table */ - char id[1]; /* the actual string value flows into the allocated region below this struct */ -}; - -struct soap_blist -{ struct soap_blist *next; - char *ptr; - size_t size; -}; - -struct soap_array -{ void *__ptr; - int __size; -}; - -/* pointer serialization management */ -struct soap_plist -{ struct soap_plist *next; - const void *ptr; - const struct soap_array *array; - int type; - int id; - char mark1; - char mark2; -}; - -/* class allocation list */ -struct soap_clist -{ struct soap_clist *next; - void *ptr; - int type; - int size; - void (*fdelete)(struct soap_clist*); -}; - -struct soap_attribute -{ struct soap_attribute *next; - char *value; - size_t size; - char *ns; - short visible; - char name[1]; /* the actual name string flows into the allocated region below this struct */ -}; - -struct soap_cookie -{ struct soap_cookie *next; - char *name; - char *value; - char *domain; - char *path; - long expire; /* client-side: local time to expire; server-side: seconds to expire */ - unsigned int version; - short secure; - short session; /* server-side */ - short env; /* server-side: got cookie from client */ - short modified; /* server-side: client cookie was modified */ -}; - -#ifdef __cplusplus -SOAP_FMAC1 struct soap_multipart* SOAP_FMAC2 soap_next_multipart(struct soap_multipart*); -class soap_multipart_iterator -{ public: - struct soap_multipart *content; - bool operator==(const soap_multipart_iterator& iter) const - { return content == iter.content; } - bool operator!=(const soap_multipart_iterator& iter) const - { return content != iter.content; } - struct soap_multipart &operator*() const - { return *content; } - soap_multipart_iterator &operator++() - { content = soap_next_multipart(content); return *this; } - soap_multipart_iterator() : content(NULL) - { } - soap_multipart_iterator(struct soap_multipart *p) : content(p) - { } -}; -#endif - -struct soap_dime -{ size_t count; - size_t size; - size_t chunksize; - size_t buflen; - char flags; - char *ptr; - const char *id; - const char *type; - const char *options; - struct soap_multipart *list; /* list of DIME attachments received */ - struct soap_multipart *first, *last; /* temporary in/out queue */ -#ifdef __cplusplus - soap_multipart_iterator begin() - { soap_multipart_iterator iter(list); return iter; }; - soap_multipart_iterator end() - { soap_multipart_iterator iter(NULL); return iter; }; -#endif -}; - -struct soap_mime -{ char *boundary; /* MIME boundary */ - const char *start; /* MIME start ID */ - struct soap_multipart *list; /* list of DIME attachments received */ - struct soap_multipart *first, *last; /* temporary in/out queue */ -#ifdef __cplusplus - soap_multipart_iterator begin() - { soap_multipart_iterator iter(list); return iter; }; - soap_multipart_iterator end() - { soap_multipart_iterator iter(NULL); return iter; }; -#endif -}; - -/* RFC2045 MIME content transfer encodings */ -enum soap_mime_encoding -{ SOAP_MIME_NONE, - SOAP_MIME_7BIT, - SOAP_MIME_8BIT, - SOAP_MIME_BINARY, - SOAP_MIME_QUOTED_PRINTABLE, - SOAP_MIME_BASE64, - SOAP_MIME_IETF_TOKEN, - SOAP_MIME_X_TOKEN -}; - -/* DIME/MIME multipart list */ -struct soap_multipart -{ struct soap_multipart *next; - char *ptr; /* points to raw data content */ - size_t size; /* size of data content */ - const char *id; /* DIME/MIME content ID */ - const char *type; /* DIME/MIME type (MIME type format) */ - const char *options; /* DIME options */ - enum soap_mime_encoding encoding; /* MIME Content-Transfer-Encoding */ - const char *location; /* MIME Content-Location (optional) */ - const char *description; /* MIME Content-Description (optional) */ -#ifdef __cplusplus - typedef soap_multipart_iterator iterator; -#endif -}; - -struct soap_dom_attribute -{ struct soap_dom_attribute *next; - const char *nstr; - char *name; - char *data; - wchar_t *wide; - struct soap *soap; -#ifdef __cplusplus - struct soap_dom_attribute &set(const char *nstr, const char *name); // set namespace and name - struct soap_dom_attribute &set(const char *data); // set data - void unlink(); - soap_dom_attribute(); - soap_dom_attribute(struct soap *soap); - soap_dom_attribute(struct soap *soap, const char *nstr, const char *name, const char *data); - ~soap_dom_attribute(); -#endif -}; - -#ifdef __cplusplus -class soap_dom_iterator -{ public: - struct soap_dom_element *elt; - const char *nstr; - const char *name; - int type; - bool operator==(const soap_dom_iterator&) const; - bool operator!=(const soap_dom_iterator&) const; - struct soap_dom_element &operator*() const; - soap_dom_iterator &operator++(); - soap_dom_iterator(); - soap_dom_iterator(struct soap_dom_element*); - ~soap_dom_iterator(); -}; -#endif - -struct soap_dom_element -{ struct soap_dom_element *next; /* next sibling */ - struct soap_dom_element *prnt; /* parent */ - struct soap_dom_element *elts; /* first child element */ - struct soap_dom_attribute *atts; /* first child attribute */ - const char *nstr; /* namespace string */ - char *name; /* element tag name */ - char *data; /* element content data (with SOAP_C_UTFSTRING flag set) */ - wchar_t *wide; /* element content data */ - int type; /* optional: serialized C/C++ data type */ - void *node; /* optional: pointer to serialized C/C++ data */ - struct soap *soap; -#ifdef __cplusplus - typedef soap_dom_iterator iterator; - struct soap_dom_element &set(const char *nstr, const char *name); - struct soap_dom_element &set(const char *data); - struct soap_dom_element &set(void *node, int type); - struct soap_dom_element &add(struct soap_dom_element*); - struct soap_dom_element &add(struct soap_dom_element&); - struct soap_dom_element &add(struct soap_dom_attribute*); - struct soap_dom_element &add(struct soap_dom_attribute&); - soap_dom_iterator begin(); - soap_dom_iterator end(); - soap_dom_iterator find(const char *nstr, const char *name); - soap_dom_iterator find(int type); - void unlink(); - soap_dom_element(); - soap_dom_element(struct soap *soap); - soap_dom_element(struct soap *soap, const char *nstr, const char *name); - soap_dom_element(struct soap *soap, const char *nstr, const char *name, const char *data); - soap_dom_element(struct soap *soap, const char *nstr, const char *name, void *node, int type); - ~soap_dom_element(); -#endif -}; - -#if defined(__cplusplus) && !defined(WITH_LEAN) -} -extern ostream &operator<<(ostream&, const struct soap_dom_element&); -extern istream &operator>>(istream&, struct soap_dom_element&); -extern "C" { -#endif - -struct soap -{ short version; /* 1 = SOAP1.1 and 2 = SOAP1.2 (set automatically from namespace URI in nsmap table) */ - short copy; /* 1 = copy of another soap struct */ - soap_mode mode; - soap_mode imode; - soap_mode omode; - const char *float_format; /* points to user-definable format string for floats (<1024 chars) */ - const char *double_format; /* points to user-definable format string for doubles (<1024 chars) */ - const char *dime_id_format; /* points to user-definable format string for integer DIME id ( 0, gives socket recv timeout in seconds, < 0 in usec */ - int send_timeout; /* when > 0, gives socket send timeout in seconds, < 0 in usec */ - int connect_timeout; /* when > 0, gives socket connect() timeout in seconds, < 0 in usec */ - int accept_timeout; /* when > 0, gives socket accept() timeout in seconds, < 0 in usec */ - int socket_flags; /* socket recv() and send() flags, e.g. set to MSG_NOSIGNAL to disable sigpipe */ - int connect_flags; /* connect() SOL_SOCKET sockopt flags, e.g. set to SO_DEBUG to debug socket */ - int bind_flags; /* bind() SOL_SOCKET sockopt flags, e.g. set to SO_REUSEADDR to enable reuse */ - int accept_flags; /* accept() SOL_SOCKET sockopt flags */ - const struct Namespace *namespaces; /* Pointer to global namespace mapping table */ - struct Namespace *local_namespaces; /* Local namespace mapping table */ - struct soap_nlist *nlist; /* namespace stack */ - struct soap_blist *blist; /* block allocation stack */ - struct soap_clist *clist; /* class instance allocation list */ - void *alist; /* memory allocation list */ - struct soap_ilist *iht[SOAP_IDHASH]; - struct soap_plist *pht[SOAP_PTRHASH]; - struct SOAP_ENV__Header *header; - struct SOAP_ENV__Fault *fault; - void *user; /* to pass user-defined data */ - struct soap_plugin *plugins; /* linked list of plug-in data */ - char *userid; /* HTTP Basic authorization userid */ - char *passwd; /* HTTP Basic authorization passwd */ - int (*fpost)(struct soap*, const char*, const char*, int, const char*, const char*, size_t); - int (*fget)(struct soap*); - int (*fposthdr)(struct soap*, const char*, const char*); - int (*fresponse)(struct soap*, int, size_t); - int (*fparse)(struct soap*); - int (*fparsehdr)(struct soap*, const char*, const char*); - int (*fresolve)(struct soap*, const char*, struct in_addr* inaddr); - int (*fconnect)(struct soap*, const char*, const char*, int); - int (*fdisconnect)(struct soap*); - int (*fclosesocket)(struct soap*, SOAP_SOCKET); - int (*fshutdownsocket)(struct soap*, SOAP_SOCKET, int); - int (*fopen)(struct soap*, const char*, const char*, int); - int (*faccept)(struct soap*, int, struct sockaddr*, int *n); - int (*fclose)(struct soap*); - int (*fsend)(struct soap*, const char*, size_t); - size_t (*frecv)(struct soap*, char*, size_t); - int (*fpoll)(struct soap*); - int (*fprepareinit)(struct soap*); - int (*fpreparesend)(struct soap*, const char*, size_t); - int (*fpreparerecv)(struct soap*, const char*, size_t); - int (*fignore)(struct soap*, const char*); - int (*fserveloop)(struct soap*); - void *(*fplugin)(struct soap*, const char*); - void *(*fdimereadopen)(struct soap*, void*, const char*, const char*, const char*); - void *(*fdimewriteopen)(struct soap*, const char*, const char*, const char*); - void (*fdimereadclose)(struct soap*, void*); - void (*fdimewriteclose)(struct soap*, void*); - size_t (*fdimeread)(struct soap*, void*, char*, size_t); - int (*fdimewrite)(struct soap*, void*, const char*, size_t); - int master; - int socket; -#if defined(__cplusplus) && !defined(WITH_LEAN) - ostream *os; - istream *is; -#else - void *os; /* preserve alignment */ - void *is; /* preserve alignment */ -#endif -#ifndef UNDER_CE - int sendfd; - int recvfd; -#else - FILE *sendfd; - FILE *recvfd; - char errorstr[256]; - wchar_t werrorstr[256]; -#endif - size_t bufidx; - size_t buflen; - soap_wchar ahead; - short cdata; - short body; - unsigned int level; - size_t count; /* message length counter */ - size_t length; /* message length as set by HTTP header */ - char *labbuf; /* look-aside buffer */ - size_t lablen; /* look-aside buffer allocated length */ - size_t labidx; /* look-aside buffer index to available part */ - char buf[SOAP_BUFLEN];/* send and receive buffer */ - char tmpbuf[1024]; /* output buffer for HTTP headers, simpleType values, attribute names, and DIME >=1024 bytes */ - char msgbuf[1024]; /* output buffer for (error) messages <=1024 bytes */ - char tag[SOAP_TAGLEN]; - char id[SOAP_TAGLEN]; - char href[SOAP_TAGLEN]; - char type[SOAP_TAGLEN]; - char arrayType[SOAP_TAGLEN]; - char arraySize[SOAP_TAGLEN]; - char arrayOffset[SOAP_TAGLEN]; - short other; - short root; - short position; - int positions[SOAP_MAXDIMS]; - struct soap_attribute *attributes; /* attribute list */ - short encoding; - short mustUnderstand; - short null; - short ns; - short part; - short alloced; - short peeked; - short keep_alive; - size_t chunksize; - size_t chunkbuflen; - char endpoint[SOAP_TAGLEN]; - char path[SOAP_TAGLEN]; - char host[SOAP_TAGLEN]; - char *action; - char *authrealm; /* HTTP authentication realm */ - char *prolog; /* XML declaration prolog */ - int port; - unsigned int max_keep_alive; - const char *proxy_host; /* Proxy Server host name */ - int proxy_port; /* Proxy Server port (default = 8080) */ - const char *proxy_userid; /* Proxy Authorization user name */ - const char *proxy_passwd; /* Proxy Authorization password */ - int status; /* -1 when request, else error code to be returned by server */ - int error; - int errmode; - int errnum; - unsigned long idnum; - unsigned long ip; - struct soap_dime dime; - struct soap_mime mime; - struct soap_dom_element *dom; -#if !defined(WITH_LEAN) || defined(SOAP_DEBUG) - const char *logfile[SOAP_MAXLOGS]; - FILE *fdebug[SOAP_MAXLOGS]; -#endif -#ifndef WITH_LEAN - struct soap_cookie *cookies; - const char *cookie_domain; - const char *cookie_path; - int cookie_max; -#endif -#ifdef WITH_OPENSSL - int (*fsslauth)(struct soap*); - int (*fsslverify)(int, X509_STORE_CTX*); - BIO *bio; - SSL *ssl; - SSL_CTX *ctx; - short require_server_auth; - short require_client_auth; - short rsa; /* when set, use RSA instead of DH */ - const char *keyfile; - const char *password; - const char *dhfile; - const char *cafile; - const char *capath; - const char *randfile; - SSL_SESSION *session; - char session_host[SOAP_TAGLEN]; - int session_port; -#endif -#ifdef WITH_ZLIB - short zlib_state; /* SOAP_ZLIB_NONE, SOAP_ZLIB_DEFLATE, or SOAP_ZLIB_INFLATE */ - short zlib_in; /* SOAP_ZLIB_NONE, SOAP_ZLIB_DEFLATE, or SOAP_ZLIB_GZIP */ - short zlib_out; /* SOAP_ZLIB_NONE, SOAP_ZLIB_DEFLATE, or SOAP_ZLIB_GZIP */ - z_stream d_stream; /* decompression stream */ - char z_buf[SOAP_BUFLEN]; /* buffer */ - size_t z_buflen; - unsigned short z_level; /* compression level to be used (0=none, 1=fast to 9=best) */ - uLong z_crc; /* internal gzip crc */ - float z_ratio_in; /* detected compression ratio compressed_length/length of inbound message */ - float z_ratio_out; /* detected compression ratio compressed_length/length of outbound message */ -#endif -/* WR[ */ -#ifdef WMW_RPM_IO - void *rpmreqid; -#endif /* WMW_RPM_IO */ -/* ]WR */ -}; - -struct soap_code_map -{ long code; - const char *string; -}; - -/* forwarding list */ -struct soap_flist -{ struct soap_flist *next; - int type; - void *ptr; - unsigned int level; - void (*fcopy)(struct soap*, int, int, void*, const void*, size_t); -}; - -/* id-ref forwarding list */ -struct soap_ilist -{ struct soap_ilist *next; - int type; - size_t size; - void *link; - void *copy; - struct soap_flist *flist; - void *ptr; - unsigned int level; - char id[1]; /* the actual id string value flows into the allocated region below this struct */ -}; - -struct soap_plugin -{ struct soap_plugin *next; - const char *id; - void *data; - int (*fcopy)(struct soap *soap, struct soap_plugin *dst, struct soap_plugin *src); - void (*fdelete)(struct soap *soap, struct soap_plugin *p); /* should delete fields of plugin only and not free(p) */ -}; - -#ifndef WITH_NONAMESPACES -extern SOAP_NMAC struct Namespace namespaces[]; -#endif - -#ifdef HAVE_STRRCHR -# define soap_strrchr(s, t) strrchr(s, t) -#else - SOAP_FMAC1 char* SOAP_FMAC2 soap_strrchr(const char *s, int t); -#endif - -#ifdef HAVE_STRTOL -# define soap_strtol(s, t, b) strtol(s, t, b) -#else - SOAP_FMAC1 long SOAP_FMAC2 soap_strtol(const char *s, char **t, int b); -#endif - -#ifdef HAVE_STRTOUL -# define soap_strtoul(s, t, b) strtoul(s, t, b) -#else - SOAP_FMAC1 unsigned long SOAP_FMAC2 soap_strtoul(const char *s, char **t, int b); -#endif - -SOAP_FMAC1 void SOAP_FMAC2 soap_fault(struct soap*); -SOAP_FMAC1 const char** SOAP_FMAC2 soap_faultcode(struct soap*); -SOAP_FMAC1 const char** SOAP_FMAC2 soap_faultstring(struct soap*); -SOAP_FMAC1 const char** SOAP_FMAC2 soap_faultdetail(struct soap*); -SOAP_FMAC1 void SOAP_FMAC2 soap_serializeheader(struct soap*); -SOAP_FMAC1 int SOAP_FMAC2 soap_putheader(struct soap*); -SOAP_FMAC1 int SOAP_FMAC2 soap_getheader(struct soap*); -SOAP_FMAC1 void SOAP_FMAC2 soap_serializefault(struct soap*); -SOAP_FMAC1 int SOAP_FMAC2 soap_putfault(struct soap*); -SOAP_FMAC1 int SOAP_FMAC2 soap_getfault(struct soap*); - -SOAP_FMAC1 int SOAP_FMAC2 soap_poll(struct soap*); -SOAP_FMAC1 int SOAP_FMAC2 soap_connect_command(struct soap*, int, const char*, const char*); -SOAP_FMAC1 int SOAP_FMAC2 soap_connect(struct soap*, const char*, const char*); -SOAP_FMAC1 int SOAP_FMAC2 soap_bind(struct soap*, const char*, int, int); -SOAP_FMAC1 int SOAP_FMAC2 soap_accept(struct soap*); -SOAP_FMAC1 int SOAP_FMAC2 soap_ssl_accept(struct soap*); - -SOAP_FMAC1 int SOAP_FMAC2 soap_ssl_server_context(struct soap*, unsigned short, const char*, const char*, const char*, const char*, const char*, const char*, const char*); -SOAP_FMAC1 int SOAP_FMAC2 soap_ssl_client_context(struct soap*, unsigned short, const char*, const char*, const char*, const char*, const char*); - -SOAP_FMAC1 int SOAP_FMAC2 soap_puthttphdr(struct soap*, int status, size_t count); - -SOAP_FMAC1 const char* SOAP_FMAC2 soap_get_header_attribute(struct soap*, const char*, const char*); -SOAP_FMAC1 const char* SOAP_FMAC2 soap_decode_key(char*, size_t, const char*); -SOAP_FMAC1 const char* SOAP_FMAC2 soap_decode_val(char*, size_t, const char*); - -SOAP_FMAC1 size_t SOAP_FMAC2 soap_hash(const char*); -SOAP_FMAC1 void SOAP_FMAC2 soap_set_endpoint(struct soap*, const char*); -SOAP_FMAC1 int SOAP_FMAC2 soap_flush_raw(struct soap*, const char*, size_t); -SOAP_FMAC1 int SOAP_FMAC2 soap_flush(struct soap*); -SOAP_FMAC1 soap_wchar SOAP_FMAC2 soap_get(struct soap*); -SOAP_FMAC1 soap_wchar SOAP_FMAC2 soap_getchar(struct soap*); -SOAP_FMAC1 int SOAP_FMAC2 soap_tag_cmp(const char*, const char*); -SOAP_FMAC1 void SOAP_FMAC2 soap_set_fault(struct soap*); -SOAP_FMAC1 int SOAP_FMAC2 soap_sender_fault(struct soap*, const char*, const char*); -SOAP_FMAC1 int SOAP_FMAC2 soap_receiver_fault(struct soap*, const char*, const char*); -SOAP_FMAC1 int SOAP_FMAC2 soap_set_sender_error(struct soap*, const char*, const char*, int); -SOAP_FMAC1 int SOAP_FMAC2 soap_set_receiver_error(struct soap*, const char*, const char*, int); - -SOAP_FMAC1 int SOAP_FMAC2 soap_send_raw(struct soap*, const char*, size_t); -SOAP_FMAC1 int SOAP_FMAC2 soap_recv_raw(struct soap*); -SOAP_FMAC1 int SOAP_FMAC2 soap_recv(struct soap*); -SOAP_FMAC1 int SOAP_FMAC2 soap_send(struct soap*, const char*); -SOAP_FMAC1 int SOAP_FMAC2 soap_send2(struct soap*, const char*, const char*); -SOAP_FMAC1 int SOAP_FMAC2 soap_send3(struct soap*, const char*, const char*, const char*); - -SOAP_FMAC1 int SOAP_FMAC2 soap_pututf8(struct soap*, unsigned long); -SOAP_FMAC1 soap_wchar SOAP_FMAC2 soap_getutf8(struct soap*); - -SOAP_FMAC1 int SOAP_FMAC2 soap_putbase64(struct soap*, const unsigned char*, int); -SOAP_FMAC1 unsigned char* SOAP_FMAC2 soap_getbase64(struct soap*, int*, int); -SOAP_FMAC1 int SOAP_FMAC2 soap_puthex(struct soap*, const unsigned char*, int); -SOAP_FMAC1 unsigned char* SOAP_FMAC2 soap_gethex(struct soap*, int*); - - -SOAP_FMAC1 struct soap_ilist* SOAP_FMAC2 soap_lookup(struct soap*, const char*); -SOAP_FMAC1 struct soap_ilist* SOAP_FMAC2 soap_enter(struct soap*, const char*); -SOAP_FMAC1 int SOAP_FMAC2 soap_resolve(struct soap*); - -SOAP_FMAC1 int SOAP_FMAC2 soap_pointer_lookup_id(struct soap*, void *p, int t, struct soap_plist**); -SOAP_FMAC1 int SOAP_FMAC2 soap_pointer_lookup(struct soap*, const void *p, int t, struct soap_plist**); -SOAP_FMAC1 int SOAP_FMAC2 soap_pointer_enter(struct soap*, const void *p, const struct soap_array *a, int n, int t, struct soap_plist**); -SOAP_FMAC1 int SOAP_FMAC2 soap_array_pointer_lookup(struct soap*, const void *p, const struct soap_array *a, int n, int t, struct soap_plist**); - -SOAP_FMAC1 int SOAP_FMAC2 soap_embed(struct soap *soap, const void *p, const struct soap_array *a, int n, const char *tag, int type); - -SOAP_FMAC1 void SOAP_FMAC2 soap_begin_count(struct soap*); -SOAP_FMAC1 int SOAP_FMAC2 soap_begin_send(struct soap*); -SOAP_FMAC1 int SOAP_FMAC2 soap_end_send(struct soap*); - -SOAP_FMAC1 void SOAP_FMAC2 soap_embedded(struct soap*, const void *p, int t); -SOAP_FMAC1 int SOAP_FMAC2 soap_reference(struct soap*, const void *p, int t); -SOAP_FMAC1 int SOAP_FMAC2 soap_array_reference(struct soap*, const void *p, const struct soap_array *a, int n, int t); -SOAP_FMAC1 int SOAP_FMAC2 soap_embedded_id(struct soap*, int id, const void *p, int t); -SOAP_FMAC1 int SOAP_FMAC2 soap_is_embedded(struct soap*, struct soap_plist*); -SOAP_FMAC1 int SOAP_FMAC2 soap_is_single(struct soap*, struct soap_plist*); -SOAP_FMAC1 void SOAP_FMAC2 soap_set_embedded(struct soap*, struct soap_plist*); - -SOAP_FMAC1 const struct soap_code_map* SOAP_FMAC2 soap_code(const struct soap_code_map*, const char *str); -SOAP_FMAC1 long SOAP_FMAC2 soap_int_code(const struct soap_code_map*, const char *str, long other); -SOAP_FMAC1 const char* SOAP_FMAC2 soap_str_code(const struct soap_code_map*, long code); - -SOAP_FMAC1 int SOAP_FMAC2 soap_getline(struct soap*, char*, int); -SOAP_FMAC1 int SOAP_FMAC2 soap_begin_recv(struct soap*); -SOAP_FMAC1 int SOAP_FMAC2 soap_end_recv(struct soap*); - -SOAP_FMAC1 void* SOAP_FMAC2 soap_malloc(struct soap*, size_t); -SOAP_FMAC1 void SOAP_FMAC2 soap_dealloc(struct soap*, void*); -SOAP_FMAC1 struct soap_clist * SOAP_FMAC2 soap_link(struct soap*, void*, int, int, void (*fdelete)(struct soap_clist*)); -SOAP_FMAC1 void SOAP_FMAC2 soap_unlink(struct soap*, const void*); -SOAP_FMAC1 void SOAP_FMAC2 soap_free(struct soap*); - -SOAP_FMAC1 int SOAP_FMAC2 soap_lookup_type(struct soap*, const char *id); - -SOAP_FMAC1 void* SOAP_FMAC2 soap_id_lookup(struct soap*, const char *id, void **p, int t, size_t n, unsigned int k); -SOAP_FMAC1 void* SOAP_FMAC2 soap_id_forward(struct soap*, const char *id, void *p, int st, int tt, size_t n, unsigned int k, void(*fcopy)(struct soap*, int, int, void*, const void*, size_t)); -SOAP_FMAC1 void* SOAP_FMAC2 soap_id_enter(struct soap*, const char *id, void *p, int t, size_t n, unsigned int k, const char *type, const char *arrayType, void *(*finstantiate)(struct soap*, int, const char*, const char*, size_t*)); -SOAP_FMAC1 void SOAP_FMAC2 soap_fcopy(struct soap *soap, int st, int tt, void *p, const void *q, size_t n); - -SOAP_FMAC1 int SOAP_FMAC2 soap_size(const int *, int); -SOAP_FMAC1 int SOAP_FMAC2 soap_getoffsets(const char *, const int *, int *, int); -SOAP_FMAC1 int SOAP_FMAC2 soap_getsize(const char *, const char *, int *); -SOAP_FMAC1 int SOAP_FMAC2 soap_getsizes(const char *, int *, int); -SOAP_FMAC1 int SOAP_FMAC2 soap_getposition(const char *, int *); - -SOAP_FMAC1 char* SOAP_FMAC2 soap_putsize(struct soap*, const char *, int); -SOAP_FMAC1 char* SOAP_FMAC2 soap_putsizesoffsets(struct soap*, const char *, const int *, const int *, int); -SOAP_FMAC1 char* SOAP_FMAC2 soap_putsizes(struct soap*, const char *, const int *, int); -SOAP_FMAC1 char* SOAP_FMAC2 soap_putoffset(struct soap*, int); -SOAP_FMAC1 char* SOAP_FMAC2 soap_putoffsets(struct soap*, const int *, int); - -SOAP_FMAC1 int SOAP_FMAC2 soap_closesock(struct soap*); - -SOAP_FMAC1 struct soap *SOAP_FMAC2 soap_new(void); -SOAP_FMAC1 struct soap *SOAP_FMAC2 soap_new1(int); -SOAP_FMAC1 struct soap *SOAP_FMAC2 soap_new2(int, int); -SOAP_FMAC1 struct soap *SOAP_FMAC2 soap_copy(struct soap*); -SOAP_FMAC1 struct soap *SOAP_FMAC2 soap_copy_context(struct soap*,struct soap*); -SOAP_FMAC1 void SOAP_FMAC2 soap_init(struct soap*); -SOAP_FMAC1 void SOAP_FMAC2 soap_init1(struct soap*, int); -SOAP_FMAC1 void SOAP_FMAC2 soap_init2(struct soap*, int, int); -SOAP_FMAC1 void SOAP_FMAC2 soap_done(struct soap*); -SOAP_FMAC1 void SOAP_FMAC2 soap_cleanup(struct soap*); -SOAP_FMAC1 void SOAP_FMAC2 soap_begin(struct soap*); -SOAP_FMAC1 void SOAP_FMAC2 soap_end(struct soap*); -SOAP_FMAC1 void SOAP_FMAC2 soap_delete(struct soap*, void*); - -#ifdef SOAP_DEBUG -SOAP_FMAC1 void SOAP_FMAC2 soap_set_recv_logfile(struct soap*, const char*); -SOAP_FMAC1 void SOAP_FMAC2 soap_set_sent_logfile(struct soap*, const char*); -SOAP_FMAC1 void SOAP_FMAC2 soap_set_test_logfile(struct soap*, const char*); -SOAP_FMAC1 void SOAP_FMAC2 soap_close_logfiles(struct soap*); -SOAP_FMAC1 void SOAP_FMAC2 soap_open_logfile(struct soap*, int); -#endif - -SOAP_FMAC1 const char* SOAP_FMAC2 soap_value(struct soap*); - -SOAP_FMAC1 soap_wchar SOAP_FMAC2 soap_advance(struct soap*); -SOAP_FMAC1 soap_wchar SOAP_FMAC2 soap_skip(struct soap*); - -SOAP_FMAC1 int SOAP_FMAC2 soap_match_tag(struct soap*, const char*, const char *); -SOAP_FMAC1 int SOAP_FMAC2 soap_match_array(struct soap*, const char*); - -SOAP_FMAC1 int SOAP_FMAC2 soap_element(struct soap*, const char*, int, const char*); -SOAP_FMAC1 int SOAP_FMAC2 soap_element_begin_out(struct soap*, const char *tag, int id, const char *type); -SOAP_FMAC1 int SOAP_FMAC2 soap_array_begin_out(struct soap*, const char *tag, int id, const char *type, const char *offset); -SOAP_FMAC1 int SOAP_FMAC2 soap_element_ref(struct soap*, const char *tag, int id, int href); -SOAP_FMAC1 int SOAP_FMAC2 soap_element_href(struct soap*, const char *tag, int id, const char *ref, const char *val); -SOAP_FMAC1 int SOAP_FMAC2 soap_element_null(struct soap*, const char *tag, int id, const char *type); -SOAP_FMAC1 int SOAP_FMAC2 soap_element_id(struct soap*, const char *tag, int id, const void *p, const struct soap_array *a, int d, const char *type, int n); -SOAP_FMAC1 int SOAP_FMAC2 soap_element_result(struct soap*, const char *tag); -SOAP_FMAC1 int SOAP_FMAC2 soap_element_end_out(struct soap*, const char *tag); -SOAP_FMAC1 int SOAP_FMAC2 soap_element_start_end_out(struct soap*, const char *tag); - -SOAP_FMAC1 int SOAP_FMAC2 soap_attribute(struct soap*, const char*, const char*); - -SOAP_FMAC1 int SOAP_FMAC2 soap_element_begin_in(struct soap*, const char *tag, int nillable); - -SOAP_FMAC1 int SOAP_FMAC2 soap_element_end_in(struct soap*, const char *tag); - -SOAP_FMAC1 int SOAP_FMAC2 soap_peek_element(struct soap*); - -SOAP_FMAC1 void SOAP_FMAC2 soap_retry(struct soap*); -SOAP_FMAC1 void SOAP_FMAC2 soap_revert(struct soap*); - -SOAP_FMAC1 char* SOAP_FMAC2 soap_strdup(struct soap*, const char*); - -SOAP_FMAC1 int SOAP_FMAC2 soap_string_out(struct soap*, const char *s, int flag); -SOAP_FMAC1 char* SOAP_FMAC2 soap_string_in(struct soap*, int, long, long); -SOAP_FMAC1 int SOAP_FMAC2 soap_wstring_out(struct soap*, const wchar_t *s, int flag); -SOAP_FMAC1 wchar_t* SOAP_FMAC2 soap_wstring_in(struct soap*, int, long, long); - -SOAP_FMAC1 int SOAP_FMAC2 soap_match_namespace(struct soap*, const char *, const char*, int n1, int n2); - -SOAP_FMAC1 int SOAP_FMAC2 soap_set_namespaces(struct soap*, struct Namespace*); - -SOAP_FMAC1 void SOAP_FMAC2 soap_pop_namespace(struct soap*); -SOAP_FMAC1 int SOAP_FMAC2 soap_push_namespace(struct soap*, const char *,const char *); - -SOAP_FMAC1 int SOAP_FMAC2 soap_new_block(struct soap*); -SOAP_FMAC1 void* SOAP_FMAC2 soap_push_block(struct soap*, size_t); -SOAP_FMAC1 void SOAP_FMAC2 soap_pop_block(struct soap*); -SOAP_FMAC1 size_t SOAP_FMAC2 soap_size_block(struct soap*, size_t); -SOAP_FMAC1 char* SOAP_FMAC2 soap_first_block(struct soap*); -SOAP_FMAC1 char* SOAP_FMAC2 soap_next_block(struct soap*); -SOAP_FMAC1 size_t SOAP_FMAC2 soap_block_size(struct soap*); -SOAP_FMAC1 char* SOAP_FMAC2 soap_save_block(struct soap*, char*, int); -SOAP_FMAC1 void SOAP_FMAC2 soap_end_block(struct soap*); - -SOAP_FMAC1 int SOAP_FMAC2 soap_envelope_begin_out(struct soap*); -SOAP_FMAC1 int soap_envelope_end_out(struct soap*); - -SOAP_FMAC1 int SOAP_FMAC2 soap_envelope_begin_in(struct soap*); -SOAP_FMAC1 int SOAP_FMAC2 soap_envelope_end_in(struct soap*); - -SOAP_FMAC1 int SOAP_FMAC2 soap_body_begin_out(struct soap*); -SOAP_FMAC1 int SOAP_FMAC2 soap_body_end_out(struct soap*); - -SOAP_FMAC1 int SOAP_FMAC2 soap_body_begin_in(struct soap*); -SOAP_FMAC1 int SOAP_FMAC2 soap_body_end_in(struct soap*); - -SOAP_FMAC1 int SOAP_FMAC2 soap_recv_header(struct soap*); - -SOAP_FMAC1 int SOAP_FMAC2 soap_response(struct soap*, int); - -SOAP_FMAC1 int SOAP_FMAC2 soap_send_fault(struct soap*); - -SOAP_FMAC1 int SOAP_FMAC2 soap_recv_fault(struct soap*); - -SOAP_FMAC1 void SOAP_FMAC2 soap_print_fault(struct soap*, FILE*); -SOAP_FMAC1 void SOAP_FMAC2 soap_print_fault_location(struct soap*, FILE*); - -SOAP_FMAC1 int SOAP_FMAC2 soap_s2byte(struct soap*, const char*, char*); -SOAP_FMAC1 int SOAP_FMAC2 soap_s2short(struct soap*, const char*, short*); -SOAP_FMAC1 int SOAP_FMAC2 soap_s2int(struct soap*, const char*, int*); -SOAP_FMAC1 int SOAP_FMAC2 soap_s2long(struct soap*, const char*, long*); -SOAP_FMAC1 int SOAP_FMAC2 soap_s2LONG64(struct soap*, const char*, LONG64*); -SOAP_FMAC1 int SOAP_FMAC2 soap_s2float(struct soap*, const char*, float*); -SOAP_FMAC1 int SOAP_FMAC2 soap_s2double(struct soap*, const char*, double*); -SOAP_FMAC1 int SOAP_FMAC2 soap_s2unsignedByte(struct soap*, const char*, unsigned char*); -SOAP_FMAC1 int SOAP_FMAC2 soap_s2unsignedShort(struct soap*, const char*, unsigned short*); -SOAP_FMAC1 int SOAP_FMAC2 soap_s2unsignedInt(struct soap*, const char*, unsigned int*); -SOAP_FMAC1 int SOAP_FMAC2 soap_s2unsignedLong(struct soap*, const char*, unsigned long*); -SOAP_FMAC1 int SOAP_FMAC2 soap_s2ULONG64(struct soap*, const char*, ULONG64*); -SOAP_FMAC1 int SOAP_FMAC2 soap_s2dateTime(struct soap*, const char*, time_t*); -SOAP_FMAC1 int SOAP_FMAC2 soap_s2string(struct soap*, const char*, char**); -SOAP_FMAC1 int SOAP_FMAC2 soap_s2QName(struct soap*, const char*, char**); - -SOAP_FMAC1 char* SOAP_FMAC2 soap_s2base64(struct soap*, const unsigned char*, char*, size_t); - -SOAP_FMAC1 const char* SOAP_FMAC2 soap_byte2s(struct soap*, char); -SOAP_FMAC1 const char* SOAP_FMAC2 soap_short2s(struct soap*, short); -SOAP_FMAC1 const char* SOAP_FMAC2 soap_int2s(struct soap*, int); -SOAP_FMAC1 const char* SOAP_FMAC2 soap_long2s(struct soap*, long); -SOAP_FMAC1 const char* SOAP_FMAC2 soap_LONG642s(struct soap*, LONG64); -SOAP_FMAC1 const char* SOAP_FMAC2 soap_float2s(struct soap*, float); -SOAP_FMAC1 const char* SOAP_FMAC2 soap_double2s(struct soap*, double); -SOAP_FMAC1 const char* SOAP_FMAC2 soap_unsignedByte2s(struct soap*, unsigned char); -SOAP_FMAC1 const char* SOAP_FMAC2 soap_unsignedShort2s(struct soap*, unsigned short); -SOAP_FMAC1 const char* SOAP_FMAC2 soap_unsignedInt2s(struct soap*, unsigned int); -SOAP_FMAC1 const char* SOAP_FMAC2 soap_unsignedLong2s(struct soap*, unsigned long); -SOAP_FMAC1 const char* SOAP_FMAC2 soap_ULONG642s(struct soap*, ULONG64); -SOAP_FMAC1 const char* SOAP_FMAC2 soap_dateTime2s(struct soap*, time_t); -SOAP_FMAC1 const char* SOAP_FMAC2 soap_QName2s(struct soap*, const char*); - -SOAP_FMAC1 const char* SOAP_FMAC2 soap_base642s(struct soap*, const char*, char*, size_t, size_t*); - -SOAP_FMAC1 int* SOAP_FMAC2 soap_inint(struct soap*, const char *tag, int *p, const char *, int); -SOAP_FMAC1 char* SOAP_FMAC2 soap_inbyte(struct soap*, const char *tag, char *p, const char *, int); -SOAP_FMAC1 long* SOAP_FMAC2 soap_inlong(struct soap*, const char *tag, long *p, const char *, int); -SOAP_FMAC1 LONG64* SOAP_FMAC2 soap_inLONG64(struct soap*, const char *tag, LONG64 *p, const char *, int); -SOAP_FMAC1 short* SOAP_FMAC2 soap_inshort(struct soap*, const char *tag, short *p, const char *, int); -SOAP_FMAC1 float* SOAP_FMAC2 soap_infloat(struct soap*, const char *tag, float *p, const char *, int); -SOAP_FMAC1 double* SOAP_FMAC2 soap_indouble(struct soap*, const char *tag, double *p, const char *, int); -SOAP_FMAC1 unsigned char* SOAP_FMAC2 soap_inunsignedByte(struct soap*, const char *tag, unsigned char *p, const char *, int); -SOAP_FMAC1 unsigned short* SOAP_FMAC2 soap_inunsignedShort(struct soap*, const char *tag, unsigned short *p, const char *, int); -SOAP_FMAC1 unsigned int* SOAP_FMAC2 soap_inunsignedInt(struct soap*, const char *tag, unsigned int *p, const char *, int); -SOAP_FMAC1 unsigned long* SOAP_FMAC2 soap_inunsignedLong(struct soap*, const char *tag, unsigned long *p, const char *, int); -SOAP_FMAC1 ULONG64* SOAP_FMAC2 soap_inULONG64(struct soap*, const char *tag, ULONG64 *p, const char *, int); -SOAP_FMAC1 time_t* SOAP_FMAC2 soap_indateTime(struct soap*, const char *tag, time_t *p, const char *, int); -SOAP_FMAC1 char** SOAP_FMAC2 soap_instring(struct soap*, const char *tag, char **p, const char *, int, int, long, long); -SOAP_FMAC1 wchar_t** SOAP_FMAC2 soap_inwstring(struct soap*, const char *tag, wchar_t **p, const char *, int, long, long); -SOAP_FMAC1 char** SOAP_FMAC2 soap_inliteral(struct soap*, const char *tag, char **p); -SOAP_FMAC1 wchar_t** SOAP_FMAC2 soap_inwliteral(struct soap*, const char *tag, wchar_t **p); - -SOAP_FMAC1 int SOAP_FMAC2 soap_outbyte(struct soap*, const char *tag, int id, const char *p, const char *, int); -SOAP_FMAC1 int SOAP_FMAC2 soap_outshort(struct soap*, const char *tag, int id, const short *p, const char *, int); -SOAP_FMAC1 int SOAP_FMAC2 soap_outint(struct soap*, const char *tag, int id, const int *p, const char *, int); -SOAP_FMAC1 int SOAP_FMAC2 soap_outlong(struct soap*, const char *tag, int id, const long *p, const char *, int); -SOAP_FMAC1 int SOAP_FMAC2 soap_outLONG64(struct soap*, const char *tag, int id, const LONG64 *p, const char *, int); -SOAP_FMAC1 int SOAP_FMAC2 soap_outfloat(struct soap*, const char *tag, int id, const float *p, const char *, int); -SOAP_FMAC1 int SOAP_FMAC2 soap_outdouble(struct soap*, const char *tag, int id, const double *p, const char *, int); -SOAP_FMAC1 int SOAP_FMAC2 soap_outunsignedByte(struct soap*, const char *tag, int id, const unsigned char *p, const char *, int); -SOAP_FMAC1 int SOAP_FMAC2 soap_outunsignedShort(struct soap*, const char *tag, int id, const unsigned short *p, const char *, int); -SOAP_FMAC1 int SOAP_FMAC2 soap_outunsignedInt(struct soap*, const char *tag, int id, const unsigned int *p, const char *, int); -SOAP_FMAC1 int SOAP_FMAC2 soap_outunsignedLong(struct soap*, const char *tag, int id, const unsigned long *p, const char *, int); -SOAP_FMAC1 int SOAP_FMAC2 soap_outULONG64(struct soap*, const char *tag, int id, const ULONG64 *p, const char *, int); -SOAP_FMAC1 int SOAP_FMAC2 soap_outdateTime(struct soap*, const char *tag, int id, const time_t *p, const char *, int); -SOAP_FMAC1 int SOAP_FMAC2 soap_outstring(struct soap*, const char *tag, int id, char *const*p, const char *, int); -SOAP_FMAC1 int SOAP_FMAC2 soap_outwstring(struct soap*, const char *tag, int id, wchar_t *const*p, const char *, int); -SOAP_FMAC1 int SOAP_FMAC2 soap_outliteral(struct soap*, const char *tag, char *const*p); -SOAP_FMAC1 int SOAP_FMAC2 soap_outwliteral(struct soap*, const char *tag, wchar_t *const*p); - -#ifndef WITH_LEANER -SOAP_FMAC1 int SOAP_FMAC2 soap_element_dime(struct soap *, const char*, int, const void*, const struct soap_array*, const char*, const char*, const char*, int, const char*, int); -SOAP_FMAC1 int SOAP_FMAC2 soap_move(struct soap*, long); -SOAP_FMAC1 size_t SOAP_FMAC2 soap_tell(struct soap*); -SOAP_FMAC1 char* SOAP_FMAC2 soap_dime_option(struct soap*, unsigned short, const char*); -SOAP_FMAC1 int SOAP_FMAC2 soap_getdimehdr(struct soap*); -SOAP_FMAC1 int SOAP_FMAC2 soap_getdime(struct soap*); -SOAP_FMAC1 int SOAP_FMAC2 soap_putdimehdr(struct soap*); -SOAP_FMAC1 int SOAP_FMAC2 soap_putdime(struct soap*); -SOAP_FMAC1 int SOAP_FMAC2 soap_getmimehdr(struct soap*); -SOAP_FMAC1 int SOAP_FMAC2 soap_getmime(struct soap*); -SOAP_FMAC1 int SOAP_FMAC2 soap_putmimehdr(struct soap*, struct soap_multipart*); -SOAP_FMAC1 int SOAP_FMAC2 soap_putmime(struct soap*); -SOAP_FMAC1 void SOAP_FMAC2 soap_set_dime(struct soap*); -SOAP_FMAC1 void SOAP_FMAC2 soap_set_mime(struct soap*, const char *boundary, const char *start); -SOAP_FMAC1 void SOAP_FMAC2 soap_clr_dime(struct soap*); -SOAP_FMAC1 void SOAP_FMAC2 soap_clr_mime(struct soap*); -SOAP_FMAC1 int SOAP_FMAC2 soap_set_dime_attachment(struct soap*, char *ptr, size_t size, const char *type, const char *id, unsigned short optype, const char *option); -SOAP_FMAC1 int SOAP_FMAC2 soap_set_mime_attachment(struct soap*, char *ptr, size_t size, enum soap_mime_encoding encoding, const char *type, const char *id, const char *location, const char *description); -SOAP_FMAC1 struct soap_multipart* SOAP_FMAC2 soap_next_multipart(struct soap_multipart*); -#endif - -SOAP_FMAC1 int SOAP_FMAC2 soap_register_plugin_arg(struct soap*, int (*fcreate)(struct soap*, struct soap_plugin*, void*), void*); -SOAP_FMAC1 void* SOAP_FMAC2 soap_lookup_plugin(struct soap*, const char*); - -SOAP_FMAC1 const char* SOAP_FMAC2 soap_attr_value(struct soap *soap, const char *name, int flag); -SOAP_FMAC1 int SOAP_FMAC2 soap_set_attr(struct soap *soap, const char *name, const char *value); -SOAP_FMAC1 void SOAP_FMAC2 soap_clr_attr(struct soap *soap); - -#ifdef WITH_COOKIES -SOAP_FMAC1 size_t SOAP_FMAC2 soap_encode_cookie(const char*, char*, size_t); -SOAP_FMAC1 extern struct soap_cookie* SOAP_FMAC2 soap_set_cookie(struct soap*, const char*, const char*, const char*, const char*); -SOAP_FMAC1 extern struct soap_cookie* SOAP_FMAC2 soap_cookie(struct soap*, const char*, const char*, const char*); -SOAP_FMAC1 extern char* SOAP_FMAC2 soap_cookie_value(struct soap*, const char*, const char*, const char*); -SOAP_FMAC1 extern long SOAP_FMAC2 soap_cookie_expire(struct soap*, const char*, const char*, const char*); -SOAP_FMAC1 extern int SOAP_FMAC2 soap_set_cookie_expire(struct soap*, const char*, long, const char*, const char*); -SOAP_FMAC1 extern int SOAP_FMAC2 soap_set_cookie_session(struct soap*, const char*, const char*, const char*); -SOAP_FMAC1 extern int SOAP_FMAC2 soap_clr_cookie_session(struct soap*, const char*, const char*, const char*); -SOAP_FMAC1 extern void SOAP_FMAC2 soap_clr_cookie(struct soap*, const char*, const char*, const char*); -SOAP_FMAC1 extern int SOAP_FMAC2 soap_getenv_cookies(struct soap*); -SOAP_FMAC1 extern struct soap_cookie* SOAP_FMAC2 soap_copy_cookies(struct soap*); -SOAP_FMAC1 extern void SOAP_FMAC2 soap_free_cookies(struct soap*); -#endif - -#ifdef __cplusplus -} -#endif - -#endif - diff --git a/org.glite.security.gsoap-plugin/src/stdsoap2_2.7.0f.c b/org.glite.security.gsoap-plugin/src/stdsoap2_2.7.0f.c deleted file mode 100644 index b4750a4..0000000 --- a/org.glite.security.gsoap-plugin/src/stdsoap2_2.7.0f.c +++ /dev/null @@ -1,12026 +0,0 @@ -/* - -stdsoap2.c[pp] 2.7.0f - -Runtime environment. - -gSOAP XML Web services tools -Copyright (C) 2000-2004, Robert van Engelen, Genivia, Inc., All Rights Reserved. - -Contributors: - -Wind River Systems, Inc., for the following additions (marked WR[...]): - - vxWorks compatible - - Support for IPv6. - --------------------------------------------------------------------------------- - - This software is released under one of the following three licenses: - GPL, the gSOAP public license, or Genivia's license for commercial use. - --------------------------------------------------------------------------------- -gSOAP public license. - -The contents of this file are subject to the gSOAP Public License Version 1.3 -(the "License"); you may not use this file except in compliance with the -License. You may obtain a copy of the License at -http://www.cs.fsu.edu/~engelen/soaplicense.html -Software distributed under the License is distributed on an "AS IS" basis, -WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License -for the specific language governing rights and limitations under the License. - -The Initial Developer of the Original Code is Robert A. van Engelen. -Copyright (C) 2000-2004, Robert van Engelen, Genivia, Inc., All Rights Reserved. --------------------------------------------------------------------------------- -GPL license. - -This program is free software; you can redistribute it and/or modify it under -the terms of the GNU General Public License as published by the Free Software -Foundation; either version 2 of the License, or (at your option) any later -version. - -This program is distributed in the hope that it will be useful, but WITHOUT ANY -WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A -PARTICULAR PURPOSE. See the GNU General Public License for more details. - -You should have received a copy of the GNU General Public License along with -this program; if not, write to the Free Software Foundation, Inc., 59 Temple -Place, Suite 330, Boston, MA 02111-1307 USA - -Author contact information: -engelen@genivia.com / engelen@acm.org --------------------------------------------------------------------------------- -A commercial use license is available from Genivia, Inc., contact@genivia.com --------------------------------------------------------------------------------- - -Installation note: - -Win32 build needs winsock.dll (Visual C++ "wsock32.lib") -To do this in Visual C++ 6.0, go to "Project", "settings", select the "Link" -tab (the project file needs to be selected in the file view) and add -"wsock32.lib" to the "Object/library modules" entry - -On Mac OS X with gcc (GCC) 3.1 20020420 (prerelease) you MUST compile with --fstack_check when using -O2 because gcc 3.1 has a bug that smashes the stack -when locally allocated data exceeds 64K. - -*/ - -#include "stdsoap2.h" - -#ifdef __cplusplus -SOAP_SOURCE_STAMP("@(#) stdsoap2.cpp ver 2.7.0f 2005-02-28 12:00:00 GMT") -extern "C" { -#else -SOAP_SOURCE_STAMP("@(#) stdsoap2.c ver 2.7.0f 2005-02-28 12:00:00 GMT") -#endif - -/* 8bit character representing unknown/nonrepresentable character data (e.g. not supported by current locale) */ -#ifndef SOAP_UNKNOWN_CHAR -#define SOAP_UNKNOWN_CHAR (127) -#endif - -/* EOF=-1 */ -#define SOAP_LT (soap_wchar)(-2) /* XML character '<' */ -#define SOAP_TT (soap_wchar)(-3) /* XML character '' */ -#define SOAP_QT (soap_wchar)(-5) /* XML character '"' */ -#define SOAP_AP (soap_wchar)(-6) /* XML character ''' */ - -#define SOAP_BOM (soap_wchar)(0xFEFF) /* UTF BOM is Unicode FEFF */ - -#define soap_blank(c) ((c) >= 0 && (c) <= 32) -#define soap_notblank(c) ((c) > 32) -#define soap_hash_ptr(p) (((unsigned long)(p) >> 3) & (SOAP_PTRHASH - 1)) - -static int soap_isxdigit(int); -static soap_wchar soap_char(struct soap*); - -#ifndef WITH_NOIDREF -static void soap_update_ptrs(struct soap*, char*, char*, long); -static int soap_has_copies(struct soap*, const char*, const char*); -static struct soap_ilist *soap_hlookup(struct soap*, const char*); -static void soap_init_iht(struct soap*); -static void soap_free_iht(struct soap*); -static void soap_init_pht(struct soap*); -static void soap_free_pht(struct soap*); -#endif - -static int soap_set_error(struct soap*, const char*, const char*, const char*, int); -static int soap_copy_fault(struct soap*, const char*, const char*, const char*); -static int soap_getattrval(struct soap*, char*, size_t, soap_wchar); -static void soap_set_local_namespaces(struct soap*); -static void *fplugin(struct soap*, const char*); - -#ifndef WITH_LEAN -static const char *soap_set_validation_fault(struct soap*, const char*, const char*); -static int soap_isnumeric(struct soap*, const char*); -static time_t soap_timegm(struct tm*); -#endif - -#ifdef SOAP_DEBUG -static void soap_init_logs(struct soap*); -static void soap_close_logfile(struct soap*, int); -static void soap_set_logfile(struct soap*, int, const char*); -#endif - -#ifdef WITH_FAST -static int soap_append_lab(struct soap*, const char*, size_t); -#endif - -#ifndef WITH_LEANER -static struct soap_multipart *soap_new_multipart(struct soap*, struct soap_multipart**, struct soap_multipart**, char*, size_t); -static int soap_putdimefield(struct soap*, const char*, size_t); -static char *soap_getdimefield(struct soap*, size_t); -static void soap_select_mime_boundary(struct soap*); -static int soap_valid_mime_boundary(struct soap*); -#endif - -#ifdef WITH_GZIP -static int soap_getgziphdr(struct soap*); -#endif - -#ifdef WITH_OPENSSL -static int ssl_auth_init(struct soap*); -static int ssl_verify_callback(int, X509_STORE_CTX*); -static int ssl_password(char*, int, int, void *); -static const char *ssl_error(struct soap*, int); -/* This callback is included for future references. It should not be deleted -static DH *ssl_tmp_dh(SSL*, int, int); -*/ -#endif - -#if !defined(WITH_NOHTTP) || !defined(WITH_LEANER) -static const char *soap_decode(char*, size_t, const char*, const char*); -#endif - -#ifndef WITH_NOHTTP -static soap_wchar soap_getchunkchar(struct soap*); -static const char *http_error(struct soap*, int); -static int http_post(struct soap*, const char*, const char*, int, const char*, const char*, size_t); -static int http_get(struct soap*); -static int http_send_header(struct soap*, const char*); -static int http_post_header(struct soap*, const char*, const char*); -static int http_response(struct soap*, int, size_t); -static int http_parse(struct soap*); -static int http_parse_header(struct soap*, const char*, const char*); -#endif - -#ifndef WITH_NOIO -static int fsend(struct soap*, const char*, size_t); -static size_t frecv(struct soap*, char*, size_t); -static int tcp_init(struct soap*); -static const char *tcp_error(struct soap*); -static int tcp_gethost(struct soap*, const char *addr, struct in_addr *inaddr); -static int tcp_connect(struct soap*, const char *endpoint, const char *host, int port); -static int tcp_accept(struct soap*, int, struct sockaddr*, int*); -static int tcp_disconnect(struct soap*); -static int tcp_closesocket(struct soap*, SOAP_SOCKET); -static int tcp_shutdownsocket(struct soap*, SOAP_SOCKET, int); -static const char *soap_strerror(struct soap*); -#endif - -/* WR[ */ -#ifdef VXWORKS -static int vx_nonblocking = TRUE; /* ioctl argument */ -#endif -/* ]WR */ - -#if defined(PALM) && !defined(PALM_2) -unsigned short errno; -#endif - -#ifndef PALM_1 -static const char soap_env1[42] = "http://schemas.xmlsoap.org/soap/envelope/"; -static const char soap_enc1[42] = "http://schemas.xmlsoap.org/soap/encoding/"; -static const char soap_env2[40] = "http://www.w3.org/2003/05/soap-envelope"; -static const char soap_enc2[40] = "http://www.w3.org/2003/05/soap-encoding"; -static const char soap_rpc[35] = "http://www.w3.org/2003/05/soap-rpc"; -#endif - -#ifndef PALM_1 -const struct soap_double_nan soap_double_nan = {0xFFFFFFFF, 0xFFFFFFFF}; -static const char soap_base64o[65] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; -static const char soap_base64i[81] = "\76XXX\77\64\65\66\67\70\71\72\73\74\75XXXXXXX\00\01\02\03\04\05\06\07\10\11\12\13\14\15\16\17\20\21\22\23\24\25\26\27\30\31XXXXXX\32\33\34\35\36\37\40\41\42\43\44\45\46\47\50\51\52\53\54\55\56\57\60\61\62\63"; -#endif - -static const char soap_padding[3] = "\0\0"; -#define SOAP_STR_PADDING (soap_padding) -#define SOAP_STR_EOS (soap_padding) - -#ifndef WITH_LEAN -static const struct soap_code_map html_entity_codes[] = /* entities for XHTML parsing */ -{ { 160, "nbsp" }, - { 161, "iexcl" }, - { 162, "cent" }, - { 163, "pound" }, - { 164, "curren" }, - { 165, "yen" }, - { 166, "brvbar" }, - { 167, "sect" }, - { 168, "uml" }, - { 169, "copy" }, - { 170, "ordf" }, - { 171, "laquo" }, - { 172, "not" }, - { 173, "shy" }, - { 174, "reg" }, - { 175, "macr" }, - { 176, "deg" }, - { 177, "plusmn" }, - { 178, "sup2" }, - { 179, "sup3" }, - { 180, "acute" }, - { 181, "micro" }, - { 182, "para" }, - { 183, "middot" }, - { 184, "cedil" }, - { 185, "sup1" }, - { 186, "ordm" }, - { 187, "raquo" }, - { 188, "frac14" }, - { 189, "frac12" }, - { 190, "frac34" }, - { 191, "iquest" }, - { 192, "Agrave" }, - { 193, "Aacute" }, - { 194, "Acirc" }, - { 195, "Atilde" }, - { 196, "Auml" }, - { 197, "Aring" }, - { 198, "AElig" }, - { 199, "Ccedil" }, - { 200, "Egrave" }, - { 201, "Eacute" }, - { 202, "Ecirc" }, - { 203, "Euml" }, - { 204, "Igrave" }, - { 205, "Iacute" }, - { 206, "Icirc" }, - { 207, "Iuml" }, - { 208, "ETH" }, - { 209, "Ntilde" }, - { 210, "Ograve" }, - { 211, "Oacute" }, - { 212, "Ocirc" }, - { 213, "Otilde" }, - { 214, "Ouml" }, - { 215, "times" }, - { 216, "Oslash" }, - { 217, "Ugrave" }, - { 218, "Uacute" }, - { 219, "Ucirc" }, - { 220, "Uuml" }, - { 221, "Yacute" }, - { 222, "THORN" }, - { 223, "szlig" }, - { 224, "agrave" }, - { 225, "aacute" }, - { 226, "acirc" }, - { 227, "atilde" }, - { 228, "auml" }, - { 229, "aring" }, - { 230, "aelig" }, - { 231, "ccedil" }, - { 232, "egrave" }, - { 233, "eacute" }, - { 234, "ecirc" }, - { 235, "euml" }, - { 236, "igrave" }, - { 237, "iacute" }, - { 238, "icirc" }, - { 239, "iuml" }, - { 240, "eth" }, - { 241, "ntilde" }, - { 242, "ograve" }, - { 243, "oacute" }, - { 244, "ocirc" }, - { 245, "otilde" }, - { 246, "ouml" }, - { 247, "divide" }, - { 248, "oslash" }, - { 249, "ugrave" }, - { 250, "uacute" }, - { 251, "ucirc" }, - { 252, "uuml" }, - { 253, "yacute" }, - { 254, "thorn" }, - { 255, "yuml" }, - { 0, NULL } -}; -#endif - -#ifndef WITH_NOIO -#ifndef WITH_LEAN -static const struct soap_code_map h_error_codes[] = -{ -#ifdef HOST_NOT_FOUND - { HOST_NOT_FOUND, "Host not found" }, -#endif -#ifdef TRY_AGAIN - { TRY_AGAIN, "Try Again" }, -#endif -#ifdef NO_RECOVERY - { NO_RECOVERY, "No Recovery" }, -#endif -#ifdef NO_DATA - { NO_DATA, "No Data" }, -#endif -#ifdef NO_ADDRESS - { NO_ADDRESS, "No Address" }, -#endif - { 0, NULL } -}; -#endif -#endif - -#ifndef WITH_NOHTTP -#ifndef WITH_LEAN -static const struct soap_code_map h_http_error_codes[] = -{ { 201, "Created" }, - { 202, "Accepted" }, - { 203, "Non-Authoritative Information" }, - { 204, "No Content" }, - { 205, "Reset Content" }, - { 206, "Partial Content" }, - { 300, "Multiple Choices" }, - { 301, "Moved Permanently" }, - { 302, "Found" }, - { 303, "See Other" }, - { 304, "Not Modified" }, - { 305, "Use Proxy" }, - { 307, "Temporary Redirect" }, - { 400, "Bad Request" }, - { 401, "Unauthorized" }, - { 402, "Payment Required" }, - { 403, "Forbidden" }, - { 404, "Not Found" }, - { 405, "Method Not Allowed" }, - { 406, "Not Acceptable" }, - { 407, "Proxy Authentication Required" }, - { 408, "Request Time-out" }, - { 409, "Conflict" }, - { 410, "Gone" }, - { 411, "Length Required" }, - { 412, "Precondition Failed" }, - { 413, "Request Entity Too Large" }, - { 414, "Request-URI Too Large" }, - { 415, "Unsupported Media Type" }, - { 416, "Requested range not satisfiable" }, - { 417, "Expectation Failed" }, - { 500, "Internal Server Error" }, - { 501, "Not Implemented" }, - { 502, "Bad Gateway" }, - { 503, "Service Unavailable" }, - { 504, "Gateway Time-out" }, - { 505, "HTTP Version not supported" }, - { 0, NULL } -}; -#endif -#endif - -#ifdef WITH_OPENSSL -static const struct soap_code_map h_ssl_error_codes[] = -{ -#define _SSL_ERROR(e) { e, #e } - _SSL_ERROR(SSL_ERROR_SSL), - _SSL_ERROR(SSL_ERROR_ZERO_RETURN), - _SSL_ERROR(SSL_ERROR_WANT_READ), - _SSL_ERROR(SSL_ERROR_WANT_WRITE), - _SSL_ERROR(SSL_ERROR_WANT_CONNECT), - _SSL_ERROR(SSL_ERROR_WANT_X509_LOOKUP), - _SSL_ERROR(SSL_ERROR_SYSCALL), - { 0, NULL } -}; -#endif - -#ifndef WITH_LEANER -static const struct soap_code_map mime_codes[] = -{ { SOAP_MIME_7BIT, "7bit" }, - { SOAP_MIME_8BIT, "8bit" }, - { SOAP_MIME_BINARY, "binary" }, - { SOAP_MIME_QUOTED_PRINTABLE, "quoted-printable" }, - { SOAP_MIME_BASE64, "base64" }, - { SOAP_MIME_IETF_TOKEN, "ietf-token" }, - { SOAP_MIME_X_TOKEN, "x-token" }, - { 0, NULL } -}; -#endif - -#ifdef WIN32 -static int tcp_done = 0; -#endif - -/******************************************************************************/ -#ifndef WITH_NOIO -#ifndef PALM_1 -static int -fsend(struct soap *soap, const char *s, size_t n) -{ register int nwritten; -#if defined(__cplusplus) && !defined(WITH_LEAN) - if (soap->os) - { soap->os->write(s, n); - if (soap->os->good()) - return SOAP_OK; - return SOAP_EOF; - } -#endif - while (n) - { if (soap_valid_socket(soap->socket)) - { -#ifndef WITH_LEAN - if (soap->send_timeout) - { struct timeval timeout; - fd_set fd; - if (soap->send_timeout > 0) - { timeout.tv_sec = soap->send_timeout; - timeout.tv_usec = 0; - } - else - { timeout.tv_sec = -soap->send_timeout/1000000; - timeout.tv_usec = -soap->send_timeout%1000000; - } - FD_ZERO(&fd); - FD_SET((SOAP_SOCKET)soap->socket, &fd); - for (;;) - { register int r = select((SOAP_SOCKET)(soap->socket + 1), NULL, &fd, &fd, &timeout); - if (r > 0) - break; - if (!r) - { soap->errnum = 0; - return SOAP_EOF; - } - if (soap_socket_errno != SOAP_EINTR) - { soap->errnum = soap_socket_errno; - return SOAP_EOF; - } - } - } -#endif -#ifdef WITH_OPENSSL - if (soap->ssl) - nwritten = SSL_write(soap->ssl, s, n); - else -#endif -#ifndef PALM - nwritten = send((SOAP_SOCKET)soap->socket, s, n, soap->socket_flags); -#else - nwritten = send((SOAP_SOCKET)soap->socket, (void*)s, n, soap->socket_flags); -#endif - if (nwritten <= 0) - { -#ifdef WITH_OPENSSL - int err; - if (soap->ssl && (err = SSL_get_error(soap->ssl, nwritten)) != SSL_ERROR_NONE && err != SSL_ERROR_WANT_READ && err != SSL_ERROR_WANT_WRITE) - return SOAP_EOF; -#endif - if (soap_socket_errno != SOAP_EINTR && soap_socket_errno != SOAP_EWOULDBLOCK && soap_socket_errno != SOAP_EAGAIN) - { soap->errnum = soap_socket_errno; - return SOAP_EOF; - } - nwritten = 0; /* and call write() again */ - } - } - else - { -#ifdef WITH_FASTCGI - nwritten = fwrite((void*)s, 1, n, stdout); - fflush(stdout); -#else -#ifdef UNDER_CE - nwritten = fwrite(s, 1, n, soap->sendfd); -#else -/* WR[ */ -#ifdef VXWORKS -#ifdef WMW_RPM_IO - if (soap->rpmreqid) - { httpBlockPut(soap->rpmreqid, s, n); - nwritten = n; - } - else - nwritten = fwrite(s, sizeof(char), n, fdopen(soap->sendfd, "w")); -#else - nwritten = fwrite(s, sizeof(char), n, fdopen(soap->sendfd, "w")); -#endif /* WMW_RPM_IO */ -#else -/* ]WR */ - nwritten = write((SOAP_SOCKET)soap->sendfd, s, n); -/* WR[ */ -#endif -/* ]WR */ -#endif -#endif - if (nwritten <= 0) - { if (soap_errno != SOAP_EINTR && soap_errno != SOAP_EWOULDBLOCK && soap_errno != SOAP_EAGAIN) - { soap->errnum = soap_errno; - return SOAP_EOF; - } - nwritten = 0; /* and call write() again */ - } - } - n -= nwritten; - s += nwritten; - } - return SOAP_OK; -} -#endif -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_flush_raw(struct soap *soap, const char *s, size_t n) -{ if ((soap->mode & SOAP_IO) == SOAP_IO_STORE) - { register char *t; - if (!(t = (char*)soap_push_block(soap, n))) - return soap->error = SOAP_EOM; - memcpy(t, s, n); -#ifndef WITH_LEANER - if (soap->fpreparesend) - return soap->fpreparesend(soap, s, n); -#endif - return SOAP_OK; - } -#ifndef WITH_LEANER - if ((soap->mode & SOAP_IO) == SOAP_IO_CHUNK) - { char t[16]; - sprintf(t, "\r\n%lX\r\n" + (soap->chunksize ? 0 : 2), (unsigned long)n); - DBGMSG(SENT, t, strlen(t)); - if ((soap->error = soap->fsend(soap, t, strlen(t)))) - return soap->error; - soap->chunksize += n; - } - DBGMSG(SENT, s, n); -#endif - return soap->error = soap->fsend(soap, s, n); -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_flush(struct soap *soap) -{ if (soap->bufidx) - { -#ifdef WITH_ZLIB - if (soap->mode & SOAP_ENC_ZLIB) - { soap->d_stream.next_in = (Byte*)soap->buf; - soap->d_stream.avail_in = (unsigned int)soap->bufidx; -#ifdef WITH_GZIP - soap->z_crc = crc32(soap->z_crc, (Byte*)soap->buf, (unsigned int)soap->bufidx); -#endif - do - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Deflating %u bytes\n", soap->d_stream.avail_in)); - if (deflate(&soap->d_stream, Z_NO_FLUSH) != Z_OK) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Unable to deflate: %s\n", soap->d_stream.msg?soap->d_stream.msg:"")); - return soap->error = SOAP_ZLIB_ERROR; - } - if (!soap->d_stream.avail_out) - { if (soap_flush_raw(soap, soap->z_buf, SOAP_BUFLEN)) - return soap->error; - soap->d_stream.next_out = (Byte*)soap->z_buf; - soap->d_stream.avail_out = SOAP_BUFLEN; - } - } while (soap->d_stream.avail_in); - } - else -#endif - if (soap_flush_raw(soap, soap->buf, soap->bufidx)) - return soap->error; - soap->bufidx = 0; - } - return SOAP_OK; -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_send_raw(struct soap *soap, const char *s, size_t n) -{ if (!n) - return SOAP_OK; - if (soap->mode & SOAP_IO_LENGTH) - { soap->count += n; -#ifndef WITH_LEANER - if (soap->fpreparesend && (soap->mode & SOAP_IO) != SOAP_IO_STORE) - return soap->fpreparesend(soap, s, n); -#endif - return SOAP_OK; - } - if (soap->mode & SOAP_IO) - { register size_t i = SOAP_BUFLEN - soap->bufidx; - while (n >= i) - { memcpy(soap->buf + soap->bufidx, s, i); - soap->bufidx = SOAP_BUFLEN; - if (soap_flush(soap)) - return soap->error; - s += i; - n -= i; - i = SOAP_BUFLEN; - } - memcpy(soap->buf + soap->bufidx, s, n); - soap->bufidx += n; - return SOAP_OK; - } - return soap_flush_raw(soap, s, n); -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_send(struct soap *soap, const char *s) -{ if (s) - return soap_send_raw(soap, s, strlen(s)); - return SOAP_OK; -} -#endif - -/******************************************************************************/ -#ifndef WITH_LEANER -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_send2(struct soap *soap, const char *s1, const char *s2) -{ if (soap_send(soap, s1)) - return soap->error; - return soap_send(soap, s2); -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_LEANER -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_send3(struct soap *soap, const char *s1, const char *s2, const char *s3) -{ if (soap_send(soap, s1) - || soap_send(soap, s2)) - return soap->error; - return soap_send(soap, s3); -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_NOIO -#ifndef PALM_1 -static size_t -frecv(struct soap *soap, char *s, size_t n) -{ register int r; - soap->errnum = 0; -#if defined(__cplusplus) && !defined(WITH_LEAN) - if (soap->is) - { if (soap->is->good()) - return soap->is->read(s, n).gcount(); - return 0; - } -#endif - if (soap_valid_socket(soap->socket)) - { for (;;) - { -#ifndef WITH_LEAN - if (soap->recv_timeout) - { struct timeval timeout; - fd_set fd; - if (soap->recv_timeout > 0) - { timeout.tv_sec = soap->recv_timeout; - timeout.tv_usec = 0; - } - else - { timeout.tv_sec = -soap->recv_timeout/1000000; - timeout.tv_usec = -soap->recv_timeout%1000000; - } - FD_ZERO(&fd); - FD_SET((SOAP_SOCKET)soap->socket, &fd); - for (;;) - { r = select((SOAP_SOCKET)(soap->socket + 1), &fd, NULL, &fd, &timeout); - if (r > 0) - break; - if (r == 0 || soap_socket_errno != SOAP_EINTR) - { soap->errnum = soap_socket_errno; - return 0; - } - } - } -#endif -#ifdef WITH_OPENSSL - if (soap->ssl) - { int err; - r = SSL_read(soap->ssl, s, n); - if ((err = SSL_get_error(soap->ssl, r)) == SSL_ERROR_NONE) - return (size_t)r; - if (err != SSL_ERROR_WANT_READ && err != SSL_ERROR_WANT_WRITE) - return 0; - } - else -#endif - { r = recv((SOAP_SOCKET)soap->socket, s, n, soap->socket_flags); - if (r >= 0) - return (size_t)r; - if (soap_socket_errno != SOAP_EINTR && soap_socket_errno != SOAP_EAGAIN && soap_socket_errno != SOAP_EWOULDBLOCK) - { soap->errnum = soap_socket_errno; - return 0; - } - } -#ifndef WITH_LEAN - { struct timeval timeout; - fd_set fd; - timeout.tv_sec = 0; - timeout.tv_usec = 10000; - FD_ZERO(&fd); - FD_SET((SOAP_SOCKET)soap->socket, &fd); -#ifdef WITH_OPENSSL - if (soap->ssl && SSL_get_error(soap->ssl, r) == SSL_ERROR_WANT_WRITE) - r = select((SOAP_SOCKET)(soap->socket + 1), NULL, &fd, &fd, &timeout); - else - r = select((SOAP_SOCKET)(soap->socket + 1), &fd, NULL, &fd, &timeout); -#else - r = select((SOAP_SOCKET)(soap->socket + 1), &fd, NULL, &fd, &timeout); -#endif - if (r < 0 && soap_socket_errno != SOAP_EINTR) - { soap->errnum = soap_socket_errno; - return 0; - } - } -#endif - } - } -#ifdef WITH_FASTCGI - return fread(s, 1, n, stdin); -#else -#ifdef UNDER_CE - return fread(s, 1, n, soap->recvfd); -#else -/* WR[ */ -#ifdef WMW_RPM_IO - if (soap->rpmreqid) - r = httpBlockRead(soap->rpmreqid, s, n); - else - r = read(soap->recvfd, s, n); - if (r >= 0) - return r; - return 0; -#else -/* ]WR */ - r = read((SOAP_SOCKET)soap->recvfd, s, n); - if (r >= 0) - return (size_t)r; - soap->errnum = soap_errno; - return 0; -/* WR[ */ -#endif -/* ]WR */ -#endif -#endif -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_NOHTTP -#ifndef PALM_1 -static soap_wchar -soap_getchunkchar(struct soap *soap) -{ if (soap->bufidx < soap->buflen) - return soap->buf[soap->bufidx++]; - soap->bufidx = 0; - soap->buflen = soap->chunkbuflen = soap->frecv(soap, soap->buf, SOAP_BUFLEN); - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Read %u bytes from socket %d\n", (unsigned int)soap->buflen, soap->socket)); - DBGMSG(RECV, soap->buf, soap->buflen); - if (soap->buflen) - return soap->buf[soap->bufidx++]; - return EOF; -} -#endif -#endif - -/******************************************************************************/ -#ifndef PALM_1 -static int -soap_isxdigit(int c) -{ return (c >= '0' && c <= '9') || (c >= 'A' && c <= 'F') || (c >= 'a' && c <= 'f'); -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_recv_raw(struct soap *soap) -{ register size_t ret; -#ifdef WITH_ZLIB - if (soap->mode & SOAP_ENC_ZLIB) - { if (soap->d_stream.next_out == Z_NULL) - return EOF; - if (soap->d_stream.avail_in || !soap->d_stream.avail_out) - { register int r; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Inflating\n")); - soap->d_stream.next_out = (Byte*)soap->buf; - soap->d_stream.avail_out = SOAP_BUFLEN; - r = inflate(&soap->d_stream, Z_NO_FLUSH); - if (r == Z_OK || r == Z_STREAM_END) - { soap->bufidx = 0; - soap->buflen = SOAP_BUFLEN - soap->d_stream.avail_out; - if (soap->zlib_in == SOAP_ZLIB_GZIP) - soap->z_crc = crc32(soap->z_crc, (Byte*)soap->buf, (unsigned int)soap->buflen); - if (r == Z_STREAM_END) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Inflated %lu->%lu bytes\n", soap->d_stream.total_in, soap->d_stream.total_out)); - soap->z_ratio_in = (float)soap->d_stream.total_in / (float)soap->d_stream.total_out; - soap->d_stream.next_out = Z_NULL; - } - if (soap->buflen) - { soap->count += soap->buflen; - return SOAP_OK; - } - } - else if (r != Z_BUF_ERROR) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Inflate error: %s\n", soap->d_stream.msg?soap->d_stream.msg:"")); - soap->d_stream.next_out = Z_NULL; - return EOF; - } - } -zlib_again: - if ((soap->mode & SOAP_IO) == SOAP_IO_CHUNK && !soap->chunksize) - { memcpy(soap->buf, soap->z_buf, SOAP_BUFLEN); - soap->buflen = soap->z_buflen; - } - } -#endif -#ifndef WITH_NOHTTP - if ((soap->mode & SOAP_IO) == SOAP_IO_CHUNK) /* read HTTP chunked transfer */ - { -chunk_again: - if (soap->chunksize) - { soap->buflen = ret = soap->frecv(soap, soap->buf, soap->chunksize > SOAP_BUFLEN ? SOAP_BUFLEN : soap->chunksize); - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Getting chunk: read %u bytes\n", (unsigned int)ret)); - DBGMSG(RECV, soap->buf, ret); - soap->bufidx = 0; - soap->chunksize -= ret; - } - else - { register soap_wchar c; - char *t, tmp[8]; - t = tmp; - if (!soap->chunkbuflen) - { soap->chunkbuflen = ret = soap->frecv(soap, soap->buf, SOAP_BUFLEN); - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Read %u bytes from socket %d\n", (unsigned int)ret, soap->socket)); - DBGMSG(RECV, soap->buf, ret); - soap->bufidx = 0; - if (!ret) - return EOF; - } - else - soap->bufidx = soap->buflen; - soap->buflen = soap->chunkbuflen; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Getting chunk size (%u %u)\n", (unsigned int)soap->bufidx, (unsigned int)soap->buflen)); - while (!soap_isxdigit((int)(c = soap_getchunkchar(soap)))) - if ((int)c == EOF) - return EOF; - do - *t++ = (char)c; - while (soap_isxdigit((int)(c = soap_getchunkchar(soap))) && t - tmp < 7); - while ((int)c != EOF && c != '\n') - c = soap_getchunkchar(soap); - if ((int)c == EOF) - return EOF; - *t = '\0'; - soap->chunksize = soap_strtoul(tmp, &t, 16); - if (!soap->chunksize) - { soap->chunkbuflen = 0; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "End of chunked message\n")); - while ((int)c != EOF && c != '\n') - c = soap_getchunkchar(soap); - return EOF; - } - soap->buflen = soap->bufidx + soap->chunksize; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Moving buf len to %u (%u %s)\n", (unsigned int)soap->buflen, (unsigned int)soap->bufidx, tmp)); - if (soap->buflen > soap->chunkbuflen) - { soap->buflen = soap->chunkbuflen; - soap->chunksize -= soap->buflen - soap->bufidx; - soap->chunkbuflen = 0; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Passed end of buffer for chunked HTTP (%lu bytes left)\n", (unsigned long)(soap->buflen - soap->bufidx))); - } - else if (soap->chunkbuflen) - soap->chunksize = 0; - ret = soap->buflen - soap->bufidx; - if (!ret) - goto chunk_again; - } - } - else -#endif - { soap->bufidx = 0; - soap->buflen = ret = soap->frecv(soap, soap->buf, SOAP_BUFLEN); - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Read %u bytes from socket %d\n", (unsigned int)ret, soap->socket)); - DBGMSG(RECV, soap->buf, ret); - } -#ifndef WITH_LEANER - if (soap->fpreparerecv && (soap->error = soap->fpreparerecv(soap, soap->buf, ret))) - return soap->error; -#endif -#ifdef WITH_ZLIB - if (soap->mode & SOAP_ENC_ZLIB) - { register int r; - memcpy(soap->z_buf, soap->buf, SOAP_BUFLEN); - soap->d_stream.next_in = (Byte*)(soap->z_buf + soap->bufidx); - soap->d_stream.avail_in = (unsigned int)ret; - soap->d_stream.next_out = (Byte*)soap->buf; - soap->d_stream.avail_out = SOAP_BUFLEN; - r = inflate(&soap->d_stream, Z_NO_FLUSH); - if (r == Z_OK || r == Z_STREAM_END) - { soap->bufidx = 0; - soap->z_buflen = soap->buflen; - soap->buflen = ret = SOAP_BUFLEN - soap->d_stream.avail_out; - if (soap->zlib_in == SOAP_ZLIB_GZIP) - soap->z_crc = crc32(soap->z_crc, (Byte*)soap->buf, (unsigned int)soap->buflen); - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Inflated %u bytes\n", (unsigned int)ret)); - if (!ret) - goto zlib_again; - if (r == Z_STREAM_END) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Inflated %lu->%lu bytes\n", soap->d_stream.total_in, soap->d_stream.total_out)); - soap->z_ratio_in = (float)soap->d_stream.total_in / (float)soap->d_stream.total_out; - soap->d_stream.next_out = Z_NULL; - } - } - else - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Unable to inflate: (%d) %s\n", r, soap->d_stream.msg?soap->d_stream.msg:"")); - soap->d_stream.next_out = Z_NULL; - return EOF; - } - } -#endif - soap->count += ret; - return !ret; -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_recv(struct soap *soap) -{ -#ifndef WITH_LEANER - if (soap->mode & SOAP_ENC_DIME) - { if (soap->dime.buflen) - { char *s; - int i; - unsigned char tmp[12]; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "DIME hdr for chunked DIME is in buffer\n")); - soap->count += soap->dime.buflen - soap->buflen; - soap->buflen = soap->dime.buflen; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Skip padding (%ld bytes)\n", -(long)soap->dime.size&3)); - for (i = -(long)soap->dime.size&3; i > 0; i--) - { soap->bufidx++; - if (soap->bufidx >= soap->buflen) - if (soap_recv_raw(soap)) - return EOF; - } - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Get DIME hdr for next chunk\n")); - s = (char*)tmp; - for (i = 12; i > 0; i--) - { *s++ = soap->buf[soap->bufidx++]; - if (soap->bufidx >= soap->buflen) - if (soap_recv_raw(soap)) - return EOF; - } - soap->dime.flags = tmp[0] & 0x7; - soap->dime.size = ((size_t)tmp[8] << 24) | ((size_t)tmp[9] << 16) | ((size_t)tmp[10] << 8) | ((size_t)tmp[11]); - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Get DIME chunk (%u bytes)\n", (unsigned int)soap->dime.size)); - if (soap->dime.flags & SOAP_DIME_CF) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "More chunking\n")); - soap->dime.chunksize = soap->dime.size; - if (soap->buflen - soap->bufidx >= soap->dime.size) - { soap->dime.buflen = soap->buflen; - soap->buflen = soap->bufidx + soap->dime.chunksize; - } - else - soap->dime.chunksize -= soap->buflen - soap->bufidx; - } - else - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Last chunk\n")); - soap->dime.buflen = 0; - soap->dime.chunksize = 0; - } - soap->count = soap->buflen - soap->bufidx; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "%u bytes remaining\n", (unsigned int)soap->count)); - return SOAP_OK; - } - if (soap->dime.chunksize) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Get next DIME hdr for chunked DIME (%u bytes chunk)\n", (unsigned int)soap->dime.chunksize)); - if (soap_recv_raw(soap)) - return EOF; - if (soap->buflen - soap->bufidx >= soap->dime.chunksize) - { soap->dime.buflen = soap->buflen; - soap->count -= soap->buflen - soap->bufidx - soap->dime.chunksize; - soap->buflen = soap->bufidx + soap->dime.chunksize; - } - else - soap->dime.chunksize -= soap->buflen - soap->bufidx; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "%lu bytes remaining, count=%u\n", (unsigned long)(soap->buflen-soap->bufidx), (unsigned int)soap->count)); - return SOAP_OK; - } - } -#endif - return soap_recv_raw(soap); -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -soap_wchar -SOAP_FMAC2 -soap_getchar(struct soap *soap) -{ register soap_wchar c; - if (soap->ahead) - { c = soap->ahead; - soap->ahead = 0; - return c; - } - return soap_get1(soap); -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -const struct soap_code_map* -SOAP_FMAC2 -soap_code(const struct soap_code_map *map, const char *str) -{ while (map->string) - { if (!strcmp(str, map->string)) /* case sensitive */ - return map; - map++; - } - return NULL; -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -long -SOAP_FMAC2 -soap_int_code(const struct soap_code_map *map, const char *str, long other) -{ while (map->string) - { if (!soap_tag_cmp(str, map->string)) /* case insensitive */ - return map->code; - map++; - } - return other; -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -const char* -SOAP_FMAC2 -soap_str_code(const struct soap_code_map *map, long code) -{ while (map->code != code && map->string) - map++; - return map->string; -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -static soap_wchar -soap_char(struct soap *soap) -{ char tmp[8]; - register int i; - register soap_wchar c; - register char *s = tmp; - for (i = 0; i < 7; i++) - { c = soap_get1(soap); - if (c == ';' || (int)c == EOF) - break; - *s++ = (char)c; - } - *s = '\0'; - if (*tmp == '#') - { if (tmp[1] == 'x' || tmp[1] == 'X') - return soap_strtol(tmp + 2, NULL, 16); - return atol(tmp + 1); - } - if (!strcmp(tmp, "lt")) - return '<'; - if (!strcmp(tmp, "gt")) - return '>'; - if (!strcmp(tmp, "amp")) - return '&'; - if (!strcmp(tmp, "quot")) - return '"'; - if (!strcmp(tmp, "apos")) - return '\''; -#ifndef WITH_LEAN - return (soap_wchar)soap_int_code(html_entity_codes, tmp, SOAP_UNKNOWN_CHAR); -#else - return SOAP_UNKNOWN_CHAR; /* use this to represent unknown code */ -#endif -} -#endif - -/******************************************************************************/ -#ifdef WITH_LEAN -soap_wchar -soap_get0(struct soap *soap) -{ if (soap->bufidx >= soap->buflen && soap_recv(soap)) - return EOF; - return (unsigned char)soap->buf[soap->bufidx]; -} -#endif - -/******************************************************************************/ -#ifdef WITH_LEAN -soap_wchar -soap_get1(struct soap *soap) -{ if (soap->bufidx >= soap->buflen && soap_recv(soap)) - return EOF; - return (unsigned char)soap->buf[soap->bufidx++]; -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -soap_wchar -SOAP_FMAC2 -soap_get(struct soap *soap) -{ register soap_wchar c; - c = soap->ahead; - if (c) - soap->ahead = 0; - else - c = soap_get1(soap); - for (;;) - { if (soap->cdata) - { if (c == ']') - { c = soap_get1(soap); - if (c == ']') - { soap->cdata = 0; - soap_get1(soap); /* skip > */ - c = soap_get1(soap); - } - else - { soap_revget1(soap); - return ']'; - } - } - else - return c; - } - switch (c) - { case '<': - do c = soap_get1(soap); - while (soap_blank(c)); - if (c == '!' || c == '?' || c == '%') - { if (c == '!') - { c = soap_get1(soap); - if (c == '[') - { do c = soap_get1(soap); - while ((int)c != EOF && c != '['); - if ((int)c == EOF) - break; - soap->cdata = 1; - c = soap_get1(soap); - continue; - } - if (c == '-' && (c = soap_get1(soap)) == '-') - { do - { c = soap_get1(soap); - if (c == '-' && (c = soap_get1(soap)) == '-') - break; - } while ((int)c != EOF); - } - } - while ((int)c != EOF && c != '>') - c = soap_get1(soap); - if ((int)c == EOF) - break; - c = soap_get1(soap); - continue; - } - if (c == '/') - return SOAP_TT; - soap_revget1(soap); - return SOAP_LT; - case '>': - return SOAP_GT; - case '"': - return SOAP_QT; - case '\'': - return SOAP_AP; - case '&': - return soap_char(soap) | 0x80000000; - } - break; - } - return c; -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -soap_wchar -SOAP_FMAC2 -soap_advance(struct soap *soap) -{ register soap_wchar c; - while ((int)((c = soap_get(soap)) != EOF) && c != SOAP_LT && c != SOAP_TT) - ; - return c; -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -soap_wchar -SOAP_FMAC2 -soap_skip(struct soap *soap) -{ register soap_wchar c; - do c = soap_get(soap); - while (soap_blank(c)); - return c; -} -#endif - -/******************************************************************************/ -#ifndef WITH_LEANER -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_move(struct soap *soap, long n) -{ DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Moving %ld bytes forward\n", (long)n)); - for (; n > 0; n--) - if ((int)soap_getchar(soap) == EOF) - return SOAP_EOF; - return SOAP_OK; -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_LEANER -#ifndef PALM_1 -SOAP_FMAC1 -size_t -SOAP_FMAC2 -soap_tell(struct soap *soap) -{ return soap->count - soap->buflen + soap->bufidx - (soap->ahead != 0); -} -#endif -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_pututf8(struct soap *soap, register unsigned long c) -{ char tmp[16]; - if (c > 0 && c < 0x80) - { *tmp = (char)c; - return soap_send_raw(soap, tmp, 1); - } -#ifndef WITH_LEAN - if (soap->mode & SOAP_XML_CANONICAL) - { register char *t = tmp; - if (c < 0x0800) - *t++ = (char)(0xC0 | ((c >> 6) & 0x1F)); - else - { if (c < 0x010000) - *t++ = (char)(0xE0 | ((c >> 12) & 0x0F)); - else - { if (c < 0x200000) - *t++ = (char)(0xF0 | ((c >> 18) & 0x07)); - else - { if (c < 0x04000000) - *t++ = (char)(0xF8 | ((c >> 24) & 0x03)); - else - { *t++ = (char)(0xFC | ((c >> 30) & 0x01)); - *t++ = (char)(0x80 | ((c >> 24) & 0x3F)); - } - *t++ = (char)(0x80 | ((c >> 18) & 0x3F)); - } - *t++ = (char)(0x80 | ((c >> 12) & 0x3F)); - } - *t++ = (char)(0x80 | ((c >> 6) & 0x3F)); - } - *t++ = (char)(0x80 | (c & 0x3F)); - *t = '\0'; - } - else -#endif - sprintf(tmp, "&#%lu;", c); - return soap_send(soap, tmp); -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -soap_wchar -SOAP_FMAC2 -soap_getutf8(struct soap *soap) -{ register soap_wchar c, c1, c2, c3, c4; - c = soap_get(soap); - if (c < 0x80 || (soap->mode & SOAP_ENC_LATIN)) - return c; - c1 = soap_get(soap); - if (c1 < 0x80) - { soap_unget(soap, c1); - return c; - } - c1 &= 0x3F; - if (c < 0xE0) - return ((soap_wchar)(c & 0x1F) << 6) | c1; - c2 = (soap_wchar)soap_get1(soap) & 0x3F; - if (c < 0xF0) - return ((soap_wchar)(c & 0x0F) << 12) | (c1 << 6) | c2; - c3 = (soap_wchar)soap_get1(soap) & 0x3F; - if (c < 0xF8) - return ((soap_wchar)(c & 0x07) << 18) | (c1 << 12) | (c2 << 6) | c3; - c4 = (soap_wchar)soap_get1(soap) & 0x3F; - if (c < 0xFC) - return ((soap_wchar)(c & 0x03) << 24) | (c1 << 18) | (c2 << 12) | (c3 << 6) | c4; - return ((soap_wchar)(c & 0x01) << 30) | (c1 << 24) | (c2 << 18) | (c3 << 12) | (c4 << 6) | (soap_wchar)(soap_get1(soap) & 0x3F); -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_puthex(struct soap *soap, const unsigned char *s, int n) -{ /* TODO: serialize to DOM (as an option) using new soap_s2hex() */ - char d[2]; - register int i; - for (i = 0; i < n; i++) - { register int m = *s++; - d[0] = (char)((m >> 4) + (m > 159 ? '7' : '0')); - m &= 0x0F; - d[1] = (char)(m + (m > 9 ? '7' : '0')); - if (soap_send_raw(soap, d, 2)) - return soap->error; - } - return SOAP_OK; -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -unsigned char* -SOAP_FMAC2 -soap_gethex(struct soap *soap, int *n) -{ -#ifdef WITH_FAST - soap->labidx = 0; - for (;;) - { register char *s; - register int i, k; - if (soap_append_lab(soap, NULL, 0)) - return NULL; - s = soap->labbuf + soap->labidx; - k = soap->lablen - soap->labidx; - soap->labidx = soap->lablen; - for (i = 0; i < k; i++) - { register char d1, d2; - register soap_wchar c; - c = soap_get(soap); - if (soap_isxdigit(c)) - { d1 = (char)c; - c = soap_get(soap); - if (soap_isxdigit(c)) - d2 = (char)c; - else - { soap->error = SOAP_TYPE; - return NULL; - } - } - else - { unsigned char *p; - soap_unget(soap, c); - if (n) - *n = (int)(soap->lablen - k + i); - p = (unsigned char*)soap_malloc(soap, soap->lablen - k + i); - if (p) - memcpy(p, soap->labbuf, soap->lablen - k + i); - return p; - } - *s++ = ((d1 >= 'A' ? (d1 & 0x7) + 9 : d1 - '0') << 4) + (d2 >= 'A' ? (d2 & 0x7) + 9 : d2 - '0'); - } - } -#else - if (soap_new_block(soap)) - return NULL; - for (;;) - { register int i; - register char *s = (char*)soap_push_block(soap, SOAP_BLKLEN); - if (!s) - { soap_end_block(soap); - return NULL; - } - for (i = 0; i < SOAP_BLKLEN; i++) - { register char d1, d2; - register soap_wchar c = soap_get(soap); - if (soap_isxdigit(c)) - { d1 = (char)c; - c = soap_get(soap); - if (soap_isxdigit(c)) - d2 = (char)c; - else - { soap_end_block(soap); - soap->error = SOAP_TYPE; - return NULL; - } - } - else - { unsigned char *p; - soap_unget(soap, c); - if (n) - *n = soap_size_block(soap, i); - p = (unsigned char*)soap_save_block(soap, NULL, 0); - return p; - } - *s++ = ((d1 >= 'A' ? (d1 & 0x7) + 9 : d1 - '0') << 4) + (d2 >= 'A' ? (d2 & 0x7) + 9 : d2 - '0'); - } - } -#endif -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_putbase64(struct soap *soap, const unsigned char *s, int n) -{ register int i; - register unsigned long m; - char d[4]; - if (!s) - return SOAP_OK; -#ifdef WITH_DOM - if ((soap->mode & SOAP_XML_DOM) && soap->dom) - { if (!(soap->dom->data = soap_s2base64(soap, s, soap->dom->data, n))) - return soap->error; - return SOAP_OK; - } -#endif - for (; n > 2; n -= 3, s += 3) - { m = s[0]; - m = (m << 8) | s[1]; - m = (m << 8) | s[2]; - for (i = 4; i > 0; m >>= 6) - d[--i] = soap_base64o[m & 0x3F]; - if (soap_send_raw(soap, d, 4)) - return soap->error; - } - if (n > 0) - { m = 0; - for (i = 0; i < n; i++) - m = (m << 8) | *s++; - for (; i < 3; i++) - m <<= 8; - for (i++; i > 0; m >>= 6) - d[--i] = soap_base64o[m & 0x3F]; - for (i = 3; i > n; i--) - d[i] = '='; - if (soap_send_raw(soap, d, 4)) - return soap->error; - } - return SOAP_OK; -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -unsigned char* -SOAP_FMAC2 -soap_getbase64(struct soap *soap, int *n, int malloc_flag) -{ -#ifdef WITH_FAST - soap->labidx = 0; - for (;;) - { register int i, k; - register char *s; - if (soap_append_lab(soap, NULL, 2)) - return NULL; - s = soap->labbuf + soap->labidx; - k = 3 * ((soap->lablen - soap->labidx) / 3); - soap->labidx = 3 * (soap->lablen / 3); - if (!s) - return NULL; - for (i = 0; i < k; i += 3) - { register unsigned long m = 0; - register int j = 0; - do - { register soap_wchar c = soap_get(soap); - if (c == '=' || c < 0) - { unsigned char *p; - switch (j) - { case 2: - *s++ = (char)((m >> 4) & 0xFF); - i++; - break; - case 3: - *s++ = (char)((m >> 10) & 0xFF); - *s++ = (char)((m >> 2) & 0xFF); - i += 2; - } - if (n) - *n = (int)(soap->lablen - k + i); - p = (unsigned char*)soap_malloc(soap, soap->lablen - k + i); - if (p) - memcpy(p, soap->labbuf, soap->lablen - k + i); - if (c >= 0) - { while ((int)((c = soap_get(soap)) != EOF) && c != SOAP_LT && c != SOAP_TT) - ; - } - soap_unget(soap, c); - return p; - } - c -= '+'; - if (c >= 0 && c <= 79) - { m = (m << 6) + soap_base64i[c]; - j++; - } - } while (j < 4); - *s++ = (char)((m >> 16) & 0xFF); - *s++ = (char)((m >> 8) & 0xFF); - *s++ = (char)(m & 0xFF); - } - } -#else - if (soap_new_block(soap)) - return NULL; - for (;;) - { register int i; - register char *s = (char*)soap_push_block(soap, 3 * SOAP_BLKLEN); /* must be multiple of 3 */ - if (!s) - { soap_end_block(soap); - return NULL; - } - for (i = 0; i < SOAP_BLKLEN; i++) - { register unsigned long m = 0; - register int j = 0; - do - { register soap_wchar c = soap_get(soap); - if (c == '=' || c < 0) - { unsigned char *p; - i *= 3; - switch (j) - { case 2: - *s++ = (char)((m >> 4) & 0xFF); - i++; - break; - case 3: - *s++ = (char)((m >> 10) & 0xFF); - *s++ = (char)((m >> 2) & 0xFF); - i += 2; - } - if (n) - *n = (int)soap_size_block(soap, i); - p = (unsigned char*)soap_save_block(soap, NULL, 0); - if (c >= 0) - { while ((int)((c = soap_get(soap)) != EOF) && c != SOAP_LT && c != SOAP_TT) - ; - } - soap_unget(soap, c); - return p; - } - c -= '+'; - if (c >= 0 && c <= 79) - { m = (m << 6) + soap_base64i[c]; - j++; - } - } while (j < 4); - *s++ = (char)((m >> 16) & 0xFF); - *s++ = (char)((m >> 8) & 0xFF); - *s++ = (char)(m & 0xFF); - } - } -#endif -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -char * -SOAP_FMAC2 -soap_strdup(struct soap *soap, const char *s) -{ char *t = NULL; - if (s && (t = (char*)soap_malloc(soap, strlen(s) + 1))) - strcpy(t, s); - return t; -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_new_block(struct soap *soap) -{ struct soap_blist *p; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "New block sequence (prev=%p)\n", soap->blist)); - if (!(p = (struct soap_blist*)SOAP_MALLOC(sizeof(struct soap_blist)))) - return SOAP_EOM; - p->next = soap->blist; - p->ptr = NULL; - p->size = 0; - soap->blist = p; - return SOAP_OK; -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -void* -SOAP_FMAC2 -soap_push_block(struct soap *soap, size_t n) -{ char *p; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Push block of %u bytes (%u bytes total)\n", (unsigned int)n, (unsigned int)soap->blist->size + (unsigned int)n)); - if (!(p = (char*)SOAP_MALLOC(n + sizeof(char*) + sizeof(size_t)))) - { soap->error = SOAP_EOM; - return NULL; - } - *(char**)p = soap->blist->ptr; - *(size_t*)(p + sizeof(char*)) = n; - soap->blist->ptr = p; - soap->blist->size += n; - return p + sizeof(char*) + sizeof(size_t); -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_pop_block(struct soap *soap) -{ char *p; - if (!soap->blist->ptr) - return; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Pop block\n")); - p = soap->blist->ptr; - soap->blist->size -= *(size_t*)(p + sizeof(char*)); - soap->blist->ptr = *(char**)p; - SOAP_FREE(p); -} -#endif - -/******************************************************************************/ -#ifndef WITH_NOIDREF -#ifndef PALM_1 -static void -soap_update_ptrs(struct soap *soap, char *start, char *end, long offset) -{ int i; - register struct soap_ilist *ip; - register struct soap_flist *fp; - register void *p, **q; - for (i = 0; i < SOAP_IDHASH; i++) - for (ip = soap->iht[i]; ip; ip = ip->next) - { if (ip->ptr && (char*)ip->ptr >= start && (char*)ip->ptr < end) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Update id='%s' %p -> %p\n", ip->id, ip->ptr, (char*)ip->ptr + offset)); - ip->ptr = (char*)ip->ptr + offset; - } - for (q = &ip->link; q; q = (void**)p) - { p = *q; - if (p && (char*)p >= start && (char*)p < end) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Link update id='%s' %p\n", ip->id, p)); - *q = (char*)p + offset; - } - } - for (q = &ip->copy; q; q = (void**)p) - { p = *q; - if (p && (char*)p >= start && (char*)p < end) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copy chain update id='%s' %p\n", ip->id, p)); - *q = (char*)p + offset; - } - } - for (fp = ip->flist; fp; fp = fp->next) - { if ((char*)fp->ptr >= start && (char*)fp->ptr < end) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copy list update id='%s' %p\n", ip->id, fp)); - fp->ptr = (char*)fp->ptr + offset; - } - } - } -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_NOIDREF -#ifndef PALM_1 -static int -soap_has_copies(struct soap *soap, register const char *start, register const char *end) -{ register int i; - register struct soap_ilist *ip; - register struct soap_flist *fp; - register const char *p; - for (i = 0; i < SOAP_IDHASH; i++) - { for (ip = soap->iht[i]; ip; ip = ip->next) - { for (p = (const char*)ip->copy; p; p = *(const char**)p) - if (p >= start && p < end) - return SOAP_ERR; - for (fp = ip->flist; fp; fp = fp->next) - if ((const char*)fp->ptr >= start && (const char*)fp->ptr < end) - return SOAP_ERR; - } - } - return SOAP_OK; -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_NOIDREF -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_resolve(struct soap *soap) -{ register int i; - register struct soap_ilist *ip; - register struct soap_flist *fp; - short flag; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Resolving forwarded data\n")); - for (i = 0; i < SOAP_IDHASH; i++) - { for (ip = soap->iht[i]; ip; ip = ip->next) - { if (ip->ptr) - { register void *p, **q, *r; - q = (void**)ip->link; - ip->link = NULL; - r = ip->ptr; - DBGLOG(TEST, if (q) SOAP_MESSAGE(fdebug, "Traversing link chain to resolve id='%s'\n", ip->id)); - while (q) - { p = *q; - *q = r; - DBGLOG(TEST,SOAP_MESSAGE(fdebug, "... link %p -> %p\n", q, r)); - q = (void**)p; - } - } - else if (*ip->id == '#') - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Missing data for id='%s'\n", ip->id)); - strcpy(soap->id, ip->id + 1); - return soap->error = SOAP_MISSING_ID; - } - } - } - do - { flag = 0; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Resolution phase\n")); - for (i = 0; i < SOAP_IDHASH; i++) - { for (ip = soap->iht[i]; ip; ip = ip->next) - { if (ip->ptr && !soap_has_copies(soap, (const char*)ip->ptr, (const char*)ip->ptr + ip->size)) - { if (ip->copy) - { register void *p, **q = (void**)ip->copy; - DBGLOG(TEST, if (q) SOAP_MESSAGE(fdebug, "Traversing copy chain to resolve id='%s'\n", ip->id)); - ip->copy = NULL; - do - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "... copy %p -> %p (%u bytes)\n", ip->ptr, q, (unsigned int)ip->size)); - p = *q; - memcpy(q, ip->ptr, ip->size); - q = (void**)p; - } while (q); - flag = 1; - } - for (fp = ip->flist; fp; fp = ip->flist) - { register unsigned int k = fp->level; - register void *p = ip->ptr; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Resolving forwarded data type=%d location=%p level=%u,%u id='%s'\n", ip->type, p, ip->level, fp->level, ip->id)); - while (ip->level < k) - { register void **q = (void**)soap_malloc(soap, sizeof(void*)); - if (!q) - return soap->error; - *q = p; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Descending one level, new location=%p holds=%p...\n", q, *q)); - p = (void*)q; - k--; - } - if (fp->fcopy) - fp->fcopy(soap, ip->type, fp->type, fp->ptr, p, ip->size); - else - soap_fcopy(soap, ip->type, fp->type, fp->ptr, p, ip->size); - ip->flist = fp->next; - SOAP_FREE(fp); - flag = 1; - } - } - } - } - } while (flag); -#ifdef SOAP_DEBUG - for (i = 0; i < SOAP_IDHASH; i++) - { for (ip = soap->iht[i]; ip; ip = ip->next) - { if (ip->copy || ip->flist) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Resolution error: forwarded data for id='%s' could not be propagated, please report this problem to the developers\n", ip->id)); - } - } - } -#endif - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Resolution done\n")); - return SOAP_OK; -} -#endif -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -size_t -SOAP_FMAC2 -soap_size_block(struct soap *soap, size_t n) -{ if (soap->blist->ptr) - { soap->blist->size -= *(size_t*)(soap->blist->ptr + sizeof(char*)) - n; - *(size_t*)(soap->blist->ptr + sizeof(char*)) = n; - } - return soap->blist->size; -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -char* -SOAP_FMAC2 -soap_first_block(struct soap *soap) -{ char *p, *q, *r; - p = soap->blist->ptr; - if (!p) - return NULL; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "First block\n")); - r = NULL; - do - { q = *(char**)p; - *(char**)p = r; - r = p; - p = q; - } while (p); - soap->blist->ptr = r; - return r + sizeof(char*) + sizeof(size_t); -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -char* -SOAP_FMAC2 -soap_next_block(struct soap *soap) -{ char *p; - p = soap->blist->ptr; - if (p) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Next block\n")); - soap->blist->ptr = *(char**)p; - SOAP_FREE(p); - if (soap->blist->ptr) - return soap->blist->ptr + sizeof(char*) + sizeof(size_t); - } - return NULL; -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -size_t -SOAP_FMAC2 -soap_block_size(struct soap *soap) -{ return *(size_t*)(soap->blist->ptr + sizeof(char*)); -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_end_block(struct soap *soap) -{ struct soap_blist *bp; - char *p, *q; - bp = soap->blist; - if (bp) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "End of block sequence, free all remaining blocks\n")); - for (p = bp->ptr; p; p = q) - { q = *(char**)p; - SOAP_FREE(p); - } - soap->blist = bp->next; - SOAP_FREE(bp); - } - DBGLOG(TEST, if (soap->blist) SOAP_MESSAGE(fdebug, "Restore previous block sequence\n")); -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -char* -SOAP_FMAC2 -soap_save_block(struct soap *soap, char *p, int flag) -{ register size_t n; - register char *q, *s; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Save all blocks in contiguous memory space of %u bytes (%p->%p)\n", (unsigned int)soap->blist->size, soap->blist->ptr, p)); - if (soap->blist->size) - { if (!p) - p = (char*)soap_malloc(soap, soap->blist->size); - if (p) - { for (s = p, q = soap_first_block(soap); q; q = soap_next_block(soap)) - { n = soap_block_size(soap); -#ifndef WITH_NOIDREF - if (flag) - soap_update_ptrs(soap, q, q + n, (long)s - (long)q); /* pointers s and q may or may not be related */ -#endif - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copy %u bytes from %p to %p\n", (unsigned int)n, q, s)); - memcpy(s, q, n); - s += n; - } - } - else - soap->error = SOAP_EOM; - } - soap_end_block(soap); - return p; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -char * -SOAP_FMAC2 -soap_putsize(struct soap *soap, const char *type, int size) -{ return soap_putsizes(soap, type, &size, 1); -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -char * -SOAP_FMAC2 -soap_putsizes(struct soap *soap, const char *type, const int *size, int dim) -{ return soap_putsizesoffsets(soap, type, size, NULL, dim); -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -char * -SOAP_FMAC2 -soap_putsizesoffsets(struct soap *soap, const char *type, const int *size, const int *offset, int dim) -{ int i; - if (!type) - return NULL; - if (soap->version == 2) - { sprintf(soap->type, "%s[%d", type, size[0]); - for (i = 1; i < dim; i++) - sprintf(soap->type + strlen(soap->type), " %d", size[i]); - } - else - { if (offset) - { sprintf(soap->type, "%s[%d", type, size[0] + offset[0]); - for (i = 1; i < dim; i++) - sprintf(soap->type + strlen(soap->type), ",%d", size[i] + offset[i]); - } - else - { sprintf(soap->type, "%s[%d", type, size[0]); - for (i = 1; i < dim; i++) - sprintf(soap->type + strlen(soap->type), ",%d", size[i]); - } - strcat(soap->type, "]"); - } - return soap->type; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -char * -SOAP_FMAC2 -soap_putoffset(struct soap *soap, int offset) -{ return soap_putoffsets(soap, &offset, 1); -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -char * -SOAP_FMAC2 -soap_putoffsets(struct soap *soap, const int *offset, int dim) -{ register int i; - sprintf(soap->arrayOffset, "[%d", offset[0]); - for (i = 1; i < dim; i++) - sprintf(soap->arrayOffset + strlen(soap->arrayOffset), ",%d", offset[i]); - strcat(soap->arrayOffset, "]"); - return soap->arrayOffset; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_size(const int *size, int dim) -{ register int i, n = size[0]; - for (i = 1; i < dim; i++) - n *= size[i]; - return n; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_getoffsets(const char *attr, const int *size, int *offset, int dim) -{ register int i, j = 0; - if (offset) - for (i = 0; i < dim && attr && *attr; i++) - { attr++; - j *= size[i]; - j += offset[i] = (int)atol(attr); - attr = strchr(attr, ','); - } - else - for (i = 0; i < dim && attr && *attr; i++) - { attr++; - j *= size[i]; - j += (int)atol(attr); - attr = strchr(attr, ','); - } - return j; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_getsize(const char *attr1, const char *attr2, int *j) -{ register int n, k; - char *s; - *j = 0; - if (!*attr1) - return -1; - n = 1; - do - { attr1++; - k = (int)soap_strtol(attr1, &s, 10); - n *= k; - if (k < 0 || n > SOAP_MAXARRAYSIZE || s == attr1) - return -1; - attr1 = strchr(s, ','); - if (!attr1) - attr1 = strchr(s, ' '); - if (attr2 && *attr2) - { attr2++; - *j *= k; - k = (int)soap_strtol(attr2, &s, 10); - *j += k; - if (k < 0) - return -1; - attr2 = s; - } - } while (attr1 && *attr1 != ']'); - return n - *j; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_getsizes(const char *attr, int *size, int dim) -{ register int i, k, n; - if (!*attr) - return -1; - i = strlen(attr); - n = 1; - do - { for (i = i-1; i >= 0; i--) - if (attr[i] == '[' || attr[i] == ',' || attr[i] == ' ') - break; - k = (int)atol(attr + i + 1); - n *= size[--dim] = k; - if (k < 0 || n > SOAP_MAXARRAYSIZE) - return -1; - } while (i >= 0 && attr[i] != '['); - return n; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_getposition(const char *attr, int *pos) -{ register int i, n; - if (!*attr) - return -1; - n = 0; - i = 1; - do - { pos[n++] = (int)atol(attr + i); - while (attr[i] && attr[i] != ',' && attr[i] != ']') - i++; - if (attr[i] == ',') - i++; - } while (n < SOAP_MAXDIMS && attr[i] && attr[i] != ']'); - return n; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_push_namespace(struct soap *soap, const char *id, const char *ns) -{ register struct soap_nlist *np; - register struct Namespace *p; - np = (struct soap_nlist*)SOAP_MALLOC(sizeof(struct soap_nlist) + strlen(id)); - if (!np) - return soap->error = SOAP_EOM; - np->next = soap->nlist; - soap->nlist = np; - strcpy(np->id, id); - np->level = soap->level; - np->index = -1; - np->ns = NULL; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Push namespace binding (level=%u) '%s' '%s'\n", soap->level, id, ns)); - p = soap->local_namespaces; - if (p) - { register short i = 0; - for (; p->id; p++, i++) - { if (p->ns && !strcmp(ns, p->ns)) - { if (p->out) - { SOAP_FREE(p->out); - p->out = NULL; - } - break; - } - if (p->out) - { if (!SOAP_STRCMP(ns, p->out)) - break; - } - else if (p->in) - { if (!soap_tag_cmp(ns, p->in)) - { if ((p->out = (char*)SOAP_MALLOC(strlen(ns) + 1))) - strcpy(p->out, ns); - break; - } - } - } - if (p && p->id) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Push OK ('%s' matches '%s' in namespace table)\n", id, p->id)); - np->index = i; - } - } - if (!p || !p->id) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Push NOT OK: no match found for '%s' in namespace mapping table (added to stack anyway)\n", ns)); - np->ns = (char*)SOAP_MALLOC(strlen(ns) + 1); - if (!np->ns) - return soap->error = SOAP_EOM; - strcpy(np->ns, ns); - } - return SOAP_OK; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_pop_namespace(struct soap *soap) -{ register struct soap_nlist *np; - while (soap->nlist && soap->nlist->level >= soap->level) - { np = soap->nlist->next; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Popped namespace binding (level=%u) '%s'\n", soap->level, soap->nlist->id)); - if (soap->nlist->ns) - SOAP_FREE(soap->nlist->ns); - SOAP_FREE(soap->nlist); - soap->nlist = np; - } -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_match_namespace(struct soap *soap, const char *id1, const char *id2, int n1, int n2) -{ register struct soap_nlist *np = soap->nlist; - while (np && (strncmp(np->id, id1, n1) || np->id[n1])) - np = np->next; - if (np) - { if (np->index < 0 || (np->index >= 0 && soap->local_namespaces[np->index].id && (strncmp(soap->local_namespaces[np->index].id, id2, n2) || soap->local_namespaces[np->index].id[n2]))) - return SOAP_NAMESPACE; - return SOAP_OK; - } - if (n1 == 3 && n1 == n2 && !strcmp(id1, "xml") && !strcmp(id1, id2)) - return SOAP_OK; - return SOAP_SYNTAX_ERROR; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_tag_cmp(const char *s, const char *t) -{ for (;;) - { register int c1 = *s; - register int c2 = *t; - if (!c1 || c1 == '"') - break; - if (c2 != '-') - { if (c1 != c2) - { if (c1 >= 'A' && c1 <= 'Z') - c1 += 'a' - 'A'; - if (c2 >= 'A' && c2 <= 'Z') - c2 += 'a' - 'A'; - } - if (c1 != c2) - { if (c2 != '*') - return 1; - c2 = *++t; - if (!c2) - return 0; - if (c2 >= 'A' && c2 <= 'Z') - c2 += 'a' - 'A'; - for (;;) - { c1 = *s; - if (!c1 || c1 == '"') - break; - if (c1 >= 'A' && c1 <= 'Z') - c1 += 'a' - 'A'; - if (c1 == c2) - if (!soap_tag_cmp(s + 1, t + 1)) - return 0; - s++; - } - break; - } - } - s++; - t++; - } - if (*t == '*' && !t[1]) - return 0; - return *t; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_match_tag(struct soap *soap, const char *tag1, const char *tag2) -{ register const char *s, *t; - if (!tag1 || !tag2 || !*tag2) - return SOAP_OK; - s = strchr(tag1, ':'); - t = strchr(tag2, ':'); - if (t) - { if (s) - { if (t[1] && SOAP_STRCMP(s + 1, t + 1)) - return SOAP_TAG_MISMATCH; - if (t != tag2 && soap_match_namespace(soap, tag1, tag2, s - tag1, t - tag2)) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Tags '%s' and '%s' match but namespaces differ\n", tag1, tag2)); - return SOAP_TAG_MISMATCH; - } - } - else if (SOAP_STRCMP(tag1, t + 1)) - return SOAP_TAG_MISMATCH; - else if (t != tag2 && soap_match_namespace(soap, tag1, tag2, 0, t - tag2)) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Tags '%s' and '%s' match but namespaces differ\n", tag1, tag2)); - return SOAP_TAG_MISMATCH; - } - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Tags and (default) namespaces match: '%s' '%s'\n", tag1, tag2)); - return SOAP_OK; - } - if (s) - { if (SOAP_STRCMP(s + 1, tag2)) - return SOAP_TAG_MISMATCH; - } - else if (SOAP_STRCMP(tag1, tag2)) - return SOAP_TAG_MISMATCH; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Tags match: '%s' '%s'\n", tag1, tag2)); - return SOAP_OK; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_match_array(struct soap *soap, const char *type) -{ if (*soap->arrayType) - if (soap_match_tag(soap, soap->arrayType, type) - && soap_match_tag(soap, soap->arrayType, "xsd:anyType") - && soap_match_tag(soap, soap->arrayType, "xsd:ur-type") - ) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Array type mismatch: '%s' '%s'\n", soap->arrayType, type)); - return SOAP_TAG_MISMATCH; - } - return SOAP_OK; -} -#endif - -/******************************************************************************/ - -#ifdef WITH_OPENSSL -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_ssl_server_context(struct soap *soap, unsigned short flags, const char *keyfile, const char *password, const char *cafile, const char *capath, const char *dhfile, const char *randfile, const char *sid) -{ int err; - soap->keyfile = keyfile; - soap->password = password; - soap->cafile = cafile; - soap->capath = capath; - if (dhfile) - { soap->dhfile = dhfile; - soap->rsa = 0; - } - else - { soap->dhfile = NULL; - soap->rsa = 1; - } - soap->randfile = randfile; - soap->require_client_auth = (flags & SOAP_SSL_REQUIRE_CLIENT_AUTHENTICATION); - if (!(err = soap->fsslauth(soap))) - if (sid) - SSL_CTX_set_session_id_context(soap->ctx, (unsigned char*)sid, strlen(sid)); - return err; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_ssl_client_context(struct soap *soap, unsigned short flags, const char *keyfile, const char *password, const char *cafile, const char *capath, const char *randfile) -{ soap->keyfile = keyfile; - soap->password = password; - soap->cafile = cafile; - soap->capath = capath; - soap->dhfile = NULL; - soap->rsa = 0; - soap->randfile = randfile; - soap->require_server_auth = (flags & SOAP_SSL_REQUIRE_SERVER_AUTHENTICATION); - return soap->fsslauth(soap); -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -static void -ssl_init() -{ static int done = 0; - if (!done) - { done = 1; - SSL_library_init(); -#ifndef WITH_LEAN - SSL_load_error_strings(); -#endif - if (!RAND_load_file("/dev/urandom", 1024)) - { int r; -#ifdef HAVE_RAND_R - unsigned int s = (unsigned int)time(NULL); -#endif - char buf[SOAP_BUFLEN]; - RAND_seed(buf, sizeof(buf)); - while (!RAND_status()) - { -#ifdef HAVE_RAND_R - r = rand_r(&s); -#else - r = rand(); -#endif - RAND_seed(&r, sizeof(int)); - } - } - } -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -static const char * -ssl_error(struct soap *soap, int ret) -{ int err = SSL_get_error(soap->ssl, ret); - const char *msg = soap_str_code(h_ssl_error_codes, err); - if (msg) - strcpy(soap->msgbuf, msg); - else - return ERR_error_string(err, soap->msgbuf); - if (ERR_peek_error()) - { unsigned long r; - strcat(soap->msgbuf, "\n"); - while ((r = ERR_get_error())) - ERR_error_string_n(r, soap->msgbuf + strlen(soap->msgbuf), sizeof(soap->msgbuf) - strlen(soap->msgbuf)); - } - else - { switch (ret) - { case 0: - strcpy(soap->msgbuf, "EOF was observed that violates the protocol. The client probably provided invalid authentication information."); - break; - case -1: - sprintf(soap->msgbuf, "Error observed by underlying BIO: %s", strerror(errno)); - break; - } - } - return soap->msgbuf; -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -static int -ssl_password(char *buf, int num, int rwflag, void *userdata) -{ if (num < (int)strlen((char*)userdata) + 1) - return 0; - return strlen(strcpy(buf, (char*)userdata)); -} -#endif - -/******************************************************************************/ -/* This callback is included for future references. It should not be deleted -#ifndef PALM_2 -static DH * -ssl_tmp_dh(SSL *ssl, int is_export, int keylength) -{ static DH *dh512 = NULL; - static DH *dh1024 = NULL; - DH *dh; - switch (keylength) - { case 512: - if (!dh512) - { BIO *bio = BIO_new_file("dh512.pem", "r"); - if (bio) - { dh512 = PEM_read_bio_DHparams(bio, NULL, NULL, NULL); - BIO_free(bio); - return dh512; - } - } - else - return dh512; - default: - if (!dh1024) - { BIO *bio = BIO_new_file("dh1024.pem", "r"); - if (bio) - { dh1024 = PEM_read_bio_DHparams(bio, NULL, NULL, NULL); - BIO_free(bio); - } - } - dh = dh1024; - } - return dh; -} -#endif -*/ -/******************************************************************************/ -#ifndef PALM_1 -static int -ssl_auth_init(struct soap *soap) -{ ssl_init(); - if (!soap->ctx) - if (!(soap->ctx = SSL_CTX_new(SSLv23_method()))) - return soap_set_receiver_error(soap, "SSL error", "Can't setup context", SOAP_SSL_ERROR); - if (soap->randfile) - { if (!RAND_load_file(soap->randfile, -1)) - return soap_set_receiver_error(soap, "SSL error", "Can't load randomness", SOAP_SSL_ERROR); - } - if (soap->cafile || soap->capath) - if (!SSL_CTX_load_verify_locations(soap->ctx, soap->cafile, soap->capath)) - return soap_set_receiver_error(soap, "SSL error", "Can't read CA file and/or directory", SOAP_SSL_ERROR); - if (!SSL_CTX_set_default_verify_paths(soap->ctx)) - return soap_set_receiver_error(soap, "SSL error", "Can't read default CA file and/or directory", SOAP_SSL_ERROR); - if (soap->keyfile) - { if (!SSL_CTX_use_certificate_chain_file(soap->ctx, soap->keyfile)) - return soap_set_receiver_error(soap, "SSL error", "Can't read certificate key file", SOAP_SSL_ERROR); - if (soap->password) - { SSL_CTX_set_default_passwd_cb_userdata(soap->ctx, (void*)soap->password); - SSL_CTX_set_default_passwd_cb(soap->ctx, ssl_password); - if (!SSL_CTX_use_PrivateKey_file(soap->ctx, soap->keyfile, SSL_FILETYPE_PEM)) - return soap_set_receiver_error(soap, "SSL error", "Can't read key file", SOAP_SSL_ERROR); - } - } - if (soap->rsa) - { RSA *rsa = RSA_generate_key(512, RSA_F4, NULL, NULL); - if (!SSL_CTX_set_tmp_rsa(soap->ctx, rsa)) - { if (rsa) - RSA_free(rsa); - return soap_set_receiver_error(soap, "SSL error", "Can't set RSA key", SOAP_SSL_ERROR); - } - RSA_free(rsa); - } - else if (soap->dhfile) - { DH *dh = 0; - BIO *bio; - bio = BIO_new_file(soap->dhfile, "r"); - if (!bio) - return soap_set_receiver_error(soap, "SSL error", "Can't read DH file", SOAP_SSL_ERROR); - dh = PEM_read_bio_DHparams(bio, NULL, NULL, NULL); - BIO_free(bio); - if (SSL_CTX_set_tmp_dh(soap->ctx, dh) < 0) - { if (dh) - DH_free(dh); - return soap_set_receiver_error(soap, "SSL error", "Can't set DH parameters", SOAP_SSL_ERROR); - } - DH_free(dh); - } - SSL_CTX_set_options(soap->ctx, SSL_OP_ALL | SSL_OP_NO_SSLv2); - SSL_CTX_set_verify(soap->ctx, soap->require_client_auth ? (SSL_VERIFY_PEER | SSL_VERIFY_FAIL_IF_NO_PEER_CERT) : soap->require_server_auth ? SSL_VERIFY_PEER : SSL_VERIFY_NONE, soap->fsslverify); -#if (OPENSSL_VERSION_NUMBER < 0x00905100L) - SSL_CTX_set_verify_depth(soap->ctx, 1); -#else - SSL_CTX_set_verify_depth(soap->ctx, 9); -#endif - return SOAP_OK; -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -static int -ssl_verify_callback(int ok, X509_STORE_CTX *store) -{ -#ifdef SOAP_DEBUG - if (!ok) - { char data[256]; - X509 *cert = X509_STORE_CTX_get_current_cert(store); - fprintf(stderr, "SSL Verify error with certificate at depth %d: %s\n", X509_STORE_CTX_get_error_depth(store), X509_verify_cert_error_string(X509_STORE_CTX_get_error(store))); - X509_NAME_oneline(X509_get_issuer_name(cert), data, sizeof(data)); - fprintf(stderr, "certificate issuer %s\n", data); - X509_NAME_oneline(X509_get_subject_name(cert), data, sizeof(data)); - fprintf(stderr, "certificate subject %s\n", data); - } -#endif - /* return 1 to always continue, but unsafe progress will be terminated by SSL */ - return ok; -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_ssl_accept(struct soap *soap) -{ int i, r; - if (!soap_valid_socket(soap->socket)) - return soap_set_receiver_error(soap, "SSL error", "No socket in soap_ssl_accept()", SOAP_SSL_ERROR); - if (!soap->ssl) - { soap->ssl = SSL_new(soap->ctx); - if (!soap->ssl) - return soap_set_receiver_error(soap, "SSL error", "SSL_new() failed in soap_ssl_accept()", SOAP_SSL_ERROR); - } - else - SSL_clear(soap->ssl); - soap->imode |= SOAP_ENC_SSL; - soap->omode |= SOAP_ENC_SSL; -#ifdef WIN32 - { u_long nonblocking = 1; - ioctlsocket((SOAP_SOCKET)soap->socket, FIONBIO, &nonblocking); - } -#else - fcntl((SOAP_SOCKET)soap->socket, F_SETFL, fcntl((SOAP_SOCKET)soap->socket, F_GETFL)|O_NONBLOCK); -#endif - soap->bio = BIO_new_socket((SOAP_SOCKET)soap->socket, BIO_NOCLOSE); - SSL_set_bio(soap->ssl, soap->bio, soap->bio); - i = 100; /* 100 * 0.1 ms retries */ - while ((r = SSL_accept(soap->ssl)) <= 0) - { int err = SSL_get_error(soap->ssl, r); - if (err == SSL_ERROR_WANT_READ || err == SSL_ERROR_WANT_WRITE) - { struct timeval timeout; - fd_set fd; - if (i-- <= 0) - break; - timeout.tv_sec = 0; - timeout.tv_usec = 100000; - FD_ZERO(&fd); - FD_SET((SOAP_SOCKET)soap->socket, &fd); - r = select((SOAP_SOCKET)(soap->socket + 1), &fd, NULL, &fd, &timeout); - if (r < 0 && soap_socket_errno != SOAP_EINTR) - { soap->errnum = soap_socket_errno; - return SOAP_EOF; - } - } - else - { soap->errnum = err; - break; - } - } -#ifdef WIN32 - { u_long blocking = 0; - ioctlsocket((SOAP_SOCKET)soap->socket, FIONBIO, &blocking); - } -#else - fcntl((SOAP_SOCKET)soap->socket, F_SETFL, fcntl((SOAP_SOCKET)soap->socket, F_GETFL)&~O_NONBLOCK); -#endif - if (r <= 0) - { soap_set_receiver_error(soap, ssl_error(soap, r), "SSL_accept() failed in soap_ssl_accept()", SOAP_SSL_ERROR); - soap_closesock(soap); - return SOAP_SSL_ERROR; - } - if (soap->require_client_auth) - { X509 *peer; - int err; - if ((err = SSL_get_verify_result(soap->ssl)) != X509_V_OK) - { soap_closesock(soap); - return soap_set_sender_error(soap, X509_verify_cert_error_string(err), "SSL certificate presented by peer cannot be verified in soap_ssl_accept()", SOAP_SSL_ERROR); - } - peer = SSL_get_peer_certificate(soap->ssl); - if (!peer) - { soap_closesock(soap); - return soap_set_sender_error(soap, "SSL error", "No SSL certificate was presented by the peer in soap_ssl_accept()", SOAP_SSL_ERROR); - } - X509_free(peer); - } - return SOAP_OK; -} -#endif - -/******************************************************************************/ -#endif /* WITH_OPENSSL */ - -/******************************************************************************/ -#ifndef WITH_NOIO -#ifndef PALM_1 -static int -tcp_init(struct soap *soap) -{ soap->errmode = 1; -#ifdef WIN32 - if (tcp_done) - return 0; - else - { WSADATA w; - if (WSAStartup(MAKEWORD(1, 1), &w)) - return -1; - tcp_done = 1; - } -#endif - return 0; -} -#endif -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_done(struct soap *soap) -{ -#ifdef SOAP_DEBUG - int i; -#endif - soap_free(soap); - while (soap->clist) - { struct soap_clist *p = soap->clist->next; - SOAP_FREE(soap->clist); - soap->clist = p; - } - soap->keep_alive = 0; /* to force close the socket */ - soap_closesock(soap); -#ifdef WITH_COOKIES - soap_free_cookies(soap); -#endif - while (soap->plugins) - { register struct soap_plugin *p = soap->plugins->next; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Removing plugin '%s'\n", soap->plugins->id)); - if (soap->plugins->fcopy || !soap->copy) - soap->plugins->fdelete(soap, soap->plugins); - SOAP_FREE(soap->plugins); - soap->plugins = p; - } - soap->fplugin = fplugin; -#ifndef WITH_NOHTTP - soap->fpost = http_post; - soap->fget = http_get; - soap->fposthdr = http_post_header; - soap->fresponse = http_response; - soap->fparse = http_parse; - soap->fparsehdr = http_parse_header; -#endif -#ifndef WITH_NOIO -#ifndef WITH_IPV6 - soap->fresolve = tcp_gethost; -#else - soap->fresolve = NULL; -#endif - soap->faccept = tcp_accept; - soap->fopen = tcp_connect; - soap->fclose = tcp_disconnect; - soap->fclosesocket = tcp_closesocket; - soap->fshutdownsocket = tcp_shutdownsocket; - soap->fsend = fsend; - soap->frecv = frecv; - soap->fpoll = soap_poll; -#else - soap->fopen = NULL; - soap->fclose = NULL; - soap->fpoll = NULL; -#endif -#ifndef WITH_LEANER - soap->fprepareinit = NULL; - soap->fpreparesend = NULL; - soap->fpreparerecv = NULL; -#endif - soap->fignore = NULL; - soap->fserveloop = NULL; -#ifdef WITH_OPENSSL - if (soap->session) - { SSL_SESSION_free(soap->session); - soap->session = NULL; - } -#endif - if (!soap->copy) - { if (soap_valid_socket(soap->master)) - { soap->fclosesocket(soap, (SOAP_SOCKET)soap->master); - soap->master = SOAP_INVALID_SOCKET; - } -#ifdef WITH_OPENSSL - if (soap->ctx) - { SSL_CTX_free(soap->ctx); - soap->ctx = NULL; - } -#endif - } -#ifdef SOAP_DEBUG - for (i = 0; i < SOAP_MAXLOGS; i++) - { soap_close_logfile(soap, i); - if (soap->logfile[i]) - { SOAP_FREE((void*)soap->logfile[i]); - soap->logfile[i] = NULL; - } - } -#endif -} -#endif - -/******************************************************************************/ -#ifndef WITH_NOIO -#ifndef PALM_2 -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_cleanup(struct soap *soap) -{ soap_done(soap); -#ifdef WIN32 - if (!tcp_done) - return; - tcp_done = 0; - WSACleanup(); -#endif -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_NOIO -#ifndef PALM_1 -static const char* -tcp_error(struct soap *soap) -{ register const char *msg = NULL; - switch (soap->errmode) - { case 0: - msg = soap_strerror(soap); - break; - case 1: - msg = "WSAStartup failed"; - break; - case 2: - { -#ifndef WITH_LEAN - msg = soap_str_code(h_error_codes, soap->errnum); - if (!msg) -#endif - { sprintf(soap->msgbuf, "TCP error %d", soap->errnum); - msg = soap->msgbuf; - } - } - } - return msg; -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_NOHTTP -#ifndef PALM_1 -static const char* -http_error(struct soap *soap, int status) -{ register const char *msg = SOAP_STR_EOS; -#ifndef WITH_LEAN - msg = soap_str_code(h_http_error_codes, status); - if (!msg) - msg = SOAP_STR_EOS; -#endif - return msg; -} -#endif -#endif - -/******************************************************************************/ -/* WR[ */ -#ifndef WITH_IPV6 -/* ]WR */ -#ifndef WITH_NOIO -#ifndef PALM_1 -static int -tcp_gethost(struct soap *soap, const char *addr, struct in_addr *inaddr) -{ unsigned long iadd; - struct hostent hostent, *host = &hostent; -/* WR[ */ -#ifdef VXWORKS - int hostint; - char *addrcopy = (char*)malloc(strlen(addr) + 1); /*copy of addr. */ - /* inet_addr(), and hostGetByName() expect "char *"; addr is a "const char *". */ - strncpy(addrcopy, addr, strlen(addr)+1); - iadd = inet_addr(addrcopy); -#else -/* ]WR */ -#if defined(_AIXVERSION_431) || defined(TRU64) - struct hostent_data ht_data; -#endif - iadd = inet_addr(addr); -/* WR[ */ -#endif -/* ]WR */ - if ((int)iadd != -1) - { memcpy(inaddr, &iadd, sizeof(iadd)); -/* WR[ */ -#ifdef VXWORKS - free(addrcopy); -#endif -/* ]WR */ - return SOAP_OK; - } -#if defined(__GLIBC__) - if (gethostbyname_r(addr, &hostent, soap->buf, SOAP_BUFLEN, &host, &soap->errnum) < 0) - host = NULL; -#elif defined(_AIXVERSION_431) || defined(TRU64) - memset((void*)&ht_data, 0, sizeof(ht_data)); - if (gethostbyname_r(addr, &hostent, &ht_data) < 0) - { host = NULL; - soap->errnum = h_errno; - } -#elif defined(HAVE_GETHOSTBYNAME_R) - host = gethostbyname_r(addr, &hostent, soap->buf, SOAP_BUFLEN, &soap->errnum); -/* WR[ */ -#elif defined(VXWORKS) - /* If the DNS resolver library resolvLib has been configured in the vxWorks - * image, a query for the host IP address is sent to the DNS server, if the - * name was not found in the local host table. */ - hostint = hostGetByName(addrcopy); - if (hostint == ERROR) - { host = NULL; - soap->errnum = soap_errno; - } - free(addrcopy); /*free() is placed after the error checking to assure that - * errno captured is that from hostGetByName() */ -/* ]WR */ -#else - if (!(host = gethostbyname(addr))) - soap->errnum = h_errno; -#endif - if (!host) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Host name not found\n")); - return SOAP_ERR; - } -/* WR[ */ -#ifdef VXWORKS - inaddr->s_addr = hostint; -#else -/* ]WR */ - memcpy(inaddr, host->h_addr, host->h_length); -/* WR[ */ -#endif -/* ]WR */ - return SOAP_OK; -} -#endif -#endif -/* WR[ */ -#endif /* WITH_IPV6 */ -/* ]WR */ - -/******************************************************************************/ -#ifndef WITH_NOIO -#ifndef PALM_1 -static int -tcp_connect(struct soap *soap, const char *endpoint, const char *host, int port) -{ struct sockaddr_in sockaddr; -/* WR[ */ -#ifdef WITH_IPV6 - struct addrinfo *addrinfo; - struct addrinfo hints; - struct addrinfo resaddr; - struct sockaddr_storage addrstorage; - int err; -#endif /* WITH_IPV6 */ -/* ]WR */ - register int fd; -#ifndef WITH_LEAN - int len = SOAP_BUFLEN; - int set = 1; -#endif - if (soap_valid_socket(soap->socket)) - soap->fclosesocket(soap, (SOAP_SOCKET)soap->socket); - soap->socket = SOAP_INVALID_SOCKET; - if (tcp_init(soap)) - { soap_set_sender_error(soap, tcp_error(soap), "TCP initialization failed in tcp_connect()", SOAP_TCP_ERROR); - return SOAP_INVALID_SOCKET; - } - soap->errmode = 0; -/* WR[ */ -#ifdef WITH_IPV6 - memset((void*)&hints, 0, sizeof(hints)); - hints.ai_family = PF_UNSPEC; - hints.ai_socktype = SOCK_STREAM; - soap->errmode = 2; - if (soap->proxy_host) - err = getaddrinfo(soap->proxy_host, soap_int2s(soap, soap->proxy_port), &hints, &addrinfo); - else - err = getaddrinfo(host, soap_int2s(soap, port), &hints, &addrinfo); - if (addrinfo) - { resaddr = *addrinfo; - addrstorage = *((struct sockaddr_storage*)addrinfo->ai_addr); - resaddr.ai_addr = (struct sockaddr*)&addrstorage; - freeaddrinfo(addrinfo); - } - if (err) - { soap_set_sender_error(soap, gai_strerror(err), "TCP getaddrinfo on proxy host failed in tcp_connect()", SOAP_TCP_ERROR); - return SOAP_INVALID_SOCKET; - } - fd = (int)socket(resaddr.ai_family, resaddr.ai_socktype, resaddr.ai_protocol); /* modified to use fd */ - soap->errmode = 0; -#else /* WITH_IPV6 */ -/* ]WR */ - fd = (int)socket(AF_INET, SOCK_STREAM, 0); -/* WR[ */ -#endif /* WITH_IPV6 */ -/* ]WR */ - if (fd < 0) - { soap->errnum = soap_socket_errno; - soap_set_sender_error(soap, tcp_error(soap), "TCP socket failed in tcp_connect()", SOAP_TCP_ERROR); - return SOAP_INVALID_SOCKET; - } -#ifdef SOCKET_CLOSE_ON_EXEC -#ifdef WIN32 -#ifndef UNDER_CE - SetHandleInformation((HANDLE)fd, HANDLE_FLAG_INHERIT, 0); -#endif -#else - fcntl (fd, F_SETFD, 1); -#endif -#endif -#ifndef WITH_LEAN - if (soap->connect_flags & SO_LINGER) - { struct linger linger; - memset((void*)&linger, 0, sizeof(linger)); - linger.l_onoff = 1; - linger.l_linger = 0; - if (setsockopt((SOAP_SOCKET)fd, SOL_SOCKET, SO_LINGER, (char*)&linger, sizeof(struct linger))) - { soap->errnum = soap_socket_errno; - soap_set_sender_error(soap, tcp_error(soap), "TCP setsockopt SO_LINGER failed in tcp_connect()", SOAP_TCP_ERROR); - soap->fclosesocket(soap, (SOAP_SOCKET)fd); - return SOAP_INVALID_SOCKET; - } - } - if ((soap->connect_flags & ~SO_LINGER) && setsockopt((SOAP_SOCKET)fd, SOL_SOCKET, soap->connect_flags & ~SO_LINGER, (char*)&set, sizeof(int))) - { soap->errnum = soap_socket_errno; - soap_set_sender_error(soap, tcp_error(soap), "TCP setsockopt failed in tcp_connect()", SOAP_TCP_ERROR); - soap->fclosesocket(soap, (SOAP_SOCKET)fd); - return SOAP_INVALID_SOCKET; - } - if (soap->keep_alive && setsockopt((SOAP_SOCKET)fd, SOL_SOCKET, SO_KEEPALIVE, (char*)&set, sizeof(int))) - { soap->errnum = soap_socket_errno; - soap_set_sender_error(soap, tcp_error(soap), "TCP setsockopt SO_KEEPALIVE failed in tcp_connect()", SOAP_TCP_ERROR); - soap->fclosesocket(soap, (SOAP_SOCKET)fd); - return SOAP_INVALID_SOCKET; - } - if (setsockopt((SOAP_SOCKET)fd, SOL_SOCKET, SO_SNDBUF, (char*)&len, sizeof(int))) - { soap->errnum = soap_socket_errno; - soap_set_sender_error(soap, tcp_error(soap), "TCP setsockopt SO_SNDBUF failed in tcp_connect()", SOAP_TCP_ERROR); - soap->fclosesocket(soap, (SOAP_SOCKET)fd); - return SOAP_INVALID_SOCKET; - } - if (setsockopt((SOAP_SOCKET)fd, SOL_SOCKET, SO_RCVBUF, (char*)&len, sizeof(int))) - { soap->errnum = soap_socket_errno; - soap_set_sender_error(soap, tcp_error(soap), "TCP setsockopt SO_RCVBUF failed in tcp_connect()", SOAP_TCP_ERROR); - soap->fclosesocket(soap, (SOAP_SOCKET)fd); - return SOAP_INVALID_SOCKET; - } -#ifdef TCP_NODELAY - if (setsockopt((SOAP_SOCKET)fd, IPPROTO_TCP, TCP_NODELAY, (char*)&set, sizeof(int))) - { soap->errnum = soap_socket_errno; - soap_set_sender_error(soap, tcp_error(soap), "TCP setsockopt TCP_NODELAY failed in tcp_connect()", SOAP_TCP_ERROR); - soap->fclosesocket(soap, (SOAP_SOCKET)fd); - return SOAP_INVALID_SOCKET; - } -#endif -#endif -/* WR[ */ -#ifndef WITH_IPV6 -/* ]WR */ - memset((void*)&sockaddr, 0, sizeof(sockaddr)); - sockaddr.sin_family = AF_INET; - DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Open socket %d to host='%s'\n", fd, host)); - soap->errmode = 2; - if (soap->proxy_host) - { if (soap->fresolve(soap, soap->proxy_host, &sockaddr.sin_addr)) - { soap_set_sender_error(soap, tcp_error(soap), "TCP get proxy host by name failed in tcp_connect()", SOAP_TCP_ERROR); - soap->fclosesocket(soap, (SOAP_SOCKET)fd); - return SOAP_INVALID_SOCKET; - } - sockaddr.sin_port = htons((short)soap->proxy_port); - } - else - { if (soap->fresolve(soap, host, &sockaddr.sin_addr)) - { soap_set_sender_error(soap, tcp_error(soap), "TCP get host by name failed in tcp_connect()", SOAP_TCP_ERROR); - soap->fclosesocket(soap, (SOAP_SOCKET)fd); - return SOAP_INVALID_SOCKET; - } - sockaddr.sin_port = htons((short)port); - } - soap->errmode = 0; -/* WR[ */ -#endif /* WITH_IPV6 */ -/* ]WR */ -#ifndef WITH_LEAN - if (soap->connect_timeout) -#if defined(WIN32) - { u_long nonblocking = 1; - ioctlsocket((SOAP_SOCKET)fd, FIONBIO, &nonblocking); - } -/* WR[ */ -#elif defined(VXWORKS) - { vx_nonblocking = TRUE; - ioctl((SOAP_SOCKET)fd, FIONBIO, (int)(&vx_nonblocking)); /* modified to use fd */ - } -/* ]WR */ -#else - fcntl((SOAP_SOCKET)fd, F_SETFL, fcntl((SOAP_SOCKET)fd, F_GETFL)|O_NONBLOCK); -#endif - else -#if defined(WIN32) - { u_long blocking = 0; - ioctlsocket((SOAP_SOCKET)fd, FIONBIO, &blocking); - } -/* WR[ */ -#elif defined(VXWORKS) - { vx_nonblocking = FALSE; - ioctl((SOAP_SOCKET)fd, FIONBIO, (int)(&vx_nonblocking)); /* modified to use fd */ - } -/* ]WR */ -#else - fcntl((SOAP_SOCKET)fd, F_SETFL, fcntl((SOAP_SOCKET)fd, F_GETFL)&~O_NONBLOCK); -#endif -#endif - for (;;) - { -/* WR[ */ -#ifdef WITH_IPV6 - if (connect((SOAP_SOCKET)fd, resaddr.ai_addr, resaddr.ai_addrlen)) /* modified to use fd */ -#else /* WITH_IPV6 */ - if (connect((SOAP_SOCKET)fd, (struct sockaddr*)&sockaddr, sizeof(sockaddr))) -#endif /* WITH_IPV6 */ -/* ]WR */ - { -#ifndef WITH_LEAN - if (soap->connect_timeout && (soap_socket_errno == SOAP_EINPROGRESS || soap_socket_errno == SOAP_EWOULDBLOCK)) - { struct timeval timeout; -#if defined(SOCKLEN_T) - SOCKLEN_T n = sizeof(struct sockaddr_in); -#elif defined(__socklen_t_defined) || defined(_SOCKLEN_T) || defined(CYGWIN) - socklen_t n = sizeof(struct sockaddr_in); -#elif defined(WIN32) || defined(__APPLE__) || defined(HP_UX) || defined(SUN_OS) || defined(OPENSERVER) || defined(TRU64) || defined(VXWORKS) - int n = sizeof(struct sockaddr_in); -#else - size_t n = sizeof(struct sockaddr_in); -#endif - fd_set fds; - if (soap->connect_timeout > 0) - { timeout.tv_sec = soap->connect_timeout; - timeout.tv_usec = 0; - } - else - { timeout.tv_sec = -soap->connect_timeout/1000000; - timeout.tv_usec = -soap->connect_timeout%1000000; - } - FD_ZERO(&fds); - FD_SET((SOAP_SOCKET)fd, &fds); - for (;;) - { int r = select((SOAP_SOCKET)(fd + 1), NULL, &fds, NULL, &timeout); - if (r > 0) - break; - if (!r) - { soap->errnum = 0; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Connect timeout\n")); - soap_set_sender_error(soap, "Timeout", "TCP connect failed in tcp_connect()", SOAP_TCP_ERROR); - soap->fclosesocket(soap, (SOAP_SOCKET)fd); - return SOAP_INVALID_SOCKET; - } - if (soap_socket_errno != SOAP_EINTR) - { soap->errnum = soap_socket_errno; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Could not connect to host\n")); - soap_set_sender_error(soap, tcp_error(soap), "TCP connect failed in tcp_connect()", SOAP_TCP_ERROR); - soap->fclosesocket(soap, (SOAP_SOCKET)fd); - return SOAP_INVALID_SOCKET; - } - } - n = sizeof(soap->errnum); - if (!getsockopt((SOAP_SOCKET)fd, SOL_SOCKET, SO_ERROR, (char*)&soap->errnum, &n) && !soap->errnum) - break; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Could not connect to host\n")); - soap_set_sender_error(soap, tcp_error(soap), "TCP connect failed in tcp_connect()", SOAP_TCP_ERROR); - soap->fclosesocket(soap, (SOAP_SOCKET)fd); - return SOAP_INVALID_SOCKET; - } - else -#endif - if (soap_socket_errno != SOAP_EINTR) - { soap->errnum = soap_socket_errno; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Could not connect to host\n")); - soap_set_sender_error(soap, tcp_error(soap), "TCP connect failed in tcp_connect()", SOAP_TCP_ERROR); - soap->fclosesocket(soap, (SOAP_SOCKET)fd); - return SOAP_INVALID_SOCKET; - } - } - else - break; - } -#ifndef WITH_LEAN - if (soap->connect_timeout) -#if defined(WIN32) - { u_long blocking = 0; - ioctlsocket((SOAP_SOCKET)fd, FIONBIO, &blocking); - } -/* WR[ */ -#elif defined(VXWORKS) - { vx_nonblocking = FALSE; - ioctl((SOAP_SOCKET)fd, FIONBIO, (int)(&vx_nonblocking)); /* modified to use fd */ - } -/* ]WR */ -#else - fcntl((SOAP_SOCKET)fd, F_SETFL, fcntl((SOAP_SOCKET)fd, F_GETFL)&~O_NONBLOCK); -#endif -#endif - soap->socket = fd; -#ifdef WITH_OPENSSL - soap->imode &= ~SOAP_ENC_SSL; - soap->omode &= ~SOAP_ENC_SSL; - if (!strncmp(endpoint, "https:", 6)) - { int r; - if (soap->proxy_host) - { unsigned int k = soap->omode; /* make sure we only parse HTTP */ - size_t n = soap->count; /* save the content length */ - soap->omode &= ~SOAP_ENC; /* mask IO and ENC */ - soap->omode |= SOAP_IO_BUFFER; - soap_begin_send(soap); - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Connecting to proxy server\n")); - sprintf(soap->tmpbuf, "CONNECT %s:%d HTTP/%s", host, port, soap->http_version); - if ((soap->error = soap->fposthdr(soap, soap->tmpbuf, NULL))) - return SOAP_INVALID_SOCKET; -#ifndef WITH_LEAN - if (soap->proxy_userid && soap->proxy_passwd && strlen(soap->proxy_userid) + strlen(soap->proxy_passwd) < 761) - { sprintf(soap->tmpbuf + 262, "%s:%s", soap->proxy_userid, soap->proxy_passwd); - strcpy(soap->tmpbuf, "Basic "); - soap_s2base64(soap, (const unsigned char*)(soap->tmpbuf + 262), soap->tmpbuf + 6, strlen(soap->tmpbuf + 262)); - if ((soap->error = soap->fposthdr(soap, "Proxy-Authorization", soap->tmpbuf))) - return soap->error; - } -#endif - if ((soap->error = soap->fposthdr(soap, NULL, NULL)) - || soap_flush(soap)) - return SOAP_INVALID_SOCKET; - soap->omode = k; - k = soap->imode; - soap->imode &= ~SOAP_ENC; /* mask IO and ENC */ - if (soap_begin_recv(soap)) - return SOAP_INVALID_SOCKET; - soap->imode = k; - soap->count = n; - soap_begin_send(soap); - } - if (!soap->ctx && (soap->error = soap->fsslauth(soap))) - { soap_set_sender_error(soap, "SSL error", "SSL authentication failed in tcp_connect(): check password, key file, and ca file.", SOAP_SSL_ERROR); - return SOAP_INVALID_SOCKET; - } - soap->ssl = SSL_new(soap->ctx); - if (!soap->ssl) - { soap->error = SOAP_SSL_ERROR; - return SOAP_INVALID_SOCKET; - } - if (soap->session) - { if (!strcmp(soap->session_host, host) && soap->session_port == port) - SSL_set_session(soap->ssl, soap->session); - SSL_SESSION_free(soap->session); - soap->session = NULL; - } - soap->imode |= SOAP_ENC_SSL; - soap->omode |= SOAP_ENC_SSL; - soap->bio = BIO_new_socket((SOAP_SOCKET)fd, BIO_NOCLOSE); - SSL_set_bio(soap->ssl, soap->bio, soap->bio); -#ifndef WITH_LEAN - if (soap->connect_timeout) -#ifdef WIN32 - { u_long nonblocking = 1; - ioctlsocket((SOAP_SOCKET)fd, FIONBIO, &nonblocking); - } -#else - fcntl((SOAP_SOCKET)fd, F_SETFL, fcntl((SOAP_SOCKET)fd, F_GETFL)|O_NONBLOCK); -#endif -#endif - for (;;) - { if ((r = SSL_connect(soap->ssl)) <= 0) - { int err = SSL_get_error(soap->ssl, r); - if (err != SSL_ERROR_NONE && err != SSL_ERROR_WANT_READ && err != SSL_ERROR_WANT_WRITE) - { soap_set_sender_error(soap, ssl_error(soap, r), "SSL connect failed in tcp_connect()", SOAP_SSL_ERROR); - return SOAP_INVALID_SOCKET; - } - if (soap->connect_timeout) - { struct timeval timeout; - fd_set fds; - if (soap->connect_timeout > 0) - { timeout.tv_sec = soap->connect_timeout; - timeout.tv_usec = 0; - } - else - { timeout.tv_sec = -soap->connect_timeout/1000000; - timeout.tv_usec = -soap->connect_timeout%1000000; - } - FD_ZERO(&fds); - FD_SET((SOAP_SOCKET)(soap->socket), &fds); - for (;;) - { int r = select((SOAP_SOCKET)(soap->socket + 1), &fds, NULL, &fds, &timeout); - if (r > 0) - break; - if (!r) - { soap->errnum = 0; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Connect timeout\n")); - soap_set_sender_error(soap, "Timeout", "TCP connect failed in tcp_connect()", SOAP_TCP_ERROR); - return SOAP_INVALID_SOCKET; - } - } - continue; - } - } - break; - } -#ifndef WITH_LEAN - if (soap->connect_timeout) -#ifdef WIN32 - { u_long blocking = 0; - ioctlsocket((SOAP_SOCKET)fd, FIONBIO, &blocking); - } -#else - fcntl((SOAP_SOCKET)fd, F_SETFL, fcntl((SOAP_SOCKET)fd, F_GETFL)&~O_NONBLOCK); -#endif -#endif - if (soap->require_server_auth) - { X509 *peer; - int err; - if ((err = SSL_get_verify_result(soap->ssl)) != X509_V_OK) - { soap_set_sender_error(soap, X509_verify_cert_error_string(err), "SSL certificate presented by peer cannot be verified in tcp_connect()", SOAP_SSL_ERROR); - return SOAP_INVALID_SOCKET; - } - peer = SSL_get_peer_certificate(soap->ssl); - if (!peer) - { soap_set_sender_error(soap, "SSL error", "No SSL certificate was presented by the peer in tcp_connect()", SOAP_SSL_ERROR); - return SOAP_INVALID_SOCKET; - } - X509_NAME_get_text_by_NID(X509_get_subject_name(peer), NID_commonName, soap->msgbuf, sizeof(soap->msgbuf)); - X509_free(peer); - if (soap_tag_cmp(soap->msgbuf, host)) - { soap_set_sender_error(soap, "SSL error", "SSL certificate host name mismatch in tcp_connect()", SOAP_SSL_ERROR); - return SOAP_INVALID_SOCKET; - } - } - } -#endif - return fd; -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_NOIO -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_bind(struct soap *soap, const char *host, int port, int backlog) -{ struct sockaddr_in sockaddr; -/* WR[ */ -#ifdef WITH_IPV6 - struct addrinfo *addrinfo; - struct addrinfo hints; - struct addrinfo resaddr; - struct sockaddr_storage addrstorage; - int err; -#endif /* WITH_IPV6 */ -/* ]WR */ -#ifndef WITH_LEAN - int len = SOAP_BUFLEN; - int set = 1; -#endif - if (soap_valid_socket(soap->master)) - { soap->fclosesocket(soap, (SOAP_SOCKET)soap->master); - soap->master = SOAP_INVALID_SOCKET; - } - soap->socket = SOAP_INVALID_SOCKET; - soap->errmode = 1; - if (tcp_init(soap)) - { soap_set_receiver_error(soap, tcp_error(soap), "TCP init failed in soap_bind()", SOAP_TCP_ERROR); - return SOAP_INVALID_SOCKET; - } -/* WR[ */ -#ifdef WITH_IPV6 - memset((void*)&hints, 0, sizeof(hints)); - hints.ai_family = PF_UNSPEC; - hints.ai_socktype = SOCK_STREAM; - hints.ai_flags = AI_PASSIVE; - soap->errmode = 2; - if (host) - err = getaddrinfo(host, soap_int2s(soap, port), &hints, &addrinfo); - else - err = getaddrinfo(NULL, soap_int2s(soap, port), &hints, &addrinfo); - if (NULL != addrinfo) - { - resaddr = *addrinfo; - addrstorage = *((struct sockaddr_storage *) addrinfo->ai_addr); - resaddr.ai_addr = (struct sockaddr *) &addrstorage; - freeaddrinfo(addrinfo); - } - if (err) - { soap_set_receiver_error(soap, gai_strerror(err), "TCP getaddrinfo failed in soap_bind()", SOAP_TCP_ERROR); - return SOAP_INVALID_SOCKET; - } - soap->errmode = 0; - if ((soap->master = socket(resaddr.ai_family, resaddr.ai_socktype, resaddr.ai_protocol)) < 0) - { soap->errnum = soap_socket_errno; - soap_set_receiver_error(soap, tcp_error(soap), "TCP socket failed in soap_bind()", SOAP_TCP_ERROR); - return SOAP_INVALID_SOCKET; - } -#else /* WITH_IPV6 */ -/* ]WR */ - soap->errmode = 0; - if ((soap->master = (int)socket(AF_INET, SOCK_STREAM, 0)) < 0) - { soap->errnum = soap_socket_errno; - soap_set_receiver_error(soap, tcp_error(soap), "TCP socket failed in soap_bind()", SOAP_TCP_ERROR); - return SOAP_INVALID_SOCKET; - } -/* WR[ */ -#endif /* WITH_IPV6 */ -/* ]WR */ -#ifdef SOCKET_CLOSE_ON_EXEC -#ifdef WIN32 -#ifndef UNDER_CE - SetHandleInformation((HANDLE)soap->master, HANDLE_FLAG_INHERIT, 0); -#endif -#else - fcntl (soap->master, F_SETFD, 1); -#endif -#endif -#ifndef WITH_LEAN - if (soap->bind_flags && setsockopt((SOAP_SOCKET)soap->master, SOL_SOCKET, soap->bind_flags, (char*)&set, sizeof(int))) - { soap->errnum = soap_socket_errno; - soap_set_receiver_error(soap, tcp_error(soap), "TCP setsockopt failed in soap_bind()", SOAP_TCP_ERROR); - return SOAP_INVALID_SOCKET; - } - if (soap->keep_alive && setsockopt((SOAP_SOCKET)soap->master, SOL_SOCKET, SO_KEEPALIVE, (char*)&set, sizeof(int))) - { soap->errnum = soap_socket_errno; - soap_set_receiver_error(soap, tcp_error(soap), "TCP setsockopt SO_KEEPALIVE failed in soap_bind()", SOAP_TCP_ERROR); - return SOAP_INVALID_SOCKET; - } - if (setsockopt((SOAP_SOCKET)soap->master, SOL_SOCKET, SO_SNDBUF, (char*)&len, sizeof(int))) - { soap->errnum = soap_socket_errno; - soap_set_receiver_error(soap, tcp_error(soap), "TCP setsockopt SO_SNDBUF failed in soap_bind()", SOAP_TCP_ERROR); - return SOAP_INVALID_SOCKET; - } - if (setsockopt((SOAP_SOCKET)soap->master, SOL_SOCKET, SO_RCVBUF, (char*)&len, sizeof(int))) - { soap->errnum = soap_socket_errno; - soap_set_receiver_error(soap, tcp_error(soap), "TCP setsockopt SO_RCVBUF failed in soap_bind()", SOAP_TCP_ERROR); - return SOAP_INVALID_SOCKET; - } -#ifdef TCP_NODELAY - if (setsockopt((SOAP_SOCKET)soap->master, IPPROTO_TCP, TCP_NODELAY, (char*)&set, sizeof(int))) - { soap->errnum = soap_socket_errno; - soap_set_receiver_error(soap, tcp_error(soap), "TCP setsockopt TCP_NODELAY failed in soap_bind()", SOAP_TCP_ERROR); - return SOAP_INVALID_SOCKET; - } -#endif -#endif -/* WR[ */ -#ifdef WITH_IPV6 - soap->errmode = 0; - if (bind(soap->master, resaddr.ai_addr, resaddr.ai_addrlen) || listen(soap->master, backlog)) - { - soap->errnum = soap_socket_errno; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Could not bind to host\n")); - soap_closesock(soap); - soap_set_receiver_error(soap, tcp_error(soap), "TCP bind failed in soap_bind()", SOAP_TCP_ERROR); - return SOAP_INVALID_SOCKET; - } -#else /* WITH_IPV6 */ -/* ]WR */ - memset((void*)&sockaddr, 0, sizeof(sockaddr)); - sockaddr.sin_family = AF_INET; - soap->errmode = 2; - if (host) - { if (soap->fresolve(soap, host, &sockaddr.sin_addr)) - { soap_set_receiver_error(soap, tcp_error(soap), "TCP get host by name failed in soap_bind()", SOAP_TCP_ERROR); - return SOAP_INVALID_SOCKET; - } - } - else - sockaddr.sin_addr.s_addr = htonl(INADDR_ANY); - sockaddr.sin_port = htons((short)port); - soap->errmode = 0; - if (bind((SOAP_SOCKET)soap->master, (struct sockaddr*)&sockaddr, sizeof(sockaddr)) || listen((SOAP_SOCKET)soap->master, backlog)) - { soap->errnum = soap_socket_errno; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Could not bind to host\n")); - soap_closesock(soap); - soap_set_receiver_error(soap, tcp_error(soap), "TCP bind failed in soap_bind()", SOAP_TCP_ERROR); - return SOAP_INVALID_SOCKET; - } -/* WR[ */ -#endif /* WITH_IPV6 */ -/* ]WR */ -#ifdef WITH_OPENSSL - if (!soap->ctx && (soap->error = soap->fsslauth(soap))) - return SOAP_INVALID_SOCKET; -#endif - return soap->master; -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_NOIO -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_poll(struct soap *soap) -{ -#ifndef WITH_LEAN - struct timeval timeout; - fd_set sfd, rfd, xfd; - int r; - timeout.tv_sec = 0; - timeout.tv_usec = 0; - FD_ZERO(&rfd); - FD_ZERO(&sfd); - FD_ZERO(&xfd); - if (soap_valid_socket(soap->socket)) - { FD_SET(soap->socket, &rfd); - FD_SET(soap->socket, &sfd); - FD_SET(soap->socket, &xfd); - r = select(soap->socket + 1, &rfd, &sfd, &xfd, &timeout); - if (r > 0 && FD_ISSET(soap->socket, &xfd)) - r = -1; - } - else if (soap_valid_socket(soap->master)) - { FD_SET(soap->master, &rfd); - r = select(soap->master + 1, &rfd, &sfd, NULL, &timeout); - } - else - return SOAP_OK; - if (r > 0) - { -#ifdef WITH_OPENSSL - if (soap->ssl) - { if (soap_valid_socket(soap->socket) && FD_ISSET(soap->socket, &rfd)) - { char buf = '\0'; - if (SSL_peek(soap->ssl, &buf, 1) <= 0) - return SOAP_EOF; - } - } -#endif - if (soap_valid_socket(soap->socket) && FD_ISSET(soap->socket, &rfd)) - return SOAP_EOF; - return SOAP_OK; - } - if (r < 0 && (soap_valid_socket(soap->master) || soap_valid_socket(soap->socket)) && soap_socket_errno != SOAP_EINTR) - { soap->errnum = soap_socket_errno; - soap_set_receiver_error(soap, tcp_error(soap), "select failed in soap_poll()", SOAP_TCP_ERROR); - return soap->error = SOAP_TCP_ERROR; - } - else - soap->errnum = soap_errno; - return SOAP_EOF; -#else - return SOAP_OK; -#endif -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_NOIO -#ifndef PALM_1 -static int -tcp_accept(struct soap *soap, int s, struct sockaddr *a, int *n) -{ int fd; -#if defined(SOCKLEN_T) - fd = (int)accept((SOAP_SOCKET)s, a, (SOCKLEN_T*)n); -#elif defined(__socklen_t_defined) || defined(_SOCKLEN_T) || defined(CYGWIN) - fd = (int)accept((SOAP_SOCKET)s, a, (socklen_t*)n); -#elif defined(WIN32) || defined(__APPLE__) || defined(HP_UX) || defined(SUN_OS) || defined(OPENSERVER) || defined(TRU64) || defined(VXWORKS) - fd = (int)accept((SOAP_SOCKET)s, a, n); -#else - fd = (int)accept((SOAP_SOCKET)s, a, (size_t*)n); -#endif -#ifdef SOCKET_CLOSE_ON_EXEC -#ifdef WIN32 -#ifndef UNDER_CE - SetHandleInformation((HANDLE)fd, HANDLE_FLAG_INHERIT, 0); -#endif -#else - fcntl(fd, F_SETFD, FD_CLOEXEC); -#endif -#endif - return fd; -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_NOIO -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_accept(struct soap *soap) -{ -/* WR[ */ -#ifdef WITH_IPV6 - struct sockaddr_storage sockaddr; -#else /* WITH_IPV6 */ -/* ]WR */ - struct sockaddr_in sockaddr; -/* WR[ */ -#endif -/* ]WR */ - int n = (int)sizeof(sockaddr); -#ifndef WITH_LEAN - int len = SOAP_BUFLEN; - int set = 1; -#endif - soap->error = SOAP_OK; - memset((void*)&sockaddr, 0, sizeof(sockaddr)); - soap->socket = SOAP_INVALID_SOCKET; - soap->errmode = 0; - if (soap_valid_socket(soap->master)) - { for (;;) - { -#ifndef WITH_LEAN - if (soap->accept_timeout) - { struct timeval timeout; - fd_set fd; - if (soap->accept_timeout > 0) - { timeout.tv_sec = soap->accept_timeout; - timeout.tv_usec = 0; - } - else - { timeout.tv_sec = -soap->accept_timeout/1000000; - timeout.tv_usec = -soap->accept_timeout%1000000; - } - FD_ZERO(&fd); - FD_SET((SOAP_SOCKET)soap->master, &fd); - for (;;) - { int r = select((SOAP_SOCKET)(soap->master + 1), &fd, &fd, NULL, &timeout); - if (r > 0) - break; - if (!r) - { soap->errnum = 0; - soap_set_receiver_error(soap, "Timeout", "TCP accept failed in soap_accept()", SOAP_TCP_ERROR); - return SOAP_INVALID_SOCKET; - } - if (soap_socket_errno != SOAP_EINTR) - { soap->errnum = soap_socket_errno; - soap_closesock(soap); - soap_set_sender_error(soap, tcp_error(soap), "TCP accept failed in soap_accept()", SOAP_TCP_ERROR); - return SOAP_INVALID_SOCKET; - } - } -#if defined(WIN32) - { u_long nonblocking = 1; - ioctlsocket((SOAP_SOCKET)soap->master, FIONBIO, &nonblocking); - } -#elif defined(VXWORKS) - { vx_nonblocking = TRUE; - ioctl((SOAP_SOCKET)soap->master, FIONBIO, (int)(&vx_nonblocking)); - } -#else - fcntl((SOAP_SOCKET)soap->master, F_SETFL, fcntl((SOAP_SOCKET)soap->master, F_GETFL)|O_NONBLOCK); -#endif - } - else -#if defined(WIN32) - { u_long blocking = 0; - ioctlsocket((SOAP_SOCKET)soap->master, FIONBIO, &blocking); - } -/* WR[ */ -#elif defined(VXWORKS) - { vx_nonblocking = FALSE; - ioctl((SOAP_SOCKET)soap->master, FIONBIO, (int)(&vx_nonblocking)); - } -/* ]WR */ -#else - fcntl((SOAP_SOCKET)soap->master, F_SETFL, fcntl((SOAP_SOCKET)soap->master, F_GETFL)&~O_NONBLOCK); -#endif -#endif - soap->socket = soap->faccept(soap, soap->master, (struct sockaddr*)&sockaddr, &n); - if (soap_valid_socket(soap->socket)) - { -/* WR[ */ -#ifdef WITH_IPV6 -/* Use soap->host to store the numeric form of the remote host */ - getnameinfo((struct sockaddr*)&sockaddr, n, soap->host, sizeof(soap->host), NULL, 0, NI_NUMERICHOST | NI_NUMERICSERV); - DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Accept socket %d from %s\n", soap->socket, soap->host)); - soap->ip = 0; /* info stored in soap->host */ - soap->port = 0; /* info stored in soap->host */ -#else /* WITH_IPV6 */ -/* ]WR */ - soap->ip = ntohl(sockaddr.sin_addr.s_addr); - soap->port = (int)ntohs(sockaddr.sin_port); /* does not return port number on some systems */ - DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Accept socket %d at port %d from IP %d.%d.%d.%d\n", soap->socket, soap->port, (int)(soap->ip>>24)&0xFF, (int)(soap->ip>>16)&0xFF, (int)(soap->ip>>8)&0xFF, (int)soap->ip&0xFF)); -/* WR[ */ -#endif /* WITH_IPV6 */ -/* ]WR */ - soap->keep_alive = ((soap->imode & SOAP_IO_KEEPALIVE) != 0); -#ifndef WITH_LEAN - if (soap->accept_flags & SO_LINGER) - { struct linger linger; - memset((void*)&linger, 0, sizeof(linger)); - linger.l_onoff = 1; - linger.l_linger = 0; - if (setsockopt((SOAP_SOCKET)soap->socket, SOL_SOCKET, SO_LINGER, (char*)&linger, sizeof(struct linger))) - { soap->errnum = soap_socket_errno; - soap_set_receiver_error(soap, tcp_error(soap), "TCP setsockopt SO_LINGER failed in soap_accept()", SOAP_TCP_ERROR); - return SOAP_INVALID_SOCKET; - } - } - if ((soap->accept_flags & ~SO_LINGER) && setsockopt((SOAP_SOCKET)soap->socket, SOL_SOCKET, soap->accept_flags & ~SO_LINGER, (char*)&set, sizeof(int))) - { soap->errnum = soap_socket_errno; - soap_set_receiver_error(soap, tcp_error(soap), "TCP setsockopt failed in soap_accept()", SOAP_TCP_ERROR); - return SOAP_INVALID_SOCKET; - } - if (soap->keep_alive && setsockopt((SOAP_SOCKET)soap->socket, SOL_SOCKET, SO_KEEPALIVE, (char*)&set, sizeof(int))) - { soap->errnum = soap_socket_errno; - soap_set_receiver_error(soap, tcp_error(soap), "TCP setsockopt SO_KEEPALIVE failed in soap_accept()", SOAP_TCP_ERROR); - return SOAP_INVALID_SOCKET; - } - if (setsockopt((SOAP_SOCKET)soap->socket, SOL_SOCKET, SO_SNDBUF, (char*)&len, sizeof(int))) - { soap->errnum = soap_socket_errno; - soap_set_receiver_error(soap, tcp_error(soap), "TCP setsockopt SO_SNDBUF failed in soap_accept()", SOAP_TCP_ERROR); - return SOAP_INVALID_SOCKET; - } - if (setsockopt((SOAP_SOCKET)soap->socket, SOL_SOCKET, SO_RCVBUF, (char*)&len, sizeof(int))) - { soap->errnum = soap_socket_errno; - soap_set_receiver_error(soap, tcp_error(soap), "TCP setsockopt SO_RCVBUF failed in soap_accept()", SOAP_TCP_ERROR); - return SOAP_INVALID_SOCKET; - } -#ifdef TCP_NODELAY - if (setsockopt((SOAP_SOCKET)soap->socket, IPPROTO_TCP, TCP_NODELAY, (char*)&set, sizeof(int))) - { soap->errnum = soap_socket_errno; - soap_set_receiver_error(soap, tcp_error(soap), "TCP setsockopt TCP_NODELAY failed in soap_accept()", SOAP_TCP_ERROR); - return SOAP_INVALID_SOCKET; - } -#endif -#endif - if (soap->accept_timeout) - { -#if defined(WIN32) - u_long blocking = 0; - ioctlsocket((SOAP_SOCKET)soap->master, FIONBIO, &blocking); - ioctlsocket((SOAP_SOCKET)soap->socket, FIONBIO, &blocking); -/* WR[ */ -#elif defined(VXWORKS) - vx_nonblocking = FALSE; - ioctl((SOAP_SOCKET)soap->master, FIONBIO, (int)(&vx_nonblocking)); - ioctl((SOAP_SOCKET)soap->socket, FIONBIO, (int)(&vx_nonblocking)); -/* ]WR */ -#elif defined(PALM) - fcntl((SOAP_SOCKET)soap->master, F_SETFL, fcntl((SOAP_SOCKET)soap->master, F_GETFL,0)&~O_NONBLOCK); - fcntl((SOAP_SOCKET)soap->socket, F_SETFL, fcntl((SOAP_SOCKET)soap->socket, F_GETFL,0)&~O_NONBLOCK); -#elif defined(SYMBIAN) - long blocking = 0; - ioctl((SOAP_SOCKET)soap->master, 0/*FIONBIO*/, &blocking); -#else - fcntl((SOAP_SOCKET)soap->master, F_SETFL, fcntl((SOAP_SOCKET)soap->master, F_GETFL)&~O_NONBLOCK); - fcntl((SOAP_SOCKET)soap->socket, F_SETFL, fcntl((SOAP_SOCKET)soap->socket, F_GETFL)&~O_NONBLOCK); -#endif - } - return soap->socket; - } - if (soap_socket_errno != SOAP_EINTR && soap_socket_errno != SOAP_EAGAIN) - { DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Accept failed from %s\n", soap->host)); - soap->errnum = soap_socket_errno; - soap_set_receiver_error(soap, tcp_error(soap), "TCP accept failed in soap_accept()", SOAP_TCP_ERROR); - return SOAP_INVALID_SOCKET; - } - } - } - else - { soap_set_receiver_error(soap, tcp_error(soap), "TCP no master socket in soap_accept()", SOAP_TCP_ERROR); - return SOAP_INVALID_SOCKET; - } -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_NOIO -#ifndef PALM_1 -static int -tcp_disconnect(struct soap *soap) -{ -#ifdef WITH_OPENSSL - if (soap->ssl) - { int r, s = 0; - if (soap->session) - SSL_SESSION_free(soap->session); - if (*soap->host) - { soap->session = SSL_get1_session(soap->ssl); - if (soap->session) - { strcpy(soap->session_host, soap->host); - soap->session_port = soap->port; - } - } - r = SSL_shutdown(soap->ssl); - if (r != 1) - { s = ERR_get_error(); - if (s) - { if (soap_valid_socket(soap->socket)) - { soap->fshutdownsocket(soap, (SOAP_SOCKET)soap->socket, 1); - soap->socket = SOAP_INVALID_SOCKET; - } - r = SSL_shutdown(soap->ssl); - } - } - DBGLOG(TEST, if (s) SOAP_MESSAGE(fdebug, "Shutdown failed: %d\n", SSL_get_error(soap->ssl, r))); - SSL_free(soap->ssl); - soap->ssl = NULL; - if (s) - return SOAP_SSL_ERROR; - ERR_remove_state(0); - } -#endif - if (soap_valid_socket(soap->socket)) - { DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Closing socket %d\n", soap->socket)); - soap->fshutdownsocket(soap, (SOAP_SOCKET)soap->socket, 2); - soap->fclosesocket(soap, (SOAP_SOCKET)soap->socket); - soap->socket = SOAP_INVALID_SOCKET; - } - return SOAP_OK; -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_NOIO -#ifndef PALM_1 -static int -tcp_closesocket(struct soap *soap, SOAP_SOCKET fd) -{ return closesocket(fd); -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_NOIO -#ifndef PALM_1 -static int -tcp_shutdownsocket(struct soap *soap, SOAP_SOCKET fd, int how) -{ return shutdown(fd, how); -} -#endif -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_closesock(struct soap *soap) -{ register int status = soap->error; - if (status == SOAP_EOF || status == SOAP_TCP_ERROR || status == SOAP_SSL_ERROR || !soap->keep_alive) - { if (soap->fclose && (soap->error = soap->fclose(soap))) - return soap->error; - soap->socket = SOAP_INVALID_SOCKET; - soap->keep_alive = 0; - } -#ifdef WITH_ZLIB - if (soap->zlib_state == SOAP_ZLIB_DEFLATE) - deflateEnd(&soap->d_stream); - else if (soap->zlib_state == SOAP_ZLIB_INFLATE) - inflateEnd(&soap->d_stream); - soap->zlib_state = SOAP_ZLIB_NONE; -#endif - return soap->error = status; -} -#endif - -/******************************************************************************/ -#ifndef WITH_NOIDREF -#ifndef PALM_2 -SOAP_FMAC1 -size_t -SOAP_FMAC2 -soap_hash(register const char *s) -{ register size_t h = 0; - while (*s) - h = 65599*h + *s++; - return h % SOAP_IDHASH; -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_NOIDREF -#ifndef PALM_1 -static void -soap_init_pht(struct soap *soap) -{ register int i; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Initializing pointer hashtable\n")); - for (i = 0; i < (int)SOAP_PTRHASH; i++) - soap->pht[i] = NULL; -} -#endif -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -struct soap* -SOAP_FMAC2 -soap_new1(soap_mode mode) -{ return soap_new2(mode, mode); -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -struct soap* -SOAP_FMAC2 -soap_new() -{ return soap_new2(SOAP_IO_DEFAULT, SOAP_IO_DEFAULT); -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -struct soap* -SOAP_FMAC2 -soap_new2(soap_mode imode, soap_mode omode) -{ struct soap *soap = (struct soap*)SOAP_MALLOC(sizeof(struct soap)); - if (soap) - soap_init2(soap, imode, omode); - return soap; -} -#endif - -/******************************************************************************/ -#ifndef WITH_NOIDREF -#ifndef PALM_1 -static void -soap_free_pht(struct soap *soap) -{ register struct soap_plist *pp, *next; - register int i; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Free pointer hashtable\n")); - for (i = 0; i < (int)SOAP_PTRHASH; i++) - { for (pp = soap->pht[i]; pp; pp = next) - { next = pp->next; - SOAP_FREE(pp); - } - soap->pht[i] = NULL; - } -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_NOIDREF -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_embed(struct soap *soap, const void *p, const struct soap_array *a, int n, const char *tag, int type) -{ register int i; - struct soap_plist *pp; - if (soap->version != 1) - soap->encoding = 1; - if (a) - i = soap_array_pointer_lookup(soap, p, a, n, type, &pp); - else - i = soap_pointer_lookup(soap, p, type, &pp); - if (i) - { if (soap_is_embedded(soap, pp) - || soap_is_single(soap, pp)) - return 0; - soap_set_embedded(soap, pp); - } - return i; -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_NOIDREF -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_pointer_lookup(struct soap *soap, const void *p, int type, struct soap_plist **ppp) -{ register struct soap_plist *pp; - *ppp = NULL; - if (p) - for (pp = soap->pht[soap_hash_ptr(p)]; pp; pp = pp->next) - if (pp->ptr == p && pp->type == type) - { *ppp = pp; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Lookup location=%p type=%d id=%d\n", p, type, pp->id)); - return pp->id; - } - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Lookup location=%p type=%d: not found\n", p, type)); - return 0; -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_NOIDREF -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_pointer_enter(struct soap *soap, const void *p, const struct soap_array *a, int n, int type, struct soap_plist **ppp) -{ register int h; - register struct soap_plist *pp = *ppp = (struct soap_plist*)SOAP_MALLOC(sizeof(struct soap_plist)); - if (!pp) - return 0; - if (a) - h = soap_hash_ptr(a->__ptr); - else - h = soap_hash_ptr(p); - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Pointer enter location=%p array=%p size=%d dim=%d type=%d id=%lu\n", p, a?a->__ptr:NULL, a?a->__size:0, n, type, soap->idnum+1)); - pp->next = soap->pht[h]; - pp->type = type; - pp->mark1 = 0; - pp->mark2 = 0; - pp->ptr = p; - pp->array = a; - soap->pht[h] = pp; - pp->id = ++soap->idnum; - return pp->id; -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_NOIDREF -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_array_pointer_lookup(struct soap *soap, const void *p, const struct soap_array *a, int n, int type, struct soap_plist **ppp) -{ register struct soap_plist *pp; - *ppp = NULL; - if (!p || !a->__ptr) - return 0; - for (pp = soap->pht[soap_hash_ptr(a->__ptr)]; pp; pp = pp->next) - { if (pp->type == type && pp->array && pp->array->__ptr == a->__ptr) - { register int i; - for (i = 0; i < n; i++) - if (((const int*)&pp->array->__size)[i] != ((const int*)&a->__size)[i]) - break; - if (i == n) - { *ppp = pp; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Array lookup location=%p type=%d id=%d\n", a->__ptr, type, pp->id)); - return pp->id; - } - } - } - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Array lookup location=%p type=%d: not found\n", a->__ptr, type)); - return 0; -} -#endif -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_begin_count(struct soap *soap) -{ soap_clr_attr(soap); - soap_set_local_namespaces(soap); -#ifndef WITH_LEANER - if ((soap->mode & SOAP_ENC_DIME) || (soap->omode & SOAP_ENC_DIME)) - soap->mode = soap->omode | SOAP_IO_LENGTH | SOAP_ENC_DIME; - else -#endif - { soap->mode = soap->omode; - if ((soap->mode & SOAP_IO) == SOAP_IO_STORE - || (((soap->mode & SOAP_IO) == SOAP_IO_CHUNK || (soap->mode & SOAP_ENC_XML)) -#ifndef WITH_LEANER - && !soap->fpreparesend -#endif - )) - soap->mode &= ~SOAP_IO_LENGTH; - else - soap->mode |= SOAP_IO_LENGTH; - } -#ifdef WITH_ZLIB - if ((soap->mode & SOAP_ENC_ZLIB) && (soap->mode & SOAP_IO) == SOAP_IO_FLUSH) - { if (!(soap->mode & SOAP_ENC_DIME)) - soap->mode &= ~SOAP_IO_LENGTH; - if (soap->mode & SOAP_ENC_XML) - soap->mode |= SOAP_IO_BUFFER; - else - soap->mode |= SOAP_IO_STORE; - } - -#endif - if (!soap->encodingStyle && !(soap->mode & SOAP_XML_GRAPH)) - soap->mode |= SOAP_XML_TREE; -#ifndef WITH_LEANER - if (soap->mode & SOAP_ENC_MIME) - soap_select_mime_boundary(soap); - soap->dime.list = soap->dime.last; /* keep track of last DIME attachment */ -#endif - soap->count = 0; - soap->ns = 0; - soap->null = 0; - soap->position = 0; - soap->mustUnderstand = 0; - soap->encoding = 0; - soap->part = SOAP_BEGIN; - soap->idnum = 0; -#ifndef WITH_LEANER - soap->dime.count = 0; /* count # of attachments */ - soap->dime.size = 0; /* accumulate total size of attachments */ - if (soap->fprepareinit && (soap->mode & SOAP_IO) != SOAP_IO_STORE) - soap->fprepareinit(soap); -#endif - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Begin count phase (socket=%d mode=%x count=%lu)\n", soap->socket, soap->mode, (unsigned long)soap->count)); -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_begin_send(struct soap *soap) -{ soap->error = SOAP_OK; - soap_clr_attr(soap); - soap_set_local_namespaces(soap); - soap->mode = soap->omode | (soap->mode & (SOAP_IO_LENGTH | SOAP_ENC_DIME)); -#ifdef WITH_ZLIB - if ((soap->mode & SOAP_ENC_ZLIB) && (soap->mode & SOAP_IO) == SOAP_IO_FLUSH) - { if (soap->mode & SOAP_ENC_XML) - soap->mode |= SOAP_IO_BUFFER; - else - soap->mode |= SOAP_IO_STORE; - } -#endif - if ((soap->mode & SOAP_IO) == SOAP_IO_FLUSH && soap_valid_socket(soap->socket)) - { if (soap->count || (soap->mode & SOAP_IO_LENGTH) || (soap->mode & SOAP_ENC_XML)) - soap->mode |= SOAP_IO_BUFFER; - else - soap->mode |= SOAP_IO_STORE; - } - soap->mode &= ~SOAP_IO_LENGTH; - if ((soap->mode & SOAP_IO) == SOAP_IO_STORE) - soap_new_block(soap); - if (!(soap->mode & SOAP_IO_KEEPALIVE)) - soap->keep_alive = 0; - if (!soap->encodingStyle && !(soap->mode & SOAP_XML_GRAPH)) - soap->mode |= SOAP_XML_TREE; -#ifndef WITH_LEANER - if (soap->mode & SOAP_ENC_MIME) - soap_select_mime_boundary(soap); -#ifdef WIN32 -#ifndef UNDER_CE -#ifndef WITH_FASTCGI - if (!soap_valid_socket(soap->socket)) /* Set win32 stdout or soap->sendfd to BINARY, e.g. to support DIME */ -#ifdef __BORLANDC__ - setmode((SOAP_SOCKET)soap->sendfd, O_BINARY); -#else - _setmode((SOAP_SOCKET)soap->sendfd, _O_BINARY); -#endif -#endif -#endif -#endif -#endif - if (soap->mode & SOAP_IO) - { soap->bufidx = 0; - soap->buflen = 0; - } - soap->chunksize = 0; - soap->ns = 0; - soap->null = 0; - soap->position = 0; - soap->mustUnderstand = 0; - soap->encoding = 0; - soap->part = SOAP_BEGIN; - soap->idnum = 0; - soap->level = 0; -#ifdef WITH_ZLIB - soap->z_ratio_out = 1.0; - if ((soap->mode & SOAP_ENC_ZLIB) && soap->zlib_state != SOAP_ZLIB_DEFLATE) - { -#ifdef WITH_GZIP - memcpy(soap->z_buf, "\37\213\10\0\0\0\0\0\0\377", 10); - soap->d_stream.next_out = (Byte*)soap->z_buf + 10; - soap->d_stream.avail_out = SOAP_BUFLEN - 10; - soap->z_crc = crc32(0L, NULL, 0); - if (deflateInit2(&soap->d_stream, soap->z_level, Z_DEFLATED, -MAX_WBITS, 8, Z_DEFAULT_STRATEGY) != Z_OK) -#else - soap->d_stream.next_out = (Byte*)soap->z_buf; - soap->d_stream.avail_out = SOAP_BUFLEN; - if (deflateInit(&soap->d_stream, soap->z_level) != Z_OK) -#endif - return soap->error = SOAP_ZLIB_ERROR; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Deflate initialized\n")); - soap->zlib_state = SOAP_ZLIB_DEFLATE; - } -#endif - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Begin send phase (socket=%d mode=%x count=%lu)\n", soap->socket, soap->mode, (unsigned long)soap->count)); -#ifndef WITH_LEANER - if (soap->fprepareinit && (soap->mode & SOAP_IO) == SOAP_IO_STORE) - soap->fprepareinit(soap); -#endif - return SOAP_OK; -} -#endif - -/******************************************************************************/ -#ifndef WITH_NOIDREF -#ifndef PALM_2 -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_embedded(struct soap *soap, const void *p, int t) -{ struct soap_plist *pp; - if (soap_pointer_lookup(soap, p, t, &pp)) - { pp->mark1 = 1; - pp->mark2 = 1; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Embedded %p type=%d mark set to 1\n", p, t)); - } -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_NOIDREF -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_reference(struct soap *soap, const void *p, int t) -{ - struct soap_plist *pp; - if (!p || (soap->mode & SOAP_XML_TREE)) - return 1; - if (soap_pointer_lookup(soap, p, t, &pp)) - { if (pp->mark1 == 0) - { pp->mark1 = 2; - pp->mark2 = 2; - } - } - else if (soap_pointer_enter(soap, p, NULL, 0, t, &pp)) - { pp->mark1 = 0; - pp->mark2 = 0; - } - else - return 1; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Reference %p type=%d (%d %d)\n", p, t, (int)pp->mark1, (int)pp->mark2)); - return pp->mark1; -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_NOIDREF -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_array_reference(struct soap *soap, const void *p, const struct soap_array *a, int n, int t) -{ register int i; - struct soap_plist *pp; - if (!p) - return 1; - i = soap_array_pointer_lookup(soap, p, a, n, t, &pp); - if (i) - { if (pp->mark1 == 0) - { pp->mark1 = 2; - pp->mark2 = 2; - } - } - else if (!soap_pointer_enter(soap, p, a, n, t, &pp)) - return 1; - else - { pp->mark1 = 0; - pp->mark2 = 0; - } - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Array reference %p ptr=%p dim=%d type=%d (%d %d)\n", p, a->__ptr, n, t, (int)pp->mark1, (int)pp->mark2)); - return pp->mark1; -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_NOIDREF -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_embedded_id(struct soap *soap, int id, const void *p, int t) -{ struct soap_plist *pp; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Embedded_id %p type=%d id=%d\n", p, t, id)); - if (soap->mode & SOAP_XML_TREE) - return id; - if (soap->version == 1 && soap->encodingStyle && !(soap->mode & SOAP_XML_GRAPH) && soap->part != SOAP_IN_HEADER) - { if (id < 0) - { id = soap_pointer_lookup(soap, p, t, &pp); - if (id) - { if (soap->mode & SOAP_IO_LENGTH) - pp->mark1 = 2; - else - pp->mark2 = 2; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Embedded_id multiref id=%d %p type=%d = (%d %d)\n", id, p, t, (int)pp->mark1, (int)pp->mark2)); - } - return -1; - } - return id; - } - if (id < 0) - id = soap_pointer_lookup(soap, p, t, &pp); - else if (id && !soap_pointer_lookup(soap, p, t, &pp)) - return 0; - if (id && pp) - { if (soap->mode & SOAP_IO_LENGTH) - pp->mark1 = 1; - else - pp->mark2 = 1; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Embedded_id embedded ref id=%d %p type=%d = (%d %d)\n", id, p, t, (int)pp->mark1, (int)pp->mark2)); - } - return id; -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_NOIDREF -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_is_embedded(struct soap *soap, struct soap_plist *pp) -{ if (!pp) - return 0; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Is embedded? %d %d\n", (int)pp->mark1, (int)pp->mark2)); - if (soap->version == 1 && soap->encodingStyle && !(soap->mode & SOAP_XML_GRAPH) && soap->part != SOAP_IN_HEADER) - { if (soap->mode & SOAP_IO_LENGTH) - return pp->mark1 != 0; - return pp->mark2 != 0; - } - if (soap->mode & SOAP_IO_LENGTH) - return pp->mark1 == 1; - return pp->mark2 == 1; -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_NOIDREF -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_is_single(struct soap *soap, struct soap_plist *pp) -{ if (soap->part == SOAP_IN_HEADER) - return 1; - if (!pp) - return 0; - if (soap->mode & SOAP_IO_LENGTH) - return pp->mark1 == 0; - return pp->mark2 == 0; -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_NOIDREF -#ifndef PALM_2 -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_set_embedded(struct soap *soap, struct soap_plist *pp) -{ if (!pp) - return; - if (soap->mode & SOAP_IO_LENGTH) - pp->mark1 = 1; - else - pp->mark2 = 1; -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_NOIDREF -#ifndef WITH_LEANER -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_element_dime(struct soap *soap, const char *tag, int id, const void *p, const struct soap_array *a, const char *aid, const char *atype, const char *aoptions, int n, const char *type, int t) -{ struct soap_plist *pp; - int i; - if (!p || !a->__ptr || (!aid && !atype)) - return soap_element_id(soap, tag, id, p, a, n, type, t); - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Attachment tag='%s' id='%s' (%d) type='%s'\n", tag, aid?aid:"", id, atype?atype:"")); - i = soap_array_pointer_lookup(soap, p, a, n, t, &pp); - if (!i) - { i = soap_pointer_enter(soap, p, a, n, t, &pp); - if (!i) - { soap->error = SOAP_EOM; - return -1; - } - } - if (id < 0) - id = i; - if (!aid) - { sprintf(soap->tmpbuf, soap->dime_id_format, id); - aid = soap_strdup(soap, soap->tmpbuf); - } - if (soap_element_href(soap, tag, 0, "href", aid)) - return soap->error; - if (soap->mode & SOAP_IO_LENGTH) - { if (pp->mark1 != 3) - { struct soap_multipart *content = soap_new_multipart(soap, &soap->dime.first, &soap->dime.last, (char*)a->__ptr, a->__size); - if (!content) - { soap->error = SOAP_EOM; - return -1; - } - content->id = aid; - content->type = atype; - content->options = aoptions; - pp->mark1 = 3; - } - } - else - pp->mark2 = 3; - return -1; -} -#endif -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_NOIDREF -#ifndef PALM_1 -static void -soap_init_iht(struct soap *soap) -{ register int i; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Initializing ID hashtable\n")); - for (i = 0; i < SOAP_IDHASH; i++) - soap->iht[i] = NULL; -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_NOIDREF -#ifndef PALM_1 -static void -soap_free_iht(struct soap *soap) -{ register int i; - register struct soap_ilist *ip, *p; - register struct soap_flist *fp, *fq; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Free ID hashtable\n")); - for (i = 0; i < SOAP_IDHASH; i++) - { for (ip = soap->iht[i]; ip; ip = p) - { for (fp = ip->flist; fp; fp = fq) - { fq = fp->next; - SOAP_FREE(fp); - } - p = ip->next; - SOAP_FREE(ip); - } - soap->iht[i] = NULL; - } -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_NOIDREF -#ifndef PALM_2 -static struct soap_ilist * -soap_hlookup(struct soap *soap, const char *id) -{ register struct soap_ilist *ip; - for (ip = soap->iht[soap_hash(id)]; ip; ip = ip->next) - if (!strcmp(ip->id, id)) - return ip; - return NULL; -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_NOIDREF -#ifndef PALM_2 -SOAP_FMAC1 -struct soap_ilist * -SOAP_FMAC2 -soap_lookup(struct soap *soap, const char *id) -{ register struct soap_ilist *ip; - ip = soap_hlookup(soap, id); -#ifndef WITH_LEANER - if (!ip && *id != '#' && !strchr(id, ':')) /* try content id "cid:" with DIME attachments */ - { char cid[SOAP_TAGLEN]; - strcpy(cid, "cid:"); - strncat(cid + 4, id, sizeof(cid) - 5); - cid[sizeof(cid) - 1] = '\0'; - ip = soap_hlookup(soap, cid); - } -#endif - return ip; -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_NOIDREF -#ifndef PALM_2 -SOAP_FMAC1 -struct soap_ilist * -SOAP_FMAC2 -soap_enter(struct soap *soap, const char *id) -{ register size_t h; - register struct soap_ilist *ip; - ip = (struct soap_ilist*)SOAP_MALLOC(sizeof(struct soap_ilist) + strlen(id)); - if (ip) - { h = soap_hash(id); - strcpy(ip->id, id); - ip->next = soap->iht[h]; - soap->iht[h] = ip; - return ip; - } - return NULL; -} -#endif -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -void* -SOAP_FMAC2 -soap_malloc(struct soap *soap, size_t n) -{ register char *p; - if (!n) - return NULL; - if (!soap) - return SOAP_MALLOC(n); - n += (-(long)n) & 7; - if (!(p = (char*)SOAP_MALLOC(n + sizeof(void*) + sizeof(size_t)))) - { soap->error = SOAP_EOM; - return NULL; - } - /* keep chain of alloced cells for later destruction */ - soap->alloced = 1; - *(void**)(p + n) = soap->alist; - *(size_t*)(p + n + sizeof(void*)) = n; - soap->alist = p + n; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Malloc %u bytes at location %p\n", (unsigned int)n, p)); - return p; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_dealloc(struct soap *soap, void *p) -{ if (!soap) - return; - if (p) - { register char **q; - for (q = (char**)&soap->alist; *q; q = *(char***)q) - { if (p == (void*)(*q - *(size_t*)(*q + sizeof(void*)))) - { *q = **(char***)q; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Freed data at %p\n", p)); - SOAP_FREE(p); - return; - } - } - soap_delete(soap, p); - } - else - { register char *q; - while (soap->alist) - { q = (char*)soap->alist; - soap->alist = *(void**)q; - q -= *(size_t*)(q + sizeof(void*)); - SOAP_FREE(q); - } - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Dealloc all data done\n")); - } - /* we must assume these were deallocated: */ - soap->action = NULL; - soap->fault = NULL; - soap->header = NULL; - soap->authrealm = NULL; -#ifndef WITH_LEANER - soap_clr_mime(soap); -#endif -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_delete(struct soap *soap, void *p) -{ register struct soap_clist **cp = &soap->clist; - if (p) - { while (*cp) - { if (p == (*cp)->ptr) - { register struct soap_clist *q = *cp; - *cp = q->next; - q->fdelete(q); - SOAP_FREE(q); - return; - } - cp = &(*cp)->next; - } - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Could not dealloc data %p: address not in list\n", p)); - } - else - { while (*cp) - { register struct soap_clist *q = *cp; - *cp = q->next; - if (q->ptr == (void*)soap->fault) - soap->fault = NULL; /* this was deallocated */ - else if (q->ptr == (void*)soap->header) - soap->header = NULL; /* this was deallocated */ - q->fdelete(q); - SOAP_FREE(q); - } - } -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -struct soap_clist * -SOAP_FMAC2 -soap_link(struct soap *soap, void *p, int t, int n, void (*fdelete)(struct soap_clist*)) -{ register struct soap_clist *cp; - if ((cp = (struct soap_clist*)SOAP_MALLOC(sizeof(struct soap_clist)))) - { cp->next = soap->clist; - cp->type = t; - cp->size = n; - cp->ptr = p; - cp->fdelete = fdelete; - soap->clist = cp; - } - return cp; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_unlink(struct soap *soap, const void *p) -{ register char **q; - register struct soap_clist **cp; - if (!soap || !p) - return; - for (q = (char**)&soap->alist; *q; q = *(char***)q) - { if (p == (void*)(*q - *(size_t*)(*q + sizeof(void*)))) - { *q = **(char***)q; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Unlinked data %p\n", p)); - return; - } - } - for (cp = &soap->clist; *cp; cp = &(*cp)->next) - { if (p == (*cp)->ptr) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Unlinked class instance %p\n", p)); - q = (char**)*cp; - *cp = (*cp)->next; - SOAP_FREE(q); - return; - } - } -} -#endif - -/******************************************************************************/ -#ifndef WITH_NOIDREF -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_lookup_type(struct soap *soap, const char *id) -{ register struct soap_ilist *ip; - if (id && *id) - { ip = soap_lookup(soap, id); - if (ip) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Lookup id='%s' type=%d\n", id, ip->type)); - return ip->type; - } - } - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "lookup type id='%s' NOT FOUND! Need to get it from xsi:type\n", id)); - return 0; -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_NOIDREF -#ifndef PALM_2 -SOAP_FMAC1 -void* -SOAP_FMAC2 -soap_id_lookup(struct soap *soap, const char *id, void **p, int t, size_t n, unsigned int k) -{ struct soap_ilist *ip; - void **q; - if (!p || !id || !*id) - return p; - ip = soap_lookup(soap, id); /* lookup pointer to hash table entry for string id */ - if (!ip) - { ip = soap_enter(soap, id); /* new hash table entry for string id */ - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Forwarding first href='%s' type=%d %p (%u bytes)\n", id, t, p, (unsigned int)n)); - ip->type = t; - ip->size = n; - ip->link = p; - ip->copy = NULL; - ip->flist = NULL; - ip->ptr = NULL; - ip->level = k; - *p = NULL; - } - else if (ip->ptr) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Resolved href='%s' type=%d location=%p (%u bytes)\n", id, t, ip->ptr, (unsigned int)n)); - if (ip->type != t) - { strcpy(soap->id, id); - soap->error = SOAP_HREF; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Type incompatibility: id type=%d href type=%d\n", ip->type, t)); - return NULL; - } - while (ip->level < k) - { q = (void**)soap_malloc(soap, sizeof(void*)); - if (!q) - return NULL; - *p = (void*)q; - p = q; - k--; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Descending one level...\n")); - } - *p = ip->ptr; - } - else if (ip->level > k) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Resolving level %u pointers to href='%s'\n", ip->level, id)); - while (ip->level > k) - { void *s, **r = &ip->link; - q = (void**)ip->link; - while (q) - { *r = (void*)soap_malloc(soap, sizeof(void*)); - s = *q; - *q = *r; - r = (void**)*r; - q = (void**)s; - } - *r = NULL; - ip->size = n; - ip->copy = NULL; - ip->level = ip->level - 1; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Descending one level...\n")); - } - q = (void**)ip->link; - ip->link = p; - *p = (void*)q; - } - else - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Forwarded href='%s' type=%d location=%p (%u bytes)\n", id, t, p, (unsigned int)n)); - while (ip->level < k) - { q = (void**)soap_malloc(soap, sizeof(void*)); - *p = q; - p = q; - k--; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Descending one level...\n")); - } - q = (void**)ip->link; - ip->link = p; - *p = (void*)q; - } - return p; -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_NOIDREF -#ifndef PALM_2 -SOAP_FMAC1 -void* -SOAP_FMAC2 -soap_id_forward(struct soap *soap, const char *href, void *p, int st, int tt, size_t n, unsigned int k, void (*fcopy)(struct soap*, int, int, void*, const void*, size_t)) -{ struct soap_ilist *ip; - if (!p || !href || !*href) - return p; - ip = soap_lookup(soap, href); /* lookup pointer to hash table entry for string id */ - if (!ip) - { ip = soap_enter(soap, href); /* new hash table entry for string id */ - ip->type = st; - ip->size = n; - ip->link = NULL; - ip->copy = NULL; - ip->ptr = NULL; - ip->level = 0; - ip->flist = NULL; - DBGLOG(TEST,SOAP_MESSAGE(fdebug, "New entry href='%s' type=%d size=%lu level=%d location=%p\n", href, st, (unsigned long)n, k, p)); - } - else if (ip->type != st || (ip->level == k && ip->size != n)) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Type incompatibility id='%s' expect type=%d size=%lu level=%u got type=%d size=%lu\n", href, ip->type, (unsigned long)ip->size, k, st, (unsigned long)n)); - strcpy(soap->id, href); - soap->error = SOAP_HREF; - return NULL; - } - if (fcopy || n < sizeof(void*) || *href != '#') - { register struct soap_flist *fp = (struct soap_flist*)SOAP_MALLOC(sizeof(struct soap_flist)); - if (!fp) - { soap->error = SOAP_EOM; - return NULL; - } - fp->next = ip->flist; - fp->type = tt; - fp->ptr = p; - fp->level = k; - if (fcopy) - fp->fcopy = fcopy; - else - fp->fcopy = soap_fcopy; - ip->flist = fp; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Forwarding type=%d (target type=%d) size=%lu location=%p level=%u href='%s'\n", st, tt, (unsigned long)n, p, k, href)); - } - else - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Forwarding copying address %p for type=%d href='%s'\n", p, st, href)); - *(void**)p = ip->copy; - ip->copy = p; - } - return p; -} -#endif -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -void* -SOAP_FMAC2 -soap_id_enter(struct soap *soap, const char *id, void *p, int t, size_t n, unsigned int k, const char *type, const char *arrayType, void *(*finstantiate)(struct soap*, int, const char*, const char*, size_t*)) -{ struct soap_ilist *ip; - DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Enter id='%s' type=%d loc=%p size=%lu level=%u\n", id, t, p, (unsigned long)n, k)); - soap->alloced = 0; - if (!p) - { if (finstantiate) - p = finstantiate(soap, t, type, arrayType, &n); - else - p = soap_malloc(soap, n); - if (p) - soap->alloced = 1; - } -#ifndef WITH_NOIDREF - if (!id || !*id) -#endif - return p; -#ifndef WITH_NOIDREF - ip = soap_lookup(soap, id); /* lookup pointer to hash table entry for string id */ - DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Lookup entry id='%s for location=%p'\n", id, p)); - if (!ip) - { ip = soap_enter(soap, id); /* new hash table entry for string id */ - ip->type = t; - ip->link = NULL; - ip->copy = NULL; - ip->flist = NULL; - ip->size = n; - ip->ptr = p; - ip->level = k; - DBGLOG(TEST,SOAP_MESSAGE(fdebug, "New entry id='%s' type=%d size=%lu level=%u location=%p\n", id, t, (unsigned long)n, k, p)); - } - else if ((ip->type != t || (ip->level == k && ip->size != n)) && (ip->copy || ip->flist)) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Type incompatibility id='%s' expect type=%d size=%lu level=%u got type=%d size=%lu\n", id, ip->type, (unsigned long)ip->size, k, t, (unsigned long)n)); - strcpy(soap->id, id); - soap->error = SOAP_HREF; - return NULL; - } - else if (ip->ptr) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Multiply defined id='%s'\n", id)); - strcpy(soap->id, id); - soap->error = SOAP_MULTI_ID; - return NULL; - } - else - { ip->size = n; - ip->ptr = p; - ip->level = k; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Update entry id='%s' type=%d location=%p size=%lu level=%u\n", id, t, p, (unsigned long)n, k)); - } - return ip->ptr; -#endif -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_fcopy(struct soap *soap, int st, int tt, void *p, const void *q, size_t n) -{ DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Copying data type=%d (target type=%d) %p -> %p (%lu bytes)\n", st, tt, q, p, (unsigned long)n)); - memcpy(p, q, n); -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_end_send(struct soap *soap) -{ -#ifndef WITH_LEANER - if (soap->dime.list) - { /* SOAP body referenced attachments must appear first */ - soap->dime.last->next = soap->dime.first; - soap->dime.first = soap->dime.list->next; - soap->dime.list->next = NULL; - soap->dime.last = soap->dime.list; - } - if (soap_putdime(soap) || soap_putmime(soap)) - return soap->error; - soap->mime.list = NULL; - soap->mime.first = NULL; - soap->mime.last = NULL; - soap->dime.list = NULL; - soap->dime.first = NULL; - soap->dime.last = NULL; -#endif - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "End send\n")); - if (soap->mode & SOAP_IO) /* need to flush the remaining data in buffer */ - { if (soap_flush(soap)) -#ifdef WITH_ZLIB - { if (soap->mode & SOAP_ENC_ZLIB && soap->zlib_state == SOAP_ZLIB_DEFLATE) - { soap->zlib_state = SOAP_ZLIB_NONE; - deflateEnd(&soap->d_stream); - } - return soap->error; - } -#else - return soap->error; -#endif -#ifdef WITH_ZLIB - if (soap->mode & SOAP_ENC_ZLIB) - { int r; - soap->d_stream.avail_in = 0; - do - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Deflating remainder\n")); - r = deflate(&soap->d_stream, Z_FINISH); - if (soap->d_stream.avail_out != SOAP_BUFLEN) - { if (soap_flush_raw(soap, soap->z_buf, SOAP_BUFLEN - soap->d_stream.avail_out)) - { soap->zlib_state = SOAP_ZLIB_NONE; - deflateEnd(&soap->d_stream); - return soap->error; - } - soap->d_stream.next_out = (Byte*)soap->z_buf; - soap->d_stream.avail_out = SOAP_BUFLEN; - } - } while (r == Z_OK); - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Deflated %lu->%lu bytes\n", soap->d_stream.total_in, soap->d_stream.total_out)); - soap->z_ratio_out = (float)soap->d_stream.total_out / (float)soap->d_stream.total_in; - soap->mode &= ~SOAP_ENC_ZLIB; - soap->zlib_state = SOAP_ZLIB_NONE; - if (deflateEnd(&soap->d_stream) != Z_OK || r != Z_STREAM_END) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Unable to end deflate: %s\n", soap->d_stream.msg?soap->d_stream.msg:"")); - return soap->error = SOAP_ZLIB_ERROR; - } -#ifdef WITH_GZIP - soap->z_buf[0] = soap->z_crc & 0xFF; - soap->z_buf[1] = (soap->z_crc >> 8) & 0xFF; - soap->z_buf[2] = (soap->z_crc >> 16) & 0xFF; - soap->z_buf[3] = (soap->z_crc >> 24) & 0xFF; - soap->z_buf[4] = soap->d_stream.total_in & 0xFF; - soap->z_buf[5] = (soap->d_stream.total_in >> 8) & 0xFF; - soap->z_buf[6] = (soap->d_stream.total_in >> 16) & 0xFF; - soap->z_buf[7] = (soap->d_stream.total_in >> 24) & 0xFF; - if (soap_flush_raw(soap, soap->z_buf, 8)) - return soap->error; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "gzip crc32=%lu\n", (unsigned long)soap->z_crc)); -#endif - } -#endif - if ((soap->mode & SOAP_IO) == SOAP_IO_STORE) - { char *p; -#ifndef WITH_NOHTTP - if (!(soap->mode & SOAP_ENC_XML)) - { soap->mode--; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Sending buffered message of length %u\n", (unsigned int)soap->blist->size)); - if (soap->status >= SOAP_POST) - soap->error = soap->fpost(soap, soap->endpoint, soap->host, soap->port, soap->path, soap->action, soap->blist->size); - else if (soap->status != SOAP_STOP) - soap->error = soap->fresponse(soap, soap->status, soap->blist->size); - if (soap->error || soap_flush(soap)) - return soap->error; - soap->mode++; - } -#endif - for (p = soap_first_block(soap); p; p = soap_next_block(soap)) - { DBGMSG(SENT, p, soap_block_size(soap)); - if ((soap->error = soap->fsend(soap, p, soap_block_size(soap)))) - { soap_end_block(soap); - return soap->error; - } - } - soap_end_block(soap); - } -#ifndef WITH_LEANER - else if ((soap->mode & SOAP_IO) == SOAP_IO_CHUNK) - { DBGMSG(SENT, "\r\n0\r\n\r\n", 7); - if ((soap->error = soap->fsend(soap, "\r\n0\r\n\r\n", 7))) - return soap->error; - } -#endif - } -#ifdef WITH_OPENSSL - if (!soap->ssl && soap_valid_socket(soap->socket) && !soap->keep_alive) - soap->fshutdownsocket(soap, (SOAP_SOCKET)soap->socket, 1); /* Send TCP FIN */ -#else - if (soap_valid_socket(soap->socket) && !soap->keep_alive) - soap->fshutdownsocket(soap, (SOAP_SOCKET)soap->socket, 1); /* Send TCP FIN */ -#endif - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "End of send message ok\n")); - soap->part = SOAP_END; - soap->count = 0; - return SOAP_OK; -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_end_recv(struct soap *soap) -{ soap->part = SOAP_END; -#ifndef WITH_LEANER - if ((soap->mode & SOAP_ENC_MIME) && soap_getmime(soap)) - return soap->error; - soap->mime.list = soap->mime.first; - soap->mime.first = NULL; - soap->mime.last = NULL; - soap->dime.list = soap->dime.first; - soap->dime.first = NULL; - soap->dime.last = NULL; -#endif - DBGLOG(TEST,SOAP_MESSAGE(fdebug, "End of receive message ok\n")); -#ifdef WITH_ZLIB - if (soap->mode & SOAP_ENC_ZLIB) - { soap->mode &= ~SOAP_ENC_ZLIB; - memcpy(soap->buf, soap->z_buf, SOAP_BUFLEN); - soap->bufidx = (char*)soap->d_stream.next_in - soap->z_buf; - soap->buflen = soap->z_buflen; - soap->zlib_state = SOAP_ZLIB_NONE; - if (inflateEnd(&soap->d_stream) != Z_OK) - return soap->error = SOAP_ZLIB_ERROR; -#ifdef WITH_GZIP - if (soap->zlib_in == SOAP_ZLIB_GZIP) - { soap_wchar c; - short i; - for (i = 0; i < 8; i++) - { if ((int)(c = soap_getchar(soap)) == EOF) - return soap->error = SOAP_EOF; - soap->z_buf[i] = (char)c; - } - if (soap->z_crc != ((uLong)(unsigned char)soap->z_buf[0] | ((uLong)(unsigned char)soap->z_buf[1] << 8) | ((uLong)(unsigned char)soap->z_buf[2] << 16) | ((uLong)(unsigned char)soap->z_buf[3] << 24))) - { DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Gzip error: crc check failed, message corrupted? (crc32=%lu)\n", (unsigned long)soap->z_crc)); - return soap->error = SOAP_ZLIB_ERROR; - } - if (soap->d_stream.total_out != ((uLong)(unsigned char)soap->z_buf[4] | ((uLong)(unsigned char)soap->z_buf[5] << 8) | ((uLong)(unsigned char)soap->z_buf[6] << 16) | ((uLong)(unsigned char)soap->z_buf[7] << 24))) - { DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Gzip error: incorrect message length\n")); - return soap->error = SOAP_ZLIB_ERROR; - } - } -#endif - } -#endif - if ((soap->mode & SOAP_IO) == SOAP_IO_CHUNK) - while ((int)soap_getchar(soap) != EOF) /* advance to last chunk */ - ; - if (soap->fdisconnect && (soap->error = soap->fdisconnect(soap))) - return soap->error; -#ifndef WITH_NOIDREF - return soap_resolve(soap); -#else - return SOAP_OK; -#endif -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_free(struct soap *soap) -{ register struct soap_nlist *np; - register struct soap_attribute *tp; - register struct Namespace *ns; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Free namespace stack\n")); - while (soap->nlist) - { np = soap->nlist->next; - if (soap->nlist->ns) - SOAP_FREE(soap->nlist->ns); - SOAP_FREE(soap->nlist); - soap->nlist = np; - } - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Free any remaining temp blocks\n")); - while (soap->blist) - soap_end_block(soap); - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Free attributes\n")); - while (soap->attributes) - { tp = soap->attributes->next; - if (soap->attributes->value) - SOAP_FREE(soap->attributes->value); - SOAP_FREE(soap->attributes); - soap->attributes = tp; - } -#ifdef WITH_FAST - if (soap->labbuf) - SOAP_FREE(soap->labbuf); - soap->labbuf = NULL; - soap->lablen = 0; - soap->labidx = 0; -#endif -#ifndef WITH_NOIDREF - soap_free_pht(soap); - soap_free_iht(soap); -#endif - ns = soap->local_namespaces; - if (ns) - { for (; ns->id; ns++) - { if (ns->out) - { SOAP_FREE(ns->out); - if (soap->encodingStyle == ns->out) - soap->encodingStyle = SOAP_STR_EOS; - ns->out = NULL; - } - if (soap->encodingStyle == ns->ns) - soap->encodingStyle = SOAP_STR_EOS; - } - SOAP_FREE(soap->local_namespaces); - soap->local_namespaces = NULL; - } -} -#endif - -/******************************************************************************/ -#ifdef SOAP_DEBUG -static void -soap_init_logs(struct soap *soap) -{ int i; - for (i = 0; i < SOAP_MAXLOGS; i++) - { soap->logfile[i] = NULL; - soap->fdebug[i] = NULL; - } -} -#endif - -/******************************************************************************/ -#if !defined(WITH_LEAN) || defined(SOAP_DEBUG) -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_open_logfile(struct soap *soap, int i) -{ if (soap->logfile[i]) - soap->fdebug[i] = fopen(soap->logfile[i], i < 2 ? "ab" : "a"); -} -#endif - -/******************************************************************************/ -#ifdef SOAP_DEBUG -static void -soap_close_logfile(struct soap *soap, int i) -{ if (soap->fdebug[i]) - { fclose(soap->fdebug[i]); - soap->fdebug[i] = NULL; - } -} -#endif - -/******************************************************************************/ -#ifdef SOAP_DEBUG -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_close_logfiles(struct soap *soap) -{ int i; - for (i = 0; i < SOAP_MAXLOGS; i++) - soap_close_logfile(soap, i); -} -#endif - -/******************************************************************************/ -#ifdef SOAP_DEBUG -static void -soap_set_logfile(struct soap *soap, int i, const char *logfile) -{ char *s = NULL; - soap_close_logfile(soap, i); - if (soap->logfile[i]) - SOAP_FREE((void*)soap->logfile[i]); - if (logfile) - if ((s = (char*)SOAP_MALLOC(strlen(logfile) + 1))) - strcpy(s, logfile); - soap->logfile[i] = s; -} -#endif - -/******************************************************************************/ -#ifdef SOAP_DEBUG -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_set_recv_logfile(struct soap *soap, const char *logfile) -{ soap_set_logfile(soap, SOAP_INDEX_RECV, logfile); -} -#endif - -/******************************************************************************/ -#ifdef SOAP_DEBUG -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_set_sent_logfile(struct soap *soap, const char *logfile) -{ soap_set_logfile(soap, SOAP_INDEX_SENT, logfile); -} -#endif - -/******************************************************************************/ -#ifdef SOAP_DEBUG -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_set_test_logfile(struct soap *soap, const char *logfile) -{ soap_set_logfile(soap, SOAP_INDEX_TEST, logfile); -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -struct soap* -SOAP_FMAC2 -soap_copy(struct soap *soap) -{ return soap_copy_context((struct soap*)SOAP_MALLOC(sizeof(struct soap)), soap); -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -struct soap* -SOAP_FMAC2 -soap_copy_context(struct soap *copy, struct soap *soap) -{ if (copy) - { register struct soap_plugin *p; - memcpy(copy, soap, sizeof(struct soap)); - copy->copy = 1; - copy->user = NULL; - copy->userid = NULL; - copy->passwd = NULL; - copy->nlist = NULL; - copy->blist = NULL; - copy->clist = NULL; - copy->alist = NULL; - copy->attributes = NULL; - copy->local_namespaces = NULL; - soap_set_local_namespaces(copy); -#ifndef WITH_NOIDREF - soap_init_iht(copy); - soap_init_pht(copy); -#endif - copy->header = NULL; - copy->fault = NULL; - copy->action = NULL; - *copy->host = '\0'; -#ifndef WITH_LEAN -#ifdef WITH_COOKIES - copy->cookies = soap_copy_cookies(soap); -#else - copy->cookies = NULL; -#endif -#endif -#ifdef SOAP_DEBUG - soap_init_logs(copy); - soap_set_recv_logfile(copy, "RECV.log"); - soap_set_sent_logfile(copy, "SENT.log"); - soap_set_test_logfile(copy, "TEST.log"); -#endif - copy->plugins = NULL; - for (p = soap->plugins; p; p = p->next) - { register struct soap_plugin *q = (struct soap_plugin*)SOAP_MALLOC(sizeof(struct soap_plugin)); - if (!q) - return NULL; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copying plugin '%s'\n", p->id)); - *q = *p; - if (p->fcopy && (soap->error = p->fcopy(soap, q, p))) - { SOAP_FREE(q); - return NULL; - } - q->next = copy->plugins; - copy->plugins = q; - } - } - else - soap->error = SOAP_EOM; - return copy; -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_init(struct soap *soap) -{ soap->version = 0; - soap_imode(soap, SOAP_IO_DEFAULT); - soap_omode(soap, SOAP_IO_DEFAULT); - soap->copy = 0; - soap->plugins = NULL; - soap->user = NULL; - soap->userid = NULL; - soap->passwd = NULL; -#ifndef WITH_NOHTTP - soap->fpost = http_post; - soap->fget = http_get; - soap->fposthdr = http_post_header; - soap->fresponse = http_response; - soap->fparse = http_parse; - soap->fparsehdr = http_parse_header; -#endif - soap->fconnect = NULL; - soap->fdisconnect = NULL; -#ifndef WITH_NOIO -#ifndef WITH_IPV6 - soap->fresolve = tcp_gethost; -#else - soap->fresolve = NULL; -#endif - soap->faccept = tcp_accept; - soap->fopen = tcp_connect; - soap->fclose = tcp_disconnect; - soap->fclosesocket = tcp_closesocket; - soap->fshutdownsocket = tcp_shutdownsocket; - soap->fsend = fsend; - soap->frecv = frecv; - soap->fpoll = soap_poll; -#else - soap->fopen = NULL; - soap->fclose = NULL; - soap->fpoll = NULL; -#endif -#ifndef WITH_LEANER - soap->fprepareinit = NULL; - soap->fpreparesend = NULL; - soap->fpreparerecv = NULL; -#endif - soap->fignore = NULL; - soap->fserveloop = NULL; - soap->fplugin = fplugin; -#ifndef WITH_LEANER - soap->fdimereadopen = NULL; - soap->fdimewriteopen = NULL; - soap->fdimereadclose = NULL; - soap->fdimewriteclose = NULL; - soap->fdimeread = NULL; - soap->fdimewrite = NULL; -#endif - soap->float_format = "%.8g"; /* .8 preserves single FP precision as much as possible, but might not be very efficient */ - soap->double_format = "%.17lg"; /* .17 preserves double FP precision as much as possible, but might not be very efficient */ - soap->dime_id_format = "cid:id%d"; /* default DIME id format */ - soap->http_version = "1.1"; - soap->actor = NULL; - soap->max_keep_alive = SOAP_MAXKEEPALIVE; - soap->keep_alive = 0; - soap->recv_timeout = 0; - soap->send_timeout = 0; - soap->connect_timeout = 0; - soap->accept_timeout = 0; - soap->socket_flags = 0; - soap->connect_flags = 0; - soap->bind_flags = 0; - soap->accept_flags = 0; - soap->ip = 0; -#ifdef WITH_FAST - soap->labbuf = NULL; - soap->lablen = 0; - soap->labidx = 0; -#endif - soap->encodingStyle = SOAP_STR_EOS; -#ifndef WITH_NONAMESPACES - soap->namespaces = namespaces; -#else - soap->namespaces = NULL; -#endif - soap->local_namespaces = NULL; - soap->nlist = NULL; - soap->blist = NULL; - soap->clist = NULL; - soap->alist = NULL; - soap->attributes = NULL; - soap->header = NULL; - soap->fault = NULL; - soap->master = SOAP_INVALID_SOCKET; - soap->socket = SOAP_INVALID_SOCKET; - soap->os = NULL; - soap->is = NULL; -#ifndef WITH_LEANER - soap->dom = NULL; - soap->dime.list = NULL; - soap->dime.first = NULL; - soap->dime.last = NULL; - soap->mime.list = NULL; - soap->mime.first = NULL; - soap->mime.last = NULL; - soap->mime.boundary = NULL; - soap->mime.start = NULL; -#endif -#ifndef UNDER_CE - soap->recvfd = 0; - soap->sendfd = 1; -#else - soap->recvfd = stdin; - soap->sendfd = stdout; -#endif - soap->host[0] = '\0'; - soap->port = 0; - soap->action = NULL; - soap->proxy_host = NULL; - soap->proxy_port = 8080; - soap->proxy_userid = NULL; - soap->proxy_passwd = NULL; - soap->authrealm = NULL; - soap->prolog = NULL; -#ifdef WITH_OPENSSL - soap->fsslauth = ssl_auth_init; - soap->fsslverify = ssl_verify_callback; - soap->bio = NULL; - soap->ssl = NULL; - soap->ctx = NULL; - soap->require_server_auth = 0; - soap->require_client_auth = 0; - soap->rsa = 0; - soap->keyfile = NULL; - soap->password = NULL; - soap->dhfile = NULL; - soap->cafile = NULL; - soap->capath = NULL; - soap->randfile = NULL; - soap->session = NULL; -#endif -#ifdef WITH_ZLIB - soap->zlib_state = SOAP_ZLIB_NONE; - soap->zlib_in = SOAP_ZLIB_NONE; - soap->zlib_out = SOAP_ZLIB_NONE; - soap->d_stream.zalloc = NULL; - soap->d_stream.zfree = NULL; - soap->d_stream.opaque = NULL; - soap->z_level = 6; -#endif -#ifndef WITH_LEAN - soap->cookies = NULL; - soap->cookie_domain = NULL; - soap->cookie_path = NULL; - soap->cookie_max = 32; -#endif -#ifdef SOAP_DEBUG - soap_init_logs(soap); - soap_set_recv_logfile(soap, "RECV.log"); - soap_set_sent_logfile(soap, "SENT.log"); - soap_set_test_logfile(soap, NULL); -#endif -/* WR[ */ -#ifdef WMW_RPM_IO - soap->rpmreqid = NULL; -#endif /* WMW_RPM_IO */ -/* ]WR */ -#ifdef PALM - palmNetLibOpen(); -#endif -#ifndef WITH_NOIDREF - soap_init_iht(soap); - soap_init_pht(soap); -#endif - soap_begin(soap); -#ifdef SOAP_DEBUG - soap_set_test_logfile(soap, "TEST.log"); -#endif -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_init1(struct soap *soap, soap_mode mode) -{ soap_init2(soap, mode, mode); -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_init2(struct soap *soap, soap_mode imode, soap_mode omode) -{ soap_init(soap); - soap_imode(soap, imode); - soap_omode(soap, omode); -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_begin(struct soap *soap) -{ DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Initializing\n")); - if (!soap->keep_alive) - { soap->buflen = 0; - soap->bufidx = 0; - } - soap->keep_alive = (((soap->imode | soap->omode) & SOAP_IO_KEEPALIVE) != 0); - soap->null = 0; - soap->position = 0; - soap->encoding = 0; - soap->mustUnderstand = 0; - soap->mode = 0; - soap->ns = 0; - soap->part = SOAP_BEGIN; - soap->alloced = 0; - soap->count = 0; - soap->length = 0; - soap->cdata = 0; - soap->error = SOAP_OK; - soap->peeked = 0; - soap->ahead = 0; - soap->idnum = 0; - soap->level = 0; - soap->endpoint[0] = '\0'; -#ifndef WITH_LEANER - soap->dime.chunksize = 0; - soap->dime.buflen = 0; -#endif - soap_free(soap); -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_end(struct soap *soap) -{ register struct soap_clist *cp; - soap_free(soap); - soap_dealloc(soap, NULL); - while (soap->clist) - { cp = soap->clist->next; - SOAP_FREE(soap->clist); - soap->clist = cp; - } - soap_closesock(soap); -#ifdef SOAP_DEBUG - soap_close_logfiles(soap); -#endif -#ifdef PALM - palmNetLibClose(); -#endif -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_set_namespaces(struct soap *soap, struct Namespace *p) -{ struct Namespace *ns = soap->local_namespaces; - struct soap_nlist *np, *nq, *nr; - unsigned int level = soap->level; - soap->namespaces = p; - soap->local_namespaces = NULL; - soap_set_local_namespaces(soap); - /* reverse the list */ - np = soap->nlist; - soap->nlist = NULL; - if (np) - { nq = np->next; - np->next = NULL; - while (nq) - { nr = nq->next; - nq->next = np; - np = nq; - nq = nr; - } - } - while (np) - { soap->level = np->level; /* preserve element nesting level */ - if (np->ns) - { if (soap_push_namespace(soap, np->id, np->ns)) - return soap->error; - } - else if (np->index >= 0 && ns) - { if (ns[np->index].out) - { if (soap_push_namespace(soap, np->id, ns[np->index].out)) - return soap->error; - } - else if (soap_push_namespace(soap, np->id, ns[np->index].ns)) - return soap->error; - } - if (np->ns) - SOAP_FREE(np->ns); - nq = np; - np = np->next; - SOAP_FREE(nq); - } - if (ns) - { int i; - for (i = 0; ns[i].id; i++) - { if (ns[i].out) - { SOAP_FREE(ns[i].out); - ns[i].out = NULL; - } - } - SOAP_FREE(ns); - } - soap->level = level; /* restore level */ - return SOAP_OK; -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -static void -soap_set_local_namespaces(struct soap *soap) -{ if (soap->namespaces && !soap->local_namespaces) - { register const struct Namespace *ns1; - register struct Namespace *ns2; - register size_t n = 1; - for (ns1 = soap->namespaces; ns1->id; ns1++) - n++; - n *= sizeof(struct Namespace); - ns2 = (struct Namespace*)SOAP_MALLOC(n); - if (ns2) - { memcpy(ns2, soap->namespaces, n); - if (ns2[0].ns) - { if (!strcmp(ns2[0].ns, soap_env1)) - soap->version = 1; - else - soap->version = 2; - } - soap->local_namespaces = ns2; - } - } -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_element(struct soap *soap, const char *tag, int id, const char *type) -{ struct Namespace *ns = soap->local_namespaces; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Element begin tag='%s' id='%d' type='%s'\n", tag, id, type?type:"")); -/**/ -#ifdef WITH_DOM - if (soap->mode & SOAP_XML_DOM) - { register struct soap_dom_element *p, *e = (struct soap_dom_element*)soap_malloc(soap, sizeof(struct soap_dom_element)); - e->next = NULL; - e->prnt = soap->dom; - e->nstr = NULL; - e->name = soap_strdup(soap, tag); /* check EOM? */ - e->data = NULL; - e->type = 0; - e->node = NULL; - e->elts = NULL; - e->atts = NULL; - if (soap->dom) - { p = soap->dom->elts; - if (p) - { while (p->next) - p = p->next; - p->next = e; - } - else - soap->dom->elts = e; - } - soap->dom = e; - } - else -#endif -{ - soap->level++; - if (!soap->ns && !(soap->mode & SOAP_XML_CANONICAL)) - if (soap_send(soap, soap->prolog ? soap->prolog : "")) - return soap->error; - if (soap_send_raw(soap, "<", 1) - || soap_send(soap, tag)) - return soap->error; -} -/**/ - if (!soap->ns) - { for (ns = soap->local_namespaces; ns && ns->id; ns++) - { if (*ns->id && (ns->out || ns->ns)) - { sprintf(soap->tmpbuf, "xmlns:%s", ns->id); - if (soap_attribute(soap, soap->tmpbuf, ns->out ? ns->out : ns->ns)) - return soap->error; - } - } - soap->ns = 1; - } - if (id > 0) - { sprintf(soap->tmpbuf, "_%d", id); - if (soap_attribute(soap, "id", soap->tmpbuf)) - return soap->error; - } - if (type && *type) - { if (soap_attribute(soap, "xsi:type", type)) - return soap->error; - } - if (soap->null && soap->position > 0) - { int i; - sprintf(soap->tmpbuf, "[%d", soap->positions[0]); - for (i = 1; i < soap->position; i++) - sprintf(soap->tmpbuf + strlen(soap->tmpbuf), ",%d", soap->positions[i]); - strcat(soap->tmpbuf, "]"); - if (soap_attribute(soap, "SOAP-ENC:position", soap->tmpbuf)) - return soap->error; - } - if (soap->mustUnderstand) - { if (soap->actor && *soap->actor) - { if (soap_attribute(soap, soap->version == 2 ? "SOAP-ENV:role" : "SOAP-ENV:actor", soap->actor)) - return soap->error; - } - if (soap_attribute(soap, "SOAP-ENV:mustUnderstand", soap->version == 2 ? "true" : "1")) - return soap->error; - soap->mustUnderstand = 0; - } - if (soap->encoding) - { if (soap->encodingStyle && soap->local_namespaces) - { if (!*soap->encodingStyle) - { if (soap->local_namespaces[1].out) - soap->encodingStyle = soap->local_namespaces[1].out; - else - soap->encodingStyle = soap->local_namespaces[1].ns; - } - if (soap_attribute(soap, "SOAP-ENV:encodingStyle", soap->encodingStyle)) - return soap->error; - } - soap->encoding = 0; - } - soap->null = 0; - soap->position = 0; - return SOAP_OK; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_element_begin_out(struct soap *soap, const char *tag, int id, const char *type) -{ if (*tag == '-') - return SOAP_OK; - if (soap_element(soap, tag, id, type)) - return soap->error; - return soap_element_start_end_out(soap, NULL); -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -#ifndef HAVE_STRRCHR -SOAP_FMAC1 -char* -SOAP_FMAC2 -soap_strrchr(const char *s, int t) -{ register char *r = NULL; - while (*s) - if (*s++ == t) - r = (char*)s - 1; - return r; -} -#endif -#endif - -/******************************************************************************/ -#ifndef PALM_2 -#ifndef HAVE_STRTOL -SOAP_FMAC1 -long -SOAP_FMAC2 -soap_strtol(const char *s, char **t, int b) -{ register long n = 0; - register int c; - while (*s > 0 && *s <= 32) - s++; - if (b == 10) - { short neg = 0; - if (*s == '-') - { s++; - neg = 1; - } - else if (*s == '+') - s++; - while ((c = *s) && c >= '0' && c <= '9') - { if (n > 214748364) - break; - n *= 10; - n += c - '0'; - s++; - } - if (neg) - n = -n; - } - else /* b == 16 and value is always positive */ - { while ((c = *s)) - { if (c >= '0' && c <= '9') - c -= '0'; - else if (c >= 'A' && c <= 'F') - c -= 'A' - 10; - else if (c >= 'a' && c <= 'f') - c -= 'a' - 10; - if (n > 0x07FFFFFF) - break; - n <<= 4; - n += c; - s++; - } - } - if (t) - *t = (char*)s; - return n; -} -#endif -#endif - -/******************************************************************************/ -#ifndef PALM_2 -#ifndef HAVE_STRTOUL -SOAP_FMAC1 -unsigned long -SOAP_FMAC2 -soap_strtoul(const char *s, char **t, int b) -{ unsigned long n = 0; - register int c; - while (*s > 0 && *s <= 32) - s++; - if (b == 10) - { if (*s == '+') - s++; - while ((c = *s) && c >= '0' && c <= '9') - { if (n > 429496729) - break; - n *= 10; - n += c - '0'; - s++; - } - } - else /* b == 16 */ - { while ((c = *s)) - { if (c >= '0' && c <= '9') - c -= '0'; - else if (c >= 'A' && c <= 'F') - c -= 'A' - 10; - else if (c >= 'a' && c <= 'f') - c -= 'a' - 10; - if (n > 0x0FFFFFFF) - break; - n <<= 4; - n += c; - s++; - } - } - if (t) - *t = (char*)s; - return n; -} -#endif -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_array_begin_out(struct soap *soap, const char *tag, int id, const char *type, const char *offset) -{ if (soap_element(soap, tag, id, "SOAP-ENC:Array")) - return soap->error; - if (soap->version == 2) - { const char *s; - s = soap_strrchr(type, '['); - if ((size_t)(s - type) < sizeof(soap->tmpbuf)) - { strncpy(soap->tmpbuf, type, s - type); - soap->tmpbuf[s - type] = '\0'; - if (type && *type && (soap_attribute(soap, "SOAP-ENC:itemType", soap->tmpbuf))) - return soap->error; - if (s && (soap_attribute(soap, "SOAP-ENC:arraySize", s + 1))) - return soap->error; - } - } - else - { if (offset && (soap_attribute(soap, "SOAP-ENC:offset", offset))) - return soap->error; - if (type && *type && (soap_attribute(soap, "SOAP-ENC:arrayType", type))) - return soap->error; - } - return soap_element_start_end_out(soap, NULL); -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_element_start_end_out(struct soap *soap, const char *tag) -{ register struct soap_attribute *tp; -/**/ -#ifdef WITH_DOM - if ((soap->mode & SOAP_XML_DOM) && soap->dom) - { for (tp = soap->attributes; tp; tp = tp->next) - { if (tp->visible) - { register struct soap_dom_attribute *a = (struct soap_dom_attribute*)soap_malloc(soap, sizeof(struct soap_dom_attribute)); - a->next = soap->dom->atts; - a->nstr = NULL; - a->name = soap_strdup(soap, tp->name); /* check EOM */ - a->data = soap_strdup(soap, tp->value); /* check EOM */ - a->wide = NULL; - soap->dom->atts = a; - tp->visible = 0; - } - } - return SOAP_OK; - } -#endif -/**/ - for (tp = soap->attributes; tp; tp = tp->next) - { if (tp->visible) - { if (soap_send(soap, " ") || soap_send(soap, tp->name)) - return soap->error; - if (tp->visible == 2 && tp->value) - if (soap_send_raw(soap, "=\"", 2) - || soap_string_out(soap, tp->value, 1) - || soap_send_raw(soap, "\"", 1)) - return soap->error; - tp->visible = 0; - } - } - if (tag) - { soap->level--; -#ifndef WITH_LEAN - if (soap->mode & SOAP_XML_CANONICAL) - { if (soap_send_raw(soap, ">", 1) - || soap_element_end_out(soap, tag)) - return soap->error; - return SOAP_OK; - } -#endif - return soap_send_raw(soap, "/>", 2); - } - return soap_send_raw(soap, ">", 1); -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_element_end_out(struct soap *soap, const char *tag) -{ if (*tag == '-') - return SOAP_OK; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Element ending tag='%s'\n", tag)); -/**/ -#ifdef WITH_DOM - if ((soap->mode & SOAP_XML_DOM) && soap->dom) - { if (soap->dom->prnt) - soap->dom = soap->dom->prnt; - return SOAP_OK; - } -#endif -/**/ - soap->level--; - if (soap_send_raw(soap, "error; - return soap_send_raw(soap, ">", 1); -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_element_ref(struct soap *soap, const char *tag, int id, int href) -{ register int n = 0; - if (soap->version == 2) - n = 1; - sprintf(soap->href, "#_%d", href); - return soap_element_href(soap, tag, id, "href" + n, soap->href + n); -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_element_href(struct soap *soap, const char *tag, int id, const char *ref, const char *val) -{ DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Element '%s' reference %s='%s'\n", tag, ref, val)); - if (soap_element(soap, tag, id, NULL) - || soap_attribute(soap, ref, val) - || soap_element_start_end_out(soap, tag)) - return soap->error; - return SOAP_OK; -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_element_null(struct soap *soap, const char *tag, int id, const char *type) -{ struct soap_attribute *tp; - for (tp = soap->attributes; tp; tp = tp->next) - if (tp->visible) - break; - if (tp || (soap->version == 2 && soap->position > 0) || id > 0 || (soap->mode & SOAP_XML_NIL)) - { if (soap_element(soap, tag, id, type)) - return soap->error; - if (soap->part != SOAP_IN_HEADER && soap->encodingStyle) - if (soap_attribute(soap, "xsi:nil", "true")) - return soap->error; - return soap_element_start_end_out(soap, tag); - } - soap->null = 1; - soap->position = 0; - soap->mustUnderstand = 0; - return SOAP_OK; -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_element_id(struct soap *soap, const char *tag, int id, const void *p, const struct soap_array *a, int n, const char *type, int t) -{ if (!p || (a && !a->__ptr)) - { soap_element_null(soap, tag, id, type); - return -1; - } -#ifndef WITH_NOIDREF - if (soap->mode & SOAP_XML_TREE) - return 0; - if (id < 0) - { struct soap_plist *pp; - if (a) - id = soap_array_pointer_lookup(soap, p, a, n, t, &pp); - else - id = soap_pointer_lookup(soap, p, t, &pp); - if (id) - { if (soap_is_embedded(soap, pp)) - { soap_element_ref(soap, tag, 0, id); - return -1; - } - if (soap_is_single(soap, pp)) - return 0; - soap_set_embedded(soap, pp); - } - } - return id; -#else - return 0; -#endif -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_element_result(struct soap *soap, const char *tag) -{ if (soap->version == 2 && soap->encodingStyle) - if (soap_element(soap, "SOAP-RPC:result", 0, NULL) - || soap_attribute(soap, "xmlns:SOAP-RPC", soap_rpc) - || soap_element_start_end_out(soap, NULL) - || soap_string_out(soap, tag, 0) - || soap_element_end_out(soap, "SOAP-RPC:result")) - return soap->error; - return SOAP_OK; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_attribute(struct soap *soap, const char *name, const char *value) -{ -/**/ -#ifdef WITH_DOM - if ((soap->mode & SOAP_XML_DOM) && soap->dom) - { register struct soap_dom_attribute *a = (struct soap_dom_attribute*)soap_malloc(soap, sizeof(struct soap_dom_attribute)); - a->next = soap->dom->atts; - a->nstr = NULL; - a->name = soap_strdup(soap, name); /* check EOM */ - a->data = soap_strdup(soap, value); /* check EOM */ - a->wide = NULL; - soap->dom->atts = a; - return SOAP_OK; - } -#endif -/**/ -#ifndef WITH_LEAN - if (soap->mode & SOAP_XML_CANONICAL) - { if (soap_set_attr(soap, name, value)) - return soap->error; - } - else -#endif - { if (soap_send(soap, " ") || soap_send(soap, name)) - return soap->error; - if (value) - if (soap_send_raw(soap, "=\"", 2) - || soap_string_out(soap, value, 1) - || soap_send_raw(soap, "\"", 1)) - return soap->error; - } - return SOAP_OK; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_element_begin_in(struct soap *soap, const char *tag, int nillable) -{ if (!soap_peek_element(soap)) - { if (soap->other) - return soap->error = SOAP_TAG_MISMATCH; - if (tag && *tag == '-') - return SOAP_OK; - if (!(soap->error = soap_match_tag(soap, soap->tag, tag))) - { soap->peeked = 0; - if (soap->body) - soap->level++; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Begin element found (level=%u) '%s'='%s'\n", soap->level, soap->tag, tag?tag:"" )); - if (!nillable && soap->null && (soap->mode & SOAP_XML_STRICT)) - return soap->error = SOAP_NULL; - } - } - return soap->error; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_element_end_in(struct soap *soap, const char *tag) -{ register soap_wchar c; - register char *s; - register const char *t; - register int n = 0; - if (tag && *tag == '-') - return SOAP_OK; - soap->level--; - soap_pop_namespace(soap); - if (soap->error == SOAP_NO_TAG) - soap->error = SOAP_OK; - if (soap->peeked && *soap->tag) - n++; - soap->peeked = 0; - do - { while (((c = soap_get(soap)) != SOAP_TT)) - { if ((int)c == EOF) - return soap->error = SOAP_EOF; - if (c == SOAP_LT) - n++; - } - } while (n--); - s = soap->tag; - do c = soap_get(soap); - while (soap_blank(c)); - do - { *s++ = (char)c; - c = soap_get(soap); - } while (soap_notblank(c)); - *s = '\0'; - if ((int)c == EOF) - return soap->error = SOAP_EOF; - while (soap_blank(c)) - c = soap_get(soap); - if (c != SOAP_GT) - return soap->error = SOAP_SYNTAX_ERROR; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "End element found (level=%u) '%s'='%s'\n", soap->level, soap->tag, tag?tag:"")); - if (!tag) - return SOAP_OK; - if ((s = strchr(soap->tag, ':'))) - s++; - else - s = soap->tag; - if ((t = strchr(tag, ':'))) - t++; - else - t = tag; - if (!SOAP_STRCMP(s, t)) - return SOAP_OK; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "End element tag name does not match\n")); - return soap->error = SOAP_SYNTAX_ERROR; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -const char * -SOAP_FMAC2 -soap_attr_value(struct soap *soap, const char *name, int flag) -{ register struct soap_attribute *tp; - for (tp = soap->attributes; tp; tp = tp->next) - if (!soap_match_tag(soap, tp->name, name)) - break; - if (tp && tp->visible == 2) - { if (flag == 2 && (soap->mode & SOAP_XML_STRICT)) - soap->error = SOAP_PROHIBITED; - else - return tp->value; - } - else if (flag == 1 && (soap->mode & SOAP_XML_STRICT)) - soap->error = SOAP_REQUIRED; - return NULL; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_set_attr(struct soap *soap, const char *name, const char *value) -{ register struct soap_attribute *tp; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Set attribute %s='%s'\n", name, value?value:"")); - for (tp = soap->attributes; tp; tp = tp->next) - if (!strcmp(tp->name, name)) - break; - if (!tp) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Allocate attribute %s\n", name)); - if (!(tp = (struct soap_attribute*)SOAP_MALLOC(sizeof(struct soap_attribute) + strlen(name)))) - return soap->error = SOAP_EOM; - tp->ns = NULL; -#ifndef WITH_LEAN - if (soap->mode & SOAP_XML_CANONICAL) - { struct soap_attribute **tpp = &soap->attributes; - const char *s = strchr(name, ':'); - if (!strncmp(name, "xmlns", 5)) - { for (; *tpp; tpp = &(*tpp)->next) - if (strncmp((*tpp)->name, "xmlns", 5) || strcmp((*tpp)->name + 5, name + 5) > 0) - break; - } - else if (!s) - { for (; *tpp; tpp = &(*tpp)->next) - if (strncmp((*tpp)->name, "xmlns", 5) && ((*tpp)->ns || strcmp((*tpp)->name, name) > 0)) - break; - } - else - { int k; - for (; *tpp; tpp = &(*tpp)->next) - { if (!strncmp((*tpp)->name, "xmlns:", 6) && !strncmp((*tpp)->name + 6, name, s - name) && !(*tpp)->name[6 + s - name]) - { if (!tp->ns) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Canonicalization: prefix %s=%p(%s)\n", name, (*tpp)->ns, (*tpp)->ns)); - tp->ns = (*tpp)->ns; - } - } - else if (strncmp((*tpp)->name, "xmlns", 5) && (*tpp)->ns && tp->ns && ((k = strcmp((*tpp)->ns, tp->ns)) > 0 || (!k && strcmp((*tpp)->name, name) > 0))) - break; - } - } - tp->next = *tpp; - *tpp = tp; - } - else -#endif - { tp->next = soap->attributes; - soap->attributes = tp; - } - strcpy(tp->name, name); - tp->value = NULL; - } - else if (value && tp->value && tp->size <= strlen(value)) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Free attribute value of %s (free %p)\n", name, tp->value)); - SOAP_FREE(tp->value); - tp->value = NULL; - tp->ns = NULL; - } - if (value) - { if (!tp->value) - { tp->size = strlen(value) + 1; - if (!(tp->value = (char*)SOAP_MALLOC(tp->size))) - return soap->error = SOAP_EOM; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Allocate attribute value of %s (%p)\n", tp->name, tp->value)); - } - strcpy(tp->value, value); - if (!strncmp(tp->name, "xmlns:", 6)) - tp->ns = tp->value; - tp->visible = 2; - } - else - tp->visible = 1; - return SOAP_OK; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_clr_attr(struct soap *soap) -{ register struct soap_attribute *tp; -#ifndef WITH_LEAN - if (soap->mode & SOAP_XML_CANONICAL) - { while (soap->attributes) - { tp = soap->attributes->next; - SOAP_FREE(soap->attributes->value); - SOAP_FREE(soap->attributes); - soap->attributes = tp; - } - } - else -#endif - { for (tp = soap->attributes; tp; tp = tp->next) - tp->visible = 0; - } -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -static int -soap_getattrval(struct soap *soap, char *s, size_t n, soap_wchar d) -{ size_t i; - soap_wchar c; - for (i = 0; i < n; i++) - { c = soap_getutf8(soap); - switch (c) - { - case SOAP_TT: - *s++ = '<'; - soap_unget(soap, '/'); - break; - case SOAP_LT: - *s++ = '<'; - break; - case SOAP_GT: - if (d == ' ') - { soap_unget(soap, c); - *s = '\0'; - return SOAP_OK; - } - *s++ = '>'; - break; - case SOAP_QT: - if (c == d) - { *s = '\0'; - return SOAP_OK; - } - *s++ = '"'; - break; - case SOAP_AP: - if (c == d) - { *s = '\0'; - return SOAP_OK; - } - *s++ = '\''; - break; - case '\t': - case '\n': - case '\r': - case ' ': - case '/': - if (d == ' ') - { soap_unget(soap, c); - *s = '\0'; - return SOAP_OK; - } - default: - if ((int)c == EOF) - return soap->error = SOAP_EOF; - *s++ = (char)c; - } - } - return soap->error = SOAP_EOM; -} -#endif - -/******************************************************************************/ -#ifdef WITH_FAST -#ifndef PALM_2 -static int -soap_append_lab(struct soap *soap, const char *s, size_t n) -{ if (soap->labidx + n >= soap->lablen) - { register char *t = soap->labbuf; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Enlarging look-aside buffer to append data, old size=%lu", (unsigned long)soap->lablen)); - if (soap->lablen == 0) - soap->lablen = SOAP_LABLEN; - while (soap->labidx + n >= soap->lablen) - soap->lablen <<= 1; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, ", new size=%lu\n", (unsigned long)soap->lablen)); - soap->labbuf = (char*)SOAP_MALLOC(soap->lablen); - if (!soap->labbuf) - { if (t) - free(t); - return soap->error = SOAP_EOM; - } - if (t && soap->labidx) - { memcpy(soap->labbuf, t, soap->labidx); - free(t); - } - } - if (s) - { memcpy(soap->labbuf + soap->labidx, s, n); - soap->labidx += n; - } - return SOAP_OK; -} -#endif -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_peek_element(struct soap *soap) -{ register struct soap_attribute *tp; - const char *t; - register char *s; - register soap_wchar c; - register int i; - if (soap->peeked) - { if (!*soap->tag) - return soap->error = SOAP_NO_TAG; - return SOAP_OK; - } - soap->peeked = 1; - for (;;) - { c = soap_getutf8(soap); - if (c == SOAP_BOM) - c = soap_getutf8(soap); - while (soap_blank(c)) - c = soap_getutf8(soap); - if ((int)c == EOF) - return soap->error = SOAP_EOF; - if (c != SOAP_LT) - { *soap->tag = '\0'; - soap_unget(soap, c); - return soap->error = SOAP_NO_TAG; - } - s = soap->tag; - do c = soap_get(soap); - while (soap_blank(c)); - i = sizeof(soap->tag); - while (c != '/' && soap_notblank(c)) - { if (--i > 0) - *s++ = (char)c; - c = soap_get(soap); - } - while (soap_blank(c)) - c = soap_get(soap); - *s = '\0'; - if (*soap->tag != '?') - break; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "XML PI <%s?>\n", soap->tag)); - while ((int)c != EOF && c != SOAP_GT && c != '?') - { s = soap->tmpbuf; - i = sizeof(soap->tmpbuf) - 2; - while (c != '=' && c != SOAP_GT && c != '?' && soap_notblank(c)) - { if (--i > 0) - *s++ = (char)c; - c = soap_get(soap); - } - while (soap_blank(c)) - c = soap_get(soap); - if (c == '=') - { *s++ = '='; - do c = soap_get(soap); - while (soap_blank(c)); - if (c != SOAP_QT && c != SOAP_AP) - { soap_unget(soap, c); - c = ' '; /* blank delimiter */ - } - if (soap_getattrval(soap, s, i, c) == SOAP_EOM) - while (soap_getattrval(soap, soap->tmpbuf, sizeof(soap->tmpbuf), c) == SOAP_EOM) - ; - else if (!strcmp(soap->tag, "?xml") && (!soap_tag_cmp(soap->tmpbuf, "encoding=iso-8859-1") || !soap_tag_cmp(soap->tmpbuf, "encoding=latin1"))) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "XML latin1 encoding\n")); - soap->mode |= SOAP_ENC_LATIN; - } - } - do c = soap_get(soap); - while (soap_blank(c)); - } - } - soap->id[0] = '\0'; - soap->href[0] = '\0'; - soap->type[0] = '\0'; - soap->arrayType[0] = '\0'; - soap->arraySize[0] = '\0'; - soap->arrayOffset[0] = '\0'; - soap->other = 0; - soap->root = -1; - soap->position = 0; - soap->null = 0; - soap->mustUnderstand = 0; - soap_clr_attr(soap); - while ((int)c != EOF && c != SOAP_GT && c != '/') - { s = soap->tmpbuf; - i = sizeof(soap->tmpbuf); - while (c != '=' && c != '/' && soap_notblank(c)) - { if (--i > 0) - *s++ = (char)c; - c = soap_get(soap); - } - *s = '\0'; - if (i == sizeof(soap->tmpbuf)) - return soap->error = SOAP_SYNTAX_ERROR; - if (!strncmp(soap->tmpbuf, "xmlns:", 6)) - { soap->tmpbuf[5] = '\0'; - t = soap->tmpbuf + 6; - } - else if (!strcmp(soap->tmpbuf, "xmlns")) - t = SOAP_STR_EOS; - else - t = NULL; - for (tp = soap->attributes; tp; tp = tp->next) - if (!SOAP_STRCMP(tp->name, soap->tmpbuf)) - break; - if (!tp) - { tp = (struct soap_attribute*)SOAP_MALLOC(sizeof(struct soap_attribute) + strlen(soap->tmpbuf)); - if (!tp) - return soap->error = SOAP_EOM; - strcpy(tp->name, soap->tmpbuf); - tp->value = NULL; - tp->size = 0; - tp->next = soap->attributes; - soap->attributes = tp; - } - while (soap_blank(c)) - c = soap_get(soap); - if (c == '=') - { do c = soap_get(soap); - while (soap_blank(c)); - if (c != SOAP_QT && c != SOAP_AP) - { soap_unget(soap, c); - c = ' '; /* blank delimiter */ - } - if (soap_getattrval(soap, tp->value, tp->size, c)) - { -#ifdef WITH_FAST - if (soap->error != SOAP_EOM) - return soap->error; - soap->error = SOAP_OK; - soap->labidx = 0; - if (soap_append_lab(soap, tp->value, tp->size)) - return soap->error; - SOAP_FREE(tp->value); - for (;;) - { if (soap_getattrval(soap, soap->labbuf + soap->labidx, soap->lablen - soap->labidx, c)) - { if (soap->error != SOAP_EOM) - return soap->error; - soap->error = SOAP_OK; - soap->labidx = soap->lablen; - if (soap_append_lab(soap, NULL, 0)) - return soap->error; - } - else - break; - } - tp->size = soap->lablen; - if (!(tp->value = (char*)SOAP_MALLOC(tp->size))) - return soap->error = SOAP_EOM; - memcpy(tp->value, soap->labbuf, soap->lablen); -#else - size_t n; - if (soap->error != SOAP_EOM) - return soap->error; - soap->error = SOAP_OK; - if (soap_new_block(soap)) - return soap->error; - for (;;) - { if (!(s = (char*)soap_push_block(soap, SOAP_BLKLEN))) - return soap->error; - if (soap_getattrval(soap, s, SOAP_BLKLEN, c)) - { if (soap->error != SOAP_EOM) - return soap->error; - soap->error = SOAP_OK; - } - else - break; - } - n = tp->size + soap->blist->size; - if (!(s = (char*)SOAP_MALLOC(n))) - return soap->error = SOAP_EOM; - if (tp->value) - { memcpy(s, tp->value, tp->size); - SOAP_FREE(tp->value); - } - soap_save_block(soap, s + tp->size, 0); - tp->value = s; - tp->size = n; -#endif - } - do c = soap_get(soap); - while (soap_blank(c)); - tp->visible = 2; /* seen this attribute w/ value */ - } - else - tp->visible = 1; /* seen this attribute w/o value */ - if (t && tp->value) - { if (soap_push_namespace(soap, t, tp->value)) - return soap->error; - tp->visible = 0; - } - } - if ((int)c == EOF) - return soap->error = SOAP_EOF; - for (tp = soap->attributes; tp; tp = tp->next) - { if (tp->visible && tp->value) - { if (!strcmp(tp->name, "id")) - { *soap->id = '#'; - strncpy(soap->id + 1, tp->value, sizeof(soap->id) - 2); - soap->id[sizeof(soap->id)-1] = '\0'; - } - else if (!strcmp(tp->name, "href")) - { strncpy(soap->href, tp->value, sizeof(soap->href) - 1); - soap->href[sizeof(soap->href)-1] = '\0'; - } - else if ((soap->version == 2 || (soap->mode & SOAP_XML_GRAPH)) && !strcmp(tp->name, "ref")) - { *soap->href = '#'; - strncpy(soap->href + 1, tp->value, sizeof(soap->href) - 2); - soap->href[sizeof(soap->href)-1] = '\0'; - } - else if (!soap_match_tag(soap, tp->name, "xsi:type")) - { strncpy(soap->type, tp->value, sizeof(soap->type) - 1); - soap->type[sizeof(soap->type)-1] = '\0'; - } - else if (soap->version == 1 && !soap_match_tag(soap, tp->name, "SOAP-ENC:arrayType")) - { s = soap_strrchr(tp->value, '['); - if (s && (size_t)(s - tp->value) < sizeof(soap->arrayType)) - { strncpy(soap->arrayType, tp->value, s - tp->value); - soap->arrayType[s - tp->value] = '\0'; - strncpy(soap->arraySize, s, sizeof(soap->arraySize) - 1); - } - else - strncpy(soap->arrayType, tp->value, sizeof(soap->arrayType) - 1); - soap->arraySize[sizeof(soap->arrayType)-1] = '\0'; - soap->arrayType[sizeof(soap->arrayType)-1] = '\0'; - } - else if (soap->version == 2 && !soap_match_tag(soap, tp->name, "SOAP-ENC:itemType")) - strncpy(soap->arrayType, tp->value, sizeof(soap->arrayType) - 1); - else if (soap->version == 2 && !soap_match_tag(soap, tp->name, "SOAP-ENC:arraySize")) - strncpy(soap->arraySize, tp->value, sizeof(soap->arraySize) - 1); - else if (soap->version == 1 && !soap_match_tag(soap, tp->name, "SOAP-ENC:offset")) - strncpy(soap->arrayOffset, tp->value, sizeof(soap->arrayOffset)); - else if (soap->version == 1 && !soap_match_tag(soap, tp->name, "SOAP-ENC:position")) - soap->position = soap_getposition(tp->value, soap->positions); - else if (soap->version == 1 && !soap_match_tag(soap, tp->name, "SOAP-ENC:root")) - soap->root = ((!strcmp(tp->value, "1") || !strcmp(tp->value, "true"))); - else if (!soap_match_tag(soap, tp->name, "SOAP-ENV:actor") - || !soap_match_tag(soap, tp->name, "SOAP-ENV:role")) - { if ((!soap->actor || strcmp(soap->actor, tp->value)) - && strcmp(tp->value, "http://schemas.xmlsoap.org/soap/actor/next") - && strcmp(tp->value, "http://www.w3.org/2003/05/soap-envelope/role/next")) - soap->other = 1; - } - else if (!soap_match_tag(soap, tp->name, "SOAP-ENV:mustUnderstand") - && (!strcmp(tp->value, "1") || !strcmp(tp->value, "true"))) - soap->mustUnderstand = 1; - else if ((!soap_match_tag(soap, tp->name, "xsi:null") - || !soap_match_tag(soap, tp->name, "xsi:nil")) - && (!strcmp(tp->value, "1") - || !strcmp(tp->value, "true"))) - soap->null = 1; - } - } - if (!(soap->body = (c != '/'))) - do c = soap_get(soap); - while (soap_blank(c)); - return soap->error = SOAP_OK; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_retry(struct soap *soap) -{ soap->peeked = 1; - soap->error = SOAP_OK; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_revert(struct soap *soap) -{ if (!soap->peeked) - { soap->peeked = 1; - if (soap->body) - soap->level--; - } - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Reverting last element (level=%u)\n", soap->level)); -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_string_out(struct soap *soap, const char *s, int flag) -{ register const char *t; - register soap_wchar c; - register soap_wchar mask = 0xFFFFFF80UL; -#ifdef WITH_DOM - if ((soap->mode & SOAP_XML_DOM) && soap->dom) - { soap->dom->data = soap_strdup(soap, s); /* check EOM */ - return SOAP_OK; - } -#endif - if (soap->mode & SOAP_C_UTFSTRING) - mask = 0; - t = s; - while ((c = *t++)) - { switch (c) - { - case 9: - if (flag) - { if (soap_send_raw(soap, s, t - s - 1) || soap_send_raw(soap, " ", 5)) - return soap->error; - s = t; - } - break; - case 10: - if (flag || !(soap->mode & SOAP_XML_CANONICAL)) - { if (soap_send_raw(soap, s, t - s - 1) || soap_send_raw(soap, " ", 5)) - return soap->error; - s = t; - } - break; - case 13: - if (soap_send_raw(soap, s, t - s - 1) || soap_send_raw(soap, " ", 5)) - return soap->error; - s = t; - break; - case '&': - if (soap_send_raw(soap, s, t - s - 1) || soap_send_raw(soap, "&", 5)) - return soap->error; - s = t; - break; - case '<': - if (soap_send_raw(soap, s, t - s - 1) || soap_send_raw(soap, "<", 4)) - return soap->error; - s = t; - break; - case '>': - if (!flag) - { if (soap_send_raw(soap, s, t - s - 1) || soap_send_raw(soap, ">", 4)) - return soap->error; - s = t; - } - break; - case '"': - if (flag) - { if (soap_send_raw(soap, s, t - s - 1) || soap_send_raw(soap, """, 6)) - return soap->error; - s = t; - } - break; - default: -#ifndef WITH_LEANER -#ifdef HAVE_MBTOWC - if (soap->mode & SOAP_C_MBSTRING) - { wchar_t wc; - register int m = mbtowc(&wc, t - 1, MB_CUR_MAX); - if (m > 0 && wc != c) - { if (soap_send_raw(soap, s, t - s - 1) || soap_pututf8(soap, wc)) - return soap->error; - s = t + m - 1; - continue; - } - } -#endif -#endif - if (c & mask) - { if (soap_send_raw(soap, s, t - s - 1) || soap_pututf8(soap, (unsigned char)c)) - return soap->error; - s = t; - } - } - } - return soap_send_raw(soap, s, t - s - 1); -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -char * -SOAP_FMAC2 -soap_string_in(struct soap *soap, int flag, long minlen, long maxlen) -{ register char *s; - char *t = NULL; - register size_t i; - register long l = 0; - register int n = 0; - register size_t m = 0; - register soap_wchar c; -#if !defined(WITH_LEANER) && defined(HAVE_WCTOMB) - char buf[MB_LEN_MAX > 8 ? MB_LEN_MAX : 8]; -#else - char buf[8]; -#endif - DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Reading string content\n")); -#ifdef WITH_CDATA - if (!flag) - { register int state = 0; -#ifdef WITH_FAST - soap->labidx = 0; /* use look-aside buffer */ -#else - if (soap_new_block(soap)) - return NULL; -#endif - for (;;) - { -#ifdef WITH_FAST - register size_t k; - if (soap_append_lab(soap, NULL, 0)) /* allocate more space in look-aside buffer if necessary */ - return NULL; - s = soap->labbuf + soap->labidx; /* space to populate */ - k = soap->lablen - soap->labidx; /* number of bytes available */ - soap->labidx = soap->lablen; /* claim this space */ -#else - register size_t k = SOAP_BLKLEN; - if (!(s = (char*)soap_push_block(soap, k))) - return NULL; -#endif - for (i = 0; i < k; i++) - { if (m > 0) - { *s++ = *t++; /* copy multibyte characters */ - m--; - continue; - } - c = soap_getchar(soap); - if ((int)c == EOF) - goto end; - if (c >= 0x80 && !(soap->mode & SOAP_ENC_LATIN)) - { soap_unget(soap, c); - c = soap_getutf8(soap); - if (soap->mode & SOAP_C_UTFSTRING) - { if ((c & 0x80000000) && c >= -0x7FFFFF80 && c < SOAP_AP) - { c &= 0x7FFFFFFF; - t = buf; - if (c < 0x0800) - *t++ = (char)(0xC0 | ((c >> 6) & 0x1F)); - else - { if (c < 0x010000) - *t++ = (char)(0xE0 | ((c >> 12) & 0x0F)); - else - { if (c < 0x200000) - *t++ = (char)(0xF0 | ((c >> 18) & 0x07)); - else - { if (c < 0x04000000) - *t++ = (char)(0xF8 | ((c >> 24) & 0x03)); - else - { *t++ = (char)(0xFC | ((c >> 30) & 0x01)); - *t++ = (char)(0x80 | ((c >> 24) & 0x3F)); - } - *t++ = (char)(0x80 | ((c >> 18) & 0x3F)); - } - *t++ = (char)(0x80 | ((c >> 12) & 0x3F)); - } - *t++ = (char)(0x80 | ((c >> 6) & 0x3F)); - } - *t++ = (char)(0x80 | (c & 0x3F)); - m = (int)(t - buf) - 1; - t = buf; - *s++ = *t++; - continue; - } - } - } - switch (state) - { case 1: - if (c == ']') - state = 4; - *s++ = c; - continue; - case 2: - if (c == '-') - state = 6; - *s++ = c; - continue; - case 3: - if (c == '?') - state = 8; - *s++ = c; - continue; - /* CDATA */ - case 4: - if (c == ']') - state = 5; - else - state = 1; - *s++ = c; - continue; - case 5: - if (c == '>') - state = 0; - else - state = 1; - *s++ = c; - continue; - /* comment */ - case 6: - if (c == '-') - state = 7; - else - state = 2; - *s++ = c; - continue; - case 7: - if (c == '>') - state = 0; - else - state = 2; - *s++ = c; - continue; - /* PI */ - case 8: - if (c == '>') - state = 0; - else - state = 3; - *s++ = c; - continue; - } - switch (c) - { - case '/': - if (n > 0) - { c = soap_getchar(soap); - if (c == '>') - n--; - soap_unget(soap, c); - } - *s++ = '/'; - break; - case '<': - c = soap_getchar(soap); - if (c == '/') - { if (n == 0) - { c = SOAP_TT; - goto end; - } - n--; - } - else if (c == '!') - { c = soap_getchar(soap); - if (c == '[') - { do c = soap_getchar(soap); - while ((int)c != EOF && c != '['); - if ((int)c == EOF) - goto end; - t = (char*)"![CDATA["; - m = 8; - state = 1; - } - else if (c == '-') - { if ((c = soap_getchar(soap)) == '-') - state = 2; - t = (char*)"!-"; - m = 2; - soap_unget(soap, c); - } - else - { t = (char*)"!"; - m = 1; - soap_unget(soap, c); - } - *s++ = '<'; - break; - } - else if (c == '?') - state = 3; - else - n++; - soap_unget(soap, c); - *s++ = '<'; - break; - case '>': - *s++ = '>'; - break; - case '"': - *s++ = '"'; - break; - default: -#ifndef WITH_LEANER -#ifdef HAVE_WCTOMB - if (soap->mode & SOAP_C_MBSTRING) - { m = wctomb(buf, c & 0x7FFFFFFF); - if (m >= 1) - { t = buf; - *s++ = *t++; - m--; - } - else - *s++ = SOAP_UNKNOWN_CHAR; - } - else -#endif -#endif - *s++ = (char)(c & 0xFF); - } - l++; - if ((soap->mode & SOAP_XML_STRICT) && maxlen >= 0 && l > maxlen) - { DBGLOG(TEST,SOAP_MESSAGE(fdebug, "String too long: maxlen=%ld\n", maxlen)); - soap->error = SOAP_LENGTH; - return NULL; - } - } - } - } -#endif -#ifdef WITH_FAST - soap->labidx = 0; /* use look-aside buffer */ -#else - if (soap_new_block(soap)) - return NULL; -#endif - for (;;) - { -#ifdef WITH_FAST - register size_t k; - if (soap_append_lab(soap, NULL, 0)) /* allocate more space in look-aside buffer if necessary */ - return NULL; - s = soap->labbuf + soap->labidx; /* space to populate */ - k = soap->lablen - soap->labidx; /* number of bytes available */ - soap->labidx = soap->lablen; /* claim this space */ -#else - register size_t k = SOAP_BLKLEN; - if (!(s = (char*)soap_push_block(soap, k))) - return NULL; -#endif - for (i = 0; i < k; i++) - { if (m > 0) - { *s++ = *t++; /* copy multibyte characters */ - m--; - continue; - } - if (soap->mode & SOAP_C_UTFSTRING) - { if (((c = soap_get(soap)) & 0x80000000) && c >= -0x7FFFFF80 && c < SOAP_AP) - { c &= 0x7FFFFFFF; - t = buf; - if (c < 0x0800) - *t++ = (char)(0xC0 | ((c >> 6) & 0x1F)); - else - { if (c < 0x010000) - *t++ = (char)(0xE0 | ((c >> 12) & 0x0F)); - else - { if (c < 0x200000) - *t++ = (char)(0xF0 | ((c >> 18) & 0x07)); - else - { if (c < 0x04000000) - *t++ = (char)(0xF8 | ((c >> 24) & 0x03)); - else - { *t++ = (char)(0xFC | ((c >> 30) & 0x01)); - *t++ = (char)(0x80 | ((c >> 24) & 0x3F)); - } - *t++ = (char)(0x80 | ((c >> 18) & 0x3F)); - } - *t++ = (char)(0x80 | ((c >> 12) & 0x3F)); - } - *t++ = (char)(0x80 | ((c >> 6) & 0x3F)); - } - *t++ = (char)(0x80 | (c & 0x3F)); - m = (int)(t - buf) - 1; - t = buf; - *s++ = *t++; - continue; - } - } - else - c = soap_getutf8(soap); - switch (c) - { - case SOAP_TT: - if (n == 0) - goto end; - n--; - *s++ = '<'; - t = (char*)"/"; - m = 1; - break; - case SOAP_LT: - n++; - *s++ = '<'; - break; - case SOAP_GT: - *s++ = '>'; - break; - case SOAP_QT: - *s++ = '"'; - break; - case SOAP_AP: - *s++ = '\''; - break; - case '/': - if (n > 0) - { c = soap_get(soap); - if (c == SOAP_GT) - n--; - soap_unget(soap, c); - } - *s++ = '/'; - break; - case '<' | 0x80000000: - if (flag) - *s++ = '<'; - else - { *s++ = '&'; - t = (char*)"lt;"; - m = 3; - } - break; - case '>' | 0x80000000: - if (flag) - *s++ = '>'; - else - { *s++ = '&'; - t = (char*)"gt;"; - m = 3; - } - break; - case '&' | 0x80000000: - if (flag) - *s++ = '&'; - else - { *s++ = '&'; - t = (char*)"amp;"; - m = 4; - } - break; - case '"' | 0x80000000: - if (flag) - *s++ = '"'; - else - { *s++ = '&'; - t = (char*)"quot;"; - m = 5; - } - break; - case '\'' | 0x80000000: - if (flag) - *s++ = '\''; - else - { *s++ = '&'; - t = (char*)"apos;"; - m = 5; - } - break; - default: - if ((int)c == EOF) - goto end; -#ifndef WITH_LEANER -#ifdef HAVE_WCTOMB - if (soap->mode & SOAP_C_MBSTRING) - { m = wctomb(buf, c & 0x7FFFFFFF); - if (m >= 1) - { t = buf; - *s++ = *t++; - m--; - } - else - *s++ = SOAP_UNKNOWN_CHAR; - } - else -#endif -#endif - *s++ = (char)(c & 0xFF); - } - l++; - if ((soap->mode & SOAP_XML_STRICT) && maxlen >= 0 && l > maxlen) - { DBGLOG(TEST,SOAP_MESSAGE(fdebug, "String too long: maxlen=%ld\n", maxlen)); - soap->error = SOAP_LENGTH; - return NULL; - } - } - } -end: - soap_unget(soap, c); - *s = '\0'; -#ifdef WITH_FAST - t = soap_strdup(soap, soap->labbuf); -#else - soap_size_block(soap, i+1); - t = soap_save_block(soap, NULL, 0); -#endif - if ((soap->mode & SOAP_XML_STRICT) && l < minlen) - { DBGLOG(TEST,SOAP_MESSAGE(fdebug, "String too short: %ld chars, minlen=%ld\n", l, minlen)); - soap->error = SOAP_LENGTH; - return NULL; - } - if (flag == 2) - if (soap_s2QName(soap, t, &t)) - return NULL; - if (soap->peeked && *soap->tag) - { soap->peeked = 0; - if (soap_element_end_in(soap, NULL)) - return NULL; - } - return t; -} -#endif - -/******************************************************************************/ -#ifndef WITH_LEANER -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_wstring_out(struct soap *soap, const wchar_t *s, int flag) -{ const char *t; - char tmp; - register soap_wchar c; -#ifdef WITH_DOM - if ((soap->mode & SOAP_XML_DOM) && soap->dom) - { soap->dom->wide = NULL; /* soap_malloc() ??? */ - return SOAP_OK; - } -#endif - while ((c = *s++)) - { switch (c) - { - case 9: - if (flag) - t = " "; - else - t = "\t"; - break; - case 10: - if (flag || !(soap->mode & SOAP_XML_CANONICAL)) - t = " "; - else - t = "\n"; - break; - case 13: - t = " "; - break; - case '&': - t = "&"; - break; - case '<': - t = "<"; - break; - case '>': - if (flag) - t = ">"; - else - t = ">"; - break; - case '"': - if (flag) - t = """; - else - t = "\""; - break; - default: - if (c > 0 && c < 0x80) - { tmp = (char)c; - if (soap_send_raw(soap, &tmp, 1)) - return soap->error; - } - else if (soap_pututf8(soap, (unsigned long)c)) - return soap->error; - continue; - } - if (soap_send(soap, t)) - return soap->error; - } - return SOAP_OK; -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_LEANER -#ifndef PALM_2 -SOAP_FMAC1 -wchar_t * -SOAP_FMAC2 -soap_wstring_in(struct soap *soap, int flag, long minlen, long maxlen) -{ wchar_t *s; - register int i, n = 0; - register long l = 0; - register soap_wchar c; - const char *t = NULL; - DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Reading wide string content\n")); - if (soap->peeked && *soap->tag) - { n = 1; - soap->peeked = 0; - } - if (soap_new_block(soap)) - return NULL; - for (;;) - { if (!(s = (wchar_t*)soap_push_block(soap, sizeof(wchar_t)*SOAP_BLKLEN))) - return NULL; - for (i = 0; i < SOAP_BLKLEN; i++) - { if (t) - { *s++ = (wchar_t)*t++; - if (!*t) - t = NULL; - continue; - } - c = soap_getutf8(soap); - switch (c) - { - case SOAP_TT: - if (n == 0) - goto end; - n--; - *s++ = '<'; - soap_unget(soap, '/'); - break; - case SOAP_LT: - n++; - *s++ = '<'; - break; - case SOAP_GT: - *s++ = '>'; - break; - case SOAP_QT: - *s++ = '"'; - break; - case SOAP_AP: - *s++ = '\''; - break; - case '/': - if (n > 0) - { c = soap_getutf8(soap); - if (c == SOAP_GT) - n--; - soap_unget(soap, c); - } - *s++ = '/'; - break; - case '<': - if (flag) - *s++ = (soap_wchar)'<'; - else - { *s++ = (soap_wchar)'&'; - t = "lt;"; - } - break; - case '>': - if (flag) - *s++ = (soap_wchar)'>'; - else - { *s++ = (soap_wchar)'&'; - t = "gt;"; - } - break; - case '"': - if (flag) - *s++ = (soap_wchar)'"'; - else - { *s++ = (soap_wchar)'&'; - t = "quot;"; - } - break; - default: - if ((int)c == EOF) - goto end; - *s++ = (wchar_t)c & 0x7FFFFFFF; - } - l++; - if ((soap->mode & SOAP_XML_STRICT) && maxlen >= 0 && l > maxlen) - { DBGLOG(TEST,SOAP_MESSAGE(fdebug, "String too long: maxlen=%ld\n", maxlen)); - soap->error = SOAP_LENGTH; - return NULL; - } - } - } -end: - soap_unget(soap, c); - *s = '\0'; - soap_size_block(soap, sizeof(wchar_t) * (i + 1)); - if ((soap->mode & SOAP_XML_STRICT) && l < minlen) - { DBGLOG(TEST,SOAP_MESSAGE(fdebug, "String too short: %ld chars, minlen=%ld\n", l, minlen)); - soap->error = SOAP_LENGTH; - return NULL; - } - if (soap->peeked && *soap->tag) - { soap->peeked = 0; - if (soap_element_end_in(soap, NULL)) - return NULL; - } - return (wchar_t*)soap_save_block(soap, NULL, 0); -} -#endif -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -const char* -SOAP_FMAC2 -soap_int2s(struct soap *soap, int n) -{ return soap_long2s(soap, (long)n); -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_outint(struct soap *soap, const char *tag, int id, const int *p, const char *type, int n) -{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type) - || soap_string_out(soap, soap_long2s(soap, (long)*p), 0)) - return soap->error; - return soap_element_end_out(soap, tag); -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_s2int(struct soap *soap, const char *s, int *p) -{ if (s) - { char *r; - *p = (int)soap_strtol(s, &r, 10); - if (*r) - soap->error = SOAP_TYPE; - } - return soap->error; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int * -SOAP_FMAC2 -soap_inint(struct soap *soap, const char *tag, int *p, const char *type, int t) -{ if (soap_element_begin_in(soap, tag, 0)) - return NULL; -#ifndef WITH_LEAN - if (*soap->type - && soap_match_tag(soap, soap->type, type) - && soap_match_tag(soap, soap->type, ":int") - && soap_match_tag(soap, soap->type, ":short") - && soap_match_tag(soap, soap->type, ":byte")) - { soap->error = SOAP_TYPE; - soap_revert(soap); - return NULL; - } -#endif - p = (int*)soap_id_enter(soap, soap->id, p, t, sizeof(int), 0, NULL, NULL, NULL); - if (p) - { if (soap_s2int(soap, soap_value(soap), p)) - return NULL; - } - p = (int*)soap_id_forward(soap, soap->href, p, t, 0, sizeof(int), 0, NULL); - if (soap->body && soap_element_end_in(soap, tag)) - return NULL; - return p; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -const char* -SOAP_FMAC2 -soap_long2s(struct soap *soap, long n) -{ sprintf(soap->tmpbuf, "%ld", n); - return soap->tmpbuf; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_outlong(struct soap *soap, const char *tag, int id, const long *p, const char *type, int n) -{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type) - || soap_string_out(soap, soap_long2s(soap, *p), 0)) - return soap->error; - return soap_element_end_out(soap, tag); -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_s2long(struct soap *soap, const char *s, long *p) -{ if (s) - { char *r; - *p = soap_strtol(s, &r, 10); - if (*r) - soap->error = SOAP_TYPE; - } - return soap->error; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -long * -SOAP_FMAC2 -soap_inlong(struct soap *soap, const char *tag, long *p, const char *type, int t) -{ if (soap_element_begin_in(soap, tag, 0)) - return NULL; -#ifndef WITH_LEAN - if (*soap->type - && soap_match_tag(soap, soap->type, type) - && soap_match_tag(soap, soap->type, ":int") - && soap_match_tag(soap, soap->type, ":short") - && soap_match_tag(soap, soap->type, ":byte")) - { soap->error = SOAP_TYPE; - soap_revert(soap); - return NULL; - } -#endif - p = (long*)soap_id_enter(soap, soap->id, p, t, sizeof(long), 0, NULL, NULL, NULL); - if (p) - { if (soap_s2long(soap, soap_value(soap), p)) - return NULL; - } - p = (long*)soap_id_forward(soap, soap->href, p, t, 0, sizeof(long), 0, NULL); - if (soap->body && soap_element_end_in(soap, tag)) - return NULL; - return p; -} -#endif - -/******************************************************************************/ -#ifndef WITH_LEAN -SOAP_FMAC1 -const char* -SOAP_FMAC2 -soap_LONG642s(struct soap *soap, LONG64 n) -{ sprintf(soap->tmpbuf, SOAP_LONG_FORMAT, n); - return soap->tmpbuf; -} -#endif - -/******************************************************************************/ -#ifndef WITH_LEAN -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_outLONG64(struct soap *soap, const char *tag, int id, const LONG64 *p, const char *type, int n) -{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type) - || soap_string_out(soap, soap_LONG642s(soap, *p), 0)) - return soap->error; - return soap_element_end_out(soap, tag); -} -#endif - -/******************************************************************************/ -#ifndef WITH_LEAN -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_s2LONG64(struct soap *soap, const char *s, LONG64 *p) -{ if (s && sscanf(s, SOAP_LONG_FORMAT, p) != 1) - soap->error = SOAP_TYPE; - return soap->error; -} -#endif - -/******************************************************************************/ -#ifndef WITH_LEAN -SOAP_FMAC1 -LONG64 * -SOAP_FMAC2 -soap_inLONG64(struct soap *soap, const char *tag, LONG64 *p, const char *type, int t) -{ if (soap_element_begin_in(soap, tag, 0)) - return NULL; -#ifndef WITH_LEAN - if (*soap->type - && soap_match_tag(soap, soap->type, type) - && soap_match_tag(soap, soap->type, ":integer") - && soap_match_tag(soap, soap->type, ":positiveInteger") - && soap_match_tag(soap, soap->type, ":negativeInteger") - && soap_match_tag(soap, soap->type, ":nonPositiveInteger") - && soap_match_tag(soap, soap->type, ":nonNegativeInteger") - && soap_match_tag(soap, soap->type, ":long") - && soap_match_tag(soap, soap->type, ":int") - && soap_match_tag(soap, soap->type, ":short") - && soap_match_tag(soap, soap->type, ":byte")) - { soap->error = SOAP_TYPE; - soap_revert(soap); - return NULL; - } -#endif - p = (LONG64*)soap_id_enter(soap, soap->id, p, t, sizeof(LONG64), 0, NULL, NULL, NULL); - if (p) - { if (soap_s2LONG64(soap, soap_value(soap), p)) - return NULL; - } - p = (LONG64*)soap_id_forward(soap, soap->href, p, t, 0, sizeof(LONG64), 0, NULL); - if (soap->body && soap_element_end_in(soap, tag)) - return NULL; - return p; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -const char* -SOAP_FMAC2 -soap_byte2s(struct soap *soap, char n) -{ return soap_long2s(soap, (long)n); -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_outbyte(struct soap *soap, const char *tag, int id, const char *p, const char *type, int n) -{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type) - || soap_string_out(soap, soap_long2s(soap, (long)*p), 0)) - return soap->error; - return soap_element_end_out(soap, tag); -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_s2byte(struct soap *soap, const char *s, char *p) -{ if (s) - { long n; - char *r; - n = soap_strtol(s, &r, 10); - if (*r || n < -128 || n > 127) - soap->error = SOAP_TYPE; - *p = (char)n; - } - return soap->error; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -char * -SOAP_FMAC2 -soap_inbyte(struct soap *soap, const char *tag, char *p, const char *type, int t) -{ if (soap_element_begin_in(soap, tag, 0)) - return NULL; -#ifndef WITH_LEAN - if (*soap->type - && soap_match_tag(soap, soap->type, type) - && soap_match_tag(soap, soap->type, ":byte")) - { soap->error = SOAP_TYPE; - soap_revert(soap); - return NULL; - } -#endif - p = (char*)soap_id_enter(soap, soap->id, p, t, sizeof(char), 0, NULL, NULL, NULL); - if (p) - { if (soap_s2byte(soap, soap_value(soap), p)) - return NULL; - } - p = (char*)soap_id_forward(soap, soap->href, p, t, 0, sizeof(char), 0, NULL); - if (soap->body && soap_element_end_in(soap, tag)) - return NULL; - return p; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -const char* -SOAP_FMAC2 -soap_short2s(struct soap *soap, short n) -{ return soap_long2s(soap, (long)n); -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_outshort(struct soap *soap, const char *tag, int id, const short *p, const char *type, int n) -{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type) - || soap_string_out(soap, soap_long2s(soap, (long)*p), 0)) - return soap->error; - return soap_element_end_out(soap, tag); -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_s2short(struct soap *soap, const char *s, short *p) -{ if (s) - { long n; - char *r; - n = soap_strtol(s, &r, 10); - if (*r || n < -32768 || n > 32767) - soap->error = SOAP_TYPE; - *p = (short)n; - } - return soap->error; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -short * -SOAP_FMAC2 -soap_inshort(struct soap *soap, const char *tag, short *p, const char *type, int t) -{ if (soap_element_begin_in(soap, tag, 0)) - return NULL; -#ifndef WITH_LEAN - if (*soap->type - && soap_match_tag(soap, soap->type, type) - && soap_match_tag(soap, soap->type, ":short") - && soap_match_tag(soap, soap->type, ":byte")) - { soap->error = SOAP_TYPE; - soap_revert(soap); - return NULL; - } -#endif - p = (short*)soap_id_enter(soap, soap->id, p, t, sizeof(short), 0, NULL, NULL, NULL); - if (p) - { if (soap_s2short(soap, soap_value(soap), p)) - return NULL; - } - p = (short*)soap_id_forward(soap, soap->href, p, t, 0, sizeof(short), 0, NULL); - if (soap->body && soap_element_end_in(soap, tag)) - return NULL; - return p; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -const char* -SOAP_FMAC2 -soap_float2s(struct soap *soap, float n) -{ const char *s; - if (soap_isnan((double)n)) - s = "NaN"; - else if (soap_ispinff(n)) - s = "INF"; - else if (soap_isninff(n)) - s = "-INF"; - else - { sprintf(soap->tmpbuf, soap->float_format, n); - s = soap->tmpbuf; - } - return s; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_outfloat(struct soap *soap, const char *tag, int id, const float *p, const char *type, int n) -{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type) - || soap_string_out(soap, soap_float2s(soap, *p), 0)) - return soap->error; - return soap_element_end_out(soap, tag); -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_s2float(struct soap *soap, const char *s, float *p) -{ if (s) - { if (!soap_tag_cmp(s, "INF")) - *p = FLT_PINFTY; - else if (!soap_tag_cmp(s, "+INF")) - *p = FLT_PINFTY; - else if (!soap_tag_cmp(s, "-INF")) - *p = FLT_NINFTY; - else if (!soap_tag_cmp(s, "NaN")) - *p = FLT_NAN; - else - { -#if defined(HAVE_STRTOF) - char *r; - *p = strtof(s, &r); - if (*r) -#elif defined(HAVE_STRTOD) - char *r; - *p = (float)strtod(s, &r); - if (*r) -#endif -#ifdef HAVE_SSCANF - if (sscanf(s, soap->float_format, p) != 1) - soap->error = SOAP_TYPE; -#else - soap->error = SOAP_TYPE; -#endif - } - } - return soap->error; -} -#endif - -/******************************************************************************/ -#ifndef WITH_LEAN -static int soap_isnumeric(struct soap *soap, const char *type) -{ if (soap_match_tag(soap, soap->type, type) - && soap_match_tag(soap, soap->type, ":float") - && soap_match_tag(soap, soap->type, ":double") - && soap_match_tag(soap, soap->type, ":decimal") - && soap_match_tag(soap, soap->type, ":integer") - && soap_match_tag(soap, soap->type, ":positiveInteger") - && soap_match_tag(soap, soap->type, ":negativeInteger") - && soap_match_tag(soap, soap->type, ":nonPositiveInteger") - && soap_match_tag(soap, soap->type, ":nonNegativeInteger") - && soap_match_tag(soap, soap->type, ":long") - && soap_match_tag(soap, soap->type, ":int") - && soap_match_tag(soap, soap->type, ":short") - && soap_match_tag(soap, soap->type, ":byte") - && soap_match_tag(soap, soap->type, ":unsignedLong") - && soap_match_tag(soap, soap->type, ":unsignedInt") - && soap_match_tag(soap, soap->type, ":unsignedShort") - && soap_match_tag(soap, soap->type, ":unsignedByte")) - { soap->error = SOAP_TYPE; - soap_revert(soap); - return SOAP_ERR; - } - return SOAP_OK; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -float * -SOAP_FMAC2 -soap_infloat(struct soap *soap, const char *tag, float *p, const char *type, int t) -{ if (soap_element_begin_in(soap, tag, 0)) - return NULL; -#ifndef WITH_LEAN - if (*soap->type != '\0' && soap_isnumeric(soap, type)) - return NULL; -#endif - p = (float*)soap_id_enter(soap, soap->id, p, t, sizeof(float), 0, NULL, NULL, NULL); - if (p) - { if (soap_s2float(soap, soap_value(soap), p)) - return NULL; - } - p = (float*)soap_id_forward(soap, soap->href, p, t, 0, sizeof(float), 0, NULL); - if (soap->body && soap_element_end_in(soap, tag)) - return NULL; - return p; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -const char* -SOAP_FMAC2 -soap_double2s(struct soap *soap, double n) -{ const char *s; - if (soap_isnan(n)) - s = "NaN"; - else if (soap_ispinfd(n)) - s = "INF"; - else if (soap_isninfd(n)) - s = "-INF"; - else - { sprintf(soap->tmpbuf, soap->double_format, n); - s = soap->tmpbuf; - } - return s; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_outdouble(struct soap *soap, const char *tag, int id, const double *p, const char *type, int n) -{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type) - || soap_string_out(soap, soap_double2s(soap, *p), 0)) - return soap->error; - return soap_element_end_out(soap, tag); -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_s2double(struct soap *soap, const char *s, double *p) -{ if (s) - { if (!soap_tag_cmp(s, "INF")) - *p = DBL_PINFTY; - else if (!soap_tag_cmp(s, "+INF")) - *p = DBL_PINFTY; - else if (!soap_tag_cmp(s, "-INF")) - *p = DBL_NINFTY; - else if (!soap_tag_cmp(s, "NaN")) - *p = DBL_NAN; - else - { -#ifdef HAVE_STRTOD - char *r; - *p = strtod(s, &r); - if (*r) -#endif -#ifdef HAVE_SSCANF - if (sscanf(s, soap->double_format, p) != 1) - soap->error = SOAP_TYPE; -#else - soap->error = SOAP_TYPE; -#endif - } - } - return soap->error; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -double * -SOAP_FMAC2 -soap_indouble(struct soap *soap, const char *tag, double *p, const char *type, int t) -{ if (soap_element_begin_in(soap, tag, 0)) - return NULL; -#ifndef WITH_LEAN - if (*soap->type != '\0' && soap_isnumeric(soap, type)) - return NULL; -#endif - p = (double*)soap_id_enter(soap, soap->id, p, t, sizeof(double), 0, NULL, NULL, NULL); - if (p) - { if (soap_s2double(soap, soap_value(soap), p)) - return NULL; - } - p = (double*)soap_id_forward(soap, soap->href, p, t, 0, sizeof(double), 0, NULL); - if (soap->body && soap_element_end_in(soap, tag)) - return NULL; - return p; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -const char* -SOAP_FMAC2 -soap_unsignedByte2s(struct soap *soap, unsigned char n) -{ return soap_unsignedLong2s(soap, (unsigned long)n); -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_outunsignedByte(struct soap *soap, const char *tag, int id, const unsigned char *p, const char *type, int n) -{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type) - || soap_string_out(soap, soap_unsignedLong2s(soap, (unsigned long)*p), 0)) - return soap->error; - return soap_element_end_out(soap, tag); -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_s2unsignedByte(struct soap *soap, const char *s, unsigned char *p) -{ if (s) - { unsigned long n; - char *r; - n = soap_strtoul(s, &r, 10); - if (*r || n > 255) - soap->error = SOAP_TYPE; - *p = (unsigned char)n; - } - return soap->error; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -unsigned char * -SOAP_FMAC2 -soap_inunsignedByte(struct soap *soap, const char *tag, unsigned char *p, const char *type, int t) -{ if (soap_element_begin_in(soap, tag, 0)) - return NULL; -#ifndef WITH_LEAN - if (*soap->type - && soap_match_tag(soap, soap->type, type) - && soap_match_tag(soap, soap->type, ":unsignedByte")) - { soap->error = SOAP_TYPE; - soap_revert(soap); - return NULL; - } -#endif - p = (unsigned char*)soap_id_enter(soap, soap->id, p, t, sizeof(unsigned char), 0, NULL, NULL, NULL); - if (p) - { if (soap_s2unsignedByte(soap, soap_value(soap), p)) - return NULL; - } - p = (unsigned char*)soap_id_forward(soap, soap->href, p, t, 0, sizeof(unsigned char), 0, NULL); - if (soap->body && soap_element_end_in(soap, tag)) - return NULL; - return p; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -const char* -SOAP_FMAC2 -soap_unsignedShort2s(struct soap *soap, unsigned short n) -{ return soap_unsignedLong2s(soap, (unsigned long)n); -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_outunsignedShort(struct soap *soap, const char *tag, int id, const unsigned short *p, const char *type, int n) -{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type) - || soap_string_out(soap, soap_unsignedLong2s(soap, (unsigned long)*p), 0)) - return soap->error; - return soap_element_end_out(soap, tag); -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_s2unsignedShort(struct soap *soap, const char *s, unsigned short *p) -{ if (s) - { unsigned long n; - char *r; - n = soap_strtoul(s, &r, 10); - if (*r || n > 65535) - soap->error = SOAP_TYPE; - *p = (unsigned short)n; - } - return soap->error; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -unsigned short * -SOAP_FMAC2 -soap_inunsignedShort(struct soap *soap, const char *tag, unsigned short *p, const char *type, int t) -{ if (soap_element_begin_in(soap, tag, 0)) - return NULL; -#ifndef WITH_LEAN - if (*soap->type - && soap_match_tag(soap, soap->type, type) - && soap_match_tag(soap, soap->type, ":unsignedShort") - && soap_match_tag(soap, soap->type, ":unsignedByte")) - { soap->error = SOAP_TYPE; - soap_revert(soap); - return NULL; - } -#endif - p = (unsigned short*)soap_id_enter(soap, soap->id, p, t, sizeof(unsigned short), 0, NULL, NULL, NULL); - if (p) - { if (soap_s2unsignedShort(soap, soap_value(soap), p)) - return NULL; - } - p = (unsigned short*)soap_id_forward(soap, soap->href, p, t, 0, sizeof(unsigned short), 0, NULL); - if (soap->body && soap_element_end_in(soap, tag)) - return NULL; - return p; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -const char* -SOAP_FMAC2 -soap_unsignedInt2s(struct soap *soap, unsigned int n) -{ return soap_unsignedLong2s(soap, (unsigned long)n); -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_outunsignedInt(struct soap *soap, const char *tag, int id, const unsigned int *p, const char *type, int n) -{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type) - || soap_string_out(soap, soap_unsignedLong2s(soap, (unsigned long)*p), 0)) - return soap->error; - return soap_element_end_out(soap, tag); -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_s2unsignedInt(struct soap *soap, const char *s, unsigned int *p) -{ if (s) - { char *r; - *p = (unsigned int)soap_strtoul(s, &r, 10); - if (*r) - soap->error = SOAP_TYPE; - } - return soap->error; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -unsigned int * -SOAP_FMAC2 -soap_inunsignedInt(struct soap *soap, const char *tag, unsigned int *p, const char *type, int t) -{ if (soap_element_begin_in(soap, tag, 0)) - return NULL; -#ifndef WITH_LEAN - if (*soap->type - && soap_match_tag(soap, soap->type, type) - && soap_match_tag(soap, soap->type, ":unsignedInt") - && soap_match_tag(soap, soap->type, ":unsignedShort") - && soap_match_tag(soap, soap->type, ":unsignedByte")) - { soap->error = SOAP_TYPE; - soap_revert(soap); - return NULL; - } -#endif - p = (unsigned int*)soap_id_enter(soap, soap->id, p, t, sizeof(unsigned int), 0, NULL, NULL, NULL); - if (p) - { if (soap_s2unsignedInt(soap, soap_value(soap), p)) - return NULL; - } - p = (unsigned int*)soap_id_forward(soap, soap->href, p, t, 0, sizeof(unsigned int), 0, NULL); - if (soap->body && soap_element_end_in(soap, tag)) - return NULL; - return p; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -const char* -SOAP_FMAC2 -soap_unsignedLong2s(struct soap *soap, unsigned long n) -{ sprintf(soap->tmpbuf, "%lu", n); - return soap->tmpbuf; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_outunsignedLong(struct soap *soap, const char *tag, int id, const unsigned long *p, const char *type, int n) -{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type) - || soap_string_out(soap, soap_unsignedLong2s(soap, *p), 0)) - return soap->error; - return soap_element_end_out(soap, tag); -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_s2unsignedLong(struct soap *soap, const char *s, unsigned long *p) -{ if (s) - { char *r; - *p = soap_strtoul(s, &r, 10); - if (*r) - soap->error = SOAP_TYPE; - } - return soap->error; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -unsigned long * -SOAP_FMAC2 -soap_inunsignedLong(struct soap *soap, const char *tag, unsigned long *p, const char *type, int t) -{ if (soap_element_begin_in(soap, tag, 0)) - return NULL; -#ifndef WITH_LEAN - if (*soap->type - && soap_match_tag(soap, soap->type, type) - && soap_match_tag(soap, soap->type, ":unsignedInt") - && soap_match_tag(soap, soap->type, ":unsignedShort") - && soap_match_tag(soap, soap->type, ":unsignedByte")) - { soap->error = SOAP_TYPE; - soap_revert(soap); - return NULL; - } -#endif - p = (unsigned long*)soap_id_enter(soap, soap->id, p, t, sizeof(unsigned long), 0, NULL, NULL, NULL); - if (p) - { if (soap_s2unsignedLong(soap, soap_value(soap), p)) - return NULL; - } - p = (unsigned long*)soap_id_forward(soap, soap->href, p, t, 0, sizeof(unsigned long), 0, NULL); - if (soap->body && soap_element_end_in(soap, tag)) - return NULL; - return p; -} -#endif - -/******************************************************************************/ -#ifndef WITH_LEAN -SOAP_FMAC1 -const char* -SOAP_FMAC2 -soap_ULONG642s(struct soap *soap, ULONG64 n) -{ sprintf(soap->tmpbuf, SOAP_ULONG_FORMAT, n); - return soap->tmpbuf; -} -#endif - -/******************************************************************************/ -#ifndef WITH_LEAN -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_outULONG64(struct soap *soap, const char *tag, int id, const ULONG64 *p, const char *type, int n) -{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type) - || soap_string_out(soap, soap_ULONG642s(soap, *p), 0)) - return soap->error; - return soap_element_end_out(soap, tag); -} -#endif - -/******************************************************************************/ -#ifndef WITH_LEAN -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_s2ULONG64(struct soap *soap, const char *s, ULONG64 *p) -{ if (s && sscanf(s, SOAP_ULONG_FORMAT, p) != 1) - soap->error = SOAP_TYPE; - return soap->error; -} -#endif - -/******************************************************************************/ -#ifndef WITH_LEAN -SOAP_FMAC1 -ULONG64 * -SOAP_FMAC2 -soap_inULONG64(struct soap *soap, const char *tag, ULONG64 *p, const char *type, int t) -{ if (soap_element_begin_in(soap, tag, 0)) - return NULL; - if (*soap->type - && soap_match_tag(soap, soap->type, type) - && soap_match_tag(soap, soap->type, ":positiveInteger") - && soap_match_tag(soap, soap->type, ":nonNegativeInteger") - && soap_match_tag(soap, soap->type, ":unsignedLong") - && soap_match_tag(soap, soap->type, ":unsignedInt") - && soap_match_tag(soap, soap->type, ":unsignedShort") - && soap_match_tag(soap, soap->type, ":unsignedByte")) - { soap->error = SOAP_TYPE; - soap_revert(soap); - return NULL; - } - p = (ULONG64*)soap_id_enter(soap, soap->id, p, t, sizeof(ULONG64), 0, NULL, NULL, NULL); - if (p) - { if (soap_s2ULONG64(soap, soap_value(soap), p)) - return NULL; - } - p = (ULONG64*)soap_id_forward(soap, soap->href, p, t, 0, sizeof(ULONG64), 0, NULL); - if (soap->body && soap_element_end_in(soap, tag)) - return NULL; - return p; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_s2string(struct soap *soap, const char *s, char **t) -{ *t = NULL; - if (s && !(*t = soap_strdup(soap, s))) - soap->error = SOAP_EOM; - return soap->error; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_s2QName(struct soap *soap, const char *s, char **t) -{ if (s) - { struct soap_nlist *np; - const char *p; - if (!strncmp(s, "xml:", 4)) - { *t = soap_strdup(soap, s); - return SOAP_OK; - } - np = soap->nlist; - p = strchr(s, ':'); - if (p) - { register int n = p - s; - while (np && (strncmp(np->id, s, n) || np->id[n])) - np = np->next; - p++; - } - else - { while (np && *np->id) - np = np->next; - p = s; - } - if (np) - { if (np->index >= 0 && soap->local_namespaces) - { register const char *q = soap->local_namespaces[np->index].id; - if (q) - { if ((*t = (char*)soap_malloc(soap, strlen(p) + strlen(q) + 2))) - sprintf(*t, "%s:%s", q, p); - return SOAP_OK; - } - } - if (np->ns) - { if ((*t = (char*)soap_malloc(soap, strlen(p) + strlen(np->ns) + 4))) - sprintf(*t, "\"%s\":%s", np->ns, p); - return SOAP_OK; - } - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Namespace prefix of '%s' not defined (index=%d, URI=%s)\n", s, np->index, np->ns?np->ns:"")); - return soap->error = SOAP_NAMESPACE; - } - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Namespace prefix of '%s' not defined, assuming empty namespace\n", s)); - if ((*t = (char*)soap_malloc(soap, strlen(p) + 4))) - sprintf(*t, "\"\":%s", p); - } - return soap->error; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -const char* -SOAP_FMAC2 -soap_QName2s(struct soap *soap, const char *s) -{ struct Namespace *p; - char *t; - int n; - if (!s || *s != '"') - return s; - s++; - if ((p = soap->local_namespaces)) - { for (; p->id; p++) - { if (p->ns) - if (!soap_tag_cmp(s, p->ns)) - break; - if (p->in) - if (!soap_tag_cmp(s, p->in)) - break; - } - if (p && p->id) - { s = strchr(s, '"'); - if (s) - { t = (char*)soap_malloc(soap, strlen(p->id) + strlen(s)); - strcpy(t, p->id); - strcat(t, s + 1); - return t; - } - } - } - t = (char*)strchr(s, '"'); - if (t) - n = t - s; - else - n = 0; - t = soap_strdup(soap, s); - t[n] = '\0'; - sprintf(soap->tmpbuf, "xmlns:_%lu", soap->idnum++); - soap_set_attr(soap, soap->tmpbuf, t); - s = strchr(s, '"'); - if (s) - { t = (char*)soap_malloc(soap, strlen(soap->tmpbuf) + strlen(s) - 6); - strcpy(t, soap->tmpbuf + 6); - strcat(t, s + 1); - } - return t; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_outstring(struct soap *soap, const char *tag, int id, char *const*p, const char *type, int n) -{ id = soap_element_id(soap, tag, id, *p, NULL, 0, type, n); - if (id < 0 - || soap_element_begin_out(soap, tag, id, type) - || soap_string_out(soap, *p, 0) - || soap_element_end_out(soap, tag)) - return soap->error; - return SOAP_OK; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -char ** -SOAP_FMAC2 -soap_instring(struct soap *soap, const char *tag, char **p, const char *type, int t, int flag, long minlen, long maxlen) -{ if (soap_element_begin_in(soap, tag, 1)) - { if (!tag || *tag != '-' || soap->error != SOAP_NO_TAG) - return NULL; - soap->error = SOAP_OK; - } - if (!p) - if (!(p = (char**)soap_malloc(soap, sizeof(char*)))) - return NULL; - if (soap->body) - { *p = soap_string_in(soap, flag, minlen, maxlen); - if (!*p || !(char*)soap_id_enter(soap, soap->id, *p, t, sizeof(char*), 0, NULL, NULL, NULL)) - return NULL; - } - else - *p = NULL; - p = (char**)soap_id_lookup(soap, soap->href, (void**)p, t, sizeof(char**), 0); - if (soap->body && soap_element_end_in(soap, tag)) - return NULL; - return p; -} -#endif - -/******************************************************************************/ -#ifndef WITH_LEANER -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_outwstring(struct soap *soap, const char *tag, int id, wchar_t *const*p, const char *type, int n) -{ id = soap_element_id(soap, tag, id, *p, NULL, 0, type, n); - if (id < 0 - || soap_element_begin_out(soap, tag, id, type) - || soap_wstring_out(soap, *p, 0) - || soap_element_end_out(soap, tag)) - return soap->error; - return SOAP_OK; -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_LEANER -#ifndef PALM_2 -SOAP_FMAC1 -wchar_t ** -SOAP_FMAC2 -soap_inwstring(struct soap *soap, const char *tag, wchar_t **p, const char *type, int t, long minlen, long maxlen) -{ if (soap_element_begin_in(soap, tag, 1)) - { if (!tag || *tag != '-' || soap->error != SOAP_NO_TAG) - return NULL; - soap->error = SOAP_OK; - } - if (!p) - if (!(p = (wchar_t**)soap_malloc(soap, sizeof(wchar_t*)))) - return NULL; - if (soap->body) - { *p = soap_wstring_in(soap, 1, minlen, maxlen); - if (!*p || !(wchar_t*)soap_id_enter(soap, soap->id, *p, t, sizeof(wchar_t*), 0, NULL, NULL, NULL)) - return NULL; - } - else - *p = NULL; - p = (wchar_t**)soap_id_lookup(soap, soap->href, (void**)p, t, sizeof(wchar_t**), 0); - if (soap->body && soap_element_end_in(soap, tag)) - return NULL; - return p; -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_LEAN -static time_t -soap_timegm(struct tm *T) -{ -#if defined(HAVE_TIMEGM) - return timegm(T); -#elif defined(HAVE_GETTIMEOFDAY) - struct timezone t; - struct timeval tv; - memset((void*)&t, 0, sizeof(t)); - gettimeofday(&tv, &t); - T->tm_min -= t.tz_minuteswest - (t.tz_dsttime != 0)*60; - T->tm_isdst = 0; - return mktime(T); -/* WR[ */ - /* The following define was added for VxWorks*/ -#elif defined(HAVE_MKTIME) - /* FOR VXWORKS: - vxWorks does not seem to have any variable representation of time zones, but - timezone information can be set in INSTALL_DIR/target/h/private/timeP.h header - file, by setting the ZONEBUFFER define. The ZONEBUFFER define follows this - format: - name_of_zone:<(unused)>:time_in_minutes_from_UTC:daylight_start:daylight_end - To calculate local time, the value of time_in_minutes_from_UTC is subtracted - from UTC; time_in_minutes_from_UTC must be positive. Daylight information is - expressed as mmddhh (month-day-hour), for example: - UTC::0:040102:100102 - */ - return mktime(T); -/* ]WR */ -#elif defined(HAVE_FTIME) - struct timeb t; - memset((void*)&t, 0, sizeof(t)); - t.timezone = 0; - t.dstflag = -1; - ftime(&t); - T->tm_min -= t.timezone - (t.dstflag != 0)*60; - T->tm_isdst = 0; - return mktime(T); -#else -#warning "time_t (de)serialization is not MT safe on this platform" - time_t t; - char *tz = getenv("TZ"); - putenv("TZ=UTC"); - tzset(); - t = mktime(T); - if (tz) - { char tmp[16]; - strcpy(tmp, "TZ="); - strncat(tmp, tz, 12); - tmp[15] = '\0'; - putenv(tmp); - } - else - putenv("TZ="); - tzset(); - return t; -#endif -} -#endif - -/******************************************************************************/ -#ifndef WITH_LEAN -SOAP_FMAC1 -const char* -SOAP_FMAC2 -soap_dateTime2s(struct soap *soap, time_t n) -{ struct tm T; - struct tm *pT = &T; -#if defined(HAVE_GMTIME_R) - if (gmtime_r(&n, pT)) - strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%SZ", pT); -/* WR[ */ - /* The following defines were added for VxWorks*/ -#elif defined(HAVE_PGMTIME_R) - if (gmtime_r(&n, pT)) - strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%SZ", pT); -#elif defined(HAVE_PGMTIME) - if (gmtime(&n, pT)) - strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%SZ", pT); -/* ]WR */ -#elif defined(HAVE_GMTIME) - if ((pT = gmtime(&n))) - strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%SZ", pT); -#elif defined(HAVE_GETTIMEOFDAY) - struct timezone tz; - memset((void*)&tz, 0, sizeof(tz)); -#if defined(HAVE_LOCALTIME_R) - if (localtime_r(&n, pT)) - { struct timeval tv; - gettimeofday(&tv, &tz); - strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%S", pT); - sprintf(soap->tmpbuf + strlen(soap->tmpbuf), "%+03d:%02d", -tz.tz_minuteswest/60+(tz.tz_dsttime!=0), abs(tz.tz_minuteswest)%60); - } -#else - if ((pT = localtime(&n))) - { struct timeval tv; - gettimeofday(&tv, &tz); - strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%S", pT); - sprintf(soap->tmpbuf + strlen(soap->tmpbuf), "%+03d:%02d", -tz.tz_minuteswest/60+(tz.tz_dsttime!=0), abs(tz.tz_minuteswest)%60); - } -#endif -#elif defined(HAVE_FTIME) - struct timeb t; - memset((void*)&t, 0, sizeof(t)); -#if defined(HAVE_LOCALTIME_R) - if (localtime_r(&n, pT)) - { ftime(&t); - strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%S", pT); - sprintf(soap->tmpbuf + strlen(soap->tmpbuf), "%+03d:%02d", -t.timezone/60+(t.dstflag!=0), abs(t.timezone)%60); - } -/* WR[ */ - /* The following defines were added for VxWorks*/ -#elif defined(HAVE_PLOCALTIME_R) - if (localtime_r(&n, pT)) - { strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%S", pT); - sprintf(soap->tmpbuf+strlen(soap->tmpbuf), "%+03d:%02d", t.timezone/60, abs(t.timezone)%60); - } -/* ]WR */ -#else - if ((pT = localtime(&n))) - { ftime(&t); - strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%S", pT); - sprintf(soap->tmpbuf + strlen(soap->tmpbuf), "%+03d:%02d", -t.timezone/60+(t.dstflag!=0), abs(t.timezone)%60); - } -#endif -#elif defined(HAVE_LOCALTIME_R) - if (localtime_r(&n, pT)) - strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%S", pT); -/* WR[ */ - /* The following defines were added for VxWorks*/ -#elif defined(HAVE_PLOCALTIME_R) - if (localtime_r(&n, pT)) - strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%S", pT); -/* ]WR */ -#else - if ((pT = localtime(&n))) - strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%S", pT); -#endif - else - strcpy(soap->tmpbuf, "1969-12-31T23:59:59Z"); - return soap->tmpbuf; -} -#endif - -/******************************************************************************/ -#ifndef WITH_LEAN -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_outdateTime(struct soap *soap, const char *tag, int id, const time_t *p, const char *type, int n) -{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type) - || soap_string_out(soap, soap_dateTime2s(soap, *p), 0)) - return soap->error; - return soap_element_end_out(soap, tag); -} -#endif - -/******************************************************************************/ -#ifndef WITH_LEAN -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_s2dateTime(struct soap *soap, const char *s, time_t *p) -{ if (s) - { struct tm T; - char zone[16]; - memset((void*)&T, 0, sizeof(T)); - zone[sizeof(zone)-1] = '\0'; - sscanf(s, "%d-%d-%dT%d:%d:%d%15s", &T.tm_year, &T.tm_mon, &T.tm_mday, &T.tm_hour, &T.tm_min, &T.tm_sec, zone); - if (T.tm_year == 1) - T.tm_year = 70; - else - T.tm_year -= 1900; - T.tm_mon--; - if (*zone) - { if (*zone == '.') - { for (s = zone + 1; *s; s++) - if (*s < '0' || *s > '9') - break; - } - else - s = zone; - if (*s != 'Z') - { int h = 0, m = 0; - sscanf(s, "%d:%d", &h, &m); - T.tm_hour -= h; - if (h >= 0) - T.tm_min -= m; - else - T.tm_min += m; - } - *p = soap_timegm(&T); - } - else - *p = mktime(&T); /* no time zone: suppose it is localtime? */ - } - return soap->error; -} -#endif - -/******************************************************************************/ -#ifndef WITH_LEAN -SOAP_FMAC1 -time_t * -SOAP_FMAC2 -soap_indateTime(struct soap *soap, const char *tag, time_t *p, const char * type, int t) -{ if (soap_element_begin_in(soap, tag, 0)) - return NULL; - if (*soap->type - && soap_match_tag(soap, soap->type, type) - && soap_match_tag(soap, soap->type, ":dateTime")) - { soap->error = SOAP_TYPE; - soap_revert(soap); - return NULL; - } - p = (time_t*)soap_id_enter(soap, soap->id, p, t, sizeof(time_t), 0, NULL, NULL, NULL); - if (p) - { if (soap_s2dateTime(soap, soap_value(soap), p)) - return NULL; - } - p = (time_t*)soap_id_forward(soap, soap->href, p, t, 0, sizeof(time_t), 0, NULL); - if (soap->body && soap_element_end_in(soap, tag)) - return NULL; - return p; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_outliteral(struct soap *soap, const char *tag, char *const*p) -{ int i; - const char *t = NULL; - if (tag && *tag != '-') - { if ((t = strchr(tag, ':'))) - { strncpy(soap->tmpbuf, tag, t-tag); - soap->tmpbuf[t-tag] = '\0'; - for (i = 0; soap->local_namespaces[i].id; i++) - if (!strcmp(soap->tmpbuf, soap->local_namespaces[i].id)) - break; - t++; - sprintf(soap->tmpbuf, "<%s xmlns=\"%s\">", t, soap->local_namespaces[i].ns ? soap->local_namespaces[i].ns : SOAP_STR_EOS); - } - else - { t = tag; - sprintf(soap->tmpbuf, "<%s>", tag); - } - if (soap_send(soap, soap->tmpbuf)) - return soap->error; - } - if (p && *p) - { if (soap_send(soap, *p)) - return soap->error; - } - if (t) - { sprintf(soap->tmpbuf, "", t); - return soap_send(soap, soap->tmpbuf); - } - return SOAP_OK; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -char ** -SOAP_FMAC2 -soap_inliteral(struct soap *soap, const char *tag, char **p) -{ if (soap_element_begin_in(soap, tag, 1)) - { if (soap->error != SOAP_NO_TAG || soap_unget(soap, soap_get(soap)) == SOAP_TT) - return NULL; - soap->error = SOAP_OK; - } - if (!p) - if (!(p = (char**)soap_malloc(soap, sizeof(char*)))) - return NULL; - if (soap->null) - *p = NULL; - else - *p = soap_string_in(soap, 0, -1, -1); - if (soap->body && soap_element_end_in(soap, tag)) - return NULL; - return p; -} -#endif - -/******************************************************************************/ -#ifndef WITH_LEANER -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_outwliteral(struct soap *soap, const char *tag, wchar_t *const*p) -{ int i; - const char *t = NULL; - wchar_t c; - const wchar_t *s; - if (tag && *tag != '-') - { if (tag && (t = strchr(tag, ':'))) - { strncpy(soap->tmpbuf, tag, t-tag); - soap->tmpbuf[t-tag] = '\0'; - for (i = 0; soap->local_namespaces[i].id; i++) - if (!strcmp(soap->tmpbuf, soap->local_namespaces[i].id)) - break; - t++; - sprintf(soap->tmpbuf, "<%s xmlns=\"%s\">", t, soap->local_namespaces[i].ns ? soap->local_namespaces[i].ns : SOAP_STR_EOS); - } - else - { t = tag; - sprintf(soap->tmpbuf, "<%s>", tag); - } - if (soap_send(soap, soap->tmpbuf)) - return soap->error; - } - if (p) - { s = *p; - while ((c = *s++)) - if (soap_pututf8(soap, (unsigned char)c)) - return soap->error; - } - if (t) - { sprintf(soap->tmpbuf, "", t); - return soap_send(soap, soap->tmpbuf); - } - return SOAP_OK; -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_LEANER -#ifndef PALM_2 -SOAP_FMAC1 -wchar_t ** -SOAP_FMAC2 -soap_inwliteral(struct soap *soap, const char *tag, wchar_t **p) -{ if (soap_element_begin_in(soap, tag, 1)) - { if (soap->error != SOAP_NO_TAG || soap_unget(soap, soap_get(soap)) == SOAP_TT) - return NULL; - soap->error = SOAP_OK; - } - if (!p) - if (!(p = (wchar_t**)soap_malloc(soap, sizeof(wchar_t*)))) - return NULL; - if (soap->null) - *p = NULL; - else - *p = soap_wstring_in(soap, 0, -1, -1); - if (soap->body && soap_element_end_in(soap, tag)) - return NULL; - return p; -} -#endif -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -const char * -SOAP_FMAC2 -soap_value(struct soap *soap) -{ size_t i; - soap_wchar c = 0; - char *s = soap->tmpbuf; - if (!soap->body) - return SOAP_STR_EOS; - for (i = 0; i < sizeof(soap->tmpbuf) - 1; i++) - { c = soap_get(soap); - if (c == SOAP_TT || (int)c == EOF || soap_blank(c)) - break; - *s++ = (char)c; - } - if ((int)c == EOF || c == SOAP_TT) - soap_unget(soap, c); - *s = '\0'; - return soap->tmpbuf; /* return non-null pointer */ -} -#endif - -/******************************************************************************/ -#if !defined(WITH_LEANER) || !defined(WITH_NOHTTP) -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_getline(struct soap *soap, char *s, int len) -{ int i = len; - soap_wchar c = 0; - for (;;) - { while (--i > 0) - { c = soap_getchar(soap); - if (c == '\r' || c == '\n') - break; - if ((int)c == EOF) - return soap->error = SOAP_EOF; - *s++ = (char)c; - } - if (c != '\n') - c = soap_getchar(soap); /* got \r, now get \n */ - if (c == '\n') - { *s = '\0'; - if (i+1 == len) /* empty line: end of HTTP/MIME header */ - break; - c = soap_unget(soap, soap_getchar(soap)); - if (c != ' ' && c != '\t') /* HTTP line continuation? */ - break; - } - else if ((int)c == EOF) - return soap->error = SOAP_EOF; - } - return SOAP_OK; -} -#endif -#endif - -/******************************************************************************/ -#ifndef PALM_1 -static size_t -soap_count_attachments(struct soap *soap) -{ -#ifndef WITH_LEANER - register struct soap_multipart *content; - register size_t count = soap->count; - if (soap->mode & SOAP_ENC_DIME) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Calculating the size of DIME attachments\n")); - for (content = soap->dime.first; content; content = content->next) - { count += 12 + ((content->size+3)&(~3)); - if (content->id) - count += ((strlen(content->id)+3)&(~3)); - if (content->type) - count += ((strlen(content->type)+3)&(~3)); - if (content->options) - count += ((((unsigned char)content->options[2] << 8) | ((unsigned char)content->options[3]))+7)&(~3); - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Size of DIME attachment %lu bytes\n", (unsigned long)content->size)); - } - } - if ((soap->mode & SOAP_ENC_MIME) && soap->mime.boundary) - { register size_t n = strlen(soap->mime.boundary); - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Calculating the size of MIME attachments\n")); - for (content = soap->mime.first; content; content = content->next) - { register const char *s; - /* count \r\n--boundary\r\n */ - count += 6 + n; - /* count Content-Type: ...\r\n */ - if (content->type) - count += 16 + strlen(content->type); - s = soap_str_code(mime_codes, content->encoding); - /* count Content-Transfer-Encoding: ...\r\n */ - if (s) - count += 29 + strlen(s); - /* count Content-ID: ...\r\n */ - if (content->id) - count += 14 + strlen(content->id); - /* count Content-Location: ...\r\n */ - if (content->location) - count += 20 + strlen(content->location); - /* count Content-Description: ...\r\n */ - if (content->description) - count += 23 + strlen(content->location); - /* count \r\n...content */ - count += 2 + content->size; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Size of MIME attachment %lu bytes\n", (unsigned long)content->size)); - } - /* count \r\n--boundary--\r\n */ - count += 8 + n; - } - return count; -#else - return soap->count; -#endif -} -#endif - -/******************************************************************************/ -#ifndef WITH_LEANER -#ifndef PALM_1 -static int -soap_putdimefield(struct soap *soap, const char *s, size_t n) -{ if (soap_send_raw(soap, s, n)) - return soap->error; - return soap_send_raw(soap, SOAP_STR_PADDING, -(long)n&3); -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_LEANER -#ifndef PALM_1 -SOAP_FMAC1 -char * -SOAP_FMAC2 -soap_dime_option(struct soap *soap, unsigned short optype, const char *option) -{ size_t n; - char *s = NULL; - if (option) - { n = strlen(option); - s = (char*)soap_malloc(soap, n + 5); - if (s) - { s[0] = optype >> 8; - s[1] = optype & 0xFF; - s[2] = n >> 8; - s[3] = n & 0xFF; - strcpy(s + 4, option); - } - } - return s; -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_LEANER -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_putdimehdr(struct soap *soap) -{ unsigned char tmp[12]; - size_t optlen = 0, idlen = 0, typelen = 0; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Put DIME header id='%s'\n", soap->dime.id?soap->dime.id:"")); - if (soap->dime.options) - optlen = (((unsigned char)soap->dime.options[2] << 8) | ((unsigned char)soap->dime.options[3])) + 4; - if (soap->dime.id) - idlen = strlen(soap->dime.id); - if (soap->dime.type) - typelen = strlen(soap->dime.type); - tmp[0] = SOAP_DIME_VERSION | (soap->dime.flags & 0x7); - tmp[1] = soap->dime.flags & 0xF0; - tmp[2] = optlen >> 8; - tmp[3] = optlen & 0xFF; - tmp[4] = idlen >> 8; - tmp[5] = idlen & 0xFF; - tmp[6] = typelen >> 8; - tmp[7] = typelen & 0xFF; - tmp[8] = soap->dime.size >> 24; - tmp[9] = (soap->dime.size >> 16) & 0xFF; - tmp[10] = (soap->dime.size >> 8) & 0xFF; - tmp[11] = soap->dime.size & 0xFF; - if (soap_send_raw(soap, (char*)tmp, 12) - || soap_putdimefield(soap, soap->dime.options, optlen) - || soap_putdimefield(soap, soap->dime.id, idlen) - || soap_putdimefield(soap, soap->dime.type, typelen)) - return soap->error; - return SOAP_OK; -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_LEANER -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_putdime(struct soap *soap) -{ struct soap_multipart *content; - if (!(soap->mode & SOAP_ENC_DIME)) - return SOAP_OK; - for (content = soap->dime.first; content; content = content->next) - { void *handle; - soap->dime.size = content->size; - soap->dime.id = content->id; - soap->dime.type = content->type; - soap->dime.options = content->options; - soap->dime.flags = SOAP_DIME_VERSION | SOAP_DIME_MEDIA; - if (soap->fdimereadopen && ((handle = soap->fdimereadopen(soap, (void*)content->ptr, content->id, content->type, content->options)) || soap->error)) - { size_t size = content->size; - if (!handle) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "fdimereadopen failed\n")); - return soap->error; - } - if (!content->size && ((soap->mode & SOAP_ENC_XML) || (soap->mode & SOAP_IO) == SOAP_IO_CHUNK || (soap->mode & SOAP_IO) == SOAP_IO_STORE)) - { size_t chunksize = sizeof(soap->tmpbuf); - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Chunked streaming DIME\n")); - do - { size = soap->fdimeread(soap, handle, soap->tmpbuf, chunksize); - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "fdimeread returned %lu bytes\n", (unsigned long)size)); - if (size < chunksize) - { soap->dime.flags &= ~SOAP_DIME_CF; - if (!content->next) - soap->dime.flags |= SOAP_DIME_ME; - } - else - soap->dime.flags |= SOAP_DIME_CF; - soap->dime.size = size; - if (soap_putdimehdr(soap) - || soap_putdimefield(soap, soap->tmpbuf, size)) - break; - if (soap->dime.id) - { soap->dime.flags &= ~(SOAP_DIME_MB | SOAP_DIME_MEDIA); - soap->dime.id = NULL; - soap->dime.type = NULL; - soap->dime.options = NULL; - } - } while (size >= chunksize); - } - else - { if (!content->next) - soap->dime.flags |= SOAP_DIME_ME; - if (soap_putdimehdr(soap)) - return soap->error; - do - { size_t bufsize; - if (size < sizeof(soap->tmpbuf)) - bufsize = size; - else - bufsize = sizeof(soap->tmpbuf); - if (!(bufsize = soap->fdimeread(soap, handle, soap->tmpbuf, bufsize))) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "fdimeread failed: insufficient data (%lu bytes remaining from %lu bytes)\n", (unsigned long)size, (unsigned long)soap->dime.size)); - soap->error = SOAP_EOF; - break; - } - if (soap_send_raw(soap, soap->tmpbuf, bufsize)) - break; - size -= bufsize; - } while (size); - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "fdimereadclose\n")); - soap_send_raw(soap, SOAP_STR_PADDING, -(long)soap->dime.size&3); - } - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "fdimereadclose\n")); - if (soap->fdimereadclose) - soap->fdimereadclose(soap, handle); - } - else - { if (!content->next) - soap->dime.flags |= SOAP_DIME_ME; - if (soap_putdimehdr(soap) - || soap_putdimefield(soap, (char*)content->ptr, content->size)) - return soap->error; - } - } - return SOAP_OK; -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_LEANER -#ifndef PALM_1 -static char * -soap_getdimefield(struct soap *soap, size_t n) -{ register soap_wchar c; - register int i; - register char *s; - char *p = NULL; - if (n) - { p = (char*)soap_malloc(soap, n + 1); - if (p) - { s = p; - for (i = n; i > 0; i--) - { if ((int)(c = soap_get1(soap)) == EOF) - { soap->error = SOAP_EOF; - return NULL; - } - *s++ = (char)c; - } - *s = '\0'; - if ((soap->error = soap_move(soap, -(long)n&3))) - return NULL; - } - else - soap->error = SOAP_EOM; - } - return p; -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_LEANER -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_getdimehdr(struct soap *soap) -{ register soap_wchar c; - register char *s; - register int i; - unsigned char tmp[12]; - size_t optlen, idlen, typelen; - if (!(soap->mode & SOAP_ENC_DIME)) - return soap->error = SOAP_DIME_END; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Get DIME header\n")); - if (soap->dime.buflen || soap->dime.chunksize) - { if (soap_move(soap, (long)(soap->dime.size - soap_tell(soap)))) - return soap->error = SOAP_EOF; - soap_unget(soap, soap_getchar(soap)); /* skip padding and get hdr */ - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "... From chunked\n")); - return SOAP_OK; - } - s = (char*)tmp; - for (i = 12; i > 0; i--) - { if ((int)(c = soap_getchar(soap)) == EOF) - return soap->error = SOAP_EOF; - *s++ = (char)c; - } - if ((tmp[0] & 0xF8) != SOAP_DIME_VERSION) - return soap->error = SOAP_DIME_MISMATCH; - soap->dime.flags = (tmp[0] & 0x7) | (tmp[1] & 0xF0); - optlen = (tmp[2] << 8) | tmp[3]; - idlen = (tmp[4] << 8) | tmp[5]; - typelen = (tmp[6] << 8) | tmp[7]; - soap->dime.size = (tmp[8] << 24) | (tmp[9] << 16) | (tmp[10] << 8) | tmp[11]; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "DIME size=%lu flags=0x%X\n", (unsigned long)soap->dime.size, soap->dime.flags)); - if (!(soap->dime.options = soap_getdimefield(soap, optlen)) && soap->error) - return soap->error; - if (!(soap->dime.id = soap_getdimefield(soap, idlen)) && soap->error) - return soap->error; - if (!(soap->dime.type = soap_getdimefield(soap, typelen)) && soap->error) - return soap->error; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "DIME id=%s, type=%s, options=%s\n", soap->dime.id?soap->dime.id:"", soap->dime.type?soap->dime.type:"", soap->dime.options?soap->dime.options+4:"")); - if (soap->dime.flags & SOAP_DIME_ME) - soap->mode &= ~SOAP_ENC_DIME; - return SOAP_OK; -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_LEANER -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_getdime(struct soap *soap) -{ struct soap_multipart *content; - if (soap_getdimehdr(soap)) - return soap->error; - if (soap->fdimewriteopen && ((soap->dime.ptr = (char*)soap->fdimewriteopen(soap, soap->dime.id, soap->dime.type, soap->dime.options)) || soap->error)) - { const char *id, *type, *options; - size_t size, n; - if (!soap->dime.ptr) - return soap->error; - id = soap->dime.id; - type = soap->dime.type; - options = soap->dime.options; - for (;;) - { size = soap->dime.size; - for (;;) - { n = soap->buflen - soap->bufidx; - if (size < n) - n = size; - if ((soap->error = soap->fdimewrite(soap, (void*)soap->dime.ptr, soap->buf + soap->bufidx, n))) - break; - size -= n; - if (!size) - { soap->bufidx += n; - break; - } - if (soap_recv(soap)) - { soap->error = SOAP_EOF; - goto end; - } - } - if (soap_move(soap, -(long)soap->dime.size&3)) - { soap->error = SOAP_EOF; - break; - } - if (!(soap->dime.flags & SOAP_DIME_CF)) - break; - if (soap_getdimehdr(soap)) - break; - } -end: - if (soap->fdimewriteclose) - soap->fdimewriteclose(soap, (void*)soap->dime.ptr); - soap->dime.size = 0; - soap->dime.id = id; - soap->dime.type = type; - soap->dime.options = options; - } - else if (soap->dime.flags & SOAP_DIME_CF) - { const char *id, *type, *options; - register soap_wchar c; - register char *s; - register int i; - id = soap->dime.id; - type = soap->dime.type; - options = soap->dime.options; - if (soap_new_block(soap)) - return SOAP_EOM; - for (;;) - { s = (char*)soap_push_block(soap, soap->dime.size); - if (!s) - return soap->error = SOAP_EOM; - for (i = soap->dime.size; i > 0; i--) - { if ((int)(c = soap_get1(soap)) == EOF) - return soap->error = SOAP_EOF; - *s++ = (char)c; - } - if (soap_move(soap, -(long)soap->dime.size&3)) - return soap->error = SOAP_EOF; - if (!(soap->dime.flags & SOAP_DIME_CF)) - break; - if (soap_getdimehdr(soap)) - return soap->error; - } - soap->dime.size = soap->blist->size++; /* allocate one more for '\0' */ - if (!(soap->dime.ptr = soap_save_block(soap, NULL, 0))) - return soap->error; - soap->dime.ptr[soap->dime.size] = '\0'; /* force 0-terminated */ - soap->dime.id = id; - soap->dime.type = type; - soap->dime.options = options; - } - else - soap->dime.ptr = soap_getdimefield(soap, soap->dime.size); - content = soap_new_multipart(soap, &soap->dime.first, &soap->dime.last, soap->dime.ptr, soap->dime.size); - if (!content) - return soap->error = SOAP_EOM; - content->id = soap->dime.id; - content->type = soap->dime.type; - content->options = soap->dime.options; - return soap->error; -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_LEANER -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_getmimehdr(struct soap *soap) -{ struct soap_multipart *content; - do - { if (soap_getline(soap, soap->msgbuf, sizeof(soap->msgbuf))) - return soap->error; - } - while (!*soap->msgbuf); - if (soap->msgbuf[0] == '-' && soap->msgbuf[1] == '-') - { char *s = soap->msgbuf + strlen(soap->msgbuf) - 1; - /* remove white space */ - while (soap_blank(*s)) - s--; - s[1] = '\0'; - if (soap->mime.boundary) - { if (strcmp(soap->msgbuf + 2, soap->mime.boundary)) - return soap->error = SOAP_MIME_ERROR; - } - else - soap->mime.boundary = soap_strdup(soap, soap->msgbuf + 2); - if (soap_getline(soap, soap->msgbuf, sizeof(soap->msgbuf))) - return soap->error; - } - if (soap_set_mime_attachment(soap, NULL, 0, SOAP_MIME_NONE, NULL, NULL, NULL, NULL)) - return soap->error = SOAP_EOM; - content = soap->mime.last; - for (;;) - { register char *key = soap->msgbuf; - register char *val; - if (!*key) - break; - DBGLOG(TEST,SOAP_MESSAGE(fdebug, "MIME header: %s\n", key)); - val = strchr(soap->msgbuf, ':'); - if (val) - { *val = '\0'; - do val++; - while (*val && *val <= 32); - if (!soap_tag_cmp(key, "Content-ID")) - content->id = soap_strdup(soap, val); - else if (!soap_tag_cmp(key, "Content-Location")) - content->location = soap_strdup(soap, val); - else if (!soap_tag_cmp(key, "Content-Type")) - content->type = soap_strdup(soap, val); - else if (!soap_tag_cmp(key, "Content-Description")) - content->description = soap_strdup(soap, val); - else if (!soap_tag_cmp(key, "Content-Transfer-Encoding")) - content->encoding = (enum soap_mime_encoding)soap_int_code(mime_codes, val, (long)SOAP_MIME_NONE); - } - if (soap_getline(soap, key, sizeof(soap->msgbuf))) - return soap->error; - } - return SOAP_OK; -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_LEANER -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_getmime(struct soap *soap) -{ register soap_wchar c; - if (!soap->mime.last) - return SOAP_OK; - for (;;) - { register size_t i, m = 0; - register char *s, *t = NULL; - struct soap_multipart *content = soap->mime.last; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Parsing MIME content id=%s type=%s\n", content->id?content->id:"", content->type?content->type:"")); - if (soap_new_block(soap)) - return soap->error = SOAP_EOM; - for (;;) - { if (!(s = (char*)soap_push_block(soap, SOAP_BLKLEN))) - return soap->error = SOAP_EOM; - for (i = 0; i < SOAP_BLKLEN; i++) - { if (m > 0) - { *s++ = *t++; - m--; - } - else - { c = soap_get1(soap); - if ((int)c == EOF) - return soap->error = SOAP_EOF; - if (c == '\r') - { t = soap->tmpbuf; - memset(t, 0, sizeof(soap->tmpbuf)); - strcpy(t, "\n--"); - strncat(t, soap->mime.boundary, sizeof(soap->tmpbuf)-4); - do c = soap_getchar(soap); - while (c == *t++); - if ((int)c == EOF) - return soap->error = SOAP_EOF; - if (!*--t) - goto end; - *t = (char)c; - m = t - soap->tmpbuf + 1; - t = soap->tmpbuf; - c = '\r'; - } - *s++ = (char)c; - } - } - } -end: - *s = '\0'; /* force 0-terminated */ - content->size = soap_size_block(soap, i+1)-1; - content->ptr = soap_save_block(soap, NULL, 0); - if (c == '-' && soap_getchar(soap) == '-') - break; - while (c != '\r' && (int)c != EOF && soap_blank(c)) - c = soap_getchar(soap); - if (c != '\r' || soap_getchar(soap) != '\n') - return soap->error = SOAP_MIME_ERROR; - if (soap_getmimehdr(soap)) - return soap->error; - } - do c = soap_getchar(soap); - while ((int)c != EOF && c != '\r'); - if ((int)c == EOF) - return soap->error = SOAP_EOF; - if (soap_getchar(soap) != '\n') - return soap->error = SOAP_MIME_ERROR; - return SOAP_OK; -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_LEANER -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_putmimehdr(struct soap *soap, struct soap_multipart *content) -{ const char *s; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "MIME attachment type=%s\n", content->type?content->type:"")); - if (soap_send3(soap, "\r\n--", soap->mime.boundary, "\r\n")) - return soap->error; - if (content->type && soap_send3(soap, "Content-Type: ", content->type, "\r\n")) - return soap->error; - s = soap_str_code(mime_codes, content->encoding); - if (s && soap_send3(soap, "Content-Transfer-Encoding: ", s, "\r\n")) - return soap->error; - if (content->id && soap_send3(soap, "Content-ID: ", content->id, "\r\n")) - return soap->error; - if (content->location && soap_send3(soap, "Content-Location: ", content->location, "\r\n")) - return soap->error; - if (content->description && soap_send3(soap, "Content-Description: ", content->description, "\r\n")) - return soap->error; - return soap_send_raw(soap, "\r\n", 2); -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_LEANER -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_putmime(struct soap *soap) -{ struct soap_multipart *content; - if (!(soap->mode & SOAP_ENC_MIME) || !soap->mime.boundary) - return SOAP_OK; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Sending MIME attachments\n")); - for (content = soap->mime.first; content; content = content->next) - if (soap_putmimehdr(soap, content) - || soap_send_raw(soap, content->ptr, content->size)) - return soap->error; - return soap_send3(soap, "\r\n--", soap->mime.boundary, "--\r\n"); -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_LEANER -#ifndef PALM_1 -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_set_dime(struct soap *soap) -{ soap->omode |= SOAP_ENC_DIME; - soap->dime.first = NULL; - soap->dime.last = NULL; -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_LEANER -#ifndef PALM_1 -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_set_mime(struct soap *soap, const char *boundary, const char *start) -{ soap->omode |= SOAP_ENC_MIME; - soap->mime.first = NULL; - soap->mime.last = NULL; - soap->mime.boundary = soap_strdup(soap, boundary); - soap->mime.start = soap_strdup(soap, start); -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_LEANER -#ifndef PALM_1 -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_clr_dime(struct soap *soap) -{ soap->omode &= ~SOAP_ENC_DIME; - soap->dime.first = NULL; - soap->dime.last = NULL; -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_LEANER -#ifndef PALM_1 -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_clr_mime(struct soap *soap) -{ soap->omode &= ~SOAP_ENC_MIME; - soap->mime.first = NULL; - soap->mime.last = NULL; - soap->mime.boundary = NULL; - soap->mime.start = NULL; -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_LEANER -#ifndef PALM_1 -static struct soap_multipart* -soap_new_multipart(struct soap *soap, struct soap_multipart **first, struct soap_multipart **last, char *ptr, size_t size) -{ struct soap_multipart *content; - content = (struct soap_multipart*)soap_malloc(soap, sizeof(struct soap_multipart)); - if (content) - { content->next = NULL; - content->ptr = ptr; - content->size = size; - content->id = NULL; - content->type = NULL; - content->options = NULL; - content->encoding = SOAP_MIME_NONE; - content->location = NULL; - content->description = NULL; - if (!*first) - *first = content; - if (*last) - (*last)->next = content; - *last = content; - } - return content; -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_LEANER -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_set_dime_attachment(struct soap *soap, char *ptr, size_t size, const char *type, const char *id, unsigned short optype, const char *option) -{ struct soap_multipart *content = soap_new_multipart(soap, &soap->dime.first, &soap->dime.last, ptr, size); - if (!content) - return SOAP_EOM; - content->id = soap_strdup(soap, id); - content->type = soap_strdup(soap, type); - content->options = soap_dime_option(soap, optype, option); - return SOAP_OK; -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_LEANER -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_set_mime_attachment(struct soap *soap, char *ptr, size_t size, enum soap_mime_encoding encoding, const char *type, const char *id, const char *location, const char *description) -{ struct soap_multipart *content = soap_new_multipart(soap, &soap->mime.first, &soap->mime.last, ptr, size); - if (!content) - return SOAP_EOM; - content->id = soap_strdup(soap, id); - content->type = soap_strdup(soap, type); - content->encoding = encoding; - content->location = soap_strdup(soap, location); - content->description = soap_strdup(soap, description); - return SOAP_OK; -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_LEANER -#ifndef PALM_1 -SOAP_FMAC1 -struct soap_multipart* -SOAP_FMAC2 -soap_next_multipart(struct soap_multipart *content) -{ if (content) - return content->next; - return NULL; -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_LEANER -#ifndef PALM_1 -static void -soap_select_mime_boundary(struct soap *soap) -{ while (!soap->mime.boundary || soap_valid_mime_boundary(soap)) - { register char *s = soap->mime.boundary; - register size_t n = 0; - if (s) - n = strlen(s); - if (n < 16) - { n = 72; - s = soap->mime.boundary = (char*)soap_malloc(soap, n + 1); - if (!s) - return; - } - strcpy(s, "<>"); - s += 2; - n -= 4; - while (n) - { *s++ = soap_base64o[rand()&0x3F]; - n--; - } - strcpy(s, "<>"); - } - if (!soap->mime.start) - soap->mime.start = ""; -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_LEANER -#ifndef PALM_1 -static int -soap_valid_mime_boundary(struct soap *soap) -{ register struct soap_multipart *content; - register size_t k = strlen(soap->mime.boundary); - for (content = soap->mime.first; content; content = content->next) - { if (content->ptr && content->size >= k) - { register const char *p = (const char*)content->ptr; - register size_t i; - for (i = 0; i < content->size - k; i++, p++) - if (!strncmp(p, soap->mime.boundary, k)) - return SOAP_ERR; - } - } - return SOAP_OK; -} -#endif -#endif - -/******************************************************************************/ - -#ifdef WITH_COOKIES -/******************************************************************************/ -SOAP_FMAC1 -size_t -SOAP_FMAC2 -soap_encode_cookie(const char *s, char *t, size_t len) -{ register int c; - register size_t n = len; - while ((c = *s++) && --n > 0) - { if (c > ' ' && c < 128 && !strchr("()<>@,;:\\\"/[]?={}", c)) - *t++ = c; - else if (n > 2) - { *t++ = '%'; - *t++ = (c >> 4) + (c > 159 ? '7' : '0'); - c &= 0xF; - *t++ = c + (c > 9 ? '7' : '0'); - n -= 2; - } - else - break; - } - *t = '\0'; - return len - n; -} - -/******************************************************************************/ -SOAP_FMAC1 -struct soap_cookie* -SOAP_FMAC2 -soap_cookie(struct soap *soap, const char *name, const char *domain, const char *path) -{ struct soap_cookie *p; - size_t n; - if (!domain) - domain = soap->cookie_domain; - if (!path) - path = soap->cookie_path; - if (*path == '/') - path++; - n = strlen(path); - for (p = soap->cookies; p; p = p->next) - if (!strcmp(p->name, name) - && domain - && p->domain - && !strcmp(p->domain, domain) - && !strncmp(p->path, path, n)) - break; - return p; -} - -/******************************************************************************/ -SOAP_FMAC1 -struct soap_cookie* -SOAP_FMAC2 -soap_set_cookie(struct soap *soap, const char *name, const char *value, const char *domain, const char *path) -{ struct soap_cookie **p, *q; - int n; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Set cookie: %s=%s domain=%s path=%s\n", name, value?value:"", domain?domain:"", path?path:"")); - if (!domain) - domain = soap->cookie_domain; - if (!path) - path = soap->cookie_path; - if (!path) - { soap_set_receiver_error(soap, "Cookie path not set", NULL, SOAP_HTTP_ERROR); - return NULL; - } - if (*path == '/') - path++; - q = soap_cookie(soap, name, domain, path); - if (!q) - { if ((q = (struct soap_cookie*)SOAP_MALLOC(sizeof(struct soap_cookie)))) - { if ((q->name = (char*)SOAP_MALLOC(strlen(name)+1))) - strcpy(q->name, name); - q->value = NULL; - q->domain = NULL; - q->path = NULL; - q->expire = -1; - q->version = 0; - q->secure = 0; - q->env = 0; - q->modified = 0; - for (p = &soap->cookies, n = soap->cookie_max; *p && n; p = &(*p)->next, n--) - if (!strcmp((*p)->name, name) && (*p)->path && strcmp((*p)->path, path) < 0) - break; - if (n) - { q->next = *p; - *p = q; - } - else - { SOAP_FREE(q->name); - SOAP_FREE(q); - q = NULL; - } - } - } - else - q->modified = 1; - if (q) - { if (q->value) - { SOAP_FREE(q->value); - q->value = NULL; - } - if (q->domain) - { SOAP_FREE(q->domain); - q->domain = NULL; - } - if (q->path) - { SOAP_FREE(q->path); - q->path = NULL; - } - if (value && *value && (q->value = (char*)SOAP_MALLOC(strlen(value)+1))) - strcpy(q->value, value); - if (domain && *domain && (q->domain = (char*)SOAP_MALLOC(strlen(domain)+1))) - strcpy(q->domain, domain); - if (path && *path && (q->path = (char*)SOAP_MALLOC(strlen(path)+1))) - strcpy(q->path, path); - q->session = 1; - } - return q; -} - -/******************************************************************************/ -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_clr_cookie(struct soap *soap, const char *name, const char *domain, const char *path) -{ struct soap_cookie **p, *q; - if (!domain) - domain = soap->cookie_domain; - if (!domain) - { soap_set_receiver_error(soap, "Cookie domain not set", SOAP_STR_EOS, SOAP_HTTP_ERROR); - return; - } - if (!path) - path = soap->cookie_path; - if (!path) - { soap_set_receiver_error(soap, "Cookie path not set", SOAP_STR_EOS, SOAP_HTTP_ERROR); - return; - } - if (*path == '/') - path++; - for (p = &soap->cookies, q = *p; q; q = *p) - if (!strcmp(q->name, name) && !strcmp(q->domain, domain) && !strncmp(q->path, path, strlen(q->path))) - { if (q->value) - SOAP_FREE(q->value); - if (q->domain) - SOAP_FREE(q->domain); - if (q->path) - SOAP_FREE(q->path); - *p = q->next; - SOAP_FREE(q); - } - else - p = &q->next; -} - -/******************************************************************************/ -SOAP_FMAC1 -char * -SOAP_FMAC2 -soap_cookie_value(struct soap *soap, const char *name, const char *domain, const char *path) -{ struct soap_cookie *p; - if ((p = soap_cookie(soap, name, domain, path))) - return p->value; - return NULL; -} - -/******************************************************************************/ -SOAP_FMAC1 -long -SOAP_FMAC2 -soap_cookie_expire(struct soap *soap, const char *name, const char *domain, const char *path) -{ struct soap_cookie *p; - if ((p = soap_cookie(soap, name, domain, path))) - return p->expire; - return -1; -} - -/******************************************************************************/ -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_set_cookie_expire(struct soap *soap, const char *name, long expire, const char *domain, const char *path) -{ struct soap_cookie *p; - if ((p = soap_cookie(soap, name, domain, path))) - { p->expire = expire; - p->modified = 1; - return SOAP_OK; - } - return SOAP_ERR; -} - -/******************************************************************************/ -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_set_cookie_session(struct soap *soap, const char *name, const char *domain, const char *path) -{ struct soap_cookie *p; - if ((p = soap_cookie(soap, name, domain, path))) - { p->session = 1; - p->modified = 1; - return SOAP_OK; - } - return SOAP_ERR; -} - -/******************************************************************************/ -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_clr_cookie_session(struct soap *soap, const char *name, const char *domain, const char *path) -{ struct soap_cookie *p; - if ((p = soap_cookie(soap, name, domain, path))) - { p->session = 0; - p->modified = 1; - return SOAP_OK; - } - return SOAP_ERR; -} - -/******************************************************************************/ -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_putsetcookies(struct soap *soap) -{ struct soap_cookie *p; - char *s, tmp[4096]; - const char *t; - for (p = soap->cookies; p; p = p->next) - { if (p->modified || !p->env) - { s = tmp; - if (p->name) - s += soap_encode_cookie(p->name, s, tmp-s+4064); - if (p->value && *p->value) - { *s++ = '='; - s += soap_encode_cookie(p->value, s, tmp-s+4064); - } - if (p->domain && (int)strlen(p->domain) < tmp-s+4064) - sprintf(s, ";Domain=\"%s\"", p->domain); - else if (soap->cookie_domain && (int)strlen(soap->cookie_domain) < tmp-s+4064) - sprintf(s, ";Domain=\"%s\"", soap->cookie_domain); - strcat(s, ";Path=\"/"); - if (p->path) - t = p->path; - else - t = soap->cookie_path; - if (t) - { if (*t == '/') - t++; - if ((int)strlen(t) < tmp-s+4064) - strcat(s, t); - } - s += strlen(s); - *s++ = '"'; - if (p->version > 0) - sprintf(s, ";Version=%u", p->version); - if (p->expire >= 0) - sprintf(s, ";Max-Age=%ld", p->expire); - if (p->secure) - strcat(s, ";Secure"); - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Set-Cookie: %s\n", tmp)); - if (soap->fposthdr(soap, "Set-Cookie", tmp)) - return soap->error; - } - } - return SOAP_OK; -} - -/******************************************************************************/ -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_putcookies(struct soap *soap, const char *domain, const char *path, int secure) -{ struct soap_cookie **p, *q; - unsigned int version = 0; - time_t now = time(NULL); - char *s, tmp[4096]; - p = &soap->cookies; - while ((q = *p)) - { if (q->expire && now > q->expire) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Cookie %s expired\n", q->name)); - SOAP_FREE(q->name); - if (q->value) - SOAP_FREE(q->value); - if (q->domain) - SOAP_FREE(q->domain); - if (q->path) - SOAP_FREE(q->path); - *p = q->next; - SOAP_FREE(q); - } - else if ((!q->domain || !strcmp(q->domain, domain)) - && (!q->path || !strncmp(q->path, path, strlen(q->path))) - && (!q->secure || secure)) - { s = tmp; - if (q->version != version) - { sprintf(s, "$Version=%u;", q->version); - version = q->version; - } - if (q->name) - s += soap_encode_cookie(q->name, s, tmp-s+4080); - if (q->value && *q->value) - { *s++ = '='; - s += soap_encode_cookie(q->value, s, tmp-s+4080); - } - if (q->path && (int)strlen(q->path) < tmp-s+4080) - { sprintf(s, ";$Path=\"/%s\"", q->path); - s += strlen(s); - } - if (q->domain && (int)strlen(q->domain) < tmp-s+4080) - sprintf(s, ";$Domain=\"%s\"", q->domain); - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Cookie: %s\n", tmp)); - if (soap->fposthdr(soap, "Cookie", tmp)) - return soap->error; - p = &q->next; - } - else - p = &q->next; - } - return SOAP_OK; -} - -/******************************************************************************/ -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_getcookies(struct soap *soap, const char *val) -{ struct soap_cookie *p = NULL, *q; - const char *s; - char *t, tmp[4096]; /* cookie size is up to 4096 bytes [RFC2109] */ - char *domain = NULL; - char *path = NULL; - unsigned int version = 0; - time_t now = time(NULL); - if (!val) - return; - s = val; - while (*s) - { s = soap_decode_key(tmp, sizeof(tmp), s); - if (!soap_tag_cmp(tmp, "$Version")) - { if ((s = soap_decode_val(tmp, sizeof(tmp), s))) - { if (p) - p->version = (int)atol(tmp); - else - version = (int)atol(tmp); - } - } - else if (!soap_tag_cmp(tmp, "$Path")) - { s = soap_decode_val(tmp, sizeof(tmp), s); - if (*tmp) - { if ((t = (char*)SOAP_MALLOC(strlen(tmp)+1))) - strcpy(t, tmp); - } - else - t = NULL; - if (p) - { if (p->path) - SOAP_FREE(p->path); - p->path = t; - } - else - { if (path) - SOAP_FREE(path); - path = t; - } - } - else if (!soap_tag_cmp(tmp, "$Domain")) - { s = soap_decode_val(tmp, sizeof(tmp), s); - if (*tmp) - { if ((t = (char*)SOAP_MALLOC(strlen(tmp)+1))) - strcpy(t, tmp); - } - else - t = NULL; - if (p) - { if (p->domain) - SOAP_FREE(p->domain); - p->domain = t; - } - else - { if (domain) - SOAP_FREE(domain); - domain = t; - } - } - else if (p && !soap_tag_cmp(tmp, "Path")) - { if (p->path) - SOAP_FREE(p->path); - s = soap_decode_val(tmp, sizeof(tmp), s); - if (*tmp) - { if ((p->path = (char*)SOAP_MALLOC(strlen(tmp)+1))) - strcpy(p->path, tmp); - } - else - p->path = NULL; - } - else if (p && !soap_tag_cmp(tmp, "Domain")) - { if (p->domain) - SOAP_FREE(p->domain); - s = soap_decode_val(tmp, sizeof(tmp), s); - if (*tmp) - { if ((p->domain = (char*)SOAP_MALLOC(strlen(tmp)+1))) - strcpy(p->domain, tmp); - } - else - p->domain = NULL; - } - else if (p && !soap_tag_cmp(tmp, "Version")) - { s = soap_decode_val(tmp, sizeof(tmp), s); - p->version = (unsigned int)atol(tmp); - } - else if (p && !soap_tag_cmp(tmp, "Max-Age")) - { s = soap_decode_val(tmp, sizeof(tmp), s); - p->expire = now + atol(tmp); - } - else if (p && !soap_tag_cmp(tmp, "Expires")) - { struct tm T; - char a[3]; - static const char mns[] = "anebarprayunulugepctovec"; - s = soap_decode_val(tmp, sizeof(tmp), s); - if (strlen(tmp) > 20) - { memset((void*)&T, 0, sizeof(T)); - a[0] = tmp[4]; - a[1] = tmp[5]; - a[2] = '\0'; - T.tm_mday = (int)atol(a); - a[0] = tmp[8]; - a[1] = tmp[9]; - T.tm_mon = (strstr(mns, a) - mns) / 2; - a[0] = tmp[11]; - a[1] = tmp[12]; - T.tm_year = 100 + (int)atol(a); - a[0] = tmp[13]; - a[1] = tmp[14]; - T.tm_hour = (int)atol(a); - a[0] = tmp[16]; - a[1] = tmp[17]; - T.tm_min = (int)atol(a); - a[0] = tmp[19]; - a[1] = tmp[20]; - T.tm_sec = (int)atol(a); - p->expire = soap_timegm(&T); - } - } - else if (p && !soap_tag_cmp(tmp, "Secure")) - p->secure = 1; - else - { if (p) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Got environment cookie %s=%s domain=%s path=%s expire=%ld secure=%d\n", p->name, p->value?p->value:"", p->domain?p->domain:"", p->path?p->path:"", p->expire, p->secure)); - if ((q = soap_set_cookie(soap, p->name, p->value, p->domain, p->path))) - { q->version = p->version; - q->expire = p->expire; - q->secure = p->secure; - q->env = 1; - } - if (p->name) - SOAP_FREE(p->name); - if (p->value) - SOAP_FREE(p->value); - if (p->domain) - SOAP_FREE(p->domain); - if (p->path) - SOAP_FREE(p->path); - SOAP_FREE(p); - } - if ((p = (struct soap_cookie*)SOAP_MALLOC(sizeof(struct soap_cookie)))) - { p->name = (char*)SOAP_MALLOC(strlen(tmp)+1); - strcpy(p->name, tmp); - s = soap_decode_val(tmp, sizeof(tmp), s); - if (*tmp) - { p->value = (char*)SOAP_MALLOC(strlen(tmp)+1); - strcpy(p->value, tmp); - } - else - p->value = NULL; - p->domain = domain; - p->path = path; - p->expire = 0; - p->secure = 0; - p->version = version; - } - } - } - if (p) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Got cookie %s=%s domain=%s path=%s expire=%ld secure=%d\n", p->name, p->value?p->value:"", p->domain?p->domain:"", p->path?p->path:"", p->expire, p->secure)); - if ((q = soap_set_cookie(soap, p->name, p->value, p->domain, p->path))) - { q->version = p->version; - q->expire = p->expire; - q->secure = p->secure; - } - if (p->name) - SOAP_FREE(p->name); - if (p->value) - SOAP_FREE(p->value); - if (p->domain) - SOAP_FREE(p->domain); - if (p->path) - SOAP_FREE(p->path); - SOAP_FREE(p); - } - if (domain) - SOAP_FREE(domain); - if (path) - SOAP_FREE(path); -} - -/******************************************************************************/ -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_getenv_cookies(struct soap *soap) -{ struct soap_cookie *p; - const char *s; - char key[4096], val[4096]; /* cookie size is up to 4096 bytes [RFC2109] */ - if (!(s = getenv("HTTP_COOKIE"))) - return SOAP_ERR; - do - { s = soap_decode_key(key, sizeof(key), s); - s = soap_decode_val(val, sizeof(val), s); - p = soap_set_cookie(soap, key, val, NULL, NULL); - if (p) - p->env = 1; - } while (*s); - return SOAP_OK; -} - -/******************************************************************************/ -SOAP_FMAC1 -struct soap_cookie* -SOAP_FMAC2 -soap_copy_cookies(struct soap *soap) -{ struct soap_cookie *p, **q, *r; - q = &r; - for (p = soap->cookies; p; p = p->next) - { if (!(*q = (struct soap_cookie*)SOAP_MALLOC(sizeof(struct soap_cookie)))) - return r; - **q = *p; - if (p->name) - { if (((*q)->name = (char*)SOAP_MALLOC(strlen(p->name)+1))) - strcpy((*q)->name, p->name); - } - if (p->value) - { if (((*q)->value = (char*)SOAP_MALLOC(strlen(p->value)+1))) - strcpy((*q)->value, p->value); - } - if (p->domain) - { if (((*q)->domain = (char*)SOAP_MALLOC(strlen(p->domain)+1))) - strcpy((*q)->domain, p->domain); - } - if (p->path) - { if (((*q)->path = (char*)SOAP_MALLOC(strlen(p->path)+1))) - strcpy((*q)->path, p->path); - } - q = &(*q)->next; - } - *q = NULL; - return r; -} - -/******************************************************************************/ -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_free_cookies(struct soap *soap) -{ struct soap_cookie *p; - for (p = soap->cookies; p; p = soap->cookies) - { soap->cookies = p->next; - SOAP_FREE(p->name); - if (p->value) - SOAP_FREE(p->value); - if (p->domain) - SOAP_FREE(p->domain); - if (p->path) - SOAP_FREE(p->path); - SOAP_FREE(p); - } -} - -/******************************************************************************/ -#endif /* WITH_COOKIES */ - -/******************************************************************************/ -#ifdef WITH_GZIP -#ifndef PALM_1 -static int -soap_getgziphdr(struct soap *soap) -{ int i; - soap_wchar c, f = 0; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Get gzip header\n")); - for (i = 0; i < 9; i++) - { if ((int)(c = soap_get1(soap) == EOF)) - return soap->error = SOAP_EOF; - if (i == 2) - f = c; - } - if (f & 0x04) /* FEXTRA */ - { for (i = soap_get1(soap) | (soap_get1(soap) << 8); i; i--) - if ((int)soap_get1(soap) == EOF) - return soap->error = SOAP_EOF; - } - if (f & 0x08) /* FNAME */ - do - c = soap_get1(soap); - while (c && (int)c != EOF); - if ((int)c != EOF && (f & 0x10)) /* FCOMMENT */ - do - c = soap_get1(soap); - while (c && (int)f != EOF); - if ((int)c != EOF && (f & 0x01)) /* FHCRC */ - { if ((int)(c = soap_get1(soap)) != EOF) - c = soap_get1(soap); - } - if ((int)c == EOF) - return soap->error = SOAP_EOF; - return SOAP_OK; -} -#endif -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_begin_recv(struct soap *soap) -{ soap_wchar c; - soap->error = SOAP_OK; - soap_free(soap); - soap_set_local_namespaces(soap); - soap->version = 0; /* don't assume we're parsing SOAP content by default */ -#ifndef WITH_NOIDREF - soap_free_iht(soap); -#endif - if ((soap->imode & SOAP_IO) == SOAP_IO_CHUNK) - soap->omode |= SOAP_IO_CHUNK; - soap->imode &= ~SOAP_IO; - soap->mode = soap->imode; - if (!soap->keep_alive) - { soap->buflen = 0; - soap->bufidx = 0; - } - if (!(soap->mode & SOAP_IO_KEEPALIVE)) - soap->keep_alive = 0; - soap->ahead = 0; - soap->peeked = 0; - soap->level = 0; - soap->part = SOAP_BEGIN; - soap->alloced = 0; - soap->count = 0; - soap->length = 0; - soap->cdata = 0; - *soap->endpoint = '\0'; - soap->userid = NULL; - soap->passwd = NULL; - soap->action = NULL; - soap->authrealm = NULL; -#ifndef WITH_LEANER - soap->dime.chunksize = 0; - soap->dime.buflen = 0; - soap->dime.list = NULL; - soap->dime.first = NULL; - soap->dime.last = NULL; - soap->mime.list = NULL; - soap->mime.first = NULL; - soap->mime.last = NULL; - soap->mime.boundary = NULL; - soap->mime.start = NULL; -#endif -#ifdef WIN32 -#ifndef UNDER_CE -#ifndef WITH_FASTCGI - if (!soap_valid_socket(soap->socket)) -#ifdef __BORLANDC__ - setmode((SOAP_SOCKET)soap->recvfd, O_BINARY); -#else - _setmode((SOAP_SOCKET)soap->recvfd, _O_BINARY); -#endif -#endif -#endif -#endif -#ifdef WITH_ZLIB - soap->mode &= ~SOAP_ENC_ZLIB; - soap->zlib_in = SOAP_ZLIB_NONE; - soap->zlib_out = SOAP_ZLIB_NONE; - soap->d_stream.next_in = Z_NULL; - soap->d_stream.avail_in = 0; - soap->d_stream.next_out = (Byte*)soap->buf; - soap->d_stream.avail_out = SOAP_BUFLEN; - soap->z_ratio_in = 1.0; -#endif -#ifndef WITH_LEANER - if (soap->fprepareinit) - soap->fprepareinit(soap); -#endif - c = soap_getchar(soap); -#ifdef WITH_GZIP - if (c == 0x1F) - { if (soap_getgziphdr(soap)) - return soap->error; - if (inflateInit2(&soap->d_stream, -MAX_WBITS) != Z_OK) - return soap->error = SOAP_ZLIB_ERROR; - soap->zlib_state = SOAP_ZLIB_INFLATE; - soap->mode |= SOAP_ENC_ZLIB; - soap->zlib_in = SOAP_ZLIB_GZIP; - soap->z_crc = crc32(0L, NULL, 0); - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "gzip initialized\n")); - memcpy(soap->z_buf, soap->buf, SOAP_BUFLEN); - /* should not chunk over plain transport, so why bother to check? */ - /* if ((soap->mode & SOAP_IO) == SOAP_IO_CHUNK) */ - /* soap->z_buflen = soap->bufidx; */ - /* else */ - soap->d_stream.next_in = (Byte*)(soap->z_buf + soap->bufidx); - soap->d_stream.avail_in = soap->buflen - soap->bufidx; - soap->z_buflen = soap->buflen; - soap->buflen = soap->bufidx; - c = soap_getchar(soap); - } -#endif -#ifndef WITH_LEANER - if (c == '-' && soap_get0(soap) == '-') - soap->mode |= SOAP_ENC_MIME; - else if ((c & 0xFFFC) == (SOAP_DIME_VERSION | SOAP_DIME_MB) && (soap_get0(soap) & 0xFFF0) == 0x20) - soap->mode |= SOAP_ENC_DIME; - else -#endif - { while (soap_blank(c)) - c = soap_getchar(soap); - } - if ((int)c == EOF) - return soap->error = SOAP_EOF; - soap_unget(soap, c); -#ifndef WITH_NOHTTP - if (c != '<' && !(soap->mode & (SOAP_ENC_DIME | SOAP_ENC_ZLIB))) - { soap->mode &= ~SOAP_IO; - if ((soap->error = soap->fparse(soap))) - { soap->keep_alive = 0; /* force close later */ - return soap->error; - } - if ((soap->mode & SOAP_IO) == SOAP_IO_CHUNK) - { soap->chunkbuflen = soap->buflen; - soap->buflen = soap->bufidx; - soap->chunksize = 0; - } -#ifndef WITH_LEANER - else if (soap->fpreparerecv && soap->buflen != soap->bufidx) - soap->fpreparerecv(soap, soap->buf + soap->bufidx, soap->buflen - soap->bufidx); -#endif -#ifdef WITH_ZLIB - if (soap->zlib_in) - { /* fparse should not use soap_unget to push back last char */ -#ifdef WITH_GZIP - c = soap_get1(soap); - if (c == 0x1F) - { if (soap_getgziphdr(soap)) - return soap->error; - if (inflateInit2(&soap->d_stream, -MAX_WBITS) != Z_OK) - return soap->error = SOAP_ZLIB_ERROR; - soap->zlib_state = SOAP_ZLIB_INFLATE; - soap->z_crc = crc32(0L, NULL, 0); - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "gzip initialized\n")); - } - else - { soap_revget1(soap); -#else - { -#endif - if (inflateInit(&soap->d_stream) != Z_OK) - return soap->error = SOAP_ZLIB_ERROR; - soap->zlib_state = SOAP_ZLIB_INFLATE; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Inflate initialized\n")); - } - soap->mode |= SOAP_ENC_ZLIB; - memcpy(soap->z_buf, soap->buf, SOAP_BUFLEN); - soap->d_stream.next_in = (Byte*)(soap->z_buf + soap->bufidx); - soap->d_stream.avail_in = soap->buflen - soap->bufidx; - soap->z_buflen = soap->buflen; - soap->buflen = soap->bufidx; - } -#endif - } -#endif -#ifndef WITH_LEANER - if (soap->mode & SOAP_ENC_MIME) - { if (soap_getmimehdr(soap)) - return soap->error; - if (soap_get_header_attribute(soap, soap->mime.first->type, "application/dime")) - soap->mode |= SOAP_ENC_DIME; - } - if (soap->mode & SOAP_ENC_DIME) - { if (soap_getdimehdr(soap)) - return soap->error; - if (soap->dime.flags & SOAP_DIME_CF) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Chunked DIME SOAP message\n")); - soap->dime.chunksize = soap->dime.size; - if (soap->buflen - soap->bufidx >= soap->dime.chunksize) - { soap->dime.buflen = soap->buflen; - soap->buflen = soap->bufidx + soap->dime.chunksize; - } - else - soap->dime.chunksize -= soap->buflen - soap->bufidx; - } - soap->count = soap->buflen - soap->bufidx; - } -#endif - return SOAP_OK; -} -#endif - -/******************************************************************************/ -#ifndef WITH_NOHTTP -#ifndef PALM_1 -static int -http_parse(struct soap *soap) -{ char header[SOAP_HDRLEN], *s; - unsigned short g = 0, k; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Waiting for response...\n")); - *soap->endpoint = '\0'; - soap->length = 0; - do - { if (soap_getline(soap, soap->msgbuf, sizeof(soap->msgbuf))) - return soap->error; - DBGLOG(TEST,SOAP_MESSAGE(fdebug, "HTTP status: %s\n", soap->msgbuf)); - for (;;) - { if (soap_getline(soap, header, SOAP_HDRLEN)) - { if (soap->error == SOAP_EOF) - { soap->error = SOAP_OK; - DBGLOG(TEST,SOAP_MESSAGE(fdebug, "EOF in HTTP header, continue anyway\n")); - break; - } - return soap->error; - } - if (!*header) - break; - DBGLOG(TEST,SOAP_MESSAGE(fdebug, "HTTP header: %s\n", header)); - s = strchr(header, ':'); - if (s) - { *s = '\0'; - do s++; - while (*s && *s <= 32); - if ((soap->error = soap->fparsehdr(soap, header, s))) - return soap->error; - } - } - if ((s = strchr(soap->msgbuf, ' '))) - k = (unsigned short)soap_strtoul(s, NULL, 10); - else - k = 0; - } while (k == 100); - DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Finished HTTP header parsing\n")); - s = strstr(soap->msgbuf, "HTTP/"); - if (s && s[7] != '1') - { if (soap->keep_alive == 1) - soap->keep_alive = 0; - if (k == 0 && (soap->omode & SOAP_IO) == SOAP_IO_CHUNK) /* k == 0 for HTTP request */ - { soap->imode |= SOAP_IO_CHUNK; - soap->omode = (soap->omode & ~SOAP_IO) | SOAP_IO_STORE; - } - } - if (soap->keep_alive < 0) - soap->keep_alive = 1; - DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Keep alive connection = %d\n", soap->keep_alive)); - if (s && (((g = !strncmp(soap->msgbuf, "GET ", 4))) || !strncmp(soap->msgbuf, "POST ", 5))) - { size_t m = strlen(soap->endpoint); - size_t n = m + (s - soap->msgbuf) - 5 - (!g); - if (n >= sizeof(soap->endpoint)) - n = sizeof(soap->endpoint) - 1; - strncpy(soap->path, soap->msgbuf + 4 + (!g), n - m); - soap->path[n - m] = '\0'; - strcat(soap->endpoint, soap->path); - DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Target endpoint='%s'\n", soap->endpoint)); - if (g) - { soap->error = soap->fget(soap); - if (soap->error == SOAP_OK) - soap->error = SOAP_STOP; /* prevents further processing */ - return soap->error; - } - return SOAP_OK; - } - if (k == 0 || (k >= 200 && k <= 299) || k == 400 || k == 500) - return SOAP_OK; - return soap_set_receiver_error(soap, "HTTP error", soap->msgbuf, k); -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_NOHTTP -#ifndef PALM_1 -static int -http_parse_header(struct soap *soap, const char *key, const char *val) -{ if (!soap_tag_cmp(key, "Host")) - { -#ifdef WITH_OPENSSL - if (soap->imode & SOAP_ENC_SSL) - strcpy(soap->endpoint, "https://"); - else -#endif - strcpy(soap->endpoint, "http://"); - strncat(soap->endpoint, val, sizeof(soap->endpoint) - 8); - soap->endpoint[sizeof(soap->endpoint) - 1] = '\0'; - } -#ifndef WITH_LEANER - else if (!soap_tag_cmp(key, "Content-Type")) - { if (soap_get_header_attribute(soap, val, "application/dime")) - soap->mode |= SOAP_ENC_DIME; - else if (soap_get_header_attribute(soap, val, "multipart/related")) - { soap->mime.boundary = soap_strdup(soap, soap_get_header_attribute(soap, val, "boundary")); - soap->mime.start = soap_strdup(soap, soap_get_header_attribute(soap, val, "start")); - soap->mode |= SOAP_ENC_MIME; - } - } -#endif - else if (!soap_tag_cmp(key, "Content-Length")) - soap->length = soap_strtoul(val, NULL, 10); - else if (!soap_tag_cmp(key, "Content-Encoding")) - { if (!soap_tag_cmp(val, "deflate")) -#ifdef WITH_ZLIB - soap->zlib_in = SOAP_ZLIB_DEFLATE; -#else - return SOAP_ZLIB_ERROR; -#endif - else if (!soap_tag_cmp(val, "gzip")) -#ifdef WITH_GZIP - soap->zlib_in = SOAP_ZLIB_GZIP; -#else - return SOAP_ZLIB_ERROR; -#endif - } -#ifdef WITH_ZLIB - else if (!soap_tag_cmp(key, "Accept-Encoding")) - { -#ifdef WITH_GZIP - if (strchr(val, '*') || soap_get_header_attribute(soap, val, "gzip")) - soap->zlib_out = SOAP_ZLIB_GZIP; - else -#endif - if (strchr(val, '*') || soap_get_header_attribute(soap, val, "deflate")) - soap->zlib_out = SOAP_ZLIB_DEFLATE; - else - soap->zlib_out = SOAP_ZLIB_NONE; - } -#endif - else if (!soap_tag_cmp(key, "Transfer-Encoding")) - { soap->mode &= ~SOAP_IO; - if (!soap_tag_cmp(val, "chunked")) - soap->mode |= SOAP_IO_CHUNK; - } - else if (!soap_tag_cmp(key, "Connection")) - { if (!soap_tag_cmp(val, "keep-alive")) - soap->keep_alive = -soap->keep_alive; - else if (!soap_tag_cmp(val, "close")) - soap->keep_alive = 0; - } -#ifndef WITH_LEAN - else if (!soap_tag_cmp(key, "Authorization")) - { if (!soap_tag_cmp(val, "Basic *")) - { size_t n; - char *s; - soap_base642s(soap, val + 6, soap->tmpbuf, sizeof(soap->tmpbuf) - 1, &n); - soap->tmpbuf[n] = '\0'; - if ((s = strchr(soap->tmpbuf, ':'))) - { *s = '\0'; - soap->userid = soap_strdup(soap, soap->tmpbuf); - soap->passwd = soap_strdup(soap, s + 1); - } - } - } - else if (!soap_tag_cmp(key, "WWW-Authenticate")) - soap->authrealm = soap_strdup(soap, soap_get_header_attribute(soap, val+6, "realm")); - else if (!soap_tag_cmp(key, "Expect")) - { if (!soap_tag_cmp(val, "100-continue")) - { if ((soap->error = soap->fposthdr(soap, "HTTP/1.1 100 Continue", NULL)) - || (soap->error = soap->fposthdr(soap, NULL, NULL))) - return soap->error; - } - } -#endif - else if (!soap_tag_cmp(key, "SOAPAction")) - { if (val[0] && val[1]) - { soap->action = soap_strdup(soap, val + 1); - soap->action[strlen(soap->action) - 1] = '\0'; - } - } - else if (!soap_tag_cmp(key, "Location")) - { strncpy(soap->endpoint, val, sizeof(soap->endpoint)); - soap->endpoint[sizeof(soap->endpoint) - 1] = '\0'; - } -#ifdef WITH_COOKIES - else if (!soap_tag_cmp(key, "Cookie") || !soap_tag_cmp(key, "Set-Cookie")) - soap_getcookies(soap, val); -#endif - return SOAP_OK; -} -#endif -#endif - -/******************************************************************************/ -#if !defined(WITH_NOHTTP) || !defined(WITH_LEANER) -#ifndef PALM_1 -SOAP_FMAC1 -const char* -SOAP_FMAC2 -soap_get_header_attribute(struct soap *soap, const char *line, const char *key) -{ register const char *s = line; - if (s) - { while (*s) - { register short flag; - s = soap_decode_key(soap->tmpbuf, sizeof(soap->tmpbuf), s); - flag = soap_tag_cmp(soap->tmpbuf, key); - s = soap_decode_val(soap->tmpbuf, sizeof(soap->tmpbuf), s); - if (!flag) - return soap->tmpbuf; - } - } - return NULL; -} -#endif -#endif - -/******************************************************************************/ -#if !defined(WITH_NOHTTP) || !defined(WITH_LEANER) -#ifndef PALM_1 -SOAP_FMAC1 -const char* -SOAP_FMAC2 -soap_decode_key(char *buf, size_t len, const char *val) -{ return soap_decode(buf, len, val, "=,;"); -} -#endif -#endif - -/******************************************************************************/ -#if !defined(WITH_NOHTTP) || !defined(WITH_LEANER) -#ifndef PALM_1 -SOAP_FMAC1 -const char* -SOAP_FMAC2 -soap_decode_val(char *buf, size_t len, const char *val) -{ if (*val != '=') - { *buf = '\0'; - return val; - } - return soap_decode(buf, len, val + 1, ",;"); -} -#endif -#endif - -/******************************************************************************/ -#if !defined(WITH_NOHTTP) || !defined(WITH_LEANER) -#ifndef PALM_1 -static const char* -soap_decode(char *buf, size_t len, const char *val, const char *sep) -{ const char *s; - char *t = buf; - for (s = val; *s; s++) - if (*s != ' ' && *s != '\t' && !strchr(sep, *s)) - break; - if (*s == '"') - { s++; - while (*s && *s != '"' && --len) - *t++ = *s++; - } - else - { while (soap_notblank(*s) && !strchr(sep, *s) && --len) - { if (*s == '%') - { *t++ = ((s[1] >= 'A' ? (s[1] & 0x7) + 9 : s[1] - '0') << 4) - + (s[2] >= 'A' ? (s[2] & 0x7) + 9 : s[2] - '0'); - s += 3; - } - else - *t++ = *s++; - } - } - *t = '\0'; - while (*s && !strchr(sep, *s)) - s++; - return s; -} -#endif -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_envelope_begin_out(struct soap *soap) -{ -#ifndef WITH_LEANER - size_t n = 0; - if ((soap->mode & SOAP_ENC_MIME) && soap->mime.boundary && soap->mime.start) - { const char *s; - if (soap->mode & SOAP_ENC_DIME) - s = "application/dime"; - else if (soap->version == 2) - s = "application/soap+xml; charset=utf-8"; - else - s = "text/xml; charset=utf-8"; - sprintf(soap->tmpbuf, "--%s\r\nContent-Type: %s\r\nContent-Transfer-Encoding: binary\r\nContent-ID: %s\r\n\r\n", soap->mime.boundary, s, soap->mime.start); - n = strlen(soap->tmpbuf); - if (soap_send_raw(soap, soap->tmpbuf, n)) - return soap->error; - } - if (soap->mode & SOAP_IO_LENGTH) - soap->dime.size = soap->count; /* DIME in MIME correction */ - if (!(soap->mode & SOAP_IO_LENGTH) && (soap->mode & SOAP_ENC_DIME)) - { if (soap_putdimehdr(soap)) - return soap->error; - } -#endif - soap->part = SOAP_IN_ENVELOPE; - return soap_element_begin_out(soap, "SOAP-ENV:Envelope", 0, NULL); -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_envelope_end_out(struct soap *soap) -{ if (soap_element_end_out(soap, "SOAP-ENV:Envelope")) - return soap->error; -#ifndef WITH_LEANER - if ((soap->mode & SOAP_IO_LENGTH) && (soap->mode & SOAP_ENC_DIME)) - { soap->dime.size = soap->count - soap->dime.size; /* DIME in MIME correction */ - sprintf(soap->id, soap->dime_id_format, 0); - soap->dime.id = soap->id; - if (soap->local_namespaces) - { if (soap->local_namespaces[0].out) - soap->dime.type = (char*)soap->local_namespaces[0].out; - else - soap->dime.type = (char*)soap->local_namespaces[0].ns; - } - soap->dime.options = NULL; - soap->dime.flags = SOAP_DIME_MB | SOAP_DIME_ABSURI; - if (!soap->dime.first) - soap->dime.flags |= SOAP_DIME_ME; - soap->count += 12 + ((strlen(soap->dime.id)+3)&(~3)) + ((strlen(soap->dime.type)+3)&(~3)); - } - if (soap->mode & SOAP_ENC_DIME) - return soap_send_raw(soap, SOAP_STR_PADDING, -(long)soap->dime.size&3); -#endif - soap->part = SOAP_END_ENVELOPE; - return SOAP_OK; -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_envelope_begin_in(struct soap *soap) -{ register struct Namespace *p; - soap->part = SOAP_IN_ENVELOPE; - if (soap_element_begin_in(soap, "SOAP-ENV:Envelope", 0)) - return soap->error = SOAP_VERSIONMISMATCH; - p = soap->local_namespaces; - if (p) - { const char *ns = p[0].out; - if (!ns) - ns = p[0].ns; - if (!strcmp(ns, soap_env1)) - { soap->version = 1; /* make sure we use SOAP 1.1 */ - if (p[1].out) - SOAP_FREE(p[1].out); - if ((p[1].out = (char*)SOAP_MALLOC(sizeof(soap_enc1)))) - strcpy(p[1].out, soap_enc1); - } - else if (!strcmp(ns, soap_env2)) - { soap->version = 2; /* make sure we use SOAP 1.2 */ - if (p[1].out) - SOAP_FREE(p[1].out); - if ((p[1].out = (char*)SOAP_MALLOC(sizeof(soap_enc2)))) - strcpy(p[1].out, soap_enc2); - } - } - return SOAP_OK; -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_envelope_end_in(struct soap *soap) -{ if (soap_element_end_in(soap, "SOAP-ENV:Envelope")) - return soap->error; - soap->part = SOAP_END_ENVELOPE; - return SOAP_OK; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_body_begin_out(struct soap *soap) -{ soap->part = SOAP_IN_BODY; - if (soap->version == 1) - soap->encoding = 1; - if (soap_element(soap, "SOAP-ENV:Body", 0, NULL)) - return soap->error; - if ((soap->mode & SOAP_XML_SEC) && soap_attribute(soap, "id", "_0")) - return soap->error; - return soap_element_start_end_out(soap, NULL); -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_body_end_out(struct soap *soap) -{ if (soap_element_end_out(soap, "SOAP-ENV:Body")) - return soap->error; - soap->part = SOAP_IN_BODY; - return SOAP_OK; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_body_begin_in(struct soap *soap) -{ soap->part = SOAP_IN_BODY; - return soap_element_begin_in(soap, "SOAP-ENV:Body", 0); -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_body_end_in(struct soap *soap) -{ if (soap_element_end_in(soap, "SOAP-ENV:Body")) - return soap->error; - soap->part = SOAP_END_BODY; - return SOAP_OK; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_recv_header(struct soap *soap) -{ if (soap_getheader(soap) && soap->error == SOAP_TAG_MISMATCH) - soap->error = SOAP_OK; - return soap->error; -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_set_endpoint(struct soap *soap, const char *endpoint) -{ register const char *s; - register size_t i, n; - *soap->endpoint = '\0'; - *soap->host = '\0'; - *soap->path = '\0'; - soap->port = 80; - if (!endpoint || !*endpoint) - return; -#ifdef WITH_OPENSSL - if (!strncmp(endpoint, "https:", 6)) - soap->port = 443; -#endif - strncpy(soap->endpoint, endpoint, sizeof(soap->endpoint) - 1); - s = strchr(endpoint, ':'); - if (s && s[1] == '/' && s[2] == '/') - s += 3; - else - s = endpoint; - n = strlen(s); - if (n >= sizeof(soap->host)) - n = sizeof(soap->host) - 1; -/* WR[ */ -#ifdef WITH_IPV6 - if ('[' == s[0]) - { s++; - for (i = 0; i < n; i++) - { soap->host[i] = s[i]; - if (']' == s[i]) - { - s++; - break; - } - } - } - else - { for (i = 0; i < n; i++) - { soap->host[i] = s[i]; - if (s[i] == '/' || s[i] == ':') - break; - } - } -#else /* WITH_IPV6 */ -/* ]WR */ - for (i = 0; i < n; i++) - { soap->host[i] = s[i]; - if (s[i] == '/' || s[i] == ':') - break; - } -/* WR[ */ -#endif /* WITH_IPV6 */ -/* ]WR */ - soap->host[i] = '\0'; - if (s[i] == ':') - { soap->port = (int)atol(s + i + 1); - for (i++; i < n; i++) - if (s[i] == '/') - break; - } - if (s[i]) - { strncpy(soap->path, s + i + 1, sizeof(soap->path)); - soap->path[sizeof(soap->path) - 1] = '\0'; - } -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_connect(struct soap *soap, const char *endpoint, const char *action) -{ return soap_connect_command(soap, SOAP_POST, endpoint, action); -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_connect_command(struct soap *soap, int http_command, const char *endpoint, const char *action) -{ char host[sizeof(soap->host)]; - int port; - size_t count; - soap->error = SOAP_OK; - strcpy(host, soap->host); /* save to compare */ - port = soap->port; /* save to compare */ - soap_set_endpoint(soap, endpoint); - if (action) - soap->action = soap_strdup(soap, action); -#ifndef WITH_LEANER - if (soap->fconnect) - { if ((soap->error = soap->fconnect(soap, endpoint, soap->host, soap->port))) - return soap->error; - } - else -#endif - if (soap->fopen && *soap->host) - { soap->status = http_command; - if (!soap->keep_alive || !soap_valid_socket(soap->socket) || strcmp(soap->host, host) || soap->port != port || !soap->fpoll || soap->fpoll(soap)) - { soap->keep_alive = 0; /* force close */ - soap_closesock(soap); - DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Connect/reconnect to host='%s' path='%s' port=%d\n", soap->host, soap->path, soap->port)); - soap->socket = soap->fopen(soap, endpoint, soap->host, soap->port); - if (soap->error) - return soap->error; - soap->keep_alive = ((soap->omode & SOAP_IO_KEEPALIVE) != 0); - } - } - if (soap_begin_send(soap)) - return soap->error; - count = soap_count_attachments(soap); -#ifndef WITH_NOHTTP - if ((soap->mode & SOAP_IO) != SOAP_IO_STORE && !(soap->mode & SOAP_ENC_XML) && endpoint) - { unsigned int k = soap->mode; - soap->mode &= ~(SOAP_IO | SOAP_ENC_ZLIB); - if ((k & SOAP_IO) != SOAP_IO_FLUSH) - soap->mode |= SOAP_IO_BUFFER; - if ((soap->error = soap->fpost(soap, endpoint, soap->host, soap->port, soap->path, action, count))) - return soap->error; -#ifndef WITH_LEANER - if ((k & SOAP_IO) == SOAP_IO_CHUNK) - { if (soap_flush(soap)) - return soap->error; - } -#endif - soap->mode = k; - } - if (http_command != SOAP_POST) - return soap_end_send(soap); -#endif - return SOAP_OK; -} -#endif - -/******************************************************************************/ -#ifndef WITH_LEAN -SOAP_FMAC1 -char* -SOAP_FMAC2 -soap_s2base64(struct soap *soap, const unsigned char *s, char *t, size_t n) -{ register size_t i; - register unsigned long m; - register char *p; - if (!t) - t = (char*)soap_malloc(soap, (n + 2) / 3 * 4 + 1); - if (!t) - { soap->error = SOAP_EOM; - return NULL; - } - p = t; - t[0] = '\0'; - if (!s) - return p; - for (; n > 2; n -= 3, s += 3) - { m = s[0]; - m = (m << 8) | s[1]; - m = (m << 8) | s[2]; - for (i = 4; i > 0; m >>= 6) - t[--i] = soap_base64o[m & 0x3F]; - t += 4; - } - t[0] = '\0'; - if (n > 0) - { m = 0; - for (i = 0; i < n; i++) - m = (m << 8) | *s++; - for (; i < 3; i++) - m <<= 8; - for (i++; i > 0; m >>= 6) - t[--i] = soap_base64o[m & 0x3F]; - for (i = 3; i > n; i--) - t[i] = '='; - t[4] = '\0'; - } - return p; -} -#endif - -/******************************************************************************/ -#ifndef WITH_LEAN -SOAP_FMAC1 -const char* -SOAP_FMAC2 -soap_base642s(struct soap *soap, const char *s, char *t, size_t l, size_t *n) -{ register int i, j, c; - register unsigned long m; - char *p = t; - if (n) - *n = 0; - for (;;) - { for (i = 0; i < SOAP_BLKLEN; i++) - { m = 0; - j = 0; - while (j < 4) - { c = *s++; - if (c == '=' || !c) - { i *= 3; - switch (j) - { case 2: - *t++ = (char)((m >> 4) & 0xFF); - i++; - break; - case 3: - *t++ = (char)((m >> 10) & 0xFF); - *t++ = (char)((m >> 2) & 0xFF); - i += 2; - } - if (n) - *n += i; - return p; - } - c -= '+'; - if (c >= 0 && c <= 79) - { m = (m << 6) + soap_base64i[c]; - j++; - } - } - *t++ = (char)((m >> 16) & 0xFF); - *t++ = (char)((m >> 8) & 0xFF); - *t++ = (char)(m & 0xFF); - if (l < 3) - { if (n) - *n += i; - return p; - } - l -= 3; - } - if (n) - *n += 3 * SOAP_BLKLEN; - } -} -#endif - -/******************************************************************************/ -#ifndef WITH_NOHTTP -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_puthttphdr(struct soap *soap, int status, size_t count) -{ register const char *s; - register int err; - if (status == SOAP_FILE && soap->http_content) - s = soap->http_content; - else if (status == SOAP_HTML) - s = "text/html; charset=utf-8"; -#ifndef WITH_LEANER - else if (soap->mode & SOAP_ENC_DIME) - s = "application/dime"; -#endif - else if (soap->version == 2) - s = "application/soap+xml; charset=utf-8"; - else - s = "text/xml; charset=utf-8"; -#ifndef WITH_LEANER - if ((soap->mode & SOAP_ENC_MIME) && soap->mime.boundary && soap->status != SOAP_GET) - { register const char *t = strchr(s, ';'); - sprintf(soap->tmpbuf, "multipart/related; boundary=\"%s\"; type=\"", soap->mime.boundary); - if (t) - strncat(soap->tmpbuf, s, t - s); - else - strcat(soap->tmpbuf, s); - if (soap->mime.start) - { strcat(soap->tmpbuf, "\"; start=\""); - strcat(soap->tmpbuf, soap->mime.start); - } - strcat(soap->tmpbuf, "\""); - s = soap->tmpbuf; - } -#endif - if ((err = soap->fposthdr(soap, "Content-Type", s))) - return err; -#ifdef WITH_ZLIB - if (soap->omode & SOAP_ENC_ZLIB) - { -#ifdef WITH_GZIP - err = soap->fposthdr(soap, "Content-Encoding", "gzip"); -#else - err = soap->fposthdr(soap, "Content-Encoding", "deflate"); -#endif - if (err) - return err; - } -#endif -#ifndef WITH_LEANER - if ((soap->omode & SOAP_IO) == SOAP_IO_CHUNK) - err = soap->fposthdr(soap, "Transfer-Encoding", "chunked"); - else -#endif - if (count > 0) - { sprintf(soap->tmpbuf, "%lu", (unsigned long)count); - err = soap->fposthdr(soap, "Content-Length", soap->tmpbuf); - } - if (err) - return err; - return soap->fposthdr(soap, "Connection", soap->keep_alive ? "keep-alive" : "close"); -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_NOHTTP -#ifndef PALM_1 -static int -http_get(struct soap *soap) -{ return SOAP_GET_METHOD; -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_NOHTTP -#ifndef PALM_1 -static int -http_post(struct soap *soap, const char *endpoint, const char *host, int port, const char *path, const char *action, size_t count) -{ register const char *s; - register int err; - if (soap->status == SOAP_GET) - { s = "GET"; - count = 0; - } - else - s = "POST"; -#ifdef PALM - if (!endpoint || (strncmp(endpoint, "http:", 5) && strncmp(endpoint, "https:", 6) && strncmp(endpoint, "httpg:", 6)) && strncmp(endpoint, "_beam:", 6) && strncmp(endpoint, "_local:", 7) && strncmp(endpoint, "_btobex:", 8)) -#else - if (!endpoint || (strncmp(endpoint, "http:", 5) && strncmp(endpoint, "https:", 6) && strncmp(endpoint, "httpg:", 6))) -#endif - return SOAP_OK; - if (soap->proxy_host && strncmp(endpoint, "https:", 6)) - sprintf(soap->tmpbuf, "%s %s HTTP/%s", s, endpoint, soap->http_version); - else - sprintf(soap->tmpbuf, "%s /%s HTTP/%s", s, path, soap->http_version); - if ((err = soap->fposthdr(soap, soap->tmpbuf, NULL))) - return err; - if (port != 80) - sprintf(soap->tmpbuf, "%s:%d", host, port); - else - strcpy(soap->tmpbuf, host); - if ((err = soap->fposthdr(soap, "Host", soap->tmpbuf)) - || (err = soap->fposthdr(soap, "User-Agent", "gSOAP/2.7")) - || (err = soap_puthttphdr(soap, SOAP_OK, count))) - return err; -#ifdef WITH_ZLIB -#ifdef WITH_GZIP - if ((err = soap->fposthdr(soap, "Accept-Encoding", "gzip, deflate"))) -#else - if ((err = soap->fposthdr(soap, "Accept-Encoding", "deflate"))) -#endif - return err; -#endif -#ifndef WITH_LEAN - if (soap->userid && soap->passwd && strlen(soap->userid) + strlen(soap->passwd) < 761) - { sprintf(soap->tmpbuf + 262, "%s:%s", soap->userid, soap->passwd); - strcpy(soap->tmpbuf, "Basic "); - soap_s2base64(soap, (const unsigned char*)(soap->tmpbuf + 262), soap->tmpbuf + 6, strlen(soap->tmpbuf + 262)); - if ((err = soap->fposthdr(soap, "Authorization", soap->tmpbuf))) - return err; - } - if (soap->proxy_userid && soap->proxy_passwd && strlen(soap->proxy_userid) + strlen(soap->proxy_passwd) < 761) - { sprintf(soap->tmpbuf + 262, "%s:%s", soap->proxy_userid, soap->proxy_passwd); - strcpy(soap->tmpbuf, "Basic "); - soap_s2base64(soap, (const unsigned char*)(soap->tmpbuf + 262), soap->tmpbuf + 6, strlen(soap->tmpbuf + 262)); - if ((err = soap->fposthdr(soap, "Proxy-Authorization", soap->tmpbuf))) - return err; - } -#endif -#ifdef WITH_COOKIES -#ifdef WITH_OPENSSL - if (soap_putcookies(soap, host, path, soap->ssl != NULL)) - return soap->error; -#else - if (soap_putcookies(soap, host, path, 0)) - return soap->error; -#endif -#endif - if (action && soap->version == 1) - { sprintf(soap->tmpbuf, "\"%s\"", action); - if ((err = soap->fposthdr(soap, "SOAPAction", soap->tmpbuf))) - return err; - } - return soap->fposthdr(soap, NULL, NULL); -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_NOHTTP -#ifndef PALM_1 -static int -http_send_header(struct soap *soap, const char *s) -{ register const char *t; - do - { t = strchr(s, '\n'); /* disallow \n in HTTP headers */ - if (!t) - t = s + strlen(s); - if (soap_send_raw(soap, s, t - s)) - return soap->error; - s = t + 1; - } while (*t); - return SOAP_OK; -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_NOHTTP -#ifndef PALM_1 -static int -http_post_header(struct soap *soap, const char *key, const char *val) -{ if (key) - { if (http_send_header(soap, key)) - return soap->error; - if (val && (soap_send_raw(soap, ": ", 2) || http_send_header(soap, val))) - return soap->error; - } - return soap_send_raw(soap, "\r\n", 2); -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_NOHTTP -#ifndef PALM_1 -static int -http_response(struct soap *soap, int status, size_t count) -{ register int err; -/* WR[ */ -#ifdef WMW_RPM_IO - if (soap->rpmreqid) - httpOutputEnable(soap->rpmreqid); -#endif /* WMW_RPM_IO */ -/* ]WR */ - if (!status || status == SOAP_HTML || status == SOAP_FILE) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "OK 200\n")); -/* WR[ */ -#ifdef WMW_RPM_IO - if (soap->rpmreqid || soap_valid_socket(soap->master) || soap_valid_socket(soap->socket)) /* RPM behaves as if standalone */ -#else -/* ]WR */ - if (soap_valid_socket(soap->master) || soap_valid_socket(soap->socket)) /* standalone application */ -/* WR[ */ -#endif /* WMW_RPM_IO */ -/* ]WR */ - { sprintf(soap->tmpbuf, "HTTP/%s 200 OK", soap->http_version); - if ((err = soap->fposthdr(soap, soap->tmpbuf, NULL))) - return err; - } - else if ((err = soap->fposthdr(soap, "Status", "200 OK"))) - return err; - } - else if (status > 200 && status < 600) - { sprintf(soap->tmpbuf, "HTTP/%s %d %s", soap->http_version, status, http_error(soap, status)); - if ((err = soap->fposthdr(soap, soap->tmpbuf, NULL))) - return err; -#ifndef WITH_LEAN - if (status == 401) - { sprintf(soap->tmpbuf, "Basic realm=\"%s\"", soap->authrealm ? soap->authrealm : "gSOAP Web Service"); - if ((err = soap->fposthdr(soap, "WWW-Authenticate", soap->tmpbuf))) - return err; - } - else if ((status >= 301 && status <= 303) || status == 307) - { if ((err = soap->fposthdr(soap, "Location", soap->endpoint))) - return err; - } -#endif - } - else - { const char *s = *soap_faultcode(soap); - if (soap->version == 2 && !strcmp(s, "SOAP-ENV:Sender")) - s = "400 Bad Request"; - else - s = "500 Internal Server Error"; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Error %s (status=%d)\n", s, status)); -/* WR[ */ -#ifdef WMW_RPM_IO - if (soap->rpmreqid || soap_valid_socket(soap->master) || soap_valid_socket(soap->socket)) /* RPM behaves as if standalone */ -#else -/* ]WR */ - if (soap_valid_socket(soap->master) || soap_valid_socket(soap->socket)) /* standalone application */ -/* WR[ */ -#endif /* WMW_RPM_IO */ -/* ]WR */ - { sprintf(soap->tmpbuf, "HTTP/%s %s", soap->http_version, s); - if ((err = soap->fposthdr(soap, soap->tmpbuf, NULL))) - return err; - } - else if ((err = soap->fposthdr(soap, "Status", s))) - return err; - } - if ((err = soap->fposthdr(soap, "Server", "gSOAP/2.7")) - || (err = soap_puthttphdr(soap, status, count))) - return err; -#ifdef WITH_COOKIES - if (soap_putsetcookies(soap)) - return soap->error; -#endif - return soap->fposthdr(soap, NULL, NULL); -} -#endif -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_response(struct soap *soap, int status) -{ register size_t count; - if (!(soap->omode & (SOAP_ENC_XML | SOAP_IO_STORE /* this tests for chunking too */)) - && (status == SOAP_HTML || status == SOAP_FILE)) - { soap->omode &= ~SOAP_IO; - soap->omode |= SOAP_IO_STORE; - } - soap->status = status; - count = soap_count_attachments(soap); - if (soap_begin_send(soap)) - return soap->error; -#ifndef WITH_NOHTTP - if ((soap->mode & SOAP_IO) != SOAP_IO_STORE && !(soap->mode & SOAP_ENC_XML)) - { register int n = soap->mode; - soap->mode &= ~(SOAP_IO | SOAP_ENC_ZLIB); - if ((n & SOAP_IO) != SOAP_IO_FLUSH) - soap->mode |= SOAP_IO_BUFFER; - if ((soap->error = soap->fresponse(soap, status, count))) - return soap->error; -#ifndef WITH_LEANER - if ((n & SOAP_IO) == SOAP_IO_CHUNK) - { if (soap_flush(soap)) - return soap->error; - } -#endif - soap->mode = n; - } -#endif - return SOAP_OK; -} -#endif - -/******************************************************************************/ -#ifndef WITH_LEAN -static const char* -soap_set_validation_fault(struct soap *soap, const char *s, const char *t) -{ sprintf(soap->msgbuf, "Validation constraint violation: %s%s in element <%s>", s, t?t:SOAP_STR_EOS, soap->tag); - return soap->msgbuf; -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_set_fault(struct soap *soap) -{ const char **c = soap_faultcode(soap); - const char **s = soap_faultstring(soap); - if (!*c) - { if (soap->version == 2) - *c = "SOAP-ENV:Sender"; - else - *c = "SOAP-ENV:Client"; - } - if (*s) - return; - switch (soap->error) - { -#ifndef WITH_LEAN - case SOAP_CLI_FAULT: - *s = "Client fault"; - break; - case SOAP_SVR_FAULT: - *s = "Server fault"; - break; - case SOAP_TAG_MISMATCH: - *s = soap_set_validation_fault(soap, "tag name or namespace mismatch", NULL); - break; - case SOAP_TYPE: - *s = soap_set_validation_fault(soap, "data type mismatch ", soap->type); - break; - case SOAP_SYNTAX_ERROR: - *s = "Well-formedness constraint violation"; - break; - case SOAP_NO_TAG: - *s = "No XML element tag found"; - break; - case SOAP_MUSTUNDERSTAND: - *c = "SOAP-ENV:MustUnderstand"; - sprintf(soap->msgbuf, "The data in element '%s' must be understood but cannot be handled", soap->tag); - *s = soap->msgbuf; - break; - case SOAP_VERSIONMISMATCH: - *c = "SOAP-ENV:VersionMismatch"; - *s = "SOAP version mismatch or invalid SOAP message"; - break; - case SOAP_DATAENCODINGUNKNOWN: - *c = "SOAP-ENV:DataEncodingUnknown"; - *s = "Unsupported SOAP data encoding"; - break; - case SOAP_NAMESPACE: - *s = soap_set_validation_fault(soap, "namespace mismatch", NULL); - break; - case SOAP_FATAL_ERROR: - *s = "Fatal error"; - break; - case SOAP_NO_METHOD: - sprintf(soap->msgbuf, "Method '%s' not implemented: method name or namespace not recognized", soap->tag); - *s = soap->msgbuf; - break; - case SOAP_GET_METHOD: - *s = "HTTP GET method not implemented"; - break; - case SOAP_EOM: - *s = "Out of memory"; - break; - case SOAP_IOB: - *s = "Array index out of bounds"; - break; - case SOAP_NULL: - *s = soap_set_validation_fault(soap, "nil not allowed", NULL); - break; - case SOAP_MULTI_ID: - *s = soap_set_validation_fault(soap, "multiple definitions of id ", soap->id); - break; - case SOAP_MISSING_ID: - *s = soap_set_validation_fault(soap, "missing id for ref ", soap->id); - break; - case SOAP_HREF: - *s = soap_set_validation_fault(soap, "incompatible object ref ", soap->id); - break; - case SOAP_FAULT: - break; -#ifndef WITH_NOIO - case SOAP_TCP_ERROR: - *s = tcp_error(soap); - break; -#endif - case SOAP_HTTP_ERROR: - *s = "HTTP error"; - break; - case SOAP_SSL_ERROR: - *s = "SSL error"; - break; - case SOAP_PLUGIN_ERROR: - *s = "Plugin registry error"; - break; - case SOAP_DIME_MISMATCH: - *s = "DIME version/transmission error"; - break; - case SOAP_DIME_END: - *s = "End of DIME error"; - break; - case SOAP_DIME_ERROR: - *s = "DIME format error"; - break; - case SOAP_MIME_ERROR: - *s = "MIME format error"; - break; - case SOAP_ZLIB_ERROR: -#ifdef WITH_ZLIB - sprintf(soap->msgbuf, "Zlib/gzip error: '%s'", soap->d_stream.msg?soap->d_stream.msg:""); - *s = soap->msgbuf; -#else - *s = "Zlib not installed for required message (de)compression"; -#endif - break; - case SOAP_REQUIRED: - *s = soap_set_validation_fault(soap, "missing required attribute", NULL); - break; - case SOAP_PROHIBITED: - *s = soap_set_validation_fault(soap, "prohibited attribute present", NULL); - break; - case SOAP_OCCURS: - *s = soap_set_validation_fault(soap, "a min/maxOccurs violation was detected", NULL); - break; - case SOAP_LENGTH: - *s = soap_set_validation_fault(soap, "content length violation", NULL); - break; -#endif - case SOAP_EOF: -#ifndef WITH_NOIO - sprintf(soap->msgbuf, "End of file or no input: '%s'", soap_strerror(soap)); - *s = soap->msgbuf; - break; -#else - *s = "End of file or no input"; - break; -#endif - default: -#ifndef WITH_NOHTTP -#ifndef WITH_LEAN - if (soap->error > 200 && soap->error < 600) - { sprintf(soap->msgbuf, "HTTP Error: %d %s", soap->error, http_error(soap, soap->error)); - *s = soap->msgbuf; - } - else -#endif -#endif - { sprintf(soap->msgbuf, "Error code %d", soap->error); - *s = soap->msgbuf; - } - } -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_send_fault(struct soap *soap) -{ register int status = soap->error; - if (status == SOAP_STOP) - return status; - DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Sending back fault struct for error code %d\n", soap->error)); - soap->keep_alive = 0; /* to terminate connection */ - soap_set_fault(soap); - if ((status != SOAP_EOF || (!soap->recv_timeout && !soap->send_timeout)) && (!soap->fpoll || soap->fpoll(soap) == SOAP_OK)) - { soap->error = SOAP_OK; - soap_serializeheader(soap); - soap_serializefault(soap); - soap_begin_count(soap); - if (soap->mode & SOAP_IO_LENGTH) - { soap_envelope_begin_out(soap); - soap_putheader(soap); - soap_body_begin_out(soap); - soap_putfault(soap); - soap_body_end_out(soap); - soap_envelope_end_out(soap); - } - if (soap_response(soap, status) - || soap_envelope_begin_out(soap) - || soap_putheader(soap) - || soap_body_begin_out(soap) - || soap_putfault(soap) - || soap_body_end_out(soap) - || soap_envelope_end_out(soap)) - return soap_closesock(soap); - soap_end_send(soap); - } - soap->error = status; - return soap_closesock(soap); -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_recv_fault(struct soap *soap) -{ register int status = soap->error; - DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Receiving SOAP Fault\n")); - soap->error = SOAP_OK; - if (soap_getfault(soap)) - { DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Error: soap_get_soapfault() failed. Is this a SOAP message at all?\n")); - *soap_faultcode(soap) = (soap->version == 2 ? "SOAP-ENV:Sender" : "SOAP-ENV:Client"); - soap->error = status; - soap_set_fault(soap); - } - else - { register const char *s = *soap_faultcode(soap); - if (!soap_match_tag(soap, s, "SOAP-ENV:Server") || !soap_match_tag(soap, s, "SOAP-ENV:Receiver")) - status = SOAP_SVR_FAULT; - else if (!soap_match_tag(soap, s, "SOAP-ENV:Client") || !soap_match_tag(soap, s, "SOAP-ENV:Sender")) - status = SOAP_CLI_FAULT; - else if (!soap_match_tag(soap, s, "SOAP-ENV:MustUnderstand")) - status = SOAP_MUSTUNDERSTAND; - else if (!soap_match_tag(soap, s, "SOAP-ENV:VersionMismatch")) - status = SOAP_VERSIONMISMATCH; - else - { DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Fault code %s\n", s)); - status = SOAP_FAULT; - } - if (soap_body_end_in(soap) - || soap_envelope_end_in(soap) - || soap_end_recv(soap)) - return soap_closesock(soap); - soap->error = status; - } - return soap_closesock(soap); -} -#endif - -/******************************************************************************/ -#ifndef WITH_NOHTTP -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_send_empty_response(struct soap *soap) -{ soap->count = 0; - if (soap_response(soap, SOAP_OK) || soap_end_send(soap)) - return soap_closesock(soap); - return SOAP_OK; -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_NOHTTP -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_recv_empty_response(struct soap *soap) -{ if (soap_begin_recv(soap) || soap_end_recv(soap)) - return soap_closesock(soap); - return SOAP_OK; -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_NOIO -#ifndef PALM_1 -static const char* -soap_strerror(struct soap *soap) -{ - int err = soap->errnum; - if (!err) - err = soap_errno; - if (err) - { -#ifndef WIN32 - return strerror(err); -#else - FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM|FORMAT_MESSAGE_IGNORE_INSERTS, NULL, err, 0, (LPTSTR)&soap->errorstr, sizeof(soap->errorstr), NULL); - return soap->errorstr; -#endif - } - return "Operation interrupted or timed out"; -} -#endif -#endif - -/******************************************************************************/ -#ifndef PALM_2 -static int -soap_set_error(struct soap *soap, const char *faultcode, const char *faultstring, const char *faultdetail, int soaperror) -{ *soap_faultcode(soap) = faultcode; - *soap_faultstring(soap) = faultstring; - if (faultdetail && *faultdetail) - { register const char **s = soap_faultdetail(soap); - if (s) - *s = faultdetail; - } - return soap->error = soaperror; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_set_sender_error(struct soap *soap, const char *faultstring, const char *faultdetail, int soaperror) -{ return soap_set_error(soap, soap->version == 2 ? "SOAP-ENV:Sender" : "SOAP-ENV:Client", faultstring, faultdetail, soaperror); -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_set_receiver_error(struct soap *soap, const char *faultstring, const char *faultdetail, int soaperror) -{ return soap_set_error(soap, soap->version == 2 ? "SOAP-ENV:Receiver" : "SOAP-ENV:Server", faultstring, faultdetail, soaperror); -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -static int -soap_copy_fault(struct soap *soap, const char *faultcode, const char *faultstring, const char *faultdetail) -{ char *s = NULL, *t = NULL; - if (faultstring) - s = soap_strdup(soap, faultstring); - if (faultdetail) - t = soap_strdup(soap, faultdetail); - return soap_set_error(soap, faultcode, s, t, SOAP_FAULT); -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_sender_fault(struct soap *soap, const char *faultstring, const char *faultdetail) -{ return soap_copy_fault(soap, soap->version == 2 ? "SOAP-ENV:Sender" : "SOAP-ENV:Client", faultstring, faultdetail); -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_receiver_fault(struct soap *soap, const char *faultstring, const char *faultdetail) -{ return soap_copy_fault(soap, soap->version == 2 ? "SOAP-ENV:Receiver" : "SOAP-ENV:Server", faultstring, faultdetail); -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -#ifndef WITH_NOIO -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_print_fault(struct soap *soap, FILE *fd) -{ if (soap->error) - { const char **s; - if (!*soap_faultcode(soap)) - soap_set_fault(soap); - fprintf(fd, "SOAP FAULT: %s\n\"%s\"\n", *soap_faultcode(soap), *soap_faultstring(soap)); - s = soap_faultdetail(soap); - if (s && *s) - fprintf(fd, "Detail: %s\n", *s); - } -} -#endif -#endif - -/******************************************************************************/ -#ifndef PALM_1 -#ifndef WITH_NOIO -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_print_fault_location(struct soap *soap, FILE *fd) -{ -#ifndef WITH_LEAN - int c; - if (soap->error && soap->buflen > 0) - { if (soap->bufidx == 0) - soap->bufidx = 1; - c = soap->buf[soap->bufidx - 1]; - soap->buf[soap->bufidx - 1] = '\0'; - if (soap->buflen - soap->bufidx > 1024) - soap->buf[soap->bufidx + 1024] = '\0'; - else - soap->buf[soap->buflen - 1] = '\0'; - fprintf(fd, "%s%c\n** HERE **\n", soap->buf, c); - if (soap->bufidx < soap->buflen) - fprintf(fd, "%s\n", soap->buf + soap->bufidx); - } -#endif -} -#endif -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_register_plugin_arg(struct soap *soap, int (*fcreate)(struct soap*, struct soap_plugin*, void*), void *arg) -{ register struct soap_plugin *p; - register int r; - if (!(p = (struct soap_plugin*)SOAP_MALLOC(sizeof(struct soap_plugin)))) - return soap->error = SOAP_EOM; - p->id = NULL; - p->data = NULL; - p->fcopy = NULL; - p->fdelete = NULL; - r = fcreate(soap, p, arg); - if (!r && p->fdelete) - { p->next = soap->plugins; - soap->plugins = p; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Registered '%s' plugin\n", p->id)); - return SOAP_OK; - } - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Could not register plugin '%s': plugin returned error %d (or fdelete callback not set)\n", p->id?p->id:"?", r)); - SOAP_FREE(p); - return r; -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -static void * -fplugin(struct soap *soap, const char *id) -{ register struct soap_plugin *p; - for (p = soap->plugins; p; p = p->next) - if (p->id == id || !strcmp(p->id, id)) - return p->data; - return NULL; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -void * -SOAP_FMAC2 -soap_lookup_plugin(struct soap *soap, const char *id) -{ return soap->fplugin(soap, id); -} -#endif - -/******************************************************************************/ -#ifdef __cplusplus -} -#endif - diff --git a/org.glite.security.gsoap-plugin/src/stdsoap2_2.7.0f.h b/org.glite.security.gsoap-plugin/src/stdsoap2_2.7.0f.h deleted file mode 100644 index 097b551..0000000 --- a/org.glite.security.gsoap-plugin/src/stdsoap2_2.7.0f.h +++ /dev/null @@ -1,1885 +0,0 @@ -/* - -stdsoap2.h 2.7.0f - -gSOAP runtime environment. - -gSOAP XML Web services tools -Copyright (C) 2000-2005, Robert van Engelen, Genivia, Inc., All Rights Reserved. - -Contributors: - -Wind River Systems, Inc., for the following additions (marked WR[...]) : - - vxWorks compatible - - Support for IPv6. - --------------------------------------------------------------------------------- - - This software is released under one of the following three licenses: - GPL, the gSOAP public license, or Genivia's license for commercial use. - --------------------------------------------------------------------------------- -gSOAP public license. - -The contents of this file are subject to the gSOAP Public License Version 1.3 -(the "License"); you may not use this file except in compliance with the -License. You may obtain a copy of the License at -http://www.cs.fsu.edu/~engelen/soaplicense.html -Software distributed under the License is distributed on an "AS IS" basis, -WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License -for the specific language governing rights and limitations under the License. - -The Initial Developer of the Original Code is Robert A. van Engelen. -Copyright (C) 2000-2005, Robert van Engelen, Genivia, Inc., All Rights Reserved. --------------------------------------------------------------------------------- -GPL license. - -This program is free software; you can redistribute it and/or modify it under -the terms of the GNU General Public License as published by the Free Software -Foundation; either version 2 of the License, or (at your option) any later -version. - -This program is distributed in the hope that it will be useful, but WITHOUT ANY -WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A -PARTICULAR PURPOSE. See the GNU General Public License for more details. - -You should have received a copy of the GNU General Public License along with -this program; if not, write to the Free Software Foundation, Inc., 59 Temple -Place, Suite 330, Boston, MA 02111-1307 USA - -Author contact information: -engelen@genivia.com / engelen@acm.org --------------------------------------------------------------------------------- -A commercial use license is available from Genivia, Inc., contact@genivia.com --------------------------------------------------------------------------------- -*/ - -#ifdef WITH_SOAPDEFS_H -# include "soapdefs.h" /* include user-defined stuff */ -#endif - -#ifndef _THREAD_SAFE -# define _THREAD_SAFE -#endif - -#ifndef OPENSERVER -# ifndef _REENTRANT -# define _REENTRANT -# endif -#endif - -#ifndef SOAP_BEGIN_NAMESPACE -# define SOAP_BEGIN_NAMESPACE(name) -#endif - -#ifndef SOAP_END_NAMESPACE -# define SOAP_END_NAMESPACE(name) -#endif - -#ifndef SOAP_FMAC1 /* stdsoap2.h declaration macro */ -# define SOAP_FMAC1 -#endif - -#ifndef SOAP_FMAC2 /* stdsoap2.h declaration macro */ -# define SOAP_FMAC2 -#endif - -#ifndef SOAP_FMAC3 /* (de)serializer declaration macro */ -# define SOAP_FMAC3 -#endif - -#ifndef SOAP_FMAC3S /* string converter for (de)serializer declaration macro */ -# define SOAP_FMAC3S SOAP_FMAC3 -#endif - -#ifndef SOAP_FMAC4 /* (de)serializer declaration macro */ -# define SOAP_FMAC4 -#endif - -#ifndef SOAP_FMAC4S /* string converter for (de)serializer declaration macro */ -# define SOAP_FMAC4S SOAP_FMAC4 -#endif - -#ifndef SOAP_FMAC5 /* stub/skeleton declaration macro */ -# define SOAP_FMAC5 -#endif - -#ifndef SOAP_FMAC6 /* stub/skeleton declaration macro */ -# define SOAP_FMAC6 -#endif - -#ifndef SOAP_CMAC /* class declaration macro */ -# define SOAP_CMAC -#endif - -#ifndef SOAP_NMAC /* namespace table declaration macro */ -# define SOAP_NMAC -#endif - -#ifndef SOAP_SOURCE_STAMP -# define SOAP_SOURCE_STAMP(str) -#endif - -#ifdef WITH_LEANER -# ifndef WITH_LEAN -# define WITH_LEAN -# endif -#endif - -#ifdef WITH_LEAN -# ifdef WITH_COOKIES -# error "Cannot build WITH_LEAN code WITH_COOKIES enabled" -# endif -#endif - -#ifndef STDSOAP_H -#define STDSOAP_H - -#if defined(__vxworks) || defined(__VXWORKS__) -# define VXWORKS -#endif - -#ifdef _WIN32 -# ifndef WIN32 -# define WIN32 -# endif -#endif - -#ifdef UNDER_CE -# ifndef WIN32 -# define WIN32 -# endif -#endif - -#ifdef __BORLANDC__ -# ifdef __WIN32__ -# ifndef WIN32 -# define WIN32 -# endif -# endif -#endif - -#ifdef __CYGWIN__ -# ifndef CYGWIN -# define CYGWIN -# endif -#endif - -#ifdef __SYMBIAN32__ -# define SYMBIAN -# undef WIN32 -#endif - -#if defined(__palmos__) || defined(PALM_GCC) || defined(__PALMOS_TRAPS__) -# ifndef PALM -# define PALM -# endif -#endif - -#if defined(__hpux) -# ifndef HP_UX -# define HP_UX -# endif -#endif - -#ifdef __alpha -# ifndef TRU64 -# define TRU64 -# endif -#endif - -#ifdef __MVS__ -# ifndef OS390 -# define OS390 -# endif -#endif - -#ifdef _AIX -# define __socklen_t_defined -#endif - -#ifdef HAVE_CONFIG_H -# include "config.h" -#else -# if defined(UNDER_CE) -# define WITH_LEAN -# define HAVE_SSCANF -# elif defined(WIN32) -# define HAVE_STRRCHR -# define HAVE_STRTOD -# define HAVE_SSCANF -# define HAVE_STRTOL -# define HAVE_STRTOUL -# define HAVE_SYS_TIMEB_H -# define HAVE_FTIME -# define HAVE_WCTOMB -# define HAVE_MBTOWC -# elif defined(CYGWIN) -# define HAVE_STRRCHR -# define HAVE_STRTOD -# define HAVE_SSCANF -# define HAVE_STRTOL -# define HAVE_STRTOUL -# define HAVE_SYS_TIMEB_H -# define HAVE_FTIME -# define HAVE_RAND_R -# define HAVE_GMTIME_R -# define HAVE_LOCALTIME_R -# define HAVE_WCTOMB -# define HAVE_MBTOWC -# elif defined(__APPLE__) -# define HAVE_STRRCHR -# define HAVE_STRTOD -# define HAVE_SSCANF -# define HAVE_STRTOL -# define HAVE_STRTOUL -# define HAVE_RAND_R -# define HAVE_GMTIME_R -# define HAVE_LOCALTIME_R -# define HAVE_TIMEGM -# define HAVE_WCTOMB -# define HAVE_MBTOWC -# elif defined(_AIXVERSION_431) -# define HAVE_STRRCHR -# define HAVE_STRTOD -# define HAVE_SSCANF -# define HAVE_STRTOL -# define HAVE_STRTOUL -# define HAVE_SYS_TIMEB_H -# define HAVE_FTIME -# define HAVE_RAND_R -# define HAVE_GMTIME_R -# define HAVE_LOCALTIME_R -# define HAVE_WCTOMB -# define HAVE_MBTOWC -# elif defined(HP_UX) -# define HAVE_STRRCHR -# define HAVE_STRTOD -# define HAVE_SSCANF -# define HAVE_STRTOL -# define HAVE_STRTOUL -# define HAVE_SYS_TIMEB_H -# define HAVE_FTIME -# define HAVE_RAND_R -# define HAVE_GMTIME_R -# define HAVE_LOCALTIME_R -# define HAVE_WCTOMB -# define HAVE_MBTOWC -# elif defined(FREEBSD) -# define HAVE_STRRCHR -# define HAVE_STRTOD -# define HAVE_SSCANF -# define HAVE_STRTOL -# define HAVE_STRTOUL -# define HAVE_GETTIMEOFDAY -# define HAVE_RAND_R -# define HAVE_GMTIME_R -# define HAVE_LOCALTIME_R -# define HAVE_WCTOMB -# define HAVE_MBTOWC -# elif defined(__VMS) -# define HAVE_STRRCHR -# define HAVE_STRTOD -# define HAVE_SSCANF -# define HAVE_STRTOL -# define HAVE_STRTOUL -# define HAVE_SYS_TIMEB_H -# define HAVE_FTIME -# define HAVE_RAND_R -# define HAVE_GMTIME_R -# define HAVE_LOCALTIME_R -# define HAVE_WCTOMB -# define HAVE_MBTOWC -# elif defined(__GLIBC__) || defined(__GNU__) -# define HAVE_STRRCHR -# define HAVE_STRTOD -# define HAVE_SSCANF -# define HAVE_STRTOL -# define HAVE_STRTOUL -# define HAVE_SYS_TIMEB_H -# define HAVE_FTIME -# define HAVE_RAND_R -# define HAVE_GMTIME_R -# define HAVE_LOCALTIME_R -# define HAVE_TIMEGM -# define HAVE_WCTOMB -# define HAVE_MBTOWC -# define HAVE_ISNAN -# elif defined(TRU64) -# define HAVE_STRRCHR -# define HAVE_STRTOD -# define HAVE_SSCANF -# define HAVE_STRTOL -# define HAVE_STRTOUL -# define HAVE_GETTIMEOFDAY -# define HAVE_SYS_TIMEB_H -# define HAVE_RAND_R -# define HAVE_GMTIME_R -# define HAVE_LOCALTIME_R -# define __USE_STD_IOSTREAM -# define HAVE_WCTOMB -# define HAVE_MBTOWC -# elif defined(MAC_CARBON) -# define WITH_NOIO -# define HAVE_STRRCHR -# define HAVE_STRTOD -# define HAVE_SSCANF -# define HAVE_STRTOL -# define HAVE_STRTOUL -# define HAVE_FTIME -# define HAVE_RAND_R -# define HAVE_GETHOSTBYNAME_R -# define HAVE_GMTIME_R -# define HAVE_LOCALTIME_R -# define HAVE_WCTOMB -# define HAVE_MBTOWC -# elif defined(PALM) -# define WITH_LEAN -# define HAVE_STRTOD /* strtod() is defined in palmFunctions.h */ -# include /* Needs to be included before unix headers */ -# include -# define IGNORE_STDIO_STUBS -# include -# define O_NONBLOCK FNONBIO -# include -# include -# include "palmFunctions.h" -# elif defined(SYMBIAN) -# define WITH_LEAN -# define WITH_NONAMESPACES -# define HAVE_STRTOD /* use STRTOD since sscanf doesn't seem to work */ -# include -# include -# elif defined(VXWORKS) -# define HAVE_STRRCHR -# define HAVE_STRTOD -# define HAVE_SSCANF -# define HAVE_STRTOL -# define HAVE_STRTOUL -# define HAVE_RAND_R -# define HAVE_PGMTIME_R -# define HAVE_PLOCALTIME_R -# define HAVE_MKTIME -# elif defined(OS390) -# define HAVE_STRRCHR -# define HAVE_STRTOD -# define HAVE_SSCANF -# define HAVE_STRTOL -# define HAVE_STRTOUL -# define HAVE_SYS_TIMEB_H -# define HAVE_FTIME -# define HAVE_RAND_R -# define HAVE_GMTIME_R -# define HAVE_LOCALTIME_R -# define HAVE_WCTOMB -# define HAVE_MB -# else -/* Default asumptions on supported functions */ -# define HAVE_STRRCHR -# define HAVE_STRTOD -# define HAVE_SSCANF -# define HAVE_STRTOL -# define HAVE_STRTOUL -# define HAVE_SYS_TIMEB_H -# define HAVE_FTIME -# define HAVE_RAND_R -# define HAVE_GETHOSTBYNAME_R -# define HAVE_GMTIME_R -# define HAVE_LOCALTIME_R -# define HAVE_WCTOMB -# define HAVE_MBTOWC -# endif -#endif - -#if defined(TRU64) -# define SOAP_LONG_FORMAT "%ld" -# define SOAP_ULONG_FORMAT "%lu" -#elif defined(WIN32) -# define SOAP_LONG_FORMAT "%I64d" -# define SOAP_ULONG_FORMAT "%I64u" -#endif - -#ifndef SOAP_LONG_FORMAT -# define SOAP_LONG_FORMAT "%lld" /* printf format for 64 bit ints */ -#endif - -#ifndef SOAP_ULONG_FORMAT -# define SOAP_ULONG_FORMAT "%llu" /* printf format for unsigned 64 bit ints */ -#endif - -#ifndef SOAP_MALLOC /* use libc malloc */ -# define SOAP_MALLOC(n) malloc(n) -#endif - -#ifndef SOAP_FREE /* use libc free */ -# define SOAP_FREE(p) free(p) -#endif - -#include - -#ifndef PALM -# include -# include -#endif - -#include -#include - -#if defined(__cplusplus) && !defined(WITH_LEAN) -# include -# include - using namespace std; -#endif - -#ifdef WITH_NOHTTP -# ifndef WITH_NOIO -# define WITH_NOIO -# undef WITH_COOKIES -# endif -#endif - -#ifndef UNDER_CE -# ifndef PALM -# ifndef WITH_NOIO -# include -# include -# endif -# ifndef WITH_LEAN -# ifdef HAVE_SYS_TIMEB_H -# include /* for ftime() */ -# endif -# include -# endif -# endif -#endif - -#ifdef OPENSERVER -# include -# include -# include - extern int h_errno; -#endif - -#ifndef WITH_NOIO -# ifndef WIN32 -# ifndef PALM -# include -# ifdef VXWORKS -# include -# endif -# ifndef VXWORKS -# ifndef SYMBIAN -# include -# endif -# endif -# ifdef SUN_OS -# include /* SUN */ -# include /* SUN < 2.8 (?) */ -# endif -# ifdef VXWORKS -# include -# else -# include -# endif -# include -# ifdef OS390 -# include -# else -# include /* TCP_NODELAY */ -# endif -# include -# endif -# endif -#endif - -#ifdef WITH_FASTCGI -# include -#endif - -#ifdef WITH_OPENSSL -# define OPENSSL_NO_KRB5 -# include -# include -# include -# ifndef ALLOW_OLD_VERSIONS -# if (OPENSSL_VERSION_NUMBER < 0x00905100L) -# error "Must use OpenSSL 0.9.6 or later" -# endif -# endif -#endif - -#ifdef WITH_GZIP -# ifndef WITH_ZLIB -# define WITH_ZLIB -# endif -#endif - -#ifdef WITH_CASEINSENSITIVETAGS -# define SOAP_STRCMP soap_tag_cmp /* case insensitve XML element/attribute names */ -#else -# define SOAP_STRCMP strcmp /* case sensitive XML element/attribute names */ -#endif - -#ifdef WITH_ZLIB -# include -#endif - -#ifndef PALM -# include /* for isnan() */ -#endif - -/* #define DEBUG */ /* Uncomment to debug sending (in file SENT.log) receiving (in file RECV.log) and messages (in file TEST.log) */ - -#ifdef __cplusplus -extern "C" { -#endif - -#ifdef WIN32 -# ifndef UNDER_CE -# include -# include -# endif -# include -/* # include */ /* Alternative: use winsock2 (not available with eVC) */ -/* WR[ */ -# ifdef WITH_IPV6 -# include -# include -# endif -#else -# ifdef VXWORKS -# include -# include -# include -# endif -/* ]WR */ -# ifndef WITH_NOIO -# ifndef PALM -# include -# include -# include -# include -# endif -# endif -#endif - -#ifdef WIN32 -# define SOAP_SOCKET SOCKET -#else -# define SOAP_SOCKET int -# define closesocket(n) close(n) -#endif - -#define SOAP_INVALID_SOCKET (-1) -#define soap_valid_socket(n) ((n) != SOAP_INVALID_SOCKET) - -#if defined(SYMBIAN) -# define LONG64 long -# define ULONG64 unsigned LONG64 -#elif !defined(WIN32) || defined(__GLIBC__) || defined(__GNU__) -# ifndef LONG64 -# define LONG64 long long -# define ULONG64 unsigned LONG64 -# endif -#elif defined(UNDER_CE) -# define LONG64 __int64 -# define ULONG64 unsigned LONG64 -#elif defined(__BORLANDC__) -# define LONG64 __int64 -# define ULONG64 unsigned LONG64 -#endif - -#if defined(WIN32) -# define soap_int32 __int32 -#elif defined(SYMBIAN) -# define soap_int32 long -#elif defined(PALM) -# define soap_int32 Int32 -#else -# define soap_int32 int32_t -#endif - -#ifdef WIN32 -# define SOAP_EINTR WSAEINTR -# define SOAP_EAGAIN WSAEWOULDBLOCK -# define SOAP_EWOULDBLOCK WSAEWOULDBLOCK -# define SOAP_EINPROGRESS WSAEINPROGRESS -#else -# define SOAP_EINTR EINTR -# define SOAP_EAGAIN EAGAIN -# ifdef SYMBIAN -# define SOAP_EWOULDBLOCK 9898 -# define SOAP_EINPROGRESS 9899 -# else -# define SOAP_EWOULDBLOCK EWOULDBLOCK -# define SOAP_EINPROGRESS EINPROGRESS -# endif -#endif - -#ifdef WIN32 -# ifdef UNDER_CE -# define soap_errno GetLastError() -# define soap_socket_errno GetLastError() -# else -# define soap_errno GetLastError() -# define soap_socket_errno WSAGetLastError() -# endif -#else -# ifndef WITH_NOIO -# define soap_errno errno -# define soap_socket_errno errno -# else -# define soap_errno 0 -# define soap_socket_errno 0 -# endif -#endif - -#ifndef SOAP_BUFLEN -# ifndef WITH_LEAN -# define SOAP_BUFLEN (32768) /* buffer length for socket packets, also used by gethostbyname_r so don't make this too small */ -# else -# define SOAP_BUFLEN (2048) -# endif -#endif -#ifndef SOAP_LABLEN -# ifndef WITH_LEAN -# define SOAP_LABLEN (256) /* initial look-aside buffer length */ -# else -# define SOAP_LABLEN (32) -# endif -#endif -#ifndef SOAP_PTRHASH -# ifndef WITH_LEAN -# define SOAP_PTRHASH (1024) /* size of pointer analysis hash table (must be power of 2) */ -# else -# define SOAP_PTRHASH (16) -# endif -#endif -#ifndef SOAP_IDHASH -# ifndef WITH_LEAN -# define SOAP_IDHASH (1999) /* prime size of hash table for parsed id/ref */ -# else -# define SOAP_IDHASH (19) /* 19, 199 */ -# endif -#endif -#ifndef SOAP_BLKLEN -# ifndef WITH_LEAN -# define SOAP_BLKLEN (256) /* size of blocks to collect long strings and XML attributes */ -# else -# define SOAP_BLKLEN (32) -# endif -#endif -#ifndef SOAP_TAGLEN -# ifndef WITH_LEAN -# define SOAP_TAGLEN (256) /* maximum length of XML element tag/attribute name or host/path name + 1 */ -# else -# define SOAP_TAGLEN (64) -# endif -#endif -#ifndef SOAP_HDRLEN -# ifndef WITH_LEAN -# define SOAP_HDRLEN (8192) /* maximum length of HTTP header line (must be >4096 to read cookies) */ -# else -# define SOAP_HDRLEN (1024) -# endif -#endif -#ifndef SOAP_MAXDIMS -# ifndef WITH_LEAN -# define SOAP_MAXDIMS (16) /* maximum array dimensions (array nestings) must be less than 64 to protect soap->tmpbuf */ -# else -# define SOAP_MAXDIMS (4) -# endif -#endif - -#ifndef SOAP_MAXLOGS -# define SOAP_MAXLOGS (3) /* max number of debug logs per struct soap environment */ -# define SOAP_INDEX_RECV (0) -# define SOAP_INDEX_SENT (1) -# define SOAP_INDEX_TEST (2) -#endif - -#ifndef SOAP_MAXKEEPALIVE -# define SOAP_MAXKEEPALIVE (100) /* max iterations to keep server connection alive */ -#endif - -#ifndef SOAP_MAXARRAYSIZE -# define SOAP_MAXARRAYSIZE (100000) /* "trusted" max size of inbound SOAP array for compound array allocation */ -#endif - -#ifdef VXWORKS -# ifdef __INCmathh -# include -# ifndef HAVE_ISNAN -# define HAVE_ISNAN -# endif -# define soap_isnan(num) isNan(num) -# endif -#endif - -#ifdef WIN32 -# include -# ifndef HAVE_ISNAN -# define HAVE_ISNAN -# endif -# define soap_isnan(num) _isnan(num) -#endif - -#ifdef SUN_OS -# define soap_isnan(n) isnan(n) -#endif - -#if !defined(HAVE_ISNAN) && (defined(_MATH_H) || defined(_MATH_INCLUDED)) -# define HAVE_ISNAN -#endif - -#ifndef soap_isnan -# ifdef HAVE_ISNAN -# define soap_isnan(n) isnan(n) -# else -# define soap_isnan(_) (0) -# endif -#endif - -extern const struct soap_double_nan { unsigned int n1, n2; } soap_double_nan; - -#ifdef VXWORKS -# ifndef FLT_MAX -# define FLT_MAX _ARCH_FLT_MAX -# endif -# ifndef DBL_MAX -# define DBL_MAX _ARCH_DBL_MAX -# endif -#endif - -#ifndef FLT_NAN -# ifdef HAVE_ISNAN -# define FLT_NAN (*(float*)&soap_double_nan) -# else -# define FLT_NAN (0.0) -# endif -#endif - -#ifndef FLT_PINFTY -# ifdef FLT_MAX -# define FLT_PINFTY FLT_MAX -# else -# ifdef HUGE_VAL -# define FLT_PINFTY (float)HUGE_VAL -# else -# ifdef FLOAT_MAX -# define FLT_PINFTY FLOAT_MAX -# else -# define FLT_PINFTY (3.40282347e+38F) -# endif -# endif -# endif -#endif - -#ifndef FLT_NINFTY -# define FLT_NINFTY (-FLT_PINFTY) -#endif - -#ifndef DBL_NAN -# ifdef HAVE_ISNAN -# define DBL_NAN (*(double*)&soap_double_nan) -# else -# define DBL_NAN (0.0) -# endif -#endif - -#ifndef DBL_PINFTY -# ifdef DBL_MAX -# define DBL_PINFTY DBL_MAX -# else -# ifdef HUGE_VAL -# define DBL_PINFTY (double)HUGE_VAL -# else -# ifdef DOUBLE_MAX -# define DBL_PINFTY DOUBLE_MAX -# else -# define DBL_PINFTY (1.7976931348623157e+308) -# endif -# endif -# endif -#endif - -#ifndef DBL_NINFTY -# define DBL_NINFTY (-DBL_PINFTY) -#endif - -#define soap_ispinfd(n) ((n) >= DBL_PINFTY) -#define soap_ispinff(n) ((n) >= FLT_PINFTY) -#define soap_isninfd(n) ((n) <= DBL_NINFTY) -#define soap_isninff(n) ((n) <= FLT_NINFTY) - -/* gSOAP error codes */ - -#define SOAP_EOF EOF -#define SOAP_ERR EOF -#define SOAP_OK 0 -#define SOAP_CLI_FAULT 1 -#define SOAP_SVR_FAULT 2 -#define SOAP_TAG_MISMATCH 3 -#define SOAP_TYPE 4 -#define SOAP_SYNTAX_ERROR 5 -#define SOAP_NO_TAG 6 -#define SOAP_IOB 7 -#define SOAP_MUSTUNDERSTAND 8 -#define SOAP_NAMESPACE 9 -/* #define SOAP_OBJ_MISMATCH 10 obsolete */ -#define SOAP_FATAL_ERROR 11 -#define SOAP_FAULT 12 -#define SOAP_NO_METHOD 13 -#define SOAP_GET_METHOD 14 -#define SOAP_EOM 15 -#define SOAP_NULL 16 -#define SOAP_MULTI_ID 17 -#define SOAP_MISSING_ID 18 -#define SOAP_HREF 19 -#define SOAP_TCP_ERROR 20 -#define SOAP_HTTP_ERROR 21 -#define SOAP_SSL_ERROR 22 -#define SOAP_ZLIB_ERROR 23 -#define SOAP_DIME_ERROR 24 -#define SOAP_DIME_HREF 25 -#define SOAP_DIME_MISMATCH 26 -#define SOAP_DIME_END 27 -#define SOAP_MIME_ERROR 28 -#define SOAP_VERSIONMISMATCH 29 -#define SOAP_PLUGIN_ERROR 30 -#define SOAP_DATAENCODINGUNKNOWN 31 -#define SOAP_REQUIRED 32 -#define SOAP_PROHIBITED 33 -#define SOAP_OCCURS 34 -#define SOAP_LENGTH 35 - -#define soap_xml_error_check(e) ((e) == SOAP_TAG_MISMATCH || (e) == SOAP_TAG_END || (e) == SOAP_SYNTAX_ERROR || (e) == SOAP_NAMESPACE || (e) == SOAP_MULTI_ID || (e) == SOAP_MISSING_ID || (e) == SOAP_REQUIRED || (e) == SOAP_PROHIBITED || (e) == SOAP_OCCURS || (e) == SOAP_LENGTH || (e) == SOAP_NULL || (e) == SOAP_HREF) -#define soap_soap_error_check(e) ((e) == SOAP_CLI_FAULT || (e) == SOAP_SVR_FAULT || (e) == SOAP_VERSIONMISMATCH || (e) == SOAP_MUSTUNDERSTAND || (e) == SOAP_FAULT || (e) == SOAP_NO_METHOD) -#define soap_tcp_error_check(e) ((e) == SOAP_EOF || (e) == SOAP_TCP_ERROR) -#define soap_ssl_error_check(e) ((e) == SOAP_SSL_ERROR) -#define soap_zlib_error_check(e) ((e) == SOAP_ZLIB_ERROR) -#define soap_mime_error_check(e) ((e) == SOAP_MIME_ERROR) -#define soap_dime_error_check(e) ((e) == SOAP_DIME_ERROR || (e) == SOAP_DIME_MISMATCH) -#define soap_http_error_check(e) ((e) == SOAP_HTTP_ERROR || (e) == SOAP_GET_METHOD || ((e) >= 100 && (e) < 600)) - -/* gSOAP HTTP response status codes 100 to 600 are reserved */ - -/* Special gSOAP HTTP response status codes */ - -#define SOAP_STOP 1000 /* No HTTP response */ -#define SOAP_HTML 1001 /* Custom HTML response */ -#define SOAP_FILE 1002 /* Custom file-based response */ - -/* gSOAP HTTP request status codes */ - -#define SOAP_POST 1003 -#define SOAP_GET 1104 - -/* gSOAP DIME */ - -#define SOAP_DIME_CF 0x01 -#define SOAP_DIME_ME 0x02 -#define SOAP_DIME_MB 0x04 -#define SOAP_DIME_VERSION 0x08 /* DIME version 1 */ -#define SOAP_DIME_MEDIA 0x10 -#define SOAP_DIME_ABSURI 0x20 - -/* gSOAP ZLIB */ - -#define SOAP_ZLIB_NONE 0x00 -#define SOAP_ZLIB_DEFLATE 0x01 -#define SOAP_ZLIB_INFLATE 0x02 -#define SOAP_ZLIB_GZIP 0x02 - -/* gSOAP transport, connection, and content encoding modes */ - -typedef soap_int32 soap_mode; - -#define SOAP_IO 0x00000003 /* IO mask */ -#define SOAP_IO_FLUSH 0x00000000 /* flush output immediately, no buffering */ -#define SOAP_IO_BUFFER 0x00000001 /* buffer output in packets of size SOAP_BUFLEN */ -#define SOAP_IO_STORE 0x00000002 /* store entire output to determine length for transport */ -#define SOAP_IO_CHUNK 0x00000003 /* use HTTP chunked transfer AND buffer packets */ - -#define SOAP_IO_LENGTH 0x00000004 -#define SOAP_IO_KEEPALIVE 0x00000008 - -#define SOAP_ENC_LATIN 0x00800010 /* iso-8859-1 encoding */ -#define SOAP_ENC_XML 0x00000020 /* plain XML encoding, no HTTP header */ -#define SOAP_ENC_DIME 0x00000040 -#define SOAP_ENC_MIME 0x00000080 -#define SOAP_ENC_ZLIB 0x00000100 -#define SOAP_ENC_SSL 0x00000200 - -#define SOAP_ENC 0x00000FFF /* IO and ENC mask */ - -#define SOAP_XML_STRICT 0x00001000 /* strict validation */ -#define SOAP_XML_CANONICAL 0x00002000 /* C14N canonical XML */ -#define SOAP_XML_TREE 0x00004000 -#define SOAP_XML_GRAPH 0x00008000 -#define SOAP_XML_NIL 0x00010000 -#define SOAP_XML_DOM 0x00020000 -#define SOAP_XML_SEC 0x00040000 /* reserved for WS security */ - -#define SOAP_C_NOIOB 0x00100000 -#define SOAP_C_UTFSTRING 0x00200000 -#define SOAP_C_MBSTRING 0x00400000 - -#define SOAP_DOM_TREE 0x01000000 -#define SOAP_DOM_NODE 0x02000000 - -#define SOAP_IO_DEFAULT SOAP_IO_FLUSH - -/* SSL client/server authentication settings */ - -#define SOAP_SSL_NO_AUTHENTICATION 0x00 /* for testing purposes */ -#define SOAP_SSL_REQUIRE_SERVER_AUTHENTICATION 0x01 /* client requires server to authenticate */ -#define SOAP_SSL_REQUIRE_CLIENT_AUTHENTICATION 0x02 /* server requires client to authenticate */ - -#define SOAP_SSL_DEFAULT SOAP_SSL_REQUIRE_SERVER_AUTHENTICATION - -/* */ - -#define SOAP_BEGIN 0 -#define SOAP_IN_ENVELOPE 2 -#define SOAP_IN_HEADER 3 -#define SOAP_END_HEADER 4 -#define SOAP_IN_BODY 5 -#define SOAP_END_BODY 6 -#define SOAP_END_ENVELOPE 7 -#define SOAP_END 8 - -/* DEBUG macros */ - -#ifndef WITH_LEAN -# ifdef DEBUG -# ifndef SOAP_DEBUG -# define SOAP_DEBUG -# endif -# endif -#endif - -#ifdef SOAP_DEBUG -# ifndef SOAP_MESSAGE -# define SOAP_MESSAGE fprintf -# endif -# ifndef DBGLOG -# define DBGLOG(DBGFILE, CMD) \ -{ if (soap)\ - { if (!soap->fdebug[SOAP_INDEX_##DBGFILE])\ - soap_open_logfile(soap, SOAP_INDEX_##DBGFILE);\ - if (soap->fdebug[SOAP_INDEX_##DBGFILE])\ - { FILE *fdebug = soap->fdebug[SOAP_INDEX_##DBGFILE];\ - CMD;\ - fflush(fdebug);\ - }\ - }\ -} -# endif -# ifndef DBGMSG -# define DBGMSG(DBGFILE, MSG, LEN) \ -{ if (soap)\ - { if (!soap->fdebug[SOAP_INDEX_##DBGFILE])\ - soap_open_logfile(soap, SOAP_INDEX_##DBGFILE);\ - if (soap->fdebug[SOAP_INDEX_##DBGFILE])\ - { fwrite((MSG), 1, (LEN), soap->fdebug[SOAP_INDEX_##DBGFILE]);\ - fflush(soap->fdebug[SOAP_INDEX_##DBGFILE]);\ - }\ - }\ -} -# endif -#else -# define DBGLOG(DBGFILE, CMD) -# define DBGMSG(DBGFILE, MSG, LEN) -#endif - -/* UCS-4 requires 32 bits (0-7FFFFFFF, the sign bit is used by gSOAP to distinguish XML entities) */ -typedef soap_int32 soap_wchar; - -struct Namespace -{ const char *id; - const char *ns; - const char *in; - char *out; -}; - -struct soap_nlist -{ struct soap_nlist *next; - unsigned int level; - short index; /* corresponding entry in ns mapping table */ - char *ns; /* only set when parsed ns URI is not in the ns mapping table */ - char id[1]; /* the actual string value flows into the allocated region below this struct */ -}; - -struct soap_blist -{ struct soap_blist *next; - char *ptr; - size_t size; -}; - -struct soap_array -{ void *__ptr; - int __size; -}; - -/* pointer serialization management */ -struct soap_plist -{ struct soap_plist *next; - const void *ptr; - const struct soap_array *array; - int type; - int id; - char mark1; - char mark2; -}; - -/* class allocation list */ -struct soap_clist -{ struct soap_clist *next; - void *ptr; - int type; - int size; - void (*fdelete)(struct soap_clist*); -}; - -struct soap_attribute -{ struct soap_attribute *next; - char *value; - size_t size; - char *ns; - short visible; - char name[1]; /* the actual name string flows into the allocated region below this struct */ -}; - -struct soap_cookie -{ struct soap_cookie *next; - char *name; - char *value; - char *domain; - char *path; - long expire; /* client-side: local time to expire; server-side: seconds to expire */ - unsigned int version; - short secure; - short session; /* server-side */ - short env; /* server-side: got cookie from client */ - short modified; /* server-side: client cookie was modified */ -}; - -#ifdef __cplusplus -SOAP_FMAC1 struct soap_multipart* SOAP_FMAC2 soap_next_multipart(struct soap_multipart*); - -class soap_multipart_iterator -{ public: - struct soap_multipart *content; - bool operator==(const soap_multipart_iterator& iter) const - { return content == iter.content; } - bool operator!=(const soap_multipart_iterator& iter) const - { return content != iter.content; } - struct soap_multipart &operator*() const - { return *content; } - soap_multipart_iterator &operator++() - { content = soap_next_multipart(content); return *this; } - soap_multipart_iterator() : content(NULL) - { } - soap_multipart_iterator(struct soap_multipart *p) : content(p) - { } -}; -#endif - -#ifndef WITH_LEANER -struct soap_dime -{ size_t count; - size_t size; - size_t chunksize; - size_t buflen; - char flags; - char *ptr; - const char *id; - const char *type; - const char *options; - struct soap_multipart *list; /* list of DIME attachments received */ - struct soap_multipart *first, *last; /* temporary in/out queue */ -#ifdef __cplusplus - soap_multipart_iterator begin() - { soap_multipart_iterator iter(list); return iter; }; - soap_multipart_iterator end() - { soap_multipart_iterator iter(NULL); return iter; }; -#endif -}; -#endif - -#ifndef WITH_LEANER -struct soap_mime -{ char *boundary; /* MIME boundary */ - const char *start; /* MIME start ID */ - struct soap_multipart *list; /* list of DIME attachments received */ - struct soap_multipart *first, *last; /* temporary in/out queue */ -#ifdef __cplusplus - soap_multipart_iterator begin() - { soap_multipart_iterator iter(list); return iter; }; - soap_multipart_iterator end() - { soap_multipart_iterator iter(NULL); return iter; }; -#endif -}; -#endif - -#ifndef WITH_LEANER -/* RFC2045 MIME content transfer encodings */ -enum soap_mime_encoding -{ SOAP_MIME_NONE, - SOAP_MIME_7BIT, - SOAP_MIME_8BIT, - SOAP_MIME_BINARY, - SOAP_MIME_QUOTED_PRINTABLE, - SOAP_MIME_BASE64, - SOAP_MIME_IETF_TOKEN, - SOAP_MIME_X_TOKEN -}; -#endif - -#ifndef WITH_LEANER -/* DIME/MIME multipart list */ -struct soap_multipart -{ struct soap_multipart *next; - char *ptr; /* points to raw data content */ - size_t size; /* size of data content */ - const char *id; /* DIME/MIME content ID */ - const char *type; /* DIME/MIME type (MIME type format) */ - const char *options; /* DIME options */ - enum soap_mime_encoding encoding; /* MIME Content-Transfer-Encoding */ - const char *location; /* MIME Content-Location (optional) */ - const char *description; /* MIME Content-Description (optional) */ -#ifdef __cplusplus - typedef soap_multipart_iterator iterator; -#endif -}; -#endif - -#ifndef WITH_LEANER -struct soap_dom_attribute -{ struct soap_dom_attribute *next; - const char *nstr; - char *name; - char *data; - wchar_t *wide; - struct soap *soap; -#ifdef __cplusplus - struct soap_dom_attribute &set(const char *nstr, const char *name); /* set namespace and name */ - struct soap_dom_attribute &set(const char *data); /* set data */ - void unlink(); - soap_dom_attribute(); - soap_dom_attribute(struct soap *soap); - soap_dom_attribute(struct soap *soap, const char *nstr, const char *name, const char *data); - ~soap_dom_attribute(); -#endif -}; -#endif - -#ifndef WITH_LEANER -#ifdef __cplusplus -class soap_dom_iterator -{ public: - struct soap_dom_element *elt; - const char *nstr; - const char *name; - int type; - bool operator==(const soap_dom_iterator&) const; - bool operator!=(const soap_dom_iterator&) const; - struct soap_dom_element &operator*() const; - soap_dom_iterator &operator++(); - soap_dom_iterator(); - soap_dom_iterator(struct soap_dom_element*); - ~soap_dom_iterator(); -}; -#endif -#endif - -#ifndef WITH_LEANER -struct soap_dom_element -{ struct soap_dom_element *next; /* next sibling */ - struct soap_dom_element *prnt; /* parent */ - struct soap_dom_element *elts; /* first child element */ - struct soap_dom_attribute *atts; /* first child attribute */ - const char *nstr; /* namespace string */ - char *name; /* element tag name */ - char *data; /* element content data (with SOAP_C_UTFSTRING flag set) */ - wchar_t *wide; /* element content data */ - int type; /* optional: serialized C/C++ data type */ - void *node; /* optional: pointer to serialized C/C++ data */ - struct soap *soap; -#ifdef __cplusplus - typedef soap_dom_iterator iterator; - struct soap_dom_element &set(const char *nstr, const char *name); - struct soap_dom_element &set(const char *data); - struct soap_dom_element &set(void *node, int type); - struct soap_dom_element &add(struct soap_dom_element*); - struct soap_dom_element &add(struct soap_dom_element&); - struct soap_dom_element &add(struct soap_dom_attribute*); - struct soap_dom_element &add(struct soap_dom_attribute&); - soap_dom_iterator begin(); - soap_dom_iterator end(); - soap_dom_iterator find(const char *nstr, const char *name); - soap_dom_iterator find(int type); - void unlink(); - soap_dom_element(); - soap_dom_element(struct soap *soap); - soap_dom_element(struct soap *soap, const char *nstr, const char *name); - soap_dom_element(struct soap *soap, const char *nstr, const char *name, const char *data); - soap_dom_element(struct soap *soap, const char *nstr, const char *name, void *node, int type); - ~soap_dom_element(); -#endif -}; -#endif - -#if defined(__cplusplus) && !defined(WITH_LEAN) -} -extern ostream &operator<<(ostream&, const struct soap_dom_element&); -extern istream &operator>>(istream&, struct soap_dom_element&); -extern "C" { -#endif - -struct soap -{ short version; /* 1 = SOAP1.1 and 2 = SOAP1.2 (set automatically from namespace URI in nsmap table) */ - short copy; /* 1 = copy of another soap struct */ - soap_mode mode; - soap_mode imode; - soap_mode omode; - const char *float_format; /* points to user-definable format string for floats (<1024 chars) */ - const char *double_format; /* points to user-definable format string for doubles (<1024 chars) */ - const char *dime_id_format; /* points to user-definable format string for integer DIME id ( 0, gives socket recv timeout in seconds, < 0 in usec */ - int send_timeout; /* when > 0, gives socket send timeout in seconds, < 0 in usec */ - int connect_timeout; /* when > 0, gives socket connect() timeout in seconds, < 0 in usec */ - int accept_timeout; /* when > 0, gives socket accept() timeout in seconds, < 0 in usec */ - int socket_flags; /* socket recv() and send() flags, e.g. set to MSG_NOSIGNAL to disable sigpipe */ - int connect_flags; /* connect() SOL_SOCKET sockopt flags, e.g. set to SO_DEBUG to debug socket */ - int bind_flags; /* bind() SOL_SOCKET sockopt flags, e.g. set to SO_REUSEADDR to enable reuse */ - int accept_flags; /* accept() SOL_SOCKET sockopt flags */ - const struct Namespace *namespaces; /* Pointer to global namespace mapping table */ - struct Namespace *local_namespaces; /* Local namespace mapping table */ - struct soap_nlist *nlist; /* namespace stack */ - struct soap_blist *blist; /* block allocation stack */ - struct soap_clist *clist; /* class instance allocation list */ - void *alist; /* memory allocation list */ - struct soap_ilist *iht[SOAP_IDHASH]; - struct soap_plist *pht[SOAP_PTRHASH]; - struct SOAP_ENV__Header *header; - struct SOAP_ENV__Fault *fault; - void *user; /* to pass user-defined data */ - struct soap_plugin *plugins; /* linked list of plug-in data */ - char *userid; /* HTTP Basic authorization userid */ - char *passwd; /* HTTP Basic authorization passwd */ - int (*fpost)(struct soap*, const char*, const char*, int, const char*, const char*, size_t); - int (*fget)(struct soap*); - int (*fposthdr)(struct soap*, const char*, const char*); - int (*fresponse)(struct soap*, int, size_t); - int (*fparse)(struct soap*); - int (*fparsehdr)(struct soap*, const char*, const char*); - int (*fresolve)(struct soap*, const char*, struct in_addr* inaddr); - int (*fconnect)(struct soap*, const char*, const char*, int); - int (*fdisconnect)(struct soap*); - int (*fclosesocket)(struct soap*, SOAP_SOCKET); - int (*fshutdownsocket)(struct soap*, SOAP_SOCKET, int); - int (*fopen)(struct soap*, const char*, const char*, int); - int (*faccept)(struct soap*, int, struct sockaddr*, int *n); - int (*fclose)(struct soap*); - int (*fsend)(struct soap*, const char*, size_t); - size_t (*frecv)(struct soap*, char*, size_t); - int (*fpoll)(struct soap*); - int (*fignore)(struct soap*, const char*); - int (*fserveloop)(struct soap*); - void *(*fplugin)(struct soap*, const char*); -#ifndef WITH_LEANER - int (*fprepareinit)(struct soap*); - int (*fpreparesend)(struct soap*, const char*, size_t); - int (*fpreparerecv)(struct soap*, const char*, size_t); - void *(*fdimereadopen)(struct soap*, void*, const char*, const char*, const char*); - void *(*fdimewriteopen)(struct soap*, const char*, const char*, const char*); - void (*fdimereadclose)(struct soap*, void*); - void (*fdimewriteclose)(struct soap*, void*); - size_t (*fdimeread)(struct soap*, void*, char*, size_t); - int (*fdimewrite)(struct soap*, void*, const char*, size_t); -#endif - int master; - int socket; -#if defined(__cplusplus) && !defined(WITH_LEAN) - ostream *os; - istream *is; -#else - void *os; /* preserve alignment */ - void *is; /* preserve alignment */ -#endif -#ifndef UNDER_CE - int sendfd; - int recvfd; -#else - FILE *sendfd; - FILE *recvfd; -#endif -#ifdef WIN32 - char errorstr[256]; /* buf for FormatMessage() */ -#endif - size_t bufidx; /* index in soap.buf[] */ - size_t buflen; /* length of soap.buf[] content */ - soap_wchar ahead; /* parser lookahead */ - short cdata; /* CDATA parser state */ - short body; - unsigned int level; /* XML nesting level */ - size_t count; /* message length counter */ - size_t length; /* message length as set by HTTP header */ -#ifdef WITH_FAST - char *labbuf; /* look-aside buffer */ - size_t lablen; /* look-aside buffer allocated length */ - size_t labidx; /* look-aside buffer index to available part */ -#endif - char buf[SOAP_BUFLEN];/* send and receive buffer */ - char tmpbuf[1024]; /* in/output buffer for HTTP headers, simpleType values, attribute names, and DIME >=1024 bytes */ - char msgbuf[1024]; /* output buffer for (error) messages <=1024 bytes */ - char tag[SOAP_TAGLEN]; - char id[SOAP_TAGLEN]; - char href[SOAP_TAGLEN]; - char type[SOAP_TAGLEN]; - char arrayType[SOAP_TAGLEN]; - char arraySize[SOAP_TAGLEN]; - char arrayOffset[SOAP_TAGLEN]; - short other; - short root; - short position; - int positions[SOAP_MAXDIMS]; - struct soap_attribute *attributes; /* attribute list */ - short encoding; - short mustUnderstand; - short null; - short ns; - short part; - short alloced; - short peeked; - short keep_alive; - size_t chunksize; - size_t chunkbuflen; - char endpoint[SOAP_TAGLEN]; - char path[SOAP_TAGLEN]; - char host[SOAP_TAGLEN]; - char *action; - char *authrealm; /* HTTP authentication realm */ - char *prolog; /* XML declaration prolog */ - int port; - unsigned int max_keep_alive; - const char *proxy_host; /* Proxy Server host name */ - int proxy_port; /* Proxy Server port (default = 8080) */ - const char *proxy_userid; /* Proxy Authorization user name */ - const char *proxy_passwd; /* Proxy Authorization password */ - int status; /* -1 when request, else error code to be returned by server */ - int error; - int errmode; - int errnum; - unsigned long idnum; - unsigned long ip; -#ifndef WITH_LEANER - struct soap_dom_element *dom; - struct soap_dime dime; - struct soap_mime mime; -#endif -#if !defined(WITH_LEAN) || defined(SOAP_DEBUG) - const char *logfile[SOAP_MAXLOGS]; - FILE *fdebug[SOAP_MAXLOGS]; -#endif -#ifndef WITH_LEAN - struct soap_cookie *cookies; - const char *cookie_domain; - const char *cookie_path; - int cookie_max; -#endif -#ifdef WITH_OPENSSL - int (*fsslauth)(struct soap*); - int (*fsslverify)(int, X509_STORE_CTX*); - BIO *bio; - SSL *ssl; - SSL_CTX *ctx; - short require_server_auth; - short require_client_auth; - short rsa; /* when set, use RSA instead of DH */ - const char *keyfile; - const char *password; - const char *dhfile; - const char *cafile; - const char *capath; - const char *randfile; - SSL_SESSION *session; - char session_host[SOAP_TAGLEN]; - int session_port; -#endif -#ifdef WITH_ZLIB - short zlib_state; /* SOAP_ZLIB_NONE, SOAP_ZLIB_DEFLATE, or SOAP_ZLIB_INFLATE */ - short zlib_in; /* SOAP_ZLIB_NONE, SOAP_ZLIB_DEFLATE, or SOAP_ZLIB_GZIP */ - short zlib_out; /* SOAP_ZLIB_NONE, SOAP_ZLIB_DEFLATE, or SOAP_ZLIB_GZIP */ - z_stream d_stream; /* decompression stream */ - char z_buf[SOAP_BUFLEN]; /* buffer */ - size_t z_buflen; - unsigned short z_level; /* compression level to be used (0=none, 1=fast to 9=best) */ - uLong z_crc; /* internal gzip crc */ - float z_ratio_in; /* detected compression ratio compressed_length/length of inbound message */ - float z_ratio_out; /* detected compression ratio compressed_length/length of outbound message */ -#endif -/* WR[ */ -#ifdef WMW_RPM_IO - void *rpmreqid; -#endif /* WMW_RPM_IO */ -/* ]WR */ -}; - -struct soap_code_map -{ long code; - const char *string; -}; - -/* forwarding list */ -struct soap_flist -{ struct soap_flist *next; - int type; - void *ptr; - unsigned int level; - void (*fcopy)(struct soap*, int, int, void*, const void*, size_t); -}; - -/* id-ref forwarding list */ -struct soap_ilist -{ struct soap_ilist *next; - int type; - size_t size; - void *link; - void *copy; - struct soap_flist *flist; - void *ptr; - unsigned int level; - char id[1]; /* the actual id string value flows into the allocated region below this struct */ -}; - -struct soap_plugin -{ struct soap_plugin *next; - const char *id; - void *data; - int (*fcopy)(struct soap *soap, struct soap_plugin *dst, struct soap_plugin *src); - void (*fdelete)(struct soap *soap, struct soap_plugin *p); /* should delete fields of plugin only and not free(p) */ -}; - -#ifndef WITH_NONAMESPACES -extern SOAP_NMAC struct Namespace namespaces[]; -#endif - -#ifndef WITH_LEAN -# define soap_get0(soap) (((soap)->bufidx>=(soap)->buflen && soap_recv(soap)) ? EOF : (unsigned char)(soap)->buf[(soap)->bufidx]) -# define soap_get1(soap) (((soap)->bufidx>=(soap)->buflen && soap_recv(soap)) ? EOF : (unsigned char)(soap)->buf[(soap)->bufidx++]) -#else -soap_wchar soap_get0(struct soap*); -soap_wchar soap_get1(struct soap*); -#endif - -#define soap_revget1(soap) ((soap)->bufidx--) -#define soap_unget(soap, c) ((soap)->ahead = c) -#define soap_register_plugin(soap, plugin) soap_register_plugin_arg(soap, plugin, NULL) -#define soap_imode(soap, n) ((soap)->mode = (soap)->imode = (n)) -#define soap_set_imode(soap, n) ((soap)->mode = (soap)->imode |= (n)) -#define soap_clr_imode(soap, n) ((soap)->mode = (soap)->imode &= ~(n)) -#define soap_omode(soap, n) ((soap)->mode = (soap)->omode = (n)) -#define soap_set_omode(soap, n) ((soap)->mode = (soap)->omode |= (n)) -#define soap_clr_omode(soap, n) ((soap)->mode = (soap)->omode &= ~(n)) -#define soap_destroy(soap) soap_delete((soap), NULL) - -#ifdef HAVE_STRRCHR -# define soap_strrchr(s, t) strrchr(s, t) -#else - SOAP_FMAC1 char* SOAP_FMAC2 soap_strrchr(const char *s, int t); -#endif - -#ifdef HAVE_STRTOL -# define soap_strtol(s, t, b) strtol(s, t, b) -#else - SOAP_FMAC1 long SOAP_FMAC2 soap_strtol(const char *s, char **t, int b); -#endif - -#ifdef HAVE_STRTOUL -# define soap_strtoul(s, t, b) strtoul(s, t, b) -#else - SOAP_FMAC1 unsigned long SOAP_FMAC2 soap_strtoul(const char *s, char **t, int b); -#endif - -#ifdef WITH_NOIDREF -# define soap_embedded(s, p, t) (0) -# define soap_id_lookup(s, i, p, t, n, k) (p) -# define soap_id_forward(s, h, p, st, tt, n, k, fc) (p) -# define soap_reference(s, a, t) (1) -# define soap_array_reference(s, p, a, n, t) (1) -# define soap_embed(s, p, a, n, t, pp) (0) -# define soap_embedded_id(s, i, p, t) (i) -# define soap_is_embedded(s, p) (0) -# define soap_is_single(s, p) (1) -# define soap_lookup_type(s, i) (0) -# define soap_getindependent(s) (0) -# define soap_putindependent(s) (0) -# define soap_getelement(s, n) (0) -# define soap_putelement(s, p, t, i, n) (0) -# define soap_markelement(s, p, n) (0) -#endif - -SOAP_FMAC1 void SOAP_FMAC2 soap_fault(struct soap*); -SOAP_FMAC1 const char** SOAP_FMAC2 soap_faultcode(struct soap*); -SOAP_FMAC1 const char** SOAP_FMAC2 soap_faultstring(struct soap*); -SOAP_FMAC1 const char** SOAP_FMAC2 soap_faultdetail(struct soap*); -SOAP_FMAC1 void SOAP_FMAC2 soap_serializeheader(struct soap*); -SOAP_FMAC1 int SOAP_FMAC2 soap_putheader(struct soap*); -SOAP_FMAC1 int SOAP_FMAC2 soap_getheader(struct soap*); -SOAP_FMAC1 void SOAP_FMAC2 soap_serializefault(struct soap*); -SOAP_FMAC1 int SOAP_FMAC2 soap_putfault(struct soap*); -SOAP_FMAC1 int SOAP_FMAC2 soap_getfault(struct soap*); - -SOAP_FMAC1 int SOAP_FMAC2 soap_poll(struct soap*); -SOAP_FMAC1 int SOAP_FMAC2 soap_connect_command(struct soap*, int, const char*, const char*); -SOAP_FMAC1 int SOAP_FMAC2 soap_connect(struct soap*, const char*, const char*); -SOAP_FMAC1 int SOAP_FMAC2 soap_bind(struct soap*, const char*, int, int); -SOAP_FMAC1 int SOAP_FMAC2 soap_accept(struct soap*); -SOAP_FMAC1 int SOAP_FMAC2 soap_ssl_accept(struct soap*); - -SOAP_FMAC1 int SOAP_FMAC2 soap_ssl_server_context(struct soap*, unsigned short, const char*, const char*, const char*, const char*, const char*, const char*, const char*); -SOAP_FMAC1 int SOAP_FMAC2 soap_ssl_client_context(struct soap*, unsigned short, const char*, const char*, const char*, const char*, const char*); - -SOAP_FMAC1 int SOAP_FMAC2 soap_puthttphdr(struct soap*, int status, size_t count); - -SOAP_FMAC1 const char* SOAP_FMAC2 soap_get_header_attribute(struct soap*, const char*, const char*); -SOAP_FMAC1 const char* SOAP_FMAC2 soap_decode_key(char*, size_t, const char*); -SOAP_FMAC1 const char* SOAP_FMAC2 soap_decode_val(char*, size_t, const char*); - -SOAP_FMAC1 size_t SOAP_FMAC2 soap_hash(const char*); -SOAP_FMAC1 void SOAP_FMAC2 soap_set_endpoint(struct soap*, const char*); -SOAP_FMAC1 int SOAP_FMAC2 soap_flush_raw(struct soap*, const char*, size_t); -SOAP_FMAC1 int SOAP_FMAC2 soap_flush(struct soap*); -SOAP_FMAC1 soap_wchar SOAP_FMAC2 soap_get(struct soap*); -SOAP_FMAC1 soap_wchar SOAP_FMAC2 soap_getchar(struct soap*); -SOAP_FMAC1 int SOAP_FMAC2 soap_tag_cmp(const char*, const char*); -SOAP_FMAC1 void SOAP_FMAC2 soap_set_fault(struct soap*); -SOAP_FMAC1 int SOAP_FMAC2 soap_sender_fault(struct soap*, const char*, const char*); -SOAP_FMAC1 int SOAP_FMAC2 soap_receiver_fault(struct soap*, const char*, const char*); -SOAP_FMAC1 int SOAP_FMAC2 soap_set_sender_error(struct soap*, const char*, const char*, int); -SOAP_FMAC1 int SOAP_FMAC2 soap_set_receiver_error(struct soap*, const char*, const char*, int); - -SOAP_FMAC1 int SOAP_FMAC2 soap_send_raw(struct soap*, const char*, size_t); -SOAP_FMAC1 int SOAP_FMAC2 soap_recv_raw(struct soap*); -SOAP_FMAC1 int SOAP_FMAC2 soap_recv(struct soap*); -SOAP_FMAC1 int SOAP_FMAC2 soap_send(struct soap*, const char*); -SOAP_FMAC1 int SOAP_FMAC2 soap_send2(struct soap*, const char*, const char*); -SOAP_FMAC1 int SOAP_FMAC2 soap_send3(struct soap*, const char*, const char*, const char*); - -SOAP_FMAC1 int SOAP_FMAC2 soap_pututf8(struct soap*, unsigned long); -SOAP_FMAC1 soap_wchar SOAP_FMAC2 soap_getutf8(struct soap*); - -SOAP_FMAC1 int SOAP_FMAC2 soap_putbase64(struct soap*, const unsigned char*, int); -SOAP_FMAC1 unsigned char* SOAP_FMAC2 soap_getbase64(struct soap*, int*, int); -SOAP_FMAC1 int SOAP_FMAC2 soap_puthex(struct soap*, const unsigned char*, int); -SOAP_FMAC1 unsigned char* SOAP_FMAC2 soap_gethex(struct soap*, int*); - - -#ifndef WITH_NOIDREF -SOAP_FMAC1 int SOAP_FMAC2 soap_pointer_lookup_id(struct soap*, void *p, int t, struct soap_plist**); -SOAP_FMAC1 int SOAP_FMAC2 soap_pointer_lookup(struct soap*, const void *p, int t, struct soap_plist**); -SOAP_FMAC1 int SOAP_FMAC2 soap_pointer_enter(struct soap*, const void *p, const struct soap_array *a, int n, int t, struct soap_plist**); -SOAP_FMAC1 int SOAP_FMAC2 soap_array_pointer_lookup(struct soap*, const void *p, const struct soap_array *a, int n, int t, struct soap_plist**); -SOAP_FMAC1 int SOAP_FMAC2 soap_embed(struct soap *soap, const void *p, const struct soap_array *a, int n, const char *tag, int type); -SOAP_FMAC1 struct soap_ilist* SOAP_FMAC2 soap_lookup(struct soap*, const char*); -SOAP_FMAC1 struct soap_ilist* SOAP_FMAC2 soap_enter(struct soap*, const char*); -SOAP_FMAC1 int SOAP_FMAC2 soap_resolve(struct soap*); -SOAP_FMAC1 void SOAP_FMAC2 soap_embedded(struct soap*, const void *p, int t); -SOAP_FMAC1 int SOAP_FMAC2 soap_reference(struct soap*, const void *p, int t); -SOAP_FMAC1 int SOAP_FMAC2 soap_array_reference(struct soap*, const void *p, const struct soap_array *a, int n, int t); -SOAP_FMAC1 int SOAP_FMAC2 soap_embedded_id(struct soap*, int id, const void *p, int t); -SOAP_FMAC1 int SOAP_FMAC2 soap_is_embedded(struct soap*, struct soap_plist*); -SOAP_FMAC1 int SOAP_FMAC2 soap_is_single(struct soap*, struct soap_plist*); -SOAP_FMAC1 void SOAP_FMAC2 soap_set_embedded(struct soap*, struct soap_plist*); -#endif - -SOAP_FMAC1 void SOAP_FMAC2 soap_begin_count(struct soap*); -SOAP_FMAC1 int SOAP_FMAC2 soap_begin_send(struct soap*); -SOAP_FMAC1 int SOAP_FMAC2 soap_end_send(struct soap*); - -SOAP_FMAC1 const struct soap_code_map* SOAP_FMAC2 soap_code(const struct soap_code_map*, const char *str); -SOAP_FMAC1 long SOAP_FMAC2 soap_int_code(const struct soap_code_map*, const char *str, long other); -SOAP_FMAC1 const char* SOAP_FMAC2 soap_str_code(const struct soap_code_map*, long code); - -SOAP_FMAC1 int SOAP_FMAC2 soap_getline(struct soap*, char*, int); -SOAP_FMAC1 int SOAP_FMAC2 soap_begin_recv(struct soap*); -SOAP_FMAC1 int SOAP_FMAC2 soap_end_recv(struct soap*); - -SOAP_FMAC1 void* SOAP_FMAC2 soap_malloc(struct soap*, size_t); -SOAP_FMAC1 void SOAP_FMAC2 soap_dealloc(struct soap*, void*); -SOAP_FMAC1 struct soap_clist * SOAP_FMAC2 soap_link(struct soap*, void*, int, int, void (*fdelete)(struct soap_clist*)); -SOAP_FMAC1 void SOAP_FMAC2 soap_unlink(struct soap*, const void*); -SOAP_FMAC1 void SOAP_FMAC2 soap_free(struct soap*); - -#ifndef WITH_NOIDREF -SOAP_FMAC1 int SOAP_FMAC2 soap_lookup_type(struct soap*, const char *id); -SOAP_FMAC1 void* SOAP_FMAC2 soap_id_lookup(struct soap*, const char *id, void **p, int t, size_t n, unsigned int k); -SOAP_FMAC1 void* SOAP_FMAC2 soap_id_forward(struct soap*, const char *id, void *p, int st, int tt, size_t n, unsigned int k, void(*fcopy)(struct soap*, int, int, void*, const void*, size_t)); -#endif -SOAP_FMAC1 void* SOAP_FMAC2 soap_id_enter(struct soap*, const char *id, void *p, int t, size_t n, unsigned int k, const char *type, const char *arrayType, void *(*finstantiate)(struct soap*, int, const char*, const char*, size_t*)); -SOAP_FMAC1 void SOAP_FMAC2 soap_fcopy(struct soap *soap, int st, int tt, void *p, const void *q, size_t n); - -SOAP_FMAC1 int SOAP_FMAC2 soap_size(const int *, int); -SOAP_FMAC1 int SOAP_FMAC2 soap_getoffsets(const char *, const int *, int *, int); -SOAP_FMAC1 int SOAP_FMAC2 soap_getsize(const char *, const char *, int *); -SOAP_FMAC1 int SOAP_FMAC2 soap_getsizes(const char *, int *, int); -SOAP_FMAC1 int SOAP_FMAC2 soap_getposition(const char *, int *); - -SOAP_FMAC1 char* SOAP_FMAC2 soap_putsize(struct soap*, const char *, int); -SOAP_FMAC1 char* SOAP_FMAC2 soap_putsizesoffsets(struct soap*, const char *, const int *, const int *, int); -SOAP_FMAC1 char* SOAP_FMAC2 soap_putsizes(struct soap*, const char *, const int *, int); -SOAP_FMAC1 char* SOAP_FMAC2 soap_putoffset(struct soap*, int); -SOAP_FMAC1 char* SOAP_FMAC2 soap_putoffsets(struct soap*, const int *, int); - -SOAP_FMAC1 int SOAP_FMAC2 soap_closesock(struct soap*); - -SOAP_FMAC1 struct soap *SOAP_FMAC2 soap_new(void); -SOAP_FMAC1 struct soap *SOAP_FMAC2 soap_new1(soap_mode); -SOAP_FMAC1 struct soap *SOAP_FMAC2 soap_new2(soap_mode, soap_mode); -SOAP_FMAC1 struct soap *SOAP_FMAC2 soap_copy(struct soap*); -SOAP_FMAC1 struct soap *SOAP_FMAC2 soap_copy_context(struct soap*,struct soap*); -SOAP_FMAC1 void SOAP_FMAC2 soap_init(struct soap*); -SOAP_FMAC1 void SOAP_FMAC2 soap_init1(struct soap*, soap_mode); -SOAP_FMAC1 void SOAP_FMAC2 soap_init2(struct soap*, soap_mode, soap_mode); -SOAP_FMAC1 void SOAP_FMAC2 soap_done(struct soap*); -SOAP_FMAC1 void SOAP_FMAC2 soap_cleanup(struct soap*); -SOAP_FMAC1 void SOAP_FMAC2 soap_begin(struct soap*); -SOAP_FMAC1 void SOAP_FMAC2 soap_end(struct soap*); -SOAP_FMAC1 void SOAP_FMAC2 soap_delete(struct soap*, void*); - -#ifdef SOAP_DEBUG -SOAP_FMAC1 void SOAP_FMAC2 soap_set_recv_logfile(struct soap*, const char*); -SOAP_FMAC1 void SOAP_FMAC2 soap_set_sent_logfile(struct soap*, const char*); -SOAP_FMAC1 void SOAP_FMAC2 soap_set_test_logfile(struct soap*, const char*); -SOAP_FMAC1 void SOAP_FMAC2 soap_close_logfiles(struct soap*); -SOAP_FMAC1 void SOAP_FMAC2 soap_open_logfile(struct soap*, int); -#endif - -SOAP_FMAC1 const char* SOAP_FMAC2 soap_value(struct soap*); - -SOAP_FMAC1 soap_wchar SOAP_FMAC2 soap_advance(struct soap*); -SOAP_FMAC1 soap_wchar SOAP_FMAC2 soap_skip(struct soap*); - -SOAP_FMAC1 int SOAP_FMAC2 soap_match_tag(struct soap*, const char*, const char *); -SOAP_FMAC1 int SOAP_FMAC2 soap_match_array(struct soap*, const char*); - -SOAP_FMAC1 int SOAP_FMAC2 soap_element(struct soap*, const char*, int, const char*); -SOAP_FMAC1 int SOAP_FMAC2 soap_element_begin_out(struct soap*, const char *tag, int id, const char *type); -SOAP_FMAC1 int SOAP_FMAC2 soap_array_begin_out(struct soap*, const char *tag, int id, const char *type, const char *offset); -SOAP_FMAC1 int SOAP_FMAC2 soap_element_ref(struct soap*, const char *tag, int id, int href); -SOAP_FMAC1 int SOAP_FMAC2 soap_element_href(struct soap*, const char *tag, int id, const char *ref, const char *val); -SOAP_FMAC1 int SOAP_FMAC2 soap_element_null(struct soap*, const char *tag, int id, const char *type); -SOAP_FMAC1 int SOAP_FMAC2 soap_element_id(struct soap*, const char *tag, int id, const void *p, const struct soap_array *a, int d, const char *type, int n); -SOAP_FMAC1 int SOAP_FMAC2 soap_element_result(struct soap*, const char *tag); -SOAP_FMAC1 int SOAP_FMAC2 soap_element_end_out(struct soap*, const char *tag); -SOAP_FMAC1 int SOAP_FMAC2 soap_element_start_end_out(struct soap*, const char *tag); - -SOAP_FMAC1 int SOAP_FMAC2 soap_attribute(struct soap*, const char*, const char*); - -SOAP_FMAC1 int SOAP_FMAC2 soap_element_begin_in(struct soap*, const char *tag, int nillable); - -SOAP_FMAC1 int SOAP_FMAC2 soap_element_end_in(struct soap*, const char *tag); - -SOAP_FMAC1 int SOAP_FMAC2 soap_peek_element(struct soap*); - -SOAP_FMAC1 void SOAP_FMAC2 soap_retry(struct soap*); -SOAP_FMAC1 void SOAP_FMAC2 soap_revert(struct soap*); - -SOAP_FMAC1 char* SOAP_FMAC2 soap_strdup(struct soap*, const char*); - -SOAP_FMAC1 int SOAP_FMAC2 soap_string_out(struct soap*, const char *s, int flag); -SOAP_FMAC1 char* SOAP_FMAC2 soap_string_in(struct soap*, int, long, long); - -#ifndef WITH_LEANER -SOAP_FMAC1 int SOAP_FMAC2 soap_wstring_out(struct soap*, const wchar_t *s, int flag); -SOAP_FMAC1 wchar_t* SOAP_FMAC2 soap_wstring_in(struct soap*, int, long, long); -#endif - -SOAP_FMAC1 int SOAP_FMAC2 soap_match_namespace(struct soap*, const char *, const char*, int n1, int n2); - -SOAP_FMAC1 int SOAP_FMAC2 soap_set_namespaces(struct soap*, struct Namespace*); - -SOAP_FMAC1 void SOAP_FMAC2 soap_pop_namespace(struct soap*); -SOAP_FMAC1 int SOAP_FMAC2 soap_push_namespace(struct soap*, const char *,const char *); - -SOAP_FMAC1 int SOAP_FMAC2 soap_new_block(struct soap*); -SOAP_FMAC1 void* SOAP_FMAC2 soap_push_block(struct soap*, size_t); -SOAP_FMAC1 void SOAP_FMAC2 soap_pop_block(struct soap*); -SOAP_FMAC1 size_t SOAP_FMAC2 soap_size_block(struct soap*, size_t); -SOAP_FMAC1 char* SOAP_FMAC2 soap_first_block(struct soap*); -SOAP_FMAC1 char* SOAP_FMAC2 soap_next_block(struct soap*); -SOAP_FMAC1 size_t SOAP_FMAC2 soap_block_size(struct soap*); -SOAP_FMAC1 char* SOAP_FMAC2 soap_save_block(struct soap*, char*, int); -SOAP_FMAC1 void SOAP_FMAC2 soap_end_block(struct soap*); - -SOAP_FMAC1 int SOAP_FMAC2 soap_envelope_begin_out(struct soap*); -SOAP_FMAC1 int soap_envelope_end_out(struct soap*); - -SOAP_FMAC1 int SOAP_FMAC2 soap_envelope_begin_in(struct soap*); -SOAP_FMAC1 int SOAP_FMAC2 soap_envelope_end_in(struct soap*); - -SOAP_FMAC1 int SOAP_FMAC2 soap_body_begin_out(struct soap*); -SOAP_FMAC1 int SOAP_FMAC2 soap_body_end_out(struct soap*); - -SOAP_FMAC1 int SOAP_FMAC2 soap_body_begin_in(struct soap*); -SOAP_FMAC1 int SOAP_FMAC2 soap_body_end_in(struct soap*); - -SOAP_FMAC1 int SOAP_FMAC2 soap_recv_header(struct soap*); - -SOAP_FMAC1 int SOAP_FMAC2 soap_response(struct soap*, int); - -SOAP_FMAC1 int SOAP_FMAC2 soap_send_empty_response(struct soap*); -SOAP_FMAC1 int SOAP_FMAC2 soap_recv_empty_response(struct soap*); - -SOAP_FMAC1 int SOAP_FMAC2 soap_send_fault(struct soap*); -SOAP_FMAC1 int SOAP_FMAC2 soap_recv_fault(struct soap*); - -SOAP_FMAC1 void SOAP_FMAC2 soap_print_fault(struct soap*, FILE*); -SOAP_FMAC1 void SOAP_FMAC2 soap_print_fault_location(struct soap*, FILE*); - -SOAP_FMAC1 int SOAP_FMAC2 soap_s2byte(struct soap*, const char*, char*); -SOAP_FMAC1 int SOAP_FMAC2 soap_s2short(struct soap*, const char*, short*); -SOAP_FMAC1 int SOAP_FMAC2 soap_s2int(struct soap*, const char*, int*); -SOAP_FMAC1 int SOAP_FMAC2 soap_s2long(struct soap*, const char*, long*); -SOAP_FMAC1 int SOAP_FMAC2 soap_s2LONG64(struct soap*, const char*, LONG64*); -SOAP_FMAC1 int SOAP_FMAC2 soap_s2float(struct soap*, const char*, float*); -SOAP_FMAC1 int SOAP_FMAC2 soap_s2double(struct soap*, const char*, double*); -SOAP_FMAC1 int SOAP_FMAC2 soap_s2unsignedByte(struct soap*, const char*, unsigned char*); -SOAP_FMAC1 int SOAP_FMAC2 soap_s2unsignedShort(struct soap*, const char*, unsigned short*); -SOAP_FMAC1 int SOAP_FMAC2 soap_s2unsignedInt(struct soap*, const char*, unsigned int*); -SOAP_FMAC1 int SOAP_FMAC2 soap_s2unsignedLong(struct soap*, const char*, unsigned long*); -SOAP_FMAC1 int SOAP_FMAC2 soap_s2ULONG64(struct soap*, const char*, ULONG64*); -SOAP_FMAC1 int SOAP_FMAC2 soap_s2string(struct soap*, const char*, char**); -SOAP_FMAC1 int SOAP_FMAC2 soap_s2QName(struct soap*, const char*, char**); - -#ifndef WITH_LEAN -SOAP_FMAC1 int SOAP_FMAC2 soap_s2dateTime(struct soap*, const char*, time_t*); -#endif - -SOAP_FMAC1 char* SOAP_FMAC2 soap_s2base64(struct soap*, const unsigned char*, char*, size_t); - -SOAP_FMAC1 const char* SOAP_FMAC2 soap_byte2s(struct soap*, char); -SOAP_FMAC1 const char* SOAP_FMAC2 soap_short2s(struct soap*, short); -SOAP_FMAC1 const char* SOAP_FMAC2 soap_int2s(struct soap*, int); -SOAP_FMAC1 const char* SOAP_FMAC2 soap_long2s(struct soap*, long); -SOAP_FMAC1 const char* SOAP_FMAC2 soap_LONG642s(struct soap*, LONG64); -SOAP_FMAC1 const char* SOAP_FMAC2 soap_float2s(struct soap*, float); -SOAP_FMAC1 const char* SOAP_FMAC2 soap_double2s(struct soap*, double); -SOAP_FMAC1 const char* SOAP_FMAC2 soap_unsignedByte2s(struct soap*, unsigned char); -SOAP_FMAC1 const char* SOAP_FMAC2 soap_unsignedShort2s(struct soap*, unsigned short); -SOAP_FMAC1 const char* SOAP_FMAC2 soap_unsignedInt2s(struct soap*, unsigned int); -SOAP_FMAC1 const char* SOAP_FMAC2 soap_unsignedLong2s(struct soap*, unsigned long); -SOAP_FMAC1 const char* SOAP_FMAC2 soap_ULONG642s(struct soap*, ULONG64); -SOAP_FMAC1 const char* SOAP_FMAC2 soap_QName2s(struct soap*, const char*); -SOAP_FMAC1 const char* SOAP_FMAC2 soap_base642s(struct soap*, const char*, char*, size_t, size_t*); - -#ifndef WITH_LEAN -SOAP_FMAC1 const char* SOAP_FMAC2 soap_dateTime2s(struct soap*, time_t); -#endif - - -SOAP_FMAC1 int* SOAP_FMAC2 soap_inint(struct soap*, const char *tag, int *p, const char *, int); -SOAP_FMAC1 char* SOAP_FMAC2 soap_inbyte(struct soap*, const char *tag, char *p, const char *, int); -SOAP_FMAC1 long* SOAP_FMAC2 soap_inlong(struct soap*, const char *tag, long *p, const char *, int); -SOAP_FMAC1 LONG64* SOAP_FMAC2 soap_inLONG64(struct soap*, const char *tag, LONG64 *p, const char *, int); -SOAP_FMAC1 short* SOAP_FMAC2 soap_inshort(struct soap*, const char *tag, short *p, const char *, int); -SOAP_FMAC1 float* SOAP_FMAC2 soap_infloat(struct soap*, const char *tag, float *p, const char *, int); -SOAP_FMAC1 double* SOAP_FMAC2 soap_indouble(struct soap*, const char *tag, double *p, const char *, int); -SOAP_FMAC1 unsigned char* SOAP_FMAC2 soap_inunsignedByte(struct soap*, const char *tag, unsigned char *p, const char *, int); -SOAP_FMAC1 unsigned short* SOAP_FMAC2 soap_inunsignedShort(struct soap*, const char *tag, unsigned short *p, const char *, int); -SOAP_FMAC1 unsigned int* SOAP_FMAC2 soap_inunsignedInt(struct soap*, const char *tag, unsigned int *p, const char *, int); -SOAP_FMAC1 unsigned long* SOAP_FMAC2 soap_inunsignedLong(struct soap*, const char *tag, unsigned long *p, const char *, int); -SOAP_FMAC1 ULONG64* SOAP_FMAC2 soap_inULONG64(struct soap*, const char *tag, ULONG64 *p, const char *, int); -SOAP_FMAC1 char** SOAP_FMAC2 soap_instring(struct soap*, const char *tag, char **p, const char *, int, int, long, long); -SOAP_FMAC1 char** SOAP_FMAC2 soap_inliteral(struct soap*, const char *tag, char **p); - -#ifndef WITH_LEAN -SOAP_FMAC1 time_t* SOAP_FMAC2 soap_indateTime(struct soap*, const char *tag, time_t *p, const char *, int); -#endif - -#ifndef WITH_LEANER -SOAP_FMAC1 wchar_t** SOAP_FMAC2 soap_inwstring(struct soap*, const char *tag, wchar_t **p, const char *, int, long, long); -SOAP_FMAC1 wchar_t** SOAP_FMAC2 soap_inwliteral(struct soap*, const char *tag, wchar_t **p); -#endif - -SOAP_FMAC1 int SOAP_FMAC2 soap_outbyte(struct soap*, const char *tag, int id, const char *p, const char *, int); -SOAP_FMAC1 int SOAP_FMAC2 soap_outshort(struct soap*, const char *tag, int id, const short *p, const char *, int); -SOAP_FMAC1 int SOAP_FMAC2 soap_outint(struct soap*, const char *tag, int id, const int *p, const char *, int); -SOAP_FMAC1 int SOAP_FMAC2 soap_outlong(struct soap*, const char *tag, int id, const long *p, const char *, int); -SOAP_FMAC1 int SOAP_FMAC2 soap_outLONG64(struct soap*, const char *tag, int id, const LONG64 *p, const char *, int); -SOAP_FMAC1 int SOAP_FMAC2 soap_outfloat(struct soap*, const char *tag, int id, const float *p, const char *, int); -SOAP_FMAC1 int SOAP_FMAC2 soap_outdouble(struct soap*, const char *tag, int id, const double *p, const char *, int); -SOAP_FMAC1 int SOAP_FMAC2 soap_outunsignedByte(struct soap*, const char *tag, int id, const unsigned char *p, const char *, int); -SOAP_FMAC1 int SOAP_FMAC2 soap_outunsignedShort(struct soap*, const char *tag, int id, const unsigned short *p, const char *, int); -SOAP_FMAC1 int SOAP_FMAC2 soap_outunsignedInt(struct soap*, const char *tag, int id, const unsigned int *p, const char *, int); -SOAP_FMAC1 int SOAP_FMAC2 soap_outunsignedLong(struct soap*, const char *tag, int id, const unsigned long *p, const char *, int); -SOAP_FMAC1 int SOAP_FMAC2 soap_outULONG64(struct soap*, const char *tag, int id, const ULONG64 *p, const char *, int); -SOAP_FMAC1 int SOAP_FMAC2 soap_outstring(struct soap*, const char *tag, int id, char *const*p, const char *, int); -SOAP_FMAC1 int SOAP_FMAC2 soap_outliteral(struct soap*, const char *tag, char *const*p); - -#ifndef WITH_LEAN -SOAP_FMAC1 int SOAP_FMAC2 soap_outdateTime(struct soap*, const char *tag, int id, const time_t *p, const char *, int); -#endif - -#ifndef WITH_LEANER -SOAP_FMAC1 int SOAP_FMAC2 soap_outwstring(struct soap*, const char *tag, int id, wchar_t *const*p, const char *, int); -SOAP_FMAC1 int SOAP_FMAC2 soap_outwliteral(struct soap*, const char *tag, wchar_t *const*p); -#endif - -#ifndef WITH_LEANER -SOAP_FMAC1 int SOAP_FMAC2 soap_element_dime(struct soap *, const char*, int, const void*, const struct soap_array*, const char*, const char*, const char*, int, const char*, int); -SOAP_FMAC1 int SOAP_FMAC2 soap_move(struct soap*, long); -SOAP_FMAC1 size_t SOAP_FMAC2 soap_tell(struct soap*); -SOAP_FMAC1 char* SOAP_FMAC2 soap_dime_option(struct soap*, unsigned short, const char*); -SOAP_FMAC1 int SOAP_FMAC2 soap_getdimehdr(struct soap*); -SOAP_FMAC1 int SOAP_FMAC2 soap_getdime(struct soap*); -SOAP_FMAC1 int SOAP_FMAC2 soap_putdimehdr(struct soap*); -SOAP_FMAC1 int SOAP_FMAC2 soap_putdime(struct soap*); -SOAP_FMAC1 int SOAP_FMAC2 soap_getmimehdr(struct soap*); -SOAP_FMAC1 int SOAP_FMAC2 soap_getmime(struct soap*); -SOAP_FMAC1 int SOAP_FMAC2 soap_putmimehdr(struct soap*, struct soap_multipart*); -SOAP_FMAC1 int SOAP_FMAC2 soap_putmime(struct soap*); -SOAP_FMAC1 void SOAP_FMAC2 soap_set_dime(struct soap*); -SOAP_FMAC1 void SOAP_FMAC2 soap_set_mime(struct soap*, const char *boundary, const char *start); -SOAP_FMAC1 void SOAP_FMAC2 soap_clr_dime(struct soap*); -SOAP_FMAC1 void SOAP_FMAC2 soap_clr_mime(struct soap*); -SOAP_FMAC1 int SOAP_FMAC2 soap_set_dime_attachment(struct soap*, char *ptr, size_t size, const char *type, const char *id, unsigned short optype, const char *option); -SOAP_FMAC1 int SOAP_FMAC2 soap_set_mime_attachment(struct soap*, char *ptr, size_t size, enum soap_mime_encoding encoding, const char *type, const char *id, const char *location, const char *description); -SOAP_FMAC1 struct soap_multipart* SOAP_FMAC2 soap_next_multipart(struct soap_multipart*); -#endif - -SOAP_FMAC1 int SOAP_FMAC2 soap_register_plugin_arg(struct soap*, int (*fcreate)(struct soap*, struct soap_plugin*, void*), void*); -SOAP_FMAC1 void* SOAP_FMAC2 soap_lookup_plugin(struct soap*, const char*); - -SOAP_FMAC1 const char* SOAP_FMAC2 soap_attr_value(struct soap *soap, const char *name, int flag); -SOAP_FMAC1 int SOAP_FMAC2 soap_set_attr(struct soap *soap, const char *name, const char *value); -SOAP_FMAC1 void SOAP_FMAC2 soap_clr_attr(struct soap *soap); - -#ifdef WITH_COOKIES -SOAP_FMAC1 size_t SOAP_FMAC2 soap_encode_cookie(const char*, char*, size_t); -SOAP_FMAC1 extern struct soap_cookie* SOAP_FMAC2 soap_set_cookie(struct soap*, const char*, const char*, const char*, const char*); -SOAP_FMAC1 extern struct soap_cookie* SOAP_FMAC2 soap_cookie(struct soap*, const char*, const char*, const char*); -SOAP_FMAC1 extern char* SOAP_FMAC2 soap_cookie_value(struct soap*, const char*, const char*, const char*); -SOAP_FMAC1 extern long SOAP_FMAC2 soap_cookie_expire(struct soap*, const char*, const char*, const char*); -SOAP_FMAC1 extern int SOAP_FMAC2 soap_set_cookie_expire(struct soap*, const char*, long, const char*, const char*); -SOAP_FMAC1 extern int SOAP_FMAC2 soap_set_cookie_session(struct soap*, const char*, const char*, const char*); -SOAP_FMAC1 extern int SOAP_FMAC2 soap_clr_cookie_session(struct soap*, const char*, const char*, const char*); -SOAP_FMAC1 extern void SOAP_FMAC2 soap_clr_cookie(struct soap*, const char*, const char*, const char*); -SOAP_FMAC1 extern int SOAP_FMAC2 soap_getenv_cookies(struct soap*); -SOAP_FMAC1 extern struct soap_cookie* SOAP_FMAC2 soap_copy_cookies(struct soap*); -SOAP_FMAC1 extern void SOAP_FMAC2 soap_free_cookies(struct soap*); -#endif - -#ifdef __cplusplus -} -#endif - -#endif - diff --git a/org.glite.security.gsoap-plugin/src/stdsoap2_2.7.6b.c b/org.glite.security.gsoap-plugin/src/stdsoap2_2.7.6b.c deleted file mode 100644 index 6b7160b..0000000 --- a/org.glite.security.gsoap-plugin/src/stdsoap2_2.7.6b.c +++ /dev/null @@ -1,13101 +0,0 @@ -/* - -stdsoap2.c[pp] 2.7.6b - -gSOAP runtime - -gSOAP XML Web services tools -Copyright (C) 2000-2005, Robert van Engelen, Genivia Inc., All Rights Reserved. -This part of the software is released under one of the following licenses: -GPL, the gSOAP public license, or Genivia's license for commercial use. --------------------------------------------------------------------------------- -Contributors: - -Wind River Systems, Inc., for the following additions: - - vxWorks compatible --------------------------------------------------------------------------------- -gSOAP public license. - -The contents of this file are subject to the gSOAP Public License Version 1.3 -(the "License"); you may not use this file except in compliance with the -License. You may obtain a copy of the License at -http://www.cs.fsu.edu/~engelen/soaplicense.html -Software distributed under the License is distributed on an "AS IS" basis, -WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License -for the specific language governing rights and limitations under the License. - -The Initial Developer of the Original Code is Robert A. van Engelen. -Copyright (C) 2000-2005, Robert van Engelen, Genivia Inc., All Rights Reserved. --------------------------------------------------------------------------------- -GPL license. - -This program is free software; you can redistribute it and/or modify it under -the terms of the GNU General Public License as published by the Free Software -Foundation; either version 2 of the License, or (at your option) any later -version. - -This program is distributed in the hope that it will be useful, but WITHOUT ANY -WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A -PARTICULAR PURPOSE. See the GNU General Public License for more details. - -You should have received a copy of the GNU General Public License along with -this program; if not, write to the Free Software Foundation, Inc., 59 Temple -Place, Suite 330, Boston, MA 02111-1307 USA - -Author contact information: -engelen@genivia.com / engelen@acm.org --------------------------------------------------------------------------------- -A commercial use license is available from Genivia, Inc., contact@genivia.com --------------------------------------------------------------------------------- - -Installation note: - -Win32 build needs winsock.dll (Visual C++ "wsock32.lib") -To do this in Visual C++ 6.0, go to "Project", "settings", select the "Link" -tab (the project file needs to be selected in the file view) and add -"wsock32.lib" to the "Object/library modules" entry - -On Mac OS X with gcc (GCC) 3.1 20020420 (prerelease) you MUST compile with --fstack_check when using -O2 because gcc 3.1 has a bug that smashes the stack -when locally allocated data exceeds 64K. - -*/ - -#include "stdsoap2.h" - -#ifdef __cplusplus -SOAP_SOURCE_STAMP("@(#) stdsoap2.cpp ver 2.7.6b 2005-08-26 12:00:00 GMT") -extern "C" { -#else -SOAP_SOURCE_STAMP("@(#) stdsoap2.c ver 2.7.6b 2005-08-26 12:00:00 GMT") -#endif - -/* 8bit character representing unknown/nonrepresentable character data (e.g. not supported by current locale with multibyte support enabled) */ -#ifndef SOAP_UNKNOWN_CHAR -#define SOAP_UNKNOWN_CHAR (127) -#endif - -/* EOF=-1 */ -#define SOAP_LT (soap_wchar)(-2) /* XML character '<' */ -#define SOAP_TT (soap_wchar)(-3) /* XML character '' */ -#define SOAP_QT (soap_wchar)(-5) /* XML character '"' */ -#define SOAP_AP (soap_wchar)(-6) /* XML character ''' */ - -#define SOAP_BOM (soap_wchar)(0xFEFF) /* UTF BOM is Unicode FEFF */ - -#define soap_blank(c) ((c) >= 0 && (c) <= 32) -#define soap_notblank(c) ((c) > 32) -#define soap_hash_ptr(p) (((unsigned long)(p) >> 3) & (SOAP_PTRHASH - 1)) - -static int soap_isxdigit(int); -static soap_wchar soap_char(struct soap*); - -#ifndef WITH_NOIDREF -static void soap_update_ptrs(struct soap*, char*, char*, long); -static int soap_has_copies(struct soap*, const char*, const char*); -static void soap_init_iht(struct soap*); -static void soap_free_iht(struct soap*); -static void soap_init_pht(struct soap*); -static void soap_free_pht(struct soap*); -#endif - -#ifdef SOAP_DEBUG -static void soap_init_logs(struct soap*); -static void soap_close_logfile(struct soap*, int); -static void soap_set_logfile(struct soap*, int, const char*); -static void soap_free_mht(struct soap*); -static void soap_track_unlink(struct soap*, const void*); -#endif - -static int soap_set_error(struct soap*, const char*, const char*, const char*, const char*, int); -static int soap_copy_fault(struct soap*, const char*, const char*, const char*, const char*); -static int soap_getattrval(struct soap*, char*, size_t, soap_wchar); -static void *fplugin(struct soap*, const char*); - -#ifndef WITH_LEAN -static const char *soap_set_validation_fault(struct soap*, const char*, const char*); -static int soap_isnumeric(struct soap*, const char*); -static time_t soap_timegm(struct tm*); -static struct soap_nlist *soap_lookup_ns(struct soap *soap, const char *tag, size_t n); -static struct soap_nlist *soap_push_ns(struct soap *soap, const char *id, const char *ns, short utilized); -static void soap_pop_ns(struct soap *soap); -static void soap_utilize_ns(struct soap *soap, const char *tag, size_t n); -#endif - -#ifndef WITH_LEANER -static struct soap_multipart *soap_new_multipart(struct soap*, struct soap_multipart**, struct soap_multipart**, char*, size_t); -static int soap_putdimefield(struct soap*, const char*, size_t); -static char *soap_getdimefield(struct soap*, size_t); -static void soap_select_mime_boundary(struct soap*); -static int soap_valid_mime_boundary(struct soap*); -static int soap_match_cid(const char*, const char*); -static void soap_resolve_attachment(struct soap*, struct soap_multipart*); -#endif - -#ifdef WITH_GZIP -static int soap_getgziphdr(struct soap*); -#endif - -#ifdef WITH_OPENSSL -static void ssl_init(); -static int ssl_auth_init(struct soap*); -static int ssl_verify_callback(int, X509_STORE_CTX*); -static int ssl_password(char*, int, int, void *); -static const char *ssl_error(struct soap*, int); -/* This callback is included for future references. It should not be deleted -static DH *ssl_tmp_dh(SSL*, int, int); -*/ -#endif - -#if !defined(WITH_NOHTTP) || !defined(WITH_LEANER) -static const char *soap_decode(char*, size_t, const char*, const char*); -#endif - -#ifndef WITH_NOHTTP -static soap_wchar soap_getchunkchar(struct soap*); -static const char *http_error(struct soap*, int); -static int http_post(struct soap*, const char*, const char*, int, const char*, const char*, size_t); -static int http_get(struct soap*); -static int http_send_header(struct soap*, const char*); -static int http_post_header(struct soap*, const char*, const char*); -static int http_response(struct soap*, int, size_t); -static int http_parse(struct soap*); -static int http_parse_header(struct soap*, const char*, const char*); -#endif - -#ifndef WITH_NOIO -static int fsend(struct soap*, const char*, size_t); -static size_t frecv(struct soap*, char*, size_t); -static int tcp_init(struct soap*); -static const char *tcp_error(struct soap*); -#ifndef WITH_IPV6 -static int tcp_gethost(struct soap*, const char *addr, struct in_addr *inaddr); -#endif -static int tcp_connect(struct soap*, const char *endpoint, const char *host, int port); -static int tcp_accept(struct soap*, int, struct sockaddr*, int*); -static int tcp_disconnect(struct soap*); -static int tcp_closesocket(struct soap*, SOAP_SOCKET); -static int tcp_shutdownsocket(struct soap*, SOAP_SOCKET, int); -static const char *soap_strerror(struct soap*); -#endif - -#ifdef VXWORKS -static int vx_nonblocking = TRUE; /* ioctl argument */ -#endif - -#if defined(PALM) && !defined(PALM_2) -unsigned short errno; -#endif - -#ifndef PALM_1 -static const char soap_env1[42] = "http://schemas.xmlsoap.org/soap/envelope/"; -static const char soap_enc1[42] = "http://schemas.xmlsoap.org/soap/encoding/"; -static const char soap_env2[40] = "http://www.w3.org/2003/05/soap-envelope"; -static const char soap_enc2[40] = "http://www.w3.org/2003/05/soap-encoding"; -static const char soap_rpc[35] = "http://www.w3.org/2003/05/soap-rpc"; -#endif - -#ifndef PALM_1 -const struct soap_double_nan soap_double_nan = {0xFFFFFFFF, 0xFFFFFFFF}; -static const char soap_base64o[65] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; -static const char soap_base64i[81] = "\76XXX\77\64\65\66\67\70\71\72\73\74\75XXXXXXX\00\01\02\03\04\05\06\07\10\11\12\13\14\15\16\17\20\21\22\23\24\25\26\27\30\31XXXXXX\32\33\34\35\36\37\40\41\42\43\44\45\46\47\50\51\52\53\54\55\56\57\60\61\62\63"; -#endif - -#ifndef WITH_LEAN -static const char soap_indent[11] = "\n\t\t\t\t\t\t\t\t\t"; -/* Alternative indentation form for SOAP_XML_INDENT: -static const char soap_indent[21] = "\n "; -*/ -#endif - -static const char soap_padding[3] = "\0\0"; -#define SOAP_STR_PADDING (soap_padding) -#define SOAP_STR_EOS (soap_padding) -#define SOAP_NON_NULL (soap_padding) - -#ifndef WITH_LEAN -static const struct soap_code_map html_entity_codes[] = /* entities for XHTML parsing */ -{ { 160, "nbsp" }, - { 161, "iexcl" }, - { 162, "cent" }, - { 163, "pound" }, - { 164, "curren" }, - { 165, "yen" }, - { 166, "brvbar" }, - { 167, "sect" }, - { 168, "uml" }, - { 169, "copy" }, - { 170, "ordf" }, - { 171, "laquo" }, - { 172, "not" }, - { 173, "shy" }, - { 174, "reg" }, - { 175, "macr" }, - { 176, "deg" }, - { 177, "plusmn" }, - { 178, "sup2" }, - { 179, "sup3" }, - { 180, "acute" }, - { 181, "micro" }, - { 182, "para" }, - { 183, "middot" }, - { 184, "cedil" }, - { 185, "sup1" }, - { 186, "ordm" }, - { 187, "raquo" }, - { 188, "frac14" }, - { 189, "frac12" }, - { 190, "frac34" }, - { 191, "iquest" }, - { 192, "Agrave" }, - { 193, "Aacute" }, - { 194, "Acirc" }, - { 195, "Atilde" }, - { 196, "Auml" }, - { 197, "Aring" }, - { 198, "AElig" }, - { 199, "Ccedil" }, - { 200, "Egrave" }, - { 201, "Eacute" }, - { 202, "Ecirc" }, - { 203, "Euml" }, - { 204, "Igrave" }, - { 205, "Iacute" }, - { 206, "Icirc" }, - { 207, "Iuml" }, - { 208, "ETH" }, - { 209, "Ntilde" }, - { 210, "Ograve" }, - { 211, "Oacute" }, - { 212, "Ocirc" }, - { 213, "Otilde" }, - { 214, "Ouml" }, - { 215, "times" }, - { 216, "Oslash" }, - { 217, "Ugrave" }, - { 218, "Uacute" }, - { 219, "Ucirc" }, - { 220, "Uuml" }, - { 221, "Yacute" }, - { 222, "THORN" }, - { 223, "szlig" }, - { 224, "agrave" }, - { 225, "aacute" }, - { 226, "acirc" }, - { 227, "atilde" }, - { 228, "auml" }, - { 229, "aring" }, - { 230, "aelig" }, - { 231, "ccedil" }, - { 232, "egrave" }, - { 233, "eacute" }, - { 234, "ecirc" }, - { 235, "euml" }, - { 236, "igrave" }, - { 237, "iacute" }, - { 238, "icirc" }, - { 239, "iuml" }, - { 240, "eth" }, - { 241, "ntilde" }, - { 242, "ograve" }, - { 243, "oacute" }, - { 244, "ocirc" }, - { 245, "otilde" }, - { 246, "ouml" }, - { 247, "divide" }, - { 248, "oslash" }, - { 249, "ugrave" }, - { 250, "uacute" }, - { 251, "ucirc" }, - { 252, "uuml" }, - { 253, "yacute" }, - { 254, "thorn" }, - { 255, "yuml" }, - { 0, NULL } -}; -#endif - -#ifndef WITH_NOIO -#ifndef WITH_LEAN -static const struct soap_code_map h_error_codes[] = -{ -#ifdef HOST_NOT_FOUND - { HOST_NOT_FOUND, "Host not found" }, -#endif -#ifdef TRY_AGAIN - { TRY_AGAIN, "Try Again" }, -#endif -#ifdef NO_RECOVERY - { NO_RECOVERY, "No Recovery" }, -#endif -#ifdef NO_DATA - { NO_DATA, "No Data" }, -#endif -#ifdef NO_ADDRESS - { NO_ADDRESS, "No Address" }, -#endif - { 0, NULL } -}; -#endif -#endif - -#ifndef WITH_NOHTTP -#ifndef WITH_LEAN -static const struct soap_code_map h_http_error_codes[] = -{ { 201, "Created" }, - { 202, "Accepted" }, - { 203, "Non-Authoritative Information" }, - { 204, "No Content" }, - { 205, "Reset Content" }, - { 206, "Partial Content" }, - { 300, "Multiple Choices" }, - { 301, "Moved Permanently" }, - { 302, "Found" }, - { 303, "See Other" }, - { 304, "Not Modified" }, - { 305, "Use Proxy" }, - { 307, "Temporary Redirect" }, - { 400, "Bad Request" }, - { 401, "Unauthorized" }, - { 402, "Payment Required" }, - { 403, "Forbidden" }, - { 404, "Not Found" }, - { 405, "Method Not Allowed" }, - { 406, "Not Acceptable" }, - { 407, "Proxy Authentication Required" }, - { 408, "Request Time-out" }, - { 409, "Conflict" }, - { 410, "Gone" }, - { 411, "Length Required" }, - { 412, "Precondition Failed" }, - { 413, "Request Entity Too Large" }, - { 414, "Request-URI Too Large" }, - { 415, "Unsupported Media Type" }, - { 416, "Requested range not satisfiable" }, - { 417, "Expectation Failed" }, - { 500, "Internal Server Error" }, - { 501, "Not Implemented" }, - { 502, "Bad Gateway" }, - { 503, "Service Unavailable" }, - { 504, "Gateway Time-out" }, - { 505, "HTTP Version not supported" }, - { 0, NULL } -}; -#endif -#endif - -#ifdef WITH_OPENSSL -static const struct soap_code_map h_ssl_error_codes[] = -{ -#define _SSL_ERROR(e) { e, #e } - _SSL_ERROR(SSL_ERROR_SSL), - _SSL_ERROR(SSL_ERROR_ZERO_RETURN), - _SSL_ERROR(SSL_ERROR_WANT_READ), - _SSL_ERROR(SSL_ERROR_WANT_WRITE), - _SSL_ERROR(SSL_ERROR_WANT_CONNECT), - _SSL_ERROR(SSL_ERROR_WANT_X509_LOOKUP), - _SSL_ERROR(SSL_ERROR_SYSCALL), - { 0, NULL } -}; -#endif - -#ifndef WITH_LEANER -static const struct soap_code_map mime_codes[] = -{ { SOAP_MIME_7BIT, "7bit" }, - { SOAP_MIME_8BIT, "8bit" }, - { SOAP_MIME_BINARY, "binary" }, - { SOAP_MIME_QUOTED_PRINTABLE, "quoted-printable" }, - { SOAP_MIME_BASE64, "base64" }, - { SOAP_MIME_IETF_TOKEN, "ietf-token" }, - { SOAP_MIME_X_TOKEN, "x-token" }, - { 0, NULL } -}; -#endif - -#ifdef WIN32 -static int tcp_done = 0; -#endif - -/******************************************************************************/ -#ifndef WITH_NOIO -#ifndef PALM_1 -static int -fsend(struct soap *soap, const char *s, size_t n) -{ register int nwritten; -#if defined(__cplusplus) && !defined(WITH_LEAN) - if (soap->os) - { soap->os->write(s, n); - if (soap->os->good()) - return SOAP_OK; - return SOAP_EOF; - } -#endif - while (n) - { if (soap_valid_socket(soap->socket)) - { -#ifndef WITH_LEAN - if (soap->send_timeout) - { struct timeval timeout; - fd_set fd; - if (soap->send_timeout > 0) - { timeout.tv_sec = soap->send_timeout; - timeout.tv_usec = 0; - } - else - { timeout.tv_sec = -soap->send_timeout/1000000; - timeout.tv_usec = -soap->send_timeout%1000000; - } - FD_ZERO(&fd); - FD_SET((SOAP_SOCKET)soap->socket, &fd); - for (;;) - { register int r = select((SOAP_SOCKET)(soap->socket + 1), NULL, &fd, &fd, &timeout); - if (r > 0) - break; - if (!r) - { soap->errnum = 0; - return SOAP_EOF; - } - if (soap_socket_errno != SOAP_EINTR && soap_socket_errno != SOAP_EAGAIN) - { soap->errnum = soap_socket_errno; - return SOAP_EOF; - } - } - } -#endif -#ifdef WITH_OPENSSL - if (soap->ssl) - nwritten = SSL_write(soap->ssl, s, n); - else if (soap->bio) - nwritten = BIO_write(soap->bio, s, n); - else -#endif -#ifdef WITH_UDP - if ((soap->omode & SOAP_IO_UDP)) - { if (soap->peerlen) - nwritten = sendto((SOAP_SOCKET)soap->socket, s, n, soap->socket_flags, (struct sockaddr*)&soap->peer, soap->peerlen); - else - nwritten = send((SOAP_SOCKET)soap->socket, s, n, soap->socket_flags); - /* retry and back-off algorithm */ - /* TODO: this is not very clear from specs so verify and limit conditions under which we should loop (e.g. ENOBUFS) */ - if (nwritten < 0) - { struct timeval timeout; - fd_set fd; - int udp_repeat; - int udp_delay; - if ((soap->connect_flags & SO_BROADCAST)) - udp_repeat = 3; /* SOAP-over-UDP MULTICAST_UDP_REPEAT - 1 */ - else - udp_repeat = 1; /* SOAP-over-UDP UNICAST_UDP_REPEAT - 1 */ - udp_delay = (soap_random % 201) + 50; /* UDP_MIN_DELAY .. UDP_MAX_DELAY */ - do - { timeout.tv_sec = 0; - timeout.tv_usec = 1000 * udp_delay; /* ms */ - FD_ZERO(&fd); - FD_SET((SOAP_SOCKET)soap->socket, &fd); - select((SOAP_SOCKET)(soap->socket + 1), NULL, NULL, &fd, &timeout); - if (soap->peerlen) - nwritten = sendto((SOAP_SOCKET)soap->socket, s, n, soap->socket_flags, (struct sockaddr*)&soap->peer, soap->peerlen); - else - nwritten = send((SOAP_SOCKET)soap->socket, s, n, soap->socket_flags); - udp_delay <<= 1; - if (udp_delay > 500) /* UDP_UPPER_DELAY */ - udp_delay = 500; - } - while (nwritten < 0 && --udp_repeat > 0); - } - } - else -#endif -#ifndef PALM - nwritten = send((SOAP_SOCKET)soap->socket, s, n, soap->socket_flags); -#else - nwritten = send((SOAP_SOCKET)soap->socket, (void*)s, n, soap->socket_flags); -#endif - if (nwritten <= 0) - { -#ifdef WITH_OPENSSL - int err; - if (soap->ssl && (err = SSL_get_error(soap->ssl, nwritten)) != SSL_ERROR_NONE && err != SSL_ERROR_WANT_READ && err != SSL_ERROR_WANT_WRITE) - return SOAP_EOF; -#endif - if (soap_socket_errno != SOAP_EINTR && soap_socket_errno != SOAP_EWOULDBLOCK && soap_socket_errno != SOAP_EAGAIN) - { soap->errnum = soap_socket_errno; - return SOAP_EOF; - } - nwritten = 0; /* and call write() again */ - } - } - else - { -#ifdef WITH_FASTCGI - nwritten = fwrite((void*)s, 1, n, stdout); - fflush(stdout); -#else -#ifdef UNDER_CE - nwritten = fwrite(s, 1, n, soap->sendfd); -#else -#ifdef VXWORKS -#ifdef WMW_RPM_IO - if (soap->rpmreqid) - nwritten = (httpBlockPut(soap->rpmreqid, s, n) == 0) ? n : -1; - else - nwritten = fwrite(s, sizeof(char), n, fdopen(soap->sendfd, "w")); -#else - nwritten = fwrite(s, sizeof(char), n, fdopen(soap->sendfd, "w")); -#endif /* WMW_RPM_IO */ -#else - nwritten = write((SOAP_SOCKET)soap->sendfd, s, n); -#endif -#endif -#endif - if (nwritten <= 0) - { if (soap_errno != SOAP_EINTR && soap_errno != SOAP_EWOULDBLOCK && soap_errno != SOAP_EAGAIN) - { soap->errnum = soap_errno; - return SOAP_EOF; - } - nwritten = 0; /* and call write() again */ - } - } - n -= nwritten; - s += nwritten; - } - return SOAP_OK; -} -#endif -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_send_raw(struct soap *soap, const char *s, size_t n) -{ if (!n) - return SOAP_OK; - if (soap->mode & SOAP_IO_LENGTH) - { soap->count += n; -#ifndef WITH_LEANER - if (soap->fpreparesend && (soap->mode & SOAP_IO) != SOAP_IO_STORE) - return soap->error = soap->fpreparesend(soap, s, n); -#endif - return SOAP_OK; - } - if (soap->mode & SOAP_IO) - { register size_t i = SOAP_BUFLEN - soap->bufidx; - while (n >= i) - { memcpy(soap->buf + soap->bufidx, s, i); - soap->bufidx = SOAP_BUFLEN; - if (soap_flush(soap)) - return soap->error; - s += i; - n -= i; - i = SOAP_BUFLEN; - } - memcpy(soap->buf + soap->bufidx, s, n); - soap->bufidx += n; - return SOAP_OK; - } - return soap_flush_raw(soap, s, n); -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_flush(struct soap *soap) -{ register int n = soap->bufidx; - if (n) - { soap->bufidx = 0; -#ifdef WITH_ZLIB - if (soap->mode & SOAP_ENC_ZLIB) - { soap->d_stream.next_in = (Byte*)soap->buf; - soap->d_stream.avail_in = (unsigned int)n; -#ifdef WITH_GZIP - soap->z_crc = crc32(soap->z_crc, (Byte*)soap->buf, (unsigned int)n); -#endif - do - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Deflating %u bytes\n", soap->d_stream.avail_in)); - if (deflate(&soap->d_stream, Z_NO_FLUSH) != Z_OK) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Unable to deflate: %s\n", soap->d_stream.msg?soap->d_stream.msg:"")); - return soap->error = SOAP_ZLIB_ERROR; - } - if (!soap->d_stream.avail_out) - { if (soap_flush_raw(soap, soap->z_buf, SOAP_BUFLEN)) - return soap->error; - soap->d_stream.next_out = (Byte*)soap->z_buf; - soap->d_stream.avail_out = SOAP_BUFLEN; - } - } while (soap->d_stream.avail_in); - } - else -#endif - return soap_flush_raw(soap, soap->buf, n); - } - return SOAP_OK; -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_flush_raw(struct soap *soap, const char *s, size_t n) -{ if ((soap->mode & SOAP_IO) == SOAP_IO_STORE) - { register char *t; - if (!(t = (char*)soap_push_block(soap, n))) - return soap->error = SOAP_EOM; - memcpy(t, s, n); -#ifndef WITH_LEANER - if (soap->fpreparesend) - return soap->error = soap->fpreparesend(soap, s, n); -#endif - return SOAP_OK; - } -#ifndef WITH_LEANER - if ((soap->mode & SOAP_IO) == SOAP_IO_CHUNK) - { char t[16]; - sprintf(t, "\r\n%lX\r\n" + (soap->chunksize ? 0 : 2), (unsigned long)n); - DBGMSG(SENT, t, strlen(t)); - if ((soap->error = soap->fsend(soap, t, strlen(t)))) - return soap->error; - soap->chunksize += n; - } - DBGMSG(SENT, s, n); -#endif - return soap->error = soap->fsend(soap, s, n); -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_send(struct soap *soap, const char *s) -{ if (s) - return soap_send_raw(soap, s, strlen(s)); - return SOAP_OK; -} -#endif - -/******************************************************************************/ -#ifndef WITH_LEANER -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_send2(struct soap *soap, const char *s1, const char *s2) -{ if (soap_send(soap, s1)) - return soap->error; - return soap_send(soap, s2); -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_LEANER -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_send3(struct soap *soap, const char *s1, const char *s2, const char *s3) -{ if (soap_send(soap, s1) - || soap_send(soap, s2)) - return soap->error; - return soap_send(soap, s3); -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_NOIO -#ifndef PALM_1 -static size_t -frecv(struct soap *soap, char *s, size_t n) -{ register int r; - soap->errnum = 0; -#if defined(__cplusplus) && !defined(WITH_LEAN) - if (soap->is) - { if (soap->is->good()) - return soap->is->read(s, n).gcount(); - return 0; - } -#endif - if (soap_valid_socket(soap->socket)) - { for (;;) - { -#ifndef WITH_LEAN - if (soap->recv_timeout) - { struct timeval timeout; - fd_set fd; - if (soap->recv_timeout > 0) - { timeout.tv_sec = soap->recv_timeout; - timeout.tv_usec = 0; - } - else - { timeout.tv_sec = -soap->recv_timeout/1000000; - timeout.tv_usec = -soap->recv_timeout%1000000; - } - FD_ZERO(&fd); - FD_SET((SOAP_SOCKET)soap->socket, &fd); - for (;;) - { r = select((SOAP_SOCKET)(soap->socket + 1), &fd, NULL, &fd, &timeout); - if (r > 0) - break; - if (!r) - { soap->errnum = 0; - return 0; - } - if (soap_socket_errno != SOAP_EINTR && soap_socket_errno != SOAP_EAGAIN) - { soap->errnum = soap_socket_errno; - return 0; - } - } - } -#endif -#ifdef WITH_OPENSSL - if (soap->ssl) - { int err; - r = SSL_read(soap->ssl, s, n); - if (r > 0) - return (size_t)r; - err = SSL_get_error(soap->ssl, r); - if (err != SSL_ERROR_NONE && err != SSL_ERROR_WANT_READ && err != SSL_ERROR_WANT_WRITE) - return 0; - } - else if (soap->bio) - { r = BIO_read(soap->bio, s, n); - if (r > 0) - return (size_t)r; - return 0; - } - else -#endif - { -#ifdef WITH_UDP - if ((soap->omode & SOAP_IO_UDP)) - { SOAP_SOCKLEN_T k = (SOAP_SOCKLEN_T)sizeof(soap->peer); - memset((void*)&soap->peer, 0, sizeof(soap->peer)); - r = recvfrom((SOAP_SOCKET)soap->socket, s, n, soap->socket_flags, (struct sockaddr*)&soap->peer, &k); /* portability note: see SOAP_SOCKLEN_T definition in stdsoap2.h */ - soap->peerlen = (size_t)k; -#ifndef WITH_IPV6 - soap->ip = ntohl(soap->peer.sin_addr.s_addr); - soap->port = (int)ntohs(soap->peer.sin_port); -#endif - } - else -#endif - r = recv((SOAP_SOCKET)soap->socket, s, n, soap->socket_flags); - if (r >= 0) - return (size_t)r; - if (soap_socket_errno != SOAP_EINTR && soap_socket_errno != SOAP_EAGAIN && soap_socket_errno != SOAP_EWOULDBLOCK) - { soap->errnum = soap_socket_errno; - return 0; - } - } -#ifndef WITH_LEAN - { struct timeval timeout; - fd_set fd; - timeout.tv_sec = 0; - timeout.tv_usec = 10000; - FD_ZERO(&fd); - FD_SET((SOAP_SOCKET)soap->socket, &fd); -#ifdef WITH_OPENSSL - if (soap->ssl && SSL_get_error(soap->ssl, r) == SSL_ERROR_WANT_WRITE) - r = select((SOAP_SOCKET)(soap->socket + 1), NULL, &fd, &fd, &timeout); - else - r = select((SOAP_SOCKET)(soap->socket + 1), &fd, NULL, &fd, &timeout); -#else - r = select((SOAP_SOCKET)(soap->socket + 1), &fd, NULL, &fd, &timeout); -#endif - if (r < 0 && soap_socket_errno != SOAP_EINTR) - { soap->errnum = soap_socket_errno; - return 0; - } - } -#endif - } - } -#ifdef WITH_FASTCGI - return fread(s, 1, n, stdin); -#else -#ifdef UNDER_CE - return fread(s, 1, n, soap->recvfd); -#else -#ifdef WMW_RPM_IO - if (soap->rpmreqid) - r = httpBlockRead(soap->rpmreqid, s, n); -#endif - r = read((SOAP_SOCKET)soap->recvfd, s, n); - if (r >= 0) - return (size_t)r; - soap->errnum = soap_errno; - return 0; -#endif -#endif -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_NOHTTP -#ifndef PALM_1 -static soap_wchar -soap_getchunkchar(struct soap *soap) -{ if (soap->bufidx < soap->buflen) - return soap->buf[soap->bufidx++]; - soap->bufidx = 0; - soap->buflen = soap->chunkbuflen = soap->frecv(soap, soap->buf, SOAP_BUFLEN); - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Read %u bytes from socket %d\n", (unsigned int)soap->buflen, soap->socket)); - DBGMSG(RECV, soap->buf, soap->buflen); - if (soap->buflen) - return soap->buf[soap->bufidx++]; - return EOF; -} -#endif -#endif - -/******************************************************************************/ -#ifndef PALM_1 -static int -soap_isxdigit(int c) -{ return (c >= '0' && c <= '9') || (c >= 'A' && c <= 'F') || (c >= 'a' && c <= 'f'); -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_recv_raw(struct soap *soap) -{ register size_t ret; -#ifdef WITH_ZLIB - if (soap->mode & SOAP_ENC_ZLIB) - { if (soap->d_stream.next_out == Z_NULL) - return EOF; - if (soap->d_stream.avail_in || !soap->d_stream.avail_out) - { register int r; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Inflating\n")); - soap->d_stream.next_out = (Byte*)soap->buf; - soap->d_stream.avail_out = SOAP_BUFLEN; - r = inflate(&soap->d_stream, Z_NO_FLUSH); - if (r == Z_OK || r == Z_STREAM_END) - { soap->bufidx = 0; - soap->buflen = SOAP_BUFLEN - soap->d_stream.avail_out; - if (soap->zlib_in == SOAP_ZLIB_GZIP) - soap->z_crc = crc32(soap->z_crc, (Byte*)soap->buf, (unsigned int)soap->buflen); - if (r == Z_STREAM_END) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Inflated %lu->%lu bytes\n", soap->d_stream.total_in, soap->d_stream.total_out)); - soap->z_ratio_in = (float)soap->d_stream.total_in / (float)soap->d_stream.total_out; - soap->d_stream.next_out = Z_NULL; - } - if (soap->buflen) - { soap->count += soap->buflen; - return SOAP_OK; - } - } - else if (r != Z_BUF_ERROR) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Inflate error: %s\n", soap->d_stream.msg?soap->d_stream.msg:"")); - soap->d_stream.next_out = Z_NULL; - soap->error = SOAP_ZLIB_ERROR; - return EOF; - } - } -zlib_again: - if ((soap->mode & SOAP_IO) == SOAP_IO_CHUNK && !soap->chunksize) - { memcpy(soap->buf, soap->z_buf, SOAP_BUFLEN); - soap->buflen = soap->z_buflen; - } - } -#endif -#ifndef WITH_NOHTTP - if ((soap->mode & SOAP_IO) == SOAP_IO_CHUNK) /* read HTTP chunked transfer */ - { -chunk_again: - if (soap->chunksize) - { soap->buflen = ret = soap->frecv(soap, soap->buf, soap->chunksize > SOAP_BUFLEN ? SOAP_BUFLEN : soap->chunksize); - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Getting chunk: read %u bytes\n", (unsigned int)ret)); - DBGMSG(RECV, soap->buf, ret); - soap->bufidx = 0; - soap->chunksize -= ret; - } - else - { register soap_wchar c; - char *t, tmp[8]; - t = tmp; - if (!soap->chunkbuflen) - { soap->chunkbuflen = ret = soap->frecv(soap, soap->buf, SOAP_BUFLEN); - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Read %u bytes (chunked) from socket %d\n", (unsigned int)ret, soap->socket)); - DBGMSG(RECV, soap->buf, ret); - soap->bufidx = 0; - if (!ret) - return soap->ahead = EOF; - } - else - soap->bufidx = soap->buflen; - soap->buflen = soap->chunkbuflen; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Getting chunk size (idx=%u len=%u)\n", (unsigned int)soap->bufidx, (unsigned int)soap->buflen)); - while (!soap_isxdigit((int)(c = soap_getchunkchar(soap)))) - if ((int)c == EOF) - return soap->ahead = EOF; - do - *t++ = (char)c; - while (soap_isxdigit((int)(c = soap_getchunkchar(soap))) && t - tmp < 7); - while ((int)c != EOF && c != '\n') - c = soap_getchunkchar(soap); - if ((int)c == EOF) - return soap->ahead = EOF; - *t = '\0'; - soap->chunksize = soap_strtoul(tmp, &t, 16); - if (!soap->chunksize) - { soap->chunkbuflen = 0; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "End of chunked message\n")); - while ((int)c != EOF && c != '\n') - c = soap_getchunkchar(soap); - return soap->ahead = EOF; - } - soap->buflen = soap->bufidx + soap->chunksize; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Moving buf len to idx=%u len=%u (%s)\n", (unsigned int)soap->bufidx, (unsigned int)soap->buflen, tmp)); - if (soap->buflen > soap->chunkbuflen) - { soap->buflen = soap->chunkbuflen; - soap->chunksize -= soap->buflen - soap->bufidx; - soap->chunkbuflen = 0; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Passed end of buffer for chunked HTTP (%u bytes left)\n", (unsigned int)(soap->buflen - soap->bufidx))); - } - else if (soap->chunkbuflen) - soap->chunksize = 0; - ret = soap->buflen - soap->bufidx; - if (!ret) - goto chunk_again; - } - } - else -#endif - { soap->bufidx = 0; - soap->buflen = ret = soap->frecv(soap, soap->buf, SOAP_BUFLEN); - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Read %u bytes from socket %d\n", (unsigned int)ret, soap->socket)); - DBGMSG(RECV, soap->buf, ret); - } -#ifndef WITH_LEANER - if (soap->fpreparerecv && (soap->error = soap->fpreparerecv(soap, soap->buf, ret))) - return soap->error; -#endif -#ifdef WITH_ZLIB - if (soap->mode & SOAP_ENC_ZLIB) - { register int r; - memcpy(soap->z_buf, soap->buf, SOAP_BUFLEN); - soap->d_stream.next_in = (Byte*)(soap->z_buf + soap->bufidx); - soap->d_stream.avail_in = (unsigned int)ret; - soap->d_stream.next_out = (Byte*)soap->buf; - soap->d_stream.avail_out = SOAP_BUFLEN; - r = inflate(&soap->d_stream, Z_NO_FLUSH); - if (r == Z_OK || r == Z_STREAM_END) - { soap->bufidx = 0; - soap->z_buflen = soap->buflen; - soap->buflen = ret = SOAP_BUFLEN - soap->d_stream.avail_out; - if (soap->zlib_in == SOAP_ZLIB_GZIP) - soap->z_crc = crc32(soap->z_crc, (Byte*)soap->buf, (unsigned int)soap->buflen); - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Inflated %u bytes\n", (unsigned int)ret)); - if (!ret) - goto zlib_again; - if (r == Z_STREAM_END) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Inflated %lu->%lu bytes\n", soap->d_stream.total_in, soap->d_stream.total_out)); - soap->z_ratio_in = (float)soap->d_stream.total_in / (float)soap->d_stream.total_out; - soap->d_stream.next_out = Z_NULL; - } - } - else - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Unable to inflate: (%d) %s\n", r, soap->d_stream.msg?soap->d_stream.msg:"")); - soap->d_stream.next_out = Z_NULL; - soap->error = SOAP_ZLIB_ERROR; - return EOF; - } - } -#endif - soap->count += ret; - return !ret; -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_recv(struct soap *soap) -{ -#ifndef WITH_LEANER - if (soap->mode & SOAP_ENC_DIME) - { if (soap->dime.buflen) - { char *s; - int i; - unsigned char tmp[12]; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "DIME hdr for chunked DIME is in buffer\n")); - soap->count += soap->dime.buflen - soap->buflen; - soap->buflen = soap->dime.buflen; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Skip padding (%ld bytes)\n", -(long)soap->dime.size&3)); - for (i = -(long)soap->dime.size&3; i > 0; i--) - { soap->bufidx++; - if (soap->bufidx >= soap->buflen) - if (soap_recv_raw(soap)) - return EOF; - } - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Get DIME hdr for next chunk\n")); - s = (char*)tmp; - for (i = 12; i > 0; i--) - { *s++ = soap->buf[soap->bufidx++]; - if (soap->bufidx >= soap->buflen) - if (soap_recv_raw(soap)) - return EOF; - } - soap->dime.flags = tmp[0] & 0x7; - soap->dime.size = ((size_t)tmp[8] << 24) | ((size_t)tmp[9] << 16) | ((size_t)tmp[10] << 8) | ((size_t)tmp[11]); - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Get DIME chunk (%u bytes)\n", (unsigned int)soap->dime.size)); - if (soap->dime.flags & SOAP_DIME_CF) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "More chunking\n")); - soap->dime.chunksize = soap->dime.size; - if (soap->buflen - soap->bufidx >= soap->dime.size) - { soap->dime.buflen = soap->buflen; - soap->buflen = soap->bufidx + soap->dime.chunksize; - } - else - soap->dime.chunksize -= soap->buflen - soap->bufidx; - } - else - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Last chunk\n")); - soap->dime.buflen = 0; - soap->dime.chunksize = 0; - } - soap->count = soap->buflen - soap->bufidx; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "%u bytes remaining\n", (unsigned int)soap->count)); - return SOAP_OK; - } - if (soap->dime.chunksize) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Get next DIME hdr for chunked DIME (%u bytes chunk)\n", (unsigned int)soap->dime.chunksize)); - if (soap_recv_raw(soap)) - return EOF; - if (soap->buflen - soap->bufidx >= soap->dime.chunksize) - { soap->dime.buflen = soap->buflen; - soap->count -= soap->buflen - soap->bufidx - soap->dime.chunksize; - soap->buflen = soap->bufidx + soap->dime.chunksize; - } - else - soap->dime.chunksize -= soap->buflen - soap->bufidx; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "%lu bytes remaining, count=%u\n", (unsigned long)(soap->buflen-soap->bufidx), (unsigned int)soap->count)); - return SOAP_OK; - } - } -#endif - return soap_recv_raw(soap); -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -soap_wchar -SOAP_FMAC2 -soap_getchar(struct soap *soap) -{ register soap_wchar c; - c = soap->ahead; - if (c) - { if (c != EOF) - soap->ahead = 0; - return c; - } - return soap_get1(soap); -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -const struct soap_code_map* -SOAP_FMAC2 -soap_code(const struct soap_code_map *map, const char *str) -{ if (str) - { while (map->string) - { if (!strcmp(str, map->string)) /* case sensitive */ - return map; - map++; - } - } - return NULL; -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -long -SOAP_FMAC2 -soap_int_code(const struct soap_code_map *map, const char *str, long other) -{ while (map->string) - { if (!soap_tag_cmp(str, map->string)) /* case insensitive */ - return map->code; - map++; - } - return other; -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -const char* -SOAP_FMAC2 -soap_str_code(const struct soap_code_map *map, long code) -{ while (map->code != code && map->string) - map++; - return map->string; -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -static soap_wchar -soap_char(struct soap *soap) -{ char tmp[8]; - register int i; - register soap_wchar c; - register char *s = tmp; - for (i = 0; i < 7; i++) - { c = soap_get1(soap); - if (c == ';' || (int)c == EOF) - break; - *s++ = (char)c; - } - *s = '\0'; - if (*tmp == '#') - { if (tmp[1] == 'x' || tmp[1] == 'X') - return soap_strtol(tmp + 2, NULL, 16); - return atol(tmp + 1); - } - if (!strcmp(tmp, "lt")) - return '<'; - if (!strcmp(tmp, "gt")) - return '>'; - if (!strcmp(tmp, "amp")) - return '&'; - if (!strcmp(tmp, "quot")) - return '"'; - if (!strcmp(tmp, "apos")) - return '\''; -#ifndef WITH_LEAN - return (soap_wchar)soap_int_code(html_entity_codes, tmp, SOAP_UNKNOWN_CHAR); -#else - return SOAP_UNKNOWN_CHAR; /* use this to represent unknown code */ -#endif -} -#endif - -/******************************************************************************/ -#ifdef WITH_LEAN -soap_wchar -soap_get0(struct soap *soap) -{ if (soap->bufidx >= soap->buflen && soap_recv(soap)) - return EOF; - return (unsigned char)soap->buf[soap->bufidx]; -} -#endif - -/******************************************************************************/ -#ifdef WITH_LEAN -soap_wchar -soap_get1(struct soap *soap) -{ if (soap->bufidx >= soap->buflen && soap_recv(soap)) - return EOF; - return (unsigned char)soap->buf[soap->bufidx++]; -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -soap_wchar -SOAP_FMAC2 -soap_get(struct soap *soap) -{ register soap_wchar c; - c = soap->ahead; - if (c) - { if (c != EOF) - soap->ahead = 0; - } - else - c = soap_get1(soap); - for (;;) - { if (soap->cdata) - { if (c == ']') - { c = soap_get1(soap); - if (c == ']') - { soap->cdata = 0; - soap_get1(soap); /* skip > */ - c = soap_get1(soap); - } - else - { soap_revget1(soap); - return ']'; - } - } - else - return c; - } - switch (c) - { case '<': - do c = soap_get1(soap); - while (soap_blank(c)); - if (c == '!' || c == '?' || c == '%') - { register int k = 1; - if (c == '!') - { c = soap_get1(soap); - if (c == '[') - { do c = soap_get1(soap); - while ((int)c != EOF && c != '['); - if ((int)c == EOF) - break; - soap->cdata = 1; - c = soap_get1(soap); - continue; - } - if (c == '-' && (c = soap_get1(soap)) == '-') - { do - { c = soap_get1(soap); - if (c == '-' && (c = soap_get1(soap)) == '-') - break; - } while ((int)c != EOF); - } - } - while ((int)c != EOF) - { if (c == '<') - k++; - else if (c == '>') - { if (--k <= 0) - break; - } - c = soap_get1(soap); - } - if ((int)c == EOF) - break; - c = soap_get1(soap); - continue; - } - if (c == '/') - return SOAP_TT; - soap_revget1(soap); - return SOAP_LT; - case '>': - return SOAP_GT; - case '"': - return SOAP_QT; - case '\'': - return SOAP_AP; - case '&': - return soap_char(soap) | 0x80000000; - } - break; - } - return c; -} -#endif - -/******************************************************************************/ -#ifndef WITH_LEANER -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_move(struct soap *soap, long n) -{ DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Moving %ld bytes forward\n", (long)n)); - for (; n > 0; n--) - if ((int)soap_getchar(soap) == EOF) - return SOAP_EOF; - return SOAP_OK; -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_LEANER -#ifndef PALM_1 -SOAP_FMAC1 -size_t -SOAP_FMAC2 -soap_tell(struct soap *soap) -{ return soap->count - soap->buflen + soap->bufidx - (soap->ahead != 0); -} -#endif -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_pututf8(struct soap *soap, register unsigned long c) -{ char tmp[16]; - if (c > 0 && c < 0x80) - { *tmp = (char)c; - return soap_send_raw(soap, tmp, 1); - } -#ifndef WITH_LEAN - if (soap->mode & SOAP_XML_CANONICAL) - { register char *t = tmp; - if (c < 0x0800) - *t++ = (char)(0xC0 | ((c >> 6) & 0x1F)); - else - { if (c < 0x010000) - *t++ = (char)(0xE0 | ((c >> 12) & 0x0F)); - else - { if (c < 0x200000) - *t++ = (char)(0xF0 | ((c >> 18) & 0x07)); - else - { if (c < 0x04000000) - *t++ = (char)(0xF8 | ((c >> 24) & 0x03)); - else - { *t++ = (char)(0xFC | ((c >> 30) & 0x01)); - *t++ = (char)(0x80 | ((c >> 24) & 0x3F)); - } - *t++ = (char)(0x80 | ((c >> 18) & 0x3F)); - } - *t++ = (char)(0x80 | ((c >> 12) & 0x3F)); - } - *t++ = (char)(0x80 | ((c >> 6) & 0x3F)); - } - *t++ = (char)(0x80 | (c & 0x3F)); - *t = '\0'; - } - else -#endif - sprintf(tmp, "&#%lu;", c); - return soap_send(soap, tmp); -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -soap_wchar -SOAP_FMAC2 -soap_getutf8(struct soap *soap) -{ register soap_wchar c, c1, c2, c3, c4; - c = soap_get(soap); - if (c < 0x80 || (soap->mode & SOAP_ENC_LATIN)) - return c; - c1 = soap_get(soap); - if (c1 < 0x80) - { soap_unget(soap, c1); - return c; - } - c1 &= 0x3F; - if (c < 0xE0) - return ((soap_wchar)(c & 0x1F) << 6) | c1; - c2 = (soap_wchar)soap_get1(soap) & 0x3F; - if (c < 0xF0) - return ((soap_wchar)(c & 0x0F) << 12) | (c1 << 6) | c2; - c3 = (soap_wchar)soap_get1(soap) & 0x3F; - if (c < 0xF8) - return ((soap_wchar)(c & 0x07) << 18) | (c1 << 12) | (c2 << 6) | c3; - c4 = (soap_wchar)soap_get1(soap) & 0x3F; - if (c < 0xFC) - return ((soap_wchar)(c & 0x03) << 24) | (c1 << 18) | (c2 << 12) | (c3 << 6) | c4; - return ((soap_wchar)(c & 0x01) << 30) | (c1 << 24) | (c2 << 18) | (c3 << 12) | (c4 << 6) | (soap_wchar)(soap_get1(soap) & 0x3F); -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_puthex(struct soap *soap, const unsigned char *s, int n) -{ char d[2]; - register int i; -#ifdef WITH_DOM - if ((soap->mode & SOAP_XML_DOM) && soap->dom) - { if (!(soap->dom->data = soap_s2hex(soap, s, NULL, n))) - return soap->error; - return SOAP_OK; - } -#endif - for (i = 0; i < n; i++) - { register int m = *s++; - d[0] = (char)((m >> 4) + (m > 159 ? '7' : '0')); - m &= 0x0F; - d[1] = (char)(m + (m > 9 ? '7' : '0')); - if (soap_send_raw(soap, d, 2)) - return soap->error; - } - return SOAP_OK; -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -unsigned char* -SOAP_FMAC2 -soap_gethex(struct soap *soap, int *n) -{ -#ifdef WITH_DOM - if ((soap->mode & SOAP_XML_DOM) && soap->dom) - { soap->dom->data = soap_string_in(soap, 0, -1, -1); - return (unsigned char*)soap_hex2s(soap, soap->dom->data, NULL, 0, n); - } -#endif -#ifdef WITH_FAST - soap->labidx = 0; - for (;;) - { register char *s; - register int i, k; - if (soap_append_lab(soap, NULL, 0)) - return NULL; - s = soap->labbuf + soap->labidx; - k = soap->lablen - soap->labidx; - soap->labidx = soap->lablen; - for (i = 0; i < k; i++) - { register char d1, d2; - register soap_wchar c; - c = soap_get(soap); - if (soap_isxdigit(c)) - { d1 = (char)c; - c = soap_get(soap); - if (soap_isxdigit(c)) - d2 = (char)c; - else - { soap->error = SOAP_TYPE; - return NULL; - } - } - else - { unsigned char *p; - soap_unget(soap, c); - if (n) - *n = (int)(soap->lablen - k + i); - p = (unsigned char*)soap_malloc(soap, soap->lablen - k + i); - if (p) - memcpy(p, soap->labbuf, soap->lablen - k + i); - return p; - } - *s++ = ((d1 >= 'A' ? (d1 & 0x7) + 9 : d1 - '0') << 4) + (d2 >= 'A' ? (d2 & 0x7) + 9 : d2 - '0'); - } - } -#else - if (soap_new_block(soap)) - return NULL; - for (;;) - { register int i; - register char *s = (char*)soap_push_block(soap, SOAP_BLKLEN); - if (!s) - { soap_end_block(soap); - return NULL; - } - for (i = 0; i < SOAP_BLKLEN; i++) - { register char d1, d2; - register soap_wchar c = soap_get(soap); - if (soap_isxdigit(c)) - { d1 = (char)c; - c = soap_get(soap); - if (soap_isxdigit(c)) - d2 = (char)c; - else - { soap_end_block(soap); - soap->error = SOAP_TYPE; - return NULL; - } - } - else - { unsigned char *p; - soap_unget(soap, c); - if (n) - *n = soap_size_block(soap, i); - p = (unsigned char*)soap_save_block(soap, NULL, 0); - return p; - } - *s++ = ((d1 >= 'A' ? (d1 & 0x7) + 9 : d1 - '0') << 4) + (d2 >= 'A' ? (d2 & 0x7) + 9 : d2 - '0'); - } - } -#endif -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_putbase64(struct soap *soap, const unsigned char *s, int n) -{ register int i; - register unsigned long m; - char d[4]; - if (!s) - return SOAP_OK; -#ifdef WITH_DOM - if ((soap->mode & SOAP_XML_DOM) && soap->dom) - { if (!(soap->dom->data = soap_s2base64(soap, s, NULL, n))) - return soap->error; - return SOAP_OK; - } -#endif - for (; n > 2; n -= 3, s += 3) - { m = s[0]; - m = (m << 8) | s[1]; - m = (m << 8) | s[2]; - for (i = 4; i > 0; m >>= 6) - d[--i] = soap_base64o[m & 0x3F]; - if (soap_send_raw(soap, d, 4)) - return soap->error; - } - if (n > 0) - { m = 0; - for (i = 0; i < n; i++) - m = (m << 8) | *s++; - for (; i < 3; i++) - m <<= 8; - for (i++; i > 0; m >>= 6) - d[--i] = soap_base64o[m & 0x3F]; - for (i = 3; i > n; i--) - d[i] = '='; - if (soap_send_raw(soap, d, 4)) - return soap->error; - } - return SOAP_OK; -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -unsigned char* -SOAP_FMAC2 -soap_getbase64(struct soap *soap, int *n, int malloc_flag) -{ -#ifdef WITH_DOM - if ((soap->mode & SOAP_XML_DOM) && soap->dom) - { soap->dom->data = soap_string_in(soap, 0, -1, -1); - return (unsigned char*)soap_base642s(soap, soap->dom->data, NULL, 0, n); - } -#endif -#ifdef WITH_FAST - soap->labidx = 0; - for (;;) - { register int i, k; - register char *s; - if (soap_append_lab(soap, NULL, 2)) - return NULL; - s = soap->labbuf + soap->labidx; - k = 3 * ((soap->lablen - soap->labidx) / 3); - soap->labidx = 3 * (soap->lablen / 3); - if (!s) - return NULL; - for (i = 0; i < k; i += 3) - { register unsigned long m = 0; - register int j = 0; - do - { register soap_wchar c = soap_get(soap); - if (c == '=' || c < 0) - { unsigned char *p; - switch (j) - { case 2: - *s++ = (char)((m >> 4) & 0xFF); - i++; - break; - case 3: - *s++ = (char)((m >> 10) & 0xFF); - *s++ = (char)((m >> 2) & 0xFF); - i += 2; - } - if (n) - *n = (int)(soap->lablen - k + i - 1); - p = (unsigned char*)soap_malloc(soap, soap->lablen - k + i - 1); - if (p) - memcpy(p, soap->labbuf, soap->lablen - k + i - 1); - if (c >= 0) - { while ((int)((c = soap_get(soap)) != EOF) && c != SOAP_LT && c != SOAP_TT) - ; - } - soap_unget(soap, c); - return p; - } - c -= '+'; - if (c >= 0 && c <= 79) - { m = (m << 6) + soap_base64i[c]; - j++; - } - } while (j < 4); - *s++ = (char)((m >> 16) & 0xFF); - *s++ = (char)((m >> 8) & 0xFF); - *s++ = (char)(m & 0xFF); - } - } -#else - if (soap_new_block(soap)) - return NULL; - for (;;) - { register int i; - register char *s = (char*)soap_push_block(soap, 3 * SOAP_BLKLEN); /* must be multiple of 3 */ - if (!s) - { soap_end_block(soap); - return NULL; - } - for (i = 0; i < SOAP_BLKLEN; i++) - { register unsigned long m = 0; - register int j = 0; - do - { register soap_wchar c = soap_get(soap); - if (c == '=' || c < 0) - { unsigned char *p; - i *= 3; - switch (j) - { case 2: - *s++ = (char)((m >> 4) & 0xFF); - i++; - break; - case 3: - *s++ = (char)((m >> 10) & 0xFF); - *s++ = (char)((m >> 2) & 0xFF); - i += 2; - } - if (n) - *n = (int)soap_size_block(soap, i); - p = (unsigned char*)soap_save_block(soap, NULL, 0); - if (c >= 0) - { while ((int)((c = soap_get(soap)) != EOF) && c != SOAP_LT && c != SOAP_TT) - ; - } - soap_unget(soap, c); - return p; - } - c -= '+'; - if (c >= 0 && c <= 79) - { m = (m << 6) + soap_base64i[c]; - j++; - } - } while (j < 4); - *s++ = (char)((m >> 16) & 0xFF); - *s++ = (char)((m >> 8) & 0xFF); - *s++ = (char)(m & 0xFF); - } - } -#endif -} -#endif - -/******************************************************************************/ -#ifndef WITH_LEANER -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_xop_forward(struct soap *soap, unsigned char **ptr, int *size, char **id, char **type, char **options) -{ /* Check MTOM xop:Include element (within hex/base64Binary) */ - /* TODO: this code to be obsoleted with new import/xop.h conventions */ - int body = soap->body; /* should save type too? */ - if (!soap_peek_element(soap)) - { if (!soap_element_begin_in(soap, "xop:Include", 0) && *soap->href) - { if (soap_dime_forward(soap, ptr, size, id, type, options)) - return soap->error; - } - if (soap->body && soap_element_end_in(soap, NULL)) - return soap->error; - } - soap->body = body; - return SOAP_OK; -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_LEANER -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_dime_forward(struct soap *soap, unsigned char **ptr, int *size, char **id, char **type, char **options) -{ struct soap_xlist *xp = (struct soap_xlist*)SOAP_MALLOC(soap, sizeof(struct soap_xlist)); - *ptr = NULL; - *size = 0; - *id = soap_strdup(soap, soap->href); - *type = NULL; - *options = NULL; - if (!xp) - return soap->error = SOAP_EOM; - xp->next = soap->xlist; - xp->ptr = ptr; - xp->size = size; - xp->id = *id; - xp->type = type; - xp->options = options; - soap->xlist = xp; - return SOAP_OK; -} -#endif -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -char * -SOAP_FMAC2 -soap_strdup(struct soap *soap, const char *s) -{ char *t = NULL; - if (s && (t = (char*)soap_malloc(soap, strlen(s) + 1))) - strcpy(t, s); - return t; -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_new_block(struct soap *soap) -{ struct soap_blist *p; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "New block sequence (prev=%p)\n", soap->blist)); - if (!(p = (struct soap_blist*)SOAP_MALLOC(soap, sizeof(struct soap_blist)))) - return SOAP_EOM; - p->next = soap->blist; - p->ptr = NULL; - p->size = 0; - soap->blist = p; - return SOAP_OK; -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -void* -SOAP_FMAC2 -soap_push_block(struct soap *soap, size_t n) -{ char *p; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Push block of %u bytes (%u bytes total)\n", (unsigned int)n, (unsigned int)soap->blist->size + (unsigned int)n)); - if (!(p = (char*)SOAP_MALLOC(soap, n + sizeof(char*) + sizeof(size_t)))) - { soap->error = SOAP_EOM; - return NULL; - } - *(char**)p = soap->blist->ptr; - *(size_t*)(p + sizeof(char*)) = n; - soap->blist->ptr = p; - soap->blist->size += n; - return p + sizeof(char*) + sizeof(size_t); -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_pop_block(struct soap *soap) -{ char *p; - if (!soap->blist->ptr) - return; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Pop block\n")); - p = soap->blist->ptr; - soap->blist->size -= *(size_t*)(p + sizeof(char*)); - soap->blist->ptr = *(char**)p; - SOAP_FREE(soap, p); -} -#endif - -/******************************************************************************/ -#ifndef WITH_NOIDREF -#ifndef PALM_1 -static void -soap_update_ptrs(struct soap *soap, char *start, char *end, long offset) -{ int i; - register struct soap_ilist *ip; - register struct soap_flist *fp; -#ifndef WITH_LEANER - register struct soap_xlist *xp; -#endif - register void *p, **q; - for (i = 0; i < SOAP_IDHASH; i++) - { for (ip = soap->iht[i]; ip; ip = ip->next) - { if (ip->ptr && (char*)ip->ptr >= start && (char*)ip->ptr < end) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Update id='%s' %p -> %p\n", ip->id, ip->ptr, (char*)ip->ptr + offset)); - ip->ptr = (char*)ip->ptr + offset; - } - for (q = &ip->link; q; q = (void**)p) - { p = *q; - if (p && (char*)p >= start && (char*)p < end) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Link update id='%s' %p\n", ip->id, p)); - *q = (char*)p + offset; - } - } - for (q = &ip->copy; q; q = (void**)p) - { p = *q; - if (p && (char*)p >= start && (char*)p < end) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copy chain update id='%s' %p\n", ip->id, p)); - *q = (char*)p + offset; - } - } - for (fp = ip->flist; fp; fp = fp->next) - { if ((char*)fp->ptr >= start && (char*)fp->ptr < end) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copy list update id='%s' %p\n", ip->id, fp)); - fp->ptr = (char*)fp->ptr + offset; - } - } - } - } -#ifndef WITH_LEANER - for (xp = soap->xlist; xp; xp = xp->next) - { if (xp->ptr && (char*)xp->ptr >= start && (char*)xp->ptr < end) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Update id='%s' %p -> %p\n", xp->id?xp->id:"", xp->ptr, (char*)xp->ptr + offset)); - xp->ptr = (unsigned char**)((char*)xp->ptr + offset); - xp->size = (int*)((char*)xp->size + offset); - xp->type = (char**)((char*)xp->type + offset); - xp->options = (char**)((char*)xp->options + offset); - } - } -#endif -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_NOIDREF -#ifndef PALM_1 -static int -soap_has_copies(struct soap *soap, register const char *start, register const char *end) -{ register int i; - register struct soap_ilist *ip; - register struct soap_flist *fp; - register const char *p; - for (i = 0; i < SOAP_IDHASH; i++) - { for (ip = soap->iht[i]; ip; ip = ip->next) - { for (p = (const char*)ip->copy; p; p = *(const char**)p) - if (p >= start && p < end) - return SOAP_ERR; - for (fp = ip->flist; fp; fp = fp->next) - if ((const char*)fp->ptr >= start && (const char*)fp->ptr < end) - return SOAP_ERR; - } - } - return SOAP_OK; -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_NOIDREF -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_resolve(struct soap *soap) -{ register int i; - register struct soap_ilist *ip; - register struct soap_flist *fp; - short flag; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Resolving forwarded data\n")); - for (i = 0; i < SOAP_IDHASH; i++) - { for (ip = soap->iht[i]; ip; ip = ip->next) - { if (ip->ptr) - { register void *p, **q, *r; - q = (void**)ip->link; - ip->link = NULL; - r = ip->ptr; - DBGLOG(TEST, if (q) SOAP_MESSAGE(fdebug, "Traversing link chain to resolve id='%s'\n", ip->id)); - while (q) - { p = *q; - *q = r; - DBGLOG(TEST,SOAP_MESSAGE(fdebug, "... link %p -> %p\n", q, r)); - q = (void**)p; - } - } - else if (*ip->id == '#') - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Missing data for id='%s'\n", ip->id)); - strcpy(soap->id, ip->id + 1); - return soap->error = SOAP_MISSING_ID; - } - } - } - do - { flag = 0; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Resolution phase\n")); - for (i = 0; i < SOAP_IDHASH; i++) - { for (ip = soap->iht[i]; ip; ip = ip->next) - { if (ip->ptr && !soap_has_copies(soap, (const char*)ip->ptr, (const char*)ip->ptr + ip->size)) - { if (ip->copy) - { register void *p, **q = (void**)ip->copy; - DBGLOG(TEST, if (q) SOAP_MESSAGE(fdebug, "Traversing copy chain to resolve id='%s'\n", ip->id)); - ip->copy = NULL; - do - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "... copy %p -> %p (%u bytes)\n", ip->ptr, q, (unsigned int)ip->size)); - p = *q; - memcpy(q, ip->ptr, ip->size); - q = (void**)p; - } while (q); - flag = 1; - } - for (fp = ip->flist; fp; fp = ip->flist) - { register unsigned int k = fp->level; - register void *p = ip->ptr; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Resolving forwarded data type=%d location=%p level=%u,%u id='%s'\n", ip->type, p, ip->level, fp->level, ip->id)); - while (ip->level < k) - { register void **q = (void**)soap_malloc(soap, sizeof(void*)); - if (!q) - return soap->error; - *q = p; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Descending one level, new location=%p holds=%p...\n", q, *q)); - p = (void*)q; - k--; - } - if (fp->fcopy) - fp->fcopy(soap, ip->type, fp->type, fp->ptr, p, ip->size); - else - soap_fcopy(soap, ip->type, fp->type, fp->ptr, p, ip->size); - ip->flist = fp->next; - SOAP_FREE(soap, fp); - flag = 1; - } - } - } - } - } while (flag); -#ifdef SOAP_DEBUG - for (i = 0; i < SOAP_IDHASH; i++) - { for (ip = soap->iht[i]; ip; ip = ip->next) - { if (ip->copy || ip->flist) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Resolution error: forwarded data for id='%s' could not be propagated, please report this problem to the developers\n", ip->id)); - } - } - } -#endif - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Resolution done\n")); - return SOAP_OK; -} -#endif -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -size_t -SOAP_FMAC2 -soap_size_block(struct soap *soap, size_t n) -{ if (soap->blist->ptr) - { soap->blist->size -= *(size_t*)(soap->blist->ptr + sizeof(char*)) - n; - *(size_t*)(soap->blist->ptr + sizeof(char*)) = n; - } - return soap->blist->size; -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -char* -SOAP_FMAC2 -soap_first_block(struct soap *soap) -{ char *p, *q, *r; - p = soap->blist->ptr; - if (!p) - return NULL; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "First block\n")); - r = NULL; - do - { q = *(char**)p; - *(char**)p = r; - r = p; - p = q; - } while (p); - soap->blist->ptr = r; - return r + sizeof(char*) + sizeof(size_t); -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -char* -SOAP_FMAC2 -soap_next_block(struct soap *soap) -{ char *p; - p = soap->blist->ptr; - if (p) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Next block\n")); - soap->blist->ptr = *(char**)p; - SOAP_FREE(soap, p); - if (soap->blist->ptr) - return soap->blist->ptr + sizeof(char*) + sizeof(size_t); - } - return NULL; -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -size_t -SOAP_FMAC2 -soap_block_size(struct soap *soap) -{ return *(size_t*)(soap->blist->ptr + sizeof(char*)); -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_end_block(struct soap *soap) -{ struct soap_blist *bp; - char *p, *q; - bp = soap->blist; - if (bp) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "End of block sequence, free all remaining blocks\n")); - for (p = bp->ptr; p; p = q) - { q = *(char**)p; - SOAP_FREE(soap, p); - } - soap->blist = bp->next; - SOAP_FREE(soap, bp); - } - DBGLOG(TEST, if (soap->blist) SOAP_MESSAGE(fdebug, "Restore previous block sequence\n")); -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -char* -SOAP_FMAC2 -soap_save_block(struct soap *soap, char *p, int flag) -{ register size_t n; - register char *q, *s; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Save all blocks in contiguous memory space of %u bytes (%p->%p)\n", (unsigned int)soap->blist->size, soap->blist->ptr, p)); - if (soap->blist->size) - { if (!p) - p = (char*)soap_malloc(soap, soap->blist->size); - if (p) - { for (s = p, q = soap_first_block(soap); q; q = soap_next_block(soap)) - { n = soap_block_size(soap); -#ifndef WITH_NOIDREF - if (flag) - soap_update_ptrs(soap, q, q + n, (long)s - (long)q); /* pointers s and q may or may not be related */ -#endif - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copy %u bytes from %p to %p\n", (unsigned int)n, q, s)); - memcpy(s, q, n); - s += n; - } - } - else - soap->error = SOAP_EOM; - } - soap_end_block(soap); - return p; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -char * -SOAP_FMAC2 -soap_putsize(struct soap *soap, const char *type, int size) -{ return soap_putsizes(soap, type, &size, 1); -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -char * -SOAP_FMAC2 -soap_putsizes(struct soap *soap, const char *type, const int *size, int dim) -{ return soap_putsizesoffsets(soap, type, size, NULL, dim); -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -char * -SOAP_FMAC2 -soap_putsizesoffsets(struct soap *soap, const char *type, const int *size, const int *offset, int dim) -{ int i; - if (!type) - return NULL; - if (soap->version == 2) - { sprintf(soap->type, "%s[%d", type, size[0]); - for (i = 1; i < dim; i++) - sprintf(soap->type + strlen(soap->type), " %d", size[i]); - } - else - { if (offset) - { sprintf(soap->type, "%s[%d", type, size[0] + offset[0]); - for (i = 1; i < dim; i++) - sprintf(soap->type + strlen(soap->type), ",%d", size[i] + offset[i]); - } - else - { sprintf(soap->type, "%s[%d", type, size[0]); - for (i = 1; i < dim; i++) - sprintf(soap->type + strlen(soap->type), ",%d", size[i]); - } - strcat(soap->type, "]"); - } - return soap->type; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -char * -SOAP_FMAC2 -soap_putoffset(struct soap *soap, int offset) -{ return soap_putoffsets(soap, &offset, 1); -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -char * -SOAP_FMAC2 -soap_putoffsets(struct soap *soap, const int *offset, int dim) -{ register int i; - sprintf(soap->arrayOffset, "[%d", offset[0]); - for (i = 1; i < dim; i++) - sprintf(soap->arrayOffset + strlen(soap->arrayOffset), ",%d", offset[i]); - strcat(soap->arrayOffset, "]"); - return soap->arrayOffset; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_size(const int *size, int dim) -{ register int i, n = size[0]; - for (i = 1; i < dim; i++) - n *= size[i]; - return n; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_getoffsets(const char *attr, const int *size, int *offset, int dim) -{ register int i, j = 0; - if (offset) - for (i = 0; i < dim && attr && *attr; i++) - { attr++; - j *= size[i]; - j += offset[i] = (int)atol(attr); - attr = strchr(attr, ','); - } - else - for (i = 0; i < dim && attr && *attr; i++) - { attr++; - j *= size[i]; - j += (int)atol(attr); - attr = strchr(attr, ','); - } - return j; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_getsize(const char *attr1, const char *attr2, int *j) -{ register int n, k; - char *s; - *j = 0; - if (!*attr1) - return -1; - if (*attr1 == '[') - attr1++; - n = 1; - for (;;) - { k = (int)soap_strtol(attr1, &s, 10); - n *= k; - if (k < 0 || n > SOAP_MAXARRAYSIZE || s == attr1) - return -1; - attr1 = strchr(s, ','); - if (!attr1) - attr1 = strchr(s, ' '); - if (attr2 && *attr2) - { attr2++; - *j *= k; - k = (int)soap_strtol(attr2, &s, 10); - *j += k; - if (k < 0) - return -1; - attr2 = s; - } - if (!attr1) - break; - attr1++; - } - return n - *j; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_getsizes(const char *attr, int *size, int dim) -{ register int i, k, n; - if (!*attr) - return -1; - i = strlen(attr); - n = 1; - do - { for (i = i-1; i >= 0; i--) - if (attr[i] == '[' || attr[i] == ',' || attr[i] == ' ') - break; - k = (int)atol(attr + i + 1); - n *= size[--dim] = k; - if (k < 0 || n > SOAP_MAXARRAYSIZE) - return -1; - } while (i >= 0 && attr[i] != '['); - return n; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_getposition(const char *attr, int *pos) -{ register int i, n; - if (!*attr) - return -1; - n = 0; - i = 1; - do - { pos[n++] = (int)atol(attr + i); - while (attr[i] && attr[i] != ',' && attr[i] != ']') - i++; - if (attr[i] == ',') - i++; - } while (n < SOAP_MAXDIMS && attr[i] && attr[i] != ']'); - return n; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_push_namespace(struct soap *soap, const char *id, const char *ns) -{ register struct soap_nlist *np; - register struct Namespace *p; - register short i = -1; - register size_t n, k; - n = strlen(id); - k = strlen(ns) + 1; - p = soap->local_namespaces; - if (p) - { for (i = 0; p->id; p++, i++) - { if (p->ns && !strcmp(ns, p->ns)) - { if (p->out) - { SOAP_FREE(soap, p->out); - p->out = NULL; - } - break; - } - if (p->out) - { if (!strcmp(ns, p->out)) - break; - } - else if (p->in) - { if (!soap_tag_cmp(ns, p->in)) - { if ((p->out = (char*)SOAP_MALLOC(soap, k))) - strcpy(p->out, ns); - break; - } - } - } - if (!p || !p->id) - i = -1; - } - if (i >= 0) - k = 0; - np = (struct soap_nlist*)SOAP_MALLOC(soap, sizeof(struct soap_nlist) + n + k); - if (!np) - return soap->error = SOAP_EOM; - np->next = soap->nlist; - soap->nlist = np; - np->level = soap->level; - np->index = i; - strcpy(np->id, id); - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Push namespace binding (level=%u) '%s' '%s'\n", soap->level, id, ns)); - if (i < 0) - { np->ns = np->id + n + 1; - strcpy(np->ns, ns); - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Push NOT OK: no match found for '%s' in namespace mapping table (added to stack anyway)\n", ns)); - } - else - { np->ns = NULL; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Push OK ('%s' matches '%s' in namespace table)\n", id, p->id)); - } - return SOAP_OK; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_pop_namespace(struct soap *soap) -{ register struct soap_nlist *np; - while (soap->nlist && soap->nlist->level >= soap->level) - { np = soap->nlist->next; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Popped namespace binding (level=%u) '%s'\n", soap->level, soap->nlist->id)); - SOAP_FREE(soap, soap->nlist); - soap->nlist = np; - } -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_match_namespace(struct soap *soap, const char *id1, const char *id2, int n1, int n2) -{ register struct soap_nlist *np = soap->nlist; - while (np && (strncmp(np->id, id1, n1) || np->id[n1])) - np = np->next; - if (np) - { if (np->index < 0 - || (soap->local_namespaces[np->index].id - && (strncmp(soap->local_namespaces[np->index].id, id2, n2) - || soap->local_namespaces[np->index].id[n2]))) - return SOAP_NAMESPACE; - return SOAP_OK; - } - if (n1 == 3 && n1 == n2 && !strcmp(id1, "xml") && !strcmp(id1, id2)) - return SOAP_OK; - return SOAP_SYNTAX_ERROR; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_tag_cmp(const char *s, const char *t) -{ for (;;) - { register int c1 = *s; - register int c2 = *t; - if (!c1 || c1 == '"') - break; - if (c2 != '-') - { if (c1 != c2) - { if (c1 >= 'A' && c1 <= 'Z') - c1 += 'a' - 'A'; - if (c2 >= 'A' && c2 <= 'Z') - c2 += 'a' - 'A'; - } - if (c1 != c2) - { if (c2 != '*') - return 1; - c2 = *++t; - if (!c2) - return 0; - if (c2 >= 'A' && c2 <= 'Z') - c2 += 'a' - 'A'; - for (;;) - { c1 = *s; - if (!c1 || c1 == '"') - break; - if (c1 >= 'A' && c1 <= 'Z') - c1 += 'a' - 'A'; - if (c1 == c2 && !soap_tag_cmp(s + 1, t + 1)) - return 0; - s++; - } - break; - } - } - s++; - t++; - } - if (*t == '*' && !t[1]) - return 0; - return *t; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_match_tag(struct soap *soap, const char *tag1, const char *tag2) -{ register const char *s, *t; - if (!tag1 || !tag2 || !*tag2) - return SOAP_OK; - s = strchr(tag1, ':'); - t = strchr(tag2, ':'); - if (t) - { if (s) - { if (t[1] && SOAP_STRCMP(s + 1, t + 1)) - return SOAP_TAG_MISMATCH; - if (t != tag2 && soap_match_namespace(soap, tag1, tag2, s - tag1, t - tag2)) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Tags '%s' and '%s' match but namespaces differ\n", tag1, tag2)); - return SOAP_TAG_MISMATCH; - } - } - else if (SOAP_STRCMP(tag1, t + 1)) - return SOAP_TAG_MISMATCH; - else if (t != tag2 && soap_match_namespace(soap, tag1, tag2, 0, t - tag2)) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Tags '%s' and '%s' match but namespaces differ\n", tag1, tag2)); - return SOAP_TAG_MISMATCH; - } - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Tags and (default) namespaces match: '%s' '%s'\n", tag1, tag2)); - return SOAP_OK; - } - if (s) - { if (SOAP_STRCMP(s + 1, tag2)) - return SOAP_TAG_MISMATCH; - } - else if (SOAP_STRCMP(tag1, tag2)) - return SOAP_TAG_MISMATCH; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Tags match: '%s' '%s'\n", tag1, tag2)); - return SOAP_OK; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_match_array(struct soap *soap, const char *type) -{ if (*soap->arrayType) - if (soap_match_tag(soap, soap->arrayType, type) - && soap_match_tag(soap, soap->arrayType, "xsd:anyType") - && soap_match_tag(soap, soap->arrayType, "xsd:ur-type") - ) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Array type mismatch: '%s' '%s'\n", soap->arrayType, type)); - return SOAP_TAG_MISMATCH; - } - return SOAP_OK; -} -#endif - -/******************************************************************************/ - -#ifdef WITH_OPENSSL -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_rand() -{ unsigned char buf[4]; - ssl_init(); - RAND_pseudo_bytes(buf, 4); - return *(int*)buf; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_ssl_server_context(struct soap *soap, unsigned short flags, const char *keyfile, const char *password, const char *cafile, const char *capath, const char *dhfile, const char *randfile, const char *sid) -{ int err; - soap->keyfile = keyfile; - soap->password = password; - soap->cafile = cafile; - soap->capath = capath; - if (dhfile) - { soap->dhfile = dhfile; - soap->rsa = 0; - } - else - { soap->dhfile = NULL; - soap->rsa = 1; - } - soap->randfile = randfile; - soap->require_client_auth = (flags & SOAP_SSL_REQUIRE_CLIENT_AUTHENTICATION); - if (!(err = soap->fsslauth(soap))) - if (sid) - SSL_CTX_set_session_id_context(soap->ctx, (unsigned char*)sid, strlen(sid)); - return err; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_ssl_client_context(struct soap *soap, unsigned short flags, const char *keyfile, const char *password, const char *cafile, const char *capath, const char *randfile) -{ soap->keyfile = keyfile; - soap->password = password; - soap->cafile = cafile; - soap->capath = capath; - soap->dhfile = NULL; - soap->rsa = 0; - soap->randfile = randfile; - soap->require_server_auth = (flags & SOAP_SSL_REQUIRE_SERVER_AUTHENTICATION); - return soap->fsslauth(soap); -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -static void -ssl_init() -{ static int done = 0; - if (!done) - { done = 1; - SSL_library_init(); -#ifndef WITH_LEAN - SSL_load_error_strings(); -#endif - if (!RAND_load_file("/dev/urandom", 1024)) - { char buf[1024]; - RAND_seed(buf, sizeof(buf)); - while (!RAND_status()) - { int r = rand(); - RAND_seed(&r, sizeof(int)); - } - } - } -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -static const char * -ssl_error(struct soap *soap, int ret) -{ int err = SSL_get_error(soap->ssl, ret); - const char *msg = soap_str_code(h_ssl_error_codes, err); - if (msg) - strcpy(soap->msgbuf, msg); - else - return ERR_error_string(err, soap->msgbuf); - if (ERR_peek_error()) - { unsigned long r; - strcat(soap->msgbuf, "\n"); - while ((r = ERR_get_error())) - ERR_error_string_n(r, soap->msgbuf + strlen(soap->msgbuf), sizeof(soap->msgbuf) - strlen(soap->msgbuf)); - } - else - { switch (ret) - { case 0: - strcpy(soap->msgbuf, "EOF was observed that violates the protocol. The client probably provided invalid authentication information."); - break; - case -1: - sprintf(soap->msgbuf, "Error observed by underlying BIO: %s", strerror(errno)); - break; - } - } - return soap->msgbuf; -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -static int -ssl_password(char *buf, int num, int rwflag, void *userdata) -{ if (num < (int)strlen((char*)userdata) + 1) - return 0; - return strlen(strcpy(buf, (char*)userdata)); -} -#endif - -/******************************************************************************/ -/* This callback is included for future references. It should not be deleted -#ifndef PALM_2 -static DH * -ssl_tmp_dh(SSL *ssl, int is_export, int keylength) -{ static DH *dh512 = NULL; - static DH *dh1024 = NULL; - DH *dh; - switch (keylength) - { case 512: - if (!dh512) - { BIO *bio = BIO_new_file("dh512.pem", "r"); - if (bio) - { dh512 = PEM_read_bio_DHparams(bio, NULL, NULL, NULL); - BIO_free(bio); - return dh512; - } - } - else - return dh512; - default: - if (!dh1024) - { BIO *bio = BIO_new_file("dh1024.pem", "r"); - if (bio) - { dh1024 = PEM_read_bio_DHparams(bio, NULL, NULL, NULL); - BIO_free(bio); - } - } - dh = dh1024; - } - return dh; -} -#endif -*/ - -/******************************************************************************/ -#ifndef PALM_1 -static int -ssl_auth_init(struct soap *soap) -{ ssl_init(); - if (!soap->ctx) - { if (!(soap->ctx = SSL_CTX_new(SSLv23_method()))) - return soap_set_receiver_error(soap, "SSL error", "Can't setup context", SOAP_SSL_ERROR); - } - if (soap->randfile) - { if (!RAND_load_file(soap->randfile, -1)) - return soap_set_receiver_error(soap, "SSL error", "Can't load randomness", SOAP_SSL_ERROR); - } - if (soap->cafile || soap->capath) - { if (!SSL_CTX_load_verify_locations(soap->ctx, soap->cafile, soap->capath)) - return soap_set_receiver_error(soap, "SSL error", "Can't read CA file and directory", SOAP_SSL_ERROR); - } - if (!SSL_CTX_set_default_verify_paths(soap->ctx)) - return soap_set_receiver_error(soap, "SSL error", "Can't read default CA file and/or directory", SOAP_SSL_ERROR); -/* See below */ - if (soap->keyfile) - { if (!SSL_CTX_use_certificate_chain_file(soap->ctx, soap->keyfile)) - return soap_set_receiver_error(soap, "SSL error", "Can't read certificate key file", SOAP_SSL_ERROR); - if (soap->password) - { SSL_CTX_set_default_passwd_cb_userdata(soap->ctx, (void*)soap->password); - SSL_CTX_set_default_passwd_cb(soap->ctx, ssl_password); - } - if (!SSL_CTX_use_PrivateKey_file(soap->ctx, soap->keyfile, SSL_FILETYPE_PEM)) - return soap_set_receiver_error(soap, "SSL error", "Can't read key file", SOAP_SSL_ERROR); - } -/* Suggested alternative approach to check cafile first before the key file: - if (soap->password) - { SSL_CTX_set_default_passwd_cb_userdata(soap->ctx, (void*)soap->password); - SSL_CTX_set_default_passwd_cb(soap->ctx, ssl_password); - } - if (!soap->cafile || !SSL_CTX_use_certificate_chain_file(soap->ctx, soap->cafile)) - { if (soap->keyfile) - { if (!SSL_CTX_use_certificate_chain_file(soap->ctx, soap->keyfile)) - return soap_set_receiver_error(soap, "SSL error", "Can't read certificate or key file", SOAP_SSL_ERROR); - if (!SSL_CTX_use_PrivateKey_file(soap->ctx, soap->keyfile, SSL_FILETYPE_PEM)) - return soap_set_receiver_error(soap, "SSL error", "Can't read key file", SOAP_SSL_ERROR); - } - } -*/ - if (soap->rsa) - { RSA *rsa = RSA_generate_key(512, RSA_F4, NULL, NULL); - if (!SSL_CTX_set_tmp_rsa(soap->ctx, rsa)) - { if (rsa) - RSA_free(rsa); - return soap_set_receiver_error(soap, "SSL error", "Can't set RSA key", SOAP_SSL_ERROR); - } - RSA_free(rsa); - } - else if (soap->dhfile) - { DH *dh = 0; - BIO *bio; - bio = BIO_new_file(soap->dhfile, "r"); - if (!bio) - return soap_set_receiver_error(soap, "SSL error", "Can't read DH file", SOAP_SSL_ERROR); - dh = PEM_read_bio_DHparams(bio, NULL, NULL, NULL); - BIO_free(bio); - if (SSL_CTX_set_tmp_dh(soap->ctx, dh) < 0) - { if (dh) - DH_free(dh); - return soap_set_receiver_error(soap, "SSL error", "Can't set DH parameters", SOAP_SSL_ERROR); - } - DH_free(dh); - } - SSL_CTX_set_options(soap->ctx, SSL_OP_ALL | SSL_OP_NO_SSLv2); - SSL_CTX_set_verify(soap->ctx, soap->require_client_auth ? (SSL_VERIFY_PEER | SSL_VERIFY_FAIL_IF_NO_PEER_CERT) : soap->require_server_auth ? SSL_VERIFY_PEER : SSL_VERIFY_NONE, soap->fsslverify); -#if (OPENSSL_VERSION_NUMBER < 0x00905100L) - SSL_CTX_set_verify_depth(soap->ctx, 1); -#else - SSL_CTX_set_verify_depth(soap->ctx, 9); -#endif - return SOAP_OK; -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -static int -ssl_verify_callback(int ok, X509_STORE_CTX *store) -{ -#ifdef SOAP_DEBUG - if (!ok) - { char data[256]; - X509 *cert = X509_STORE_CTX_get_current_cert(store); - fprintf(stderr, "SSL verify error or warning with certificate at depth %d: %s\n", X509_STORE_CTX_get_error_depth(store), X509_verify_cert_error_string(X509_STORE_CTX_get_error(store))); - X509_NAME_oneline(X509_get_issuer_name(cert), data, sizeof(data)); - fprintf(stderr, "certificate issuer %s\n", data); - X509_NAME_oneline(X509_get_subject_name(cert), data, sizeof(data)); - fprintf(stderr, "certificate subject %s\n", data); - } -#endif - /* Note: return 1 to continue, but unsafe progress will be terminated by SSL */ - return ok; -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_ssl_accept(struct soap *soap) -{ BIO *bio; - int i, r; - if (!soap_valid_socket(soap->socket)) - return soap_set_receiver_error(soap, "SSL error", "No socket in soap_ssl_accept()", SOAP_SSL_ERROR); - if (!soap->ctx && (soap->error = soap->fsslauth(soap))) - return SOAP_INVALID_SOCKET; - if (!soap->ssl) - { soap->ssl = SSL_new(soap->ctx); - if (!soap->ssl) - return soap_set_receiver_error(soap, "SSL error", "SSL_new() failed in soap_ssl_accept()", SOAP_SSL_ERROR); - } - else - SSL_clear(soap->ssl); - soap->imode |= SOAP_ENC_SSL; - soap->omode |= SOAP_ENC_SSL; -#ifdef WIN32 - { u_long nonblocking = 1; - ioctlsocket((SOAP_SOCKET)soap->socket, FIONBIO, &nonblocking); - } -#else - fcntl((SOAP_SOCKET)soap->socket, F_SETFL, fcntl((SOAP_SOCKET)soap->socket, F_GETFL)|O_NONBLOCK); -#endif - bio = BIO_new_socket((SOAP_SOCKET)soap->socket, BIO_NOCLOSE); - SSL_set_bio(soap->ssl, bio, bio); - i = 100; /* 100 * 0.1 ms retries */ - while ((r = SSL_accept(soap->ssl)) <= 0) - { int err = SSL_get_error(soap->ssl, r); - if (err == SSL_ERROR_WANT_READ || err == SSL_ERROR_WANT_WRITE) - { struct timeval timeout; - fd_set fd; - if (i-- <= 0) - break; - timeout.tv_sec = 0; - timeout.tv_usec = 100000; - FD_ZERO(&fd); - FD_SET((SOAP_SOCKET)soap->socket, &fd); - r = select((SOAP_SOCKET)(soap->socket + 1), &fd, NULL, &fd, &timeout); - if (r < 0 && soap_socket_errno != SOAP_EINTR) - { soap->errnum = soap_socket_errno; - return SOAP_EOF; - } - } - else - { soap->errnum = err; - break; - } - } -#ifdef WIN32 - { u_long blocking = 0; - ioctlsocket((SOAP_SOCKET)soap->socket, FIONBIO, &blocking); - } -#else - fcntl((SOAP_SOCKET)soap->socket, F_SETFL, fcntl((SOAP_SOCKET)soap->socket, F_GETFL)&~O_NONBLOCK); -#endif - if (r <= 0) - { soap_set_receiver_error(soap, ssl_error(soap, r), "SSL_accept() failed in soap_ssl_accept()", SOAP_SSL_ERROR); - soap_closesock(soap); - return SOAP_SSL_ERROR; - } - if (soap->require_client_auth) - { X509 *peer; - int err; - if ((err = SSL_get_verify_result(soap->ssl)) != X509_V_OK) - { soap_closesock(soap); - return soap_set_sender_error(soap, X509_verify_cert_error_string(err), "SSL certificate presented by peer cannot be verified in soap_ssl_accept()", SOAP_SSL_ERROR); - } - peer = SSL_get_peer_certificate(soap->ssl); - if (!peer) - { soap_closesock(soap); - return soap_set_sender_error(soap, "SSL error", "No SSL certificate was presented by the peer in soap_ssl_accept()", SOAP_SSL_ERROR); - } - X509_free(peer); - } - return SOAP_OK; -} -#endif - -/******************************************************************************/ -#endif /* WITH_OPENSSL */ - -/******************************************************************************/ -#ifndef WITH_NOIO -#ifndef PALM_1 -static int -tcp_init(struct soap *soap) -{ soap->errmode = 1; -#ifdef WIN32 - if (tcp_done) - return 0; - else - { WSADATA w; - if (WSAStartup(MAKEWORD(1, 1), &w)) - return -1; - tcp_done = 1; - } -#endif - return 0; -} -#endif -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_done(struct soap *soap) -{ -#ifdef SOAP_DEBUG - int i; -#endif - soap_free(soap); - while (soap->clist) - { struct soap_clist *p = soap->clist->next; - SOAP_FREE(soap, soap->clist); - soap->clist = p; - } - soap->keep_alive = 0; /* to force close the socket */ - soap_closesock(soap); -#ifdef WITH_COOKIES - soap_free_cookies(soap); -#endif - while (soap->plugins) - { register struct soap_plugin *p = soap->plugins->next; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Removing plugin '%s'\n", soap->plugins->id)); - if (soap->plugins->fcopy || !soap->copy) - soap->plugins->fdelete(soap, soap->plugins); - SOAP_FREE(soap, soap->plugins); - soap->plugins = p; - } - soap->fplugin = fplugin; -#ifndef WITH_NOHTTP - soap->fpost = http_post; - soap->fget = http_get; - soap->fform = NULL; - soap->fposthdr = http_post_header; - soap->fresponse = http_response; - soap->fparse = http_parse; - soap->fparsehdr = http_parse_header; -#endif -#ifndef WITH_NOIO -#ifndef WITH_IPV6 - soap->fresolve = tcp_gethost; -#else - soap->fresolve = NULL; -#endif - soap->faccept = tcp_accept; - soap->fopen = tcp_connect; - soap->fclose = tcp_disconnect; - soap->fclosesocket = tcp_closesocket; - soap->fshutdownsocket = tcp_shutdownsocket; - soap->fsend = fsend; - soap->frecv = frecv; - soap->fpoll = soap_poll; -#else - soap->fopen = NULL; - soap->fclose = NULL; - soap->fpoll = NULL; -#endif -#ifndef WITH_LEANER - soap->fprepareinit = NULL; - soap->fpreparesend = NULL; - soap->fpreparerecv = NULL; - soap->fpreparefinal = NULL; -#endif - soap->fseterror = NULL; - soap->fignore = NULL; - soap->fserveloop = NULL; -#ifdef WITH_OPENSSL - if (soap->session) - { SSL_SESSION_free(soap->session); - soap->session = NULL; - } -#endif - if (!soap->copy) - { if (soap_valid_socket(soap->master)) - { soap->fclosesocket(soap, (SOAP_SOCKET)soap->master); - soap->master = SOAP_INVALID_SOCKET; - } -#ifdef WITH_OPENSSL - if (soap->ctx) - { SSL_CTX_free(soap->ctx); - soap->ctx = NULL; - } -#endif - } -#ifdef SOAP_DEBUG - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Free logfiles\n")); - for (i = 0; i < SOAP_MAXLOGS; i++) - { if (soap->logfile[i]) - { SOAP_FREE(soap, (void*)soap->logfile[i]); - soap->logfile[i] = NULL; - } - soap_close_logfile(soap, i); - } - soap_free_mht(soap); -#endif -} -#endif - -/******************************************************************************/ -#ifndef WITH_NOIO -#ifndef PALM_2 -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_cleanup(struct soap *soap) -{ soap_done(soap); -#ifdef WIN32 - if (!tcp_done) - return; - tcp_done = 0; - WSACleanup(); -#endif -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_NOIO -#ifndef PALM_1 -static const char* -tcp_error(struct soap *soap) -{ register const char *msg = NULL; - switch (soap->errmode) - { case 0: - msg = soap_strerror(soap); - break; - case 1: - msg = "WSAStartup failed"; - break; - case 2: - { -#ifndef WITH_LEAN - msg = soap_str_code(h_error_codes, soap->errnum); - if (!msg) -#endif - { sprintf(soap->msgbuf, "TCP/UDP IP error %d", soap->errnum); - msg = soap->msgbuf; - } - } - } - return msg; -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_NOHTTP -#ifndef PALM_1 -static const char* -http_error(struct soap *soap, int status) -{ register const char *msg = SOAP_STR_EOS; -#ifndef WITH_LEAN - msg = soap_str_code(h_http_error_codes, status); - if (!msg) - msg = SOAP_STR_EOS; -#endif - return msg; -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_IPV6 -#ifndef WITH_NOIO -#ifndef PALM_1 -static int -tcp_gethost(struct soap *soap, const char *addr, struct in_addr *inaddr) -{ soap_int32 iadd = -1; - struct hostent hostent, *host = &hostent; -#ifdef VXWORKS - int hostint; - char *addrcopy = (char*)SOAP_MALLOC(soap, strlen(addr) + 1); /*copy of addr. */ - /* inet_addr(), and hostGetByName() expect "char *"; addr is a "const char *". */ - strncpy(addrcopy, addr, strlen(addr)+1); - iadd = inet_addr(addrcopy); -#else -#if defined(_AIXVERSION_431) || defined(TRU64) - struct hostent_data ht_data; -#endif - iadd = inet_addr(addr); -#endif - if (iadd != -1) - { memcpy(inaddr, &iadd, sizeof(iadd)); -#ifdef VXWORKS - SOAP_FREE(soap, addrcopy); -#endif - return SOAP_OK; - } -#if defined(__GLIBC__) - if (gethostbyname_r(addr, &hostent, soap->buf, SOAP_BUFLEN, &host, &soap->errnum) < 0) - host = NULL; -#elif defined(_AIXVERSION_431) || defined(TRU64) - memset((void*)&ht_data, 0, sizeof(ht_data)); - if (gethostbyname_r(addr, &hostent, &ht_data) < 0) - { host = NULL; - soap->errnum = h_errno; - } -#elif defined(HAVE_GETHOSTBYNAME_R) - host = gethostbyname_r(addr, &hostent, soap->buf, SOAP_BUFLEN, &soap->errnum); -#elif defined(VXWORKS) - /* If the DNS resolver library resolvLib has been configured in the vxWorks - * image, a query for the host IP address is sent to the DNS server, if the - * name was not found in the local host table. */ - hostint = hostGetByName(addrcopy); - if (hostint == ERROR) - { host = NULL; - soap->errnum = soap_errno; - } - SOAP_FREE(soap, addrcopy); /*free() is placed after the error checking to assure that - * errno captured is that from hostGetByName() */ -#else - if (!(host = gethostbyname(addr))) - soap->errnum = h_errno; -#endif - if (!host) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Host name not found\n")); - return SOAP_ERR; - } -#ifdef VXWORKS - inaddr->s_addr = hostint; -#else - memcpy(inaddr, host->h_addr, host->h_length); -#endif - return SOAP_OK; -} -#endif -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_NOIO -#ifndef PALM_1 -static int -tcp_connect(struct soap *soap, const char *endpoint, const char *host, int port) -{ -#ifdef WITH_IPV6 - struct addrinfo hints, *res, *ressave; - int err; -#endif - register int fd; -#ifndef WITH_LEAN - int len = SOAP_BUFLEN; - int set = 1; -#endif - if (soap_valid_socket(soap->socket)) - soap->fclosesocket(soap, (SOAP_SOCKET)soap->socket); - soap->socket = SOAP_INVALID_SOCKET; - if (tcp_init(soap)) - { soap->errnum = 0; - soap_set_sender_error(soap, tcp_error(soap), "TCP init failed in tcp_connect()", SOAP_TCP_ERROR); - return SOAP_INVALID_SOCKET; - } - soap->errmode = 0; -#ifdef WITH_IPV6 - memset((void*)&hints, 0, sizeof(hints)); - hints.ai_family = PF_UNSPEC; -#ifdef WITH_UDP - if ((soap->omode & SOAP_IO_UDP)) - hints.ai_socktype = SOCK_DGRAM; - else -#endif - hints.ai_socktype = SOCK_STREAM; - soap->errmode = 2; - if (soap->proxy_host) - err = getaddrinfo(soap->proxy_host, soap_int2s(soap, soap->proxy_port), &hints, &res); - else - err = getaddrinfo(host, soap_int2s(soap, port), &hints, &res); - if (err) - { soap_set_sender_error(soap, gai_strerror(err), "getaddrinfo failed in tcp_connect()", SOAP_TCP_ERROR); - return SOAP_INVALID_SOCKET; - } - ressave = res; -again: - fd = (int)socket(res->ai_family, res->ai_socktype, res->ai_protocol); - soap->errmode = 0; -#else -#ifdef WITH_UDP - if ((soap->omode & SOAP_IO_UDP)) - fd = (int)socket(AF_INET, SOCK_DGRAM, 0); - else -#endif - fd = (int)socket(AF_INET, SOCK_STREAM, 0); -#endif - if (fd < 0) - { soap->errnum = soap_socket_errno; - soap_set_sender_error(soap, tcp_error(soap), "socket failed in tcp_connect()", SOAP_TCP_ERROR); - return SOAP_INVALID_SOCKET; - } -#ifdef SOCKET_CLOSE_ON_EXEC -#ifdef WIN32 -#ifndef UNDER_CE - SetHandleInformation((HANDLE)fd, HANDLE_FLAG_INHERIT, 0); -#endif -#else - fcntl(fd, F_SETFD, 1); -#endif -#endif -#ifndef WITH_LEAN - if (soap->connect_flags & SO_LINGER) - { struct linger linger; - memset((void*)&linger, 0, sizeof(linger)); - linger.l_onoff = 1; - linger.l_linger = 0; - if (setsockopt((SOAP_SOCKET)fd, SOL_SOCKET, SO_LINGER, (char*)&linger, sizeof(struct linger))) - { soap->errnum = soap_socket_errno; - soap_set_sender_error(soap, tcp_error(soap), "setsockopt SO_LINGER failed in tcp_connect()", SOAP_TCP_ERROR); - soap->fclosesocket(soap, (SOAP_SOCKET)fd); - return SOAP_INVALID_SOCKET; - } - } - if ((soap->connect_flags & ~SO_LINGER) && setsockopt((SOAP_SOCKET)fd, SOL_SOCKET, soap->connect_flags & ~SO_LINGER, (char*)&set, sizeof(int))) - { soap->errnum = soap_socket_errno; - soap_set_sender_error(soap, tcp_error(soap), "setsockopt failed in tcp_connect()", SOAP_TCP_ERROR); - soap->fclosesocket(soap, (SOAP_SOCKET)fd); - return SOAP_INVALID_SOCKET; - } - if (soap->keep_alive && setsockopt((SOAP_SOCKET)fd, SOL_SOCKET, SO_KEEPALIVE, (char*)&set, sizeof(int))) - { soap->errnum = soap_socket_errno; - soap_set_sender_error(soap, tcp_error(soap), "setsockopt SO_KEEPALIVE failed in tcp_connect()", SOAP_TCP_ERROR); - soap->fclosesocket(soap, (SOAP_SOCKET)fd); - return SOAP_INVALID_SOCKET; - } - if (setsockopt((SOAP_SOCKET)fd, SOL_SOCKET, SO_SNDBUF, (char*)&len, sizeof(int))) - { soap->errnum = soap_socket_errno; - soap_set_sender_error(soap, tcp_error(soap), "setsockopt SO_SNDBUF failed in tcp_connect()", SOAP_TCP_ERROR); - soap->fclosesocket(soap, (SOAP_SOCKET)fd); - return SOAP_INVALID_SOCKET; - } - if (setsockopt((SOAP_SOCKET)fd, SOL_SOCKET, SO_RCVBUF, (char*)&len, sizeof(int))) - { soap->errnum = soap_socket_errno; - soap_set_sender_error(soap, tcp_error(soap), "setsockopt SO_RCVBUF failed in tcp_connect()", SOAP_TCP_ERROR); - soap->fclosesocket(soap, (SOAP_SOCKET)fd); - return SOAP_INVALID_SOCKET; - } -#ifdef TCP_NODELAY - if (!(soap->omode & SOAP_IO_UDP) && setsockopt((SOAP_SOCKET)fd, IPPROTO_TCP, TCP_NODELAY, (char*)&set, sizeof(int))) - { soap->errnum = soap_socket_errno; - soap_set_sender_error(soap, tcp_error(soap), "setsockopt TCP_NODELAY failed in tcp_connect()", SOAP_TCP_ERROR); - soap->fclosesocket(soap, (SOAP_SOCKET)fd); - return SOAP_INVALID_SOCKET; - } -#endif -#endif - DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Opening socket %d to host='%s' port=%d\n", fd, host, port)); -#ifndef WITH_IPV6 - soap->peerlen = sizeof(soap->peer); - memset((void*)&soap->peer, 0, sizeof(soap->peer)); - soap->peer.sin_family = AF_INET; - soap->errmode = 2; - if (soap->proxy_host) - { if (soap->fresolve(soap, soap->proxy_host, &soap->peer.sin_addr)) - { soap_set_sender_error(soap, tcp_error(soap), "get proxy host by name failed in tcp_connect()", SOAP_TCP_ERROR); - soap->fclosesocket(soap, (SOAP_SOCKET)fd); - return SOAP_INVALID_SOCKET; - } - soap->peer.sin_port = htons((short)soap->proxy_port); - } - else - { if (soap->fresolve(soap, host, &soap->peer.sin_addr)) - { soap_set_sender_error(soap, tcp_error(soap), "get host by name failed in tcp_connect()", SOAP_TCP_ERROR); - soap->fclosesocket(soap, (SOAP_SOCKET)fd); - return SOAP_INVALID_SOCKET; - } - soap->peer.sin_port = htons((short)port); - } - soap->errmode = 0; - if ((soap->omode & SOAP_IO_UDP)) - return fd; -#endif -#ifndef WITH_LEAN - if (soap->connect_timeout) -#if defined(WIN32) - { u_long nonblocking = 1; - ioctlsocket((SOAP_SOCKET)fd, FIONBIO, &nonblocking); - } -#elif defined(VXWORKS) - { vx_nonblocking = TRUE; - ioctl((SOAP_SOCKET)fd, FIONBIO, (int)(&vx_nonblocking)); /* modified to use fd */ - } -#else - fcntl((SOAP_SOCKET)fd, F_SETFL, fcntl((SOAP_SOCKET)fd, F_GETFL)|O_NONBLOCK); -#endif - else -#if defined(WIN32) - { u_long blocking = 0; - ioctlsocket((SOAP_SOCKET)fd, FIONBIO, &blocking); - } -#elif defined(VXWORKS) - { vx_nonblocking = FALSE; - ioctl((SOAP_SOCKET)fd, FIONBIO, (int)(&vx_nonblocking)); /* modified to use fd */ - } -#else - fcntl((SOAP_SOCKET)fd, F_SETFL, fcntl((SOAP_SOCKET)fd, F_GETFL)&~O_NONBLOCK); -#endif -#endif - for (;;) - { -#ifdef WITH_IPV6 - if (connect((SOAP_SOCKET)fd, res->ai_addr, res->ai_addrlen)) -#else - if (connect((SOAP_SOCKET)fd, (struct sockaddr*)&soap->peer, sizeof(soap->peer))) -#endif - { -#ifndef WITH_LEAN - if (soap->connect_timeout && (soap_socket_errno == SOAP_EINPROGRESS || soap_socket_errno == SOAP_EWOULDBLOCK)) - { struct timeval timeout; - SOAP_SOCKLEN_T k; - fd_set fds; - if (soap->connect_timeout > 0) - { timeout.tv_sec = soap->connect_timeout; - timeout.tv_usec = 0; - } - else - { timeout.tv_sec = -soap->connect_timeout/1000000; - timeout.tv_usec = -soap->connect_timeout%1000000; - } - FD_ZERO(&fds); - FD_SET((SOAP_SOCKET)fd, &fds); - for (;;) - { int r = select((SOAP_SOCKET)(fd + 1), NULL, &fds, NULL, &timeout); - if (r > 0) - break; - if (!r) - { soap->errnum = 0; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Connect timeout\n")); - soap_set_sender_error(soap, "Timeout", "connect failed in tcp_connect()", SOAP_TCP_ERROR); - soap->fclosesocket(soap, (SOAP_SOCKET)fd); - return SOAP_INVALID_SOCKET; - } - if (soap_socket_errno != SOAP_EINTR) - { soap->errnum = soap_socket_errno; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Could not connect to host\n")); - soap_set_sender_error(soap, tcp_error(soap), "connect failed in tcp_connect()", SOAP_TCP_ERROR); - soap->fclosesocket(soap, (SOAP_SOCKET)fd); - return SOAP_INVALID_SOCKET; - } - } - k = (SOAP_SOCKLEN_T)sizeof(soap->errnum); - if (!getsockopt((SOAP_SOCKET)fd, SOL_SOCKET, SO_ERROR, (char*)&soap->errnum, &k) && !soap->errnum) /* portability note: see SOAP_SOCKLEN_T definition in stdsoap2.h */ - break; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Could not connect to host\n")); - soap->errnum = soap_socket_errno; - soap_set_sender_error(soap, tcp_error(soap), "connect failed in tcp_connect()", SOAP_TCP_ERROR); - soap->fclosesocket(soap, (SOAP_SOCKET)fd); - return SOAP_INVALID_SOCKET; - } - else -#endif -#ifdef WITH_IPV6 - if (res->ai_next) - { res = res->ai_next; - soap->fclosesocket(soap, (SOAP_SOCKET)fd); - goto again; - } - else -#endif - if (soap_socket_errno != SOAP_EINTR) - { soap->errnum = soap_socket_errno; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Could not connect to host\n")); - soap_set_sender_error(soap, tcp_error(soap), "connect failed in tcp_connect()", SOAP_TCP_ERROR); - soap->fclosesocket(soap, (SOAP_SOCKET)fd); - return SOAP_INVALID_SOCKET; - } - } - else - break; - } -#ifdef WITH_IPV6 - soap->peerlen = 0; /* IPv6: already connected so use send() */ - freeaddrinfo(ressave); -#endif -#ifndef WITH_LEAN - if (soap->connect_timeout) -#if defined(WIN32) - { u_long blocking = 0; - ioctlsocket((SOAP_SOCKET)fd, FIONBIO, &blocking); - } -#elif defined(VXWORKS) - { vx_nonblocking = FALSE; - ioctl((SOAP_SOCKET)fd, FIONBIO, (int)(&vx_nonblocking)); /* modified to use fd */ - } -#else - fcntl((SOAP_SOCKET)fd, F_SETFL, fcntl((SOAP_SOCKET)fd, F_GETFL)&~O_NONBLOCK); -#endif -#endif - soap->socket = fd; - soap->imode &= ~SOAP_ENC_SSL; - soap->omode &= ~SOAP_ENC_SSL; - if (!strncmp(endpoint, "https:", 6)) - { -#ifdef WITH_OPENSSL - BIO *bio; - int r; - if (soap->proxy_host) - { short v; - unsigned int k = soap->omode; /* make sure we only parse HTTP */ - size_t n = soap->count; /* save the content length */ - soap->omode &= ~SOAP_ENC; /* mask IO and ENC */ - soap->omode |= SOAP_IO_BUFFER; - soap_begin_send(soap); - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Connecting to proxy server\n")); - sprintf(soap->tmpbuf, "CONNECT %s:%d HTTP/%s", host, port, soap->http_version); - if ((soap->error = soap->fposthdr(soap, soap->tmpbuf, NULL))) - return SOAP_INVALID_SOCKET; -#ifndef WITH_LEAN - if (soap->proxy_userid && soap->proxy_passwd && strlen(soap->proxy_userid) + strlen(soap->proxy_passwd) < 761) - { sprintf(soap->tmpbuf + 262, "%s:%s", soap->proxy_userid, soap->proxy_passwd); - strcpy(soap->tmpbuf, "Basic "); - soap_s2base64(soap, (const unsigned char*)(soap->tmpbuf + 262), soap->tmpbuf + 6, strlen(soap->tmpbuf + 262)); - if ((soap->error = soap->fposthdr(soap, "Proxy-Authorization", soap->tmpbuf))) - return soap->error; - } -#endif - if ((soap->error = soap->fposthdr(soap, NULL, NULL)) - || soap_flush(soap)) - return SOAP_INVALID_SOCKET; - soap->omode = k; - k = soap->imode; - soap->imode &= ~SOAP_ENC; /* mask IO and ENC */ - v = soap->version; /* preserve */ - if (soap_begin_recv(soap)) - return SOAP_INVALID_SOCKET; - soap->version = v; /* restore */ - soap->imode = k; /* restore */ - soap->count = n; /* restore */ - soap_begin_send(soap); - } - if (!soap->ctx && (soap->error = soap->fsslauth(soap))) - { soap_set_sender_error(soap, "SSL error", "SSL authentication failed in tcp_connect(): check password, key file, and ca file.", SOAP_SSL_ERROR); - return SOAP_INVALID_SOCKET; - } - soap->ssl = SSL_new(soap->ctx); - if (!soap->ssl) - { soap->error = SOAP_SSL_ERROR; - return SOAP_INVALID_SOCKET; - } - if (soap->session) - { if (!strcmp(soap->session_host, host) && soap->session_port == port) - SSL_set_session(soap->ssl, soap->session); - SSL_SESSION_free(soap->session); - soap->session = NULL; - } - soap->imode |= SOAP_ENC_SSL; - soap->omode |= SOAP_ENC_SSL; - bio = BIO_new_socket((SOAP_SOCKET)fd, BIO_NOCLOSE); - SSL_set_bio(soap->ssl, bio, bio); -#ifndef WITH_LEAN - if (soap->connect_timeout) -#ifdef WIN32 - { u_long nonblocking = 1; - ioctlsocket((SOAP_SOCKET)fd, FIONBIO, &nonblocking); - } -#else - fcntl((SOAP_SOCKET)fd, F_SETFL, fcntl((SOAP_SOCKET)fd, F_GETFL)|O_NONBLOCK); -#endif -#endif - for (;;) - { if ((r = SSL_connect(soap->ssl)) <= 0) - { int err = SSL_get_error(soap->ssl, r); - if (err != SSL_ERROR_NONE && err != SSL_ERROR_WANT_READ && err != SSL_ERROR_WANT_WRITE) - { soap_set_sender_error(soap, ssl_error(soap, r), "SSL connect failed in tcp_connect()", SOAP_SSL_ERROR); - return SOAP_INVALID_SOCKET; - } - if (soap->connect_timeout) - { struct timeval timeout; - fd_set fds; - if (soap->connect_timeout > 0) - { timeout.tv_sec = soap->connect_timeout; - timeout.tv_usec = 0; - } - else - { timeout.tv_sec = -soap->connect_timeout/1000000; - timeout.tv_usec = -soap->connect_timeout%1000000; - } - FD_ZERO(&fds); - FD_SET((SOAP_SOCKET)soap->socket, &fds); - for (;;) - { int r = select((SOAP_SOCKET)(soap->socket + 1), &fds, NULL, &fds, &timeout); - if (r > 0) - break; - if (!r) - { soap->errnum = 0; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Connect timeout\n")); - soap_set_sender_error(soap, "Timeout", "connect failed in tcp_connect()", SOAP_TCP_ERROR); - return SOAP_INVALID_SOCKET; - } - } - continue; - } - } - break; - } -#ifndef WITH_LEAN - if (soap->connect_timeout) -#ifdef WIN32 - { u_long blocking = 0; - ioctlsocket((SOAP_SOCKET)fd, FIONBIO, &blocking); - } -#else - fcntl((SOAP_SOCKET)fd, F_SETFL, fcntl((SOAP_SOCKET)fd, F_GETFL)&~O_NONBLOCK); -#endif -#endif - if (soap->require_server_auth) - { X509 *peer; - int err; - if ((err = SSL_get_verify_result(soap->ssl)) != X509_V_OK) - { soap_set_sender_error(soap, X509_verify_cert_error_string(err), "SSL certificate presented by peer cannot be verified in tcp_connect()", SOAP_SSL_ERROR); - return SOAP_INVALID_SOCKET; - } - peer = SSL_get_peer_certificate(soap->ssl); - if (!peer) - { soap_set_sender_error(soap, "SSL error", "No SSL certificate was presented by the peer in tcp_connect()", SOAP_SSL_ERROR); - return SOAP_INVALID_SOCKET; - } - X509_NAME_get_text_by_NID(X509_get_subject_name(peer), NID_commonName, soap->msgbuf, sizeof(soap->msgbuf)); - X509_free(peer); - if (soap_tag_cmp(soap->msgbuf, host)) - { soap_set_sender_error(soap, "SSL error", "SSL certificate host name mismatch in tcp_connect()", SOAP_SSL_ERROR); - return SOAP_INVALID_SOCKET; - } - } -#else - soap->error = SOAP_SSL_ERROR; - return SOAP_INVALID_SOCKET; -#endif - } - return fd; -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_NOIO -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_bind(struct soap *soap, const char *host, int port, int backlog) -{ -#ifdef WITH_IPV6 - struct addrinfo *addrinfo; - struct addrinfo hints; - struct addrinfo res; - int err; -#endif -#ifndef WITH_LEAN - int len = SOAP_BUFLEN; - int set = 1; -#endif - if (soap_valid_socket(soap->master)) - { soap->fclosesocket(soap, (SOAP_SOCKET)soap->master); - soap->master = SOAP_INVALID_SOCKET; - } - soap->socket = SOAP_INVALID_SOCKET; - soap->errmode = 1; - if (tcp_init(soap)) - { soap_set_receiver_error(soap, tcp_error(soap), "TCP init failed in soap_bind()", SOAP_TCP_ERROR); - return SOAP_INVALID_SOCKET; - } -#ifdef WITH_IPV6 - memset((void*)&hints, 0, sizeof(hints)); - hints.ai_family = PF_UNSPEC; -#ifdef WITH_UDP - if ((soap->omode & SOAP_IO_UDP)) - hints.ai_socktype = SOCK_DGRAM; - else -#endif - hints.ai_socktype = SOCK_STREAM; - hints.ai_flags = AI_PASSIVE; - soap->errmode = 2; - err = getaddrinfo(host, soap_int2s(soap, port), &hints, &addrinfo); - if (addrinfo) - { res = *addrinfo; - soap->peer = *((struct sockaddr_storage*)addrinfo->ai_addr); - soap->peerlen = addrinfo->ai_addrlen; - res.ai_addr = (struct sockaddr*)&soap->peer; - res.ai_addrlen = soap->peerlen; - freeaddrinfo(addrinfo); - } - if (err) - { soap_set_receiver_error(soap, gai_strerror(err), "getaddrinfo failed in soap_bind()", SOAP_TCP_ERROR); - return SOAP_INVALID_SOCKET; - } - soap->master = socket(res.ai_family, res.ai_socktype, res.ai_protocol); -#else -#ifdef WITH_UDP - if ((soap->omode & SOAP_IO_UDP)) - soap->master = (int)socket(AF_INET, SOCK_DGRAM, 0); - else -#endif - soap->master = (int)socket(AF_INET, SOCK_STREAM, 0); -#endif - soap->errmode = 0; - if (!soap_valid_socket(soap->master)) - { soap->errnum = soap_socket_errno; - soap_set_receiver_error(soap, tcp_error(soap), "socket failed in soap_bind()", SOAP_TCP_ERROR); - return SOAP_INVALID_SOCKET; - } -#ifdef WITH_UDP - if ((soap->omode & SOAP_IO_UDP)) - soap->socket = soap->master; -#endif -#ifdef SOCKET_CLOSE_ON_EXEC -#ifdef WIN32 -#ifndef UNDER_CE - SetHandleInformation((HANDLE)soap->master, HANDLE_FLAG_INHERIT, 0); -#endif -#else - fcntl(soap->master, F_SETFD, 1); -#endif -#endif -#ifndef WITH_LEAN - if (soap->bind_flags && setsockopt((SOAP_SOCKET)soap->master, SOL_SOCKET, soap->bind_flags, (char*)&set, sizeof(int))) - { soap->errnum = soap_socket_errno; - soap_set_receiver_error(soap, tcp_error(soap), "setsockopt failed in soap_bind()", SOAP_TCP_ERROR); - return SOAP_INVALID_SOCKET; - } - if (((soap->imode | soap->omode) & SOAP_IO_KEEPALIVE) && setsockopt((SOAP_SOCKET)soap->master, SOL_SOCKET, SO_KEEPALIVE, (char*)&set, sizeof(int))) - { soap->errnum = soap_socket_errno; - soap_set_receiver_error(soap, tcp_error(soap), "setsockopt SO_KEEPALIVE failed in soap_bind()", SOAP_TCP_ERROR); - return SOAP_INVALID_SOCKET; - } - if (setsockopt((SOAP_SOCKET)soap->master, SOL_SOCKET, SO_SNDBUF, (char*)&len, sizeof(int))) - { soap->errnum = soap_socket_errno; - soap_set_receiver_error(soap, tcp_error(soap), "setsockopt SO_SNDBUF failed in soap_bind()", SOAP_TCP_ERROR); - return SOAP_INVALID_SOCKET; - } - if (setsockopt((SOAP_SOCKET)soap->master, SOL_SOCKET, SO_RCVBUF, (char*)&len, sizeof(int))) - { soap->errnum = soap_socket_errno; - soap_set_receiver_error(soap, tcp_error(soap), "setsockopt SO_RCVBUF failed in soap_bind()", SOAP_TCP_ERROR); - return SOAP_INVALID_SOCKET; - } -#ifdef TCP_NODELAY - if (!(soap->omode & SOAP_IO_UDP) && setsockopt((SOAP_SOCKET)soap->master, IPPROTO_TCP, TCP_NODELAY, (char*)&set, sizeof(int))) - { soap->errnum = soap_socket_errno; - soap_set_receiver_error(soap, tcp_error(soap), "setsockopt TCP_NODELAY failed in soap_bind()", SOAP_TCP_ERROR); - return SOAP_INVALID_SOCKET; - } -#endif -#endif -#ifdef WITH_IPV6 - soap->errmode = 0; - if (bind((SOAP_SOCKET)soap->master, res.ai_addr, res.ai_addrlen)) - { soap->errnum = soap_socket_errno; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Could not bind to host\n")); - soap_closesock(soap); - soap_set_receiver_error(soap, tcp_error(soap), "bind failed in soap_bind()", SOAP_TCP_ERROR); - return SOAP_INVALID_SOCKET; - } -#else - soap->peerlen = sizeof(soap->peer); - memset((void*)&soap->peer, 0, sizeof(soap->peer)); - soap->peer.sin_family = AF_INET; - soap->errmode = 2; - if (host) - { if (soap->fresolve(soap, host, &soap->peer.sin_addr)) - { soap_set_receiver_error(soap, tcp_error(soap), "get host by name failed in soap_bind()", SOAP_TCP_ERROR); - return SOAP_INVALID_SOCKET; - } - } - else - soap->peer.sin_addr.s_addr = htonl(INADDR_ANY); - soap->peer.sin_port = htons((short)port); - soap->errmode = 0; - if (bind((SOAP_SOCKET)soap->master, (struct sockaddr*)&soap->peer, soap->peerlen)) - { soap->errnum = soap_socket_errno; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Could not bind to host\n")); - soap_closesock(soap); - soap_set_receiver_error(soap, tcp_error(soap), "bind failed in soap_bind()", SOAP_TCP_ERROR); - return SOAP_INVALID_SOCKET; - } -#endif - if (!(soap->omode & SOAP_IO_UDP) && listen((SOAP_SOCKET)soap->master, backlog)) - { soap->errnum = soap_socket_errno; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Could not bind to host\n")); - soap_closesock(soap); - soap_set_receiver_error(soap, tcp_error(soap), "listen failed in soap_bind()", SOAP_TCP_ERROR); - return SOAP_INVALID_SOCKET; - } - return soap->master; -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_NOIO -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_poll(struct soap *soap) -{ -#ifndef WITH_LEAN - struct timeval timeout; - fd_set rfd, sfd, xfd; - int r; - timeout.tv_sec = 0; - timeout.tv_usec = 0; - FD_ZERO(&rfd); - FD_ZERO(&sfd); - FD_ZERO(&xfd); - if (soap_valid_socket(soap->socket)) - { FD_SET((SOAP_SOCKET)soap->socket, &rfd); - FD_SET((SOAP_SOCKET)soap->socket, &sfd); - FD_SET((SOAP_SOCKET)soap->socket, &xfd); - r = select((SOAP_SOCKET)(soap->socket + 1), &rfd, &sfd, &xfd, &timeout); - if (r > 0 && FD_ISSET((SOAP_SOCKET)soap->socket, &xfd)) - r = -1; - } - else if (soap_valid_socket(soap->master)) - { FD_SET((SOAP_SOCKET)soap->master, &sfd); - r = select((SOAP_SOCKET)(soap->master + 1), NULL, &sfd, NULL, &timeout); - } - else - return SOAP_OK; - if (r > 0) - { if (soap_valid_socket(soap->socket) - && FD_ISSET((SOAP_SOCKET)soap->socket, &sfd) - && (!FD_ISSET((SOAP_SOCKET)soap->socket, &rfd) - || recv((SOAP_SOCKET)soap->socket, soap->tmpbuf, 1, MSG_PEEK) > 0)) - return SOAP_OK; - } - else if (r < 0) - { soap->errnum = soap_socket_errno; - if ((soap_valid_socket(soap->master) || soap_valid_socket(soap->socket)) && soap_socket_errno != SOAP_EINTR) - { soap_set_receiver_error(soap, tcp_error(soap), "select failed in soap_poll()", SOAP_TCP_ERROR); - return soap->error = SOAP_TCP_ERROR; - } - } - else - soap->errnum = 0; - DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Polling: other end down on socket=%d select=%d\n", soap->socket, r)); - return SOAP_EOF; -#else - return SOAP_OK; -#endif -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_NOIO -#ifndef PALM_1 -static int -tcp_accept(struct soap *soap, int s, struct sockaddr *a, int *n) -{ int fd; - fd = (int)accept((SOAP_SOCKET)s, a, (SOAP_SOCKLEN_T*)n); /* portability note: see SOAP_SOCKLEN_T definition in stdsoap2.h */ -#ifdef SOCKET_CLOSE_ON_EXEC -#ifdef WIN32 -#ifndef UNDER_CE - SetHandleInformation((HANDLE)fd, HANDLE_FLAG_INHERIT, 0); -#endif -#else - fcntl(fd, F_SETFD, FD_CLOEXEC); -#endif -#endif - return fd; -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_NOIO -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_accept(struct soap *soap) -{ int n = (int)sizeof(soap->peer); -#ifndef WITH_LEAN - int len = SOAP_BUFLEN; - int set = 1; -#endif - soap->error = SOAP_OK; -#ifdef WITH_UDP - if ((soap->omode & SOAP_IO_UDP)) - return soap->socket = soap->master; -#endif - memset((void*)&soap->peer, 0, sizeof(soap->peer)); - soap->socket = SOAP_INVALID_SOCKET; - soap->errmode = 0; - soap->keep_alive = 0; - if (soap_valid_socket(soap->master)) - { for (;;) - { -#ifndef WITH_LEAN - if (soap->accept_timeout) - { struct timeval timeout; - fd_set fd; - if (soap->accept_timeout > 0) - { timeout.tv_sec = soap->accept_timeout; - timeout.tv_usec = 0; - } - else - { timeout.tv_sec = -soap->accept_timeout/1000000; - timeout.tv_usec = -soap->accept_timeout%1000000; - } - FD_ZERO(&fd); - FD_SET((SOAP_SOCKET)soap->master, &fd); - for (;;) - { int r = select((SOAP_SOCKET)(soap->master + 1), &fd, &fd, NULL, &timeout); - if (r > 0) - break; - if (!r) - { soap->errnum = 0; - soap_set_receiver_error(soap, "Timeout", "accept failed in soap_accept()", SOAP_TCP_ERROR); - return SOAP_INVALID_SOCKET; - } - if (soap_socket_errno != SOAP_EINTR) - { soap->errnum = soap_socket_errno; - soap_closesock(soap); - soap_set_sender_error(soap, tcp_error(soap), "accept failed in soap_accept()", SOAP_TCP_ERROR); - return SOAP_INVALID_SOCKET; - } - } -#if defined(WIN32) - { u_long nonblocking = 1; - ioctlsocket((SOAP_SOCKET)soap->master, FIONBIO, &nonblocking); - } -#elif defined(VXWORKS) - { vx_nonblocking = TRUE; - ioctl((SOAP_SOCKET)soap->master, FIONBIO, (int)(&vx_nonblocking)); - } -#else - fcntl((SOAP_SOCKET)soap->master, F_SETFL, fcntl((SOAP_SOCKET)soap->master, F_GETFL)|O_NONBLOCK); -#endif - } - else -#if defined(WIN32) - { u_long blocking = 0; - ioctlsocket((SOAP_SOCKET)soap->master, FIONBIO, &blocking); - } -#elif defined(VXWORKS) - { vx_nonblocking = FALSE; - ioctl((SOAP_SOCKET)soap->master, FIONBIO, (int)(&vx_nonblocking)); - } -#else - fcntl((SOAP_SOCKET)soap->master, F_SETFL, fcntl((SOAP_SOCKET)soap->master, F_GETFL)&~O_NONBLOCK); -#endif -#endif - soap->socket = soap->faccept(soap, soap->master, (struct sockaddr*)&soap->peer, &n); - soap->peerlen = (size_t)n; - if (soap_valid_socket(soap->socket)) - { -#ifdef WITH_IPV6 -/* Use soap->host to store the numeric form of the remote host */ - getnameinfo((struct sockaddr*)&soap->peer, n, soap->host, sizeof(soap->host), NULL, 0, NI_NUMERICHOST | NI_NUMERICSERV); - DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Accept socket %d from %s\n", soap->socket, soap->host)); - soap->ip = 0; /* info stored in soap->peer and soap->host */ - soap->port = 0; /* info stored in soap->peer and soap->host */ -#else - soap->ip = ntohl(soap->peer.sin_addr.s_addr); - soap->port = (int)ntohs(soap->peer.sin_port); /* does not return port number on some systems */ - DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Accept socket %d at port %d from IP %d.%d.%d.%d\n", soap->socket, soap->port, (int)(soap->ip>>24)&0xFF, (int)(soap->ip>>16)&0xFF, (int)(soap->ip>>8)&0xFF, (int)soap->ip&0xFF)); -#endif -#ifndef WITH_LEAN - if (soap->accept_flags & SO_LINGER) - { struct linger linger; - memset((void*)&linger, 0, sizeof(linger)); - linger.l_onoff = 1; - linger.l_linger = 0; - if (setsockopt((SOAP_SOCKET)soap->socket, SOL_SOCKET, SO_LINGER, (char*)&linger, sizeof(struct linger))) - { soap->errnum = soap_socket_errno; - soap_set_receiver_error(soap, tcp_error(soap), "setsockopt SO_LINGER failed in soap_accept()", SOAP_TCP_ERROR); - soap_closesock(soap); - return SOAP_INVALID_SOCKET; - } - } - if ((soap->accept_flags & ~SO_LINGER) && setsockopt((SOAP_SOCKET)soap->socket, SOL_SOCKET, soap->accept_flags & ~SO_LINGER, (char*)&set, sizeof(int))) - { soap->errnum = soap_socket_errno; - soap_set_receiver_error(soap, tcp_error(soap), "setsockopt failed in soap_accept()", SOAP_TCP_ERROR); - soap_closesock(soap); - return SOAP_INVALID_SOCKET; - } - if (((soap->imode | soap->omode) & SOAP_IO_KEEPALIVE) && setsockopt((SOAP_SOCKET)soap->socket, SOL_SOCKET, SO_KEEPALIVE, (char*)&set, sizeof(int))) - { soap->errnum = soap_socket_errno; - soap_set_receiver_error(soap, tcp_error(soap), "setsockopt SO_KEEPALIVE failed in soap_accept()", SOAP_TCP_ERROR); - soap_closesock(soap); - return SOAP_INVALID_SOCKET; - } - if (setsockopt((SOAP_SOCKET)soap->socket, SOL_SOCKET, SO_SNDBUF, (char*)&len, sizeof(int))) - { soap->errnum = soap_socket_errno; - soap_set_receiver_error(soap, tcp_error(soap), "setsockopt SO_SNDBUF failed in soap_accept()", SOAP_TCP_ERROR); - soap_closesock(soap); - return SOAP_INVALID_SOCKET; - } - if (setsockopt((SOAP_SOCKET)soap->socket, SOL_SOCKET, SO_RCVBUF, (char*)&len, sizeof(int))) - { soap->errnum = soap_socket_errno; - soap_set_receiver_error(soap, tcp_error(soap), "setsockopt SO_RCVBUF failed in soap_accept()", SOAP_TCP_ERROR); - soap_closesock(soap); - return SOAP_INVALID_SOCKET; - } -#ifdef TCP_NODELAY - if (!(soap->omode & SOAP_IO_UDP) && setsockopt((SOAP_SOCKET)soap->socket, IPPROTO_TCP, TCP_NODELAY, (char*)&set, sizeof(int))) - { soap->errnum = soap_socket_errno; - soap_set_receiver_error(soap, tcp_error(soap), "setsockopt TCP_NODELAY failed in soap_accept()", SOAP_TCP_ERROR); - soap_closesock(soap); - return SOAP_INVALID_SOCKET; - } -#endif -#endif - if (soap->accept_timeout) - { -#if defined(WIN32) - u_long blocking = 0; - ioctlsocket((SOAP_SOCKET)soap->master, FIONBIO, &blocking); - ioctlsocket((SOAP_SOCKET)soap->socket, FIONBIO, &blocking); -#elif defined(VXWORKS) - vx_nonblocking = FALSE; - ioctl((SOAP_SOCKET)soap->master, FIONBIO, (int)(&vx_nonblocking)); - ioctl((SOAP_SOCKET)soap->socket, FIONBIO, (int)(&vx_nonblocking)); -#elif defined(PALM) - fcntl((SOAP_SOCKET)soap->master, F_SETFL, fcntl((SOAP_SOCKET)soap->master, F_GETFL,0)&~O_NONBLOCK); - fcntl((SOAP_SOCKET)soap->socket, F_SETFL, fcntl((SOAP_SOCKET)soap->socket, F_GETFL,0)&~O_NONBLOCK); -#elif defined(SYMBIAN) - long blocking = 0; - ioctl((SOAP_SOCKET)soap->master, 0/*FIONBIO*/, &blocking); -#else - fcntl((SOAP_SOCKET)soap->master, F_SETFL, fcntl((SOAP_SOCKET)soap->master, F_GETFL)&~O_NONBLOCK); - fcntl((SOAP_SOCKET)soap->socket, F_SETFL, fcntl((SOAP_SOCKET)soap->socket, F_GETFL)&~O_NONBLOCK); -#endif - } - soap->keep_alive = (((soap->imode | soap->omode) & SOAP_IO_KEEPALIVE) != 0); - return soap->socket; - } - if (soap_socket_errno != SOAP_EINTR && soap_socket_errno != SOAP_EAGAIN) - { DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Accept failed from %s\n", soap->host)); - soap->errnum = soap_socket_errno; - soap_set_receiver_error(soap, tcp_error(soap), "accept failed in soap_accept()", SOAP_TCP_ERROR); - soap_closesock(soap); - return SOAP_INVALID_SOCKET; - } - } - } - else - { soap->errnum = 0; - soap_set_receiver_error(soap, tcp_error(soap), "no master socket in soap_accept()", SOAP_TCP_ERROR); - return SOAP_INVALID_SOCKET; - } -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_NOIO -#ifndef PALM_1 -static int -tcp_disconnect(struct soap *soap) -{ -#ifdef WITH_OPENSSL - if (soap->ssl) - { int r, s = 0; - if (soap->session) - SSL_SESSION_free(soap->session); - if (*soap->host) - { soap->session = SSL_get1_session(soap->ssl); - if (soap->session) - { strcpy(soap->session_host, soap->host); - soap->session_port = soap->port; - } - } - r = SSL_shutdown(soap->ssl); - if (r != 1) - { s = ERR_get_error(); - if (s) - { if (soap_valid_socket(soap->socket)) - { soap->fshutdownsocket(soap, (SOAP_SOCKET)soap->socket, 1); - soap->socket = SOAP_INVALID_SOCKET; - } - r = SSL_shutdown(soap->ssl); - } - } - DBGLOG(TEST, if (s) SOAP_MESSAGE(fdebug, "Shutdown failed: %d\n", SSL_get_error(soap->ssl, r))); - SSL_free(soap->ssl); - soap->ssl = NULL; - if (s) - return SOAP_SSL_ERROR; - ERR_remove_state(0); - } -#endif - if (soap_valid_socket(soap->socket) && !(soap->omode & SOAP_IO_UDP)) - { soap->fshutdownsocket(soap, (SOAP_SOCKET)soap->socket, 2); - soap->fclosesocket(soap, (SOAP_SOCKET)soap->socket); - soap->socket = SOAP_INVALID_SOCKET; - } - return SOAP_OK; -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_NOIO -#ifndef PALM_1 -static int -tcp_closesocket(struct soap *soap, SOAP_SOCKET fd) -{ DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Close socket %d\n", (int)fd)); - return closesocket(fd); -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_NOIO -#ifndef PALM_1 -static int -tcp_shutdownsocket(struct soap *soap, SOAP_SOCKET fd, int how) -{ DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Shutdown socket %d how=%d\n", (int)fd, how)); - return shutdown(fd, how); -} -#endif -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_closesock(struct soap *soap) -{ register int status = soap->error; - if (status == SOAP_EOF || status == SOAP_TCP_ERROR || status == SOAP_SSL_ERROR || !soap->keep_alive) - { if (soap->fclose && (soap->error = soap->fclose(soap))) - return soap->error; - soap->keep_alive = 0; - } -#ifdef WITH_ZLIB - if (soap->zlib_state == SOAP_ZLIB_DEFLATE) - deflateEnd(&soap->d_stream); - else if (soap->zlib_state == SOAP_ZLIB_INFLATE) - inflateEnd(&soap->d_stream); - soap->zlib_state = SOAP_ZLIB_NONE; -#endif - return soap->error = status; -} -#endif - -/******************************************************************************/ -#ifndef WITH_NOIDREF -#ifndef PALM_2 -SOAP_FMAC1 -size_t -SOAP_FMAC2 -soap_hash(register const char *s) -{ register size_t h = 0; - while (*s) - h = 65599*h + *s++; - return h % SOAP_IDHASH; -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_NOIDREF -#ifndef PALM_1 -static void -soap_init_pht(struct soap *soap) -{ register int i; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Initializing pointer hashtable\n")); - soap->pblk = NULL; - soap->pidx = 0; - for (i = 0; i < (int)SOAP_PTRHASH; i++) - soap->pht[i] = NULL; -} -#endif -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -struct soap* -SOAP_FMAC2 -soap_new1(soap_mode mode) -{ return soap_new2(mode, mode); -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -struct soap* -SOAP_FMAC2 -soap_new() -{ return soap_new2(SOAP_IO_DEFAULT, SOAP_IO_DEFAULT); -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -struct soap* -SOAP_FMAC2 -soap_new2(soap_mode imode, soap_mode omode) -{ struct soap *soap = (struct soap*)malloc(sizeof(struct soap)); - if (soap) - soap_init2(soap, imode, omode); - return soap; -} -#endif - -/******************************************************************************/ -#ifndef WITH_NOIDREF -#ifndef PALM_1 -static void -soap_free_pht(struct soap *soap) -{ register struct soap_pblk *pb, *next; - register int i; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Free pointer hashtable\n")); - for (pb = soap->pblk; pb; pb = next) - { next = pb->next; - SOAP_FREE(soap, pb); - } - soap->pblk = NULL; - soap->pidx = 0; - for (i = 0; i < (int)SOAP_PTRHASH; i++) - soap->pht[i] = NULL; -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_NOIDREF -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_embed(struct soap *soap, const void *p, const struct soap_array *a, int n, const char *tag, int type) -{ register int i; - struct soap_plist *pp; - if (soap->version != 1) - soap->encoding = 1; - if (a) - i = soap_array_pointer_lookup(soap, p, a, n, type, &pp); - else - i = soap_pointer_lookup(soap, p, type, &pp); - if (i) - { if (soap_is_embedded(soap, pp) - || soap_is_single(soap, pp)) - return 0; - soap_set_embedded(soap, pp); - } - return i; -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_NOIDREF -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_pointer_lookup(struct soap *soap, const void *p, int type, struct soap_plist **ppp) -{ register struct soap_plist *pp; - *ppp = NULL; - if (p) - { for (pp = soap->pht[soap_hash_ptr(p)]; pp; pp = pp->next) - { if (pp->ptr == p && pp->type == type) - { *ppp = pp; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Lookup location=%p type=%d id=%d\n", p, type, pp->id)); - return pp->id; - } - } - } - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Lookup location=%p type=%d: not found\n", p, type)); - return 0; -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_NOIDREF -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_pointer_enter(struct soap *soap, const void *p, const struct soap_array *a, int n, int type, struct soap_plist **ppp) -{ register int h; - register struct soap_plist *pp; - if (!soap->pblk || soap->pidx >= SOAP_PTRBLK) - { register struct soap_pblk *pb = (struct soap_pblk*)SOAP_MALLOC(soap, sizeof(struct soap_pblk)); - if (!pb) - { soap->error = SOAP_EOM; - return 0; - } - pb->next = soap->pblk; - soap->pblk = pb; - soap->pidx = 0; - } - *ppp = pp = &soap->pblk->plist[soap->pidx++]; - if (a) - h = soap_hash_ptr(a->__ptr); - else - h = soap_hash_ptr(p); - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Pointer enter location=%p array=%p size=%d dim=%d type=%d id=%d\n", p, a?a->__ptr:NULL, a?a->__size:0, n, type, soap->idnum+1)); - pp->next = soap->pht[h]; - pp->type = type; - pp->mark1 = 0; - pp->mark2 = 0; - pp->ptr = p; - pp->array = a; - soap->pht[h] = pp; - pp->id = ++soap->idnum; - return pp->id; -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_NOIDREF -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_array_pointer_lookup(struct soap *soap, const void *p, const struct soap_array *a, int n, int type, struct soap_plist **ppp) -{ register struct soap_plist *pp; - *ppp = NULL; - if (!p || !a->__ptr) - return 0; - for (pp = soap->pht[soap_hash_ptr(a->__ptr)]; pp; pp = pp->next) - { if (pp->type == type && pp->array && pp->array->__ptr == a->__ptr) - { register int i; - for (i = 0; i < n; i++) - if (((const int*)&pp->array->__size)[i] != ((const int*)&a->__size)[i]) - break; - if (i == n) - { *ppp = pp; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Array lookup location=%p type=%d id=%d\n", a->__ptr, type, pp->id)); - return pp->id; - } - } - } - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Array lookup location=%p type=%d: not found\n", a->__ptr, type)); - return 0; -} -#endif -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_begin_count(struct soap *soap) -{ soap_clr_attr(soap); - soap_set_local_namespaces(soap); -#ifndef WITH_LEANER - if ((soap->mode & SOAP_ENC_DIME) || (soap->omode & SOAP_ENC_DIME)) - soap->mode = soap->omode | SOAP_IO_LENGTH | SOAP_ENC_DIME; - else -#endif - { soap->mode = soap->omode; - if ((soap->mode & SOAP_IO) == SOAP_IO_STORE - || (((soap->mode & SOAP_IO) == SOAP_IO_CHUNK || (soap->mode & SOAP_ENC_XML)) -#ifndef WITH_LEANER - && !soap->fpreparesend -#endif - )) - soap->mode &= ~SOAP_IO_LENGTH; - else - soap->mode |= SOAP_IO_LENGTH; - } -#ifdef WITH_ZLIB - if ((soap->mode & SOAP_ENC_ZLIB) && (soap->mode & SOAP_IO) == SOAP_IO_FLUSH) - { if (!(soap->mode & SOAP_ENC_DIME)) - soap->mode &= ~SOAP_IO_LENGTH; - if (soap->mode & SOAP_ENC_XML) - soap->mode |= SOAP_IO_BUFFER; - else - soap->mode |= SOAP_IO_STORE; - } -#endif - if (!soap->encodingStyle && !(soap->mode & SOAP_XML_GRAPH)) - soap->mode |= SOAP_XML_TREE; -#ifndef WITH_LEANER - if ((soap->mode & SOAP_ENC_MTOM) && (soap->mode & SOAP_ENC_DIME)) - soap->mode |= SOAP_ENC_MIME; - else - soap->mode &= ~SOAP_ENC_MTOM; - if (soap->mode & SOAP_ENC_MIME) - soap_select_mime_boundary(soap); - soap->dime.list = soap->dime.last; /* keep track of last DIME attachment */ -#endif - soap->count = 0; - soap->ns = 0; - soap->null = 0; - soap->position = 0; - soap->mustUnderstand = 0; - soap->encoding = 0; - soap->part = SOAP_BEGIN; - soap->idnum = 0; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Begin count phase (socket=%d mode=0x%x count=%lu)\n", soap->socket, soap->mode, (unsigned long)soap->count)); -#ifndef WITH_LEANER - soap->dime.count = 0; /* count # of attachments */ - soap->dime.size = 0; /* accumulate total size of attachments */ - if (soap->fprepareinit && (soap->mode & SOAP_IO) != SOAP_IO_STORE) - return soap->error = soap->fprepareinit(soap); -#endif - return SOAP_OK; -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_end_count(struct soap *soap) -{ -#ifndef WITH_LEANER - if (soap->fpreparefinal) - return soap->error = soap->fpreparefinal(soap); -#endif - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "End of count phase\n")); - return SOAP_OK; -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_begin_send(struct soap *soap) -{ soap->error = SOAP_OK; - soap_clr_attr(soap); - soap_set_local_namespaces(soap); - soap->mode = soap->omode | (soap->mode & (SOAP_IO_LENGTH | SOAP_ENC_DIME)); -#ifdef WITH_ZLIB - if ((soap->mode & SOAP_ENC_ZLIB) && (soap->mode & SOAP_IO) == SOAP_IO_FLUSH) - { if (soap->mode & SOAP_ENC_XML) - soap->mode |= SOAP_IO_BUFFER; - else - soap->mode |= SOAP_IO_STORE; - } -#endif -#ifdef WITH_UDP - if ((soap->mode & SOAP_IO_UDP)) - { soap->mode |= SOAP_ENC_XML; - if (soap->count > SOAP_BUFLEN) - return soap->error = SOAP_UDP_ERROR; - } -#endif - if ((soap->mode & SOAP_IO) == SOAP_IO_FLUSH && soap_valid_socket(soap->socket)) - { if (soap->count || (soap->mode & SOAP_IO_LENGTH) || (soap->mode & SOAP_ENC_XML)) - soap->mode |= SOAP_IO_BUFFER; - else - soap->mode |= SOAP_IO_STORE; - } - soap->mode &= ~SOAP_IO_LENGTH; - if ((soap->mode & SOAP_IO) == SOAP_IO_STORE) - soap_new_block(soap); - if (!(soap->mode & SOAP_IO_KEEPALIVE)) - soap->keep_alive = 0; - if (!soap->encodingStyle && !(soap->mode & SOAP_XML_GRAPH)) - soap->mode |= SOAP_XML_TREE; -#ifndef WITH_LEANER - if ((soap->mode & SOAP_ENC_MTOM) && (soap->mode & SOAP_ENC_DIME)) - { soap->mode |= SOAP_ENC_MIME; - soap->mode &= ~SOAP_ENC_DIME; - } - else - soap->mode &= ~SOAP_ENC_MTOM; - if (soap->mode & SOAP_ENC_MIME) - soap_select_mime_boundary(soap); -#ifdef WIN32 -#ifndef UNDER_CE -#ifndef WITH_FASTCGI - if (!soap_valid_socket(soap->socket)) /* Set win32 stdout or soap->sendfd to BINARY, e.g. to support DIME */ -#ifdef __BORLANDC__ - setmode((SOAP_SOCKET)soap->sendfd, O_BINARY); -#else - _setmode((SOAP_SOCKET)soap->sendfd, _O_BINARY); -#endif -#endif -#endif -#endif -#endif - if (soap->mode & SOAP_IO) - { soap->bufidx = 0; - soap->buflen = 0; - } - soap->chunksize = 0; - soap->ns = 0; - soap->null = 0; - soap->position = 0; - soap->mustUnderstand = 0; - soap->encoding = 0; - soap->idnum = 0; - soap->level = 0; -#ifdef WITH_ZLIB - soap->z_ratio_out = 1.0; - if ((soap->mode & SOAP_ENC_ZLIB) && soap->zlib_state != SOAP_ZLIB_DEFLATE) - { -#ifdef WITH_GZIP - memcpy(soap->z_buf, "\37\213\10\0\0\0\0\0\0\377", 10); - soap->d_stream.next_out = (Byte*)soap->z_buf + 10; - soap->d_stream.avail_out = SOAP_BUFLEN - 10; - soap->z_crc = crc32(0L, NULL, 0); - if (deflateInit2(&soap->d_stream, soap->z_level, Z_DEFLATED, -MAX_WBITS, 8, Z_DEFAULT_STRATEGY) != Z_OK) -#else - soap->d_stream.next_out = (Byte*)soap->z_buf; - soap->d_stream.avail_out = SOAP_BUFLEN; - if (deflateInit(&soap->d_stream, soap->z_level) != Z_OK) -#endif - return soap->error = SOAP_ZLIB_ERROR; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Deflate initialized\n")); - soap->zlib_state = SOAP_ZLIB_DEFLATE; - } -#endif - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Begin send phase (socket=%d mode=0x%x count=%lu)\n", soap->socket, soap->mode, (unsigned long)soap->count)); - soap->part = SOAP_BEGIN; -#ifndef WITH_LEANER - if (soap->fprepareinit && (soap->mode & SOAP_IO) == SOAP_IO_STORE) - soap->fprepareinit(soap); -#endif - return SOAP_OK; -} -#endif - -/******************************************************************************/ -#ifndef WITH_NOIDREF -#ifndef PALM_2 -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_embedded(struct soap *soap, const void *p, int t) -{ struct soap_plist *pp; - if (soap_pointer_lookup(soap, p, t, &pp)) - { pp->mark1 = 1; - pp->mark2 = 1; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Embedded %p type=%d mark set to 1\n", p, t)); - } -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_NOIDREF -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_reference(struct soap *soap, const void *p, int t) -{ struct soap_plist *pp; - if (!p || (soap->mode & SOAP_XML_TREE)) - return 1; - if (soap_pointer_lookup(soap, p, t, &pp)) - { if (pp->mark1 == 0) - { pp->mark1 = 2; - pp->mark2 = 2; - } - } - else if (soap_pointer_enter(soap, p, NULL, 0, t, &pp)) - { pp->mark1 = 0; - pp->mark2 = 0; - } - else - return 1; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Reference %p type=%d (%d %d)\n", p, t, (int)pp->mark1, (int)pp->mark2)); - return pp->mark1; -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_NOIDREF -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_array_reference(struct soap *soap, const void *p, const struct soap_array *a, int n, int t) -{ register int i; - struct soap_plist *pp; - if (!p || !a->__ptr) - return 1; - i = soap_array_pointer_lookup(soap, p, a, n, t, &pp); - if (i) - { if (pp->mark1 == 0) - { pp->mark1 = 2; - pp->mark2 = 2; - } - } - else if (!soap_pointer_enter(soap, p, a, n, t, &pp)) - return 1; - else - { pp->mark1 = 0; - pp->mark2 = 0; - } - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Array reference %p ptr=%p dim=%d type=%d (%d %d)\n", p, a->__ptr, n, t, (int)pp->mark1, (int)pp->mark2)); - return pp->mark1; -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_NOIDREF -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_embedded_id(struct soap *soap, int id, const void *p, int t) -{ struct soap_plist *pp; - if (soap->mode & SOAP_XML_TREE) - return id; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Embedded_id %p type=%d id=%d\n", p, t, id)); - if (soap->version == 1 && soap->encodingStyle && !(soap->mode & SOAP_XML_GRAPH) && soap->part != SOAP_IN_HEADER) - { if (id < 0) - { id = soap_pointer_lookup(soap, p, t, &pp); - if (id) - { if (soap->mode & SOAP_IO_LENGTH) - pp->mark1 = 2; - else - pp->mark2 = 2; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Embedded_id multiref id=%d %p type=%d = (%d %d)\n", id, p, t, (int)pp->mark1, (int)pp->mark2)); - } - return -1; - } - return id; - } - if (id < 0) - id = soap_pointer_lookup(soap, p, t, &pp); - else if (id && !soap_pointer_lookup(soap, p, t, &pp)) - return 0; - if (id && pp) - { if (soap->mode & SOAP_IO_LENGTH) - pp->mark1 = 1; - else - pp->mark2 = 1; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Embedded_id embedded ref id=%d %p type=%d = (%d %d)\n", id, p, t, (int)pp->mark1, (int)pp->mark2)); - } - return id; -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_NOIDREF -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_is_embedded(struct soap *soap, struct soap_plist *pp) -{ if (!pp) - return 0; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Is embedded? %d %d\n", (int)pp->mark1, (int)pp->mark2)); - if (soap->version == 1 && soap->encodingStyle && !(soap->mode & SOAP_XML_GRAPH) && soap->part != SOAP_IN_HEADER) - { if (soap->mode & SOAP_IO_LENGTH) - return pp->mark1 != 0; - return pp->mark2 != 0; - } - if (soap->mode & SOAP_IO_LENGTH) - return pp->mark1 == 1; - return pp->mark2 == 1; -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_NOIDREF -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_is_single(struct soap *soap, struct soap_plist *pp) -{ if (soap->part == SOAP_IN_HEADER) - return 1; - if (!pp) - return 0; - if (soap->mode & SOAP_IO_LENGTH) - return pp->mark1 == 0; - return pp->mark2 == 0; -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_NOIDREF -#ifndef PALM_2 -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_set_embedded(struct soap *soap, struct soap_plist *pp) -{ if (!pp) - return; - if (soap->mode & SOAP_IO_LENGTH) - pp->mark1 = 1; - else - pp->mark2 = 1; -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_NOIDREF -#ifndef WITH_LEANER -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_attachment(struct soap *soap, const char *tag, int id, const void *p, const struct soap_array *a, const char *aid, const char *atype, const char *aoptions, int n, const char *type, int t) -{ struct soap_plist *pp; - int i; - if (!p || !a->__ptr || (!aid && !atype)) - return soap_element_id(soap, tag, id, p, a, n, type, t); - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Attachment tag='%s' id='%s' (%d) type='%s'\n", tag, aid?aid:"", id, atype?atype:"")); - i = soap_array_pointer_lookup(soap, p, a, n, t, &pp); - if (!i) - { i = soap_pointer_enter(soap, p, a, n, t, &pp); - if (!i) - { soap->error = SOAP_EOM; - return -1; - } - } - if (id < 0) - id = i; - if (!aid) - { sprintf(soap->tmpbuf, soap->dime_id_format, id); - aid = soap_strdup(soap, soap->tmpbuf); - } - /* Add MTOM xop:Include element when necessary */ - /* TODO: this code to be obsoleted with new import/xop.h conventions */ - if ((soap->mode & SOAP_ENC_MTOM) && strcmp(tag, "xop:Include")) - { if (soap_element_begin_out(soap, tag, 0, type) - || soap_element_href(soap, "xop:Include", 0, "href", aid) - || soap_element_end_out(soap, tag)) - return soap->error; - } - else if (soap_element_href(soap, tag, 0, "href", aid)) - return soap->error; - if (soap->mode & SOAP_IO_LENGTH) - { if (pp->mark1 != 3) - { struct soap_multipart *content; - if (soap->mode & SOAP_ENC_MTOM) - content = soap_new_multipart(soap, &soap->mime.first, &soap->mime.last, (char*)a->__ptr, a->__size); - else - content = soap_new_multipart(soap, &soap->dime.first, &soap->dime.last, (char*)a->__ptr, a->__size); - if (!content) - { soap->error = SOAP_EOM; - return -1; - } - if (!strncmp(aid, "cid:", 4)) /* RFC 2111 */ - { if (soap->mode & SOAP_ENC_MTOM) - { char *s = (char*)soap_malloc(soap, strlen(aid) - 1); - if (s) - { *s = '<'; - strcpy(s + 1, aid + 4); - strcat(s, ">"); - content->id = s; - } - } - else - content->id = aid + 4; - } - else - content->id = aid; - content->type = atype; - content->options = aoptions; - content->encoding = SOAP_MIME_BINARY; - pp->mark1 = 3; - } - } - else - pp->mark2 = 3; - return -1; -} -#endif -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_NOIDREF -#ifndef PALM_1 -static void -soap_init_iht(struct soap *soap) -{ register int i; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Initializing ID hashtable\n")); - for (i = 0; i < SOAP_IDHASH; i++) - soap->iht[i] = NULL; -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_NOIDREF -#ifndef PALM_1 -static void -soap_free_iht(struct soap *soap) -{ register int i; - register struct soap_ilist *ip, *p; - register struct soap_flist *fp, *fq; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Free ID hashtable\n")); - for (i = 0; i < SOAP_IDHASH; i++) - { for (ip = soap->iht[i]; ip; ip = p) - { for (fp = ip->flist; fp; fp = fq) - { fq = fp->next; - SOAP_FREE(soap, fp); - } - p = ip->next; - SOAP_FREE(soap, ip); - } - soap->iht[i] = NULL; - } -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_NOIDREF -#ifndef PALM_2 -SOAP_FMAC1 -struct soap_ilist * -SOAP_FMAC2 -soap_lookup(struct soap *soap, const char *id) -{ register struct soap_ilist *ip; - for (ip = soap->iht[soap_hash(id)]; ip; ip = ip->next) - if (!strcmp(ip->id, id)) - return ip; - return NULL; -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_NOIDREF -#ifndef PALM_2 -SOAP_FMAC1 -struct soap_ilist * -SOAP_FMAC2 -soap_enter(struct soap *soap, const char *id) -{ register size_t h; - register struct soap_ilist *ip; - ip = (struct soap_ilist*)SOAP_MALLOC(soap, sizeof(struct soap_ilist) + strlen(id)); - if (ip) - { h = soap_hash(id); - strcpy(ip->id, id); - ip->next = soap->iht[h]; - soap->iht[h] = ip; - return ip; - } - return NULL; -} -#endif -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -void* -SOAP_FMAC2 -soap_malloc(struct soap *soap, size_t n) -{ register char *p; - if (!n) - return (void*)SOAP_NON_NULL; - if (!soap) - return SOAP_MALLOC(soap, n); - n += (-(long)n) & 7; - if (!(p = (char*)SOAP_MALLOC(soap, n + sizeof(void*) + sizeof(size_t)))) - { soap->error = SOAP_EOM; - return NULL; - } - /* keep chain of alloced cells for later destruction */ - soap->alloced = 1; - *(void**)(p + n) = soap->alist; - *(size_t*)(p + n + sizeof(void*)) = n; - soap->alist = p + n; - return p; -} -#endif - -/******************************************************************************/ -#ifdef SOAP_DEBUG -static void -soap_init_mht(struct soap *soap) -{ register int i; - for (i = 0; i < (int)SOAP_PTRHASH; i++) - soap->mht[i] = NULL; -} -#endif - -/******************************************************************************/ -#ifdef SOAP_DEBUG -static void -soap_free_mht(struct soap *soap) -{ register int i; - register struct soap_mlist *mp, *mq; - for (i = 0; i < (int)SOAP_PTRHASH; i++) - { for (mp = soap->mht[i]; mp; mp = mq) - { mq = mp->next; - if (mp->live) - fprintf(stderr, "%s(%d): malloc() = %p not freed (memory leak or forgot to call soap_end()?)\n", mp->file, mp->line, mp->ptr); - free(mp); - } - soap->mht[i] = NULL; - } -} -#endif - -/******************************************************************************/ -#ifdef SOAP_DEBUG -SOAP_FMAC1 -void* -SOAP_FMAC2 -soap_track_malloc(struct soap *soap, const char *file, int line, size_t size) -{ register void *p = malloc(size); - if (soap) - { register int h = soap_hash_ptr(p); - register struct soap_mlist *mp = (struct soap_mlist*)malloc(sizeof(struct soap_mlist)); - if (soap->fdebug[SOAP_INDEX_TEST]) - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "%s(%d): malloc(%lu) = %p\n", file, line, (unsigned long)size, p)); - mp->next = soap->mht[h]; - mp->ptr = p; - mp->file = file; - mp->line = line; - mp->live = 1; - soap->mht[h] = mp; - } - return p; -} -#endif - -/******************************************************************************/ -#ifdef SOAP_DEBUG -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_track_free(struct soap *soap, const char *file, int line, void *p) -{ register int h = soap_hash_ptr(p); - register struct soap_mlist *mp; - for (mp = soap->mht[h]; mp; mp = mp->next) - if (mp->ptr == p) - break; - if (mp) - { if (mp->live) - { free(p); - if (soap->fdebug[SOAP_INDEX_TEST]) - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "%s(%d): free(%p)\n", file, line, p)); - mp->live = 0; - } - else - fprintf(stderr, "%s(%d): free(%p) double free of pointer malloced at %s(%d)\n", file, line, p, mp->file, mp->line); - } - else - fprintf(stderr, "%s(%d): free(%p) pointer not malloced\n", file, line, p); -} -#endif - -/******************************************************************************/ -#ifdef SOAP_DEBUG -static void -soap_track_unlink(struct soap *soap, const void *p) -{ register int h = soap_hash_ptr(p); - register struct soap_mlist *mp; - for (mp = soap->mht[h]; mp; mp = mp->next) - if (mp->ptr == p) - break; - if (mp) - mp->live = 0; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_dealloc(struct soap *soap, void *p) -{ if (!soap) - return; - if (p) - { register char **q; - for (q = (char**)&soap->alist; *q; q = *(char***)q) - { if (p == (void*)(*q - *(size_t*)(*q + sizeof(void*)))) - { *q = **(char***)q; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Freed data at %p\n", p)); - SOAP_FREE(soap, p); - return; - } - } - soap_delete(soap, p); - } - else - { register char *q; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Free all soap_malloc() data\n")); - while (soap->alist) - { q = (char*)soap->alist; - soap->alist = *(void**)q; - q -= *(size_t*)(q + sizeof(void*)); - SOAP_FREE(soap, q); - } - } - /* we must assume these were deallocated: */ - soap->action = NULL; - soap->fault = NULL; - soap->header = NULL; - soap->userid = NULL; - soap->passwd = NULL; - soap->authrealm = NULL; -#ifndef WITH_LEANER - soap_clr_mime(soap); -#endif -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_delete(struct soap *soap, void *p) -{ register struct soap_clist **cp = &soap->clist; - if (p) - { while (*cp) - { if (p == (*cp)->ptr) - { register struct soap_clist *q = *cp; - *cp = q->next; - q->fdelete(q); - SOAP_FREE(soap, q); - return; - } - cp = &(*cp)->next; - } - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Could not dealloc data %p: address not in list\n", p)); - } - else - { while (*cp) - { register struct soap_clist *q = *cp; - *cp = q->next; - if (q->ptr == (void*)soap->fault) - soap->fault = NULL; /* this was deallocated */ - else if (q->ptr == (void*)soap->header) - soap->header = NULL; /* this was deallocated */ - q->fdelete(q); - SOAP_FREE(soap, q); - } - } -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -struct soap_clist * -SOAP_FMAC2 -soap_link(struct soap *soap, void *p, int t, int n, void (*fdelete)(struct soap_clist*)) -{ register struct soap_clist *cp; - if ((cp = (struct soap_clist*)SOAP_MALLOC(soap, sizeof(struct soap_clist)))) - { cp->next = soap->clist; - cp->type = t; - cp->size = n; - cp->ptr = p; - cp->fdelete = fdelete; - soap->clist = cp; - } - return cp; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_unlink(struct soap *soap, const void *p) -{ register char **q; - register struct soap_clist **cp; - if (!soap || !p) - return; - for (q = (char**)&soap->alist; *q; q = *(char***)q) - { if (p == (void*)(*q - *(size_t*)(*q + sizeof(void*)))) - { *q = **(char***)q; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Unlinked data %p\n", p)); -#ifdef SOAP_DEBUG - soap_track_unlink(soap, p); -#endif - return; - } - } - for (cp = &soap->clist; *cp; cp = &(*cp)->next) - { if (p == (*cp)->ptr) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Unlinked class instance %p\n", p)); - q = (char**)*cp; - *cp = (*cp)->next; - SOAP_FREE(soap, q); - return; - } - } -} -#endif - -/******************************************************************************/ -#ifndef WITH_NOIDREF -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_lookup_type(struct soap *soap, const char *id) -{ register struct soap_ilist *ip; - if (id && *id) - { ip = soap_lookup(soap, id); - if (ip) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Lookup id='%s' type=%d\n", id, ip->type)); - return ip->type; - } - } - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "lookup type id='%s' NOT FOUND! Need to get it from xsi:type\n", id)); - return 0; -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_NOIDREF -#ifndef PALM_2 -SOAP_FMAC1 -void* -SOAP_FMAC2 -soap_id_lookup(struct soap *soap, const char *id, void **p, int t, size_t n, unsigned int k) -{ struct soap_ilist *ip; - void **q; - if (!p || !id || !*id) - return p; - ip = soap_lookup(soap, id); /* lookup pointer to hash table entry for string id */ - if (!ip) - { ip = soap_enter(soap, id); /* new hash table entry for string id */ - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Forwarding first href='%s' type=%d %p (%u bytes)\n", id, t, p, (unsigned int)n)); - ip->type = t; - ip->size = n; - ip->link = p; - ip->copy = NULL; - ip->flist = NULL; - ip->ptr = NULL; - ip->level = k; - *p = NULL; - } - else if (ip->ptr) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Resolved href='%s' type=%d location=%p (%u bytes)\n", id, t, ip->ptr, (unsigned int)n)); - if (ip->type != t) - { strcpy(soap->id, id); - soap->error = SOAP_HREF; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Type incompatibility: id type=%d href type=%d\n", ip->type, t)); - return NULL; - } - while (ip->level < k) - { q = (void**)soap_malloc(soap, sizeof(void*)); - if (!q) - return NULL; - *p = (void*)q; - p = q; - k--; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Descending one level...\n")); - } - *p = ip->ptr; - } - else if (ip->level > k) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Resolving level %u pointers to href='%s'\n", ip->level, id)); - while (ip->level > k) - { void *s, **r = &ip->link; - q = (void**)ip->link; - while (q) - { *r = (void*)soap_malloc(soap, sizeof(void*)); - s = *q; - *q = *r; - r = (void**)*r; - q = (void**)s; - } - *r = NULL; - ip->size = n; - ip->copy = NULL; - ip->level = ip->level - 1; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Descending one level...\n")); - } - q = (void**)ip->link; - ip->link = p; - *p = (void*)q; - } - else - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Forwarded href='%s' type=%d location=%p (%u bytes)\n", id, t, p, (unsigned int)n)); - while (ip->level < k) - { q = (void**)soap_malloc(soap, sizeof(void*)); - *p = q; - p = q; - k--; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Descending one level...\n")); - } - q = (void**)ip->link; - ip->link = p; - *p = (void*)q; - } - return p; -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_NOIDREF -#ifndef PALM_2 -SOAP_FMAC1 -void* -SOAP_FMAC2 -soap_id_forward(struct soap *soap, const char *href, void *p, int st, int tt, size_t n, unsigned int k, void (*fcopy)(struct soap*, int, int, void*, const void*, size_t)) -{ struct soap_ilist *ip; - if (!p || !href || !*href) - return p; - ip = soap_lookup(soap, href); /* lookup pointer to hash table entry for string id */ - if (!ip) - { ip = soap_enter(soap, href); /* new hash table entry for string id */ - ip->type = st; - ip->size = n; - ip->link = NULL; - ip->copy = NULL; - ip->ptr = NULL; - ip->level = 0; - ip->flist = NULL; - DBGLOG(TEST,SOAP_MESSAGE(fdebug, "New entry href='%s' type=%d size=%lu level=%d location=%p\n", href, st, (unsigned long)n, k, p)); - } - else if (ip->type != st || (ip->level == k && ip->size != n)) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Type incompatibility id='%s' expect type=%d size=%lu level=%u got type=%d size=%lu\n", href, ip->type, (unsigned long)ip->size, k, st, (unsigned long)n)); - strcpy(soap->id, href); - soap->error = SOAP_HREF; - return NULL; - } - if (fcopy || n < sizeof(void*) || *href != '#') - { register struct soap_flist *fp = (struct soap_flist*)SOAP_MALLOC(soap, sizeof(struct soap_flist)); - if (!fp) - { soap->error = SOAP_EOM; - return NULL; - } - fp->next = ip->flist; - fp->type = tt; - fp->ptr = p; - fp->level = k; - if (fcopy) - fp->fcopy = fcopy; - else - fp->fcopy = soap_fcopy; - ip->flist = fp; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Forwarding type=%d (target type=%d) size=%lu location=%p level=%u href='%s'\n", st, tt, (unsigned long)n, p, k, href)); - } - else - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Forwarding copying address %p for type=%d href='%s'\n", p, st, href)); - *(void**)p = ip->copy; - ip->copy = p; - } - return p; -} -#endif -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -void* -SOAP_FMAC2 -soap_id_enter(struct soap *soap, const char *id, void *p, int t, size_t n, unsigned int k, const char *type, const char *arrayType, void *(*finstantiate)(struct soap*, int, const char*, const char*, size_t*)) -{ -#ifndef WITH_NOIDREF - struct soap_ilist *ip; -#endif - DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Enter id='%s' type=%d loc=%p size=%lu level=%u\n", id, t, p, (unsigned long)n, k)); - soap->alloced = 0; - if (!p) - { if (finstantiate) - p = finstantiate(soap, t, type, arrayType, &n); - else - p = soap_malloc(soap, n); - if (p) - soap->alloced = 1; - } -#ifndef WITH_NOIDREF - if (!id || !*id) -#endif - return p; -#ifndef WITH_NOIDREF - ip = soap_lookup(soap, id); /* lookup pointer to hash table entry for string id */ - DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Lookup entry id='%s for location=%p'\n", id, p)); - if (!ip) - { ip = soap_enter(soap, id); /* new hash table entry for string id */ - ip->type = t; - ip->link = NULL; - ip->copy = NULL; - ip->flist = NULL; - ip->size = n; - ip->ptr = p; - ip->level = k; - DBGLOG(TEST,SOAP_MESSAGE(fdebug, "New entry id='%s' type=%d size=%lu level=%u location=%p\n", id, t, (unsigned long)n, k, p)); - } - else if ((ip->type != t || (ip->level == k && ip->size != n)) && (ip->copy || ip->flist)) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Type incompatibility id='%s' expect type=%d size=%lu level=%u got type=%d size=%lu\n", id, ip->type, (unsigned long)ip->size, k, t, (unsigned long)n)); - strcpy(soap->id, id); - soap->error = SOAP_HREF; - return NULL; - } - else if (ip->ptr) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Multiply defined id='%s'\n", id)); - strcpy(soap->id, id); - soap->error = SOAP_DUPLICATE_ID; - return NULL; - } - else - { ip->size = n; - ip->ptr = p; - ip->level = k; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Update entry id='%s' type=%d location=%p size=%lu level=%u\n", id, t, p, (unsigned long)n, k)); - } - return ip->ptr; -#endif -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_fcopy(struct soap *soap, int st, int tt, void *p, const void *q, size_t n) -{ DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Copying data type=%d (target type=%d) %p -> %p (%lu bytes)\n", st, tt, q, p, (unsigned long)n)); - memcpy(p, q, n); -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_end_send(struct soap *soap) -{ -#ifndef WITH_LEANER - if (soap->dime.list) - { /* SOAP body referenced attachments must appear first */ - soap->dime.last->next = soap->dime.first; - soap->dime.first = soap->dime.list->next; - soap->dime.list->next = NULL; - soap->dime.last = soap->dime.list; - } - if (soap_putdime(soap) || soap_putmime(soap)) - return soap->error; - soap->mime.list = NULL; - soap->mime.first = NULL; - soap->mime.last = NULL; - soap->dime.list = NULL; - soap->dime.first = NULL; - soap->dime.last = NULL; -#endif - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "End send\n")); - if (soap->mode & SOAP_IO) /* need to flush the remaining data in buffer */ - { if (soap_flush(soap)) -#ifdef WITH_ZLIB - { if (soap->mode & SOAP_ENC_ZLIB && soap->zlib_state == SOAP_ZLIB_DEFLATE) - { soap->zlib_state = SOAP_ZLIB_NONE; - deflateEnd(&soap->d_stream); - } - return soap->error; - } -#else - return soap->error; -#endif -#ifdef WITH_ZLIB - if (soap->mode & SOAP_ENC_ZLIB) - { int r; - soap->d_stream.avail_in = 0; - do - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Deflating remainder\n")); - r = deflate(&soap->d_stream, Z_FINISH); - if (soap->d_stream.avail_out != SOAP_BUFLEN) - { if (soap_flush_raw(soap, soap->z_buf, SOAP_BUFLEN - soap->d_stream.avail_out)) - { soap->zlib_state = SOAP_ZLIB_NONE; - deflateEnd(&soap->d_stream); - return soap->error; - } - soap->d_stream.next_out = (Byte*)soap->z_buf; - soap->d_stream.avail_out = SOAP_BUFLEN; - } - } while (r == Z_OK); - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Deflated %lu->%lu bytes\n", soap->d_stream.total_in, soap->d_stream.total_out)); - soap->z_ratio_out = (float)soap->d_stream.total_out / (float)soap->d_stream.total_in; - soap->mode &= ~SOAP_ENC_ZLIB; - soap->zlib_state = SOAP_ZLIB_NONE; - if (deflateEnd(&soap->d_stream) != Z_OK || r != Z_STREAM_END) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Unable to end deflate: %s\n", soap->d_stream.msg?soap->d_stream.msg:"")); - return soap->error = SOAP_ZLIB_ERROR; - } -#ifdef WITH_GZIP - soap->z_buf[0] = soap->z_crc & 0xFF; - soap->z_buf[1] = (soap->z_crc >> 8) & 0xFF; - soap->z_buf[2] = (soap->z_crc >> 16) & 0xFF; - soap->z_buf[3] = (soap->z_crc >> 24) & 0xFF; - soap->z_buf[4] = soap->d_stream.total_in & 0xFF; - soap->z_buf[5] = (soap->d_stream.total_in >> 8) & 0xFF; - soap->z_buf[6] = (soap->d_stream.total_in >> 16) & 0xFF; - soap->z_buf[7] = (soap->d_stream.total_in >> 24) & 0xFF; - if (soap_flush_raw(soap, soap->z_buf, 8)) - return soap->error; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "gzip crc32=%lu\n", (unsigned long)soap->z_crc)); -#endif - } -#endif - if ((soap->mode & SOAP_IO) == SOAP_IO_STORE) - { char *p; -#ifndef WITH_NOHTTP - if (!(soap->mode & SOAP_ENC_XML)) - { soap->mode--; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Sending buffered message of length %u\n", (unsigned int)soap->blist->size)); - if (soap->status >= SOAP_POST) - soap->error = soap->fpost(soap, soap->endpoint, soap->host, soap->port, soap->path, soap->action, soap->blist->size); - else if (soap->status != SOAP_STOP) - soap->error = soap->fresponse(soap, soap->status, soap->blist->size); - if (soap->error || soap_flush(soap)) - return soap->error; - soap->mode++; - } -#endif - for (p = soap_first_block(soap); p; p = soap_next_block(soap)) - { DBGMSG(SENT, p, soap_block_size(soap)); - if ((soap->error = soap->fsend(soap, p, soap_block_size(soap)))) - { soap_end_block(soap); - return soap->error; - } - } - soap_end_block(soap); - } -#ifndef WITH_LEANER - else if ((soap->mode & SOAP_IO) == SOAP_IO_CHUNK) - { DBGMSG(SENT, "\r\n0\r\n\r\n", 7); - if ((soap->error = soap->fsend(soap, "\r\n0\r\n\r\n", 7))) - return soap->error; - } -#endif - } -#ifdef WITH_OPENSSL - if (!soap->ssl && soap_valid_socket(soap->socket) && !soap->keep_alive && !(soap->omode & SOAP_IO_UDP)) - soap->fshutdownsocket(soap, (SOAP_SOCKET)soap->socket, 1); /* Send TCP FIN */ -#else - if (soap_valid_socket(soap->socket) && !soap->keep_alive && !(soap->omode & SOAP_IO_UDP)) - soap->fshutdownsocket(soap, (SOAP_SOCKET)soap->socket, 1); /* Send TCP FIN */ -#endif - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "End of send phase\n")); - soap->omode &= ~SOAP_XML_SEC; - soap->count = 0; - soap->part = SOAP_END; - return SOAP_OK; -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_end_recv(struct soap *soap) -{ soap->part = SOAP_END; -#ifndef WITH_LEANER - if ((soap->mode & SOAP_ENC_DIME) && soap_getdime(soap)) - return soap->error; - soap->dime.list = soap->dime.first; - soap->dime.first = NULL; - soap->dime.last = NULL; - if ((soap->mode & SOAP_ENC_MIME) && soap_getmime(soap)) - return soap->error; - soap->mime.list = soap->mime.first; - soap->mime.first = NULL; - soap->mime.last = NULL; - soap->mime.boundary = NULL; -#endif - DBGLOG(TEST,SOAP_MESSAGE(fdebug, "End of receive message ok\n")); -#ifdef WITH_ZLIB - if (soap->mode & SOAP_ENC_ZLIB) - { soap->mode &= ~SOAP_ENC_ZLIB; - memcpy(soap->buf, soap->z_buf, SOAP_BUFLEN); - soap->bufidx = (char*)soap->d_stream.next_in - soap->z_buf; - soap->buflen = soap->z_buflen; - soap->zlib_state = SOAP_ZLIB_NONE; - if (inflateEnd(&soap->d_stream) != Z_OK) - return soap->error = SOAP_ZLIB_ERROR; -#ifdef WITH_GZIP - if (soap->zlib_in == SOAP_ZLIB_GZIP) - { soap_wchar c; - short i; - for (i = 0; i < 8; i++) - { if ((int)(c = soap_getchar(soap)) == EOF) - return soap->error = SOAP_EOF; - soap->z_buf[i] = (char)c; - } - if (soap->z_crc != ((uLong)(unsigned char)soap->z_buf[0] | ((uLong)(unsigned char)soap->z_buf[1] << 8) | ((uLong)(unsigned char)soap->z_buf[2] << 16) | ((uLong)(unsigned char)soap->z_buf[3] << 24))) - { DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Gzip error: crc check failed, message corrupted? (crc32=%lu)\n", (unsigned long)soap->z_crc)); - return soap->error = SOAP_ZLIB_ERROR; - } - if (soap->d_stream.total_out != ((uLong)(unsigned char)soap->z_buf[4] | ((uLong)(unsigned char)soap->z_buf[5] << 8) | ((uLong)(unsigned char)soap->z_buf[6] << 16) | ((uLong)(unsigned char)soap->z_buf[7] << 24))) - { DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Gzip error: incorrect message length\n")); - return soap->error = SOAP_ZLIB_ERROR; - } - } -#endif - } -#endif - if ((soap->mode & SOAP_IO) == SOAP_IO_CHUNK) - while ((int)soap_getchar(soap) != EOF) /* advance to last chunk */ - ; - if (soap->fdisconnect && (soap->error = soap->fdisconnect(soap))) - return soap->error; -#ifndef WITH_NOIDREF - return soap_resolve(soap); -#else -#ifndef WITH_LEANER - if (soap->xlist) - { if (soap->mode & SOAP_ENC_MTOM) - return soap->error = SOAP_MIME_HREF; - return soap->error = SOAP_DIME_HREF; - } -#endif - return SOAP_OK; -#endif -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_free(struct soap *soap) -{ register struct Namespace *ns; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Free namespace stack\n")); - while (soap->nlist) - { register struct soap_nlist *np = soap->nlist->next; - SOAP_FREE(soap, soap->nlist); - soap->nlist = np; - } - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Free any remaining temp blocks\n")); - while (soap->blist) - soap_end_block(soap); - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Free attribute storage\n")); - while (soap->attributes) - { register struct soap_attribute *tp = soap->attributes->next; - if (soap->attributes->value) - SOAP_FREE(soap, soap->attributes->value); - SOAP_FREE(soap, soap->attributes); - soap->attributes = tp; - } -#ifdef WITH_FAST - if (soap->labbuf) - SOAP_FREE(soap, soap->labbuf); - soap->labbuf = NULL; - soap->lablen = 0; - soap->labidx = 0; -#endif - ns = soap->local_namespaces; - if (ns) - { for (; ns->id; ns++) - { if (ns->out) - { if (soap->encodingStyle == ns->out) - soap->encodingStyle = SOAP_STR_EOS; - SOAP_FREE(soap, ns->out); - ns->out = NULL; - } - if (soap->encodingStyle == ns->ns) - soap->encodingStyle = SOAP_STR_EOS; - } - SOAP_FREE(soap, soap->local_namespaces); - soap->local_namespaces = NULL; - } -#ifndef WITH_LEANER - while (soap->xlist) - { struct soap_xlist *xp = soap->xlist->next; - SOAP_FREE(soap, soap->xlist); - soap->xlist = xp; - } -#endif -#ifndef WITH_NOIDREF - soap_free_pht(soap); - soap_free_iht(soap); -#endif -} -#endif - -/******************************************************************************/ -#ifdef SOAP_DEBUG -static void -soap_init_logs(struct soap *soap) -{ int i; - for (i = 0; i < SOAP_MAXLOGS; i++) - { soap->logfile[i] = NULL; - soap->fdebug[i] = NULL; - } -} -#endif - -/******************************************************************************/ -#if !defined(WITH_LEAN) || defined(SOAP_DEBUG) -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_open_logfile(struct soap *soap, int i) -{ if (soap->logfile[i]) - soap->fdebug[i] = fopen(soap->logfile[i], i < 2 ? "ab" : "a"); -} -#endif - -/******************************************************************************/ -#ifdef SOAP_DEBUG -static void -soap_close_logfile(struct soap *soap, int i) -{ if (soap->fdebug[i]) - { fclose(soap->fdebug[i]); - soap->fdebug[i] = NULL; - } -} -#endif - -/******************************************************************************/ -#ifdef SOAP_DEBUG -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_close_logfiles(struct soap *soap) -{ int i; - for (i = 0; i < SOAP_MAXLOGS; i++) - soap_close_logfile(soap, i); -} -#endif - -/******************************************************************************/ -#ifdef SOAP_DEBUG -static void -soap_set_logfile(struct soap *soap, int i, const char *logfile) -{ char *s = NULL; - soap_close_logfile(soap, i); - if (soap->logfile[i]) - SOAP_FREE(soap, (void*)soap->logfile[i]); - if (logfile) - if ((s = (char*)SOAP_MALLOC(soap, strlen(logfile) + 1))) - strcpy(s, logfile); - soap->logfile[i] = s; -} -#endif - -/******************************************************************************/ -#ifdef SOAP_DEBUG -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_set_recv_logfile(struct soap *soap, const char *logfile) -{ soap_set_logfile(soap, SOAP_INDEX_RECV, logfile); -} -#endif - -/******************************************************************************/ -#ifdef SOAP_DEBUG -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_set_sent_logfile(struct soap *soap, const char *logfile) -{ soap_set_logfile(soap, SOAP_INDEX_SENT, logfile); -} -#endif - -/******************************************************************************/ -#ifdef SOAP_DEBUG -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_set_test_logfile(struct soap *soap, const char *logfile) -{ soap_set_logfile(soap, SOAP_INDEX_TEST, logfile); -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -struct soap* -SOAP_FMAC2 -soap_copy(struct soap *soap) -{ return soap_copy_context((struct soap*)malloc(sizeof(struct soap)), soap); -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -struct soap* -SOAP_FMAC2 -soap_copy_context(struct soap *copy, struct soap *soap) -{ if (copy) - { register struct soap_plugin *p; - memcpy(copy, soap, sizeof(struct soap)); - copy->copy = 1; - copy->user = NULL; - copy->error = SOAP_OK; - copy->userid = NULL; - copy->passwd = NULL; - copy->nlist = NULL; - copy->blist = NULL; - copy->clist = NULL; - copy->alist = NULL; - copy->attributes = NULL; -#ifdef WITH_FAST - copy->labbuf = NULL; - copy->lablen = 0; - copy->labidx = 0; -#endif -#ifdef SOAP_DEBUG - soap_init_mht(copy); -#endif - copy->local_namespaces = NULL; -#ifndef WITH_NOIDREF - soap_init_iht(copy); - soap_init_pht(copy); -#endif - copy->header = NULL; - copy->fault = NULL; - copy->action = NULL; - *copy->host = '\0'; -#ifndef WITH_LEAN -#ifdef WITH_COOKIES - copy->cookies = soap_copy_cookies(copy); -#else - copy->cookies = NULL; -#endif -#endif -#ifdef SOAP_DEBUG - soap_init_logs(copy); - soap_set_recv_logfile(copy, soap->logfile[SOAP_INDEX_RECV]); - soap_set_sent_logfile(copy, soap->logfile[SOAP_INDEX_SENT]); - soap_set_test_logfile(copy, soap->logfile[SOAP_INDEX_TEST]); -#endif - copy->plugins = NULL; - for (p = soap->plugins; p; p = p->next) - { register struct soap_plugin *q = (struct soap_plugin*)SOAP_MALLOC(copy, sizeof(struct soap_plugin)); - if (!q) - return NULL; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copying plugin '%s'\n", p->id)); - *q = *p; - if (p->fcopy && (soap->error = p->fcopy(copy, q, p))) - { SOAP_FREE(copy, q); - return NULL; - } - q->next = copy->plugins; - copy->plugins = q; - } - } - else - soap->error = SOAP_EOM; - return copy; -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_init(struct soap *soap) -{ soap->version = 0; - soap_imode(soap, SOAP_IO_DEFAULT); - soap_omode(soap, SOAP_IO_DEFAULT); - soap->copy = 0; - soap->plugins = NULL; - soap->user = NULL; - soap->userid = NULL; - soap->passwd = NULL; -#ifndef WITH_NOHTTP - soap->fpost = http_post; - soap->fget = http_get; - soap->fform = NULL; - soap->fposthdr = http_post_header; - soap->fresponse = http_response; - soap->fparse = http_parse; - soap->fparsehdr = http_parse_header; -#endif - soap->fconnect = NULL; - soap->fdisconnect = NULL; -#ifndef WITH_NOIO -#ifndef WITH_IPV6 - soap->fresolve = tcp_gethost; -#else - soap->fresolve = NULL; -#endif - soap->faccept = tcp_accept; - soap->fopen = tcp_connect; - soap->fclose = tcp_disconnect; - soap->fclosesocket = tcp_closesocket; - soap->fshutdownsocket = tcp_shutdownsocket; - soap->fsend = fsend; - soap->frecv = frecv; - soap->fpoll = soap_poll; -#else - soap->fopen = NULL; - soap->fclose = NULL; - soap->fpoll = NULL; -#endif -#ifndef WITH_LEANER - soap->fprepareinit = NULL; - soap->fpreparesend = NULL; - soap->fpreparerecv = NULL; - soap->fpreparefinal = NULL; -#endif - soap->fseterror = NULL; - soap->fignore = NULL; - soap->fserveloop = NULL; - soap->fplugin = fplugin; -#ifndef WITH_LEANER - soap->fdimereadopen = NULL; - soap->fdimewriteopen = NULL; - soap->fdimereadclose = NULL; - soap->fdimewriteclose = NULL; - soap->fdimeread = NULL; - soap->fdimewrite = NULL; -#endif - soap->float_format = "%.8g"; /* .8 preserves single FP precision as much as possible, but might not be very efficient */ - soap->double_format = "%.17lg"; /* .17 preserves double FP precision as much as possible, but might not be very efficient */ - soap->dime_id_format = "cid:id%d"; /* default DIME id format */ - soap->http_version = "1.1"; - soap->actor = NULL; - soap->max_keep_alive = SOAP_MAXKEEPALIVE; - soap->keep_alive = 0; - soap->recv_timeout = 0; - soap->send_timeout = 0; - soap->connect_timeout = 0; - soap->accept_timeout = 0; - soap->socket_flags = 0; - soap->connect_flags = 0; - soap->bind_flags = 0; - soap->accept_flags = 0; - soap->ip = 0; -#ifdef WITH_FAST - soap->labbuf = NULL; - soap->lablen = 0; - soap->labidx = 0; -#endif - soap->encodingStyle = SOAP_STR_EOS; -#ifndef WITH_NONAMESPACES - soap->namespaces = namespaces; -#else - soap->namespaces = NULL; -#endif - soap->local_namespaces = NULL; - soap->nlist = NULL; - soap->blist = NULL; - soap->clist = NULL; - soap->alist = NULL; - soap->attributes = NULL; - soap->header = NULL; - soap->fault = NULL; - soap->master = SOAP_INVALID_SOCKET; - soap->socket = SOAP_INVALID_SOCKET; - soap->os = NULL; - soap->is = NULL; -#ifndef WITH_LEANER - soap->dom = NULL; - soap->dime.list = NULL; - soap->dime.first = NULL; - soap->dime.last = NULL; - soap->mime.list = NULL; - soap->mime.first = NULL; - soap->mime.last = NULL; - soap->mime.boundary = NULL; - soap->mime.start = NULL; - soap->xlist = NULL; -#endif -#ifndef UNDER_CE - soap->recvfd = 0; - soap->sendfd = 1; -#else - soap->recvfd = stdin; - soap->sendfd = stdout; -#endif - soap->host[0] = '\0'; - soap->port = 0; - soap->action = NULL; - soap->proxy_host = NULL; - soap->proxy_port = 8080; - soap->proxy_userid = NULL; - soap->proxy_passwd = NULL; - soap->authrealm = NULL; - soap->prolog = NULL; -#ifdef WITH_OPENSSL - soap->fsslauth = ssl_auth_init; - soap->fsslverify = ssl_verify_callback; - soap->bio = NULL; - soap->ssl = NULL; - soap->ctx = NULL; - soap->require_server_auth = 0; - soap->require_client_auth = 0; - soap->rsa = 0; - soap->keyfile = NULL; - soap->password = NULL; - soap->dhfile = NULL; - soap->cafile = NULL; - soap->capath = NULL; - soap->crlfile = NULL; - soap->randfile = NULL; - soap->session = NULL; -#endif -#ifdef WITH_ZLIB - soap->zlib_state = SOAP_ZLIB_NONE; - soap->zlib_in = SOAP_ZLIB_NONE; - soap->zlib_out = SOAP_ZLIB_NONE; - soap->d_stream.zalloc = NULL; - soap->d_stream.zfree = NULL; - soap->d_stream.opaque = NULL; - soap->z_level = 6; -#endif -#ifndef WITH_LEAN - soap->c14ninclude = NULL; - soap->c14nexclude = NULL; - soap->cookies = NULL; - soap->cookie_domain = NULL; - soap->cookie_path = NULL; - soap->cookie_max = 32; -#endif -#ifdef SOAP_DEBUG - soap_init_mht(soap); - soap_init_logs(soap); - soap_set_recv_logfile(soap, "RECV.log"); - soap_set_sent_logfile(soap, "SENT.log"); - soap_set_test_logfile(soap, NULL); -#endif -#ifdef WMW_RPM_IO - soap->rpmreqid = NULL; -#endif /* WMW_RPM_IO */ -#ifdef PALM - palmNetLibOpen(); -#endif -#ifndef WITH_NOIDREF - soap_init_iht(soap); - soap_init_pht(soap); -#endif - soap_begin(soap); -#ifdef SOAP_DEBUG - soap_set_test_logfile(soap, "TEST.log"); -#endif -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_init1(struct soap *soap, soap_mode mode) -{ soap_init2(soap, mode, mode); -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_init2(struct soap *soap, soap_mode imode, soap_mode omode) -{ soap_init(soap); - soap_imode(soap, imode); - soap_omode(soap, omode); -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_begin(struct soap *soap) -{ DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Initializing\n")); - if (!soap->keep_alive) - { soap->buflen = 0; - soap->bufidx = 0; - } - soap->keep_alive = (((soap->imode | soap->omode) & SOAP_IO_KEEPALIVE) != 0); - soap->null = 0; - soap->position = 0; - soap->encoding = 0; - soap->mustUnderstand = 0; - soap->mode = 0; - soap->ns = 0; - soap->part = SOAP_END; - soap->alloced = 0; - soap->count = 0; - soap->length = 0; - soap->cdata = 0; - soap->error = SOAP_OK; - soap->peeked = 0; - soap->ahead = 0; - soap->idnum = 0; - soap->level = 0; - soap->endpoint[0] = '\0'; -#ifndef WITH_LEANER - soap->dime.chunksize = 0; - soap->dime.buflen = 0; -#endif - soap_free(soap); -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_end(struct soap *soap) -{ register struct soap_clist *cp; - soap_free(soap); - soap_dealloc(soap, NULL); - while (soap->clist) - { cp = soap->clist->next; - SOAP_FREE(soap, soap->clist); - soap->clist = cp; - } - soap_closesock(soap); -#ifdef SOAP_DEBUG - soap_close_logfiles(soap); -#endif -#ifdef PALM - palmNetLibClose(); -#endif -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_set_namespaces(struct soap *soap, struct Namespace *p) -{ register struct Namespace *ns = soap->local_namespaces; - register struct soap_nlist *np, *nq, *nr; - register unsigned int level = soap->level; - soap->namespaces = p; - soap->local_namespaces = NULL; - soap_set_local_namespaces(soap); - /* reverse the namespace list */ - np = soap->nlist; - soap->nlist = NULL; - if (np) - { nq = np->next; - np->next = NULL; - while (nq) - { nr = nq->next; - nq->next = np; - np = nq; - nq = nr; - } - } - /* then push on new stack */ - while (np) - { register const char *s; - soap->level = np->level; /* preserve element nesting level */ - s = np->ns; - if (!s && np->index >= 0 && ns) - { s = ns[np->index].out; - if (!s) - s = ns[np->index].ns; - } - if (s && soap_push_namespace(soap, np->id, s)) - return soap->error; - nq = np; - np = np->next; - SOAP_FREE(soap, nq); - } - if (ns) - { register int i; - for (i = 0; ns[i].id; i++) - { if (ns[i].out) - { SOAP_FREE(soap, ns[i].out); - ns[i].out = NULL; - } - } - SOAP_FREE(soap, ns); - } - soap->level = level; /* restore level */ - return SOAP_OK; -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_set_local_namespaces(struct soap *soap) -{ if (soap->namespaces && !soap->local_namespaces) - { register const struct Namespace *ns1; - register struct Namespace *ns2; - register size_t n = 1; - for (ns1 = soap->namespaces; ns1->id; ns1++) - n++; - n *= sizeof(struct Namespace); - ns2 = (struct Namespace*)SOAP_MALLOC(soap, n); - if (ns2) - { memcpy(ns2, soap->namespaces, n); - if (ns2[0].ns) - { if (!strcmp(ns2[0].ns, soap_env1)) - soap->version = 1; - else - soap->version = 2; - } - soap->local_namespaces = ns2; - } - } -} -#endif - -/******************************************************************************/ -#ifndef WITH_LEAN -#ifndef PALM_1 -SOAP_FMAC1 -const char * -SOAP_FMAC2 -soap_strsearch(const char *big, const char *little) -{ size_t n = strlen(little); - const char *s = big; - while (s) - { if (!strncmp(s, little, n) && (s[n] == '\0' || s[n] == ' ')) - return s; - s = strchr(s, ' '); - if (s) - s++; - } - return NULL; -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_LEAN -static struct soap_nlist * -soap_lookup_ns(struct soap *soap, const char *tag, size_t n) -{ register struct soap_nlist *np; - for (np = soap->nlist; np; np = np->next) - { if (!strncmp(np->id, tag, n) && !np->id[n]) - return np; - } - return NULL; -} -#endif - -/******************************************************************************/ -#ifndef WITH_LEAN -static struct soap_nlist * -soap_push_ns(struct soap *soap, const char *id, const char *ns, short utilized) -{ register struct soap_nlist *np; - size_t n, k; - if (soap_strsearch(soap->c14nexclude, id)) - return NULL; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Push namespace binding (level=%u) '%s' '%s'\n", soap->level, id, ns?ns:"")); - if (!utilized) - { for (np = soap->nlist; np; np = np->next) - { if (!strcmp(np->id, id) && (!np->ns || !strcmp(np->ns, ns))) - break; - } - if (np) - { if (np->index == 1) - utilized = np->index; - else - return NULL; - } - } - n = strlen(id); - if (ns) - k = strlen(ns); - else - k = 0; - np = (struct soap_nlist*)SOAP_MALLOC(soap, sizeof(struct soap_nlist) + n + k + 1); - if (!np) - { soap->error = SOAP_EOM; - return NULL; - } - np->next = soap->nlist; - soap->nlist = np; - strcpy(np->id, id); - if (ns) - { np->ns = np->id + n + 1; - strcpy(np->ns, ns); - } - else - np->ns = NULL; - np->level = soap->level; - np->index = utilized; - return np; -} -#endif - -/******************************************************************************/ -#ifndef WITH_LEAN -static void -soap_utilize_ns(struct soap *soap, const char *tag, size_t n) -{ register struct soap_nlist *np = soap_lookup_ns(soap, tag, n); - if (np) - { if (np->index == 0) - soap_push_ns(soap, np->id, np->ns, 1); - } - else - { strncpy(soap->tmpbuf, tag, n); - soap->tmpbuf[n] = '\0'; - soap_push_ns(soap, soap->tmpbuf, NULL, 1); - } -} -#endif - -/******************************************************************************/ -#ifndef WITH_LEAN -static void -soap_pop_ns(struct soap *soap) -{ soap_pop_namespace(soap); -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_element(struct soap *soap, const char *tag, int id, const char *type) -{ DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Element begin tag='%s' id='%d' type='%s'\n", tag, id, type?type:"")); -#ifdef WITH_DOM - if (soap->mode & SOAP_XML_DOM) - { register struct soap_dom_element *elt = (struct soap_dom_element*)soap_malloc(soap, sizeof(struct soap_dom_element)); - if (!elt) - return soap->error = SOAP_EOM; - elt->soap = soap; - elt->next = NULL; - elt->prnt = soap->dom; - elt->name = soap_strdup(soap, tag); - elt->elts = NULL; - elt->atts = NULL; - elt->nstr = NULL; - elt->data = NULL; - elt->wide = NULL; - elt->node = NULL; - elt->type = 0; - elt->head = NULL; - elt->tail = NULL; - if (soap->dom) - { struct soap_dom_element *p = soap->dom->elts; - if (p) - { while (p->next) - p = p->next; - p->next = elt; - } - else - soap->dom->elts = elt; - } - soap->dom = elt; - } - else - { -#endif - soap->level++; -#ifndef WITH_LEAN - if (!soap->ns) - { if (!(soap->mode & SOAP_XML_CANONICAL) - && soap_send(soap, soap->prolog ? soap->prolog : "\n")) - return soap->error; - } - else if (soap->mode & SOAP_XML_INDENT) - { if (soap->ns == 1 && soap_send_raw(soap, soap_indent, soap->level < sizeof(soap_indent) ? soap->level : sizeof(soap_indent) - 1)) - return soap->error; - soap->body = 1; - } -#endif - if (soap_send_raw(soap, "<", 1) - || soap_send(soap, tag)) - return soap->error; -#ifdef WITH_DOM - } -#endif - if (!soap->ns) - { struct Namespace *ns; - for (ns = soap->local_namespaces; ns && ns->id; ns++) - { if (*ns->id && (ns->out || ns->ns)) - { sprintf(soap->tmpbuf, "xmlns:%s", ns->id); - if (soap_attribute(soap, soap->tmpbuf, ns->out ? ns->out : ns->ns)) - return soap->error; - } - } - } - soap->ns = 1; /* start with 0 or 2, but should be one to continue */ -#ifndef WITH_LEAN - if (soap->mode & SOAP_XML_CANONICAL) - { const char *s = strchr(tag, ':'); - if (s) - soap_utilize_ns(soap, tag, s - tag); - } -#endif - if (id > 0) - { sprintf(soap->tmpbuf, "_%d", id); - if (soap_attribute(soap, "id", soap->tmpbuf)) - return soap->error; - } - if (type && *type) - { if (soap_attribute(soap, "xsi:type", type)) - return soap->error; -#ifndef WITH_LEAN - if (soap->mode & SOAP_XML_CANONICAL) - { const char *s = strchr(type, ':'); - if (s) - soap_utilize_ns(soap, type, s - type); - } -#endif - } - if (soap->null && soap->position > 0) - { int i; - sprintf(soap->tmpbuf, "[%d", soap->positions[0]); - for (i = 1; i < soap->position; i++) - sprintf(soap->tmpbuf + strlen(soap->tmpbuf), ",%d", soap->positions[i]); - strcat(soap->tmpbuf, "]"); - if (soap_attribute(soap, "SOAP-ENC:position", soap->tmpbuf)) - return soap->error; - } - if (soap->mustUnderstand) - { if (soap->actor && *soap->actor) - { if (soap_attribute(soap, soap->version == 2 ? "SOAP-ENV:role" : "SOAP-ENV:actor", soap->actor)) - return soap->error; - } - if (soap_attribute(soap, "SOAP-ENV:mustUnderstand", soap->version == 2 ? "true" : "1")) - return soap->error; - soap->mustUnderstand = 0; - } - if (soap->encoding) - { if (soap->encodingStyle && soap->local_namespaces) - { if (!*soap->encodingStyle) - { if (soap->local_namespaces[1].out) - soap->encodingStyle = soap->local_namespaces[1].out; - else - soap->encodingStyle = soap->local_namespaces[1].ns; - } - if (soap_attribute(soap, "SOAP-ENV:encodingStyle", soap->encodingStyle)) - return soap->error; - } - soap->encoding = 0; - } - soap->null = 0; - soap->position = 0; - return SOAP_OK; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_element_begin_out(struct soap *soap, const char *tag, int id, const char *type) -{ if (*tag == '-') - return SOAP_OK; - if (soap_element(soap, tag, id, type)) - return soap->error; - return soap_element_start_end_out(soap, NULL); -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -#ifndef HAVE_STRRCHR -SOAP_FMAC1 -char* -SOAP_FMAC2 -soap_strrchr(const char *s, int t) -{ register char *r = NULL; - while (*s) - if (*s++ == t) - r = (char*)s - 1; - return r; -} -#endif -#endif - -/******************************************************************************/ -#ifndef PALM_2 -#ifndef HAVE_STRTOL -SOAP_FMAC1 -long -SOAP_FMAC2 -soap_strtol(const char *s, char **t, int b) -{ register long n = 0; - register int c; - while (*s > 0 && *s <= 32) - s++; - if (b == 10) - { short neg = 0; - if (*s == '-') - { s++; - neg = 1; - } - else if (*s == '+') - s++; - while ((c = *s) && c >= '0' && c <= '9') - { if (n >= 214748364 && (n > 214748364 || c >= '8')) - break; - n *= 10; - n += c - '0'; - s++; - } - if (neg) - n = -n; - } - else /* b == 16 and value is always positive */ - { while ((c = *s)) - { if (c >= '0' && c <= '9') - c -= '0'; - else if (c >= 'A' && c <= 'F') - c -= 'A' - 10; - else if (c >= 'a' && c <= 'f') - c -= 'a' - 10; - if (n > 0x07FFFFFF) - break; - n <<= 4; - n += c; - s++; - } - } - if (t) - *t = (char*)s; - return n; -} -#endif -#endif - -/******************************************************************************/ -#ifndef PALM_2 -#ifndef HAVE_STRTOUL -SOAP_FMAC1 -unsigned long -SOAP_FMAC2 -soap_strtoul(const char *s, char **t, int b) -{ unsigned long n = 0; - register int c; - while (*s > 0 && *s <= 32) - s++; - if (b == 10) - { if (*s == '+') - s++; - while ((c = *s) && c >= '0' && c <= '9') - { if (n >= 429496729 && (n > 429496729 || c >= '6')) - break; - n *= 10; - n += c - '0'; - s++; - } - } - else /* b == 16 */ - { while ((c = *s)) - { if (c >= '0' && c <= '9') - c -= '0'; - else if (c >= 'A' && c <= 'F') - c -= 'A' - 10; - else if (c >= 'a' && c <= 'f') - c -= 'a' - 10; - if (n > 0x0FFFFFFF) - break; - n <<= 4; - n += c; - s++; - } - } - if (t) - *t = (char*)s; - return n; -} -#endif -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_array_begin_out(struct soap *soap, const char *tag, int id, const char *type, const char *offset) -{ if (soap_element(soap, tag, id, "SOAP-ENC:Array")) - return soap->error; - if (soap->version == 2) - { const char *s; - s = soap_strrchr(type, '['); - if ((size_t)(s - type) < sizeof(soap->tmpbuf)) - { strncpy(soap->tmpbuf, type, s - type); - soap->tmpbuf[s - type] = '\0'; - if (type && *type && (soap_attribute(soap, "SOAP-ENC:itemType", soap->tmpbuf))) - return soap->error; - if (s && (soap_attribute(soap, "SOAP-ENC:arraySize", s + 1))) - return soap->error; - } - } - else - { if (offset && (soap_attribute(soap, "SOAP-ENC:offset", offset))) - return soap->error; - if (type && *type && (soap_attribute(soap, "SOAP-ENC:arrayType", type))) - return soap->error; - } -#ifndef WITH_LEAN - if (type && *type && (soap->mode & SOAP_XML_CANONICAL)) - { const char *s = strchr(type, ':'); - if (s) - soap_utilize_ns(soap, type, s - type); - } -#endif - return soap_element_start_end_out(soap, NULL); -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_element_start_end_out(struct soap *soap, const char *tag) -{ register struct soap_attribute *tp; -#ifdef WITH_DOM - register struct soap_dom_attribute **att; - if ((soap->mode & SOAP_XML_DOM) && soap->dom) - { att = &soap->dom->atts; - for (tp = soap->attributes; tp; tp = tp->next) - { if (tp->visible) - { *att = (struct soap_dom_attribute*)soap_malloc(soap, sizeof(struct soap_dom_attribute)); - if (!*att) - return soap->error = SOAP_EOM; - (*att)->next = NULL; - (*att)->nstr = NULL; - (*att)->name = soap_strdup(soap, tp->name); - (*att)->data = soap_strdup(soap, tp->value); - (*att)->wide = NULL; - (*att)->soap = soap; - tp->visible = 0; - } - } - return SOAP_OK; - } -#endif -#ifndef WITH_LEAN - if (soap->mode & SOAP_XML_CANONICAL) - { struct soap_nlist *np; - for (tp = soap->attributes; tp; tp = tp->next) - { if (tp->visible && tp->name) - { const char *s = strchr(tp->name, ':'); - if (s) - soap_utilize_ns(soap, tp->name, s - tp->name); - } - } - for (np = soap->nlist; np; np = np->next) - { if (np->index == 1 && np->ns) - { sprintf(soap->tmpbuf, "xmlns:%s", np->id); - soap_set_attr(soap, soap->tmpbuf, np->ns); - np->index = 2; - } - } - } -#endif - for (tp = soap->attributes; tp; tp = tp->next) - { if (tp->visible) - { if (soap_send(soap, " ") || soap_send(soap, tp->name)) - return soap->error; - if (tp->visible == 2 && tp->value) - if (soap_send_raw(soap, "=\"", 2) - || soap_string_out(soap, tp->value, 1) - || soap_send_raw(soap, "\"", 1)) - return soap->error; - tp->visible = 0; - } - } - if (tag) - { -#ifndef WITH_LEAN - if (soap->mode & SOAP_XML_CANONICAL) - { if (soap_send_raw(soap, ">", 1) - || soap_element_end_out(soap, tag)) - return soap->error; - } - else -#endif - soap->level--; /* decrement level just before /> */ - if (soap_send_raw(soap, "/>", 2)) - return soap->error; - return SOAP_OK; - } - return soap_send_raw(soap, ">", 1); -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_element_end_out(struct soap *soap, const char *tag) -{ if (*tag == '-') - return SOAP_OK; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Element ending tag='%s'\n", tag)); -#ifdef WITH_DOM - if ((soap->mode & SOAP_XML_DOM) && soap->dom) - { if (soap->dom->prnt) - soap->dom = soap->dom->prnt; - return SOAP_OK; - } -#endif -#ifndef WITH_LEAN - if (soap->mode & SOAP_XML_CANONICAL) - soap_pop_ns(soap); - if (soap->mode & SOAP_XML_INDENT) - { if (!soap->body) - { if (soap_send_raw(soap, soap_indent, soap->level < sizeof(soap_indent) ? soap->level : sizeof(soap_indent) - 1)) - return soap->error; - } - soap->body = 0; - } -#endif - if (soap_send_raw(soap, "error; - soap->level--; /* decrement level just before > */ - return soap_send_raw(soap, ">", 1); -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_element_ref(struct soap *soap, const char *tag, int id, int href) -{ register int n = 0; - if (soap->version == 2) - n = 1; - sprintf(soap->href, "#_%d", href); - return soap_element_href(soap, tag, id, "href" + n, soap->href + n); -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_element_href(struct soap *soap, const char *tag, int id, const char *ref, const char *val) -{ DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Element '%s' reference %s='%s'\n", tag, ref, val)); - if (soap_element(soap, tag, id, NULL) - || soap_attribute(soap, ref, val) - || soap_element_start_end_out(soap, tag)) - return soap->error; - return SOAP_OK; -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_element_null(struct soap *soap, const char *tag, int id, const char *type) -{ struct soap_attribute *tp; - for (tp = soap->attributes; tp; tp = tp->next) - if (tp->visible) - break; - if (tp || (soap->version == 2 && soap->position > 0) || id > 0 || (soap->mode & SOAP_XML_NIL)) - { if (soap_element(soap, tag, id, type)) - return soap->error; - if (soap->part != SOAP_IN_HEADER && soap->encodingStyle) - if (soap_attribute(soap, "xsi:nil", "true")) - return soap->error; - return soap_element_start_end_out(soap, tag); - } - soap->null = 1; - soap->position = 0; - soap->mustUnderstand = 0; - return SOAP_OK; -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_element_id(struct soap *soap, const char *tag, int id, const void *p, const struct soap_array *a, int n, const char *type, int t) -{ if (!p || (a && !a->__ptr)) - { soap_element_null(soap, tag, id, type); - return -1; - } -#ifndef WITH_NOIDREF - if (soap->mode & SOAP_XML_TREE) - return 0; - if (id < 0) - { struct soap_plist *pp; - if (a) - id = soap_array_pointer_lookup(soap, p, a, n, t, &pp); - else - id = soap_pointer_lookup(soap, p, t, &pp); - if (id) - { if (soap_is_embedded(soap, pp)) - { soap_element_ref(soap, tag, 0, id); - return -1; - } - if (soap_is_single(soap, pp)) - return 0; - soap_set_embedded(soap, pp); - } - } - return id; -#else - return 0; -#endif -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_element_result(struct soap *soap, const char *tag) -{ if (soap->version == 2 && soap->encodingStyle) - if (soap_element(soap, "SOAP-RPC:result", 0, NULL) - || soap_attribute(soap, "xmlns:SOAP-RPC", soap_rpc) - || soap_element_start_end_out(soap, NULL) - || soap_string_out(soap, tag, 0) - || soap_element_end_out(soap, "SOAP-RPC:result")) - return soap->error; - return SOAP_OK; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_attribute(struct soap *soap, const char *name, const char *value) -{ -#ifdef WITH_DOM - if ((soap->mode & SOAP_XML_DOM) && soap->dom) - { register struct soap_dom_attribute *a = (struct soap_dom_attribute*)soap_malloc(soap, sizeof(struct soap_dom_attribute)); - a->next = soap->dom->atts; - a->nstr = NULL; - a->name = soap_strdup(soap, name); - a->data = soap_strdup(soap, value); - a->wide = NULL; - a->soap = soap; - soap->dom->atts = a; - return SOAP_OK; - } -#endif -#ifndef WITH_LEAN - if (soap->mode & SOAP_XML_CANONICAL) - { /* TODO: consider using this code to handle default namespace - if (!strncmp(name, "xmlns", 5) && (name[5] == ':' || name[5] == '\0')) - { if (name[5] == ':') - soap_push_ns(soap, name + 6, value, 0); - else - soap_push_ns(soap, "", value, 0); - } - */ - if (!strncmp(name, "xmlns:", 6)) - soap_push_ns(soap, name + 6, value, 0); - else if (soap_set_attr(soap, name, value)) - return soap->error; - } - else -#endif - { if (soap_send(soap, " ") || soap_send(soap, name)) - return soap->error; - if (value) - if (soap_send_raw(soap, "=\"", 2) - || soap_string_out(soap, value, 1) - || soap_send_raw(soap, "\"", 1)) - return soap->error; - } - return SOAP_OK; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_element_begin_in(struct soap *soap, const char *tag, int nillable) -{ if (!soap_peek_element(soap)) - { if (soap->other) - return soap->error = SOAP_TAG_MISMATCH; - if (tag && *tag == '-') - return SOAP_OK; - if (!(soap->error = soap_match_tag(soap, soap->tag, tag))) - { soap->peeked = 0; - if (soap->body) - soap->level++; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Begin element found (level=%u) '%s'='%s'\n", soap->level, soap->tag, tag?tag:"" )); - if (!nillable && soap->null && (soap->mode & SOAP_XML_STRICT)) - return soap->error = SOAP_NULL; - } - } - else if (soap->error == SOAP_NO_TAG && tag && *tag == '-') - soap->error = SOAP_OK; - return soap->error; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_element_end_in(struct soap *soap, const char *tag) -{ register soap_wchar c; - register char *s; - register const char *t; - register int n = 0; - if (tag && *tag == '-') - return SOAP_OK; - soap->level--; - soap_pop_namespace(soap); -#ifdef WITH_DOM - /* this whitespace or mixed content is not insignificant for DOM */ - if ((soap->mode & SOAP_XML_DOM) && soap->dom) - { if (!soap->peeked && !soap_string_in(soap, 3, -1, -1)) - return soap->error; - if (soap->dom->prnt) - soap->dom = soap->dom->prnt; - } -#endif - if (soap->peeked) - { if (soap->error == SOAP_NO_TAG) - soap->error = SOAP_OK; - if (*soap->tag) - n++; - soap->peeked = 0; - } - do - { while (((c = soap_get(soap)) != SOAP_TT)) - { if ((int)c == EOF) - return soap->error = SOAP_EOF; - if (c == SOAP_LT) - n++; - else if (c == '/') - { c = soap_get(soap); - if (c == SOAP_GT) - n--; - else - soap_unget(soap, c); - } - } - } while (n--); - s = soap->tag; - while (soap_notblank(c = soap_getutf8(soap))) - *s++ = (char)c; - *s = '\0'; - if ((int)c == EOF) - return soap->error = SOAP_EOF; - while (soap_blank(c)) - c = soap_get(soap); - if (c != SOAP_GT) - return soap->error = SOAP_SYNTAX_ERROR; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "End element found (level=%u) '%s'='%s'\n", soap->level, soap->tag, tag?tag:"")); - if (!tag || !*tag) - return SOAP_OK; - if ((s = strchr(soap->tag, ':'))) - s++; - else - s = soap->tag; - if ((t = strchr(tag, ':'))) - t++; - else - t = tag; - if (!SOAP_STRCMP(s, t)) - return SOAP_OK; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "End element tag name does not match\n")); - return soap->error = SOAP_SYNTAX_ERROR; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -const char * -SOAP_FMAC2 -soap_attr_value(struct soap *soap, const char *name, int flag) -{ register struct soap_attribute *tp; - for (tp = soap->attributes; tp; tp = tp->next) - if (!soap_match_tag(soap, tp->name, name)) - break; - if (tp && tp->visible == 2) - { if (flag == 2 && (soap->mode & SOAP_XML_STRICT)) - soap->error = SOAP_PROHIBITED; - else - return tp->value; - } - else if (flag == 1 && (soap->mode & SOAP_XML_STRICT)) - soap->error = SOAP_REQUIRED; - return NULL; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_set_attr(struct soap *soap, const char *name, const char *value) -{ register struct soap_attribute *tp; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Set attribute %s='%s'\n", name, value?value:"")); - for (tp = soap->attributes; tp; tp = tp->next) - { if (!strcmp(tp->name, name)) - break; - } - if (!tp) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Allocate attribute %s\n", name)); - if (!(tp = (struct soap_attribute*)SOAP_MALLOC(soap, sizeof(struct soap_attribute) + strlen(name)))) - return soap->error = SOAP_EOM; - tp->ns = NULL; -#ifndef WITH_LEAN - if (soap->mode & SOAP_XML_CANONICAL) - { struct soap_attribute **tpp = &soap->attributes; - const char *s = strchr(name, ':'); - if (!strncmp(name, "xmlns", 5)) - { for (; *tpp; tpp = &(*tpp)->next) - if (strncmp((*tpp)->name, "xmlns", 5) || strcmp((*tpp)->name + 5, name + 5) > 0) - break; - } - else if (!s) - { for (; *tpp; tpp = &(*tpp)->next) - if (strncmp((*tpp)->name, "xmlns", 5) && ((*tpp)->ns || strcmp((*tpp)->name, name) > 0)) - break; - } - else - { int k; - for (; *tpp; tpp = &(*tpp)->next) - { if (!strncmp((*tpp)->name, "xmlns:", 6) && !strncmp((*tpp)->name + 6, name, s - name) && !(*tpp)->name[6 + s - name]) - { if (!tp->ns) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Canonicalization: prefix %s=%p(%s)\n", name, (*tpp)->ns, (*tpp)->ns)); - tp->ns = (*tpp)->ns; - } - } - else if (strncmp((*tpp)->name, "xmlns", 5) && (*tpp)->ns && tp->ns && ((k = strcmp((*tpp)->ns, tp->ns)) > 0 || (!k && strcmp((*tpp)->name, name) > 0))) - break; - } - } - tp->next = *tpp; - *tpp = tp; - } - else -#endif - { tp->next = soap->attributes; - soap->attributes = tp; - } - strcpy(tp->name, name); - tp->value = NULL; - } - else if (value && tp->value && tp->size <= strlen(value)) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Free attribute value of %s (free %p)\n", name, tp->value)); - SOAP_FREE(soap, tp->value); - tp->value = NULL; - tp->ns = NULL; - } - if (value) - { if (!tp->value) - { tp->size = strlen(value) + 1; - if (!(tp->value = (char*)SOAP_MALLOC(soap, tp->size))) - return soap->error = SOAP_EOM; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Allocate attribute value of %s (%p)\n", tp->name, tp->value)); - } - strcpy(tp->value, value); - if (!strncmp(tp->name, "xmlns:", 6)) - tp->ns = tp->value; - tp->visible = 2; -#ifndef WITH_LEAN - if (!strcmp(name, "wsu:Id")) - { soap->part = SOAP_BEGIN_SECURITY; - strncpy(soap->id, value, sizeof(soap->id)); - soap->id[sizeof(soap->id)-1] = '\0'; - } -#endif - } - else - tp->visible = 1; - return SOAP_OK; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_clr_attr(struct soap *soap) -{ register struct soap_attribute *tp; -#ifndef WITH_LEAN - if (soap->mode & SOAP_XML_CANONICAL) - { while (soap->attributes) - { tp = soap->attributes->next; - SOAP_FREE(soap, soap->attributes->value); - SOAP_FREE(soap, soap->attributes); - soap->attributes = tp; - } - } - else -#endif - { for (tp = soap->attributes; tp; tp = tp->next) - tp->visible = 0; - } -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -static int -soap_getattrval(struct soap *soap, char *s, size_t n, soap_wchar d) -{ size_t i; - soap_wchar c; - for (i = 0; i < n; i++) - { c = soap_getutf8(soap); - switch (c) - { - case SOAP_TT: - *s++ = '<'; - soap_unget(soap, '/'); - break; - case SOAP_LT: - *s++ = '<'; - break; - case SOAP_GT: - if (d == ' ') - { soap_unget(soap, c); - *s = '\0'; - return SOAP_OK; - } - *s++ = '>'; - break; - case SOAP_QT: - if (c == d) - { *s = '\0'; - return SOAP_OK; - } - *s++ = '"'; - break; - case SOAP_AP: - if (c == d) - { *s = '\0'; - return SOAP_OK; - } - *s++ = '\''; - break; - case '\t': - case '\n': - case '\r': - case ' ': - case '/': - if (d == ' ') - { soap_unget(soap, c); - *s = '\0'; - return SOAP_OK; - } - default: - if ((int)c == EOF) - return soap->error = SOAP_EOF; - *s++ = (char)c; - } - } - return soap->error = SOAP_EOM; -} -#endif - -/******************************************************************************/ -#ifdef WITH_FAST -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_store_lab(struct soap *soap, const char *s, size_t n) -{ soap->labidx = 0; - return soap_append_lab(soap, s, n); -} -#endif -#endif - -/******************************************************************************/ -#ifdef WITH_FAST -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_append_lab(struct soap *soap, const char *s, size_t n) -{ if (soap->labidx + n >= soap->lablen) - { register char *t = soap->labbuf; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Enlarging look-aside buffer to append data, old size=%lu", (unsigned long)soap->lablen)); - if (soap->lablen == 0) - soap->lablen = SOAP_LABLEN; - while (soap->labidx + n >= soap->lablen) - soap->lablen <<= 1; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, ", new size=%lu\n", (unsigned long)soap->lablen)); - soap->labbuf = (char*)SOAP_MALLOC(soap, soap->lablen); - if (!soap->labbuf) - { if (t) - SOAP_FREE(soap, t); - return soap->error = SOAP_EOM; - } - if (t) - { memcpy(soap->labbuf, t, soap->labidx); - SOAP_FREE(soap, t); - } - } - if (s) - { memcpy(soap->labbuf + soap->labidx, s, n); - soap->labidx += n; - } - return SOAP_OK; -} -#endif -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_peek_element(struct soap *soap) -{ -#ifdef WITH_DOM - register struct soap_dom_attribute **att = NULL; - register char *lead = NULL; -#endif - register struct soap_attribute *tp; - const char *t; - register char *s; - register soap_wchar c; - register int i; - if (soap->peeked) - { if (!*soap->tag) - return soap->error = SOAP_NO_TAG; - return SOAP_OK; - } - soap->peeked = 1; - for (;;) - { c = soap_getutf8(soap); - if (c == SOAP_BOM) - c = soap_get(soap); -#ifdef WITH_DOM - /* whitespace leading to start tag is not insignificant for DOM */ - if (soap_blank(c)) - { soap->labidx = 0; - do - { if (soap_append_lab(soap, NULL, 0)) - return SOAP_EOM; - s = soap->labbuf + soap->labidx; - i = soap->lablen - soap->labidx; - soap->labidx = soap->lablen; - while (soap_blank(c) && i--) - { *s++ = c; - c = soap_get(soap); - } - } - while (soap_blank(c)); - *s = '\0'; - lead = soap_strdup(soap, soap->labbuf); - } -#else - while (soap_blank(c)) - c = soap_get(soap); -#endif - if (c != SOAP_LT) - { *soap->tag = '\0'; - if ((int)c == EOF) - return soap->error = SOAP_EOF; - soap_unget(soap, c); -#ifdef WITH_DOM - /* whitespace leading to end tag is not insignificant for DOM */ - if ((soap->mode & SOAP_XML_DOM) && soap->dom) - soap->dom->tail = soap_strdup(soap, lead); -#endif - return soap->error = SOAP_NO_TAG; - } - s = soap->tag; - do c = soap_getutf8(soap); - while (soap_blank(c)); - i = sizeof(soap->tag); - while (c != '/' && soap_notblank(c)) - { if (--i > 0) - *s++ = (char)c; - c = soap_getutf8(soap); - } - while (soap_blank(c)) - c = soap_get(soap); - *s = '\0'; - if (*soap->tag != '?') - break; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "XML PI <%s?>\n", soap->tag)); - while ((int)c != EOF && c != SOAP_GT && c != '?') - { s = soap->tmpbuf; - i = sizeof(soap->tmpbuf) - 2; - while (c != '=' && c != SOAP_GT && c != '?' && soap_notblank(c)) - { if (--i > 0) - *s++ = (char)c; - c = soap_get(soap); - } - while (soap_blank(c)) - c = soap_get(soap); - if (c == '=') - { *s++ = '='; - do c = soap_get(soap); - while (soap_blank(c)); - if (c != SOAP_QT && c != SOAP_AP) - { soap_unget(soap, c); - c = ' '; /* blank delimiter */ - } - if (soap_getattrval(soap, s, i, c) == SOAP_EOM) - { while (soap_getattrval(soap, soap->tmpbuf, sizeof(soap->tmpbuf), c) == SOAP_EOM) - ; - } - else if (!strcmp(soap->tag, "?xml") - && (!soap_tag_cmp(soap->tmpbuf, "encoding=iso-8859-1") - || !soap_tag_cmp(soap->tmpbuf, "encoding=latin1"))) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "XML latin1 encoding\n")); - soap->mode |= SOAP_ENC_LATIN; - } - } - do c = soap_get(soap); - while (soap_blank(c)); - } - } - soap->id[0] = '\0'; - soap->href[0] = '\0'; - soap->type[0] = '\0'; - soap->arrayType[0] = '\0'; - soap->arraySize[0] = '\0'; - soap->arrayOffset[0] = '\0'; - soap->other = 0; - soap->root = -1; - soap->position = 0; - soap->null = 0; - soap->mustUnderstand = 0; -#ifdef WITH_DOM - if (soap->mode & SOAP_XML_DOM) - { register struct soap_dom_element *elt; - elt = (struct soap_dom_element*)soap_malloc(soap, sizeof(struct soap_dom_element)); - if (!elt) - return soap->error = SOAP_EOM; - elt->next = NULL; - elt->nstr = NULL; - elt->name = soap_strdup(soap, soap->tag); - elt->prnt = soap->dom; - elt->elts = NULL; - elt->atts = NULL; - elt->data = NULL; - elt->wide = NULL; - elt->type = 0; - elt->node = NULL; - elt->head = lead; - elt->tail = NULL; - elt->soap = soap; - if (soap->dom) - { struct soap_dom_element *p = soap->dom->elts; - if (p) - { while (p->next) - p = p->next; - p->next = elt; - } - else - soap->dom->elts = elt; - } - soap->dom = elt; - att = &elt->atts; - } -#endif - for (tp = soap->attributes; tp; tp = tp->next) - tp->visible = 0; - while ((int)c != EOF && c != SOAP_GT && c != '/') - { s = soap->tmpbuf; - i = sizeof(soap->tmpbuf); - while (c != '=' && c != '/' && soap_notblank(c)) - { if (--i > 0) - *s++ = (char)c; - c = soap_get(soap); - } - *s = '\0'; - if (i == sizeof(soap->tmpbuf)) - return soap->error = SOAP_SYNTAX_ERROR; -#ifdef WITH_DOM - /* add attribute name to dom */ - if (att) - { *att = (struct soap_dom_attribute*)soap_malloc(soap, sizeof(struct soap_dom_attribute)); - if (!*att) - return soap->error = SOAP_EOM; - (*att)->next = NULL; - (*att)->nstr = NULL; - (*att)->name = soap_strdup(soap, soap->tmpbuf); - (*att)->data = NULL; - (*att)->wide = NULL; - (*att)->soap = soap; - } -#endif - if (!strncmp(soap->tmpbuf, "xmlns", 5)) - { if (soap->tmpbuf[5] == ':') - { soap->tmpbuf[5] = '\0'; - t = soap->tmpbuf + 6; - } - else if (soap->tmpbuf[5]) - t = NULL; - else - t = SOAP_STR_EOS; - } - else - t = NULL; - for (tp = soap->attributes; tp; tp = tp->next) - { if (!SOAP_STRCMP(tp->name, soap->tmpbuf)) - break; - } - if (!tp) - { tp = (struct soap_attribute*)SOAP_MALLOC(soap, sizeof(struct soap_attribute) + strlen(soap->tmpbuf)); - if (!tp) - return soap->error = SOAP_EOM; - strcpy(tp->name, soap->tmpbuf); - tp->value = NULL; - tp->size = 0; - tp->next = soap->attributes; - soap->attributes = tp; - } - while (soap_blank(c)) - c = soap_get(soap); - if (c == '=') - { do c = soap_get(soap); - while (soap_blank(c)); - if (c != SOAP_QT && c != SOAP_AP) - { soap_unget(soap, c); - c = ' '; /* blank delimiter */ - } - if (soap_getattrval(soap, tp->value, tp->size, c)) - { -#ifdef WITH_FAST - if (soap->error != SOAP_EOM) - return soap->error; - soap->error = SOAP_OK; - if (soap_store_lab(soap, tp->value, tp->size)) - return soap->error; - if (tp->value) - SOAP_FREE(soap, tp->value); - for (;;) - { if (soap_getattrval(soap, soap->labbuf + soap->labidx, soap->lablen - soap->labidx, c)) - { if (soap->error != SOAP_EOM) - return soap->error; - soap->error = SOAP_OK; - soap->labidx = soap->lablen; - if (soap_append_lab(soap, NULL, 0)) - return soap->error; - } - else - break; - } - if (soap->labidx) - tp->size = soap->lablen; - else - { tp->size = strlen(soap->labbuf) + 1; - if (tp->size < SOAP_LABLEN) - tp->size = SOAP_LABLEN; - } - if (!(tp->value = (char*)SOAP_MALLOC(soap, tp->size))) - return soap->error = SOAP_EOM; - strcpy(tp->value, soap->labbuf); -#else - size_t n; - if (soap->error != SOAP_EOM) - return soap->error; - soap->error = SOAP_OK; - if (soap_new_block(soap)) - return soap->error; - for (;;) - { if (!(s = (char*)soap_push_block(soap, SOAP_BLKLEN))) - return soap->error; - if (soap_getattrval(soap, s, SOAP_BLKLEN, c)) - { if (soap->error != SOAP_EOM) - return soap->error; - soap->error = SOAP_OK; - } - else - break; - } - n = tp->size + soap->blist->size; - if (!(s = (char*)SOAP_MALLOC(soap, n))) - return soap->error = SOAP_EOM; - if (tp->value) - { memcpy(s, tp->value, tp->size); - SOAP_FREE(soap, tp->value); - } - soap_save_block(soap, s + tp->size, 0); - tp->value = s; - tp->size = n; -#endif - } - do c = soap_get(soap); - while (soap_blank(c)); - tp->visible = 2; /* seen this attribute w/ value */ -#ifdef WITH_DOM - if (att) - (*att)->data = soap_strdup(soap, tp->value); -#endif - } - else - tp->visible = 1; /* seen this attribute w/o value */ -#ifdef WITH_DOM - if (att) - att = &(*att)->next; -#endif - if (t && tp->value) - { if (soap_push_namespace(soap, t, tp->value)) - return soap->error; - tp->visible = 0; - } - } -#ifdef WITH_DOM - if (att) - { soap->dom->nstr = soap_dom_current_nstr(soap, soap->tag); - for (att = &soap->dom->atts; *att; att = &(*att)->next) - (*att)->nstr = soap_dom_current_nstr(soap, (*att)->name); - } -#endif - if ((int)c == EOF) - return soap->error = SOAP_EOF; - if (!(soap->body = (c != '/'))) - do c = soap_get(soap); - while (soap_blank(c)); -#ifdef WITH_DOM - if (soap->mode & SOAP_XML_DOM) - { if (!soap->body && soap->dom->prnt) - soap->dom = soap->dom->prnt; - } -#endif - for (tp = soap->attributes; tp; tp = tp->next) - { if (tp->visible && tp->value) - { if (!strcmp(tp->name, "id")) - { *soap->id = '#'; - strncpy(soap->id + 1, tp->value, sizeof(soap->id) - 2); - soap->id[sizeof(soap->id)-1] = '\0'; - } - else if (!strcmp(tp->name, "href")) - { strncpy(soap->href, tp->value, sizeof(soap->href) - 1); - soap->href[sizeof(soap->href)-1] = '\0'; - } - else if ((soap->version == 2 || (soap->mode & SOAP_XML_GRAPH)) && !strcmp(tp->name, "ref")) - { *soap->href = '#'; - strncpy(soap->href + 1, tp->value, sizeof(soap->href) - 2); - soap->href[sizeof(soap->href)-1] = '\0'; - } - else if (!soap_match_tag(soap, tp->name, "xsi:type")) - { strncpy(soap->type, tp->value, sizeof(soap->type) - 1); - soap->type[sizeof(soap->type)-1] = '\0'; - } - else if (soap->version == 1 && !soap_match_tag(soap, tp->name, "SOAP-ENC:arrayType")) - { s = soap_strrchr(tp->value, '['); - if (s && (size_t)(s - tp->value) < sizeof(soap->arrayType)) - { strncpy(soap->arrayType, tp->value, s - tp->value); - soap->arrayType[s - tp->value] = '\0'; - strncpy(soap->arraySize, s, sizeof(soap->arraySize) - 1); - } - else - strncpy(soap->arrayType, tp->value, sizeof(soap->arrayType) - 1); - soap->arraySize[sizeof(soap->arrayType)-1] = '\0'; - soap->arrayType[sizeof(soap->arrayType)-1] = '\0'; - } - else if (soap->version == 2 && !soap_match_tag(soap, tp->name, "SOAP-ENC:itemType")) - strncpy(soap->arrayType, tp->value, sizeof(soap->arrayType) - 1); - else if (soap->version == 2 && !soap_match_tag(soap, tp->name, "SOAP-ENC:arraySize")) - strncpy(soap->arraySize, tp->value, sizeof(soap->arraySize) - 1); - else if (soap->version == 1 && !soap_match_tag(soap, tp->name, "SOAP-ENC:offset")) - strncpy(soap->arrayOffset, tp->value, sizeof(soap->arrayOffset)); - else if (soap->version == 1 && !soap_match_tag(soap, tp->name, "SOAP-ENC:position")) - soap->position = soap_getposition(tp->value, soap->positions); - else if (soap->version == 1 && !soap_match_tag(soap, tp->name, "SOAP-ENC:root")) - soap->root = ((!strcmp(tp->value, "1") || !strcmp(tp->value, "true"))); - else if ((soap->version == 1 && !soap_match_tag(soap, tp->name, "SOAP-ENV:actor")) - || (soap->version == 2 && !soap_match_tag(soap, tp->name, "SOAP-ENV:role"))) - { if ((!soap->actor || strcmp(soap->actor, tp->value)) - && strcmp(tp->value, "http://schemas.xmlsoap.org/soap/actor/next") - && strcmp(tp->value, "http://www.w3.org/2003/05/soap-envelope/role/next")) - soap->other = 1; - } - else if (!soap_match_tag(soap, tp->name, "SOAP-ENV:mustUnderstand") - && (!strcmp(tp->value, "1") || !strcmp(tp->value, "true"))) - soap->mustUnderstand = 1; - else if ((!soap_match_tag(soap, tp->name, "xsi:null") - || !soap_match_tag(soap, tp->name, "xsi:nil")) - && (!strcmp(tp->value, "1") - || !strcmp(tp->value, "true"))) - soap->null = 1; - } - } - return soap->error = SOAP_OK; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_retry(struct soap *soap) -{ soap->error = SOAP_OK; - soap_revert(soap); -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_revert(struct soap *soap) -{ if (!soap->peeked) - { soap->peeked = 1; - if (soap->body) - soap->level--; - } - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Reverting last element (level=%u)\n", soap->level)); -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_string_out(struct soap *soap, const char *s, int flag) -{ register const char *t; - register soap_wchar c; - register soap_wchar mask = 0xFFFFFF80UL; -#ifdef WITH_DOM - if ((soap->mode & SOAP_XML_DOM) && soap->dom) - { soap->dom->data = soap_strdup(soap, s); - return SOAP_OK; - } -#endif - if (soap->mode & SOAP_C_UTFSTRING) - mask = 0; - t = s; - while ((c = *t++)) - { switch (c) - { - case 9: - if (flag) - { if (soap_send_raw(soap, s, t - s - 1) || soap_send_raw(soap, " ", 5)) - return soap->error; - s = t; - } - break; - case 10: - if (flag || !(soap->mode & SOAP_XML_CANONICAL)) - { if (soap_send_raw(soap, s, t - s - 1) || soap_send_raw(soap, " ", 5)) - return soap->error; - s = t; - } - break; - case 13: - if (soap_send_raw(soap, s, t - s - 1) || soap_send_raw(soap, " ", 5)) - return soap->error; - s = t; - break; - case '&': - if (soap_send_raw(soap, s, t - s - 1) || soap_send_raw(soap, "&", 5)) - return soap->error; - s = t; - break; - case '<': - if (soap_send_raw(soap, s, t - s - 1) || soap_send_raw(soap, "<", 4)) - return soap->error; - s = t; - break; - case '>': - if (!flag) - { if (soap_send_raw(soap, s, t - s - 1) || soap_send_raw(soap, ">", 4)) - return soap->error; - s = t; - } - break; - case '"': - if (flag) - { if (soap_send_raw(soap, s, t - s - 1) || soap_send_raw(soap, """, 6)) - return soap->error; - s = t; - } - break; - default: -#ifndef WITH_LEANER -#ifdef HAVE_MBTOWC - if (soap->mode & SOAP_C_MBSTRING) - { wchar_t wc; - register int m = mbtowc(&wc, t - 1, MB_CUR_MAX); - if (m > 0 && wc != c) - { if (soap_send_raw(soap, s, t - s - 1) || soap_pututf8(soap, wc)) - return soap->error; - s = t += m - 1; - continue; - } - } -#endif -#endif - if (c & mask) - { if (soap_send_raw(soap, s, t - s - 1) || soap_pututf8(soap, (unsigned char)c)) - return soap->error; - s = t; - } - } - } - return soap_send_raw(soap, s, t - s - 1); -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -char * -SOAP_FMAC2 -soap_string_in(struct soap *soap, int flag, long minlen, long maxlen) -{ register char *s; - char *t = NULL; - register size_t i; - register long l = 0; - register int n = 0; - register int m = 0; - register soap_wchar c; -#if !defined(WITH_LEANER) && defined(HAVE_WCTOMB) - char buf[MB_LEN_MAX > 8 ? MB_LEN_MAX : 8]; -#else - char buf[8]; -#endif - DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Reading string content\n")); - if (soap->peeked) - { if (!soap->body) - return NULL; - if (*soap->tag) - { n = 1; - soap->peeked = 0; -#ifndef WITH_LEAN - t = soap->tmpbuf; - t[0] = '<'; - strncpy(t + 1, soap->tag, sizeof(soap->tmpbuf) - 1); - strncat(t, ">", sizeof(soap->tmpbuf)); - m = strlen(soap->tag) + 2; -#endif - } - } -#ifdef WITH_CDATA - if (!flag) - { register int state = 0; -#ifdef WITH_FAST - soap->labidx = 0; /* use look-aside buffer */ -#else - if (soap_new_block(soap)) - return NULL; -#endif - for (;;) - { -#ifdef WITH_FAST - register size_t k; - if (soap_append_lab(soap, NULL, 0)) /* allocate more space in look-aside buffer if necessary */ - return NULL; - s = soap->labbuf + soap->labidx; /* space to populate */ - k = soap->lablen - soap->labidx; /* number of bytes available */ - soap->labidx = soap->lablen; /* claim this space */ -#else - register size_t k = SOAP_BLKLEN; - if (!(s = (char*)soap_push_block(soap, k))) - return NULL; -#endif - for (i = 0; i < k; i++) - { if (m > 0) - { *s++ = *t++; /* copy multibyte characters */ - m--; - continue; - } - c = soap_getchar(soap); - if ((int)c == EOF) - goto end; - if (c >= 0x80 && !(soap->mode & SOAP_ENC_LATIN)) - { soap_unget(soap, c); - c = soap_getutf8(soap); - if (soap->mode & SOAP_C_UTFSTRING) - { if ((c & 0x80000000) && c >= -0x7FFFFF80 && c < SOAP_AP) - { c &= 0x7FFFFFFF; - t = buf; - if (c < 0x0800) - *t++ = (char)(0xC0 | ((c >> 6) & 0x1F)); - else - { if (c < 0x010000) - *t++ = (char)(0xE0 | ((c >> 12) & 0x0F)); - else - { if (c < 0x200000) - *t++ = (char)(0xF0 | ((c >> 18) & 0x07)); - else - { if (c < 0x04000000) - *t++ = (char)(0xF8 | ((c >> 24) & 0x03)); - else - { *t++ = (char)(0xFC | ((c >> 30) & 0x01)); - *t++ = (char)(0x80 | ((c >> 24) & 0x3F)); - } - *t++ = (char)(0x80 | ((c >> 18) & 0x3F)); - } - *t++ = (char)(0x80 | ((c >> 12) & 0x3F)); - } - *t++ = (char)(0x80 | ((c >> 6) & 0x3F)); - } - *t++ = (char)(0x80 | (c & 0x3F)); - m = (int)(t - buf) - 1; - t = buf; - *s++ = *t++; - continue; - } - } - } - switch (state) - { case 1: - if (c == ']') - state = 4; - *s++ = c; - continue; - case 2: - if (c == '-') - state = 6; - *s++ = c; - continue; - case 3: - if (c == '?') - state = 8; - *s++ = c; - continue; - /* CDATA */ - case 4: - if (c == ']') - state = 5; - else - state = 1; - *s++ = c; - continue; - case 5: - if (c == '>') - state = 0; - else - state = 1; - *s++ = c; - continue; - /* comment */ - case 6: - if (c == '-') - state = 7; - else - state = 2; - *s++ = c; - continue; - case 7: - if (c == '>') - state = 0; - else - state = 2; - *s++ = c; - continue; - /* PI */ - case 8: - if (c == '>') - state = 0; - else - state = 3; - *s++ = c; - continue; - } - switch (c) - { - case '/': - if (n > 0) - { c = soap_getchar(soap); - if (c == '>') - n--; - soap_unget(soap, c); - } - *s++ = '/'; - break; - case '<': - c = soap_getchar(soap); - if (c == '/') - { if (n == 0) - { c = SOAP_TT; - goto end; - } - n--; - } - else if (c == '!') - { c = soap_getchar(soap); - if (c == '[') - { do c = soap_getchar(soap); - while ((int)c != EOF && c != '['); - if ((int)c == EOF) - goto end; - t = (char*)"![CDATA["; - m = 8; - state = 1; - } - else if (c == '-') - { if ((c = soap_getchar(soap)) == '-') - state = 2; - t = (char*)"!-"; - m = 2; - soap_unget(soap, c); - } - else - { t = (char*)"!"; - m = 1; - soap_unget(soap, c); - } - *s++ = '<'; - break; - } - else if (c == '?') - state = 3; - else - n++; - soap_unget(soap, c); - *s++ = '<'; - break; - case '>': - *s++ = '>'; - break; - case '"': - *s++ = '"'; - break; - default: -#ifndef WITH_LEANER -#ifdef HAVE_WCTOMB - if (soap->mode & SOAP_C_MBSTRING) - { m = wctomb(buf, c & 0x7FFFFFFF); - if (m >= 1 && m <= (int)MB_CUR_MAX) - { t = buf; - *s++ = *t++; - m--; - } - else - { *s++ = SOAP_UNKNOWN_CHAR; - m = 0; - } - } - else -#endif -#endif - *s++ = (char)(c & 0xFF); - } - l++; - if ((soap->mode & SOAP_XML_STRICT) && maxlen >= 0 && l > maxlen) - { DBGLOG(TEST,SOAP_MESSAGE(fdebug, "String too long: maxlen=%ld\n", maxlen)); - soap->error = SOAP_LENGTH; - return NULL; - } - } - } - } -#endif -#ifdef WITH_FAST - soap->labidx = 0; /* use look-aside buffer */ -#else - if (soap_new_block(soap)) - return NULL; -#endif - for (;;) - { -#ifdef WITH_FAST - register size_t k; - if (soap_append_lab(soap, NULL, 0)) /* allocate more space in look-aside buffer if necessary */ - return NULL; - s = soap->labbuf + soap->labidx; /* space to populate */ - k = soap->lablen - soap->labidx; /* number of bytes available */ - soap->labidx = soap->lablen; /* claim this space */ -#else - register size_t k = SOAP_BLKLEN; - if (!(s = (char*)soap_push_block(soap, k))) - return NULL; -#endif - for (i = 0; i < k; i++) - { if (m > 0) - { *s++ = *t++; /* copy multibyte characters */ - m--; - continue; - } - if (soap->mode & SOAP_C_UTFSTRING) - { if (((c = soap_get(soap)) & 0x80000000) && c >= -0x7FFFFF80 && c < SOAP_AP) - { c &= 0x7FFFFFFF; - t = buf; - if (c < 0x0800) - *t++ = (char)(0xC0 | ((c >> 6) & 0x1F)); - else - { if (c < 0x010000) - *t++ = (char)(0xE0 | ((c >> 12) & 0x0F)); - else - { if (c < 0x200000) - *t++ = (char)(0xF0 | ((c >> 18) & 0x07)); - else - { if (c < 0x04000000) - *t++ = (char)(0xF8 | ((c >> 24) & 0x03)); - else - { *t++ = (char)(0xFC | ((c >> 30) & 0x01)); - *t++ = (char)(0x80 | ((c >> 24) & 0x3F)); - } - *t++ = (char)(0x80 | ((c >> 18) & 0x3F)); - } - *t++ = (char)(0x80 | ((c >> 12) & 0x3F)); - } - *t++ = (char)(0x80 | ((c >> 6) & 0x3F)); - } - *t++ = (char)(0x80 | (c & 0x3F)); - m = (int)(t - buf) - 1; - t = buf; - *s++ = *t++; - continue; - } - } - else - c = soap_getutf8(soap); - switch (c) - { - case SOAP_TT: - if (n == 0) - goto end; - n--; - *s++ = '<'; - t = (char*)"/"; - m = 1; - break; - case SOAP_LT: - n++; - *s++ = '<'; - break; - case SOAP_GT: - *s++ = '>'; - break; - case SOAP_QT: - *s++ = '"'; - break; - case SOAP_AP: - *s++ = '\''; - break; - case '/': - if (n > 0) - { c = soap_get(soap); - if (c == SOAP_GT) - n--; - soap_unget(soap, c); - } - *s++ = '/'; - break; - case '<' | 0x80000000: - if (flag) - *s++ = '<'; - else - { *s++ = '&'; - t = (char*)"lt;"; - m = 3; - } - break; - case '>' | 0x80000000: - if (flag) - *s++ = '>'; - else - { *s++ = '&'; - t = (char*)"gt;"; - m = 3; - } - break; - case '&' | 0x80000000: - if (flag) - *s++ = '&'; - else - { *s++ = '&'; - t = (char*)"amp;"; - m = 4; - } - break; - case '"' | 0x80000000: - if (flag) - *s++ = '"'; - else - { *s++ = '&'; - t = (char*)"quot;"; - m = 5; - } - break; - case '\'' | 0x80000000: - if (flag) - *s++ = '\''; - else - { *s++ = '&'; - t = (char*)"apos;"; - m = 5; - } - break; - default: - if ((int)c == EOF) - goto end; -#ifndef WITH_LEANER -#ifdef HAVE_WCTOMB - if (soap->mode & SOAP_C_MBSTRING) - { m = wctomb(buf, c & 0x7FFFFFFF); - if (m >= 1 && m <= (int)MB_CUR_MAX) - { t = buf; - *s++ = *t++; - m--; - } - else - { *s++ = SOAP_UNKNOWN_CHAR; - m = 0; - } - } - else -#endif -#endif - *s++ = (char)(c & 0xFF); - } - l++; - if ((soap->mode & SOAP_XML_STRICT) && maxlen >= 0 && l > maxlen) - { DBGLOG(TEST,SOAP_MESSAGE(fdebug, "String too long: maxlen=%ld\n", maxlen)); - soap->error = SOAP_LENGTH; - return NULL; - } - } - } -end: - soap_unget(soap, c); - *s = '\0'; -#ifdef WITH_FAST - t = soap_strdup(soap, soap->labbuf); -#else - soap_size_block(soap, i+1); - t = soap_save_block(soap, NULL, 0); -#endif - if ((soap->mode & SOAP_XML_STRICT) && l < minlen) - { DBGLOG(TEST,SOAP_MESSAGE(fdebug, "String too short: %ld chars, minlen=%ld\n", l, minlen)); - soap->error = SOAP_LENGTH; - return NULL; - } -#ifdef WITH_DOM - if ((soap->mode & SOAP_XML_DOM) && soap->dom) - { if (flag == 3) - soap->dom->tail = t; - else - soap->dom->data = t; - } -#endif - if (flag == 2) - if (soap_s2QName(soap, t, &t)) - return NULL; - return t; -} -#endif - -/******************************************************************************/ -#ifndef WITH_LEANER -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_wstring_out(struct soap *soap, const wchar_t *s, int flag) -{ const char *t; - char tmp; - register soap_wchar c; -#ifdef WITH_DOM - if ((soap->mode & SOAP_XML_DOM) && soap->dom) - { wchar_t *r = (wchar_t*)s; - int n = 1; - while (*r++) - n++; - soap->dom->wide = r = (wchar_t*)soap_malloc(soap, n * sizeof(wchar_t)); - while (n--) - *r++ = *s++; - return SOAP_OK; - } -#endif - while ((c = *s++)) - { switch (c) - { - case 9: - if (flag) - t = " "; - else - t = "\t"; - break; - case 10: - if (flag || !(soap->mode & SOAP_XML_CANONICAL)) - t = " "; - else - t = "\n"; - break; - case 13: - t = " "; - break; - case '&': - t = "&"; - break; - case '<': - t = "<"; - break; - case '>': - if (flag) - t = ">"; - else - t = ">"; - break; - case '"': - if (flag) - t = """; - else - t = "\""; - break; - default: - if (c > 0 && c < 0x80) - { tmp = (char)c; - if (soap_send_raw(soap, &tmp, 1)) - return soap->error; - } - else if (soap_pututf8(soap, (unsigned long)c)) - return soap->error; - continue; - } - if (soap_send(soap, t)) - return soap->error; - } - return SOAP_OK; -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_LEANER -#ifndef PALM_2 -SOAP_FMAC1 -wchar_t * -SOAP_FMAC2 -soap_wstring_in(struct soap *soap, int flag, long minlen, long maxlen) -{ wchar_t *s; - register int i, n = 0; - register long l = 0; - register soap_wchar c; - const char *t = NULL; - DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Reading wide string content\n")); - if (soap->peeked) - { if (!soap->body) - return NULL; - if (*soap->tag) - { n = 1; - soap->peeked = 0; - } - } - if (soap_new_block(soap)) - return NULL; - for (;;) - { if (!(s = (wchar_t*)soap_push_block(soap, sizeof(wchar_t)*SOAP_BLKLEN))) - return NULL; - for (i = 0; i < SOAP_BLKLEN; i++) - { if (t) - { *s++ = (wchar_t)*t++; - if (!*t) - t = NULL; - continue; - } - c = soap_getutf8(soap); - switch (c) - { - case SOAP_TT: - if (n == 0) - goto end; - n--; - *s++ = '<'; - soap_unget(soap, '/'); - break; - case SOAP_LT: - n++; - *s++ = '<'; - break; - case SOAP_GT: - *s++ = '>'; - break; - case SOAP_QT: - *s++ = '"'; - break; - case SOAP_AP: - *s++ = '\''; - break; - case '/': - if (n > 0) - { c = soap_getutf8(soap); - if (c == SOAP_GT) - n--; - soap_unget(soap, c); - } - *s++ = '/'; - break; - case '<': - if (flag) - *s++ = (soap_wchar)'<'; - else - { *s++ = (soap_wchar)'&'; - t = "lt;"; - } - break; - case '>': - if (flag) - *s++ = (soap_wchar)'>'; - else - { *s++ = (soap_wchar)'&'; - t = "gt;"; - } - break; - case '"': - if (flag) - *s++ = (soap_wchar)'"'; - else - { *s++ = (soap_wchar)'&'; - t = "quot;"; - } - break; - default: - if ((int)c == EOF) - goto end; - *s++ = (wchar_t)c & 0x7FFFFFFF; - } - l++; - if ((soap->mode & SOAP_XML_STRICT) && maxlen >= 0 && l > maxlen) - { DBGLOG(TEST,SOAP_MESSAGE(fdebug, "String too long: maxlen=%ld\n", maxlen)); - soap->error = SOAP_LENGTH; - return NULL; - } - } - } -end: - soap_unget(soap, c); - *s = '\0'; - soap_size_block(soap, sizeof(wchar_t) * (i + 1)); - if ((soap->mode & SOAP_XML_STRICT) && l < minlen) - { DBGLOG(TEST,SOAP_MESSAGE(fdebug, "String too short: %ld chars, minlen=%ld\n", l, minlen)); - soap->error = SOAP_LENGTH; - return NULL; - } - s = (wchar_t*)soap_save_block(soap, NULL, 0); -#ifdef WITH_DOM - if ((soap->mode & SOAP_XML_DOM) && soap->dom) - soap->dom->wide = s; -#endif - return s; -} -#endif -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -const char* -SOAP_FMAC2 -soap_int2s(struct soap *soap, int n) -{ return soap_long2s(soap, (long)n); -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_outint(struct soap *soap, const char *tag, int id, const int *p, const char *type, int n) -{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type) - || soap_string_out(soap, soap_long2s(soap, (long)*p), 0)) - return soap->error; - return soap_element_end_out(soap, tag); -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_s2int(struct soap *soap, const char *s, int *p) -{ if (s) - { char *r; - *p = (int)soap_strtol(s, &r, 10); - if ((s == r && (soap->mode & SOAP_XML_STRICT)) || *r -#ifndef WITH_NOIO -#ifndef WITH_LEAN - || soap_errno == SOAP_ERANGE -#endif -#endif - ) - soap->error = SOAP_TYPE; - } - return soap->error; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int * -SOAP_FMAC2 -soap_inint(struct soap *soap, const char *tag, int *p, const char *type, int t) -{ if (soap_element_begin_in(soap, tag, 0)) - return NULL; -#ifndef WITH_LEAN - if (*soap->type - && soap_match_tag(soap, soap->type, type) - && soap_match_tag(soap, soap->type, ":int") - && soap_match_tag(soap, soap->type, ":short") - && soap_match_tag(soap, soap->type, ":byte")) - { soap->error = SOAP_TYPE; - soap_revert(soap); - return NULL; - } -#endif - p = (int*)soap_id_enter(soap, soap->id, p, t, sizeof(int), 0, NULL, NULL, NULL); - if (*soap->href) - p = (int*)soap_id_forward(soap, soap->href, p, t, 0, sizeof(int), 0, NULL); - else if (p) - { if (soap_s2int(soap, soap_value(soap), p)) - return NULL; - } - if (soap->body && soap_element_end_in(soap, tag)) - return NULL; - return p; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -const char* -SOAP_FMAC2 -soap_long2s(struct soap *soap, long n) -{ sprintf(soap->tmpbuf, "%ld", n); - return soap->tmpbuf; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_outlong(struct soap *soap, const char *tag, int id, const long *p, const char *type, int n) -{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type) - || soap_string_out(soap, soap_long2s(soap, *p), 0)) - return soap->error; - return soap_element_end_out(soap, tag); -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_s2long(struct soap *soap, const char *s, long *p) -{ if (s) - { char *r; - *p = soap_strtol(s, &r, 10); - if ((s == r && (soap->mode & SOAP_XML_STRICT)) || *r -#ifndef WITH_NOIO -#ifndef WITH_LEAN - || soap_errno == SOAP_ERANGE -#endif -#endif - ) - soap->error = SOAP_TYPE; - } - return soap->error; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -long * -SOAP_FMAC2 -soap_inlong(struct soap *soap, const char *tag, long *p, const char *type, int t) -{ if (soap_element_begin_in(soap, tag, 0)) - return NULL; -#ifndef WITH_LEAN - if (*soap->type - && soap_match_tag(soap, soap->type, type) - && soap_match_tag(soap, soap->type, ":int") - && soap_match_tag(soap, soap->type, ":short") - && soap_match_tag(soap, soap->type, ":byte")) - { soap->error = SOAP_TYPE; - soap_revert(soap); - return NULL; - } -#endif - p = (long*)soap_id_enter(soap, soap->id, p, t, sizeof(long), 0, NULL, NULL, NULL); - if (*soap->href) - p = (long*)soap_id_forward(soap, soap->href, p, t, 0, sizeof(long), 0, NULL); - else if (p) - { if (soap_s2long(soap, soap_value(soap), p)) - return NULL; - } - if (soap->body && soap_element_end_in(soap, tag)) - return NULL; - return p; -} -#endif - -/******************************************************************************/ -#ifndef WITH_LEAN -SOAP_FMAC1 -const char* -SOAP_FMAC2 -soap_LONG642s(struct soap *soap, LONG64 n) -{ sprintf(soap->tmpbuf, SOAP_LONG_FORMAT, n); - return soap->tmpbuf; -} -#endif - -/******************************************************************************/ -#ifndef WITH_LEAN -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_outLONG64(struct soap *soap, const char *tag, int id, const LONG64 *p, const char *type, int n) -{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type) - || soap_string_out(soap, soap_LONG642s(soap, *p), 0)) - return soap->error; - return soap_element_end_out(soap, tag); -} -#endif - -/******************************************************************************/ -#ifndef WITH_LEAN -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_s2LONG64(struct soap *soap, const char *s, LONG64 *p) -{ if (s) - { -#ifdef HAVE_STRTOLL - char *r; - *p = strtoll(s, &r, 10); - if ((s == r && (soap->mode & SOAP_XML_STRICT)) || *r -#ifndef WITH_NOIO -#ifndef WITH_LEAN - || soap_errno == SOAP_ERANGE -#endif -#endif - ) -#else -# ifdef HAVE_SSCANF - if (sscanf(s, SOAP_LONG_FORMAT, p) != 1) -# endif -#endif - soap->error = SOAP_TYPE; - } - return soap->error; -} -#endif - -/******************************************************************************/ -#ifndef WITH_LEAN -SOAP_FMAC1 -LONG64 * -SOAP_FMAC2 -soap_inLONG64(struct soap *soap, const char *tag, LONG64 *p, const char *type, int t) -{ if (soap_element_begin_in(soap, tag, 0)) - return NULL; -#ifndef WITH_LEAN - if (*soap->type - && soap_match_tag(soap, soap->type, type) - && soap_match_tag(soap, soap->type, ":integer") - && soap_match_tag(soap, soap->type, ":positiveInteger") - && soap_match_tag(soap, soap->type, ":negativeInteger") - && soap_match_tag(soap, soap->type, ":nonPositiveInteger") - && soap_match_tag(soap, soap->type, ":nonNegativeInteger") - && soap_match_tag(soap, soap->type, ":long") - && soap_match_tag(soap, soap->type, ":int") - && soap_match_tag(soap, soap->type, ":short") - && soap_match_tag(soap, soap->type, ":byte")) - { soap->error = SOAP_TYPE; - soap_revert(soap); - return NULL; - } -#endif - p = (LONG64*)soap_id_enter(soap, soap->id, p, t, sizeof(LONG64), 0, NULL, NULL, NULL); - if (*soap->href) - p = (LONG64*)soap_id_forward(soap, soap->href, p, t, 0, sizeof(LONG64), 0, NULL); - else if (p) - { if (soap_s2LONG64(soap, soap_value(soap), p)) - return NULL; - } - if (soap->body && soap_element_end_in(soap, tag)) - return NULL; - return p; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -const char* -SOAP_FMAC2 -soap_byte2s(struct soap *soap, char n) -{ return soap_long2s(soap, (long)n); -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_outbyte(struct soap *soap, const char *tag, int id, const char *p, const char *type, int n) -{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type) - || soap_string_out(soap, soap_long2s(soap, (long)*p), 0)) - return soap->error; - return soap_element_end_out(soap, tag); -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_s2byte(struct soap *soap, const char *s, char *p) -{ if (s) - { long n; - char *r; - n = soap_strtol(s, &r, 10); - if (s == r || *r || n < -128 || n > 127) - soap->error = SOAP_TYPE; - *p = (char)n; - } - return soap->error; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -char * -SOAP_FMAC2 -soap_inbyte(struct soap *soap, const char *tag, char *p, const char *type, int t) -{ if (soap_element_begin_in(soap, tag, 0)) - return NULL; -#ifndef WITH_LEAN - if (*soap->type - && soap_match_tag(soap, soap->type, type) - && soap_match_tag(soap, soap->type, ":byte")) - { soap->error = SOAP_TYPE; - soap_revert(soap); - return NULL; - } -#endif - p = (char*)soap_id_enter(soap, soap->id, p, t, sizeof(char), 0, NULL, NULL, NULL); - if (*soap->href) - p = (char*)soap_id_forward(soap, soap->href, p, t, 0, sizeof(char), 0, NULL); - else if (p) - { if (soap_s2byte(soap, soap_value(soap), p)) - return NULL; - } - if (soap->body && soap_element_end_in(soap, tag)) - return NULL; - return p; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -const char* -SOAP_FMAC2 -soap_short2s(struct soap *soap, short n) -{ return soap_long2s(soap, (long)n); -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_outshort(struct soap *soap, const char *tag, int id, const short *p, const char *type, int n) -{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type) - || soap_string_out(soap, soap_long2s(soap, (long)*p), 0)) - return soap->error; - return soap_element_end_out(soap, tag); -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_s2short(struct soap *soap, const char *s, short *p) -{ if (s) - { long n; - char *r; - n = soap_strtol(s, &r, 10); - if (s == r || *r || n < -32768 || n > 32767) - soap->error = SOAP_TYPE; - *p = (short)n; - } - return soap->error; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -short * -SOAP_FMAC2 -soap_inshort(struct soap *soap, const char *tag, short *p, const char *type, int t) -{ if (soap_element_begin_in(soap, tag, 0)) - return NULL; -#ifndef WITH_LEAN - if (*soap->type - && soap_match_tag(soap, soap->type, type) - && soap_match_tag(soap, soap->type, ":short") - && soap_match_tag(soap, soap->type, ":byte")) - { soap->error = SOAP_TYPE; - soap_revert(soap); - return NULL; - } -#endif - p = (short*)soap_id_enter(soap, soap->id, p, t, sizeof(short), 0, NULL, NULL, NULL); - if (*soap->href) - p = (short*)soap_id_forward(soap, soap->href, p, t, 0, sizeof(short), 0, NULL); - else if (p) - { if (soap_s2short(soap, soap_value(soap), p)) - return NULL; - } - if (soap->body && soap_element_end_in(soap, tag)) - return NULL; - return p; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -const char* -SOAP_FMAC2 -soap_float2s(struct soap *soap, float n) -{ const char *s; - if (soap_isnan((double)n)) - s = "NaN"; - else if (soap_ispinff(n)) - s = "INF"; - else if (soap_isninff(n)) - s = "-INF"; - else - { sprintf(soap->tmpbuf, soap->float_format, n); - s = soap->tmpbuf; - } - return s; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_outfloat(struct soap *soap, const char *tag, int id, const float *p, const char *type, int n) -{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type) - || soap_string_out(soap, soap_float2s(soap, *p), 0)) - return soap->error; - return soap_element_end_out(soap, tag); -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_s2float(struct soap *soap, const char *s, float *p) -{ if (s) - { if (!*s) - return soap->error = SOAP_TYPE; - if (!soap_tag_cmp(s, "INF")) - *p = FLT_PINFTY; - else if (!soap_tag_cmp(s, "+INF")) - *p = FLT_PINFTY; - else if (!soap_tag_cmp(s, "-INF")) - *p = FLT_NINFTY; - else if (!soap_tag_cmp(s, "NaN")) - *p = FLT_NAN; - else - { -/* On some systems, strtof appears to be broken or doesn't link: use with caution */ -#if defined(HAVE_STRTOF) - char *r; - *p = strtof((char*)s, &r); - if (*r) -#elif defined(HAVE_STRTOD) - char *r; - *p = (float)strtod(s, &r); - if (*r) -#endif -#ifdef HAVE_SSCANF - if (sscanf(s, "%g", p) != 1) - soap->error = SOAP_TYPE; -#else - soap->error = SOAP_TYPE; -#endif - } - } - return soap->error; -} -#endif - -/******************************************************************************/ -#ifndef WITH_LEAN -static int soap_isnumeric(struct soap *soap, const char *type) -{ if (soap_match_tag(soap, soap->type, type) - && soap_match_tag(soap, soap->type, ":float") - && soap_match_tag(soap, soap->type, ":double") - && soap_match_tag(soap, soap->type, ":decimal") - && soap_match_tag(soap, soap->type, ":integer") - && soap_match_tag(soap, soap->type, ":positiveInteger") - && soap_match_tag(soap, soap->type, ":negativeInteger") - && soap_match_tag(soap, soap->type, ":nonPositiveInteger") - && soap_match_tag(soap, soap->type, ":nonNegativeInteger") - && soap_match_tag(soap, soap->type, ":long") - && soap_match_tag(soap, soap->type, ":int") - && soap_match_tag(soap, soap->type, ":short") - && soap_match_tag(soap, soap->type, ":byte") - && soap_match_tag(soap, soap->type, ":unsignedLong") - && soap_match_tag(soap, soap->type, ":unsignedInt") - && soap_match_tag(soap, soap->type, ":unsignedShort") - && soap_match_tag(soap, soap->type, ":unsignedByte")) - { soap->error = SOAP_TYPE; - soap_revert(soap); - return SOAP_ERR; - } - return SOAP_OK; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -float * -SOAP_FMAC2 -soap_infloat(struct soap *soap, const char *tag, float *p, const char *type, int t) -{ if (soap_element_begin_in(soap, tag, 0)) - return NULL; -#ifndef WITH_LEAN - if (*soap->type != '\0' && soap_isnumeric(soap, type)) - return NULL; -#endif - p = (float*)soap_id_enter(soap, soap->id, p, t, sizeof(float), 0, NULL, NULL, NULL); - if (*soap->href) - p = (float*)soap_id_forward(soap, soap->href, p, t, 0, sizeof(float), 0, NULL); - else if (p) - { if (soap_s2float(soap, soap_value(soap), p)) - return NULL; - } - if (soap->body && soap_element_end_in(soap, tag)) - return NULL; - return p; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -const char* -SOAP_FMAC2 -soap_double2s(struct soap *soap, double n) -{ const char *s; - if (soap_isnan(n)) - s = "NaN"; - else if (soap_ispinfd(n)) - s = "INF"; - else if (soap_isninfd(n)) - s = "-INF"; - else - { sprintf(soap->tmpbuf, soap->double_format, n); - s = soap->tmpbuf; - } - return s; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_outdouble(struct soap *soap, const char *tag, int id, const double *p, const char *type, int n) -{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type) - || soap_string_out(soap, soap_double2s(soap, *p), 0)) - return soap->error; - return soap_element_end_out(soap, tag); -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_s2double(struct soap *soap, const char *s, double *p) -{ if (s) - { if (!*s) - return soap->error = SOAP_TYPE; - if (!soap_tag_cmp(s, "INF")) - *p = DBL_PINFTY; - else if (!soap_tag_cmp(s, "+INF")) - *p = DBL_PINFTY; - else if (!soap_tag_cmp(s, "-INF")) - *p = DBL_NINFTY; - else if (!soap_tag_cmp(s, "NaN")) - *p = DBL_NAN; - else - { -#ifdef HAVE_STRTOD - char *r; - *p = strtod(s, &r); - if (*r) -#endif -#ifdef HAVE_SSCANF - if (sscanf(s, "%lg", p) != 1) - soap->error = SOAP_TYPE; -#else - soap->error = SOAP_TYPE; -#endif - } - } - return soap->error; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -double * -SOAP_FMAC2 -soap_indouble(struct soap *soap, const char *tag, double *p, const char *type, int t) -{ if (soap_element_begin_in(soap, tag, 0)) - return NULL; -#ifndef WITH_LEAN - if (*soap->type != '\0' && soap_isnumeric(soap, type)) - return NULL; -#endif - p = (double*)soap_id_enter(soap, soap->id, p, t, sizeof(double), 0, NULL, NULL, NULL); - if (*soap->href) - p = (double*)soap_id_forward(soap, soap->href, p, t, 0, sizeof(double), 0, NULL); - else if (p) - { if (soap_s2double(soap, soap_value(soap), p)) - return NULL; - } - if (soap->body && soap_element_end_in(soap, tag)) - return NULL; - return p; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -const char* -SOAP_FMAC2 -soap_unsignedByte2s(struct soap *soap, unsigned char n) -{ return soap_unsignedLong2s(soap, (unsigned long)n); -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_outunsignedByte(struct soap *soap, const char *tag, int id, const unsigned char *p, const char *type, int n) -{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type) - || soap_string_out(soap, soap_unsignedLong2s(soap, (unsigned long)*p), 0)) - return soap->error; - return soap_element_end_out(soap, tag); -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_s2unsignedByte(struct soap *soap, const char *s, unsigned char *p) -{ if (s) - { unsigned long n; - char *r; - n = soap_strtoul(s, &r, 10); - if (s == r || *r || n > 255) - soap->error = SOAP_TYPE; - *p = (unsigned char)n; - } - return soap->error; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -unsigned char * -SOAP_FMAC2 -soap_inunsignedByte(struct soap *soap, const char *tag, unsigned char *p, const char *type, int t) -{ if (soap_element_begin_in(soap, tag, 0)) - return NULL; -#ifndef WITH_LEAN - if (*soap->type - && soap_match_tag(soap, soap->type, type) - && soap_match_tag(soap, soap->type, ":unsignedByte")) - { soap->error = SOAP_TYPE; - soap_revert(soap); - return NULL; - } -#endif - p = (unsigned char*)soap_id_enter(soap, soap->id, p, t, sizeof(unsigned char), 0, NULL, NULL, NULL); - if (*soap->href) - p = (unsigned char*)soap_id_forward(soap, soap->href, p, t, 0, sizeof(unsigned char), 0, NULL); - else if (p) - { if (soap_s2unsignedByte(soap, soap_value(soap), p)) - return NULL; - } - if (soap->body && soap_element_end_in(soap, tag)) - return NULL; - return p; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -const char* -SOAP_FMAC2 -soap_unsignedShort2s(struct soap *soap, unsigned short n) -{ return soap_unsignedLong2s(soap, (unsigned long)n); -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_outunsignedShort(struct soap *soap, const char *tag, int id, const unsigned short *p, const char *type, int n) -{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type) - || soap_string_out(soap, soap_unsignedLong2s(soap, (unsigned long)*p), 0)) - return soap->error; - return soap_element_end_out(soap, tag); -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_s2unsignedShort(struct soap *soap, const char *s, unsigned short *p) -{ if (s) - { unsigned long n; - char *r; - n = soap_strtoul(s, &r, 10); - if (s == r || *r || n > 65535) - soap->error = SOAP_TYPE; - *p = (unsigned short)n; - } - return soap->error; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -unsigned short * -SOAP_FMAC2 -soap_inunsignedShort(struct soap *soap, const char *tag, unsigned short *p, const char *type, int t) -{ if (soap_element_begin_in(soap, tag, 0)) - return NULL; -#ifndef WITH_LEAN - if (*soap->type - && soap_match_tag(soap, soap->type, type) - && soap_match_tag(soap, soap->type, ":unsignedShort") - && soap_match_tag(soap, soap->type, ":unsignedByte")) - { soap->error = SOAP_TYPE; - soap_revert(soap); - return NULL; - } -#endif - p = (unsigned short*)soap_id_enter(soap, soap->id, p, t, sizeof(unsigned short), 0, NULL, NULL, NULL); - if (*soap->href) - p = (unsigned short*)soap_id_forward(soap, soap->href, p, t, 0, sizeof(unsigned short), 0, NULL); - else if (p) - { if (soap_s2unsignedShort(soap, soap_value(soap), p)) - return NULL; - } - if (soap->body && soap_element_end_in(soap, tag)) - return NULL; - return p; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -const char* -SOAP_FMAC2 -soap_unsignedInt2s(struct soap *soap, unsigned int n) -{ return soap_unsignedLong2s(soap, (unsigned long)n); -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_outunsignedInt(struct soap *soap, const char *tag, int id, const unsigned int *p, const char *type, int n) -{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type) - || soap_string_out(soap, soap_unsignedLong2s(soap, (unsigned long)*p), 0)) - return soap->error; - return soap_element_end_out(soap, tag); -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_s2unsignedInt(struct soap *soap, const char *s, unsigned int *p) -{ if (s) - { char *r; - *p = (unsigned int)soap_strtoul(s, &r, 10); - if ((s == r && (soap->mode & SOAP_XML_STRICT)) || *r -#ifndef WITH_NOIO -#ifndef WITH_LEAN - || soap_errno == SOAP_ERANGE -#endif -#endif - ) - soap->error = SOAP_TYPE; - } - return soap->error; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -unsigned int * -SOAP_FMAC2 -soap_inunsignedInt(struct soap *soap, const char *tag, unsigned int *p, const char *type, int t) -{ if (soap_element_begin_in(soap, tag, 0)) - return NULL; -#ifndef WITH_LEAN - if (*soap->type - && soap_match_tag(soap, soap->type, type) - && soap_match_tag(soap, soap->type, ":unsignedInt") - && soap_match_tag(soap, soap->type, ":unsignedShort") - && soap_match_tag(soap, soap->type, ":unsignedByte")) - { soap->error = SOAP_TYPE; - soap_revert(soap); - return NULL; - } -#endif - p = (unsigned int*)soap_id_enter(soap, soap->id, p, t, sizeof(unsigned int), 0, NULL, NULL, NULL); - if (*soap->href) - p = (unsigned int*)soap_id_forward(soap, soap->href, p, t, 0, sizeof(unsigned int), 0, NULL); - else if (p) - { if (soap_s2unsignedInt(soap, soap_value(soap), p)) - return NULL; - } - if (soap->body && soap_element_end_in(soap, tag)) - return NULL; - return p; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -const char* -SOAP_FMAC2 -soap_unsignedLong2s(struct soap *soap, unsigned long n) -{ sprintf(soap->tmpbuf, "%lu", n); - return soap->tmpbuf; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_outunsignedLong(struct soap *soap, const char *tag, int id, const unsigned long *p, const char *type, int n) -{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type) - || soap_string_out(soap, soap_unsignedLong2s(soap, *p), 0)) - return soap->error; - return soap_element_end_out(soap, tag); -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_s2unsignedLong(struct soap *soap, const char *s, unsigned long *p) -{ if (s) - { char *r; - *p = soap_strtoul(s, &r, 10); - if ((s == r && (soap->mode & SOAP_XML_STRICT)) || *r -#ifndef WITH_NOIO -#ifndef WITH_LEAN - || soap_errno == SOAP_ERANGE -#endif -#endif - ) - soap->error = SOAP_TYPE; - } - return soap->error; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -unsigned long * -SOAP_FMAC2 -soap_inunsignedLong(struct soap *soap, const char *tag, unsigned long *p, const char *type, int t) -{ if (soap_element_begin_in(soap, tag, 0)) - return NULL; -#ifndef WITH_LEAN - if (*soap->type - && soap_match_tag(soap, soap->type, type) - && soap_match_tag(soap, soap->type, ":unsignedInt") - && soap_match_tag(soap, soap->type, ":unsignedShort") - && soap_match_tag(soap, soap->type, ":unsignedByte")) - { soap->error = SOAP_TYPE; - soap_revert(soap); - return NULL; - } -#endif - p = (unsigned long*)soap_id_enter(soap, soap->id, p, t, sizeof(unsigned long), 0, NULL, NULL, NULL); - if (*soap->href) - p = (unsigned long*)soap_id_forward(soap, soap->href, p, t, 0, sizeof(unsigned long), 0, NULL); - else if (p) - { if (soap_s2unsignedLong(soap, soap_value(soap), p)) - return NULL; - } - if (soap->body && soap_element_end_in(soap, tag)) - return NULL; - return p; -} -#endif - -/******************************************************************************/ -#ifndef WITH_LEAN -SOAP_FMAC1 -const char* -SOAP_FMAC2 -soap_ULONG642s(struct soap *soap, ULONG64 n) -{ sprintf(soap->tmpbuf, SOAP_ULONG_FORMAT, n); - return soap->tmpbuf; -} -#endif - -/******************************************************************************/ -#ifndef WITH_LEAN -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_outULONG64(struct soap *soap, const char *tag, int id, const ULONG64 *p, const char *type, int n) -{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type) - || soap_string_out(soap, soap_ULONG642s(soap, *p), 0)) - return soap->error; - return soap_element_end_out(soap, tag); -} -#endif - -/******************************************************************************/ -#ifndef WITH_LEAN -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_s2ULONG64(struct soap *soap, const char *s, ULONG64 *p) -{ if (s) - { -#ifdef HAVE_STRTOULL - char *r; - *p = strtoull(s, &r, 10); - if ((s == r && (soap->mode & SOAP_XML_STRICT)) || *r -#ifndef WITH_NOIO -#ifndef WITH_LEAN - || soap_errno == SOAP_ERANGE -#endif -#endif - ) -#else -# ifdef HAVE_SSCANF - if (sscanf(s, SOAP_ULONG_FORMAT, p) != 1) -# endif -#endif - soap->error = SOAP_TYPE; - } - return soap->error; -} -#endif - -/******************************************************************************/ -#ifndef WITH_LEAN -SOAP_FMAC1 -ULONG64 * -SOAP_FMAC2 -soap_inULONG64(struct soap *soap, const char *tag, ULONG64 *p, const char *type, int t) -{ if (soap_element_begin_in(soap, tag, 0)) - return NULL; - if (*soap->type - && soap_match_tag(soap, soap->type, type) - && soap_match_tag(soap, soap->type, ":positiveInteger") - && soap_match_tag(soap, soap->type, ":nonNegativeInteger") - && soap_match_tag(soap, soap->type, ":unsignedLong") - && soap_match_tag(soap, soap->type, ":unsignedInt") - && soap_match_tag(soap, soap->type, ":unsignedShort") - && soap_match_tag(soap, soap->type, ":unsignedByte")) - { soap->error = SOAP_TYPE; - soap_revert(soap); - return NULL; - } - p = (ULONG64*)soap_id_enter(soap, soap->id, p, t, sizeof(ULONG64), 0, NULL, NULL, NULL); - if (*soap->href) - p = (ULONG64*)soap_id_forward(soap, soap->href, p, t, 0, sizeof(ULONG64), 0, NULL); - else if (p) - { if (soap_s2ULONG64(soap, soap_value(soap), p)) - return NULL; - } - if (soap->body && soap_element_end_in(soap, tag)) - return NULL; - return p; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_s2string(struct soap *soap, const char *s, char **t) -{ *t = NULL; - if (s && !(*t = soap_strdup(soap, s))) - soap->error = SOAP_EOM; - return soap->error; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_s2QName(struct soap *soap, const char *s, char **t) -{ if (s) - { struct soap_nlist *np; - const char *p; - if (!strncmp(s, "xml:", 4)) - { *t = soap_strdup(soap, s); - return SOAP_OK; - } - np = soap->nlist; - p = strchr(s, ':'); - if (p) - { register int n = p - s; - while (np && (strncmp(np->id, s, n) || np->id[n])) - np = np->next; - p++; - } - else - { while (np && *np->id) - np = np->next; - p = s; - } - if (np) - { if (np->index >= 0 && soap->local_namespaces) - { register const char *q = soap->local_namespaces[np->index].id; - if (q) - { if ((*t = (char*)soap_malloc(soap, strlen(p) + strlen(q) + 2))) - sprintf(*t, "%s:%s", q, p); - return SOAP_OK; - } - } - if (np->ns) - { if ((*t = (char*)soap_malloc(soap, strlen(p) + strlen(np->ns) + 4))) - sprintf(*t, "\"%s\":%s", np->ns, p); - return SOAP_OK; - } - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Namespace prefix of '%s' not defined (index=%d, URI=%s)\n", s, np->index, np->ns?np->ns:"")); - return soap->error = SOAP_NAMESPACE; - } - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Namespace prefix of '%s' not defined, assuming empty namespace\n", s)); - if ((*t = (char*)soap_malloc(soap, strlen(p) + 4))) - sprintf(*t, "\"\":%s", p); - } - return soap->error; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -const char* -SOAP_FMAC2 -soap_QName2s(struct soap *soap, const char *s) -{ struct Namespace *p; - char *t; - int n; - if (!s || *s != '"') - { -#ifndef WITH_LEAN - if (s && (soap->mode & SOAP_XML_CANONICAL)) - { t = strchr(s, ':'); - if (t) - soap_utilize_ns(soap, s, t - s); - } -#endif - return s; - } - s++; - if ((p = soap->local_namespaces)) - { for (; p->id; p++) - { if (p->ns) - if (!soap_tag_cmp(s, p->ns)) - break; - if (p->in) - if (!soap_tag_cmp(s, p->in)) - break; - } - if (p && p->id) - { s = strchr(s, '"'); - if (s) - { t = (char*)soap_malloc(soap, strlen(p->id) + strlen(s)); - strcpy(t, p->id); - strcat(t, s + 1); - return t; - } - } - } - t = (char*)strchr(s, '"'); - if (t) - n = t - s; - else - n = 0; - t = soap_strdup(soap, s); - t[n] = '\0'; - sprintf(soap->tmpbuf, "xmlns:_%d", soap->idnum++); - soap_set_attr(soap, soap->tmpbuf, t); - s = strchr(s, '"'); - if (s) - { t = (char*)soap_malloc(soap, strlen(soap->tmpbuf) + strlen(s) - 6); - strcpy(t, soap->tmpbuf + 6); - strcat(t, s + 1); - } - return t; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_outstring(struct soap *soap, const char *tag, int id, char *const*p, const char *type, int n) -{ id = soap_element_id(soap, tag, id, *p, NULL, 0, type, n); - if (id < 0 - || soap_element_begin_out(soap, tag, id, type) - || soap_string_out(soap, *p, 0) - || soap_element_end_out(soap, tag)) - return soap->error; - return SOAP_OK; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -char ** -SOAP_FMAC2 -soap_instring(struct soap *soap, const char *tag, char **p, const char *type, int t, int flag, long minlen, long maxlen) -{ if (soap_element_begin_in(soap, tag, 1)) - { if (!tag || *tag != '-' || soap->error != SOAP_NO_TAG) - return NULL; - soap->error = SOAP_OK; - } - if (!p) - if (!(p = (char**)soap_malloc(soap, sizeof(char*)))) - return NULL; - if (soap->body) - { *p = soap_string_in(soap, flag, minlen, maxlen); - if (!*p || !(char*)soap_id_enter(soap, soap->id, *p, t, sizeof(char*), 0, NULL, NULL, NULL)) - return NULL; - } - else - *p = NULL; - if (*soap->href) - p = (char**)soap_id_lookup(soap, soap->href, (void**)p, t, sizeof(char**), 0); - if (soap->body && soap_element_end_in(soap, tag)) - return NULL; - return p; -} -#endif - -/******************************************************************************/ -#ifndef WITH_LEANER -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_outwstring(struct soap *soap, const char *tag, int id, wchar_t *const*p, const char *type, int n) -{ id = soap_element_id(soap, tag, id, *p, NULL, 0, type, n); - if (id < 0 - || soap_element_begin_out(soap, tag, id, type) - || soap_wstring_out(soap, *p, 0) - || soap_element_end_out(soap, tag)) - return soap->error; - return SOAP_OK; -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_LEANER -#ifndef PALM_2 -SOAP_FMAC1 -wchar_t ** -SOAP_FMAC2 -soap_inwstring(struct soap *soap, const char *tag, wchar_t **p, const char *type, int t, long minlen, long maxlen) -{ if (soap_element_begin_in(soap, tag, 1)) - { if (!tag || *tag != '-' || soap->error != SOAP_NO_TAG) - return NULL; - soap->error = SOAP_OK; - } - if (!p) - if (!(p = (wchar_t**)soap_malloc(soap, sizeof(wchar_t*)))) - return NULL; - if (soap->body) - { *p = soap_wstring_in(soap, 1, minlen, maxlen); - if (!*p || !(wchar_t*)soap_id_enter(soap, soap->id, *p, t, sizeof(wchar_t*), 0, NULL, NULL, NULL)) - return NULL; - } - else - *p = NULL; - if (*soap->href) - p = (wchar_t**)soap_id_lookup(soap, soap->href, (void**)p, t, sizeof(wchar_t**), 0); - if (soap->body && soap_element_end_in(soap, tag)) - return NULL; - return p; -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_LEAN -static time_t -soap_timegm(struct tm *T) -{ -#if defined(HAVE_TIMEGM) - return timegm(T); -#else - time_t t, g, z; -#ifdef HAVE_GMTIME_R - struct tm tm, *tmp = &tm; -#else - struct tm *tmp; -#endif - t = mktime(T); - if (t == -1) - return -1; -#ifdef HAVE_GMTIME_R - gmtime_r(&t, tmp); -#else - tmp = gmtime(&t); -#endif - tmp->tm_isdst = 0; - g = mktime(tmp); - if (g == -1) - return -1; - z = g - t; - return t - z; -#endif -} -#endif - -/******************************************************************************/ -#ifndef WITH_LEAN -SOAP_FMAC1 -const char* -SOAP_FMAC2 -soap_dateTime2s(struct soap *soap, time_t n) -{ struct tm T, *pT = &T; -#if defined(HAVE_GMTIME_R) - if (gmtime_r(&n, pT)) - strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%SZ", pT); - /* The following defines were added for VxWorks*/ -#elif defined(HAVE_PGMTIME_R) - if (gmtime_r(&n, pT)) - strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%SZ", pT); -#elif defined(HAVE_PGMTIME) - if (gmtime(&n, pT)) - strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%SZ", pT); -#elif defined(HAVE_GMTIME) - if ((pT = gmtime(&n))) - strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%SZ", pT); -#elif defined(HAVE_GETTIMEOFDAY) - struct timezone tz; - memset((void*)&tz, 0, sizeof(tz)); -# if defined(HAVE_LOCALTIME_R) - if (localtime_r(&n, pT)) - { struct timeval tv; - gettimeofday(&tv, &tz); - strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%S", pT); - sprintf(soap->tmpbuf + strlen(soap->tmpbuf), "%+03d:%02d", -tz.tz_minuteswest/60+(pT->tm_isdst!=0), abs(tz.tz_minuteswest)%60); - } -# else - if ((pT = localtime(&n))) - { struct timeval tv; - gettimeofday(&tv, &tz); - strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%S", pT); - sprintf(soap->tmpbuf + strlen(soap->tmpbuf), "%+03d:%02d", -tz.tz_minuteswest/60+(pT->tm_isdst!=0), abs(tz.tz_minuteswest)%60); - } -#endif -#elif defined(HAVE_FTIME) - struct timeb t; - memset((void*)&t, 0, sizeof(t)); -# if defined(HAVE_LOCALTIME_R) - if (localtime_r(&n, pT)) - { ftime(&t); - strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%S", pT); - sprintf(soap->tmpbuf + strlen(soap->tmpbuf), "%+03d:%02d", -t.timezone/60+(pT->tm_isdst!=0), abs(t.timezone)%60); - } - /* The following defines were added for VxWorks*/ -# elif defined(HAVE_PLOCALTIME_R) - if (localtime_r(&n, pT)) - { strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%S", pT); - sprintf(soap->tmpbuf+strlen(soap->tmpbuf), "%+03d:%02d", t.timezone/60, abs(t.timezone)%60); - } -# else - if ((pT = localtime(&n))) - { ftime(&t); - strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%S", pT); - sprintf(soap->tmpbuf + strlen(soap->tmpbuf), "%+03d:%02d", -t.timezone/60+(pT->tm_isdst!=0), abs(t.timezone)%60); - } -# endif -#elif defined(HAVE_LOCALTIME_R) - if (localtime_r(&n, pT)) - strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%S", pT); - /* The following defines were added for VxWorks*/ -#elif defined(HAVE_PLOCALTIME_R) - if (localtime_r(&n, pT)) - strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%S", pT); -#else - if ((pT = localtime(&n))) - strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%S", pT); -#endif - else - strcpy(soap->tmpbuf, "1969-12-31T23:59:59Z"); - return soap->tmpbuf; -} -#endif - -/******************************************************************************/ -#ifndef WITH_LEAN -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_outdateTime(struct soap *soap, const char *tag, int id, const time_t *p, const char *type, int n) -{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type) - || soap_string_out(soap, soap_dateTime2s(soap, *p), 0)) - return soap->error; - return soap_element_end_out(soap, tag); -} -#endif - -/******************************************************************************/ -#ifndef WITH_LEAN -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_s2dateTime(struct soap *soap, const char *s, time_t *p) -{ if (s) - { struct tm T; - char zone[16]; - const char *t; - memset((void*)&T, 0, sizeof(T)); - zone[sizeof(zone)-1] = '\0'; - if (strchr(s, '-')) - t = "%d-%d-%dT%d:%d:%d%15s"; - else if (strchr(s, ':')) - t = "%4d%2d%2dT%d:%d:%d%15s"; - else /* parse non-XSD-standard alternative ISO 8601 format */ - t = "%4d%2d%2dT%2d%2d%2d%15s"; - sscanf(s, t, &T.tm_year, &T.tm_mon, &T.tm_mday, &T.tm_hour, &T.tm_min, &T.tm_sec, zone); - if (T.tm_year == 1) - T.tm_year = 70; - else - T.tm_year -= 1900; - T.tm_mon--; - if (*zone) - { if (*zone == '.') - { for (s = zone + 1; *s; s++) - if (*s < '0' || *s > '9') - break; - } - else - s = zone; - if (*s == '+' || *s == '-') - { int h = 0, m = 0; - if (s[3] == ':') - { sscanf(s, "%d:%d", &h, &m); - if (h < 0) - m = -m; - } - else - { m = (int)atol(s); - h = m / 100; - m = m % 100; - } - T.tm_hour -= h; - T.tm_min -= m; - } - *p = soap_timegm(&T); - } - else - *p = mktime(&T); /* no time zone: suppose it is localtime? */ - } - return soap->error; -} -#endif - -/******************************************************************************/ -#ifndef WITH_LEAN -SOAP_FMAC1 -time_t * -SOAP_FMAC2 -soap_indateTime(struct soap *soap, const char *tag, time_t *p, const char * type, int t) -{ if (soap_element_begin_in(soap, tag, 0)) - return NULL; - if (*soap->type - && soap_match_tag(soap, soap->type, type) - && soap_match_tag(soap, soap->type, ":dateTime")) - { soap->error = SOAP_TYPE; - soap_revert(soap); - return NULL; - } - p = (time_t*)soap_id_enter(soap, soap->id, p, t, sizeof(time_t), 0, NULL, NULL, NULL); - if (*soap->href) - p = (time_t*)soap_id_forward(soap, soap->href, p, t, 0, sizeof(time_t), 0, NULL); - else if (p) - { if (soap_s2dateTime(soap, soap_value(soap), p)) - return NULL; - } - if (soap->body && soap_element_end_in(soap, tag)) - return NULL; - return p; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_outliteral(struct soap *soap, const char *tag, char *const*p) -{ int i; - const char *t = NULL; - if (tag && *tag != '-') - { if (soap->local_namespaces && (t = strchr(tag, ':'))) - { strncpy(soap->tmpbuf, tag, t-tag); - soap->tmpbuf[t-tag] = '\0'; - for (i = 0; soap->local_namespaces[i].id; i++) - if (!strcmp(soap->tmpbuf, soap->local_namespaces[i].id)) - break; - t++; - sprintf(soap->tmpbuf, "<%s xmlns=\"%s\">", t, soap->local_namespaces[i].ns ? soap->local_namespaces[i].ns : SOAP_STR_EOS); - } - else - { t = tag; - sprintf(soap->tmpbuf, "<%s>", tag); - } - if (soap_send(soap, soap->tmpbuf)) - return soap->error; - } - if (p && *p) - { if (soap_send(soap, *p)) - return soap->error; - } - if (t) - { sprintf(soap->tmpbuf, "", t); - return soap_send(soap, soap->tmpbuf); - } - return SOAP_OK; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -char ** -SOAP_FMAC2 -soap_inliteral(struct soap *soap, const char *tag, char **p) -{ if (soap_element_begin_in(soap, tag, 1)) - { if (soap->error != SOAP_NO_TAG || soap_unget(soap, soap_get(soap)) == SOAP_TT) - return NULL; - soap->error = SOAP_OK; - } - if (!p) - if (!(p = (char**)soap_malloc(soap, sizeof(char*)))) - return NULL; - if (soap->null) - *p = NULL; - else - *p = soap_string_in(soap, 0, -1, -1); - if (soap->body && soap_element_end_in(soap, tag)) - return NULL; - return p; -} -#endif - -/******************************************************************************/ -#ifndef WITH_LEANER -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_outwliteral(struct soap *soap, const char *tag, wchar_t *const*p) -{ int i; - const char *t = NULL; - wchar_t c; - const wchar_t *s; - if (tag && *tag != '-') - { if (soap->local_namespaces && (t = strchr(tag, ':'))) - { strncpy(soap->tmpbuf, tag, t-tag); - soap->tmpbuf[t-tag] = '\0'; - for (i = 0; soap->local_namespaces[i].id; i++) - if (!strcmp(soap->tmpbuf, soap->local_namespaces[i].id)) - break; - t++; - sprintf(soap->tmpbuf, "<%s xmlns=\"%s\">", t, soap->local_namespaces[i].ns ? soap->local_namespaces[i].ns : SOAP_STR_EOS); - } - else - { t = tag; - sprintf(soap->tmpbuf, "<%s>", tag); - } - if (soap_send(soap, soap->tmpbuf)) - return soap->error; - } - if (p) - { s = *p; - while ((c = *s++)) - if (soap_pututf8(soap, (unsigned char)c)) - return soap->error; - } - if (t) - { sprintf(soap->tmpbuf, "", t); - return soap_send(soap, soap->tmpbuf); - } - return SOAP_OK; -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_LEANER -#ifndef PALM_2 -SOAP_FMAC1 -wchar_t ** -SOAP_FMAC2 -soap_inwliteral(struct soap *soap, const char *tag, wchar_t **p) -{ if (soap_element_begin_in(soap, tag, 1)) - { if (soap->error != SOAP_NO_TAG || soap_unget(soap, soap_get(soap)) == SOAP_TT) - return NULL; - soap->error = SOAP_OK; - } - if (!p) - if (!(p = (wchar_t**)soap_malloc(soap, sizeof(wchar_t*)))) - return NULL; - if (soap->null) - *p = NULL; - else - *p = soap_wstring_in(soap, 0, -1, -1); - if (soap->body && soap_element_end_in(soap, tag)) - return NULL; - return p; -} -#endif -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -const char * -SOAP_FMAC2 -soap_token(struct soap *soap) -{ register size_t i; - register soap_wchar c = 0; - register char *s = soap->tmpbuf; - if (!soap->body) - return SOAP_STR_EOS; - do c = soap_get(soap); - while (soap_blank(c)); - for (i = 0; i < sizeof(soap->tmpbuf) - 1; i++) - { if (c == SOAP_TT || (int)c == EOF || soap_blank(c)) - break; - *s++ = (char)c; - c = soap_get(soap); - } - if ((int)c == EOF || c == SOAP_TT) - soap_unget(soap, c); - *s = '\0'; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Element content value='%s'\n", soap->tmpbuf)); - return soap->tmpbuf; /* return non-null pointer */ -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -const char * -SOAP_FMAC2 -soap_value(struct soap *soap) -{ register size_t i; - register soap_wchar c = 0; - register char *s = soap->tmpbuf; - if (!soap->body) - return SOAP_STR_EOS; - do c = soap_get(soap); - while (soap_blank(c)); - for (i = 0; i < sizeof(soap->tmpbuf) - 1; i++) - { if (c == SOAP_TT || (int)c == EOF) - break; - *s++ = (char)c; - c = soap_get(soap); - } - for (s--; i > 0; i--, s--) - if (!soap_blank(*s)) - break; - s[1] = '\0'; - if ((int)c == EOF || c == SOAP_TT) - soap_unget(soap, c); - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Element content value='%s'\n", soap->tmpbuf)); -#ifdef WITH_DOM - if ((soap->mode & SOAP_XML_DOM) && soap->dom) - soap->dom->data = soap_strdup(soap, soap->tmpbuf); -#endif - return soap->tmpbuf; /* return non-null pointer */ -} -#endif - -/******************************************************************************/ -#if !defined(WITH_LEANER) || !defined(WITH_NOHTTP) -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_getline(struct soap *soap, char *s, int len) -{ int i = len; - soap_wchar c = 0; - for (;;) - { while (--i > 0) - { c = soap_getchar(soap); - if (c == '\r' || c == '\n') - break; - if ((int)c == EOF) - return soap->error = SOAP_EOF; - *s++ = (char)c; - } - if (c != '\n') - c = soap_getchar(soap); /* got \r, now get \n */ - if (c == '\n') - { *s = '\0'; - if (i+1 == len) /* empty line: end of HTTP/MIME header */ - break; - c = soap_unget(soap, soap_getchar(soap)); - if (c != ' ' && c != '\t') /* HTTP line continuation? */ - break; - } - else if ((int)c == EOF) - return soap->error = SOAP_EOF; - } - return SOAP_OK; -} -#endif -#endif - -/******************************************************************************/ -#ifndef PALM_1 -static size_t -soap_count_attachments(struct soap *soap) -{ -#ifndef WITH_LEANER - register struct soap_multipart *content; - register size_t count = soap->count; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Calculating the message size with attachments, current count=%lu\n", (unsigned long)count)); - if ((soap->mode & SOAP_ENC_DIME) && !(soap->mode & SOAP_ENC_MTOM)) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Calculating the size of DIME attachments\n")); - for (content = soap->dime.first; content; content = content->next) - { count += 12 + ((content->size+3)&(~3)); - if (content->id) - count += ((strlen(content->id)+3)&(~3)); - if (content->type) - count += ((strlen(content->type)+3)&(~3)); - if (content->options) - count += ((((unsigned char)content->options[2] << 8) | ((unsigned char)content->options[3]))+7)&(~3); - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Size of DIME attachment content is %lu bytes\n", (unsigned long)content->size)); - } - } - if ((soap->mode & SOAP_ENC_MIME) && soap->mime.boundary) - { register size_t n = strlen(soap->mime.boundary); - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Calculating the size of MIME attachments\n")); - for (content = soap->mime.first; content; content = content->next) - { register const char *s; - /* count \r\n--boundary\r\n */ - count += 6 + n; - /* count Content-Type: ...\r\n */ - if (content->type) - count += 16 + strlen(content->type); - /* count Content-Transfer-Encoding: ...\r\n */ - s = soap_str_code(mime_codes, content->encoding); - if (s) - count += 29 + strlen(s); - /* count Content-ID: ...\r\n */ - if (content->id) - count += 14 + strlen(content->id); - /* count Content-Location: ...\r\n */ - if (content->location) - count += 20 + strlen(content->location); - /* count Content-Description: ...\r\n */ - if (content->description) - count += 23 + strlen(content->location); - /* count \r\n...content */ - count += 2 + content->size; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Size of MIME attachment content is %lu bytes\n", (unsigned long)content->size)); - } - /* count \r\n--boundary-- */ - count += 6 + n; - } - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "New count is %lu bytes\n", (unsigned long)count)); - return count; -#else - return soap->count; -#endif -} -#endif - -/******************************************************************************/ -#ifndef WITH_LEANER -#ifndef PALM_1 -static int -soap_putdimefield(struct soap *soap, const char *s, size_t n) -{ if (soap_send_raw(soap, s, n)) - return soap->error; - return soap_send_raw(soap, SOAP_STR_PADDING, -(long)n&3); -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_LEANER -#ifndef PALM_1 -SOAP_FMAC1 -char * -SOAP_FMAC2 -soap_dime_option(struct soap *soap, unsigned short optype, const char *option) -{ size_t n; - char *s = NULL; - if (option) - { n = strlen(option); - s = (char*)soap_malloc(soap, n + 5); - if (s) - { s[0] = optype >> 8; - s[1] = optype & 0xFF; - s[2] = n >> 8; - s[3] = n & 0xFF; - strcpy(s + 4, option); - } - } - return s; -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_LEANER -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_putdimehdr(struct soap *soap) -{ unsigned char tmp[12]; - size_t optlen = 0, idlen = 0, typelen = 0; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Put DIME header id='%s'\n", soap->dime.id?soap->dime.id:"")); - if (soap->dime.options) - optlen = (((unsigned char)soap->dime.options[2] << 8) | ((unsigned char)soap->dime.options[3])) + 4; - if (soap->dime.id) - idlen = strlen(soap->dime.id); - if (soap->dime.type) - typelen = strlen(soap->dime.type); - tmp[0] = SOAP_DIME_VERSION | (soap->dime.flags & 0x7); - tmp[1] = soap->dime.flags & 0xF0; - tmp[2] = optlen >> 8; - tmp[3] = optlen & 0xFF; - tmp[4] = idlen >> 8; - tmp[5] = idlen & 0xFF; - tmp[6] = typelen >> 8; - tmp[7] = typelen & 0xFF; - tmp[8] = soap->dime.size >> 24; - tmp[9] = (soap->dime.size >> 16) & 0xFF; - tmp[10] = (soap->dime.size >> 8) & 0xFF; - tmp[11] = soap->dime.size & 0xFF; - if (soap_send_raw(soap, (char*)tmp, 12) - || soap_putdimefield(soap, soap->dime.options, optlen) - || soap_putdimefield(soap, soap->dime.id, idlen) - || soap_putdimefield(soap, soap->dime.type, typelen)) - return soap->error; - return SOAP_OK; -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_LEANER -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_putdime(struct soap *soap) -{ struct soap_multipart *content; - if (!(soap->mode & SOAP_ENC_DIME)) - return SOAP_OK; - for (content = soap->dime.first; content; content = content->next) - { void *handle; - soap->dime.size = content->size; - soap->dime.id = content->id; - soap->dime.type = content->type; - soap->dime.options = content->options; - soap->dime.flags = SOAP_DIME_VERSION | SOAP_DIME_MEDIA; - if (soap->fdimereadopen && ((handle = soap->fdimereadopen(soap, (void*)content->ptr, content->id, content->type, content->options)) || soap->error)) - { size_t size = content->size; - if (!handle) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "fdimereadopen failed\n")); - return soap->error; - } - if (!content->size && ((soap->mode & SOAP_ENC_XML) || (soap->mode & SOAP_IO) == SOAP_IO_CHUNK || (soap->mode & SOAP_IO) == SOAP_IO_STORE)) - { size_t chunksize = sizeof(soap->tmpbuf); - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Chunked streaming DIME\n")); - do - { size = soap->fdimeread(soap, handle, soap->tmpbuf, chunksize); - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "fdimeread returned %lu bytes\n", (unsigned long)size)); - if (size < chunksize) - { soap->dime.flags &= ~SOAP_DIME_CF; - if (!content->next) - soap->dime.flags |= SOAP_DIME_ME; - } - else - soap->dime.flags |= SOAP_DIME_CF; - soap->dime.size = size; - if (soap_putdimehdr(soap) - || soap_putdimefield(soap, soap->tmpbuf, size)) - break; - if (soap->dime.id) - { soap->dime.flags &= ~(SOAP_DIME_MB | SOAP_DIME_MEDIA); - soap->dime.id = NULL; - soap->dime.type = NULL; - soap->dime.options = NULL; - } - } while (size >= chunksize); - } - else - { if (!content->next) - soap->dime.flags |= SOAP_DIME_ME; - if (soap_putdimehdr(soap)) - return soap->error; - do - { size_t bufsize; - if (size < sizeof(soap->tmpbuf)) - bufsize = size; - else - bufsize = sizeof(soap->tmpbuf); - if (!(bufsize = soap->fdimeread(soap, handle, soap->tmpbuf, bufsize))) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "fdimeread failed: insufficient data (%lu bytes remaining from %lu bytes)\n", (unsigned long)size, (unsigned long)soap->dime.size)); - soap->error = SOAP_EOF; - break; - } - if (soap_send_raw(soap, soap->tmpbuf, bufsize)) - break; - size -= bufsize; - } while (size); - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "fdimereadclose\n")); - soap_send_raw(soap, SOAP_STR_PADDING, -(long)soap->dime.size&3); - } - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "fdimereadclose\n")); - if (soap->fdimereadclose) - soap->fdimereadclose(soap, handle); - } - else - { if (!content->next) - soap->dime.flags |= SOAP_DIME_ME; - if (soap_putdimehdr(soap) - || soap_putdimefield(soap, (char*)content->ptr, content->size)) - return soap->error; - } - } - return SOAP_OK; -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_LEANER -#ifndef PALM_1 -static char * -soap_getdimefield(struct soap *soap, size_t n) -{ register soap_wchar c; - register int i; - register char *s; - char *p = NULL; - if (n) - { p = (char*)soap_malloc(soap, n + 1); - if (p) - { s = p; - for (i = n; i > 0; i--) - { if ((int)(c = soap_get1(soap)) == EOF) - { soap->error = SOAP_EOF; - return NULL; - } - *s++ = (char)c; - } - *s = '\0'; - if ((soap->error = soap_move(soap, -(long)n&3))) - return NULL; - } - else - soap->error = SOAP_EOM; - } - return p; -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_LEANER -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_getdimehdr(struct soap *soap) -{ register soap_wchar c; - register char *s; - register int i; - unsigned char tmp[12]; - size_t optlen, idlen, typelen; - if (!(soap->mode & SOAP_ENC_DIME)) - return soap->error = SOAP_DIME_END; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Get DIME header\n")); - if (soap->dime.buflen || soap->dime.chunksize) - { if (soap_move(soap, (long)(soap->dime.size - soap_tell(soap)))) - return soap->error = SOAP_EOF; - soap_unget(soap, soap_getchar(soap)); /* skip padding and get hdr */ - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "... From chunked\n")); - return SOAP_OK; - } - s = (char*)tmp; - for (i = 12; i > 0; i--) - { if ((int)(c = soap_getchar(soap)) == EOF) - return soap->error = SOAP_EOF; - *s++ = (char)c; - } - if ((tmp[0] & 0xF8) != SOAP_DIME_VERSION) - return soap->error = SOAP_DIME_MISMATCH; - soap->dime.flags = (tmp[0] & 0x7) | (tmp[1] & 0xF0); - optlen = (tmp[2] << 8) | tmp[3]; - idlen = (tmp[4] << 8) | tmp[5]; - typelen = (tmp[6] << 8) | tmp[7]; - soap->dime.size = (tmp[8] << 24) | (tmp[9] << 16) | (tmp[10] << 8) | tmp[11]; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "DIME size=%lu flags=0x%X\n", (unsigned long)soap->dime.size, soap->dime.flags)); - if (!(soap->dime.options = soap_getdimefield(soap, optlen)) && soap->error) - return soap->error; - if (!(soap->dime.id = soap_getdimefield(soap, idlen)) && soap->error) - return soap->error; - if (!(soap->dime.type = soap_getdimefield(soap, typelen)) && soap->error) - return soap->error; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "DIME id=%s, type=%s, options=%s\n", soap->dime.id?soap->dime.id:"", soap->dime.type?soap->dime.type:"", soap->dime.options?soap->dime.options+4:"")); - if (soap->dime.flags & SOAP_DIME_ME) - soap->mode &= ~SOAP_ENC_DIME; - return SOAP_OK; -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_LEANER -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_getdime(struct soap *soap) -{ while (soap->dime.flags & SOAP_DIME_CF) - { if (soap_getdimehdr(soap)) - return soap->error; - if (soap_move(soap, soap->dime.size)) - return soap->error = SOAP_EOF; - } - if (soap_move(soap, ((soap->dime.size+3)&(~3))-soap_tell(soap))) - return soap->error = SOAP_EOF; - for (;;) - { register struct soap_multipart *content; - if (soap_getdimehdr(soap)) - break; - if (soap->fdimewriteopen && ((soap->dime.ptr = (char*)soap->fdimewriteopen(soap, soap->dime.id, soap->dime.type, soap->dime.options)) || soap->error)) - { const char *id, *type, *options; - size_t size, n; - if (!soap->dime.ptr) - return soap->error; - id = soap->dime.id; - type = soap->dime.type; - options = soap->dime.options; - for (;;) - { size = soap->dime.size; - for (;;) - { n = soap->buflen - soap->bufidx; - if (size < n) - n = size; - if ((soap->error = soap->fdimewrite(soap, (void*)soap->dime.ptr, soap->buf + soap->bufidx, n))) - break; - size -= n; - if (!size) - { soap->bufidx += n; - break; - } - if (soap_recv(soap)) - { soap->error = SOAP_EOF; - goto end; - } - } - if (soap_move(soap, -(long)soap->dime.size&3)) - { soap->error = SOAP_EOF; - break; - } - if (!(soap->dime.flags & SOAP_DIME_CF)) - break; - if (soap_getdimehdr(soap)) - break; - } -end: - if (soap->fdimewriteclose) - soap->fdimewriteclose(soap, (void*)soap->dime.ptr); - soap->dime.size = 0; - soap->dime.id = id; - soap->dime.type = type; - soap->dime.options = options; - } - else if (soap->dime.flags & SOAP_DIME_CF) - { const char *id, *type, *options; - register soap_wchar c; - register char *s; - register int i; - id = soap->dime.id; - type = soap->dime.type; - options = soap->dime.options; - if (soap_new_block(soap)) - return SOAP_EOM; - for (;;) - { s = (char*)soap_push_block(soap, soap->dime.size); - if (!s) - return soap->error = SOAP_EOM; - for (i = soap->dime.size; i > 0; i--) - { if ((int)(c = soap_get1(soap)) == EOF) - return soap->error = SOAP_EOF; - *s++ = (char)c; - } - if (soap_move(soap, -(long)soap->dime.size&3)) - return soap->error = SOAP_EOF; - if (!(soap->dime.flags & SOAP_DIME_CF)) - break; - if (soap_getdimehdr(soap)) - return soap->error; - } - soap->dime.size = soap->blist->size++; /* allocate one more for '\0' */ - if (!(soap->dime.ptr = soap_save_block(soap, NULL, 0))) - return soap->error; - soap->dime.ptr[soap->dime.size] = '\0'; /* force 0-terminated */ - soap->dime.id = id; - soap->dime.type = type; - soap->dime.options = options; - } - else - soap->dime.ptr = soap_getdimefield(soap, soap->dime.size); - content = soap_new_multipart(soap, &soap->dime.first, &soap->dime.last, soap->dime.ptr, soap->dime.size); - if (!content) - return soap->error = SOAP_EOM; - content->id = soap->dime.id; - content->type = soap->dime.type; - content->options = soap->dime.options; - soap_resolve_attachment(soap, content); - if (soap->error) - return soap->error; - } - if (soap->error != SOAP_DIME_END) - return soap->error; - return soap->error = SOAP_OK; -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_LEANER -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_getmimehdr(struct soap *soap) -{ struct soap_multipart *content; - do - { if (soap_getline(soap, soap->msgbuf, sizeof(soap->msgbuf))) - return soap->error; - } - while (!*soap->msgbuf); - if (soap->msgbuf[0] == '-' && soap->msgbuf[1] == '-') - { char *s = soap->msgbuf + strlen(soap->msgbuf) - 1; - /* remove white space */ - while (soap_blank(*s)) - s--; - s[1] = '\0'; - if (soap->mime.boundary) - { if (strcmp(soap->msgbuf + 2, soap->mime.boundary)) - return soap->error = SOAP_MIME_ERROR; - } - else - soap->mime.boundary = soap_strdup(soap, soap->msgbuf + 2); - if (soap_getline(soap, soap->msgbuf, sizeof(soap->msgbuf))) - return soap->error; - } - if (soap_set_mime_attachment(soap, NULL, 0, SOAP_MIME_NONE, NULL, NULL, NULL, NULL)) - return soap->error = SOAP_EOM; - content = soap->mime.last; - for (;;) - { register char *key = soap->msgbuf; - register char *val; - if (!*key) - break; - DBGLOG(TEST,SOAP_MESSAGE(fdebug, "MIME header: %s\n", key)); - val = strchr(soap->msgbuf, ':'); - if (val) - { *val = '\0'; - do val++; - while (*val && *val <= 32); - if (!soap_tag_cmp(key, "Content-ID")) - content->id = soap_strdup(soap, val); - else if (!soap_tag_cmp(key, "Content-Location")) - content->location = soap_strdup(soap, val); - else if (!soap_tag_cmp(key, "Content-Disposition")) - content->id = soap_strdup(soap, soap_get_header_attribute(soap, val, "name")); - else if (!soap_tag_cmp(key, "Content-Type")) - content->type = soap_strdup(soap, val); - else if (!soap_tag_cmp(key, "Content-Description")) - content->description = soap_strdup(soap, val); - else if (!soap_tag_cmp(key, "Content-Transfer-Encoding")) - content->encoding = (enum soap_mime_encoding)soap_int_code(mime_codes, val, (long)SOAP_MIME_NONE); - } - if (soap_getline(soap, key, sizeof(soap->msgbuf))) - return soap->error; - } - return SOAP_OK; -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_LEANER -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_getmime(struct soap *soap) -{ register soap_wchar c = 0; - if (!soap->mime.last) - return SOAP_OK; - for (;;) - { register size_t i, m = 0; - register char *s, *t = NULL; - struct soap_multipart *content = soap->mime.last; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Parsing MIME content id=%s type=%s\n", content->id?content->id:"", content->type?content->type:"")); - if (soap_new_block(soap)) - return soap->error = SOAP_EOM; - for (;;) - { register short flag = 0; - if (!(s = (char*)soap_push_block(soap, SOAP_BLKLEN))) - return soap->error = SOAP_EOM; - for (i = 0; i < SOAP_BLKLEN; i++) - { if (m > 0) - { flag = (*t == '\r'); - *s++ = *t++; - m--; - } - else - { if (!flag) - { c = soap_get1(soap); - if ((int)c == EOF) - return soap->error = SOAP_EOF; - } - if (flag || c == '\r') - { t = soap->tmpbuf; - memset(t, 0, sizeof(soap->tmpbuf)); - strcpy(t, "\n--"); - if (soap->mime.boundary) - strncat(t, soap->mime.boundary, sizeof(soap->tmpbuf)-4); - do c = soap_getchar(soap); - while (c == *t++); - if ((int)c == EOF) - return soap->error = SOAP_EOF; - if (!*--t) - goto end; - *t = (char)c; - m = t - soap->tmpbuf + 1; - t = soap->tmpbuf; - c = '\r'; - } - *s++ = (char)c; - } - } - } -end: - *s = '\0'; /* force 0-terminated */ - content->size = soap_size_block(soap, i+1)-1; - content->ptr = soap_save_block(soap, NULL, 0); - soap_resolve_attachment(soap, content); - if (c == '-' && soap_getchar(soap) == '-') - break; - while (c != '\r' && (int)c != EOF && soap_blank(c)) - c = soap_getchar(soap); - if (c != '\r' || soap_getchar(soap) != '\n') - return soap->error = SOAP_MIME_ERROR; - if (soap_getmimehdr(soap)) - return soap->error; - } - /* - do c = soap_getchar(soap); - while ((int)c != EOF && c != '\r' && c != '\n'); - if ((int)c != '\r' || soap_getchar(soap) != '\n') - return soap->error = SOAP_MIME_ERROR; - */ - return SOAP_OK; -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_LEANER -#ifndef PALM_1 -static int -soap_match_cid(const char *s, const char *t) -{ register size_t n; - if (!s) - return 1; - if (!strcmp(s, t)) - return 0; - if (!strncmp(s, "cid:", 4)) - s += 4; - n = strlen(t); - if (*t == '<') - { t++; - n -= 2; - } - if (!strncmp(s, t, n) && !s[n]) - return 0; - return 1; -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_LEANER -#ifndef PALM_1 -static void -soap_resolve_attachment(struct soap *soap, struct soap_multipart *content) -{ if (content->id) - { register struct soap_xlist **xp = &soap->xlist; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Resolving attachment data for id=%s\n", content->id)); - while (*xp) - { register struct soap_xlist *xq = *xp; - if (!soap_match_cid(xq->id, content->id)) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Found matching attachment %s for content id=%s\n", xq->id, content->id)); - *xp = xq->next; - *xq->ptr = (unsigned char*)content->ptr; - *xq->size = (int)content->size; - *xq->type = (char*)content->type; - if (content->options) - *xq->options = (char*)content->options; - else - *xq->options = (char*)content->description; - SOAP_FREE(soap, xq); - } - else - xp = &(*xp)->next; - } - } -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_LEANER -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_putmimehdr(struct soap *soap, struct soap_multipart *content) -{ const char *s; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "MIME attachment type=%s\n", content->type?content->type:"")); - if (soap_send3(soap, "\r\n--", soap->mime.boundary, "\r\n")) - return soap->error; - if (content->type && soap_send3(soap, "Content-Type: ", content->type, "\r\n")) - return soap->error; - s = soap_str_code(mime_codes, content->encoding); - if (s && soap_send3(soap, "Content-Transfer-Encoding: ", s, "\r\n")) - return soap->error; - if (content->id && soap_send3(soap, "Content-ID: ", content->id, "\r\n")) - return soap->error; - if (content->location && soap_send3(soap, "Content-Location: ", content->location, "\r\n")) - return soap->error; - if (content->description && soap_send3(soap, "Content-Description: ", content->description, "\r\n")) - return soap->error; - return soap_send_raw(soap, "\r\n", 2); -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_LEANER -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_putmime(struct soap *soap) -{ struct soap_multipart *content; - if (!(soap->mode & SOAP_ENC_MIME) || !soap->mime.boundary) - return SOAP_OK; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Sending MIME attachments\n")); - for (content = soap->mime.first; content; content = content->next) - if (soap_putmimehdr(soap, content) - || soap_send_raw(soap, content->ptr, content->size)) - return soap->error; - return soap_send3(soap, "\r\n--", soap->mime.boundary, "--"); -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_LEANER -#ifndef PALM_1 -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_set_dime(struct soap *soap) -{ soap->omode |= SOAP_ENC_DIME; - soap->dime.first = NULL; - soap->dime.last = NULL; -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_LEANER -#ifndef PALM_1 -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_set_mime(struct soap *soap, const char *boundary, const char *start) -{ soap->omode |= SOAP_ENC_MIME; - soap->mime.first = NULL; - soap->mime.last = NULL; - soap->mime.boundary = soap_strdup(soap, boundary); - soap->mime.start = soap_strdup(soap, start); -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_LEANER -#ifndef PALM_1 -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_clr_dime(struct soap *soap) -{ soap->omode &= ~SOAP_ENC_DIME; - soap->dime.first = NULL; - soap->dime.last = NULL; -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_LEANER -#ifndef PALM_1 -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_clr_mime(struct soap *soap) -{ soap->omode &= ~SOAP_ENC_MIME; - soap->mime.first = NULL; - soap->mime.last = NULL; - soap->mime.boundary = NULL; - soap->mime.start = NULL; -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_LEANER -#ifndef PALM_1 -static struct soap_multipart* -soap_new_multipart(struct soap *soap, struct soap_multipart **first, struct soap_multipart **last, char *ptr, size_t size) -{ struct soap_multipart *content; - content = (struct soap_multipart*)soap_malloc(soap, sizeof(struct soap_multipart)); - if (content) - { content->next = NULL; - content->ptr = ptr; - content->size = size; - content->id = NULL; - content->type = NULL; - content->options = NULL; - content->encoding = SOAP_MIME_NONE; - content->location = NULL; - content->description = NULL; - if (!*first) - *first = content; - if (*last) - (*last)->next = content; - *last = content; - } - return content; -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_LEANER -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_set_dime_attachment(struct soap *soap, char *ptr, size_t size, const char *type, const char *id, unsigned short optype, const char *option) -{ struct soap_multipart *content = soap_new_multipart(soap, &soap->dime.first, &soap->dime.last, ptr, size); - if (!content) - return SOAP_EOM; - content->id = soap_strdup(soap, id); - content->type = soap_strdup(soap, type); - content->options = soap_dime_option(soap, optype, option); - return SOAP_OK; -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_LEANER -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_set_mime_attachment(struct soap *soap, char *ptr, size_t size, enum soap_mime_encoding encoding, const char *type, const char *id, const char *location, const char *description) -{ struct soap_multipart *content = soap_new_multipart(soap, &soap->mime.first, &soap->mime.last, ptr, size); - if (!content) - return SOAP_EOM; - content->id = soap_strdup(soap, id); - content->type = soap_strdup(soap, type); - content->encoding = encoding; - content->location = soap_strdup(soap, location); - content->description = soap_strdup(soap, description); - return SOAP_OK; -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_LEANER -#ifndef PALM_1 -SOAP_FMAC1 -struct soap_multipart* -SOAP_FMAC2 -soap_next_multipart(struct soap_multipart *content) -{ if (content) - return content->next; - return NULL; -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_LEANER -#ifndef PALM_1 -static void -soap_select_mime_boundary(struct soap *soap) -{ while (!soap->mime.boundary || soap_valid_mime_boundary(soap)) - { register char *s = soap->mime.boundary; - register size_t n = 0; - if (s) - n = strlen(s); - if (n < 16) - { n = 72; - s = soap->mime.boundary = (char*)soap_malloc(soap, n + 1); - if (!s) - return; - } - strcpy(s, "<>"); - s += 2; - n -= 4; - while (n) - { *s++ = soap_base64o[soap_random & 0x3F]; - n--; - } - strcpy(s, "<>"); - } - if (!soap->mime.start) - soap->mime.start = ""; -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_LEANER -#ifndef PALM_1 -static int -soap_valid_mime_boundary(struct soap *soap) -{ register struct soap_multipart *content; - register size_t k = strlen(soap->mime.boundary); - for (content = soap->mime.first; content; content = content->next) - { if (content->ptr && content->size >= k) - { register const char *p = (const char*)content->ptr; - register size_t i; - for (i = 0; i < content->size - k; i++, p++) - if (!strncmp(p, soap->mime.boundary, k)) - return SOAP_ERR; - } - } - return SOAP_OK; -} -#endif -#endif - -/******************************************************************************/ - -#ifdef WITH_COOKIES -/******************************************************************************/ -SOAP_FMAC1 -size_t -SOAP_FMAC2 -soap_encode_cookie(const char *s, char *t, size_t len) -{ register int c; - register size_t n = len; - while ((c = *s++) && --n > 0) - { if (c > ' ' && c < 128 && !strchr("()<>@,;:\\\"/[]?={}", c)) - *t++ = c; - else if (n > 2) - { *t++ = '%'; - *t++ = (c >> 4) + (c > 159 ? '7' : '0'); - c &= 0xF; - *t++ = c + (c > 9 ? '7' : '0'); - n -= 2; - } - else - break; - } - *t = '\0'; - return len - n; -} - -/******************************************************************************/ -SOAP_FMAC1 -struct soap_cookie* -SOAP_FMAC2 -soap_cookie(struct soap *soap, const char *name, const char *domain, const char *path) -{ struct soap_cookie *p; - size_t n; - if (!domain) - domain = soap->cookie_domain; - if (!path) - path = soap->cookie_path; - if (*path == '/') - path++; - n = strlen(path); - for (p = soap->cookies; p; p = p->next) - if (!strcmp(p->name, name) - && domain - && p->domain - && !strcmp(p->domain, domain) - && !strncmp(p->path, path, n)) - break; - return p; -} - -/******************************************************************************/ -SOAP_FMAC1 -struct soap_cookie* -SOAP_FMAC2 -soap_set_cookie(struct soap *soap, const char *name, const char *value, const char *domain, const char *path) -{ struct soap_cookie **p, *q; - int n; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Set cookie: %s=%s domain=%s path=%s\n", name, value?value:"", domain?domain:"", path?path:"")); - if (!domain) - domain = soap->cookie_domain; - if (!path) - path = soap->cookie_path; - if (!path) - { soap_set_receiver_error(soap, "Cookie path not set", NULL, SOAP_HTTP_ERROR); - return NULL; - } - if (*path == '/') - path++; - q = soap_cookie(soap, name, domain, path); - if (!q) - { if ((q = (struct soap_cookie*)SOAP_MALLOC(soap, sizeof(struct soap_cookie)))) - { if ((q->name = (char*)SOAP_MALLOC(soap, strlen(name)+1))) - strcpy(q->name, name); - q->value = NULL; - q->domain = NULL; - q->path = NULL; - q->expire = -1; - q->version = 0; - q->secure = 0; - q->modified = 0; - for (p = &soap->cookies, n = soap->cookie_max; *p && n; p = &(*p)->next, n--) - if (!strcmp((*p)->name, name) && (*p)->path && strcmp((*p)->path, path) < 0) - break; - if (n) - { q->next = *p; - *p = q; - } - else - { SOAP_FREE(soap, q->name); - SOAP_FREE(soap, q); - q = NULL; - } - } - } - else - q->modified = 1; - if (q) - { if (q->value) - { SOAP_FREE(soap, q->value); - q->value = NULL; - } - if (q->domain) - { SOAP_FREE(soap, q->domain); - q->domain = NULL; - } - if (q->path) - { SOAP_FREE(soap, q->path); - q->path = NULL; - } - if (value && *value && (q->value = (char*)SOAP_MALLOC(soap, strlen(value)+1))) - strcpy(q->value, value); - if (domain && *domain && (q->domain = (char*)SOAP_MALLOC(soap, strlen(domain)+1))) - strcpy(q->domain, domain); - if (path && *path && (q->path = (char*)SOAP_MALLOC(soap, strlen(path)+1))) - strcpy(q->path, path); - q->session = 1; - q->env = 0; - } - return q; -} - -/******************************************************************************/ -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_clr_cookie(struct soap *soap, const char *name, const char *domain, const char *path) -{ struct soap_cookie **p, *q; - if (!domain) - domain = soap->cookie_domain; - if (!domain) - { soap_set_receiver_error(soap, "Cookie domain not set", NULL, SOAP_HTTP_ERROR); - return; - } - if (!path) - path = soap->cookie_path; - if (!path) - { soap_set_receiver_error(soap, "Cookie path not set", NULL, SOAP_HTTP_ERROR); - return; - } - if (*path == '/') - path++; - for (p = &soap->cookies, q = *p; q; q = *p) - if (!strcmp(q->name, name) && !strcmp(q->domain, domain) && !strncmp(q->path, path, strlen(q->path))) - { if (q->value) - SOAP_FREE(soap, q->value); - if (q->domain) - SOAP_FREE(soap, q->domain); - if (q->path) - SOAP_FREE(soap, q->path); - *p = q->next; - SOAP_FREE(soap, q); - } - else - p = &q->next; -} - -/******************************************************************************/ -SOAP_FMAC1 -char * -SOAP_FMAC2 -soap_cookie_value(struct soap *soap, const char *name, const char *domain, const char *path) -{ struct soap_cookie *p; - if ((p = soap_cookie(soap, name, domain, path))) - return p->value; - return NULL; -} - -/******************************************************************************/ -SOAP_FMAC1 -char * -SOAP_FMAC2 -soap_env_cookie_value(struct soap *soap, const char *name, const char *domain, const char *path) -{ struct soap_cookie *p; - if ((p = soap_cookie(soap, name, domain, path)) && p->env) - return p->value; - return NULL; -} - -/******************************************************************************/ -SOAP_FMAC1 -long -SOAP_FMAC2 -soap_cookie_expire(struct soap *soap, const char *name, const char *domain, const char *path) -{ struct soap_cookie *p; - if ((p = soap_cookie(soap, name, domain, path))) - return p->expire; - return -1; -} - -/******************************************************************************/ -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_set_cookie_expire(struct soap *soap, const char *name, long expire, const char *domain, const char *path) -{ struct soap_cookie *p; - if ((p = soap_cookie(soap, name, domain, path))) - { p->expire = expire; - p->modified = 1; - return SOAP_OK; - } - return SOAP_ERR; -} - -/******************************************************************************/ -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_set_cookie_session(struct soap *soap, const char *name, const char *domain, const char *path) -{ struct soap_cookie *p; - if ((p = soap_cookie(soap, name, domain, path))) - { p->session = 1; - p->modified = 1; - return SOAP_OK; - } - return SOAP_ERR; -} - -/******************************************************************************/ -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_clr_cookie_session(struct soap *soap, const char *name, const char *domain, const char *path) -{ struct soap_cookie *p; - if ((p = soap_cookie(soap, name, domain, path))) - { p->session = 0; - p->modified = 1; - return SOAP_OK; - } - return SOAP_ERR; -} - -/******************************************************************************/ -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_putsetcookies(struct soap *soap) -{ struct soap_cookie *p; - char *s, tmp[4096]; - const char *t; - for (p = soap->cookies; p; p = p->next) - { if (p->modified || !p->env) - { s = tmp; - if (p->name) - s += soap_encode_cookie(p->name, s, tmp-s+4064); - if (p->value && *p->value) - { *s++ = '='; - s += soap_encode_cookie(p->value, s, tmp-s+4064); - } - if (p->domain && (int)strlen(p->domain) < tmp-s+4064) - sprintf(s, ";Domain=\"%s\"", p->domain); - else if (soap->cookie_domain && (int)strlen(soap->cookie_domain) < tmp-s+4064) - sprintf(s, ";Domain=\"%s\"", soap->cookie_domain); - strcat(s, ";Path=\"/"); - if (p->path) - t = p->path; - else - t = soap->cookie_path; - if (t) - { if (*t == '/') - t++; - if ((int)strlen(t) < tmp-s+4064) - strcat(s, t); - } - s += strlen(s); - *s++ = '"'; - if (p->version > 0) - sprintf(s, ";Version=%u", p->version); - if (p->expire >= 0) - sprintf(s, ";Max-Age=%ld", p->expire); - if (p->secure) - strcat(s, ";Secure"); - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Set-Cookie: %s\n", tmp)); - if ((soap->error = soap->fposthdr(soap, "Set-Cookie", tmp))) - return soap->error; - } - } - return SOAP_OK; -} - -/******************************************************************************/ -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_putcookies(struct soap *soap, const char *domain, const char *path, int secure) -{ struct soap_cookie **p, *q; - unsigned int version = 0; - time_t now = time(NULL); - char *s, tmp[4096]; - p = &soap->cookies; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Sending cookies for domain=%s path=%s\n", domain, path)); - if (*path == '/') - path++; - while ((q = *p)) - { if (q->expire && now > q->expire) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Cookie %s expired\n", q->name)); - SOAP_FREE(soap, q->name); - if (q->value) - SOAP_FREE(soap, q->value); - if (q->domain) - SOAP_FREE(soap, q->domain); - if (q->path) - SOAP_FREE(soap, q->path); - *p = q->next; - SOAP_FREE(soap, q); - } - else - { size_t domlen = 0; - if (q->domain) - { const char *s = strchr(q->domain, ':'); - if (s) - domlen = s - q->domain; - else - domlen = strlen(q->domain); - } - if ((!q->domain || !strncmp(q->domain, domain, domlen)) - && (!q->path || !strncmp(q->path, path, strlen(q->path))) - && (!q->secure || secure)) - { s = tmp; - if (q->version != version) - { sprintf(s, "$Version=%u;", q->version); - version = q->version; - } - if (q->name) - s += soap_encode_cookie(q->name, s, tmp-s+4080); - if (q->value && *q->value) - { *s++ = '='; - s += soap_encode_cookie(q->value, s, tmp-s+4080); - } - if (q->path && (int)strlen(q->path) < tmp-s+4080) - { sprintf(s, ";$Path=\"/%s\"", (*q->path == '/' ? q->path + 1 : q->path)); - s += strlen(s); - } - if (q->domain && (int)strlen(q->domain) < tmp-s+4080) - sprintf(s, ";$Domain=\"%s\"", q->domain); - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Cookie: %s\n", tmp)); - if ((soap->error = soap->fposthdr(soap, "Cookie", tmp))) - return soap->error; - } - p = &q->next; - } - } - return SOAP_OK; -} - -/******************************************************************************/ -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_getcookies(struct soap *soap, const char *val) -{ struct soap_cookie *p = NULL, *q; - const char *s; - char *t, tmp[4096]; /* cookie size is up to 4096 bytes [RFC2109] */ - char *domain = NULL; - char *path = NULL; - unsigned int version = 0; - time_t now = time(NULL); - if (!val) - return; - s = val; - while (*s) - { s = soap_decode_key(tmp, sizeof(tmp), s); - if (!soap_tag_cmp(tmp, "$Version")) - { if ((s = soap_decode_val(tmp, sizeof(tmp), s))) - { if (p) - p->version = (int)atol(tmp); - else - version = (int)atol(tmp); - } - } - else if (!soap_tag_cmp(tmp, "$Path")) - { s = soap_decode_val(tmp, sizeof(tmp), s); - if (*tmp) - { if ((t = (char*)SOAP_MALLOC(soap, strlen(tmp)+1))) - strcpy(t, tmp); - } - else - t = NULL; - if (p) - { if (p->path) - SOAP_FREE(soap, p->path); - p->path = t; - } - else - { if (path) - SOAP_FREE(soap, path); - path = t; - } - } - else if (!soap_tag_cmp(tmp, "$Domain")) - { s = soap_decode_val(tmp, sizeof(tmp), s); - if (*tmp) - { if ((t = (char*)SOAP_MALLOC(soap, strlen(tmp)+1))) - strcpy(t, tmp); - } - else - t = NULL; - if (p) - { if (p->domain) - SOAP_FREE(soap, p->domain); - p->domain = t; - } - else - { if (domain) - SOAP_FREE(soap, domain); - domain = t; - } - } - else if (p && !soap_tag_cmp(tmp, "Path")) - { if (p->path) - SOAP_FREE(soap, p->path); - s = soap_decode_val(tmp, sizeof(tmp), s); - if (*tmp) - { if ((p->path = (char*)SOAP_MALLOC(soap, strlen(tmp)+1))) - strcpy(p->path, tmp); - } - else - p->path = NULL; - } - else if (p && !soap_tag_cmp(tmp, "Domain")) - { if (p->domain) - SOAP_FREE(soap, p->domain); - s = soap_decode_val(tmp, sizeof(tmp), s); - if (*tmp) - { if ((p->domain = (char*)SOAP_MALLOC(soap, strlen(tmp)+1))) - strcpy(p->domain, tmp); - } - else - p->domain = NULL; - } - else if (p && !soap_tag_cmp(tmp, "Version")) - { s = soap_decode_val(tmp, sizeof(tmp), s); - p->version = (unsigned int)atol(tmp); - } - else if (p && !soap_tag_cmp(tmp, "Max-Age")) - { s = soap_decode_val(tmp, sizeof(tmp), s); - p->expire = now + atol(tmp); - } - else if (p && !soap_tag_cmp(tmp, "Expires")) - { struct tm T; - char a[3]; - static const char mns[] = "anebarprayunulugepctovec"; - s = soap_decode_val(tmp, sizeof(tmp), s); - if (strlen(tmp) > 20) - { memset((void*)&T, 0, sizeof(T)); - a[0] = tmp[4]; - a[1] = tmp[5]; - a[2] = '\0'; - T.tm_mday = (int)atol(a); - a[0] = tmp[8]; - a[1] = tmp[9]; - T.tm_mon = (strstr(mns, a) - mns) / 2; - a[0] = tmp[11]; - a[1] = tmp[12]; - T.tm_year = 100 + (int)atol(a); - a[0] = tmp[13]; - a[1] = tmp[14]; - T.tm_hour = (int)atol(a); - a[0] = tmp[16]; - a[1] = tmp[17]; - T.tm_min = (int)atol(a); - a[0] = tmp[19]; - a[1] = tmp[20]; - T.tm_sec = (int)atol(a); - p->expire = soap_timegm(&T); - } - } - else if (p && !soap_tag_cmp(tmp, "Secure")) - p->secure = 1; - else - { if (p) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Got environment cookie %s=%s domain=%s path=%s expire=%ld secure=%d\n", p->name, p->value?p->value:"", p->domain?p->domain:"", p->path?p->path:"", p->expire, p->secure)); - if ((q = soap_set_cookie(soap, p->name, p->value, p->domain, p->path))) - { q->version = p->version; - q->expire = p->expire; - q->secure = p->secure; - q->env = 1; - } - if (p->name) - SOAP_FREE(soap, p->name); - if (p->value) - SOAP_FREE(soap, p->value); - if (p->domain) - SOAP_FREE(soap, p->domain); - if (p->path) - SOAP_FREE(soap, p->path); - SOAP_FREE(soap, p); - } - if ((p = (struct soap_cookie*)SOAP_MALLOC(soap, sizeof(struct soap_cookie)))) - { p->name = (char*)SOAP_MALLOC(soap, strlen(tmp)+1); - strcpy(p->name, tmp); - s = soap_decode_val(tmp, sizeof(tmp), s); - if (*tmp) - { p->value = (char*)SOAP_MALLOC(soap, strlen(tmp)+1); - strcpy(p->value, tmp); - } - else - p->value = NULL; - p->domain = domain; - p->path = path; - p->expire = 0; - p->secure = 0; - p->version = version; - } - } - } - if (p) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Got environment cookie %s=%s domain=%s path=%s expire=%ld secure=%d\n", p->name, p->value?p->value:"", p->domain?p->domain:"", p->path?p->path:"", p->expire, p->secure)); - if ((q = soap_set_cookie(soap, p->name, p->value, p->domain, p->path))) - { q->version = p->version; - q->expire = p->expire; - q->secure = p->secure; - q->env = 1; - } - if (p->name) - SOAP_FREE(soap, p->name); - if (p->value) - SOAP_FREE(soap, p->value); - if (p->domain) - SOAP_FREE(soap, p->domain); - if (p->path) - SOAP_FREE(soap, p->path); - SOAP_FREE(soap, p); - } - if (domain) - SOAP_FREE(soap, domain); - if (path) - SOAP_FREE(soap, path); -} - -/******************************************************************************/ -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_getenv_cookies(struct soap *soap) -{ struct soap_cookie *p; - const char *s; - char key[4096], val[4096]; /* cookie size is up to 4096 bytes [RFC2109] */ - if (!(s = getenv("HTTP_COOKIE"))) - return SOAP_ERR; - do - { s = soap_decode_key(key, sizeof(key), s); - s = soap_decode_val(val, sizeof(val), s); - p = soap_set_cookie(soap, key, val, NULL, NULL); - if (p) - p->env = 1; - } while (*s); - return SOAP_OK; -} - -/******************************************************************************/ -SOAP_FMAC1 -struct soap_cookie* -SOAP_FMAC2 -soap_copy_cookies(struct soap *soap) -{ struct soap_cookie *p, **q, *r; - q = &r; - for (p = soap->cookies; p; p = p->next) - { if (!(*q = (struct soap_cookie*)SOAP_MALLOC(soap, sizeof(struct soap_cookie)))) - return r; - **q = *p; - if (p->name) - { if (((*q)->name = (char*)SOAP_MALLOC(soap, strlen(p->name)+1))) - strcpy((*q)->name, p->name); - } - if (p->value) - { if (((*q)->value = (char*)SOAP_MALLOC(soap, strlen(p->value)+1))) - strcpy((*q)->value, p->value); - } - if (p->domain) - { if (((*q)->domain = (char*)SOAP_MALLOC(soap, strlen(p->domain)+1))) - strcpy((*q)->domain, p->domain); - } - if (p->path) - { if (((*q)->path = (char*)SOAP_MALLOC(soap, strlen(p->path)+1))) - strcpy((*q)->path, p->path); - } - q = &(*q)->next; - } - *q = NULL; - return r; -} - -/******************************************************************************/ -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_free_cookies(struct soap *soap) -{ struct soap_cookie *p; - for (p = soap->cookies; p; p = soap->cookies) - { soap->cookies = p->next; - SOAP_FREE(soap, p->name); - if (p->value) - SOAP_FREE(soap, p->value); - if (p->domain) - SOAP_FREE(soap, p->domain); - if (p->path) - SOAP_FREE(soap, p->path); - SOAP_FREE(soap, p); - } -} - -/******************************************************************************/ -#endif /* WITH_COOKIES */ - -/******************************************************************************/ -#ifdef WITH_GZIP -#ifndef PALM_1 -static int -soap_getgziphdr(struct soap *soap) -{ int i; - soap_wchar c, f = 0; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Get gzip header\n")); - for (i = 0; i < 9; i++) - { if ((int)(c = soap_get1(soap) == EOF)) - return soap->error = SOAP_EOF; - if (i == 2) - f = c; - } - if (f & 0x04) /* FEXTRA */ - { for (i = soap_get1(soap) | (soap_get1(soap) << 8); i; i--) - if ((int)soap_get1(soap) == EOF) - return soap->error = SOAP_EOF; - } - if (f & 0x08) /* FNAME */ - do - c = soap_get1(soap); - while (c && (int)c != EOF); - if ((int)c != EOF && (f & 0x10)) /* FCOMMENT */ - do - c = soap_get1(soap); - while (c && (int)f != EOF); - if ((int)c != EOF && (f & 0x01)) /* FHCRC */ - { if ((int)(c = soap_get1(soap)) != EOF) - c = soap_get1(soap); - } - if ((int)c == EOF) - return soap->error = SOAP_EOF; - return SOAP_OK; -} -#endif -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_begin_recv(struct soap *soap) -{ soap_wchar c; - soap->error = SOAP_OK; - soap_free(soap); - soap_set_local_namespaces(soap); - soap->version = 0; /* don't assume we're parsing SOAP content by default */ -#ifndef WITH_NOIDREF - soap_free_iht(soap); -#endif - if ((soap->imode & SOAP_IO) == SOAP_IO_CHUNK) - soap->omode |= SOAP_IO_CHUNK; - soap->imode &= ~SOAP_IO; - soap->mode = soap->imode; - if (!soap->keep_alive) - { soap->buflen = 0; - soap->bufidx = 0; - } - if (!(soap->mode & SOAP_IO_KEEPALIVE)) - soap->keep_alive = 0; - soap->ahead = 0; - soap->peeked = 0; - soap->level = 0; - soap->part = SOAP_BEGIN; - soap->alloced = 0; - soap->count = 0; - soap->length = 0; - soap->cdata = 0; - *soap->endpoint = '\0'; - soap->action = NULL; -#ifndef WITH_LEANER - soap->dom = NULL; - soap->dime.chunksize = 0; - soap->dime.buflen = 0; - soap->dime.list = NULL; - soap->dime.first = NULL; - soap->dime.last = NULL; - soap->mime.list = NULL; - soap->mime.first = NULL; - soap->mime.last = NULL; - soap->mime.boundary = NULL; - soap->mime.start = NULL; - soap->xlist = NULL; -#endif -#ifdef WIN32 -#ifndef UNDER_CE -#ifndef WITH_FASTCGI - if (!soap_valid_socket(soap->socket)) -#ifdef __BORLANDC__ - setmode((SOAP_SOCKET)soap->recvfd, O_BINARY); -#else - _setmode((SOAP_SOCKET)soap->recvfd, _O_BINARY); -#endif -#endif -#endif -#endif -#ifdef WITH_ZLIB - soap->mode &= ~SOAP_ENC_ZLIB; - soap->zlib_in = SOAP_ZLIB_NONE; - soap->zlib_out = SOAP_ZLIB_NONE; - soap->d_stream.next_in = Z_NULL; - soap->d_stream.avail_in = 0; - soap->d_stream.next_out = (Byte*)soap->buf; - soap->d_stream.avail_out = SOAP_BUFLEN; - soap->z_ratio_in = 1.0; -#endif -#ifndef WITH_LEANER - if (soap->fprepareinit) - soap->fprepareinit(soap); -#endif - c = soap_getchar(soap); -#ifdef WITH_GZIP - if (c == 0x1F) - { if (soap_getgziphdr(soap)) - return soap->error; - if (inflateInit2(&soap->d_stream, -MAX_WBITS) != Z_OK) - return soap->error = SOAP_ZLIB_ERROR; - soap->zlib_state = SOAP_ZLIB_INFLATE; - soap->mode |= SOAP_ENC_ZLIB; - soap->zlib_in = SOAP_ZLIB_GZIP; - soap->z_crc = crc32(0L, NULL, 0); - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "gzip initialized\n")); - memcpy(soap->z_buf, soap->buf, SOAP_BUFLEN); - /* should not chunk over plain transport, so why bother to check? */ - /* if ((soap->mode & SOAP_IO) == SOAP_IO_CHUNK) */ - /* soap->z_buflen = soap->bufidx; */ - /* else */ - soap->d_stream.next_in = (Byte*)(soap->z_buf + soap->bufidx); - soap->d_stream.avail_in = soap->buflen - soap->bufidx; - soap->z_buflen = soap->buflen; - soap->buflen = soap->bufidx; - c = soap_getchar(soap); - } -#endif -#ifndef WITH_LEANER - if (c == '-' && soap_get0(soap) == '-') - soap->mode |= SOAP_ENC_MIME; - else if ((c & 0xFFFC) == (SOAP_DIME_VERSION | SOAP_DIME_MB) && (soap_get0(soap) & 0xFFF0) == 0x20) - soap->mode |= SOAP_ENC_DIME; - else -#endif - { while (soap_blank(c)) - c = soap_getchar(soap); - } - if ((int)c == EOF) - return soap->error = SOAP_EOF; - soap_unget(soap, c); -#ifndef WITH_NOHTTP - /* if not XML or (start of)BOM or MIME/DIME/ZLIB, assume HTTP header */ - if (c != '<' && c != 0xEF && !(soap->mode & (SOAP_ENC_MIME | SOAP_ENC_DIME | SOAP_ENC_ZLIB))) - { soap->mode &= ~SOAP_IO; - soap->error = soap->fparse(soap); - if (soap->error && soap->error < SOAP_STOP) - { soap->keep_alive = 0; /* force close later */ - return soap->error; - } - if ((soap->mode & SOAP_IO) == SOAP_IO_CHUNK) - { soap->chunkbuflen = soap->buflen; - soap->buflen = soap->bufidx; - soap->chunksize = 0; - } -#ifndef WITH_LEANER - else if (soap->fpreparerecv && soap->buflen != soap->bufidx) - soap->fpreparerecv(soap, soap->buf + soap->bufidx, soap->buflen - soap->bufidx); -#endif -#ifdef WITH_ZLIB - if (soap->zlib_in != SOAP_ZLIB_NONE) - { /* fparse should not use soap_unget to push back last char */ -#ifdef WITH_GZIP - c = soap_get1(soap); - if (c == 0x1F) - { if (soap_getgziphdr(soap)) - return soap->error; - if (inflateInit2(&soap->d_stream, -MAX_WBITS) != Z_OK) - return soap->error = SOAP_ZLIB_ERROR; - soap->zlib_state = SOAP_ZLIB_INFLATE; - soap->z_crc = crc32(0L, NULL, 0); - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "gzip initialized\n")); - } - else - { soap_revget1(soap); -#else - { -#endif - if (inflateInit(&soap->d_stream) != Z_OK) - return soap->error = SOAP_ZLIB_ERROR; - soap->zlib_state = SOAP_ZLIB_INFLATE; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Inflate initialized\n")); - } - soap->mode |= SOAP_ENC_ZLIB; - memcpy(soap->z_buf, soap->buf, SOAP_BUFLEN); - soap->d_stream.next_in = (Byte*)(soap->z_buf + soap->bufidx); - soap->d_stream.avail_in = soap->buflen - soap->bufidx; - soap->z_buflen = soap->buflen; - soap->buflen = soap->bufidx; - } -#endif - if (soap->error) - { if (soap->error == SOAP_FORM && soap->fform) - { soap->error = soap->fform(soap); - if (soap->error == SOAP_OK) - soap->error = SOAP_STOP; /* prevents further processing */ - } - return soap->error; - } - } -#endif -#ifndef WITH_LEANER - if (soap->mode & SOAP_ENC_MIME) - { if (soap_getmimehdr(soap)) - return soap->error; - if (soap_get_header_attribute(soap, soap->mime.first->type, "application/dime")) - soap->mode |= SOAP_ENC_DIME; - } - if (soap->mode & SOAP_ENC_DIME) - { if (soap_getdimehdr(soap)) - return soap->error; - if (soap->dime.flags & SOAP_DIME_CF) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Chunked DIME SOAP message\n")); - soap->dime.chunksize = soap->dime.size; - if (soap->buflen - soap->bufidx >= soap->dime.chunksize) - { soap->dime.buflen = soap->buflen; - soap->buflen = soap->bufidx + soap->dime.chunksize; - } - else - soap->dime.chunksize -= soap->buflen - soap->bufidx; - } - soap->count = soap->buflen - soap->bufidx; - } -#endif - return SOAP_OK; -} -#endif - -/******************************************************************************/ -#ifndef WITH_NOHTTP -#ifndef PALM_1 -static int -http_parse(struct soap *soap) -{ char header[SOAP_HDRLEN], *s; - unsigned short get = 0, status = 0, k = 0; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Waiting for HTTP request/response...\n")); - *soap->endpoint = '\0'; - soap->length = 0; - soap->userid = NULL; - soap->passwd = NULL; - soap->action = NULL; - soap->authrealm = NULL; - do - { if (soap_getline(soap, soap->msgbuf, sizeof(soap->msgbuf))) - return soap->error; - DBGLOG(TEST,SOAP_MESSAGE(fdebug, "HTTP status: %s\n", soap->msgbuf)); - for (;;) - { if (soap_getline(soap, header, SOAP_HDRLEN)) - { if (soap->error == SOAP_EOF) - { soap->error = SOAP_OK; - DBGLOG(TEST,SOAP_MESSAGE(fdebug, "EOF in HTTP header, continue anyway\n")); - break; - } - return soap->error; - } - if (!*header) - break; - DBGLOG(TEST,SOAP_MESSAGE(fdebug, "HTTP header: %s\n", header)); - s = strchr(header, ':'); - if (s) - { *s = '\0'; - do s++; - while (*s && *s <= 32); - if ((soap->error = soap->fparsehdr(soap, header, s))) - { if (soap->error < SOAP_STOP) - return soap->error; - status = soap->error; - soap->error = SOAP_OK; - } - } - } - if ((s = strchr(soap->msgbuf, ' '))) - { k = (unsigned short)soap_strtoul(s, &s, 10); - if (!soap_blank(*s)) - k = 0; - } - else - k = 0; - } while (k == 100); - DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Finished HTTP header parsing\n")); - s = strstr(soap->msgbuf, "HTTP/"); - if (s && s[7] != '1') - { if (soap->keep_alive == 1) - soap->keep_alive = 0; - if (k == 0 && (soap->omode & SOAP_IO) == SOAP_IO_CHUNK) /* k == 0 for HTTP request */ - { soap->imode |= SOAP_IO_CHUNK; - soap->omode = (soap->omode & ~SOAP_IO) | SOAP_IO_STORE; - } - } - if (soap->keep_alive < 0) - soap->keep_alive = 1; - DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Keep alive connection = %d\n", soap->keep_alive)); - if (s && (((get = !strncmp(soap->msgbuf, "GET ", 4))) || !strncmp(soap->msgbuf, "POST ", 5))) - { size_t m = strlen(soap->endpoint); - size_t n = m + (s - soap->msgbuf) - 5 - (!get); - if (n >= sizeof(soap->endpoint)) - n = sizeof(soap->endpoint) - 1; - strncpy(soap->path, soap->msgbuf + 4 + (!get), n - m); - soap->path[n - m] = '\0'; - strcat(soap->endpoint, soap->path); - DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Target endpoint='%s'\n", soap->endpoint)); - if (get) - { soap->error = soap->fget(soap); - if (soap->error == SOAP_OK) - soap->error = SOAP_STOP; /* prevents further processing */ - return soap->error; - } - if (status) - return soap->error = status; - return SOAP_OK; - } - if (k == 0 || (k >= 200 && k <= 299) || k == 400 || k == 500) - return SOAP_OK; - DBGLOG(TEST,SOAP_MESSAGE(fdebug, "HTTP error %d\n", k)); - return soap_set_receiver_error(soap, "HTTP error", soap->msgbuf, k); -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_NOHTTP -#ifndef PALM_1 -static int -http_parse_header(struct soap *soap, const char *key, const char *val) -{ if (!soap_tag_cmp(key, "Host")) - { -#ifdef WITH_OPENSSL - if (soap->imode & SOAP_ENC_SSL) - strcpy(soap->endpoint, "https://"); - else -#endif - strcpy(soap->endpoint, "http://"); - strncat(soap->endpoint, val, sizeof(soap->endpoint) - 8); - soap->endpoint[sizeof(soap->endpoint) - 1] = '\0'; - } -#ifndef WITH_LEANER - else if (!soap_tag_cmp(key, "Content-Type")) - { if (soap_get_header_attribute(soap, val, "application/dime")) - soap->mode |= SOAP_ENC_DIME; - else if (soap_get_header_attribute(soap, val, "multipart/related") - || soap_get_header_attribute(soap, val, "multipart/form-data")) - { soap->mime.boundary = soap_strdup(soap, soap_get_header_attribute(soap, val, "boundary")); - soap->mime.start = soap_strdup(soap, soap_get_header_attribute(soap, val, "start")); - soap->mode |= SOAP_ENC_MIME; - } - } -#endif - else if (!soap_tag_cmp(key, "Content-Length")) - soap->length = soap_strtoul(val, NULL, 10); - else if (!soap_tag_cmp(key, "Content-Encoding")) - { if (!soap_tag_cmp(val, "deflate")) -#ifdef WITH_ZLIB - soap->zlib_in = SOAP_ZLIB_DEFLATE; -#else - return SOAP_ZLIB_ERROR; -#endif - else if (!soap_tag_cmp(val, "gzip")) -#ifdef WITH_GZIP - soap->zlib_in = SOAP_ZLIB_GZIP; -#else - return SOAP_ZLIB_ERROR; -#endif - } -#ifdef WITH_ZLIB - else if (!soap_tag_cmp(key, "Accept-Encoding")) - { -#ifdef WITH_GZIP - if (strchr(val, '*') || soap_get_header_attribute(soap, val, "gzip")) - soap->zlib_out = SOAP_ZLIB_GZIP; - else -#endif - if (strchr(val, '*') || soap_get_header_attribute(soap, val, "deflate")) - soap->zlib_out = SOAP_ZLIB_DEFLATE; - else - soap->zlib_out = SOAP_ZLIB_NONE; - } -#endif - else if (!soap_tag_cmp(key, "Transfer-Encoding")) - { soap->mode &= ~SOAP_IO; - if (!soap_tag_cmp(val, "chunked")) - soap->mode |= SOAP_IO_CHUNK; - } - else if (!soap_tag_cmp(key, "Connection")) - { if (!soap_tag_cmp(val, "keep-alive")) - soap->keep_alive = -soap->keep_alive; - else if (!soap_tag_cmp(val, "close")) - soap->keep_alive = 0; - } -#ifndef WITH_LEAN - else if (!soap_tag_cmp(key, "Authorization")) - { if (!soap_tag_cmp(val, "Basic *")) - { int n; - char *s; - soap_base642s(soap, val + 6, soap->tmpbuf, sizeof(soap->tmpbuf) - 1, &n); - soap->tmpbuf[n] = '\0'; - if ((s = strchr(soap->tmpbuf, ':'))) - { *s = '\0'; - soap->userid = soap_strdup(soap, soap->tmpbuf); - soap->passwd = soap_strdup(soap, s + 1); - } - } - } - else if (!soap_tag_cmp(key, "WWW-Authenticate")) - soap->authrealm = soap_strdup(soap, soap_get_header_attribute(soap, val + 6, "realm")); - else if (!soap_tag_cmp(key, "Expect")) - { if (!soap_tag_cmp(val, "100-continue")) - { if ((soap->error = soap->fposthdr(soap, "HTTP/1.1 100 Continue", NULL)) - || (soap->error = soap->fposthdr(soap, NULL, NULL))) - return soap->error; - } - } -#endif - else if (!soap_tag_cmp(key, "SOAPAction")) - { if (*val == '"') - { soap->action = soap_strdup(soap, val + 1); - soap->action[strlen(soap->action) - 1] = '\0'; - } - } - else if (!soap_tag_cmp(key, "Location")) - { strncpy(soap->endpoint, val, sizeof(soap->endpoint)); - soap->endpoint[sizeof(soap->endpoint) - 1] = '\0'; - } -#ifdef WITH_COOKIES - else if (!soap_tag_cmp(key, "Cookie") || !soap_tag_cmp(key, "Set-Cookie")) - soap_getcookies(soap, val); -#endif - return SOAP_OK; -} -#endif -#endif - -/******************************************************************************/ -#if !defined(WITH_NOHTTP) || !defined(WITH_LEANER) -#ifndef PALM_1 -SOAP_FMAC1 -const char* -SOAP_FMAC2 -soap_get_header_attribute(struct soap *soap, const char *line, const char *key) -{ register const char *s = line; - if (s) - { while (*s) - { register short flag; - s = soap_decode_key(soap->tmpbuf, sizeof(soap->tmpbuf), s); - flag = soap_tag_cmp(soap->tmpbuf, key); - s = soap_decode_val(soap->tmpbuf, sizeof(soap->tmpbuf), s); - if (!flag) - return soap->tmpbuf; - } - } - return NULL; -} -#endif -#endif - -/******************************************************************************/ -#if !defined(WITH_NOHTTP) || !defined(WITH_LEANER) -#ifndef PALM_1 -SOAP_FMAC1 -const char* -SOAP_FMAC2 -soap_decode_key(char *buf, size_t len, const char *val) -{ return soap_decode(buf, len, val, "=,;"); -} -#endif -#endif - -/******************************************************************************/ -#if !defined(WITH_NOHTTP) || !defined(WITH_LEANER) -#ifndef PALM_1 -SOAP_FMAC1 -const char* -SOAP_FMAC2 -soap_decode_val(char *buf, size_t len, const char *val) -{ if (*val != '=') - { *buf = '\0'; - return val; - } - return soap_decode(buf, len, val + 1, ",;"); -} -#endif -#endif - -/******************************************************************************/ -#if !defined(WITH_NOHTTP) || !defined(WITH_LEANER) -#ifndef PALM_1 -static const char* -soap_decode(char *buf, size_t len, const char *val, const char *sep) -{ const char *s; - char *t = buf; - for (s = val; *s; s++) - if (*s != ' ' && *s != '\t' && !strchr(sep, *s)) - break; - if (*s == '"') - { s++; - while (*s && *s != '"' && --len) - *t++ = *s++; - } - else - { while (soap_notblank(*s) && !strchr(sep, *s) && --len) - { if (*s == '%') - { *t++ = ((s[1] >= 'A' ? (s[1] & 0x7) + 9 : s[1] - '0') << 4) - + (s[2] >= 'A' ? (s[2] & 0x7) + 9 : s[2] - '0'); - s += 3; - } - else - *t++ = *s++; - } - } - *t = '\0'; - while (*s && !strchr(sep, *s)) - s++; - return s; -} -#endif -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_envelope_begin_out(struct soap *soap) -{ -#ifndef WITH_LEANER - size_t n = 0; - if ((soap->mode & SOAP_ENC_MIME) && soap->mime.boundary && soap->mime.start) - { const char *s; - if ((soap->mode & SOAP_ENC_DIME) && !(soap->mode & SOAP_ENC_MTOM)) - s = "application/dime"; - else if (soap->version == 2) - s = "application/soap+xml; charset=utf-8"; - else - s = "text/xml; charset=utf-8"; - sprintf(soap->tmpbuf, "--%s\r\nContent-Type: %s\r\nContent-Transfer-Encoding: binary\r\nContent-ID: %s\r\n\r\n", soap->mime.boundary, s, soap->mime.start); - n = strlen(soap->tmpbuf); - if (soap_send_raw(soap, soap->tmpbuf, n)) - return soap->error; - } - if (soap->mode & SOAP_IO_LENGTH) - soap->dime.size = soap->count; /* DIME in MIME correction */ - if (!(soap->mode & SOAP_IO_LENGTH) && (soap->mode & SOAP_ENC_DIME)) - { if (soap_putdimehdr(soap)) - return soap->error; - } -#endif - soap->part = SOAP_IN_ENVELOPE; - return soap_element_begin_out(soap, "SOAP-ENV:Envelope", 0, NULL); -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_envelope_end_out(struct soap *soap) -{ if (soap_element_end_out(soap, "SOAP-ENV:Envelope")) - return soap->error; -#ifndef WITH_LEANER - if ((soap->mode & SOAP_IO_LENGTH) && (soap->mode & SOAP_ENC_DIME) && !(soap->mode & SOAP_ENC_MTOM)) - { soap->dime.size = soap->count - soap->dime.size; /* DIME in MIME correction */ - sprintf(soap->id, soap->dime_id_format, 0); - soap->dime.id = soap->id; - if (soap->local_namespaces) - { if (soap->local_namespaces[0].out) - soap->dime.type = (char*)soap->local_namespaces[0].out; - else - soap->dime.type = (char*)soap->local_namespaces[0].ns; - } - soap->dime.options = NULL; - soap->dime.flags = SOAP_DIME_MB | SOAP_DIME_ABSURI; - if (!soap->dime.first) - soap->dime.flags |= SOAP_DIME_ME; - soap->count += 12 + ((strlen(soap->dime.id)+3)&(~3)) + ((strlen(soap->dime.type)+3)&(~3)); - } - if ((soap->mode & SOAP_ENC_DIME) && !(soap->mode & SOAP_ENC_MTOM)) - return soap_send_raw(soap, SOAP_STR_PADDING, -(long)soap->dime.size&3); -#endif - soap->part = SOAP_END_ENVELOPE; - return SOAP_OK; -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_envelope_begin_in(struct soap *soap) -{ register struct Namespace *p; - soap->part = SOAP_IN_ENVELOPE; - if (soap_element_begin_in(soap, "SOAP-ENV:Envelope", 0)) - return soap->error = SOAP_VERSIONMISMATCH; - p = soap->local_namespaces; - if (p) - { const char *ns = p[0].out; - if (!ns) - ns = p[0].ns; - if (!strcmp(ns, soap_env1)) - { soap->version = 1; /* make sure we use SOAP 1.1 */ - if (p[1].out) - SOAP_FREE(soap, p[1].out); - if ((p[1].out = (char*)SOAP_MALLOC(soap, sizeof(soap_enc1)))) - strcpy(p[1].out, soap_enc1); - } - else if (!strcmp(ns, soap_env2)) - { soap->version = 2; /* make sure we use SOAP 1.2 */ - if (p[1].out) - SOAP_FREE(soap, p[1].out); - if ((p[1].out = (char*)SOAP_MALLOC(soap, sizeof(soap_enc2)))) - strcpy(p[1].out, soap_enc2); - } - } - return SOAP_OK; -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_envelope_end_in(struct soap *soap) -{ soap->part = SOAP_END_ENVELOPE; - return soap_element_end_in(soap, "SOAP-ENV:Envelope"); -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_body_begin_out(struct soap *soap) -{ soap->part = SOAP_IN_BODY; - if (soap->version == 1) - soap->encoding = 1; -#ifndef WITH_LEAN - if ((soap->mode & SOAP_XML_SEC) && soap_set_attr(soap, "wsu:Id", "Body")) - return soap->error; -#endif - if (soap_element(soap, "SOAP-ENV:Body", 0, NULL)) - return soap->error; - return soap_element_start_end_out(soap, NULL); -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_body_end_out(struct soap *soap) -{ if (soap_element_end_out(soap, "SOAP-ENV:Body")) - return soap->error; - soap->part = SOAP_END_BODY; - return SOAP_OK; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_body_begin_in(struct soap *soap) -{ soap->part = SOAP_IN_BODY; - if (soap_element_begin_in(soap, "SOAP-ENV:Body", 0)) - return soap->error; - if (!soap->body) - soap->part = SOAP_NO_BODY; - return SOAP_OK; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_body_end_in(struct soap *soap) -{ if (soap->part == SOAP_NO_BODY) - return SOAP_OK; - soap->part = SOAP_END_BODY; - return soap_element_end_in(soap, "SOAP-ENV:Body"); -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_recv_header(struct soap *soap) -{ if (soap_getheader(soap) && soap->error == SOAP_TAG_MISMATCH) - soap->error = SOAP_OK; - return soap->error; -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_set_endpoint(struct soap *soap, const char *endpoint) -{ register const char *s; - register size_t i, n; - soap->endpoint[0] = '\0'; - soap->host[0] = '\0'; - soap->path[0] = '/'; - soap->path[1] = '\0'; - soap->port = 80; - if (!endpoint || !*endpoint) - return; - if (!strncmp(endpoint, "https:", 6)) - soap->port = 443; - strncpy(soap->endpoint, endpoint, sizeof(soap->endpoint) - 1); - s = strchr(endpoint, ':'); - if (s && s[1] == '/' && s[2] == '/') - s += 3; - else - s = endpoint; - n = strlen(s); - if (n >= sizeof(soap->host)) - n = sizeof(soap->host) - 1; -#ifdef WITH_IPV6 - if (s[0] == '[') - { s++; - for (i = 0; i < n; i++) - { soap->host[i] = s[i]; - if (s[i] == ']') - { s++; - break; - } - } - } - else - { for (i = 0; i < n; i++) - { soap->host[i] = s[i]; - if (s[i] == '/' || s[i] == ':') - break; - } - } -#else - for (i = 0; i < n; i++) - { soap->host[i] = s[i]; - if (s[i] == '/' || s[i] == ':') - break; - } -#endif - soap->host[i] = '\0'; - if (s[i] == ':') - { soap->port = (int)atol(s + i + 1); - for (i++; i < n; i++) - if (s[i] == '/') - break; - } - if (s[i]) - { strncpy(soap->path, s + i, sizeof(soap->path)); - soap->path[sizeof(soap->path) - 1] = '\0'; - } -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_connect(struct soap *soap, const char *endpoint, const char *action) -{ return soap_connect_command(soap, SOAP_POST, endpoint, action); -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_connect_command(struct soap *soap, int http_command, const char *endpoint, const char *action) -{ char host[sizeof(soap->host)]; - int port; - size_t count; - soap->error = SOAP_OK; - strcpy(host, soap->host); /* save to compare */ - port = soap->port; /* save to compare */ - soap_set_endpoint(soap, endpoint); -#ifndef WITH_LEANER - if (soap->fconnect) - { if ((soap->error = soap->fconnect(soap, endpoint, soap->host, soap->port))) - return soap->error; - } - else -#endif - if (soap->fopen && *soap->host) - { soap->status = http_command; - if (!soap->keep_alive || !soap_valid_socket(soap->socket) || strcmp(soap->host, host) || soap->port != port || !soap->fpoll || soap->fpoll(soap)) - { soap->keep_alive = 0; /* to force close */ - soap->omode &= ~SOAP_IO_UDP; /* to force close */ - soap_closesock(soap); - DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Connect/reconnect to host='%s' path='%s' port=%d\n", soap->host, soap->path, soap->port)); -#ifdef WITH_UDP - if (!strncmp(endpoint, "soap.udp:", 9)) - soap->omode |= SOAP_IO_UDP; -#endif - soap->socket = soap->fopen(soap, endpoint, soap->host, soap->port); - if (soap->error) - return soap->error; - soap->keep_alive = ((soap->omode & SOAP_IO_KEEPALIVE) != 0); - } - } - count = soap_count_attachments(soap); - if (soap_begin_send(soap)) - return soap->error; -#ifndef WITH_NOHTTP - if ((soap->mode & SOAP_IO) != SOAP_IO_STORE && !(soap->mode & SOAP_ENC_XML) && endpoint) - { unsigned int k = soap->mode; - soap->mode &= ~(SOAP_IO | SOAP_ENC_ZLIB); - if ((k & SOAP_IO) != SOAP_IO_FLUSH) - soap->mode |= SOAP_IO_BUFFER; - if ((soap->error = soap->fpost(soap, endpoint, soap->host, soap->port, soap->path, action, count))) - return soap->error; -#ifndef WITH_LEANER - if ((k & SOAP_IO) == SOAP_IO_CHUNK) - { if (soap_flush(soap)) - return soap->error; - } -#endif - soap->mode = k; - } - else if (action) - soap->action = soap_strdup(soap, action); - if (http_command != SOAP_POST) - return soap_end_send(soap); -#endif - return SOAP_OK; -} -#endif - -/******************************************************************************/ -#ifndef WITH_LEAN -SOAP_FMAC1 -char* -SOAP_FMAC2 -soap_s2base64(struct soap *soap, const unsigned char *s, char *t, int n) -{ register int i; - register unsigned long m; - register char *p; - if (!t) - t = (char*)soap_malloc(soap, (n + 2) / 3 * 4 + 1); - if (!t) - { soap->error = SOAP_EOM; - return NULL; - } - p = t; - t[0] = '\0'; - if (!s) - return p; - for (; n > 2; n -= 3, s += 3) - { m = s[0]; - m = (m << 8) | s[1]; - m = (m << 8) | s[2]; - for (i = 4; i > 0; m >>= 6) - t[--i] = soap_base64o[m & 0x3F]; - t += 4; - } - t[0] = '\0'; - if (n > 0) - { m = 0; - for (i = 0; i < n; i++) - m = (m << 8) | *s++; - for (; i < 3; i++) - m <<= 8; - for (i++; i > 0; m >>= 6) - t[--i] = soap_base64o[m & 0x3F]; - for (i = 3; i > n; i--) - t[i] = '='; - t[4] = '\0'; - } - return p; -} -#endif - -/******************************************************************************/ -#ifndef WITH_LEAN -SOAP_FMAC1 -const char* -SOAP_FMAC2 -soap_base642s(struct soap *soap, const char *s, char *t, size_t l, int *n) -{ register int i, j, c; - register unsigned long m; - register const char *p; - if (!s || !*s) - { if (n) - *n = 0; - if (soap->error) - return NULL; - return SOAP_NON_NULL; - } - if (!t) - { l = (strlen(s) + 3) / 4 * 3; - t = (char*)soap_malloc(soap, l); - } - if (!t) - { soap->error = SOAP_EOM; - return NULL; - } - p = t; - if (n) - *n = 0; - for (;;) - { for (i = 0; i < SOAP_BLKLEN; i++) - { m = 0; - j = 0; - while (j < 4) - { c = *s++; - if (c == '=' || !c) - { i *= 3; - switch (j) - { case 2: - *t++ = (char)((m >> 4) & 0xFF); - i++; - break; - case 3: - *t++ = (char)((m >> 10) & 0xFF); - *t++ = (char)((m >> 2) & 0xFF); - i += 2; - } - if (n) - *n += i; - return p; - } - c -= '+'; - if (c >= 0 && c <= 79) - { m = (m << 6) + soap_base64i[c]; - j++; - } - } - *t++ = (char)((m >> 16) & 0xFF); - *t++ = (char)((m >> 8) & 0xFF); - *t++ = (char)(m & 0xFF); - if (l < 3) - { if (n) - *n += i; - return p; - } - l -= 3; - } - if (n) - *n += 3 * SOAP_BLKLEN; - } -} -#endif - -/******************************************************************************/ -#ifndef WITH_LEAN -SOAP_FMAC1 -char* -SOAP_FMAC2 -soap_s2hex(struct soap *soap, const unsigned char *s, char *t, int n) -{ register char *p; - if (!t) - t = (char*)soap_malloc(soap, 2 * n + 1); - if (!t) - { soap->error = SOAP_EOM; - return NULL; - } - p = t; - t[0] = '\0'; - if (s) - { for (; n > 0; n--) - { register int m = *s++; - *t++ = (char)((m >> 4) + (m > 159 ? 'a' - 10 : '0')); - m &= 0x0F; - *t++ = (char)(m + (m > 9 ? 'a' - 10 : '0')); - } - } - *t++ = '\0'; - return p; -} -#endif - -/******************************************************************************/ -#ifndef WITH_LEAN -SOAP_FMAC1 -const char* -SOAP_FMAC2 -soap_hex2s(struct soap *soap, const char *s, char *t, size_t l, int *n) -{ register const char *p; - if (!s || !*s) - { if (n) - *n = 0; - if (soap->error) - return NULL; - return SOAP_NON_NULL; - } - if (!t) - { l = strlen(s) / 2; - t = (char*)soap_malloc(soap, l); - } - if (!t) - { soap->error = SOAP_EOM; - return NULL; - } - p = t; - while (l) - { register int d1, d2; - d1 = *s++; - if (!d1) - break; - d2 = *s++; - if (!d2) - break; - *t++ = ((d1 >= 'A' ? (d1 & 0x7) + 9 : d1 - '0') << 4) + (d2 >= 'A' ? (d2 & 0x7) + 9 : d2 - '0'); - l--; - } - if (n) - *n = t - p; - return p; -} -#endif - -/******************************************************************************/ -#ifndef WITH_NOHTTP -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_puthttphdr(struct soap *soap, int status, size_t count) -{ register const char *s; -#ifndef WITH_LEANER - register const char *r = NULL; -#endif - register int err; - if (status == SOAP_FILE && soap->http_content) - s = soap->http_content; - else if (status == SOAP_HTML) - s = "text/html; charset=utf-8"; - else if (soap->version == 2) - s = "application/soap+xml; charset=utf-8"; - else - s = "text/xml; charset=utf-8"; -#ifndef WITH_LEANER - if (soap->mode & (SOAP_ENC_DIME | SOAP_ENC_MTOM)) - { if (soap->mode & SOAP_ENC_MTOM) - { r = s; - s = "application/xop+xml; charset=utf-8"; - } - else - s = "application/dime"; - } - if ((soap->mode & SOAP_ENC_MIME) && soap->mime.boundary && soap->status != SOAP_GET) - { register const char *t = strchr(s, ';'); - sprintf(soap->tmpbuf, "multipart/related; boundary=\"%s\"; type=\"", soap->mime.boundary); - if (t) - strncat(soap->tmpbuf, s, t - s); - else - strcat(soap->tmpbuf, s); - if (soap->mime.start) - { strcat(soap->tmpbuf, "\"; start=\""); - strcat(soap->tmpbuf, soap->mime.start); - } - strcat(soap->tmpbuf, "\""); - if (r) - { strcat(soap->tmpbuf, "; start-info=\""); - strcat(soap->tmpbuf, r); - strcat(soap->tmpbuf, "\""); - } - s = soap->tmpbuf; - } -#endif - if ((err = soap->fposthdr(soap, "Content-Type", s))) - return err; -#ifdef WITH_ZLIB - if (soap->omode & SOAP_ENC_ZLIB) - { -#ifdef WITH_GZIP - err = soap->fposthdr(soap, "Content-Encoding", "gzip"); -#else - err = soap->fposthdr(soap, "Content-Encoding", "deflate"); -#endif - if (err) - return err; - } -#endif -#ifndef WITH_LEANER - if ((soap->omode & SOAP_IO) == SOAP_IO_CHUNK) - err = soap->fposthdr(soap, "Transfer-Encoding", "chunked"); - else -#endif - if (count > 0) - { sprintf(soap->tmpbuf, "%lu", (unsigned long)count); - err = soap->fposthdr(soap, "Content-Length", soap->tmpbuf); - } - if (err) - return err; - return soap->fposthdr(soap, "Connection", soap->keep_alive ? "keep-alive" : "close"); -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_NOHTTP -#ifndef PALM_1 -static int -http_get(struct soap *soap) -{ return SOAP_GET_METHOD; -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_NOHTTP -#ifndef PALM_1 -static int -http_post(struct soap *soap, const char *endpoint, const char *host, int port, const char *path, const char *action, size_t count) -{ register const char *s; - register int err; - if (soap->status == SOAP_GET) - { s = "GET"; - count = 0; - } - else - s = "POST"; -#ifdef PALM - if (!endpoint || (strncmp(endpoint, "http:", 5) && strncmp(endpoint, "https:", 6) && strncmp(endpoint, "httpg:", 6)) && strncmp(endpoint, "_beam:", 6) && strncmp(endpoint, "_local:", 7) && strncmp(endpoint, "_btobex:", 8)) -#else - if (!endpoint || (strncmp(endpoint, "http:", 5) && strncmp(endpoint, "https:", 6) && strncmp(endpoint, "httpg:", 6))) -#endif - return SOAP_OK; - if (soap->proxy_host && strncmp(endpoint, "https:", 6)) - sprintf(soap->tmpbuf, "%s %s HTTP/%s", s, endpoint, soap->http_version); - else - sprintf(soap->tmpbuf, "%s /%s HTTP/%s", s, (*path == '/' ? path + 1 : path), soap->http_version); - if ((err = soap->fposthdr(soap, soap->tmpbuf, NULL))) - return err; - if (port != 80) - sprintf(soap->tmpbuf, "%s:%d", host, port); - else - strcpy(soap->tmpbuf, host); - if ((err = soap->fposthdr(soap, "Host", soap->tmpbuf)) - || (err = soap->fposthdr(soap, "User-Agent", "gSOAP/2.7")) - || (err = soap_puthttphdr(soap, SOAP_OK, count))) - return err; -#ifdef WITH_ZLIB -#ifdef WITH_GZIP - if ((err = soap->fposthdr(soap, "Accept-Encoding", "gzip, deflate"))) -#else - if ((err = soap->fposthdr(soap, "Accept-Encoding", "deflate"))) -#endif - return err; -#endif -#ifndef WITH_LEAN - if (soap->userid && soap->passwd && strlen(soap->userid) + strlen(soap->passwd) < 761) - { sprintf(soap->tmpbuf + 262, "%s:%s", soap->userid, soap->passwd); - strcpy(soap->tmpbuf, "Basic "); - soap_s2base64(soap, (const unsigned char*)(soap->tmpbuf + 262), soap->tmpbuf + 6, strlen(soap->tmpbuf + 262)); - if ((err = soap->fposthdr(soap, "Authorization", soap->tmpbuf))) - return err; - } - if (soap->proxy_userid && soap->proxy_passwd && strlen(soap->proxy_userid) + strlen(soap->proxy_passwd) < 761) - { sprintf(soap->tmpbuf + 262, "%s:%s", soap->proxy_userid, soap->proxy_passwd); - strcpy(soap->tmpbuf, "Basic "); - soap_s2base64(soap, (const unsigned char*)(soap->tmpbuf + 262), soap->tmpbuf + 6, strlen(soap->tmpbuf + 262)); - if ((err = soap->fposthdr(soap, "Proxy-Authorization", soap->tmpbuf))) - return err; - } -#endif -#ifdef WITH_COOKIES -#ifdef WITH_OPENSSL - if (soap_putcookies(soap, host, path, soap->ssl != NULL)) - return soap->error; -#else - if (soap_putcookies(soap, host, path, 0)) - return soap->error; -#endif -#endif - if (action && soap->version == 1) - { sprintf(soap->tmpbuf, "\"%s\"", action); - if ((err = soap->fposthdr(soap, "SOAPAction", soap->tmpbuf))) - return err; - } - return soap->fposthdr(soap, NULL, NULL); -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_NOHTTP -#ifndef PALM_1 -static int -http_send_header(struct soap *soap, const char *s) -{ register const char *t; - do - { t = strchr(s, '\n'); /* disallow \n in HTTP headers */ - if (!t) - t = s + strlen(s); - if (soap_send_raw(soap, s, t - s)) - return soap->error; - s = t + 1; - } while (*t); - return SOAP_OK; -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_NOHTTP -#ifndef PALM_1 -static int -http_post_header(struct soap *soap, const char *key, const char *val) -{ if (key) - { if (http_send_header(soap, key)) - return soap->error; - if (val && (soap_send_raw(soap, ": ", 2) || http_send_header(soap, val))) - return soap->error; - } - return soap_send_raw(soap, "\r\n", 2); -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_NOHTTP -#ifndef PALM_1 -static int -http_response(struct soap *soap, int status, size_t count) -{ register int err; -#ifdef WMW_RPM_IO - if (soap->rpmreqid) - httpOutputEnable(soap->rpmreqid); -#endif /* WMW_RPM_IO */ - if (!status || status == SOAP_HTML || status == SOAP_FILE) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "OK 200\n")); -#ifdef WMW_RPM_IO - if (soap->rpmreqid || soap_valid_socket(soap->master) || soap_valid_socket(soap->socket)) /* RPM behaves as if standalone */ -#else - if (soap_valid_socket(soap->master) || soap_valid_socket(soap->socket)) /* standalone application */ -#endif /* WMW_RPM_IO */ - { sprintf(soap->tmpbuf, "HTTP/%s 200 OK", soap->http_version); - if ((err = soap->fposthdr(soap, soap->tmpbuf, NULL))) - return err; - } - else if ((err = soap->fposthdr(soap, "Status", "200 OK"))) - return err; - } - else if (status > 200 && status < 600) - { sprintf(soap->tmpbuf, "HTTP/%s %d %s", soap->http_version, status, http_error(soap, status)); - if ((err = soap->fposthdr(soap, soap->tmpbuf, NULL))) - return err; -#ifndef WITH_LEAN - if (status == 401) - { sprintf(soap->tmpbuf, "Basic realm=\"%s\"", soap->authrealm ? soap->authrealm : "gSOAP Web Service"); - if ((err = soap->fposthdr(soap, "WWW-Authenticate", soap->tmpbuf))) - return err; - } - else if ((status >= 301 && status <= 303) || status == 307) - { if ((err = soap->fposthdr(soap, "Location", soap->endpoint))) - return err; - } -#endif - } - else - { const char *s = *soap_faultcode(soap); - if (soap->version == 2 && !strcmp(s, "SOAP-ENV:Sender")) - s = "400 Bad Request"; - else - s = "500 Internal Server Error"; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Error %s (status=%d)\n", s, status)); -#ifdef WMW_RPM_IO - if (soap->rpmreqid || soap_valid_socket(soap->master) || soap_valid_socket(soap->socket)) /* RPM behaves as if standalone */ -#else - if (soap_valid_socket(soap->master) || soap_valid_socket(soap->socket)) /* standalone application */ -#endif /* WMW_RPM_IO */ - { sprintf(soap->tmpbuf, "HTTP/%s %s", soap->http_version, s); - if ((err = soap->fposthdr(soap, soap->tmpbuf, NULL))) - return err; - } - else if ((err = soap->fposthdr(soap, "Status", s))) - return err; - } - if ((err = soap->fposthdr(soap, "Server", "gSOAP/2.7")) - || (err = soap_puthttphdr(soap, status, count))) - return err; -#ifdef WITH_COOKIES - if (soap_putsetcookies(soap)) - return soap->error; -#endif - return soap->fposthdr(soap, NULL, NULL); -} -#endif -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_response(struct soap *soap, int status) -{ register size_t count; - if (!(soap->omode & (SOAP_ENC_XML | SOAP_IO_STORE /* this tests for chunking too */)) - && (status == SOAP_HTML || status == SOAP_FILE)) - { soap->omode &= ~SOAP_IO; - soap->omode |= SOAP_IO_STORE; - } - soap->status = status; - count = soap_count_attachments(soap); - if (soap_begin_send(soap)) - return soap->error; -#ifndef WITH_NOHTTP - if ((soap->mode & SOAP_IO) != SOAP_IO_STORE && !(soap->mode & SOAP_ENC_XML)) - { register int n = soap->mode; - soap->mode &= ~(SOAP_IO | SOAP_ENC_ZLIB); - if ((n & SOAP_IO) != SOAP_IO_FLUSH) - soap->mode |= SOAP_IO_BUFFER; - if ((soap->error = soap->fresponse(soap, status, count))) - return soap->error; -#ifndef WITH_LEANER - if ((n & SOAP_IO) == SOAP_IO_CHUNK) - { if (soap_flush(soap)) - return soap->error; - } -#endif - soap->mode = n; - } -#endif - return SOAP_OK; -} -#endif - -/******************************************************************************/ -#ifndef WITH_LEAN -static const char* -soap_set_validation_fault(struct soap *soap, const char *s, const char *t) -{ if (*soap->tag) - sprintf(soap->msgbuf, "Validation constraint violation: %s%s in element <%s>", s, t?t:SOAP_STR_EOS, soap->tag); - else - sprintf(soap->msgbuf, "Validation constraint violation: %s%s", s, t?t:SOAP_STR_EOS); - return soap->msgbuf; -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_set_fault(struct soap *soap) -{ const char **c = soap_faultcode(soap); - const char **s = soap_faultstring(soap); - if (!*c && !*s && soap->fseterror) - soap->fseterror(soap, c, s); - if (!*c) - { if (soap->version == 2) - *c = "SOAP-ENV:Sender"; - else - *c = "SOAP-ENV:Client"; - } - if (*s) - return; - switch (soap->error) - { -#ifndef WITH_LEAN - case SOAP_CLI_FAULT: - *s = "Client fault"; - break; - case SOAP_SVR_FAULT: - *s = "Server fault"; - break; - case SOAP_TAG_MISMATCH: - *s = soap_set_validation_fault(soap, "tag name or namespace mismatch", NULL); - break; - case SOAP_TYPE: - *s = soap_set_validation_fault(soap, "data type mismatch ", soap->type); - break; - case SOAP_SYNTAX_ERROR: - *s = "Well-formedness violation"; - break; - case SOAP_NO_TAG: - *s = "No XML element tag"; - break; - case SOAP_MUSTUNDERSTAND: - *c = "SOAP-ENV:MustUnderstand"; - sprintf(soap->msgbuf, "The data in element '%s' must be understood but cannot be handled", soap->tag); - *s = soap->msgbuf; - break; - case SOAP_VERSIONMISMATCH: - *c = "SOAP-ENV:VersionMismatch"; - *s = "SOAP version mismatch or invalid SOAP message"; - break; - case SOAP_DATAENCODINGUNKNOWN: - *c = "SOAP-ENV:DataEncodingUnknown"; - *s = "Unsupported SOAP data encoding"; - break; - case SOAP_NAMESPACE: - *s = soap_set_validation_fault(soap, "namespace mismatch", NULL); - break; - case SOAP_USER_ERROR: - *s = "User error"; - break; - case SOAP_FATAL_ERROR: - *s = "Fatal error"; - break; - case SOAP_NO_METHOD: - sprintf(soap->msgbuf, "Method '%s' not implemented: method name or namespace not recognized", soap->tag); - *s = soap->msgbuf; - break; - case SOAP_GET_METHOD: - *s = "HTTP GET method not implemented"; - break; - case SOAP_EOM: - *s = "Out of memory"; - break; - case SOAP_IOB: - *s = "Array index out of bounds"; - break; - case SOAP_NULL: - *s = soap_set_validation_fault(soap, "nil not allowed", NULL); - break; - case SOAP_DUPLICATE_ID: - *s = soap_set_validation_fault(soap, "multiple definitions of id ", soap->id); - if (soap->version == 2) - *soap_faultsubcode(soap) = "SOAP-ENC:DuplicateID"; - break; - case SOAP_MISSING_ID: - *s = soap_set_validation_fault(soap, "missing id for ref ", soap->id); - if (soap->version == 2) - *soap_faultsubcode(soap) = "SOAP-ENC:MissingID"; - break; - case SOAP_HREF: - *s = soap_set_validation_fault(soap, "incompatible object ref ", soap->id); - break; - case SOAP_FAULT: - break; -#ifndef WITH_NOIO - case SOAP_UDP_ERROR: - *s = "Message too large for UDP packet"; - break; - case SOAP_TCP_ERROR: - *s = tcp_error(soap); - break; -#endif - case SOAP_HTTP_ERROR: - *s = "HTTP error"; - break; - case SOAP_SSL_ERROR: -#ifdef WITH_OPENSSL - *s = "SSL error"; -#else - *s = "OpenSSL not installed: recompile with -DWITH_OPENSSL"; -#endif - break; - case SOAP_PLUGIN_ERROR: - *s = "Plugin registry error"; - break; - case SOAP_DIME_ERROR: - *s = "DIME format error"; - break; - case SOAP_DIME_HREF: - *s = "DIME href to missing attachment"; - break; - case SOAP_DIME_MISMATCH: - *s = "DIME version/transmission error"; - break; - case SOAP_DIME_END: - *s = "End of DIME error"; - break; - case SOAP_MIME_ERROR: - *s = "MIME format error"; - break; - case SOAP_MIME_HREF: - *s = "MIME href to missing attachment"; - break; - case SOAP_MIME_END: - *s = "End of MIME error"; - break; - case SOAP_ZLIB_ERROR: -#ifdef WITH_ZLIB - sprintf(soap->msgbuf, "Zlib/gzip error: '%s'", soap->d_stream.msg?soap->d_stream.msg:""); - *s = soap->msgbuf; -#else - *s = "Zlib/gzip not installed for (de)compression: recompile with -DWITH_GZIP"; -#endif - break; - case SOAP_REQUIRED: - *s = soap_set_validation_fault(soap, "missing required attribute", NULL); - break; - case SOAP_PROHIBITED: - *s = soap_set_validation_fault(soap, "prohibited attribute present", NULL); - break; - case SOAP_OCCURS: - *s = soap_set_validation_fault(soap, "min/maxOccurs violation", NULL); - break; - case SOAP_LENGTH: - *s = soap_set_validation_fault(soap, "content length violation", NULL); - break; - case SOAP_STOP: - *s = "Stopped: no response sent"; - break; -#endif - case SOAP_EOF: -#ifndef WITH_NOIO - sprintf(soap->msgbuf, "End of file or no input: '%s'", soap_strerror(soap)); - *s = soap->msgbuf; - break; -#else - *s = "End of file or no input"; - break; -#endif - default: -#ifndef WITH_NOHTTP -#ifndef WITH_LEAN - if (soap->error > 200 && soap->error < 600) - { sprintf(soap->msgbuf, "HTTP Error: %d %s", soap->error, http_error(soap, soap->error)); - *s = soap->msgbuf; - } - else -#endif -#endif - { sprintf(soap->msgbuf, "Error %d", soap->error); - *s = soap->msgbuf; - } - } -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_send_fault(struct soap *soap) -{ register int status = soap->error; - int r = 1; - if (status == SOAP_STOP) - return status; - DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Sending back fault struct for error code %d\n", soap->error)); - soap->keep_alive = 0; /* to terminate connection */ - soap_set_fault(soap); -#ifndef WITH_NOIO -#ifndef WITH_LEAN - if (soap_valid_socket(soap->socket)) - { struct timeval timeout; - fd_set rfd, sfd; - timeout.tv_sec = 0; - timeout.tv_usec = 0; - FD_ZERO(&rfd); - FD_ZERO(&sfd); - FD_SET((SOAP_SOCKET)soap->socket, &rfd); - FD_SET((SOAP_SOCKET)soap->socket, &sfd); - r = select((SOAP_SOCKET)(soap->socket + 1), &rfd, &sfd, NULL, &timeout); - if (r > 0) - { if (!FD_ISSET((SOAP_SOCKET)soap->socket, &sfd) - || (FD_ISSET((SOAP_SOCKET)soap->socket, &rfd) - && recv((SOAP_SOCKET)soap->socket, soap->tmpbuf, 1, MSG_PEEK) < 0)) - r = 0; - } - } -#endif -#endif - if ((status != SOAP_EOF || (!soap->recv_timeout && !soap->send_timeout)) && r > 0) - { soap->error = SOAP_OK; - soap_serializeheader(soap); - soap_serializefault(soap); - soap_begin_count(soap); - if (soap->mode & SOAP_IO_LENGTH) - { soap_envelope_begin_out(soap); - soap_putheader(soap); - soap_body_begin_out(soap); - soap_putfault(soap); - soap_body_end_out(soap); - soap_envelope_end_out(soap); - } - soap_end_count(soap); - if (soap_response(soap, status) - || soap_envelope_begin_out(soap) - || soap_putheader(soap) - || soap_body_begin_out(soap) - || soap_putfault(soap) - || soap_body_end_out(soap) - || soap_envelope_end_out(soap)) - return soap_closesock(soap); - soap_end_send(soap); - } - soap->error = status; - return soap_closesock(soap); -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_recv_fault(struct soap *soap) -{ register int status = soap->error; - DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Receiving SOAP Fault\n")); - soap->error = SOAP_OK; - if (soap_getfault(soap)) - { DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Error: soap_get_soapfault() failed. Is this a SOAP message at all?\n")); - *soap_faultcode(soap) = (soap->version == 2 ? "SOAP-ENV:Sender" : "SOAP-ENV:Client"); - soap->error = status; - soap_set_fault(soap); - } - else - { register const char *s = *soap_faultcode(soap); - if (!soap_match_tag(soap, s, "SOAP-ENV:Server") || !soap_match_tag(soap, s, "SOAP-ENV:Receiver")) - status = SOAP_SVR_FAULT; - else if (!soap_match_tag(soap, s, "SOAP-ENV:Client") || !soap_match_tag(soap, s, "SOAP-ENV:Sender")) - status = SOAP_CLI_FAULT; - else if (!soap_match_tag(soap, s, "SOAP-ENV:MustUnderstand")) - status = SOAP_MUSTUNDERSTAND; - else if (!soap_match_tag(soap, s, "SOAP-ENV:VersionMismatch")) - status = SOAP_VERSIONMISMATCH; - else - { DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Fault code %s\n", s)); - status = SOAP_FAULT; - } - if (soap_body_end_in(soap) - || soap_envelope_end_in(soap) - || soap_end_recv(soap)) - return soap_closesock(soap); - soap->error = status; - } - return soap_closesock(soap); -} -#endif - -/******************************************************************************/ -#ifndef WITH_NOHTTP -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_send_empty_response(struct soap *soap) -{ soap->count = 0; - if (soap_response(soap, SOAP_OK) || soap_end_send(soap)) - return soap_closesock(soap); - return SOAP_OK; -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_NOHTTP -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_recv_empty_response(struct soap *soap) -{ if (soap_begin_recv(soap) || soap_end_recv(soap)) - return soap_closesock(soap); - return SOAP_OK; -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_NOIO -#ifndef PALM_1 -static const char* -soap_strerror(struct soap *soap) -{ register int err = soap->errnum; - if (err) - { -#ifndef WIN32 - return strerror(err); -#else - FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM|FORMAT_MESSAGE_IGNORE_INSERTS, NULL, err, 0, (LPTSTR)&soap->errorstr, sizeof(soap->errorstr), NULL); - return soap->errorstr; -#endif - } - return "Operation interrupted or timed out"; -} -#endif -#endif - -/******************************************************************************/ -#ifndef PALM_2 -static int -soap_set_error(struct soap *soap, const char *faultcode, const char *faultsubcode, const char *faultstring, const char *faultdetail, int soaperror) -{ *soap_faultcode(soap) = faultcode; - if (faultsubcode) - *soap_faultsubcode(soap) = faultsubcode; - *soap_faultstring(soap) = faultstring; - if (faultdetail && *faultdetail) - { register const char **s = soap_faultdetail(soap); - if (s) - *s = faultdetail; - } - return soap->error = soaperror; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_set_sender_error(struct soap *soap, const char *faultstring, const char *faultdetail, int soaperror) -{ return soap_set_error(soap, soap->version == 2 ? "SOAP-ENV:Sender" : "SOAP-ENV:Client", NULL, faultstring, faultdetail, soaperror); -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_set_receiver_error(struct soap *soap, const char *faultstring, const char *faultdetail, int soaperror) -{ return soap_set_error(soap, soap->version == 2 ? "SOAP-ENV:Receiver" : "SOAP-ENV:Server", NULL, faultstring, faultdetail, soaperror); -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -static int -soap_copy_fault(struct soap *soap, const char *faultcode, const char *faultsubcode, const char *faultstring, const char *faultdetail) -{ char *r = NULL, *s = NULL, *t = NULL; - if (faultsubcode) - r = soap_strdup(soap, faultsubcode); - if (faultstring) - s = soap_strdup(soap, faultstring); - if (faultdetail) - t = soap_strdup(soap, faultdetail); - return soap_set_error(soap, faultcode, r, s, t, SOAP_FAULT); -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_sender_fault(struct soap *soap, const char *faultstring, const char *faultdetail) -{ return soap_sender_fault_subcode(soap, NULL, faultstring, faultdetail); -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_sender_fault_subcode(struct soap *soap, const char *faultsubcode, const char *faultstring, const char *faultdetail) -{ return soap_copy_fault(soap, soap->version == 2 ? "SOAP-ENV:Sender" : "SOAP-ENV:Client", faultsubcode, faultstring, faultdetail); -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_receiver_fault(struct soap *soap, const char *faultstring, const char *faultdetail) -{ return soap_receiver_fault_subcode(soap, NULL, faultstring, faultdetail); -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_receiver_fault_subcode(struct soap *soap, const char *faultsubcode, const char *faultstring, const char *faultdetail) -{ return soap_copy_fault(soap, soap->version == 2 ? "SOAP-ENV:Receiver" : "SOAP-ENV:Server", faultsubcode, faultstring, faultdetail); -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -#ifndef WITH_NOSTDLIB -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_print_fault(struct soap *soap, FILE *fd) -{ if (soap->error) - { const char *c, *v = NULL, *s, **d; - d = soap_faultcode(soap); - if (!*d) - soap_set_fault(soap); - c = *d; - if (soap->version == 2) - v = *soap_faultsubcode(soap); - s = *soap_faultstring(soap); - d = soap_faultdetail(soap); - fprintf(fd, "%s%d fault: %s [%s]\n\"%s\"\nDetail: %s\n", soap->version ? "SOAP 1." : "Error ", soap->version ? (int)soap->version : soap->error, c, v ? v : "no subcode", s ? s : "[no reason]", d && *d ? *d : "[no detail]"); - } -} -#endif -#endif - -/******************************************************************************/ -#ifndef PALM_1 -#ifndef WITH_NOSTDLIB -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_print_fault_location(struct soap *soap, FILE *fd) -{ -#ifndef WITH_LEAN - int i, j, c1, c2; - if (soap->error && soap->buflen > 0) - { i = (int)soap->bufidx - 1; - if (i <= 0) - i = 0; - c1 = soap->buf[i]; - soap->buf[i] = '\0'; - if ((int)soap->buflen >= i + 1024) - j = i + 1023; - else - j = (int)soap->buflen - 1; - c2 = soap->buf[j]; - soap->buf[j] = '\0'; - fprintf(fd, "%s%c\n** HERE **\n", soap->buf, c1); - if (soap->bufidx < soap->buflen) - fprintf(fd, "%s\n", soap->buf + soap->bufidx); - soap->buf[i] = c1; - soap->buf[j] = c2; - } -#endif -} -#endif -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_register_plugin_arg(struct soap *soap, int (*fcreate)(struct soap*, struct soap_plugin*, void*), void *arg) -{ register struct soap_plugin *p; - register int r; - if (!(p = (struct soap_plugin*)SOAP_MALLOC(soap, sizeof(struct soap_plugin)))) - return soap->error = SOAP_EOM; - p->id = NULL; - p->data = NULL; - p->fcopy = NULL; - p->fdelete = NULL; - r = fcreate(soap, p, arg); - if (!r && p->fdelete) - { p->next = soap->plugins; - soap->plugins = p; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Registered '%s' plugin\n", p->id)); - return SOAP_OK; - } - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Could not register plugin '%s': plugin returned error %d (or fdelete callback not set)\n", p->id?p->id:"?", r)); - SOAP_FREE(soap, p); - return r; -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -static void * -fplugin(struct soap *soap, const char *id) -{ register struct soap_plugin *p; - for (p = soap->plugins; p; p = p->next) - if (p->id == id || !strcmp(p->id, id)) - return p->data; - return NULL; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -void * -SOAP_FMAC2 -soap_lookup_plugin(struct soap *soap, const char *id) -{ return soap->fplugin(soap, id); -} -#endif - -/******************************************************************************/ -#ifdef __cplusplus -} -#endif - diff --git a/org.glite.security.gsoap-plugin/src/stdsoap2_2.7.6b.h b/org.glite.security.gsoap-plugin/src/stdsoap2_2.7.6b.h deleted file mode 100644 index 17ef597..0000000 --- a/org.glite.security.gsoap-plugin/src/stdsoap2_2.7.6b.h +++ /dev/null @@ -1,2053 +0,0 @@ -/* - -stdsoap2.h 2.7.6b - -gSOAP runtime - -gSOAP XML Web services tools -Copyright (C) 2000-2005, Robert van Engelen, Genivia Inc., All Rights Reserved. -This part of the software is released under one of the following licenses: -GPL, the gSOAP public license, or Genivia's license for commercial use. --------------------------------------------------------------------------------- -Contributors: - -Wind River Systems, Inc., for the following additions (marked WR[...]): - - vxWorks compatible --------------------------------------------------------------------------------- -gSOAP public license. - -The contents of this file are subject to the gSOAP Public License Version 1.3 -(the "License"); you may not use this file except in compliance with the -License. You may obtain a copy of the License at -http://www.cs.fsu.edu/~engelen/soaplicense.html -Software distributed under the License is distributed on an "AS IS" basis, -WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License -for the specific language governing rights and limitations under the License. - -The Initial Developer of the Original Code is Robert A. van Engelen. -Copyright (C) 2000-2005, Robert van Engelen, Genivia Inc., All Rights Reserved. --------------------------------------------------------------------------------- -GPL license. - -This program is free software; you can redistribute it and/or modify it under -the terms of the GNU General Public License as published by the Free Software -Foundation; either version 2 of the License, or (at your option) any later -version. - -This program is distributed in the hope that it will be useful, but WITHOUT ANY -WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A -PARTICULAR PURPOSE. See the GNU General Public License for more details. - -You should have received a copy of the GNU General Public License along with -this program; if not, write to the Free Software Foundation, Inc., 59 Temple -Place, Suite 330, Boston, MA 02111-1307 USA - -Author contact information: -engelen@genivia.com / engelen@acm.org --------------------------------------------------------------------------------- -A commercial use license is available from Genivia, Inc., contact@genivia.com --------------------------------------------------------------------------------- -*/ - -#ifdef WITH_SOAPDEFS_H -# include "soapdefs.h" /* include user-defined stuff */ -#endif - -#ifndef _THREAD_SAFE -# define _THREAD_SAFE -#endif - -#ifndef OPENSERVER -# ifndef _REENTRANT -# define _REENTRANT -# endif -#endif - -#ifndef SOAP_FMAC1 /* stdsoap2.h declaration macro */ -# define SOAP_FMAC1 -#endif - -#ifndef SOAP_FMAC2 /* stdsoap2.h declaration macro */ -# define SOAP_FMAC2 -#endif - -#ifndef SOAP_FMAC3 /* (de)serializer declaration macro */ -# define SOAP_FMAC3 -#endif - -#ifndef SOAP_FMAC3S /* string converter for (de)serializer declaration macro */ -# define SOAP_FMAC3S SOAP_FMAC3 -#endif - -#ifndef SOAP_FMAC4 /* (de)serializer declaration macro */ -# define SOAP_FMAC4 -#endif - -#ifndef SOAP_FMAC4S /* string converter for (de)serializer declaration macro */ -# define SOAP_FMAC4S SOAP_FMAC4 -#endif - -#ifndef SOAP_FMAC5 /* stub/skeleton declaration macro */ -# define SOAP_FMAC5 -#endif - -#ifndef SOAP_FMAC6 /* stub/skeleton declaration macro */ -# define SOAP_FMAC6 -#endif - -#ifndef SOAP_CMAC /* class declaration macro */ -# define SOAP_CMAC -#endif - -#ifndef SOAP_NMAC /* namespace table declaration macro */ -# define SOAP_NMAC -#endif - -#ifndef SOAP_SOURCE_STAMP -# define SOAP_SOURCE_STAMP(str) -#endif - -/* gSOAP 2.7.4 and higher: fast look-aside buffering is stable */ -#ifndef WITH_FAST -# define WITH_FAST -#endif - -#ifdef WITH_LEANER -# ifndef WITH_LEAN -# define WITH_LEAN -# endif -#endif - -#ifdef WITH_LEAN -# ifdef WITH_COOKIES -# error "Cannot build WITH_LEAN code WITH_COOKIES enabled" -# endif -#endif - -#ifndef STDSOAP_H -#define STDSOAP_H - -#if defined(__vxworks) || defined(__VXWORKS__) -# define VXWORKS -#endif - -#ifdef _WIN32 -# ifndef WIN32 -# define WIN32 -# endif -#endif - -#ifdef UNDER_CE -# ifndef WIN32 -# define WIN32 -# endif -#endif - -#ifdef __BORLANDC__ -# ifdef __WIN32__ -# ifndef WIN32 -# define WIN32 -# endif -# endif -#endif - -#ifdef __CYGWIN__ -# ifndef CYGWIN -# define CYGWIN -# endif -#endif - -#ifdef __SYMBIAN32__ -# define SYMBIAN -# undef WIN32 -#endif - -#if defined(__palmos__) || defined(PALM_GCC) || defined(__PALMOS_TRAPS__) -# ifndef PALM -# define PALM -# endif -#endif - -#if defined(__hpux) -# ifndef HP_UX -# define HP_UX -# endif -#endif - -#if defined(__alpha) && !defined(__VMS) -# ifndef TRU64 -# define TRU64 -# endif -#endif - -#ifdef __MVS__ -# ifndef OS390 -# define OS390 -# endif -#endif - -#ifdef HAVE_CONFIG_H -# include "config.h" -# ifdef WITH_OPENSSL -# ifndef HAVE_OPENSSL_SSL_H -# undef WITH_OPENSSL -# endif -# endif -#else -# if defined(UNDER_CE) -# define WITH_LEAN -# define HAVE_SSCANF -# elif defined(WIN32) -# define HAVE_STRRCHR -# define HAVE_STRTOD -# define HAVE_SSCANF -# define HAVE_STRTOL -# define HAVE_STRTOUL -# define HAVE_SYS_TIMEB_H -# define HAVE_FTIME -# define HAVE_WCTOMB -# define HAVE_MBTOWC -# define SOAP_LONG_FORMAT "%I64d" -# define SOAP_ULONG_FORMAT "%I64u" -# elif defined(CYGWIN) -# define HAVE_STRRCHR -# define HAVE_STRTOD -# define HAVE_SSCANF -# define HAVE_STRTOL -# define HAVE_STRTOUL -# define HAVE_SYS_TIMEB_H -# define HAVE_FTIME -# define HAVE_RAND_R -# define HAVE_GMTIME_R -# define HAVE_LOCALTIME_R -# define HAVE_WCTOMB -# define HAVE_MBTOWC -# elif defined(__APPLE__) -# define HAVE_STRRCHR -# define HAVE_STRTOD -# define HAVE_SSCANF -# define HAVE_STRTOL -# define HAVE_STRTOUL -# define HAVE_RAND_R -# define HAVE_GMTIME_R -# define HAVE_LOCALTIME_R -# define HAVE_TIMEGM -# define HAVE_WCTOMB -# define HAVE_MBTOWC -# elif defined(_AIXVERSION_431) -# define HAVE_STRRCHR -# define HAVE_STRTOD -# define HAVE_SSCANF -# define HAVE_STRTOL -# define HAVE_STRTOUL -# define HAVE_SYS_TIMEB_H -# define HAVE_FTIME -# define HAVE_RAND_R -# define HAVE_GMTIME_R -# define HAVE_LOCALTIME_R -# define HAVE_WCTOMB -# define HAVE_MBTOWC -# elif defined(HP_UX) -# define HAVE_STRRCHR -# define HAVE_STRTOD -# define HAVE_SSCANF -# define HAVE_STRTOL -# define HAVE_STRTOUL -# define HAVE_SYS_TIMEB_H -# define HAVE_FTIME -# define HAVE_RAND_R -# define HAVE_GMTIME_R -# define HAVE_LOCALTIME_R -# define HAVE_WCTOMB -# define HAVE_MBTOWC -# elif defined(FREEBSD) || defined(__FreeBSD__) -# define HAVE_STRRCHR -# define HAVE_STRTOD -# define HAVE_SSCANF -# define HAVE_STRTOL -# define HAVE_STRTOUL -# define HAVE_STRTOLL -# define HAVE_STRTOULL -# define HAVE_GETTIMEOFDAY -# define HAVE_RAND_R -# define HAVE_GMTIME_R -# define HAVE_LOCALTIME_R -# define HAVE_WCTOMB -# define HAVE_MBTOWC -# define SOAP_LONG_FORMAT "%qd" -# define SOAP_ULONG_FORMAT "%qu" -# elif defined(__VMS) -# define HAVE_STRRCHR -# define HAVE_STRTOD -# define HAVE_SSCANF -# define HAVE_STRTOL -# define HAVE_STRTOUL -# define HAVE_SYS_TIMEB_H -# define HAVE_FTIME -# define HAVE_RAND_R -# define HAVE_GMTIME_R -# define HAVE_LOCALTIME_R -# define HAVE_WCTOMB -# define HAVE_MBTOWC -# elif defined(__GLIBC__) || defined(__GNU__) -# define HAVE_STRRCHR -# define HAVE_STRTOD -# define HAVE_SSCANF -# define HAVE_STRTOL -# define HAVE_STRTOUL -# define HAVE_STRTOLL -# define HAVE_STRTOULL -# define HAVE_SYS_TIMEB_H -# define HAVE_FTIME -# define HAVE_RAND_R -# define HAVE_GMTIME_R -# define HAVE_LOCALTIME_R -# define HAVE_TIMEGM -# define HAVE_WCTOMB -# define HAVE_MBTOWC -# define HAVE_ISNAN -# elif defined(TRU64) -# define HAVE_STRRCHR -# define HAVE_STRTOD -# define HAVE_SSCANF -# define HAVE_STRTOL -# define HAVE_STRTOUL -# define HAVE_STRTOLL -# define HAVE_STRTOULL -# define HAVE_GETTIMEOFDAY -# define HAVE_SYS_TIMEB_H -# define HAVE_RAND_R -# define HAVE_GMTIME_R -# define HAVE_LOCALTIME_R -# define __USE_STD_IOSTREAM -# define HAVE_WCTOMB -# define HAVE_MBTOWC -# define SOAP_LONG_FORMAT "%ld" -# define SOAP_ULONG_FORMAT "%lu" -# elif defined(MAC_CARBON) -# define WITH_NOIO -# define HAVE_STRRCHR -# define HAVE_STRTOD -# define HAVE_SSCANF -# define HAVE_STRTOL -# define HAVE_STRTOUL -# define HAVE_FTIME -# define HAVE_RAND_R -# define HAVE_GETHOSTBYNAME_R -# define HAVE_GMTIME_R -# define HAVE_LOCALTIME_R -# define HAVE_WCTOMB -# define HAVE_MBTOWC -# elif defined(PALM) -# define WITH_LEAN -# define HAVE_STRTOD /* strtod() is defined in palmFunctions.h */ -# include /* Needs to be included before unix headers */ -# include -# define IGNORE_STDIO_STUBS -# include -# define O_NONBLOCK FNONBIO -# include -# include "palmFunctions.h" -# elif defined(SYMBIAN) -# define WITH_LEAN -# define WITH_NONAMESPACES -# define HAVE_STRTOD /* use STRTOD since sscanf doesn't seem to work */ -# include -# include -# elif defined(VXWORKS) -# define HAVE_STRRCHR -# define HAVE_STRTOD -# define HAVE_SSCANF -# define HAVE_STRTOL -# define HAVE_STRTOUL -# define HAVE_PGMTIME_R -# define HAVE_PLOCALTIME_R -# define HAVE_MKTIME -# elif defined(OS390) -# define HAVE_STRRCHR -# define HAVE_STRTOD -# define HAVE_SSCANF -# define HAVE_STRTOL -# define HAVE_STRTOUL -# define HAVE_SYS_TIMEB_H -# define HAVE_FTIME -# define HAVE_RAND_R -# define HAVE_GMTIME_R -# define HAVE_LOCALTIME_R -# define HAVE_WCTOMB -# define HAVE_MB -# else -/* Default asumptions on supported functions */ -# define HAVE_STRRCHR -# define HAVE_STRTOD -# define HAVE_SSCANF -# define HAVE_STRTOL -# define HAVE_STRTOUL -# define HAVE_SYS_TIMEB_H -# define HAVE_FTIME -# define HAVE_RAND_R -# define HAVE_GETHOSTBYNAME_R -# define HAVE_GMTIME_R -# define HAVE_LOCALTIME_R -# define HAVE_WCTOMB -# define HAVE_MBTOWC -# endif -#endif - -/* QNX does not have a working version of strtof */ -#if defined(__QNX__) || defined(QNX) -# undef HAVE_STRTOF -#endif - -#ifndef SOAP_LONG_FORMAT -# define SOAP_LONG_FORMAT "%lld" /* printf format for 64 bit ints */ -#endif - -#ifndef SOAP_ULONG_FORMAT -# define SOAP_ULONG_FORMAT "%llu" /* printf format for unsigned 64 bit ints */ -#endif - -#ifndef WITH_NOSTDLIB -# include -# ifndef PALM -# include -# include -# endif -# include -# include -#endif - -#if defined(__cplusplus) && !defined(WITH_LEAN) -# include -# include -#endif - -#ifdef WITH_NOHTTP -# ifndef WITH_NOIO -# define WITH_NOIO -# undef WITH_COOKIES -# endif -#endif - -#ifndef UNDER_CE -# ifndef PALM -# ifndef WITH_NOIO -# include -# include -# endif -# ifndef WITH_LEAN -# ifdef HAVE_SYS_TIMEB_H -# include /* for ftime() */ -# endif -# include -# endif -# endif -#endif - -#ifdef OPENSERVER -# include -# include -# include - extern int h_errno; -#endif - -#ifndef WITH_NOIO -# ifndef WIN32 -# ifndef PALM -# include -# ifdef VXWORKS -# include -# include -# endif -# ifndef VXWORKS -# ifndef SYMBIAN -# include -# endif -# endif -# ifdef SUN_OS -# include /* SUN */ -# include /* SUN < 2.8 (?) */ -# endif -# ifdef VXWORKS -# ifdef _WRS_KERNEL -# include -# endif -# else -# include -# endif -# include -# ifdef OS390 -# include -# else -# include /* TCP_NODELAY */ -# endif -# include -# endif -# endif -#endif - -#ifdef WITH_FASTCGI -# include -#endif - -#ifdef WITH_OPENSSL -# define OPENSSL_NO_KRB5 -# include -# include -# include -# ifndef ALLOW_OLD_VERSIONS -# if (OPENSSL_VERSION_NUMBER < 0x00905100L) -# error "Must use OpenSSL 0.9.6 or later" -# endif -# endif -#endif - -#ifdef WITH_GZIP -# ifndef WITH_ZLIB -# define WITH_ZLIB -# endif -#endif - -#ifdef WITH_CASEINSENSITIVETAGS -# define SOAP_STRCMP soap_tag_cmp /* case insensitve XML element/attribute names */ -#else -# define SOAP_STRCMP strcmp /* case sensitive XML element/attribute names */ -#endif - -#ifdef WITH_ZLIB -# include -#endif - -#ifndef WITH_NOSTDLIB -# ifndef PALM -# include /* for isnan() */ -# endif -#endif - -/* #define DEBUG */ /* Uncomment to debug sending (in file SENT.log) receiving (in file RECV.log) and messages (in file TEST.log) */ - -#ifdef __cplusplus -extern "C" { -#endif - -#ifdef WIN32 -# ifndef UNDER_CE -# include -# include -# endif -# include -/* # include */ /* Alternative: use winsock2 (not available with eVC) */ -# ifdef WITH_IPV6 -# include -# include -# endif -#else -# ifdef VXWORKS -# include -# include -# include -# endif -# ifndef WITH_NOIO -# ifndef PALM -# include -# include -# include -# include -# endif -# endif -#endif - -/* Portability: define SOAP_SOCKLEN_T */ -#if defined(SOCKLEN_T) -# define SOAP_SOCKLEN_T SOCKLEN_T -#elif defined(__socklen_t_defined) || defined(_SOCKLEN_T) || defined(CYGWIN) || defined(FREEBSD) || defined(__FreeBSD__) || defined(__QNX__) || defined(QNX) || defined(_AIX) -# define SOAP_SOCKLEN_T socklen_t -#elif defined(IRIX) || defined(WIN32) || defined(__APPLE__) || defined(HP_UX) || defined(SUN_OS) || defined(OPENSERVER) || defined(TRU64) || defined(VXWORKS) -# define SOAP_SOCKLEN_T int -#else -# define SOAP_SOCKLEN_T size_t -#endif - -#ifdef WIN32 -# define SOAP_SOCKET SOCKET -#else -# define SOAP_SOCKET int -# define closesocket(n) close(n) -#endif - -#define SOAP_INVALID_SOCKET (-1) -#define soap_valid_socket(n) ((n) != SOAP_INVALID_SOCKET) - -#if defined(SYMBIAN) -# define LONG64 long -# define ULONG64 unsigned LONG64 -#elif !defined(WIN32) || defined(__GLIBC__) || defined(__GNU__) -# ifndef LONG64 -# define LONG64 long long -# define ULONG64 unsigned LONG64 -# endif -#elif defined(UNDER_CE) -# define LONG64 __int64 -# define ULONG64 unsigned LONG64 -#elif defined(__BORLANDC__) -# define LONG64 __int64 -# define ULONG64 unsigned LONG64 -#endif - -#if defined(WIN32) -# define soap_int32 __int32 -#elif defined(SYMBIAN) -# define soap_int32 long -#elif defined(PALM) -# define soap_int32 Int32 -#else -# define soap_int32 int32_t -#endif - -#ifdef WIN32 -# define SOAP_ERANGE ERANGE -# define SOAP_EINTR WSAEINTR -# define SOAP_EAGAIN WSAEWOULDBLOCK -# define SOAP_EWOULDBLOCK WSAEWOULDBLOCK -# define SOAP_EINPROGRESS WSAEINPROGRESS -#else -# define SOAP_ERANGE ERANGE -# define SOAP_EINTR EINTR -# define SOAP_EAGAIN EAGAIN -# ifdef SYMBIAN -# define SOAP_EWOULDBLOCK 9898 -# define SOAP_EINPROGRESS 9899 -# else -# define SOAP_EWOULDBLOCK EWOULDBLOCK -# define SOAP_EINPROGRESS EINPROGRESS -# endif -#endif - -#ifdef WIN32 -# ifdef UNDER_CE -# define soap_errno GetLastError() -# define soap_socket_errno GetLastError() -# else -# define soap_errno GetLastError() -# define soap_socket_errno WSAGetLastError() -# endif -#else -# ifndef WITH_NOIO -# define soap_errno errno -# define soap_socket_errno errno -# else -# define soap_errno 0 -# define soap_socket_errno 0 -# endif -#endif - -#ifndef SOAP_BUFLEN -# ifdef WITH_UDP -# define SOAP_BUFLEN (65536) /* max UDP packet size */ -# else -# ifndef WITH_LEAN -# define SOAP_BUFLEN (65536) /* buffer length for socket packets, also used by gethostbyname_r so don't make this too small */ -# else -# define SOAP_BUFLEN (2048) -# endif -# endif -#endif -#ifndef SOAP_LABLEN -# define SOAP_LABLEN (64) /* initial look-aside buffer length */ -#endif -#ifndef SOAP_PTRBLK -# define SOAP_PTRBLK (32) /* block allocation for pointer hash table chains */ -#endif -#ifndef SOAP_PTRHASH -# ifndef WITH_LEAN -# define SOAP_PTRHASH (1024) /* size of pointer analysis hash table (must be power of 2) */ -# else -# define SOAP_PTRHASH (32) -# endif -#endif -#ifndef SOAP_IDHASH -# ifndef WITH_LEAN -# define SOAP_IDHASH (1999) /* prime size of hash table for parsed id/ref */ -# else -# define SOAP_IDHASH (19) /* 19, 199 */ -# endif -#endif -#ifndef SOAP_BLKLEN -# ifndef WITH_LEAN -# define SOAP_BLKLEN (256) /* size of blocks to collect long strings and XML attributes */ -# else -# define SOAP_BLKLEN (32) -# endif -#endif -#ifndef SOAP_TAGLEN -# ifndef WITH_LEAN -# define SOAP_TAGLEN (256) /* maximum length of XML element tag/attribute name or host/path name + 1 */ -# else -# define SOAP_TAGLEN (64) -# endif -#endif -#ifndef SOAP_HDRLEN -# ifndef WITH_LEAN -# define SOAP_HDRLEN (8192) /* maximum length of HTTP header line (must be >4096 to read cookies) */ -# else -# define SOAP_HDRLEN (1024) -# endif -#endif -#ifndef SOAP_MAXDIMS -# ifndef WITH_LEAN -# define SOAP_MAXDIMS (16) /* maximum array dimensions (array nestings) must be less than 64 to protect soap->tmpbuf */ -# else -# define SOAP_MAXDIMS (4) -# endif -#endif - -#ifndef SOAP_MAXLOGS -# define SOAP_MAXLOGS (3) /* max number of debug logs per struct soap environment */ -# define SOAP_INDEX_RECV (0) -# define SOAP_INDEX_SENT (1) -# define SOAP_INDEX_TEST (2) -#endif - -#ifndef SOAP_MAXKEEPALIVE -# define SOAP_MAXKEEPALIVE (100) /* max iterations to keep server connection alive */ -#endif - -#ifndef SOAP_MAXARRAYSIZE -# define SOAP_MAXARRAYSIZE (100000) /* "trusted" max size of inbound SOAP array for compound array allocation */ -#endif - -#ifdef VXWORKS -# ifdef __INCmathh -# include -# ifndef HAVE_ISNAN -# define HAVE_ISNAN -# endif -# define soap_isnan(num) isNan(num) -# endif -#endif - -#ifdef WIN32 -# include -# ifndef HAVE_ISNAN -# define HAVE_ISNAN -# endif -# define soap_isnan(num) _isnan(num) -#endif - -#ifdef SUN_OS -# define soap_isnan(n) isnan(n) -#endif - -#if !defined(HAVE_ISNAN) && (defined(_MATH_H) || defined(_MATH_INCLUDED)) -# define HAVE_ISNAN -#endif - -#ifndef soap_isnan -# ifdef HAVE_ISNAN -# define soap_isnan(n) isnan(n) -# else -# define soap_isnan(_) (0) -# endif -#endif - -extern const struct soap_double_nan { unsigned int n1, n2; } soap_double_nan; - -#ifdef VXWORKS -# ifndef FLT_MAX -# define FLT_MAX _ARCH_FLT_MAX -# endif -# ifndef DBL_MAX -# define DBL_MAX _ARCH_DBL_MAX -# endif -#endif - -#ifndef FLT_NAN -# ifdef HAVE_ISNAN -# define FLT_NAN (*(float*)(void*)&soap_double_nan) -# else -# define FLT_NAN (0.0) -# endif -#endif - -#ifndef FLT_PINFTY -# if defined(FLT_MAX) -# define FLT_PINFTY FLT_MAX -# elif defined(HUGE_VALF) -# define FLT_PINFTY (float)HUGE_VALF -# elif defined(HUGE_VAL) -# define FLT_PINFTY (float)HUGE_VAL -# elif defined(FLOAT_MAX) -# define FLT_PINFTY FLOAT_MAX -# else -# define FLT_PINFTY (3.40282347e+38F) -# endif -#endif - -#ifndef FLT_NINFTY -# define FLT_NINFTY (-FLT_PINFTY) -#endif - -#ifndef DBL_NAN -# ifdef HAVE_ISNAN -# define DBL_NAN (*(double*)(void*)&soap_double_nan) -# else -# define DBL_NAN (0.0) -# endif -#endif - -#ifndef DBL_PINFTY -# if defined(DBL_MAX) -# define DBL_PINFTY DBL_MAX -# elif defined(HUGE_VALF) -# define DBL_PINFTY (double)HUGE_VALF -# elif defined(HUGE_VAL) -# define DBL_PINFTY (double)HUGE_VAL -# elif defined(DOUBLE_MAX) -# define DBL_PINFTY DOUBLE_MAX -# else -# define DBL_PINFTY (1.7976931348623157e+308) -# endif -#endif - -#ifndef DBL_NINFTY -# define DBL_NINFTY (-DBL_PINFTY) -#endif - -#define soap_ispinfd(n) ((n) >= DBL_PINFTY) -#define soap_ispinff(n) ((n) >= FLT_PINFTY) -#define soap_isninfd(n) ((n) <= DBL_NINFTY) -#define soap_isninff(n) ((n) <= FLT_NINFTY) - -/* gSOAP error codes */ - -#define SOAP_EOF EOF -#define SOAP_ERR EOF -#define SOAP_OK 0 -#define SOAP_CLI_FAULT 1 -#define SOAP_SVR_FAULT 2 -#define SOAP_TAG_MISMATCH 3 -#define SOAP_TYPE 4 -#define SOAP_SYNTAX_ERROR 5 -#define SOAP_NO_TAG 6 -#define SOAP_IOB 7 -#define SOAP_MUSTUNDERSTAND 8 -#define SOAP_NAMESPACE 9 -#define SOAP_USER_ERROR 10 -#define SOAP_FATAL_ERROR 11 -#define SOAP_FAULT 12 -#define SOAP_NO_METHOD 13 -#define SOAP_GET_METHOD 14 -#define SOAP_EOM 15 -#define SOAP_NULL 16 -#define SOAP_DUPLICATE_ID 17 -#define SOAP_MISSING_ID 18 -#define SOAP_HREF 19 -#define SOAP_UDP_ERROR 20 -#define SOAP_TCP_ERROR 21 -#define SOAP_HTTP_ERROR 22 -#define SOAP_SSL_ERROR 23 -#define SOAP_ZLIB_ERROR 24 -#define SOAP_DIME_ERROR 25 -#define SOAP_DIME_HREF 26 -#define SOAP_DIME_MISMATCH 27 -#define SOAP_DIME_END 28 -#define SOAP_MIME_ERROR 29 -#define SOAP_MIME_HREF 30 -#define SOAP_MIME_END 31 -#define SOAP_VERSIONMISMATCH 32 -#define SOAP_PLUGIN_ERROR 33 -#define SOAP_DATAENCODINGUNKNOWN 34 -#define SOAP_REQUIRED 35 -#define SOAP_PROHIBITED 36 -#define SOAP_OCCURS 37 -#define SOAP_LENGTH 38 - -#define soap_xml_error_check(e) ((e) == SOAP_TAG_MISMATCH || (e) == SOAP_TAG_END || (e) == SOAP_SYNTAX_ERROR || (e) == SOAP_NAMESPACE || (e) == SOAP_DUPLICATE_ID || (e) == SOAP_MISSING_ID || (e) == SOAP_REQUIRED || (e) == SOAP_PROHIBITED || (e) == SOAP_OCCURS || (e) == SOAP_LENGTH || (e) == SOAP_NULL || (e) == SOAP_HREF) -#define soap_soap_error_check(e) ((e) == SOAP_CLI_FAULT || (e) == SOAP_SVR_FAULT || (e) == SOAP_VERSIONMISMATCH || (e) == SOAP_MUSTUNDERSTAND || (e) == SOAP_FAULT || (e) == SOAP_NO_METHOD) -#define soap_tcp_error_check(e) ((e) == SOAP_EOF || (e) == SOAP_TCP_ERROR) -#define soap_ssl_error_check(e) ((e) == SOAP_SSL_ERROR) -#define soap_zlib_error_check(e) ((e) == SOAP_ZLIB_ERROR) -#define soap_http_error_check(e) ((e) == SOAP_HTTP_ERROR || (e) == SOAP_GET_METHOD || ((e) >= 100 && (e) < 600)) - -/* gSOAP HTTP response status codes 100 to 599 are reserved */ - -/* Codes 600 to 999 are user definable */ - -/* Exceptional gSOAP HTTP response status codes >= 1000 */ - -#define SOAP_STOP 1000 /* No HTTP response */ -#define SOAP_FORM 1001 /* Form request/response */ -#define SOAP_HTML 1002 /* Custom HTML response */ -#define SOAP_FILE 1003 /* Custom file-based response */ - -/* gSOAP HTTP method codes */ - -#define SOAP_POST 2000 -#define SOAP_GET 2001 - -/* gSOAP DIME */ - -#define SOAP_DIME_CF 0x01 -#define SOAP_DIME_ME 0x02 -#define SOAP_DIME_MB 0x04 -#define SOAP_DIME_VERSION 0x08 /* DIME version 1 */ -#define SOAP_DIME_MEDIA 0x10 -#define SOAP_DIME_ABSURI 0x20 - -/* gSOAP ZLIB */ - -#define SOAP_ZLIB_NONE 0x00 -#define SOAP_ZLIB_DEFLATE 0x01 -#define SOAP_ZLIB_INFLATE 0x02 -#define SOAP_ZLIB_GZIP 0x02 - -/* gSOAP transport, connection, and content encoding modes */ - -typedef soap_int32 soap_mode; - -#define SOAP_IO 0x00000003 /* IO mask */ -#define SOAP_IO_FLUSH 0x00000000 /* flush output immediately, no buffering */ -#define SOAP_IO_BUFFER 0x00000001 /* buffer output in packets of size SOAP_BUFLEN */ -#define SOAP_IO_STORE 0x00000002 /* store entire output to determine length for transport */ -#define SOAP_IO_CHUNK 0x00000003 /* use HTTP chunked transfer AND buffer packets */ - -#define SOAP_IO_UDP 0x00000004 -#define SOAP_IO_LENGTH 0x00000008 -#define SOAP_IO_KEEPALIVE 0x00000010 - -#define SOAP_ENC_LATIN 0x00800020 /* iso-8859-1 encoding */ -#define SOAP_ENC_XML 0x00000040 /* plain XML encoding, no HTTP header */ -#define SOAP_ENC_DIME 0x00000080 -#define SOAP_ENC_MIME 0x00000100 -#define SOAP_ENC_MTOM 0x00000200 -#define SOAP_ENC_ZLIB 0x00000400 -#define SOAP_ENC_SSL 0x00000800 - -#define SOAP_ENC 0x00000FFF /* IO and ENC mask */ - -#define SOAP_XML_STRICT 0x00001000 /* strict validation */ -#define SOAP_XML_INDENT 0x00002000 -#define SOAP_XML_CANONICAL 0x00004000 /* EXC C14N canonical XML */ -#define SOAP_XML_TREE 0x00008000 -#define SOAP_XML_GRAPH 0x00010000 -#define SOAP_XML_NIL 0x00020000 -#define SOAP_XML_DOM 0x00040000 -#define SOAP_XML_SEC 0x00080000 /* reserved for WS security */ - -#define SOAP_C_NOIOB 0x00100000 -#define SOAP_C_UTFSTRING 0x00200000 -#define SOAP_C_MBSTRING 0x00400000 - -#define SOAP_DOM_TREE 0x01000000 -#define SOAP_DOM_NODE 0x02000000 -#define SOAP_DOM_ASIS 0x04000000 - -#define SOAP_IO_DEFAULT SOAP_IO_FLUSH - -/* SSL client/server authentication settings */ - -#define SOAP_SSL_NO_AUTHENTICATION 0x00 /* for testing purposes */ -#define SOAP_SSL_REQUIRE_SERVER_AUTHENTICATION 0x01 /* client requires server to authenticate */ -#define SOAP_SSL_REQUIRE_CLIENT_AUTHENTICATION 0x02 /* server requires client to authenticate */ - -#define SOAP_SSL_DEFAULT SOAP_SSL_REQUIRE_SERVER_AUTHENTICATION - -/* */ - -#define SOAP_BEGIN 0 -#define SOAP_IN_ENVELOPE 2 -#define SOAP_IN_HEADER 3 -#define SOAP_END_HEADER 4 -#define SOAP_NO_BODY 5 -#define SOAP_IN_BODY 6 -#define SOAP_END_BODY 7 -#define SOAP_END_ENVELOPE 8 -#define SOAP_END 9 -#define SOAP_BEGIN_SECURITY 10 -#define SOAP_IN_SECURITY 11 -#define SOAP_END_SECURITY 12 - -/* DEBUG macros */ - -#ifndef WITH_LEAN -# ifdef DEBUG -# ifndef SOAP_DEBUG -# define SOAP_DEBUG -# endif -# endif -#endif - -#ifdef SOAP_DEBUG -# define SOAP_MALLOC(soap, size) soap_track_malloc(soap, __FILE__, __LINE__, size) -# define SOAP_FREE(soap, ptr) soap_track_free(soap, __FILE__, __LINE__, ptr) -#endif - -#ifndef SOAP_MALLOC /* use libc malloc */ -# define SOAP_MALLOC(soap, size) malloc(size) -#endif - -#ifndef SOAP_FREE /* use libc free */ -# define SOAP_FREE(soap, ptr) free(ptr) -#endif - -#ifdef SOAP_DEBUG -# ifndef SOAP_MESSAGE -# define SOAP_MESSAGE fprintf -# endif -# ifndef DBGLOG -# define DBGLOG(DBGFILE, CMD) \ -{ if (soap)\ - { if (!soap->fdebug[SOAP_INDEX_##DBGFILE])\ - soap_open_logfile(soap, SOAP_INDEX_##DBGFILE);\ - if (soap->fdebug[SOAP_INDEX_##DBGFILE])\ - { FILE *fdebug = soap->fdebug[SOAP_INDEX_##DBGFILE];\ - CMD;\ - fflush(fdebug);\ - }\ - }\ -} -# endif -# ifndef DBGMSG -# define DBGMSG(DBGFILE, MSG, LEN) \ -{ if (soap)\ - { if (!soap->fdebug[SOAP_INDEX_##DBGFILE])\ - soap_open_logfile(soap, SOAP_INDEX_##DBGFILE);\ - if (soap->fdebug[SOAP_INDEX_##DBGFILE])\ - { fwrite((MSG), 1, (LEN), soap->fdebug[SOAP_INDEX_##DBGFILE]);\ - fflush(soap->fdebug[SOAP_INDEX_##DBGFILE]);\ - }\ - }\ -} -# endif -# ifndef DGBFUN -# define DBGFUN(FNAME) DBGLOG(TEST, SOAP_MESSAGE(fdebug, "%s(%d): %s()\n", __FILE__, __LINE__, FNAME)) -# define DBGFUN1(FNAME, FMT, ARG) DBGLOG(TEST, SOAP_MESSAGE(fdebug, "%s(%d): %s("FMT")\n", __FILE__, __LINE__, FNAME, (ARG))) -# define DBGFUN2(FNAME, FMT1, ARG1, FMT2, ARG2) DBGLOG(TEST, SOAP_MESSAGE(fdebug, "%s(%d): %s("FMT1", "FMT2")\n", __FILE__, __LINE__, FNAME, (ARG1), (ARG2))) -# define DBGFUN3(FNAME, FMT1, ARG1, FMT2, ARG2, FMT3, ARG3) DBGLOG(TEST, SOAP_MESSAGE(fdebug, "%s(%d): %s("FMT1", "FMT2", "FMT3")\n", __FILE__, __LINE__, FNAME, (ARG1), (ARG2), (ARG3))) -# endif -# ifndef DBGHEX -# define DBGHEX(DBGFILE, MSG, LEN) \ -{ if (soap)\ - { if (!soap->fdebug[SOAP_INDEX_##DBGFILE])\ - soap_open_logfile(soap, SOAP_INDEX_##DBGFILE);\ - if (soap->fdebug[SOAP_INDEX_##DBGFILE])\ - { int i; char *s;\ - for (s = (char*)(MSG), i = (LEN); i; i--)\ - fprintf(soap->fdebug[SOAP_INDEX_##DBGFILE], "%2.2hhX ", *s++);\ - fflush(soap->fdebug[SOAP_INDEX_##DBGFILE]);\ - }\ - }\ -} -# endif -#else -# define DBGLOG(DBGFILE, CMD) -# define DBGMSG(DBGFILE, MSG, LEN) -# define DBGFUN(FNAME) -# define DBGFUN1(FNAME, FMT, ARG) -# define DBGFUN2(FNAME, FMT1, ARG1, FMT2, ARG2) -# define DBGFUN3(FNAME, FMT1, ARG1, FMT2, ARG2, FMT3, ARG3) -# define DBGHEX(DBGFILE, MSG, LEN) -#endif - -/* UCS-4 requires 32 bits (0-7FFFFFFF, the sign bit is used by gSOAP to distinguish XML entities) */ -typedef soap_int32 soap_wchar; - -/* namespace table row */ -struct Namespace -{ const char *id; - const char *ns; - const char *in; - char *out; -}; - -/* namespace stack */ -struct soap_nlist -{ struct soap_nlist *next; - unsigned int level; /* nesting depth level */ - short index; /* corresponding entry in ns mapping table */ - char *ns; /* only set when parsed ns URI is not in the ns mapping table */ - char id[1]; /* the actual string value flows into the allocated region below this struct */ -}; - -/* block stack for nested block allocations */ -struct soap_blist -{ struct soap_blist *next; - char *ptr; - size_t size; -}; - -/* array layout */ -struct soap_array -{ void *__ptr; - int __size; -}; - -/* pointer serialization management */ -struct soap_plist -{ struct soap_plist *next; - const void *ptr; - const struct soap_array *array; - int type; - int id; - char mark1; - char mark2; -}; - -/* block allocation for pointer serialization management */ -struct soap_pblk -{ struct soap_pblk *next; - struct soap_plist plist[SOAP_PTRBLK]; -}; - -#ifdef SOAP_DEBUG -/* malloc/free tracking for debugging */ -struct soap_mlist -{ struct soap_mlist *next; - const void *ptr; - const char *file; - int line; - short live; -}; -#endif - -/* class allocation list */ -struct soap_clist -{ struct soap_clist *next; - void *ptr; - int type; - int size; - void (*fdelete)(struct soap_clist*); -}; - -/* attributes */ -struct soap_attribute -{ struct soap_attribute *next; - char *value; - size_t size; - char *ns; - short visible; - char name[1]; /* the actual name string flows into the allocated region below this struct */ -}; - -struct soap_cookie -{ struct soap_cookie *next; - char *name; - char *value; - char *domain; - char *path; - long expire; /* client-side: local time to expire; server-side: seconds to expire */ - unsigned int version; - short secure; - short session; /* server-side */ - short env; /* server-side: got cookie from client and should not be (re)send */ - short modified; /* server-side: client cookie was modified and should be send */ -}; - -#ifdef __cplusplus -SOAP_FMAC1 struct soap_multipart* SOAP_FMAC2 soap_next_multipart(struct soap_multipart*); - -class soap_multipart_iterator -{ public: - struct soap_multipart *content; - bool operator==(const soap_multipart_iterator& iter) const - { return content == iter.content; } - bool operator!=(const soap_multipart_iterator& iter) const - { return content != iter.content; } - struct soap_multipart &operator*() const - { return *content; } - soap_multipart_iterator &operator++() - { content = soap_next_multipart(content); return *this; } - soap_multipart_iterator() : content(NULL) - { } - soap_multipart_iterator(struct soap_multipart *p) : content(p) - { } -}; -#endif - -#ifndef WITH_LEANER -struct soap_dime -{ size_t count; - size_t size; - size_t chunksize; - size_t buflen; - char flags; - char *ptr; - const char *id; - const char *type; - const char *options; - struct soap_multipart *list; /* list of DIME attachments received */ - struct soap_multipart *first, *last; /* temporary in/out queue */ -#ifdef __cplusplus - soap_multipart_iterator begin() - { soap_multipart_iterator iter(list); return iter; }; - soap_multipart_iterator end() - { soap_multipart_iterator iter(NULL); return iter; }; -#endif -}; -#endif - -#ifndef WITH_LEANER -struct soap_mime -{ char *boundary; /* MIME boundary */ - const char *start; /* MIME start ID */ - struct soap_multipart *list; /* list of MIME attachments received */ - struct soap_multipart *first, *last; /* temporary in/out queue */ -#ifdef __cplusplus - soap_multipart_iterator begin() - { soap_multipart_iterator iter(list); return iter; }; - soap_multipart_iterator end() - { soap_multipart_iterator iter(NULL); return iter; }; -#endif -}; -#endif - -#ifndef WITH_LEANER -/* RFC2045 MIME content transfer encodings */ -enum soap_mime_encoding -{ SOAP_MIME_NONE, - SOAP_MIME_7BIT, - SOAP_MIME_8BIT, - SOAP_MIME_BINARY, - SOAP_MIME_QUOTED_PRINTABLE, - SOAP_MIME_BASE64, - SOAP_MIME_IETF_TOKEN, - SOAP_MIME_X_TOKEN -}; -#endif - -#ifndef WITH_LEANER -/* DIME/MIME multipart list */ -struct soap_multipart -{ struct soap_multipart *next; - char *ptr; /* points to raw data content */ - size_t size; /* size of data content */ - const char *id; /* DIME/MIME content ID or form data name */ - const char *type; /* DIME/MIME type (MIME type format) */ - const char *options; /* DIME options */ - enum soap_mime_encoding encoding; /* MIME Content-Transfer-Encoding */ - const char *location; /* MIME Content-Location (optional) */ - const char *description; /* MIME Content-Description (optional) */ -#ifdef __cplusplus - typedef soap_multipart_iterator iterator; -#endif -}; -#endif - -#ifndef WITH_LEANER -/* attachment DIME and MTOM XOP forwarding */ -struct soap_xlist -{ struct soap_xlist *next; - unsigned char **ptr; - int *size; - char *id; - char **type; - char **options; -}; -#endif - -/******************************************************************************/ - -#ifndef WITH_LEANER -#ifdef __cplusplus -class soap_dom_attribute_iterator -{ public: - struct soap_dom_attribute *att; - const char *nstr; - const char *name; - bool operator==(const soap_dom_attribute_iterator&) const; - bool operator!=(const soap_dom_attribute_iterator&) const; - struct soap_dom_attribute &operator*() const; - soap_dom_attribute_iterator &operator++(); - soap_dom_attribute_iterator(); - soap_dom_attribute_iterator(struct soap_dom_attribute*); - ~soap_dom_attribute_iterator(); -}; -#endif -#endif - -#ifndef WITH_LEANER -struct soap_dom_attribute -{ struct soap_dom_attribute *next; - const char *nstr; - char *name; - char *data; - wchar_t *wide; - struct soap *soap; -#ifdef __cplusplus - typedef soap_dom_attribute_iterator iterator; - struct soap_dom_attribute &set(const char *nstr, const char *name); /* set namespace and name */ - struct soap_dom_attribute &set(const char *data); /* set data */ - soap_dom_attribute_iterator begin(); - soap_dom_attribute_iterator end(); - soap_dom_attribute_iterator find(const char *nstr, const char *name); - void unlink(); - soap_dom_attribute(); - soap_dom_attribute(struct soap *soap); - soap_dom_attribute(struct soap *soap, const char *nstr, const char *name, const char *data); - ~soap_dom_attribute(); -#endif -}; -#endif - -#ifndef WITH_LEANER -#ifdef __cplusplus -class soap_dom_element_iterator -{ public: - struct soap_dom_element *elt; - const char *nstr; - const char *name; - int type; - bool operator==(const soap_dom_element_iterator&) const; - bool operator!=(const soap_dom_element_iterator&) const; - struct soap_dom_element &operator*() const; - soap_dom_element_iterator &operator++(); - soap_dom_element_iterator(); - soap_dom_element_iterator(struct soap_dom_element*); - ~soap_dom_element_iterator(); -}; -#endif -#endif - -#ifndef WITH_LEANER -struct soap_dom_element -{ struct soap_dom_element *next; /* next sibling */ - struct soap_dom_element *prnt; /* parent */ - struct soap_dom_element *elts; /* list of child elements */ - struct soap_dom_attribute *atts; /* list of attributes */ - const char *nstr; /* namespace string */ - char *name; /* element tag name */ - char *data; /* element content data (with SOAP_C_UTFSTRING flag set) */ - wchar_t *wide; /* element content data */ - int type; /* optional: serialized C/C++ data type */ - void *node; /* optional: pointer to serialized C/C++ data */ - char *head; /* leading whitespace to start tag */ - char *tail; /* leading whitespace to end tag */ - struct soap *soap; /* soap context that manages this node */ -#ifdef __cplusplus - typedef soap_dom_element_iterator iterator; - struct soap_dom_element &set(const char *nstr, const char *name); - struct soap_dom_element &set(const char *data); - struct soap_dom_element &set(void *node, int type); - struct soap_dom_element &add(struct soap_dom_element*); - struct soap_dom_element &add(struct soap_dom_element&); - struct soap_dom_element &add(struct soap_dom_attribute*); - struct soap_dom_element &add(struct soap_dom_attribute&); - soap_dom_element_iterator begin(); - soap_dom_element_iterator end(); - soap_dom_element_iterator find(const char *nstr, const char *name); - soap_dom_element_iterator find(int type); - void unlink(); - soap_dom_element(); - soap_dom_element(struct soap *soap); - soap_dom_element(struct soap *soap, const char *nstr, const char *name); - soap_dom_element(struct soap *soap, const char *nstr, const char *name, const char *data); - soap_dom_element(struct soap *soap, const char *nstr, const char *name, void *node, int type); - ~soap_dom_element(); -#endif -}; -SOAP_FMAC1 const char* SOAP_FMAC2 soap_dom_current_nstr(struct soap *soap, const char *tag); -SOAP_FMAC1 struct soap_dom_element * SOAP_FMAC2 soap_dom_next_element(struct soap_dom_element *elt); -SOAP_FMAC1 struct soap_dom_attribute * SOAP_FMAC2 soap_dom_next_attribute(struct soap_dom_attribute *att); -#endif - -#if defined(__cplusplus) && !defined(WITH_LEAN) -} -extern std::ostream &operator<<(std::ostream&, const struct soap_dom_element&); -extern std::istream &operator>>(std::istream&, struct soap_dom_element&); -extern "C" { -#endif - -/******************************************************************************/ - -struct soap -{ short version; /* 1 = SOAP1.1 and 2 = SOAP1.2 (set automatically from namespace URI in nsmap table) */ - short copy; /* 1 = copy of another soap struct */ - soap_mode mode; - soap_mode imode; - soap_mode omode; - const char *float_format; /* user-definable format string for floats (<1024 chars) */ - const char *double_format; /* user-definable format string for doubles (<1024 chars) */ - const char *dime_id_format; /* user-definable format string for integer DIME id ( 0, gives socket recv timeout in seconds, < 0 in usec */ - int send_timeout; /* when > 0, gives socket send timeout in seconds, < 0 in usec */ - int connect_timeout; /* when > 0, gives socket connect() timeout in seconds, < 0 in usec */ - int accept_timeout; /* when > 0, gives socket accept() timeout in seconds, < 0 in usec */ - int socket_flags; /* socket recv() and send() flags, e.g. set to MSG_NOSIGNAL to disable sigpipe */ - int connect_flags; /* connect() SOL_SOCKET sockopt flags, e.g. set to SO_DEBUG to debug socket */ - int bind_flags; /* bind() SOL_SOCKET sockopt flags, e.g. set to SO_REUSEADDR to enable reuse */ - int accept_flags; /* accept() SOL_SOCKET sockopt flags */ - const struct Namespace *namespaces; /* Pointer to global namespace mapping table */ - struct Namespace *local_namespaces; /* Local namespace mapping table */ - struct soap_nlist *nlist; /* namespace stack */ - struct soap_blist *blist; /* block allocation stack */ - struct soap_clist *clist; /* class instance allocation list */ - void *alist; /* memory allocation (malloc) list */ - struct soap_ilist *iht[SOAP_IDHASH]; - struct soap_plist *pht[SOAP_PTRHASH]; - struct soap_pblk *pblk; /* plist block allocation */ - short pidx; /* plist block allocation */ - struct SOAP_ENV__Header *header; - struct SOAP_ENV__Fault *fault; - int idnum; - void *user; /* to pass user-defined data */ - struct soap_plugin *plugins; /* linked list of plug-in data */ - char *userid; /* HTTP Basic authorization userid */ - char *passwd; /* HTTP Basic authorization passwd */ - int (*fpost)(struct soap*, const char*, const char*, int, const char*, const char*, size_t); - int (*fget)(struct soap*); - int (*fform)(struct soap*); - int (*fposthdr)(struct soap*, const char*, const char*); - int (*fresponse)(struct soap*, int, size_t); - int (*fparse)(struct soap*); - int (*fparsehdr)(struct soap*, const char*, const char*); - int (*fresolve)(struct soap*, const char*, struct in_addr* inaddr); - int (*fconnect)(struct soap*, const char*, const char*, int); - int (*fdisconnect)(struct soap*); - int (*fclosesocket)(struct soap*, SOAP_SOCKET); - int (*fshutdownsocket)(struct soap*, SOAP_SOCKET, int); - int (*fopen)(struct soap*, const char*, const char*, int); - int (*faccept)(struct soap*, int, struct sockaddr*, int *n); - int (*fclose)(struct soap*); - int (*fsend)(struct soap*, const char*, size_t); - size_t (*frecv)(struct soap*, char*, size_t); - int (*fpoll)(struct soap*); - void (*fseterror)(struct soap*, const char **c, const char **s); - int (*fignore)(struct soap*, const char*); - int (*fserveloop)(struct soap*); - void *(*fplugin)(struct soap*, const char*); -#ifndef WITH_LEANER - int (*fprepareinit)(struct soap*); - int (*fpreparesend)(struct soap*, const char*, size_t); - int (*fpreparerecv)(struct soap*, const char*, size_t); - int (*fpreparefinal)(struct soap*); - void *(*fdimereadopen)(struct soap*, void*, const char*, const char*, const char*); - void *(*fdimewriteopen)(struct soap*, const char*, const char*, const char*); - void (*fdimereadclose)(struct soap*, void*); - void (*fdimewriteclose)(struct soap*, void*); - size_t (*fdimeread)(struct soap*, void*, char*, size_t); - int (*fdimewrite)(struct soap*, void*, const char*, size_t); -#endif - int master; - int socket; -#if defined(__cplusplus) && !defined(WITH_LEAN) - std::ostream *os; - std::istream *is; -#else - void *os; /* preserve alignment */ - void *is; /* preserve alignment */ -#endif -#ifndef UNDER_CE - int sendfd; - int recvfd; -#else - FILE *sendfd; - FILE *recvfd; -#endif -#ifdef WIN32 - char errorstr[256]; /* buf for FormatMessage() */ -#endif - size_t bufidx; /* index in soap.buf[] */ - size_t buflen; /* length of soap.buf[] content */ - soap_wchar ahead; /* parser lookahead */ - short cdata; /* CDATA parser state */ - short body; /* parsed XML element has a body or not */ - unsigned int level; /* XML nesting level */ - size_t count; /* message length counter */ - size_t length; /* message length as set by HTTP header */ -#ifdef WITH_FAST - char *labbuf; /* look-aside buffer */ - size_t lablen; /* look-aside buffer allocated length */ - size_t labidx; /* look-aside buffer index to available part */ -#endif - char buf[SOAP_BUFLEN];/* send and receive buffer */ - char tmpbuf[1024]; /* in/output buffer for HTTP headers, simpleType values, attribute names, and DIME >=1024 bytes */ - char msgbuf[1024]; /* output buffer for (error) messages <=1024 bytes */ - char tag[SOAP_TAGLEN]; - char id[SOAP_TAGLEN]; - char href[SOAP_TAGLEN]; - char type[SOAP_TAGLEN]; - char arrayType[SOAP_TAGLEN]; - char arraySize[SOAP_TAGLEN]; - char arrayOffset[SOAP_TAGLEN]; - short other; - short position; - int positions[SOAP_MAXDIMS]; - short root; - struct soap_attribute *attributes; /* attribute list */ - short encoding; /* when set, output encodingStyle */ - short mustUnderstand; /* a mustUnderstand element was parsed or is output */ - short keep_alive; /* connection should be kept open */ - short null; /* parsed XML is xsi:nil */ - short ns; /* when not set, output full xmlns bindings */ - short part; /* parsing state */ - short alloced; - short peeked; - size_t chunksize; - size_t chunkbuflen; - char endpoint[SOAP_TAGLEN]; - char path[SOAP_TAGLEN]; - char host[SOAP_TAGLEN]; - char *action; - char *authrealm; /* HTTP authentication realm */ - char *prolog; /* XML declaration prolog */ - unsigned long ip; /* IP number */ - int port; /* port number */ - unsigned int max_keep_alive; - const char *proxy_host; /* Proxy Server host name */ - int proxy_port; /* Proxy Server port (default = 8080) */ - const char *proxy_userid; /* Proxy Authorization user name */ - const char *proxy_passwd; /* Proxy Authorization password */ - int status; /* -1 when request, else error code to be returned by server */ - int error; - int errmode; - int errnum; -#ifndef WITH_LEANER - struct soap_dom_element *dom; - struct soap_dime dime; - struct soap_mime mime; - struct soap_xlist *xlist; -#endif -#if !defined(WITH_LEAN) || defined(SOAP_DEBUG) - const char *logfile[SOAP_MAXLOGS]; - FILE *fdebug[SOAP_MAXLOGS]; - struct soap_mlist *mht[SOAP_PTRHASH]; -#endif -#ifndef WITH_LEAN - const char *c14ninclude; - const char *c14nexclude; - struct soap_cookie *cookies; - const char *cookie_domain; - const char *cookie_path; - int cookie_max; -#endif -#ifndef WITH_NOIO -#ifdef WITH_IPV6 - struct sockaddr_storage peer; /* IPv6: set by soap_accept and by UDP recv */ -#else - struct sockaddr_in peer; /* IPv4: set by soap_connect/soap_accept and by UDP recv */ -#endif - size_t peerlen; -#endif -#ifdef WITH_OPENSSL - int (*fsslauth)(struct soap*); - int (*fsslverify)(int, X509_STORE_CTX*); - BIO *bio; - SSL *ssl; - SSL_CTX *ctx; - short require_server_auth; - short require_client_auth; - short rsa; /* when set, use RSA instead of DH */ - const char *keyfile; - const char *password; - const char *dhfile; - const char *cafile; - const char *capath; - const char *crlfile; - const char *randfile; - SSL_SESSION *session; - char session_host[SOAP_TAGLEN]; - int session_port; -#endif -#ifdef WITH_ZLIB - short zlib_state; /* SOAP_ZLIB_NONE, SOAP_ZLIB_DEFLATE, or SOAP_ZLIB_INFLATE */ - short zlib_in; /* SOAP_ZLIB_NONE, SOAP_ZLIB_DEFLATE, or SOAP_ZLIB_GZIP */ - short zlib_out; /* SOAP_ZLIB_NONE, SOAP_ZLIB_DEFLATE, or SOAP_ZLIB_GZIP */ - z_stream d_stream; /* decompression stream */ - char z_buf[SOAP_BUFLEN]; /* buffer */ - size_t z_buflen; - unsigned short z_level; /* compression level to be used (0=none, 1=fast to 9=best) */ - uLong z_crc; /* internal gzip crc */ - float z_ratio_in; /* detected compression ratio compressed_length/length of inbound message */ - float z_ratio_out; /* detected compression ratio compressed_length/length of outbound message */ -#endif -/* WR[ */ -#ifdef WMW_RPM_IO - void *rpmreqid; -#endif /* WMW_RPM_IO */ -/* ]WR */ -}; - -struct soap_code_map -{ long code; - const char *string; -}; - -/* forwarding list */ -struct soap_flist -{ struct soap_flist *next; - int type; - void *ptr; - unsigned int level; - void (*fcopy)(struct soap*, int, int, void*, const void*, size_t); -}; - -/* id-ref forwarding list */ -struct soap_ilist -{ struct soap_ilist *next; - int type; - size_t size; - void *link; - void *copy; - struct soap_flist *flist; - void *ptr; - unsigned int level; - char id[1]; /* the actual id string value flows into the allocated region below this struct */ -}; - -struct soap_plugin -{ struct soap_plugin *next; - const char *id; - void *data; - int (*fcopy)(struct soap *soap, struct soap_plugin *dst, struct soap_plugin *src); - void (*fdelete)(struct soap *soap, struct soap_plugin *p); /* should delete fields of plugin only and not free(p) */ -}; - -#ifndef WITH_NONAMESPACES -extern SOAP_NMAC struct Namespace namespaces[]; -#endif - -#ifndef WITH_LEAN -# define soap_get0(soap) (((soap)->bufidx>=(soap)->buflen && soap_recv(soap)) ? EOF : (unsigned char)(soap)->buf[(soap)->bufidx]) -# define soap_get1(soap) (((soap)->bufidx>=(soap)->buflen && soap_recv(soap)) ? EOF : (unsigned char)(soap)->buf[(soap)->bufidx++]) -#else -soap_wchar soap_get0(struct soap*); -soap_wchar soap_get1(struct soap*); -#endif - -#define soap_revget1(soap) ((soap)->bufidx--) -#define soap_unget(soap, c) ((soap)->ahead = c) -#define soap_register_plugin(soap, plugin) soap_register_plugin_arg(soap, plugin, NULL) -#define soap_imode(soap, n) ((soap)->mode = (soap)->imode = (n)) -#define soap_set_imode(soap, n) ((soap)->imode |= (n)) -#define soap_clr_imode(soap, n) ((soap)->imode &= ~(n)) -#define soap_omode(soap, n) ((soap)->mode = (soap)->omode = (n)) -#define soap_set_omode(soap, n) ((soap)->omode |= (n)) -#define soap_clr_omode(soap, n) ((soap)->omode &= ~(n)) -#define soap_set_mode(soap, n) ((soap)->imode |= (n), (soap)->omode |= (n)) -#define soap_clr_mode(soap, n) ((soap)->imode &= ~(n), (soap)->omode &= ~(n)) -#define soap_destroy(soap) soap_delete((soap), NULL) - -#ifdef HAVE_STRRCHR -# define soap_strrchr(s, t) strrchr(s, t) -#else - SOAP_FMAC1 char* SOAP_FMAC2 soap_strrchr(const char *s, int t); -#endif - -#ifdef HAVE_STRTOL -# define soap_strtol(s, t, b) strtol(s, t, b) -#else - SOAP_FMAC1 long SOAP_FMAC2 soap_strtol(const char *s, char **t, int b); -#endif - -#ifdef HAVE_STRTOUL -# define soap_strtoul(s, t, b) strtoul(s, t, b) -#else - SOAP_FMAC1 unsigned long SOAP_FMAC2 soap_strtoul(const char *s, char **t, int b); -#endif - -#if defined(WITH_OPENSSL) -# define soap_random soap_rand() -SOAP_FMAC1 int SOAP_FMAC2 soap_rand(); -#elif defined(HAVE_RANDOM) -# define soap_random (int)random() -#else -# define soap_random rand() -#endif - -#ifdef WITH_NOIDREF -# define soap_embedded(s, p, t) (0) -# define soap_id_lookup(s, i, p, t, n, k) (p) -# define soap_id_forward(s, h, p, st, tt, n, k, fc) (p) -# define soap_reference(s, a, t) (1) -# define soap_array_reference(s, p, a, n, t) (1) -# define soap_embed(s, p, a, n, t, pp) (0) -# define soap_embedded_id(s, i, p, t) (i) -# define soap_is_embedded(s, p) (0) -# define soap_is_single(s, p) (1) -# define soap_lookup_type(s, i) (0) -# define soap_getindependent(s) (0) -# define soap_putindependent(s) (0) -# define soap_getelement(s, n) (n) -# define soap_putelement(s, p, t, i, n) (0) -# define soap_markelement(s, p, n) (0) -#endif - -SOAP_FMAC1 void SOAP_FMAC2 soap_fault(struct soap*); -SOAP_FMAC1 const char** SOAP_FMAC2 soap_faultcode(struct soap*); -SOAP_FMAC1 const char** SOAP_FMAC2 soap_faultsubcode(struct soap*); -SOAP_FMAC1 const char** SOAP_FMAC2 soap_faultstring(struct soap*); -SOAP_FMAC1 const char** SOAP_FMAC2 soap_faultdetail(struct soap*); -SOAP_FMAC1 void SOAP_FMAC2 soap_serializeheader(struct soap*); -SOAP_FMAC1 int SOAP_FMAC2 soap_putheader(struct soap*); -SOAP_FMAC1 int SOAP_FMAC2 soap_getheader(struct soap*); -SOAP_FMAC1 void SOAP_FMAC2 soap_serializefault(struct soap*); -SOAP_FMAC1 int SOAP_FMAC2 soap_putfault(struct soap*); -SOAP_FMAC1 int SOAP_FMAC2 soap_getfault(struct soap*); - -SOAP_FMAC1 int SOAP_FMAC2 soap_poll(struct soap*); -SOAP_FMAC1 int SOAP_FMAC2 soap_connect_command(struct soap*, int, const char*, const char*); -SOAP_FMAC1 int SOAP_FMAC2 soap_connect(struct soap*, const char*, const char*); -SOAP_FMAC1 int SOAP_FMAC2 soap_bind(struct soap*, const char*, int, int); -SOAP_FMAC1 int SOAP_FMAC2 soap_accept(struct soap*); -SOAP_FMAC1 int SOAP_FMAC2 soap_ssl_accept(struct soap*); - -SOAP_FMAC1 int SOAP_FMAC2 soap_ssl_server_context(struct soap*, unsigned short, const char*, const char*, const char*, const char*, const char*, const char*, const char*); -SOAP_FMAC1 int SOAP_FMAC2 soap_ssl_client_context(struct soap*, unsigned short, const char*, const char*, const char*, const char*, const char*); - -SOAP_FMAC1 int SOAP_FMAC2 soap_puthttphdr(struct soap*, int status, size_t count); - -SOAP_FMAC1 const char* SOAP_FMAC2 soap_get_header_attribute(struct soap*, const char*, const char*); -SOAP_FMAC1 const char* SOAP_FMAC2 soap_decode_key(char*, size_t, const char*); -SOAP_FMAC1 const char* SOAP_FMAC2 soap_decode_val(char*, size_t, const char*); - -SOAP_FMAC1 size_t SOAP_FMAC2 soap_hash(const char*); -SOAP_FMAC1 void SOAP_FMAC2 soap_set_endpoint(struct soap*, const char*); -SOAP_FMAC1 int SOAP_FMAC2 soap_flush_raw(struct soap*, const char*, size_t); -SOAP_FMAC1 int SOAP_FMAC2 soap_flush(struct soap*); -SOAP_FMAC1 soap_wchar SOAP_FMAC2 soap_get(struct soap*); -SOAP_FMAC1 soap_wchar SOAP_FMAC2 soap_getchar(struct soap*); -SOAP_FMAC1 int SOAP_FMAC2 soap_tag_cmp(const char*, const char*); -SOAP_FMAC1 void SOAP_FMAC2 soap_set_fault(struct soap*); -SOAP_FMAC1 int SOAP_FMAC2 soap_sender_fault(struct soap*, const char*, const char*); -SOAP_FMAC1 int SOAP_FMAC2 soap_sender_fault_subcode(struct soap*, const char*, const char*, const char*); -SOAP_FMAC1 int SOAP_FMAC2 soap_receiver_fault(struct soap*, const char*, const char*); -SOAP_FMAC1 int SOAP_FMAC2 soap_receiver_fault_subcode(struct soap*, const char*, const char*, const char*); -SOAP_FMAC1 int SOAP_FMAC2 soap_set_sender_error(struct soap*, const char*, const char*, int); -SOAP_FMAC1 int SOAP_FMAC2 soap_set_receiver_error(struct soap*, const char*, const char*, int); - -SOAP_FMAC1 int SOAP_FMAC2 soap_send_raw(struct soap*, const char*, size_t); -SOAP_FMAC1 int SOAP_FMAC2 soap_recv_raw(struct soap*); -SOAP_FMAC1 int SOAP_FMAC2 soap_recv(struct soap*); -SOAP_FMAC1 int SOAP_FMAC2 soap_send(struct soap*, const char*); -SOAP_FMAC1 int SOAP_FMAC2 soap_send2(struct soap*, const char*, const char*); -SOAP_FMAC1 int SOAP_FMAC2 soap_send3(struct soap*, const char*, const char*, const char*); - -SOAP_FMAC1 int SOAP_FMAC2 soap_pututf8(struct soap*, unsigned long); -SOAP_FMAC1 soap_wchar SOAP_FMAC2 soap_getutf8(struct soap*); - -SOAP_FMAC1 int SOAP_FMAC2 soap_putbase64(struct soap*, const unsigned char*, int); -SOAP_FMAC1 unsigned char* SOAP_FMAC2 soap_getbase64(struct soap*, int*, int); -SOAP_FMAC1 int SOAP_FMAC2 soap_puthex(struct soap*, const unsigned char*, int); -SOAP_FMAC1 unsigned char* SOAP_FMAC2 soap_gethex(struct soap*, int*); - -#ifndef WITH_LEANER -SOAP_FMAC1 int SOAP_FMAC2 soap_xop_forward(struct soap*, unsigned char**, int*, char**, char**, char**); -SOAP_FMAC1 int SOAP_FMAC2 soap_dime_forward(struct soap*, unsigned char**, int*, char**, char**, char**); -#endif - -#ifndef WITH_NOIDREF -SOAP_FMAC1 int SOAP_FMAC2 soap_pointer_lookup_id(struct soap*, void *p, int t, struct soap_plist**); -SOAP_FMAC1 int SOAP_FMAC2 soap_pointer_lookup(struct soap*, const void *p, int t, struct soap_plist**); -SOAP_FMAC1 int SOAP_FMAC2 soap_pointer_enter(struct soap*, const void *p, const struct soap_array *a, int n, int t, struct soap_plist**); -SOAP_FMAC1 int SOAP_FMAC2 soap_array_pointer_lookup(struct soap*, const void *p, const struct soap_array *a, int n, int t, struct soap_plist**); -SOAP_FMAC1 int SOAP_FMAC2 soap_embed(struct soap *soap, const void *p, const struct soap_array *a, int n, const char *tag, int type); -SOAP_FMAC1 struct soap_ilist* SOAP_FMAC2 soap_lookup(struct soap*, const char*); -SOAP_FMAC1 struct soap_ilist* SOAP_FMAC2 soap_enter(struct soap*, const char*); -SOAP_FMAC1 int SOAP_FMAC2 soap_resolve(struct soap*); -SOAP_FMAC1 void SOAP_FMAC2 soap_embedded(struct soap*, const void *p, int t); -SOAP_FMAC1 int SOAP_FMAC2 soap_reference(struct soap*, const void *p, int t); -SOAP_FMAC1 int SOAP_FMAC2 soap_array_reference(struct soap*, const void *p, const struct soap_array *a, int n, int t); -SOAP_FMAC1 int SOAP_FMAC2 soap_embedded_id(struct soap*, int id, const void *p, int t); -SOAP_FMAC1 int SOAP_FMAC2 soap_is_embedded(struct soap*, struct soap_plist*); -SOAP_FMAC1 int SOAP_FMAC2 soap_is_single(struct soap*, struct soap_plist*); -SOAP_FMAC1 void SOAP_FMAC2 soap_set_embedded(struct soap*, struct soap_plist*); -#endif - -SOAP_FMAC1 int SOAP_FMAC2 soap_begin_count(struct soap*); -SOAP_FMAC1 int SOAP_FMAC2 soap_end_count(struct soap*); -SOAP_FMAC1 int SOAP_FMAC2 soap_begin_send(struct soap*); -SOAP_FMAC1 int SOAP_FMAC2 soap_end_send(struct soap*); - -SOAP_FMAC1 const struct soap_code_map* SOAP_FMAC2 soap_code(const struct soap_code_map*, const char *str); -SOAP_FMAC1 long SOAP_FMAC2 soap_int_code(const struct soap_code_map*, const char *str, long other); -SOAP_FMAC1 const char* SOAP_FMAC2 soap_str_code(const struct soap_code_map*, long code); - -SOAP_FMAC1 int SOAP_FMAC2 soap_getline(struct soap*, char*, int); -SOAP_FMAC1 int SOAP_FMAC2 soap_begin_recv(struct soap*); -SOAP_FMAC1 int SOAP_FMAC2 soap_end_recv(struct soap*); - -SOAP_FMAC1 void* SOAP_FMAC2 soap_malloc(struct soap*, size_t); -SOAP_FMAC1 void SOAP_FMAC2 soap_dealloc(struct soap*, void*); -SOAP_FMAC1 struct soap_clist * SOAP_FMAC2 soap_link(struct soap*, void*, int, int, void (*fdelete)(struct soap_clist*)); -SOAP_FMAC1 void SOAP_FMAC2 soap_unlink(struct soap*, const void*); -SOAP_FMAC1 void SOAP_FMAC2 soap_free(struct soap*); - -SOAP_FMAC1 void* SOAP_FMAC2 soap_track_malloc(struct soap*, const char*, int, size_t); -SOAP_FMAC1 void SOAP_FMAC2 soap_track_free(struct soap*, const char*, int, void*); - -#ifndef WITH_NOIDREF -SOAP_FMAC1 int SOAP_FMAC2 soap_lookup_type(struct soap*, const char *id); -SOAP_FMAC1 void* SOAP_FMAC2 soap_id_lookup(struct soap*, const char *id, void **p, int t, size_t n, unsigned int k); -SOAP_FMAC1 void* SOAP_FMAC2 soap_id_forward(struct soap*, const char *id, void *p, int st, int tt, size_t n, unsigned int k, void(*fcopy)(struct soap*, int, int, void*, const void*, size_t)); -#endif -SOAP_FMAC1 void* SOAP_FMAC2 soap_id_enter(struct soap*, const char *id, void *p, int t, size_t n, unsigned int k, const char *type, const char *arrayType, void *(*finstantiate)(struct soap*, int, const char*, const char*, size_t*)); -SOAP_FMAC1 void SOAP_FMAC2 soap_fcopy(struct soap *soap, int st, int tt, void *p, const void *q, size_t n); - -SOAP_FMAC1 int SOAP_FMAC2 soap_size(const int *, int); -SOAP_FMAC1 int SOAP_FMAC2 soap_getoffsets(const char *, const int *, int *, int); -SOAP_FMAC1 int SOAP_FMAC2 soap_getsize(const char *, const char *, int *); -SOAP_FMAC1 int SOAP_FMAC2 soap_getsizes(const char *, int *, int); -SOAP_FMAC1 int SOAP_FMAC2 soap_getposition(const char *, int *); - -SOAP_FMAC1 char* SOAP_FMAC2 soap_putsize(struct soap*, const char *, int); -SOAP_FMAC1 char* SOAP_FMAC2 soap_putsizesoffsets(struct soap*, const char *, const int *, const int *, int); -SOAP_FMAC1 char* SOAP_FMAC2 soap_putsizes(struct soap*, const char *, const int *, int); -SOAP_FMAC1 char* SOAP_FMAC2 soap_putoffset(struct soap*, int); -SOAP_FMAC1 char* SOAP_FMAC2 soap_putoffsets(struct soap*, const int *, int); - -SOAP_FMAC1 int SOAP_FMAC2 soap_closesock(struct soap*); - -SOAP_FMAC1 struct soap *SOAP_FMAC2 soap_new(void); -SOAP_FMAC1 struct soap *SOAP_FMAC2 soap_new1(soap_mode); -SOAP_FMAC1 struct soap *SOAP_FMAC2 soap_new2(soap_mode, soap_mode); -SOAP_FMAC1 struct soap *SOAP_FMAC2 soap_copy(struct soap*); -SOAP_FMAC1 struct soap *SOAP_FMAC2 soap_copy_context(struct soap*,struct soap*); -SOAP_FMAC1 void SOAP_FMAC2 soap_init(struct soap*); -SOAP_FMAC1 void SOAP_FMAC2 soap_init1(struct soap*, soap_mode); -SOAP_FMAC1 void SOAP_FMAC2 soap_init2(struct soap*, soap_mode, soap_mode); -SOAP_FMAC1 void SOAP_FMAC2 soap_done(struct soap*); -SOAP_FMAC1 void SOAP_FMAC2 soap_cleanup(struct soap*); -SOAP_FMAC1 void SOAP_FMAC2 soap_begin(struct soap*); -SOAP_FMAC1 void SOAP_FMAC2 soap_end(struct soap*); -SOAP_FMAC1 void SOAP_FMAC2 soap_delete(struct soap*, void*); - -#ifdef SOAP_DEBUG -SOAP_FMAC1 void SOAP_FMAC2 soap_set_recv_logfile(struct soap*, const char*); -SOAP_FMAC1 void SOAP_FMAC2 soap_set_sent_logfile(struct soap*, const char*); -SOAP_FMAC1 void SOAP_FMAC2 soap_set_test_logfile(struct soap*, const char*); -SOAP_FMAC1 void SOAP_FMAC2 soap_close_logfiles(struct soap*); -SOAP_FMAC1 void SOAP_FMAC2 soap_open_logfile(struct soap*, int); -#endif - -SOAP_FMAC1 const char* SOAP_FMAC2 soap_token(struct soap*); -SOAP_FMAC1 const char* SOAP_FMAC2 soap_value(struct soap*); - -SOAP_FMAC1 int SOAP_FMAC2 soap_match_tag(struct soap*, const char*, const char *); -SOAP_FMAC1 int SOAP_FMAC2 soap_match_array(struct soap*, const char*); - -SOAP_FMAC1 int SOAP_FMAC2 soap_element(struct soap*, const char*, int, const char*); -SOAP_FMAC1 int SOAP_FMAC2 soap_element_begin_out(struct soap*, const char *tag, int id, const char *type); -SOAP_FMAC1 int SOAP_FMAC2 soap_array_begin_out(struct soap*, const char *tag, int id, const char *type, const char *offset); -SOAP_FMAC1 int SOAP_FMAC2 soap_element_ref(struct soap*, const char *tag, int id, int href); -SOAP_FMAC1 int SOAP_FMAC2 soap_element_href(struct soap*, const char *tag, int id, const char *ref, const char *val); -SOAP_FMAC1 int SOAP_FMAC2 soap_element_null(struct soap*, const char *tag, int id, const char *type); -SOAP_FMAC1 int SOAP_FMAC2 soap_element_id(struct soap*, const char *tag, int id, const void *p, const struct soap_array *a, int d, const char *type, int n); -SOAP_FMAC1 int SOAP_FMAC2 soap_element_result(struct soap*, const char *tag); -SOAP_FMAC1 int SOAP_FMAC2 soap_element_end_out(struct soap*, const char *tag); -SOAP_FMAC1 int SOAP_FMAC2 soap_element_start_end_out(struct soap*, const char *tag); - -SOAP_FMAC1 int SOAP_FMAC2 soap_attribute(struct soap*, const char*, const char*); - -SOAP_FMAC1 int SOAP_FMAC2 soap_element_begin_in(struct soap*, const char *tag, int nillable); - -SOAP_FMAC1 int SOAP_FMAC2 soap_element_end_in(struct soap*, const char *tag); - -SOAP_FMAC1 int SOAP_FMAC2 soap_peek_element(struct soap*); - -SOAP_FMAC1 void SOAP_FMAC2 soap_retry(struct soap*); -SOAP_FMAC1 void SOAP_FMAC2 soap_revert(struct soap*); - -SOAP_FMAC1 char* SOAP_FMAC2 soap_strdup(struct soap*, const char*); -SOAP_FMAC1 const char * SOAP_FMAC2 soap_strsearch(const char *big, const char *little); - -SOAP_FMAC1 int SOAP_FMAC2 soap_string_out(struct soap*, const char *s, int flag); -SOAP_FMAC1 char* SOAP_FMAC2 soap_string_in(struct soap*, int, long, long); - -#ifndef WITH_LEANER -SOAP_FMAC1 int SOAP_FMAC2 soap_wstring_out(struct soap*, const wchar_t *s, int flag); -SOAP_FMAC1 wchar_t* SOAP_FMAC2 soap_wstring_in(struct soap*, int, long, long); -#endif - -SOAP_FMAC1 int SOAP_FMAC2 soap_match_namespace(struct soap*, const char *, const char*, int n1, int n2); - -SOAP_FMAC1 int SOAP_FMAC2 soap_set_namespaces(struct soap*, struct Namespace*); -SOAP_FMAC1 void SOAP_FMAC2 soap_set_local_namespaces(struct soap*); - -SOAP_FMAC1 void SOAP_FMAC2 soap_pop_namespace(struct soap*); -SOAP_FMAC1 int SOAP_FMAC2 soap_push_namespace(struct soap*, const char *,const char *); - -SOAP_FMAC1 int SOAP_FMAC2 soap_store_lab(struct soap*, const char*, size_t); -SOAP_FMAC1 int SOAP_FMAC2 soap_append_lab(struct soap*, const char*, size_t); - -SOAP_FMAC1 int SOAP_FMAC2 soap_new_block(struct soap*); -SOAP_FMAC1 void* SOAP_FMAC2 soap_push_block(struct soap*, size_t); -SOAP_FMAC1 void SOAP_FMAC2 soap_pop_block(struct soap*); -SOAP_FMAC1 size_t SOAP_FMAC2 soap_size_block(struct soap*, size_t); -SOAP_FMAC1 char* SOAP_FMAC2 soap_first_block(struct soap*); -SOAP_FMAC1 char* SOAP_FMAC2 soap_next_block(struct soap*); -SOAP_FMAC1 size_t SOAP_FMAC2 soap_block_size(struct soap*); -SOAP_FMAC1 char* SOAP_FMAC2 soap_save_block(struct soap*, char*, int); -SOAP_FMAC1 void SOAP_FMAC2 soap_end_block(struct soap*); - -SOAP_FMAC1 int SOAP_FMAC2 soap_envelope_begin_out(struct soap*); -SOAP_FMAC1 int soap_envelope_end_out(struct soap*); - -SOAP_FMAC1 int SOAP_FMAC2 soap_envelope_begin_in(struct soap*); -SOAP_FMAC1 int SOAP_FMAC2 soap_envelope_end_in(struct soap*); - -SOAP_FMAC1 int SOAP_FMAC2 soap_body_begin_out(struct soap*); -SOAP_FMAC1 int SOAP_FMAC2 soap_body_end_out(struct soap*); - -SOAP_FMAC1 int SOAP_FMAC2 soap_body_begin_in(struct soap*); -SOAP_FMAC1 int SOAP_FMAC2 soap_body_end_in(struct soap*); - -SOAP_FMAC1 int SOAP_FMAC2 soap_recv_header(struct soap*); - -SOAP_FMAC1 int SOAP_FMAC2 soap_response(struct soap*, int); - -SOAP_FMAC1 int SOAP_FMAC2 soap_send_empty_response(struct soap*); -SOAP_FMAC1 int SOAP_FMAC2 soap_recv_empty_response(struct soap*); - -SOAP_FMAC1 int SOAP_FMAC2 soap_send_fault(struct soap*); -SOAP_FMAC1 int SOAP_FMAC2 soap_recv_fault(struct soap*); - -#ifndef WITH_NOSTDLIB -SOAP_FMAC1 void SOAP_FMAC2 soap_print_fault(struct soap*, FILE*); -SOAP_FMAC1 void SOAP_FMAC2 soap_print_fault_location(struct soap*, FILE*); -#endif - -SOAP_FMAC1 int SOAP_FMAC2 soap_s2byte(struct soap*, const char*, char*); -SOAP_FMAC1 int SOAP_FMAC2 soap_s2short(struct soap*, const char*, short*); -SOAP_FMAC1 int SOAP_FMAC2 soap_s2int(struct soap*, const char*, int*); -SOAP_FMAC1 int SOAP_FMAC2 soap_s2long(struct soap*, const char*, long*); -SOAP_FMAC1 int SOAP_FMAC2 soap_s2LONG64(struct soap*, const char*, LONG64*); -SOAP_FMAC1 int SOAP_FMAC2 soap_s2float(struct soap*, const char*, float*); -SOAP_FMAC1 int SOAP_FMAC2 soap_s2double(struct soap*, const char*, double*); -SOAP_FMAC1 int SOAP_FMAC2 soap_s2unsignedByte(struct soap*, const char*, unsigned char*); -SOAP_FMAC1 int SOAP_FMAC2 soap_s2unsignedShort(struct soap*, const char*, unsigned short*); -SOAP_FMAC1 int SOAP_FMAC2 soap_s2unsignedInt(struct soap*, const char*, unsigned int*); -SOAP_FMAC1 int SOAP_FMAC2 soap_s2unsignedLong(struct soap*, const char*, unsigned long*); -SOAP_FMAC1 int SOAP_FMAC2 soap_s2ULONG64(struct soap*, const char*, ULONG64*); -SOAP_FMAC1 int SOAP_FMAC2 soap_s2string(struct soap*, const char*, char**); -SOAP_FMAC1 int SOAP_FMAC2 soap_s2QName(struct soap*, const char*, char**); - -#ifndef WITH_LEAN -SOAP_FMAC1 int SOAP_FMAC2 soap_s2dateTime(struct soap*, const char*, time_t*); -SOAP_FMAC1 char* SOAP_FMAC2 soap_s2base64(struct soap*, const unsigned char*, char*, int); -SOAP_FMAC1 char* SOAP_FMAC2 soap_s2hex(struct soap*, const unsigned char*, char*, int); -#endif - -SOAP_FMAC1 const char* SOAP_FMAC2 soap_byte2s(struct soap*, char); -SOAP_FMAC1 const char* SOAP_FMAC2 soap_short2s(struct soap*, short); -SOAP_FMAC1 const char* SOAP_FMAC2 soap_int2s(struct soap*, int); -SOAP_FMAC1 const char* SOAP_FMAC2 soap_long2s(struct soap*, long); -SOAP_FMAC1 const char* SOAP_FMAC2 soap_LONG642s(struct soap*, LONG64); -SOAP_FMAC1 const char* SOAP_FMAC2 soap_float2s(struct soap*, float); -SOAP_FMAC1 const char* SOAP_FMAC2 soap_double2s(struct soap*, double); -SOAP_FMAC1 const char* SOAP_FMAC2 soap_unsignedByte2s(struct soap*, unsigned char); -SOAP_FMAC1 const char* SOAP_FMAC2 soap_unsignedShort2s(struct soap*, unsigned short); -SOAP_FMAC1 const char* SOAP_FMAC2 soap_unsignedInt2s(struct soap*, unsigned int); -SOAP_FMAC1 const char* SOAP_FMAC2 soap_unsignedLong2s(struct soap*, unsigned long); -SOAP_FMAC1 const char* SOAP_FMAC2 soap_ULONG642s(struct soap*, ULONG64); -SOAP_FMAC1 const char* SOAP_FMAC2 soap_QName2s(struct soap*, const char*); - -#ifndef WITH_LEAN -SOAP_FMAC1 const char* SOAP_FMAC2 soap_dateTime2s(struct soap*, time_t); -SOAP_FMAC1 const char* SOAP_FMAC2 soap_base642s(struct soap*, const char*, char*, size_t, int*); -SOAP_FMAC1 const char* SOAP_FMAC2 soap_hex2s(struct soap*, const char*, char*, size_t, int*); -#endif - - -SOAP_FMAC1 int* SOAP_FMAC2 soap_inint(struct soap*, const char *tag, int *p, const char *, int); -SOAP_FMAC1 char* SOAP_FMAC2 soap_inbyte(struct soap*, const char *tag, char *p, const char *, int); -SOAP_FMAC1 long* SOAP_FMAC2 soap_inlong(struct soap*, const char *tag, long *p, const char *, int); -SOAP_FMAC1 LONG64* SOAP_FMAC2 soap_inLONG64(struct soap*, const char *tag, LONG64 *p, const char *, int); -SOAP_FMAC1 short* SOAP_FMAC2 soap_inshort(struct soap*, const char *tag, short *p, const char *, int); -SOAP_FMAC1 float* SOAP_FMAC2 soap_infloat(struct soap*, const char *tag, float *p, const char *, int); -SOAP_FMAC1 double* SOAP_FMAC2 soap_indouble(struct soap*, const char *tag, double *p, const char *, int); -SOAP_FMAC1 unsigned char* SOAP_FMAC2 soap_inunsignedByte(struct soap*, const char *tag, unsigned char *p, const char *, int); -SOAP_FMAC1 unsigned short* SOAP_FMAC2 soap_inunsignedShort(struct soap*, const char *tag, unsigned short *p, const char *, int); -SOAP_FMAC1 unsigned int* SOAP_FMAC2 soap_inunsignedInt(struct soap*, const char *tag, unsigned int *p, const char *, int); -SOAP_FMAC1 unsigned long* SOAP_FMAC2 soap_inunsignedLong(struct soap*, const char *tag, unsigned long *p, const char *, int); -SOAP_FMAC1 ULONG64* SOAP_FMAC2 soap_inULONG64(struct soap*, const char *tag, ULONG64 *p, const char *, int); -SOAP_FMAC1 char** SOAP_FMAC2 soap_instring(struct soap*, const char *tag, char **p, const char *, int, int, long, long); -SOAP_FMAC1 char** SOAP_FMAC2 soap_inliteral(struct soap*, const char *tag, char **p); - -#ifndef WITH_LEAN -SOAP_FMAC1 time_t* SOAP_FMAC2 soap_indateTime(struct soap*, const char *tag, time_t *p, const char *, int); -#endif - -#ifndef WITH_LEANER -SOAP_FMAC1 wchar_t** SOAP_FMAC2 soap_inwstring(struct soap*, const char *tag, wchar_t **p, const char *, int, long, long); -SOAP_FMAC1 wchar_t** SOAP_FMAC2 soap_inwliteral(struct soap*, const char *tag, wchar_t **p); -#endif - -SOAP_FMAC1 int SOAP_FMAC2 soap_outbyte(struct soap*, const char *tag, int id, const char *p, const char *, int); -SOAP_FMAC1 int SOAP_FMAC2 soap_outshort(struct soap*, const char *tag, int id, const short *p, const char *, int); -SOAP_FMAC1 int SOAP_FMAC2 soap_outint(struct soap*, const char *tag, int id, const int *p, const char *, int); -SOAP_FMAC1 int SOAP_FMAC2 soap_outlong(struct soap*, const char *tag, int id, const long *p, const char *, int); -SOAP_FMAC1 int SOAP_FMAC2 soap_outLONG64(struct soap*, const char *tag, int id, const LONG64 *p, const char *, int); -SOAP_FMAC1 int SOAP_FMAC2 soap_outfloat(struct soap*, const char *tag, int id, const float *p, const char *, int); -SOAP_FMAC1 int SOAP_FMAC2 soap_outdouble(struct soap*, const char *tag, int id, const double *p, const char *, int); -SOAP_FMAC1 int SOAP_FMAC2 soap_outunsignedByte(struct soap*, const char *tag, int id, const unsigned char *p, const char *, int); -SOAP_FMAC1 int SOAP_FMAC2 soap_outunsignedShort(struct soap*, const char *tag, int id, const unsigned short *p, const char *, int); -SOAP_FMAC1 int SOAP_FMAC2 soap_outunsignedInt(struct soap*, const char *tag, int id, const unsigned int *p, const char *, int); -SOAP_FMAC1 int SOAP_FMAC2 soap_outunsignedLong(struct soap*, const char *tag, int id, const unsigned long *p, const char *, int); -SOAP_FMAC1 int SOAP_FMAC2 soap_outULONG64(struct soap*, const char *tag, int id, const ULONG64 *p, const char *, int); -SOAP_FMAC1 int SOAP_FMAC2 soap_outstring(struct soap*, const char *tag, int id, char *const*p, const char *, int); -SOAP_FMAC1 int SOAP_FMAC2 soap_outliteral(struct soap*, const char *tag, char *const*p); - -#ifndef WITH_LEAN -SOAP_FMAC1 int SOAP_FMAC2 soap_outdateTime(struct soap*, const char *tag, int id, const time_t *p, const char *, int); -#endif - -#ifndef WITH_LEANER -SOAP_FMAC1 int SOAP_FMAC2 soap_outwstring(struct soap*, const char *tag, int id, wchar_t *const*p, const char *, int); -SOAP_FMAC1 int SOAP_FMAC2 soap_outwliteral(struct soap*, const char *tag, wchar_t *const*p); -#endif - -#ifndef WITH_LEANER -SOAP_FMAC1 int SOAP_FMAC2 soap_attachment(struct soap *, const char*, int, const void*, const struct soap_array*, const char*, const char*, const char*, int, const char*, int); -SOAP_FMAC1 int SOAP_FMAC2 soap_move(struct soap*, long); -SOAP_FMAC1 size_t SOAP_FMAC2 soap_tell(struct soap*); -SOAP_FMAC1 char* SOAP_FMAC2 soap_dime_option(struct soap*, unsigned short, const char*); -SOAP_FMAC1 int SOAP_FMAC2 soap_getdimehdr(struct soap*); -SOAP_FMAC1 int SOAP_FMAC2 soap_getdime(struct soap*); -SOAP_FMAC1 int SOAP_FMAC2 soap_putdimehdr(struct soap*); -SOAP_FMAC1 int SOAP_FMAC2 soap_putdime(struct soap*); -SOAP_FMAC1 int SOAP_FMAC2 soap_getmimehdr(struct soap*); -SOAP_FMAC1 int SOAP_FMAC2 soap_getmime(struct soap*); -SOAP_FMAC1 int SOAP_FMAC2 soap_putmimehdr(struct soap*, struct soap_multipart*); -SOAP_FMAC1 int SOAP_FMAC2 soap_putmime(struct soap*); -SOAP_FMAC1 void SOAP_FMAC2 soap_set_dime(struct soap*); -SOAP_FMAC1 void SOAP_FMAC2 soap_set_mime(struct soap*, const char *boundary, const char *start); -SOAP_FMAC1 void SOAP_FMAC2 soap_clr_dime(struct soap*); -SOAP_FMAC1 void SOAP_FMAC2 soap_clr_mime(struct soap*); -SOAP_FMAC1 int SOAP_FMAC2 soap_set_dime_attachment(struct soap*, char *ptr, size_t size, const char *type, const char *id, unsigned short optype, const char *option); -SOAP_FMAC1 int SOAP_FMAC2 soap_set_mime_attachment(struct soap*, char *ptr, size_t size, enum soap_mime_encoding encoding, const char *type, const char *id, const char *location, const char *description); -SOAP_FMAC1 struct soap_multipart* SOAP_FMAC2 soap_next_multipart(struct soap_multipart*); -#endif - -SOAP_FMAC1 int SOAP_FMAC2 soap_register_plugin_arg(struct soap*, int (*fcreate)(struct soap*, struct soap_plugin*, void*), void*); -SOAP_FMAC1 void* SOAP_FMAC2 soap_lookup_plugin(struct soap*, const char*); - -SOAP_FMAC1 const char* SOAP_FMAC2 soap_attr_value(struct soap *soap, const char *name, int flag); -SOAP_FMAC1 int SOAP_FMAC2 soap_set_attr(struct soap *soap, const char *name, const char *value); -SOAP_FMAC1 void SOAP_FMAC2 soap_clr_attr(struct soap *soap); - -#ifdef WITH_COOKIES -SOAP_FMAC1 size_t SOAP_FMAC2 soap_encode_cookie(const char*, char*, size_t); -SOAP_FMAC1 extern struct soap_cookie* SOAP_FMAC2 soap_set_cookie(struct soap*, const char*, const char*, const char*, const char*); -SOAP_FMAC1 extern struct soap_cookie* SOAP_FMAC2 soap_cookie(struct soap*, const char*, const char*, const char*); -SOAP_FMAC1 extern char* SOAP_FMAC2 soap_cookie_value(struct soap*, const char*, const char*, const char*); -SOAP_FMAC1 extern char* SOAP_FMAC2 soap_env_cookie_value(struct soap*, const char*, const char*, const char*); -SOAP_FMAC1 extern long SOAP_FMAC2 soap_cookie_expire(struct soap*, const char*, const char*, const char*); -SOAP_FMAC1 extern int SOAP_FMAC2 soap_set_cookie_expire(struct soap*, const char*, long, const char*, const char*); -SOAP_FMAC1 extern int SOAP_FMAC2 soap_set_cookie_session(struct soap*, const char*, const char*, const char*); -SOAP_FMAC1 extern int SOAP_FMAC2 soap_clr_cookie_session(struct soap*, const char*, const char*, const char*); -SOAP_FMAC1 extern void SOAP_FMAC2 soap_clr_cookie(struct soap*, const char*, const char*, const char*); -SOAP_FMAC1 extern int SOAP_FMAC2 soap_getenv_cookies(struct soap*); -SOAP_FMAC1 extern struct soap_cookie* SOAP_FMAC2 soap_copy_cookies(struct soap*); -SOAP_FMAC1 extern void SOAP_FMAC2 soap_free_cookies(struct soap*); -#endif - -#ifdef __cplusplus -} /* extern "C" */ -#endif - -#endif - diff --git a/org.glite.security.gsoap-plugin/src/stdsoap2_2.7.9b.c b/org.glite.security.gsoap-plugin/src/stdsoap2_2.7.9b.c deleted file mode 100644 index 959147e..0000000 --- a/org.glite.security.gsoap-plugin/src/stdsoap2_2.7.9b.c +++ /dev/null @@ -1,14172 +0,0 @@ -/* - -stdsoap2.c[pp] 2.7.9b - -gSOAP runtime - -gSOAP XML Web services tools -Copyright (C) 2000-2007, Robert van Engelen, Genivia Inc., All Rights Reserved. -This part of the software is released under one of the following licenses: -GPL, the gSOAP public license, or Genivia's license for commercial use. --------------------------------------------------------------------------------- -Contributors: - -Wind River Systems Inc., for the following additions under gSOAP public license: - - vxWorks compatible (#define VXWORKS) --------------------------------------------------------------------------------- -gSOAP public license. - -The contents of this file are subject to the gSOAP Public License Version 1.3 -(the "License"); you may not use this file except in compliance with the -License. You may obtain a copy of the License at -http://www.cs.fsu.edu/~engelen/soaplicense.html -Software distributed under the License is distributed on an "AS IS" basis, -WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License -for the specific language governing rights and limitations under the License. - -The Initial Developer of the Original Code is Robert A. van Engelen. -Copyright (C) 2000-2007, Robert van Engelen, Genivia Inc., All Rights Reserved. --------------------------------------------------------------------------------- -GPL license. - -This program is free software; you can redistribute it and/or modify it under -the terms of the GNU General Public License as published by the Free Software -Foundation; either version 2 of the License, or (at your option) any later -version. - -This program is distributed in the hope that it will be useful, but WITHOUT ANY -WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A -PARTICULAR PURPOSE. See the GNU General Public License for more details. - -You should have received a copy of the GNU General Public License along with -this program; if not, write to the Free Software Foundation, Inc., 59 Temple -Place, Suite 330, Boston, MA 02111-1307 USA - -Author contact information: -engelen@genivia.com / engelen@acm.org --------------------------------------------------------------------------------- -A commercial use license is available from Genivia, Inc., contact@genivia.com --------------------------------------------------------------------------------- - -Installation note: - -Win32 build needs winsock.dll (Visual C++ "wsock32.lib") -To do this in Visual C++ 6.0, go to "Project", "settings", select the "Link" -tab (the project file needs to be selected in the file view) and add -"wsock32.lib" to the "Object/library modules" entry - -On Mac OS X with gcc (GCC) 3.1 20020420 (prerelease) you MUST compile with --fstack_check when using -O2 because gcc 3.1 has a bug that smashes the stack -when locally allocated data exceeds 64K. - -*/ - -#ifdef AS400 -# pragma convert(819) /* EBCDIC to ASCII */ -#endif - -#include "stdsoap2.h" - -#ifdef WIN32 -# pragma comment(lib, "wsock32.lib") -#endif - -#ifdef __cplusplus -SOAP_SOURCE_STAMP("@(#) stdsoap2.cpp ver 2.7.9b 2007-01-01 12:00:00 GMT") -extern "C" { -#else -SOAP_SOURCE_STAMP("@(#) stdsoap2.c ver 2.7.9 2007-01-01 12:00:00 GMT") -#endif - -/* 8bit character representing unknown/nonrepresentable character data (e.g. not supported by current locale with multibyte support enabled) */ -#ifndef SOAP_UNKNOWN_CHAR -#define SOAP_UNKNOWN_CHAR (127) -#endif - -/* EOF=-1 */ -#define SOAP_LT (soap_wchar)(-2) /* XML character '<' */ -#define SOAP_TT (soap_wchar)(-3) /* XML character '' */ -#define SOAP_QT (soap_wchar)(-5) /* XML character '"' */ -#define SOAP_AP (soap_wchar)(-6) /* XML character ''' */ - -#define soap_blank(c) ((c) >= 0 && (c) <= 32) -#define soap_notblank(c) ((c) > 32) - -#define soap_hash_ptr(p) ((size_t)(((unsigned long)(p) >> 3) & (SOAP_PTRHASH-1))) - -#ifdef SOAP_DEBUG -static void soap_init_logs(struct soap*); -static void soap_close_logfile(struct soap*, int); -static void soap_set_logfile(struct soap*, int, const char*); -#endif - -#ifdef SOAP_MEM_DEBUG -static void soap_init_mht(struct soap*); -static void soap_free_mht(struct soap*); -static void soap_track_unlink(struct soap*, const void*); -#endif - -#ifndef PALM_2 -static int soap_set_error(struct soap*, const char*, const char*, const char*, const char*, int); -static int soap_copy_fault(struct soap*, const char*, const char*, const char*, const char*); -static int soap_getattrval(struct soap*, char*, size_t, soap_wchar); -#endif - -#ifndef PALM_1 -static soap_wchar soap_char(struct soap*); -static soap_wchar soap_get_pi(struct soap*); -static int soap_isxdigit(int); -static void *fplugin(struct soap*, const char*); -#ifndef WITH_NOIDREF -static void soap_update_ptrs(struct soap*, char*, char*, char*, char*); -static int soap_has_copies(struct soap*, const char*, const char*); -static void soap_init_iht(struct soap*); -static void soap_free_iht(struct soap*); -static void soap_init_pht(struct soap*); -static void soap_free_pht(struct soap*); -#endif -#endif - -#ifndef WITH_LEAN -static const char *soap_set_validation_fault(struct soap*, const char*, const char*); -static int soap_isnumeric(struct soap*, const char*); -static time_t soap_timegm(struct tm*); -static struct soap_nlist *soap_push_ns(struct soap *soap, const char *id, const char *ns, short utilized); -static void soap_pop_ns(struct soap *soap); -static void soap_utilize_ns(struct soap *soap, const char *tag, size_t n); -#endif - -#ifndef WITH_LEANER -#ifndef PALM_1 -static struct soap_multipart *soap_new_multipart(struct soap*, struct soap_multipart**, struct soap_multipart**, char*, size_t); -static int soap_putdimefield(struct soap*, const char*, size_t); -static char *soap_getdimefield(struct soap*, size_t); -static void soap_select_mime_boundary(struct soap*); -static int soap_valid_mime_boundary(struct soap*); -static void soap_resolve_attachment(struct soap*, struct soap_multipart*); -#endif -#endif - -#ifdef WITH_GZIP -static int soap_getgziphdr(struct soap*); -#endif - -#ifdef WITH_OPENSSL -static int ssl_init_done = 0; -static int ssl_auth_init(struct soap*); -static int ssl_verify_callback(int, X509_STORE_CTX*); -static int ssl_password(char*, int, int, void *); -/* This callback is included for future references. It should not be deleted -static DH *ssl_tmp_dh(SSL*, int, int); -*/ -#endif - -#if !defined(WITH_NOHTTP) || !defined(WITH_LEANER) -#ifndef PALM_1 -static const char *soap_decode(char*, size_t, const char*, const char*); -#endif -#endif - -#ifndef WITH_NOHTTP -#ifndef PALM_1 -static soap_wchar soap_getchunkchar(struct soap*); -static const char *http_error(struct soap*, int); -static int http_post(struct soap*, const char*, const char*, int, const char*, const char*, size_t); -static int http_get(struct soap*); -static int http_send_header(struct soap*, const char*); -static int http_post_header(struct soap*, const char*, const char*); -static int http_response(struct soap*, int, size_t); -static int http_parse(struct soap*); -static int http_parse_header(struct soap*, const char*, const char*); -#endif -#endif - -#ifndef WITH_NOIO -#ifndef PALM_1 -static int fsend(struct soap*, const char*, size_t); -static size_t frecv(struct soap*, char*, size_t); -static int tcp_init(struct soap*); -static const char *tcp_error(struct soap*); -#ifndef WITH_LEAN -static size_t frecv_stop(struct soap*, char*, size_t); -#endif -#ifndef WITH_IPV6 -static int tcp_gethost(struct soap*, const char *addr, struct in_addr *inaddr); -#endif -static int tcp_connect(struct soap*, const char *endpoint, const char *host, int port); -static int tcp_accept(struct soap*, int, struct sockaddr*, int*); -static int tcp_disconnect(struct soap*); -static int tcp_closesocket(struct soap*, SOAP_SOCKET); -static int tcp_shutdownsocket(struct soap*, SOAP_SOCKET, int); -static const char *soap_strerror(struct soap*); -#endif -#endif - -#if defined(PALM) && !defined(PALM_2) -unsigned short errno; -#endif - -#ifndef PALM_1 -static const char soap_env1[42] = "http://schemas.xmlsoap.org/soap/envelope/"; -static const char soap_enc1[42] = "http://schemas.xmlsoap.org/soap/encoding/"; -static const char soap_env2[40] = "http://www.w3.org/2003/05/soap-envelope"; -static const char soap_enc2[40] = "http://www.w3.org/2003/05/soap-encoding"; -static const char soap_rpc[35] = "http://www.w3.org/2003/05/soap-rpc"; -#endif - -#ifndef PALM_1 -const struct soap_double_nan soap_double_nan = {0xFFFFFFFF, 0xFFFFFFFF}; -static const char soap_base64o[65] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; -static const char soap_base64i[81] = "\76XXX\77\64\65\66\67\70\71\72\73\74\75XXXXXXX\00\01\02\03\04\05\06\07\10\11\12\13\14\15\16\17\20\21\22\23\24\25\26\27\30\31XXXXXX\32\33\34\35\36\37\40\41\42\43\44\45\46\47\50\51\52\53\54\55\56\57\60\61\62\63"; -#endif - -#ifndef WITH_LEAN -static const char soap_indent[11] = "\n\t\t\t\t\t\t\t\t\t"; -/* Alternative indentation form for SOAP_XML_INDENT: -static const char soap_indent[21] = "\n "; -*/ -#endif - -#ifndef SOAP_CANARY -# define SOAP_CANARY (0xC0DE) -#endif - -static const char soap_padding[4] = "\0\0\0"; -#define SOAP_STR_PADDING (soap_padding) -#define SOAP_STR_EOS (soap_padding) -#define SOAP_NON_NULL (soap_padding) - -#ifndef WITH_LEAN -static const struct soap_code_map html_entity_codes[] = /* entities for XHTML parsing */ -{ { 160, "nbsp" }, - { 161, "iexcl" }, - { 162, "cent" }, - { 163, "pound" }, - { 164, "curren" }, - { 165, "yen" }, - { 166, "brvbar" }, - { 167, "sect" }, - { 168, "uml" }, - { 169, "copy" }, - { 170, "ordf" }, - { 171, "laquo" }, - { 172, "not" }, - { 173, "shy" }, - { 174, "reg" }, - { 175, "macr" }, - { 176, "deg" }, - { 177, "plusmn" }, - { 178, "sup2" }, - { 179, "sup3" }, - { 180, "acute" }, - { 181, "micro" }, - { 182, "para" }, - { 183, "middot" }, - { 184, "cedil" }, - { 185, "sup1" }, - { 186, "ordm" }, - { 187, "raquo" }, - { 188, "frac14" }, - { 189, "frac12" }, - { 190, "frac34" }, - { 191, "iquest" }, - { 192, "Agrave" }, - { 193, "Aacute" }, - { 194, "Acirc" }, - { 195, "Atilde" }, - { 196, "Auml" }, - { 197, "Aring" }, - { 198, "AElig" }, - { 199, "Ccedil" }, - { 200, "Egrave" }, - { 201, "Eacute" }, - { 202, "Ecirc" }, - { 203, "Euml" }, - { 204, "Igrave" }, - { 205, "Iacute" }, - { 206, "Icirc" }, - { 207, "Iuml" }, - { 208, "ETH" }, - { 209, "Ntilde" }, - { 210, "Ograve" }, - { 211, "Oacute" }, - { 212, "Ocirc" }, - { 213, "Otilde" }, - { 214, "Ouml" }, - { 215, "times" }, - { 216, "Oslash" }, - { 217, "Ugrave" }, - { 218, "Uacute" }, - { 219, "Ucirc" }, - { 220, "Uuml" }, - { 221, "Yacute" }, - { 222, "THORN" }, - { 223, "szlig" }, - { 224, "agrave" }, - { 225, "aacute" }, - { 226, "acirc" }, - { 227, "atilde" }, - { 228, "auml" }, - { 229, "aring" }, - { 230, "aelig" }, - { 231, "ccedil" }, - { 232, "egrave" }, - { 233, "eacute" }, - { 234, "ecirc" }, - { 235, "euml" }, - { 236, "igrave" }, - { 237, "iacute" }, - { 238, "icirc" }, - { 239, "iuml" }, - { 240, "eth" }, - { 241, "ntilde" }, - { 242, "ograve" }, - { 243, "oacute" }, - { 244, "ocirc" }, - { 245, "otilde" }, - { 246, "ouml" }, - { 247, "divide" }, - { 248, "oslash" }, - { 249, "ugrave" }, - { 250, "uacute" }, - { 251, "ucirc" }, - { 252, "uuml" }, - { 253, "yacute" }, - { 254, "thorn" }, - { 255, "yuml" }, - { 0, NULL } -}; -#endif - -#ifndef WITH_NOIO -#ifndef WITH_LEAN -static const struct soap_code_map h_error_codes[] = -{ -#ifdef HOST_NOT_FOUND - { HOST_NOT_FOUND, "Host not found" }, -#endif -#ifdef TRY_AGAIN - { TRY_AGAIN, "Try Again" }, -#endif -#ifdef NO_RECOVERY - { NO_RECOVERY, "No Recovery" }, -#endif -#ifdef NO_DATA - { NO_DATA, "No Data" }, -#endif -#ifdef NO_ADDRESS - { NO_ADDRESS, "No Address" }, -#endif - { 0, NULL } -}; -#endif -#endif - -#ifndef WITH_NOHTTP -#ifndef WITH_LEAN -static const struct soap_code_map h_http_error_codes[] = -{ { 200, "OK" }, - { 201, "Created" }, - { 202, "Accepted" }, - { 203, "Non-Authoritative Information" }, - { 204, "No Content" }, - { 205, "Reset Content" }, - { 206, "Partial Content" }, - { 300, "Multiple Choices" }, - { 301, "Moved Permanently" }, - { 302, "Found" }, - { 303, "See Other" }, - { 304, "Not Modified" }, - { 305, "Use Proxy" }, - { 307, "Temporary Redirect" }, - { 400, "Bad Request" }, - { 401, "Unauthorized" }, - { 402, "Payment Required" }, - { 403, "Forbidden" }, - { 404, "Not Found" }, - { 405, "Method Not Allowed" }, - { 406, "Not Acceptable" }, - { 407, "Proxy Authentication Required" }, - { 408, "Request Time-out" }, - { 409, "Conflict" }, - { 410, "Gone" }, - { 411, "Length Required" }, - { 412, "Precondition Failed" }, - { 413, "Request Entity Too Large" }, - { 414, "Request-URI Too Large" }, - { 415, "Unsupported Media Type" }, - { 416, "Requested range not satisfiable" }, - { 417, "Expectation Failed" }, - { 500, "Internal Server Error" }, - { 501, "Not Implemented" }, - { 502, "Bad Gateway" }, - { 503, "Service Unavailable" }, - { 504, "Gateway Time-out" }, - { 505, "HTTP Version not supported" }, - { 0, NULL } -}; -#endif -#endif - -#ifdef WITH_OPENSSL -static const struct soap_code_map h_ssl_error_codes[] = -{ -#define _SSL_ERROR(e) { e, #e } - _SSL_ERROR(SSL_ERROR_SSL), - _SSL_ERROR(SSL_ERROR_ZERO_RETURN), - _SSL_ERROR(SSL_ERROR_WANT_READ), - _SSL_ERROR(SSL_ERROR_WANT_WRITE), - _SSL_ERROR(SSL_ERROR_WANT_CONNECT), - _SSL_ERROR(SSL_ERROR_WANT_X509_LOOKUP), - _SSL_ERROR(SSL_ERROR_SYSCALL), - { 0, NULL } -}; -#endif - -#ifndef WITH_LEANER -static const struct soap_code_map mime_codes[] = -{ { SOAP_MIME_7BIT, "7bit" }, - { SOAP_MIME_8BIT, "8bit" }, - { SOAP_MIME_BINARY, "binary" }, - { SOAP_MIME_QUOTED_PRINTABLE, "quoted-printable" }, - { SOAP_MIME_BASE64, "base64" }, - { SOAP_MIME_IETF_TOKEN, "ietf-token" }, - { SOAP_MIME_X_TOKEN, "x-token" }, - { 0, NULL } -}; -#endif - -#ifdef WIN32 -static int tcp_done = 0; -#endif - -/******************************************************************************/ -#ifndef WITH_NOIO -#ifndef PALM_1 -static int -fsend(struct soap *soap, const char *s, size_t n) -{ register int nwritten, err; -#if defined(__cplusplus) && !defined(WITH_LEAN) - if (soap->os) - { soap->os->write(s, n); - if (soap->os->good()) - return SOAP_OK; - return SOAP_EOF; - } -#endif - while (n) - { if (soap_valid_socket(soap->socket)) - { -#ifndef WITH_LEAN - if (soap->send_timeout) - { struct timeval timeout; - fd_set fd; - if (soap->send_timeout > 0) - { timeout.tv_sec = soap->send_timeout; - timeout.tv_usec = 0; - } - else - { timeout.tv_sec = -soap->send_timeout/1000000; - timeout.tv_usec = -soap->send_timeout%1000000; - } -#ifndef WIN32 - if ((int)soap->socket >= (int)FD_SETSIZE) - return SOAP_FD_EXCEEDED; /* Hint: MUST increase FD_SETSIZE */ -#endif - FD_ZERO(&fd); - FD_SET((SOAP_SOCKET)soap->socket, &fd); - for (;;) - { register int r = select((SOAP_SOCKET)(soap->socket + 1), NULL, &fd, &fd, &timeout); - if (r > 0) - break; - if (!r) - { soap->errnum = 0; - return SOAP_EOF; - } - err = soap_socket_errno(soap->socket); - if (err != SOAP_EINTR && err != SOAP_EAGAIN) - { soap->errnum = err; - return SOAP_EOF; - } - } - } -#endif -#ifdef WITH_OPENSSL - if (soap->ssl) - nwritten = SSL_write(soap->ssl, s, n); - else if (soap->bio) - nwritten = BIO_write(soap->bio, s, n); - else -#endif -#ifdef WITH_UDP - if ((soap->omode & SOAP_IO_UDP)) - { if (soap->peerlen) - nwritten = sendto((SOAP_SOCKET)soap->socket, s, n, soap->socket_flags, (struct sockaddr*)&soap->peer, soap->peerlen); - else - nwritten = send((SOAP_SOCKET)soap->socket, s, n, soap->socket_flags); - /* retry and back-off algorithm */ - /* TODO: this is not very clear from specs so verify and limit conditions under which we should loop (e.g. ENOBUFS) */ - if (nwritten < 0) - { struct timeval timeout; - fd_set fd; - int udp_repeat; - int udp_delay; -#ifndef WIN32 - if ((int)soap->socket >= (int)FD_SETSIZE) - return SOAP_FD_EXCEEDED; /* Hint: MUST increase FD_SETSIZE */ -#endif - if ((soap->connect_flags & SO_BROADCAST)) - udp_repeat = 3; /* SOAP-over-UDP MULTICAST_UDP_REPEAT - 1 */ - else - udp_repeat = 1; /* SOAP-over-UDP UNICAST_UDP_REPEAT - 1 */ - udp_delay = (soap_random % 201) + 50; /* UDP_MIN_DELAY .. UDP_MAX_DELAY */ - do - { timeout.tv_sec = 0; - timeout.tv_usec = 1000 * udp_delay; /* ms */ - FD_ZERO(&fd); - FD_SET((SOAP_SOCKET)soap->socket, &fd); - select((SOAP_SOCKET)(soap->socket + 1), NULL, NULL, &fd, &timeout); - if (soap->peerlen) - nwritten = sendto((SOAP_SOCKET)soap->socket, s, n, soap->socket_flags, (struct sockaddr*)&soap->peer, soap->peerlen); - else - nwritten = send((SOAP_SOCKET)soap->socket, s, n, soap->socket_flags); - udp_delay <<= 1; - if (udp_delay > 500) /* UDP_UPPER_DELAY */ - udp_delay = 500; - } - while (nwritten < 0 && --udp_repeat > 0); - } - } - else -#endif -#if !defined(PALM) && !defined(AS400) - nwritten = send((SOAP_SOCKET)soap->socket, s, n, soap->socket_flags); -#else - nwritten = send((SOAP_SOCKET)soap->socket, (void*)s, n, soap->socket_flags); -#endif - if (nwritten <= 0) - { -#ifdef WITH_OPENSSL - int err; - if (soap->ssl && (err = SSL_get_error(soap->ssl, nwritten)) != SSL_ERROR_NONE && err != SSL_ERROR_WANT_READ && err != SSL_ERROR_WANT_WRITE) - return SOAP_EOF; -#endif - err = soap_socket_errno(soap->socket); - if (err && err != SOAP_EINTR && err != SOAP_EWOULDBLOCK && err != SOAP_EAGAIN) - { soap->errnum = err; - return SOAP_EOF; - } - nwritten = 0; /* and call write() again */ - } - } - else - { -#ifdef WITH_FASTCGI - nwritten = fwrite((void*)s, 1, n, stdout); - fflush(stdout); -#else -#ifdef UNDER_CE - nwritten = fwrite(s, 1, n, soap->sendfd); -#else -#ifdef VXWORKS -#ifdef WMW_RPM_IO - if (soap->rpmreqid) - nwritten = (httpBlockPut(soap->rpmreqid, s, n) == 0) ? n : -1; - else -#endif - nwritten = fwrite(s, sizeof(char), n, fdopen(soap->sendfd, "w")); -#else - nwritten = write((SOAP_SOCKET)soap->sendfd, s, n); -#endif -#endif -#endif - if (nwritten <= 0) - { err = soap_errno; - if (err && err != SOAP_EINTR && err != SOAP_EWOULDBLOCK && err != SOAP_EAGAIN) - { soap->errnum = err; - return SOAP_EOF; - } - nwritten = 0; /* and call write() again */ - } - } - n -= nwritten; - s += nwritten; - } - return SOAP_OK; -} -#endif -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_send_raw(struct soap *soap, const char *s, size_t n) -{ if (!n) - return SOAP_OK; - if (soap->mode & SOAP_IO_LENGTH) - { soap->count += n; -#ifndef WITH_LEANER - if (soap->fpreparesend && (soap->mode & SOAP_IO) != SOAP_IO_STORE) - return soap->error = soap->fpreparesend(soap, s, n); -#endif - return SOAP_OK; - } - if (soap->mode & SOAP_IO) - { register size_t i = SOAP_BUFLEN - soap->bufidx; - while (n >= i) - { memcpy(soap->buf + soap->bufidx, s, i); - soap->bufidx = SOAP_BUFLEN; - if (soap_flush(soap)) - return soap->error; - s += i; - n -= i; - i = SOAP_BUFLEN; - } - memcpy(soap->buf + soap->bufidx, s, n); - soap->bufidx += n; - return SOAP_OK; - } - return soap_flush_raw(soap, s, n); -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_flush(struct soap *soap) -{ register int n = soap->bufidx; - if (n) - { soap->bufidx = 0; -#ifdef WITH_ZLIB - if (soap->mode & SOAP_ENC_ZLIB) - { soap->d_stream.next_in = (Byte*)soap->buf; - soap->d_stream.avail_in = (unsigned int)n; -#ifdef WITH_GZIP - soap->z_crc = crc32(soap->z_crc, (Byte*)soap->buf, (unsigned int)n); -#endif - do - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Deflating %u bytes\n", soap->d_stream.avail_in)); - if (deflate(&soap->d_stream, Z_NO_FLUSH) != Z_OK) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Unable to deflate: %s\n", soap->d_stream.msg?soap->d_stream.msg:"")); - return soap->error = SOAP_ZLIB_ERROR; - } - if (!soap->d_stream.avail_out) - { if (soap_flush_raw(soap, soap->z_buf, SOAP_BUFLEN)) - return soap->error; - soap->d_stream.next_out = (Byte*)soap->z_buf; - soap->d_stream.avail_out = SOAP_BUFLEN; - } - } while (soap->d_stream.avail_in); - } - else -#endif - return soap_flush_raw(soap, soap->buf, n); - } - return SOAP_OK; -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_flush_raw(struct soap *soap, const char *s, size_t n) -{ if ((soap->mode & SOAP_IO) == SOAP_IO_STORE) - { register char *t; - if (!(t = (char*)soap_push_block(soap, n))) - return soap->error = SOAP_EOM; - memcpy(t, s, n); -#ifndef WITH_LEANER - if (soap->fpreparesend) - return soap->error = soap->fpreparesend(soap, s, n); -#endif - return SOAP_OK; - } -#ifndef WITH_LEANER - if ((soap->mode & SOAP_IO) == SOAP_IO_CHUNK) - { char t[16]; - sprintf(t, "\r\n%lX\r\n" + (soap->chunksize ? 0 : 2), (unsigned long)n); - DBGMSG(SENT, t, strlen(t)); - if ((soap->error = soap->fsend(soap, t, strlen(t)))) - return soap->error; - soap->chunksize += n; - } - DBGMSG(SENT, s, n); -#endif - return soap->error = soap->fsend(soap, s, n); -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_send(struct soap *soap, const char *s) -{ if (s) - return soap_send_raw(soap, s, strlen(s)); - return SOAP_OK; -} -#endif - -/******************************************************************************/ -#ifndef WITH_LEANER -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_send2(struct soap *soap, const char *s1, const char *s2) -{ if (soap_send(soap, s1)) - return soap->error; - return soap_send(soap, s2); -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_LEANER -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_send3(struct soap *soap, const char *s1, const char *s2, const char *s3) -{ if (soap_send(soap, s1) - || soap_send(soap, s2)) - return soap->error; - return soap_send(soap, s3); -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_NOIO -#ifndef PALM_1 -static size_t -frecv(struct soap *soap, char *s, size_t n) -{ register int r; -#ifdef PALM - register int timeouts = 0; -#endif - soap->errnum = 0; -#if defined(__cplusplus) && !defined(WITH_LEAN) - if (soap->is) - { if (soap->is->good()) - return soap->is->read(s, n).gcount(); - return 0; - } -#endif - if (soap_valid_socket(soap->socket)) - { for (;;) - { -#ifndef WITH_LEAN - if (soap->recv_timeout) - { struct timeval timeout; - fd_set fd; - if (soap->recv_timeout > 0) - { timeout.tv_sec = soap->recv_timeout; - timeout.tv_usec = 0; - } - else - { timeout.tv_sec = -soap->recv_timeout/1000000; - timeout.tv_usec = -soap->recv_timeout%1000000; - } -#ifndef WIN32 - if ((int)soap->socket >= (int)FD_SETSIZE) - { soap->error = SOAP_FD_EXCEEDED; - return 0; /* Hint: MUST increase FD_SETSIZE */ - } -#endif - FD_ZERO(&fd); - FD_SET((SOAP_SOCKET)soap->socket, &fd); - for (;;) - { r = select((SOAP_SOCKET)(soap->socket + 1), &fd, NULL, &fd, &timeout); - if (r > 0) - break; - if (!r) - { soap->errnum = 0; - return 0; - } - r = soap_socket_errno(soap->socket); - if (r != SOAP_EINTR && r != SOAP_EAGAIN) - { soap->errnum = r; - return 0; - } - } - } -#endif -#ifdef WITH_OPENSSL - if (soap->ssl) - { int err; - r = SSL_read(soap->ssl, s, n); - if (r > 0) - return (size_t)r; - err = SSL_get_error(soap->ssl, r); - if (err != SSL_ERROR_NONE && err != SSL_ERROR_WANT_READ && err != SSL_ERROR_WANT_WRITE) - return 0; - } - else if (soap->bio) - { r = BIO_read(soap->bio, s, n); - if (r > 0) - return (size_t)r; - return 0; - } - else -#endif - { -#ifdef WITH_UDP - if ((soap->omode & SOAP_IO_UDP)) - { SOAP_SOCKLEN_T k = (SOAP_SOCKLEN_T)sizeof(soap->peer); - memset((void*)&soap->peer, 0, sizeof(soap->peer)); - r = recvfrom((SOAP_SOCKET)soap->socket, s, n, soap->socket_flags, (struct sockaddr*)&soap->peer, &k); /* portability note: see SOAP_SOCKLEN_T definition in stdsoap2.h */ - soap->peerlen = (size_t)k; -#ifndef WITH_IPV6 - soap->ip = ntohl(soap->peer.sin_addr.s_addr); -#endif - } - else -#endif - r = recv((SOAP_SOCKET)soap->socket, s, n, soap->socket_flags); -#ifdef PALM - /* CycleSyncDisplay(curStatusMsg); */ -#endif - if (r >= 0) - return (size_t)r; - r = soap_socket_errno(soap->socket); - if (r != SOAP_EINTR && r != SOAP_EAGAIN && r != SOAP_EWOULDBLOCK) - { soap->errnum = r; - return 0; - } - } -#ifndef WITH_LEAN - { struct timeval timeout; - fd_set fd; - timeout.tv_sec = 0; - timeout.tv_usec = 10000; -#ifndef WIN32 - if ((int)soap->socket >= (int)FD_SETSIZE) - { soap->error = SOAP_FD_EXCEEDED; - return 0; /* Hint: MUST increase FD_SETSIZE */ - } -#endif - FD_ZERO(&fd); - FD_SET((SOAP_SOCKET)soap->socket, &fd); -#ifdef WITH_OPENSSL - if (soap->ssl && SSL_get_error(soap->ssl, r) == SSL_ERROR_WANT_WRITE) - r = select((SOAP_SOCKET)(soap->socket + 1), NULL, &fd, &fd, &timeout); - else - r = select((SOAP_SOCKET)(soap->socket + 1), &fd, NULL, &fd, &timeout); -#else - r = select((SOAP_SOCKET)(soap->socket + 1), &fd, NULL, &fd, &timeout); -#endif - if (r < 0 && (r = soap_socket_errno(soap->socket)) != SOAP_EINTR) - { soap->errnum = r; - return 0; - } - } -#endif -#ifdef PALM - if (r < 0 && (r = soap_socket_errno(soap->socket)) == SOAP_EINTR) - { timeouts++; - if (timeouts > 10) - { soap->errnum = r; - return 0; - } - } -#endif - } - } -#ifdef WITH_FASTCGI - return fread(s, 1, n, stdin); -#else -#ifdef UNDER_CE - return fread(s, 1, n, soap->recvfd); -#else -#ifdef WMW_RPM_IO - if (soap->rpmreqid) - r = httpBlockRead(soap->rpmreqid, s, n); - else -#endif - r = read((SOAP_SOCKET)soap->recvfd, s, n); - if (r >= 0) - return (size_t)r; - soap->errnum = soap_errno; - return 0; -#endif -#endif -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_LEAN -#ifndef WITH_NOIO -#ifndef PALM_1 -static size_t -frecv_stop(struct soap *soap, char *s, size_t n) -{ return 0; -} -#endif -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_NOHTTP -#ifndef PALM_1 -static soap_wchar -soap_getchunkchar(struct soap *soap) -{ if (soap->bufidx < soap->buflen) - return soap->buf[soap->bufidx++]; - soap->bufidx = 0; - soap->buflen = soap->chunkbuflen = soap->frecv(soap, soap->buf, SOAP_BUFLEN); - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Read %u bytes from socket %d\n", (unsigned int)soap->buflen, soap->socket)); - DBGMSG(RECV, soap->buf, soap->buflen); - if (soap->buflen) - return soap->buf[soap->bufidx++]; - return EOF; -} -#endif -#endif - -/******************************************************************************/ -#ifndef PALM_1 -static int -soap_isxdigit(int c) -{ return (c >= '0' && c <= '9') || (c >= 'A' && c <= 'F') || (c >= 'a' && c <= 'f'); -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_recv_raw(struct soap *soap) -{ register size_t ret; -#ifdef WITH_ZLIB - if (soap->mode & SOAP_ENC_ZLIB) - { if (soap->d_stream.next_out == Z_NULL) - return EOF; - if (soap->d_stream.avail_in || !soap->d_stream.avail_out) - { register int r; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Inflating\n")); - soap->d_stream.next_out = (Byte*)soap->buf; - soap->d_stream.avail_out = SOAP_BUFLEN; - r = inflate(&soap->d_stream, Z_NO_FLUSH); - if (r == Z_OK || r == Z_STREAM_END) - { soap->bufidx = 0; - ret = soap->buflen = SOAP_BUFLEN - soap->d_stream.avail_out; - if (soap->zlib_in == SOAP_ZLIB_GZIP) - soap->z_crc = crc32(soap->z_crc, (Byte*)soap->buf, (unsigned int)ret); - if (r == Z_STREAM_END) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Inflated %lu->%lu bytes\n", soap->d_stream.total_in, soap->d_stream.total_out)); - soap->z_ratio_in = (float)soap->d_stream.total_in / (float)soap->d_stream.total_out; - soap->d_stream.next_out = Z_NULL; - } - if (ret) - { soap->count += ret; - DBGLOG(RECV, SOAP_MESSAGE(fdebug, "\n---- decompressed ----\n")); - DBGMSG(RECV, soap->buf, ret); - return SOAP_OK; - } - } - else if (r != Z_BUF_ERROR) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Inflate error: %s\n", soap->d_stream.msg?soap->d_stream.msg:"")); - soap->d_stream.next_out = Z_NULL; - soap->error = SOAP_ZLIB_ERROR; - return EOF; - } - } -zlib_again: - if ((soap->mode & SOAP_IO) == SOAP_IO_CHUNK && !soap->chunksize) - { memcpy(soap->buf, soap->z_buf, SOAP_BUFLEN); - soap->buflen = soap->z_buflen; - } - DBGLOG(RECV, SOAP_MESSAGE(fdebug, "\n---- compressed ----\n")); - } -#endif -#ifndef WITH_NOHTTP - if ((soap->mode & SOAP_IO) == SOAP_IO_CHUNK) /* read HTTP chunked transfer */ - { -chunk_again: - if (soap->chunksize) - { soap->buflen = ret = soap->frecv(soap, soap->buf, soap->chunksize > SOAP_BUFLEN ? SOAP_BUFLEN : soap->chunksize); - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Getting chunk: read %u bytes\n", (unsigned int)ret)); - DBGMSG(RECV, soap->buf, ret); - soap->bufidx = 0; - soap->chunksize -= ret; - } - else - { register soap_wchar c; - char *t, tmp[8]; - t = tmp; - if (!soap->chunkbuflen) - { soap->chunkbuflen = ret = soap->frecv(soap, soap->buf, SOAP_BUFLEN); - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Read %u bytes (chunked) from socket %d\n", (unsigned int)ret, soap->socket)); - DBGMSG(RECV, soap->buf, ret); - soap->bufidx = 0; - if (!ret) - return soap->ahead = EOF; - } - else - soap->bufidx = soap->buflen; - soap->buflen = soap->chunkbuflen; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Getting chunk size (idx=%u len=%u)\n", (unsigned int)soap->bufidx, (unsigned int)soap->buflen)); - while (!soap_isxdigit((int)(c = soap_getchunkchar(soap)))) - { if ((int)c == EOF) - return soap->ahead = EOF; - } - do - *t++ = (char)c; - while (soap_isxdigit((int)(c = soap_getchunkchar(soap))) && t - tmp < 7); - while ((int)c != EOF && c != '\n') - c = soap_getchunkchar(soap); - if ((int)c == EOF) - return soap->ahead = EOF; - *t = '\0'; - soap->chunksize = soap_strtoul(tmp, &t, 16); - if (!soap->chunksize) - { soap->chunkbuflen = 0; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "End of chunked message\n")); - while ((int)c != EOF && c != '\n') - c = soap_getchunkchar(soap); - return soap->ahead = EOF; - } - soap->buflen = soap->bufidx + soap->chunksize; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Moving buf len to idx=%u len=%u (%s)\n", (unsigned int)soap->bufidx, (unsigned int)soap->buflen, tmp)); - if (soap->buflen > soap->chunkbuflen) - { soap->buflen = soap->chunkbuflen; - soap->chunksize -= soap->buflen - soap->bufidx; - soap->chunkbuflen = 0; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Passed end of buffer for chunked HTTP (%u bytes left)\n", (unsigned int)(soap->buflen - soap->bufidx))); - } - else if (soap->chunkbuflen) - soap->chunksize = 0; - ret = soap->buflen - soap->bufidx; - if (!ret) - goto chunk_again; - } - } - else -#endif - { soap->bufidx = 0; - soap->buflen = ret = soap->frecv(soap, soap->buf, SOAP_BUFLEN); - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Read %u bytes from socket %d\n", (unsigned int)ret, soap->socket)); - DBGMSG(RECV, soap->buf, ret); - } -#ifndef WITH_LEANER - if (soap->fpreparerecv && (soap->error = soap->fpreparerecv(soap, soap->buf, ret))) - return soap->error; -#endif -#ifdef WITH_ZLIB - if (soap->mode & SOAP_ENC_ZLIB) - { register int r; - memcpy(soap->z_buf, soap->buf, SOAP_BUFLEN); - soap->d_stream.next_in = (Byte*)(soap->z_buf + soap->bufidx); - soap->d_stream.avail_in = (unsigned int)ret; - soap->d_stream.next_out = (Byte*)soap->buf; - soap->d_stream.avail_out = SOAP_BUFLEN; - r = inflate(&soap->d_stream, Z_NO_FLUSH); - if (r == Z_OK || r == Z_STREAM_END) - { soap->bufidx = 0; - soap->z_buflen = soap->buflen; - soap->buflen = ret = SOAP_BUFLEN - soap->d_stream.avail_out; - if (soap->zlib_in == SOAP_ZLIB_GZIP) - soap->z_crc = crc32(soap->z_crc, (Byte*)soap->buf, (unsigned int)soap->buflen); - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Inflated %u bytes\n", (unsigned int)ret)); - if (!ret) - goto zlib_again; - if (r == Z_STREAM_END) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Inflated %lu->%lu bytes\n", soap->d_stream.total_in, soap->d_stream.total_out)); - soap->z_ratio_in = (float)soap->d_stream.total_in / (float)soap->d_stream.total_out; - soap->d_stream.next_out = Z_NULL; - } - DBGLOG(RECV, SOAP_MESSAGE(fdebug, "\n---- decompressed ----\n")); - DBGMSG(RECV, soap->buf, ret); - } - else - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Unable to inflate: (%d) %s\n", r, soap->d_stream.msg?soap->d_stream.msg:"")); - soap->d_stream.next_out = Z_NULL; - soap->error = SOAP_ZLIB_ERROR; - return EOF; - } - } -#endif - soap->count += ret; - return !ret; -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_recv(struct soap *soap) -{ -#ifndef WITH_LEANER - if (soap->mode & SOAP_ENC_DIME) - { if (soap->dime.buflen) - { char *s; - int i; - unsigned char tmp[12]; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "DIME hdr for chunked DIME is in buffer\n")); - soap->count += soap->dime.buflen - soap->buflen; - soap->buflen = soap->dime.buflen; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Skip padding (%ld bytes)\n", -(long)soap->dime.size&3)); - for (i = -(long)soap->dime.size&3; i > 0; i--) - { soap->bufidx++; - if (soap->bufidx >= soap->buflen) - if (soap_recv_raw(soap)) - return EOF; - } - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Get DIME hdr for next chunk\n")); - s = (char*)tmp; - for (i = 12; i > 0; i--) - { *s++ = soap->buf[soap->bufidx++]; - if (soap->bufidx >= soap->buflen) - if (soap_recv_raw(soap)) - return EOF; - } - soap->dime.flags = tmp[0] & 0x7; - soap->dime.size = ((size_t)tmp[8] << 24) | ((size_t)tmp[9] << 16) | ((size_t)tmp[10] << 8) | ((size_t)tmp[11]); - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Get DIME chunk (%u bytes)\n", (unsigned int)soap->dime.size)); - if (soap->dime.flags & SOAP_DIME_CF) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "More chunking\n")); - soap->dime.chunksize = soap->dime.size; - if (soap->buflen - soap->bufidx >= soap->dime.size) - { soap->dime.buflen = soap->buflen; - soap->buflen = soap->bufidx + soap->dime.chunksize; - } - else - soap->dime.chunksize -= soap->buflen - soap->bufidx; - } - else - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Last chunk\n")); - soap->dime.buflen = 0; - soap->dime.chunksize = 0; - } - soap->count = soap->buflen - soap->bufidx; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "%u bytes remaining\n", (unsigned int)soap->count)); - return SOAP_OK; - } - if (soap->dime.chunksize) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Get next DIME hdr for chunked DIME (%u bytes chunk)\n", (unsigned int)soap->dime.chunksize)); - if (soap_recv_raw(soap)) - return EOF; - if (soap->buflen - soap->bufidx >= soap->dime.chunksize) - { soap->dime.buflen = soap->buflen; - soap->count -= soap->buflen - soap->bufidx - soap->dime.chunksize; - soap->buflen = soap->bufidx + soap->dime.chunksize; - } - else - soap->dime.chunksize -= soap->buflen - soap->bufidx; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "%lu bytes remaining, count=%u\n", (unsigned long)(soap->buflen-soap->bufidx), (unsigned int)soap->count)); - return SOAP_OK; - } - } -#endif - return soap_recv_raw(soap); -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -soap_wchar -SOAP_FMAC2 -soap_getchar(struct soap *soap) -{ register soap_wchar c; - c = soap->ahead; - if (c) - { if (c != EOF) - soap->ahead = 0; - return c; - } - return soap_get1(soap); -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -const struct soap_code_map* -SOAP_FMAC2 -soap_code(const struct soap_code_map *code_map, const char *str) -{ if (code_map && str) - { while (code_map->string) - { if (!strcmp(str, code_map->string)) /* case sensitive */ - return code_map; - code_map++; - } - } - return NULL; -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -long -SOAP_FMAC2 -soap_code_int(const struct soap_code_map *code_map, const char *str, long other) -{ if (code_map) - { while (code_map->string) - { if (!soap_tag_cmp(str, code_map->string)) /* case insensitive */ - return code_map->code; - code_map++; - } - } - return other; -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -const char* -SOAP_FMAC2 -soap_code_str(const struct soap_code_map *code_map, long code) -{ if (!code_map) - return NULL; - while (code_map->code != code && code_map->string) - code_map++; - return code_map->string; -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -long -SOAP_FMAC2 -soap_code_bits(const struct soap_code_map *code_map, const char *str) -{ register long bits = 0; - if (code_map) - { while (str && *str) - { const struct soap_code_map *p; - for (p = code_map; p->string; p++) - { register size_t n = strlen(p->string); - if (!strncmp(p->string, str, n) && soap_blank(str[n])) - { bits |= p->code; - str += n; - while (*str > 0 && *str <= 32) - str++; - break; - } - } - if (!p->string) - return 0; - } - } - return bits; -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -const char* -SOAP_FMAC2 -soap_code_list(struct soap *soap, const struct soap_code_map *code_map, long code) -{ register char *t = soap->tmpbuf; - if (code_map) - { while (code_map->string) - { if (code_map->code & code) - { register const char *s = code_map->string; - if (t != soap->tmpbuf) - *t++ = ' '; - while (*s && t < soap->tmpbuf + sizeof(soap->tmpbuf) - 1) - *t++ = *s++; - if (t == soap->tmpbuf + sizeof(soap->tmpbuf) - 1) - break; - } - code_map++; - } - } - *t = '\0'; - return soap->tmpbuf; -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -static soap_wchar -soap_char(struct soap *soap) -{ char tmp[8]; - register int i; - register soap_wchar c; - register char *s = tmp; - for (i = 0; i < 7; i++) - { c = soap_get1(soap); - if (c == ';' || (int)c == EOF) - break; - *s++ = (char)c; - } - *s = '\0'; - if (*tmp == '#') - { if (tmp[1] == 'x' || tmp[1] == 'X') - return soap_strtol(tmp + 2, NULL, 16); - return atol(tmp + 1); - } - if (!strcmp(tmp, "lt")) - return '<'; - if (!strcmp(tmp, "gt")) - return '>'; - if (!strcmp(tmp, "amp")) - return '&'; - if (!strcmp(tmp, "quot")) - return '"'; - if (!strcmp(tmp, "apos")) - return '\''; -#ifndef WITH_LEAN - return (soap_wchar)soap_code_int(html_entity_codes, tmp, SOAP_UNKNOWN_CHAR); -#else - return SOAP_UNKNOWN_CHAR; /* use this to represent unknown code */ -#endif -} -#endif - -/******************************************************************************/ -#ifdef WITH_LEAN -#ifndef PALM_1 -soap_wchar -soap_get0(struct soap *soap) -{ if (soap->bufidx >= soap->buflen && soap_recv(soap)) - return EOF; - return (unsigned char)soap->buf[soap->bufidx]; -} -#endif -#endif - -/******************************************************************************/ -#ifdef WITH_LEAN -#ifndef PALM_1 -soap_wchar -soap_get1(struct soap *soap) -{ if (soap->bufidx >= soap->buflen && soap_recv(soap)) - return EOF; - return (unsigned char)soap->buf[soap->bufidx++]; -} -#endif -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -soap_wchar -SOAP_FMAC2 -soap_get(struct soap *soap) -{ register soap_wchar c; - c = soap->ahead; - if (c) - { if ((int)c != EOF) - soap->ahead = 0; - } - else - c = soap_get1(soap); - while ((int)c != EOF) - { if (soap->cdata) - { if (c == ']') - { c = soap_get1(soap); - if (c == ']') - { c = soap_get0(soap); - if (c == '>') - { soap->cdata = 0; - soap_get1(soap); - c = soap_get1(soap); - } - else - { soap_unget(soap, ']'); - return ']'; - } - } - else - { soap_revget1(soap); - return ']'; - } - } - else - return c; - } - switch (c) - { case '<': - do c = soap_get1(soap); - while (soap_blank(c)); - if (c == '!' || c == '?' || c == '%') - { register int k = 1; - if (c == '!') - { c = soap_get1(soap); - if (c == '[') - { do c = soap_get1(soap); - while ((int)c != EOF && c != '['); - if ((int)c == EOF) - break; - soap->cdata = 1; - c = soap_get1(soap); - continue; - } - if (c == '-' && (c = soap_get1(soap)) == '-') - { do - { c = soap_get1(soap); - if (c == '-' && (c = soap_get1(soap)) == '-') - break; - } while ((int)c != EOF); - } - } - else if (c == '?') - c = soap_get_pi(soap); - while ((int)c != EOF) - { if (c == '<') - k++; - else if (c == '>') - { if (--k <= 0) - break; - } - c = soap_get1(soap); - } - if ((int)c == EOF) - break; - c = soap_get1(soap); - continue; - } - if (c == '/') - return SOAP_TT; - soap_revget1(soap); - return SOAP_LT; - case '>': - return SOAP_GT; - case '"': - return SOAP_QT; - case '\'': - return SOAP_AP; - case '&': - return soap_char(soap) | 0x80000000; - } - break; - } - return c; -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -static soap_wchar -soap_get_pi(struct soap *soap) -{ char buf[64]; - register char *s = buf; - register int i = sizeof(buf); - register soap_wchar c = soap_getchar(soap); - /* This is a quick way to parse XML PI and we could use a callback instead to - * enable applications to intercept processing instructions */ - while ((int)c != EOF && c != '?') - { if (--i > 0) - { if (soap_blank(c)) - c = ' '; - *s++ = (char)c; - } - c = soap_getchar(soap); - } - *s = '\0'; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "XML PI \n", buf)); - if (!strncmp(buf, "xml ", 4)) - { s = strstr(buf, " encoding="); - if (s && s[10]) - { if (!soap_tag_cmp(s + 11, "iso-8859-1*") - || !soap_tag_cmp(s + 11, "latin1*")) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Switching to latin1 encoding\n")); - soap->mode |= SOAP_ENC_LATIN; - } - else if (!soap_tag_cmp(s + 11, "utf-8*")) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Switching to utf-8 encoding\n")); - soap->mode &= ~SOAP_ENC_LATIN; - } - } - } - if ((int)c != EOF) - c = soap_getchar(soap); - return c; -} -#endif - -/******************************************************************************/ -#ifndef WITH_LEANER -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_move(struct soap *soap, long n) -{ DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Moving %ld bytes forward\n", (long)n)); - for (; n > 0; n--) - if ((int)soap_getchar(soap) == EOF) - return SOAP_EOF; - return SOAP_OK; -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_LEANER -#ifndef PALM_1 -SOAP_FMAC1 -size_t -SOAP_FMAC2 -soap_tell(struct soap *soap) -{ return soap->count - soap->buflen + soap->bufidx - (soap->ahead != 0); -} -#endif -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_pututf8(struct soap *soap, register unsigned long c) -{ char tmp[16]; - if (c < 0x80 && c >= 0x20) - { *tmp = (char)c; - return soap_send_raw(soap, tmp, 1); - } -#ifndef WITH_LEAN - if (c >= 0x80 && (soap->mode & SOAP_XML_CANONICAL)) - { register char *t = tmp; - if (c < 0x0800) - *t++ = (char)(0xC0 | ((c >> 6) & 0x1F)); - else - { if (c < 0x010000) - *t++ = (char)(0xE0 | ((c >> 12) & 0x0F)); - else - { if (c < 0x200000) - *t++ = (char)(0xF0 | ((c >> 18) & 0x07)); - else - { if (c < 0x04000000) - *t++ = (char)(0xF8 | ((c >> 24) & 0x03)); - else - { *t++ = (char)(0xFC | ((c >> 30) & 0x01)); - *t++ = (char)(0x80 | ((c >> 24) & 0x3F)); - } - *t++ = (char)(0x80 | ((c >> 18) & 0x3F)); - } - *t++ = (char)(0x80 | ((c >> 12) & 0x3F)); - } - *t++ = (char)(0x80 | ((c >> 6) & 0x3F)); - } - *t++ = (char)(0x80 | (c & 0x3F)); - *t = '\0'; - } - else -#endif - sprintf(tmp, "&#%lu;", c); - return soap_send(soap, tmp); -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -soap_wchar -SOAP_FMAC2 -soap_getutf8(struct soap *soap) -{ register soap_wchar c, c1, c2, c3, c4; - c = soap->ahead; - if (c > 0xFF) - { soap->ahead = 0; - return c; - } -again: - c = soap_get(soap); - if (c < 0x80 || (soap->mode & SOAP_ENC_LATIN)) - return c; - c1 = soap_get1(soap); - if (c1 < 0x80) - { soap_revget1(soap); /* doesn't look like this is UTF8 */ - return c; - } - c1 &= 0x3F; - if (c < 0xE0) - return ((soap_wchar)(c & 0x1F) << 6) | c1; - c2 = (soap_wchar)soap_get1(soap) & 0x3F; - if (c == 0xEF && c1 == 0x3B && c2 == 0x3F) /* ignore UTF-8 BOM */ - goto again; - if (c < 0xF0) - return ((soap_wchar)(c & 0x0F) << 12) | (c1 << 6) | c2; - c3 = (soap_wchar)soap_get1(soap) & 0x3F; - if (c < 0xF8) - return ((soap_wchar)(c & 0x07) << 18) | (c1 << 12) | (c2 << 6) | c3; - c4 = (soap_wchar)soap_get1(soap) & 0x3F; - if (c < 0xFC) - return ((soap_wchar)(c & 0x03) << 24) | (c1 << 18) | (c2 << 12) | (c3 << 6) | c4; - return ((soap_wchar)(c & 0x01) << 30) | (c1 << 24) | (c2 << 18) | (c3 << 12) | (c4 << 6) | (soap_wchar)(soap_get1(soap) & 0x3F); -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_puthex(struct soap *soap, const unsigned char *s, int n) -{ char d[2]; - register int i; -#ifdef WITH_DOM - if ((soap->mode & SOAP_XML_DOM) && soap->dom) - { if (!(soap->dom->data = soap_s2hex(soap, s, NULL, n))) - return soap->error; - return SOAP_OK; - } -#endif - for (i = 0; i < n; i++) - { register int m = *s++; - d[0] = (char)((m >> 4) + (m > 159 ? '7' : '0')); - m &= 0x0F; - d[1] = (char)(m + (m > 9 ? '7' : '0')); - if (soap_send_raw(soap, d, 2)) - return soap->error; - } - return SOAP_OK; -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -unsigned char* -SOAP_FMAC2 -soap_gethex(struct soap *soap, int *n) -{ -#ifdef WITH_DOM - if ((soap->mode & SOAP_XML_DOM) && soap->dom) - { soap->dom->data = soap_string_in(soap, 0, -1, -1); - return (unsigned char*)soap_hex2s(soap, soap->dom->data, NULL, 0, n); - } -#endif -#ifdef WITH_FAST - soap->labidx = 0; - for (;;) - { register char *s; - register int i, k; - if (soap_append_lab(soap, NULL, 0)) - return NULL; - s = soap->labbuf + soap->labidx; - k = soap->lablen - soap->labidx; - soap->labidx = soap->lablen; - for (i = 0; i < k; i++) - { register char d1, d2; - register soap_wchar c; - c = soap_get(soap); - if (soap_isxdigit(c)) - { d1 = (char)c; - c = soap_get(soap); - if (soap_isxdigit(c)) - d2 = (char)c; - else - { soap->error = SOAP_TYPE; - return NULL; - } - } - else - { unsigned char *p; - soap_unget(soap, c); - if (n) - *n = (int)(soap->lablen - k + i); - p = (unsigned char*)soap_malloc(soap, soap->lablen - k + i); - if (p) - memcpy(p, soap->labbuf, soap->lablen - k + i); - return p; - } - *s++ = ((d1 >= 'A' ? (d1 & 0x7) + 9 : d1 - '0') << 4) + (d2 >= 'A' ? (d2 & 0x7) + 9 : d2 - '0'); - } - } -#else - if (soap_new_block(soap)) - return NULL; - for (;;) - { register int i; - register char *s = (char*)soap_push_block(soap, SOAP_BLKLEN); - if (!s) - { soap_end_block(soap); - return NULL; - } - for (i = 0; i < SOAP_BLKLEN; i++) - { register char d1, d2; - register soap_wchar c = soap_get(soap); - if (soap_isxdigit(c)) - { d1 = (char)c; - c = soap_get(soap); - if (soap_isxdigit(c)) - d2 = (char)c; - else - { soap_end_block(soap); - soap->error = SOAP_TYPE; - return NULL; - } - } - else - { unsigned char *p; - soap_unget(soap, c); - if (n) - *n = soap_size_block(soap, i); - p = (unsigned char*)soap_save_block(soap, NULL, 0); - return p; - } - *s++ = ((d1 >= 'A' ? (d1 & 0x7) + 9 : d1 - '0') << 4) + (d2 >= 'A' ? (d2 & 0x7) + 9 : d2 - '0'); - } - } -#endif -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_putbase64(struct soap *soap, const unsigned char *s, int n) -{ register int i; - register unsigned long m; - char d[4]; - if (!s) - return SOAP_OK; -#ifdef WITH_DOM - if ((soap->mode & SOAP_XML_DOM) && soap->dom) - { if (!(soap->dom->data = soap_s2base64(soap, s, NULL, n))) - return soap->error; - return SOAP_OK; - } -#endif - for (; n > 2; n -= 3, s += 3) - { m = s[0]; - m = (m << 8) | s[1]; - m = (m << 8) | s[2]; - for (i = 4; i > 0; m >>= 6) - d[--i] = soap_base64o[m & 0x3F]; - if (soap_send_raw(soap, d, 4)) - return soap->error; - } - if (n > 0) - { m = 0; - for (i = 0; i < n; i++) - m = (m << 8) | *s++; - for (; i < 3; i++) - m <<= 8; - for (i++; i > 0; m >>= 6) - d[--i] = soap_base64o[m & 0x3F]; - for (i = 3; i > n; i--) - d[i] = '='; - if (soap_send_raw(soap, d, 4)) - return soap->error; - } - return SOAP_OK; -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -unsigned char* -SOAP_FMAC2 -soap_getbase64(struct soap *soap, int *n, int malloc_flag) -{ -#ifdef WITH_DOM - if ((soap->mode & SOAP_XML_DOM) && soap->dom) - { soap->dom->data = soap_string_in(soap, 0, -1, -1); - return (unsigned char*)soap_base642s(soap, soap->dom->data, NULL, 0, n); - } -#endif -#ifdef WITH_FAST - soap->labidx = 0; - for (;;) - { register int i, k; - register char *s; - if (soap_append_lab(soap, NULL, 2)) - return NULL; - s = soap->labbuf + soap->labidx; - k = soap->lablen - soap->labidx; - soap->labidx = 3 * (soap->lablen / 3); - if (!s) - return NULL; - for (i = 0; i < k - 2; i += 3) - { register unsigned long m = 0; - register int j = 0; - do - { register soap_wchar c = soap_get(soap); - if (c == '=' || c < 0) - { unsigned char *p; - switch (j) - { case 2: - *s++ = (char)((m >> 4) & 0xFF); - i++; - break; - case 3: - *s++ = (char)((m >> 10) & 0xFF); - *s++ = (char)((m >> 2) & 0xFF); - i += 2; - } - if (n) - *n = (int)(soap->lablen - k + i); - p = (unsigned char*)soap_malloc(soap, soap->lablen - k + i); - if (p) - memcpy(p, soap->labbuf, soap->lablen - k + i); - if (c >= 0) - { while ((int)((c = soap_get(soap)) != EOF) && c != SOAP_LT && c != SOAP_TT) - ; - } - soap_unget(soap, c); - return p; - } - c -= '+'; - if (c >= 0 && c <= 79) - { int b = soap_base64i[c]; - if (b >= 64) - { soap->error = SOAP_TYPE; - return NULL; - } - m = (m << 6) + b; - j++; - } - else if (!soap_blank(c)) - { soap->error = SOAP_TYPE; - return NULL; - } - } while (j < 4); - *s++ = (char)((m >> 16) & 0xFF); - *s++ = (char)((m >> 8) & 0xFF); - *s++ = (char)(m & 0xFF); - } - } -#else - if (soap_new_block(soap)) - return NULL; - for (;;) - { register int i; - register char *s = (char*)soap_push_block(soap, 3 * SOAP_BLKLEN); /* must be multiple of 3 */ - if (!s) - { soap_end_block(soap); - return NULL; - } - for (i = 0; i < SOAP_BLKLEN; i++) - { register unsigned long m = 0; - register int j = 0; - do - { register soap_wchar c = soap_get(soap); - if (c == '=' || c < 0) - { unsigned char *p; - i *= 3; - switch (j) - { case 2: - *s++ = (char)((m >> 4) & 0xFF); - i++; - break; - case 3: - *s++ = (char)((m >> 10) & 0xFF); - *s++ = (char)((m >> 2) & 0xFF); - i += 2; - } - if (n) - *n = (int)soap_size_block(soap, i); - p = (unsigned char*)soap_save_block(soap, NULL, 0); - if (c >= 0) - { while ((int)((c = soap_get(soap)) != EOF) && c != SOAP_LT && c != SOAP_TT) - ; - } - soap_unget(soap, c); - return p; - } - c -= '+'; - if (c >= 0 && c <= 79) - { int b = soap_base64i[c]; - if (b >= 64) - { soap->error = SOAP_TYPE; - return NULL; - } - m = (m << 6) + b; - j++; - } - else if (!soap_blank(c)) - { soap->error = SOAP_TYPE; - return NULL; - } - } while (j < 4); - *s++ = (char)((m >> 16) & 0xFF); - *s++ = (char)((m >> 8) & 0xFF); - *s++ = (char)(m & 0xFF); - } - } -#endif -} -#endif - -/******************************************************************************/ -#ifndef WITH_LEANER -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_xop_forward(struct soap *soap, unsigned char **ptr, int *size, char **id, char **type, char **options) -{ /* Check MTOM xop:Include element (within hex/base64Binary) */ - /* TODO: this code to be obsoleted with new import/xop.h conventions */ - int body = soap->body; /* should save type too? */ - if (!soap_peek_element(soap)) - { if (!soap_element_begin_in(soap, "xop:Include", 0, NULL) && *soap->href) - { if (soap_dime_forward(soap, ptr, size, id, type, options)) - return soap->error; - } - if (soap->body && soap_element_end_in(soap, NULL)) - return soap->error; - } - soap->body = body; - return SOAP_OK; -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_LEANER -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_dime_forward(struct soap *soap, unsigned char **ptr, int *size, char **id, char **type, char **options) -{ struct soap_xlist *xp = (struct soap_xlist*)SOAP_MALLOC(soap, sizeof(struct soap_xlist)); - *ptr = NULL; - *size = 0; - *id = soap_strdup(soap, soap->href); - *type = NULL; - *options = NULL; - if (!xp) - return soap->error = SOAP_EOM; - xp->next = soap->xlist; - xp->ptr = ptr; - xp->size = size; - xp->id = *id; - xp->type = type; - xp->options = options; - soap->xlist = xp; - return SOAP_OK; -} -#endif -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -char * -SOAP_FMAC2 -soap_strdup(struct soap *soap, const char *s) -{ char *t = NULL; - if (s && (t = (char*)soap_malloc(soap, strlen(s) + 1))) - strcpy(t, s); - return t; -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_new_block(struct soap *soap) -{ struct soap_blist *p; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "New block sequence (prev=%p)\n", soap->blist)); - if (!(p = (struct soap_blist*)SOAP_MALLOC(soap, sizeof(struct soap_blist)))) - return SOAP_EOM; - p->next = soap->blist; - p->ptr = NULL; - p->size = 0; - soap->blist = p; - return SOAP_OK; -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -void* -SOAP_FMAC2 -soap_push_block(struct soap *soap, size_t n) -{ char *p; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Push block of %u bytes (%u bytes total)\n", (unsigned int)n, (unsigned int)soap->blist->size + (unsigned int)n)); - if (!(p = (char*)SOAP_MALLOC(soap, n + sizeof(char*) + sizeof(size_t)))) - { soap->error = SOAP_EOM; - return NULL; - } - *(char**)p = soap->blist->ptr; - *(size_t*)(p + sizeof(char*)) = n; - soap->blist->ptr = p; - soap->blist->size += n; - return p + sizeof(char*) + sizeof(size_t); -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_pop_block(struct soap *soap) -{ char *p; - if (!soap->blist->ptr) - return; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Pop block\n")); - p = soap->blist->ptr; - soap->blist->size -= *(size_t*)(p + sizeof(char*)); - soap->blist->ptr = *(char**)p; - SOAP_FREE(soap, p); -} -#endif - -/******************************************************************************/ -#ifndef WITH_NOIDREF -#ifndef PALM_1 -static void -soap_update_ptrs(struct soap *soap, char *start, char *end, char *p1, char *p2) -{ int i; - register struct soap_ilist *ip; - register struct soap_flist *fp; -#ifndef WITH_LEANER - register struct soap_xlist *xp; -#endif - register void *p, **q; - for (i = 0; i < SOAP_IDHASH; i++) - { for (ip = soap->iht[i]; ip; ip = ip->next) - { if (ip->ptr && (char*)ip->ptr >= start && (char*)ip->ptr < end) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Update id='%s' %p -> %p\n", ip->id, ip->ptr, (char*)ip->ptr + (p1-p2))); - ip->ptr = (char*)ip->ptr + (p1-p2); - } - for (q = &ip->link; q; q = (void**)p) - { p = *q; - if (p && (char*)p >= start && (char*)p < end) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Link update id='%s' %p\n", ip->id, p)); - *q = (char*)p + (p1-p2); - } - } - for (q = &ip->copy; q; q = (void**)p) - { p = *q; - if (p && (char*)p >= start && (char*)p < end) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copy chain update id='%s' %p\n", ip->id, p)); - *q = (char*)p + (p1-p2); - } - } - for (fp = ip->flist; fp; fp = fp->next) - { if ((char*)fp->ptr >= start && (char*)fp->ptr < end) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copy list update id='%s' %p\n", ip->id, fp)); - fp->ptr = (char*)fp->ptr + (p1-p2); - } - } - } - } -#ifndef WITH_LEANER - for (xp = soap->xlist; xp; xp = xp->next) - { if (xp->ptr && (char*)xp->ptr >= start && (char*)xp->ptr < end) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Update id='%s' %p -> %p\n", xp->id?xp->id:"", xp->ptr, (char*)xp->ptr + (p1-p2))); - xp->ptr = (unsigned char**)((char*)xp->ptr + (p1-p2)); - xp->size = (int*)((char*)xp->size + (p1-p2)); - xp->type = (char**)((char*)xp->type + (p1-p2)); - xp->options = (char**)((char*)xp->options + (p1-p2)); - } - } -#endif -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_NOIDREF -#ifndef PALM_1 -static int -soap_has_copies(struct soap *soap, register const char *start, register const char *end) -{ register int i; - register struct soap_ilist *ip; - register struct soap_flist *fp; - register const char *p; - for (i = 0; i < SOAP_IDHASH; i++) - { for (ip = soap->iht[i]; ip; ip = ip->next) - { for (p = (const char*)ip->copy; p; p = *(const char**)p) - if (p >= start && p < end) - return SOAP_ERR; - for (fp = ip->flist; fp; fp = fp->next) - if ((const char*)fp->ptr >= start && (const char*)fp->ptr < end) - return SOAP_ERR; - } - } - return SOAP_OK; -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_NOIDREF -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_resolve(struct soap *soap) -{ register int i; - register struct soap_ilist *ip; - register struct soap_flist *fp; - short flag; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Resolving forwarded data\n")); - for (i = 0; i < SOAP_IDHASH; i++) - { for (ip = soap->iht[i]; ip; ip = ip->next) - { if (ip->ptr) - { register void *p, **q, *r; - q = (void**)ip->link; - ip->link = NULL; - r = ip->ptr; - DBGLOG(TEST, if (q) SOAP_MESSAGE(fdebug, "Traversing link chain to resolve id='%s'\n", ip->id)); - while (q) - { p = *q; - *q = r; - DBGLOG(TEST,SOAP_MESSAGE(fdebug, "... link %p -> %p\n", q, r)); - q = (void**)p; - } - } - else if (*ip->id == '#') - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Missing data for id='%s'\n", ip->id)); - strcpy(soap->id, ip->id + 1); - return soap->error = SOAP_MISSING_ID; - } - } - } - do - { flag = 0; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Resolution phase\n")); - for (i = 0; i < SOAP_IDHASH; i++) - { for (ip = soap->iht[i]; ip; ip = ip->next) - { if (ip->ptr && !soap_has_copies(soap, (const char*)ip->ptr, (const char*)ip->ptr + ip->size)) - { if (ip->copy) - { register void *p, **q = (void**)ip->copy; - DBGLOG(TEST, if (q) SOAP_MESSAGE(fdebug, "Traversing copy chain to resolve id='%s'\n", ip->id)); - ip->copy = NULL; - do - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "... copy %p -> %p (%u bytes)\n", ip->ptr, q, (unsigned int)ip->size)); - p = *q; - memcpy(q, ip->ptr, ip->size); - q = (void**)p; - } while (q); - flag = 1; - } - for (fp = ip->flist; fp; fp = ip->flist) - { register unsigned int k = fp->level; - register void *p = ip->ptr; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Resolving forwarded data type=%d location=%p level=%u,%u id='%s'\n", ip->type, p, ip->level, fp->level, ip->id)); - while (ip->level < k) - { register void **q = (void**)soap_malloc(soap, sizeof(void*)); - if (!q) - return soap->error; - *q = p; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Descending one level, new location=%p holds=%p...\n", q, *q)); - p = (void*)q; - k--; - } - if (fp->fcopy) - fp->fcopy(soap, ip->type, fp->type, fp->ptr, fp->len, p, ip->size); - else - soap_fcopy(soap, ip->type, fp->type, fp->ptr, fp->len, p, ip->size); - ip->flist = fp->next; - SOAP_FREE(soap, fp); - flag = 1; - } - } - } - } - } while (flag); -#ifdef SOAP_DEBUG - for (i = 0; i < SOAP_IDHASH; i++) - { for (ip = soap->iht[i]; ip; ip = ip->next) - { if (ip->copy || ip->flist) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Resolution error: forwarded data for id='%s' could not be propagated, please report this problem to the developers\n", ip->id)); - } - } - } -#endif - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Resolution done\n")); - return SOAP_OK; -} -#endif -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -size_t -SOAP_FMAC2 -soap_size_block(struct soap *soap, size_t n) -{ if (soap->blist->ptr) - { soap->blist->size -= *(size_t*)(soap->blist->ptr + sizeof(char*)) - n; - *(size_t*)(soap->blist->ptr + sizeof(char*)) = n; - } - return soap->blist->size; -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -char* -SOAP_FMAC2 -soap_first_block(struct soap *soap) -{ char *p, *q, *r; - p = soap->blist->ptr; - if (!p) - return NULL; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "First block\n")); - r = NULL; - do - { q = *(char**)p; - *(char**)p = r; - r = p; - p = q; - } while (p); - soap->blist->ptr = r; - return r + sizeof(char*) + sizeof(size_t); -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -char* -SOAP_FMAC2 -soap_next_block(struct soap *soap) -{ char *p; - p = soap->blist->ptr; - if (p) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Next block\n")); - soap->blist->ptr = *(char**)p; - SOAP_FREE(soap, p); - if (soap->blist->ptr) - return soap->blist->ptr + sizeof(char*) + sizeof(size_t); - } - return NULL; -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -size_t -SOAP_FMAC2 -soap_block_size(struct soap *soap) -{ return *(size_t*)(soap->blist->ptr + sizeof(char*)); -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_end_block(struct soap *soap) -{ struct soap_blist *bp; - char *p, *q; - bp = soap->blist; - if (bp) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "End of block sequence, free all remaining blocks\n")); - for (p = bp->ptr; p; p = q) - { q = *(char**)p; - SOAP_FREE(soap, p); - } - soap->blist = bp->next; - SOAP_FREE(soap, bp); - } - DBGLOG(TEST, if (soap->blist) SOAP_MESSAGE(fdebug, "Restore previous block sequence\n")); -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -char* -SOAP_FMAC2 -soap_save_block(struct soap *soap, char *p, int flag) -{ register size_t n; - register char *q, *s; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Save all blocks in contiguous memory space of %u bytes (%p->%p)\n", (unsigned int)soap->blist->size, soap->blist->ptr, p)); - if (soap->blist->size) - { if (!p) - p = (char*)soap_malloc(soap, soap->blist->size); - if (p) - { for (s = p, q = soap_first_block(soap); q; q = soap_next_block(soap)) - { n = soap_block_size(soap); -#ifndef WITH_NOIDREF - if (flag) - soap_update_ptrs(soap, q, q + n, s, q); -#endif - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copy %u bytes from %p to %p\n", (unsigned int)n, q, s)); - memcpy(s, q, n); - s += n; - } - } - else - soap->error = SOAP_EOM; - } - soap_end_block(soap); - return p; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -char * -SOAP_FMAC2 -soap_putsize(struct soap *soap, const char *type, int size) -{ return soap_putsizes(soap, type, &size, 1); -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -char * -SOAP_FMAC2 -soap_putsizes(struct soap *soap, const char *type, const int *size, int dim) -{ return soap_putsizesoffsets(soap, type, size, NULL, dim); -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -char * -SOAP_FMAC2 -soap_putsizesoffsets(struct soap *soap, const char *type, const int *size, const int *offset, int dim) -{ int i; - if (!type) - return NULL; - if (soap->version == 2) - { sprintf(soap->type, "%s[%d", type, size[0]); - for (i = 1; i < dim; i++) - sprintf(soap->type + strlen(soap->type), " %d", size[i]); - } - else - { if (offset) - { sprintf(soap->type, "%s[%d", type, size[0] + offset[0]); - for (i = 1; i < dim; i++) - sprintf(soap->type + strlen(soap->type), ",%d", size[i] + offset[i]); - } - else - { sprintf(soap->type, "%s[%d", type, size[0]); - for (i = 1; i < dim; i++) - sprintf(soap->type + strlen(soap->type), ",%d", size[i]); - } - strcat(soap->type, "]"); - } - return soap->type; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -char * -SOAP_FMAC2 -soap_putoffset(struct soap *soap, int offset) -{ return soap_putoffsets(soap, &offset, 1); -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -char * -SOAP_FMAC2 -soap_putoffsets(struct soap *soap, const int *offset, int dim) -{ register int i; - sprintf(soap->arrayOffset, "[%d", offset[0]); - for (i = 1; i < dim; i++) - sprintf(soap->arrayOffset + strlen(soap->arrayOffset), ",%d", offset[i]); - strcat(soap->arrayOffset, "]"); - return soap->arrayOffset; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_size(const int *size, int dim) -{ register int i, n = size[0]; - for (i = 1; i < dim; i++) - n *= size[i]; - return n; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_getoffsets(const char *attr, const int *size, int *offset, int dim) -{ register int i, j = 0; - if (offset) - for (i = 0; i < dim && attr && *attr; i++) - { attr++; - j *= size[i]; - j += offset[i] = (int)atol(attr); - attr = strchr(attr, ','); - } - else - for (i = 0; i < dim && attr && *attr; i++) - { attr++; - j *= size[i]; - j += (int)atol(attr); - attr = strchr(attr, ','); - } - return j; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_getsize(const char *attr1, const char *attr2, int *j) -{ register int n, k; - char *s; - *j = 0; - if (!*attr1) - return -1; - if (*attr1 == '[') - attr1++; - n = 1; - for (;;) - { k = (int)soap_strtol(attr1, &s, 10); - n *= k; - if (k < 0 || n > SOAP_MAXARRAYSIZE || s == attr1) - return -1; - attr1 = strchr(s, ','); - if (!attr1) - attr1 = strchr(s, ' '); - if (attr2 && *attr2) - { attr2++; - *j *= k; - k = (int)soap_strtol(attr2, &s, 10); - *j += k; - if (k < 0) - return -1; - attr2 = s; - } - if (!attr1) - break; - attr1++; - } - return n - *j; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_getsizes(const char *attr, int *size, int dim) -{ register int i, k, n; - if (!*attr) - return -1; - i = strlen(attr); - n = 1; - do - { for (i = i-1; i >= 0; i--) - if (attr[i] == '[' || attr[i] == ',' || attr[i] == ' ') - break; - k = (int)atol(attr + i + 1); - n *= size[--dim] = k; - if (k < 0 || n > SOAP_MAXARRAYSIZE) - return -1; - } while (i >= 0 && attr[i] != '['); - return n; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_getposition(const char *attr, int *pos) -{ register int i, n; - if (!*attr) - return -1; - n = 0; - i = 1; - do - { pos[n++] = (int)atol(attr + i); - while (attr[i] && attr[i] != ',' && attr[i] != ']') - i++; - if (attr[i] == ',') - i++; - } while (n < SOAP_MAXDIMS && attr[i] && attr[i] != ']'); - return n; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_push_namespace(struct soap *soap, const char *id, const char *ns) -{ register struct soap_nlist *np; - register struct Namespace *p; - register short i = -1; - register size_t n, k; - n = strlen(id); - k = strlen(ns) + 1; - p = soap->local_namespaces; - if (p) - { for (i = 0; p->id; p++, i++) - { if (p->ns && !strcmp(ns, p->ns)) - { if (p->out) - { SOAP_FREE(soap, p->out); - p->out = NULL; - } - break; - } - if (p->out) - { if (!strcmp(ns, p->out)) - break; - } - else if (p->in) - { if (!soap_tag_cmp(ns, p->in)) - { if ((p->out = (char*)SOAP_MALLOC(soap, k))) - strcpy(p->out, ns); - break; - } - } - } - if (!p || !p->id) - i = -1; - } - if (i >= 0) - k = 0; - np = (struct soap_nlist*)SOAP_MALLOC(soap, sizeof(struct soap_nlist) + n + k); - if (!np) - return soap->error = SOAP_EOM; - np->next = soap->nlist; - soap->nlist = np; - np->level = soap->level; - np->index = i; - strcpy(np->id, id); - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Push namespace binding (level=%u) '%s' '%s'\n", soap->level, id, ns)); - if (i < 0) - { np->ns = np->id + n + 1; - strcpy(np->ns, ns); - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Push NOT OK: no match found for '%s' in namespace mapping table (added to stack anyway)\n", ns)); - } - else - { np->ns = NULL; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Push OK ('%s' matches '%s' in namespace table)\n", id, p->id)); - } - return SOAP_OK; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_pop_namespace(struct soap *soap) -{ register struct soap_nlist *np; - while (soap->nlist && soap->nlist->level >= soap->level) - { np = soap->nlist->next; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Popped namespace binding (level=%u) '%s'\n", soap->level, soap->nlist->id)); - SOAP_FREE(soap, soap->nlist); - soap->nlist = np; - } -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_match_namespace(struct soap *soap, const char *id1, const char *id2, int n1, int n2) -{ register struct soap_nlist *np = soap->nlist; - while (np && (strncmp(np->id, id1, n1) || np->id[n1])) - np = np->next; - if (np) - { if (np->index < 0 - || (soap->local_namespaces[np->index].id - && (strncmp(soap->local_namespaces[np->index].id, id2, n2) - || soap->local_namespaces[np->index].id[n2]))) - return SOAP_NAMESPACE; - return SOAP_OK; - } - if (n1 == 3 && n1 == n2 && !strcmp(id1, "xml") && !strcmp(id1, id2)) - return SOAP_OK; - return SOAP_SYNTAX_ERROR; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -const char* -SOAP_FMAC2 -soap_current_namespace(struct soap *soap, const char *tag) -{ register struct soap_nlist *np; - register const char *s; - np = soap->nlist; - if (!(s = strchr(tag, ':'))) - { while (np && *np->id) /* find default namespace, if present */ - np = np->next; - } - else - { while (np && (strncmp(np->id, tag, s - tag) || np->id[s - tag])) - np = np->next; - if (!np) - soap->error = SOAP_NAMESPACE; - } - if (np) - { if (np->index >= 0) - return soap->namespaces[np->index].ns; - if (np->ns) - return soap_strdup(soap, np->ns); - } - return NULL; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_tag_cmp(const char *s, const char *t) -{ for (;;) - { register int c1 = *s; - register int c2 = *t; - if (!c1 || c1 == '"') - break; - if (c2 != '-') - { if (c1 != c2) - { if (c1 >= 'A' && c1 <= 'Z') - c1 += 'a' - 'A'; - if (c2 >= 'A' && c2 <= 'Z') - c2 += 'a' - 'A'; - } - if (c1 != c2) - { if (c2 != '*') - return 1; - c2 = *++t; - if (!c2) - return 0; - if (c2 >= 'A' && c2 <= 'Z') - c2 += 'a' - 'A'; - for (;;) - { c1 = *s; - if (!c1 || c1 == '"') - break; - if (c1 >= 'A' && c1 <= 'Z') - c1 += 'a' - 'A'; - if (c1 == c2 && !soap_tag_cmp(s + 1, t + 1)) - return 0; - s++; - } - break; - } - } - s++; - t++; - } - if (*t == '*' && !t[1]) - return 0; - return *t; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_match_tag(struct soap *soap, const char *tag1, const char *tag2) -{ register const char *s, *t; - if (!tag1 || !tag2 || !*tag2) - return SOAP_OK; - s = strchr(tag1, ':'); - t = strchr(tag2, ':'); - if (t) - { if (s) - { if (t[1] && SOAP_STRCMP(s + 1, t + 1)) - return SOAP_TAG_MISMATCH; - if (t != tag2 && soap_match_namespace(soap, tag1, tag2, s - tag1, t - tag2)) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Tags '%s' and '%s' match but namespaces differ\n", tag1, tag2)); - return SOAP_TAG_MISMATCH; - } - } - else if (SOAP_STRCMP(tag1, t + 1)) - return SOAP_TAG_MISMATCH; - else if (t != tag2 && soap_match_namespace(soap, tag1, tag2, 0, t - tag2)) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Tags '%s' and '%s' match but namespaces differ\n", tag1, tag2)); - return SOAP_TAG_MISMATCH; - } - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Tags and (default) namespaces match: '%s' '%s'\n", tag1, tag2)); - return SOAP_OK; - } - if (s) - { if (SOAP_STRCMP(s + 1, tag2)) - return SOAP_TAG_MISMATCH; - } - else if (SOAP_STRCMP(tag1, tag2)) - return SOAP_TAG_MISMATCH; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Tags match: '%s' '%s'\n", tag1, tag2)); - return SOAP_OK; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_match_array(struct soap *soap, const char *type) -{ if (*soap->arrayType) - if (soap_match_tag(soap, soap->arrayType, type) - && soap_match_tag(soap, soap->arrayType, "xsd:anyType") - && soap_match_tag(soap, soap->arrayType, "xsd:ur-type") - ) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Array type mismatch: '%s' '%s'\n", soap->arrayType, type)); - return SOAP_TAG_MISMATCH; - } - return SOAP_OK; -} -#endif - -/******************************************************************************\ - * - * SSL - * -\******************************************************************************/ - -#ifdef WITH_OPENSSL -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_rand() -{ unsigned char buf[4]; - if (!ssl_init_done) - soap_ssl_init(); - RAND_pseudo_bytes(buf, 4); - return *(int*)buf; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_ssl_server_context(struct soap *soap, unsigned short flags, const char *keyfile, const char *password, const char *cafile, const char *capath, const char *dhfile, const char *randfile, const char *sid) -{ int err; - soap->keyfile = keyfile; - soap->password = password; - soap->cafile = cafile; - soap->capath = capath; - soap->dhfile = dhfile; - soap->randfile = randfile; - soap->ssl_flags = flags | (dhfile == NULL ? SOAP_SSL_RSA : 0); - if (!(err = soap->fsslauth(soap))) - { if (sid) - SSL_CTX_set_session_id_context(soap->ctx, (unsigned char*)sid, strlen(sid)); - } - return err; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_ssl_client_context(struct soap *soap, unsigned short flags, const char *keyfile, const char *password, const char *cafile, const char *capath, const char *randfile) -{ soap->keyfile = keyfile; - soap->password = password; - soap->cafile = cafile; - soap->capath = capath; - soap->dhfile = NULL; - soap->ssl_flags = flags; - soap->randfile = randfile; - return soap->fsslauth(soap); -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_ssl_init() -{ /* Note: for MT systems, the main program MUST call soap_ssl_init() before any threads are started */ - if (!ssl_init_done) - { ssl_init_done = 1; - SSL_library_init(); -#ifndef WITH_LEAN - SSL_load_error_strings(); -#endif - if (!RAND_load_file("/dev/urandom", 1024)) - { char buf[1024]; - RAND_seed(buf, sizeof(buf)); - while (!RAND_status()) - { int r = rand(); - RAND_seed(&r, sizeof(int)); - } - } - } -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -const char * -SOAP_FMAC2 -soap_ssl_error(struct soap *soap, int ret) -{ int err = SSL_get_error(soap->ssl, ret); - const char *msg = soap_code_str(h_ssl_error_codes, err); - if (msg) - strcpy(soap->msgbuf, msg); - else - return ERR_error_string(err, soap->msgbuf); - if (ERR_peek_error()) - { unsigned long r; - strcat(soap->msgbuf, "\n"); - while ((r = ERR_get_error())) - ERR_error_string_n(r, soap->msgbuf + strlen(soap->msgbuf), sizeof(soap->msgbuf) - strlen(soap->msgbuf)); - } - else - { switch (ret) - { case 0: - strcpy(soap->msgbuf, "EOF was observed that violates the protocol. The client probably provided invalid authentication information."); - break; - case -1: - sprintf(soap->msgbuf, "Error observed by underlying BIO: %s", strerror(errno)); - break; - } - } - return soap->msgbuf; -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -static int -ssl_password(char *buf, int num, int rwflag, void *userdata) -{ if (num < (int)strlen((char*)userdata) + 1) - return 0; - return strlen(strcpy(buf, (char*)userdata)); -} -#endif - -/******************************************************************************/ -/* This callback is included for future references. It should not be deleted -#ifndef PALM_2 -static DH * -ssl_tmp_dh(SSL *ssl, int is_export, int keylength) -{ static DH *dh512 = NULL; - static DH *dh1024 = NULL; - DH *dh; - switch (keylength) - { case 512: - if (!dh512) - { BIO *bio = BIO_new_file("dh512.pem", "r"); - if (bio) - { dh512 = PEM_read_bio_DHparams(bio, NULL, NULL, NULL); - BIO_free(bio); - return dh512; - } - } - else - return dh512; - default: - if (!dh1024) - { BIO *bio = BIO_new_file("dh1024.pem", "r"); - if (bio) - { dh1024 = PEM_read_bio_DHparams(bio, NULL, NULL, NULL); - BIO_free(bio); - } - } - dh = dh1024; - } - return dh; -} -#endif -*/ - -/******************************************************************************/ -#ifndef PALM_1 -static int -ssl_auth_init(struct soap *soap) -{ long flags; - int mode; - if (!ssl_init_done) - soap_ssl_init(); - if (!soap->ctx) - { if (!(soap->ctx = SSL_CTX_new(SSLv23_method()))) - return soap_set_receiver_error(soap, "SSL error", "Can't setup context", SOAP_SSL_ERROR); - } - if (soap->randfile) - { if (!RAND_load_file(soap->randfile, -1)) - return soap_set_receiver_error(soap, "SSL error", "Can't load randomness", SOAP_SSL_ERROR); - } - if (soap->cafile || soap->capath) - { if (!SSL_CTX_load_verify_locations(soap->ctx, soap->cafile, soap->capath)) - return soap_set_receiver_error(soap, "SSL error", "Can't read CA file and directory", SOAP_SSL_ERROR); - if (soap->cafile && (soap->ssl_flags & SOAP_SSL_REQUIRE_CLIENT_AUTHENTICATION)) - SSL_CTX_set_client_CA_list(soap->ctx, SSL_load_client_CA_file(soap->cafile)); - } - if (!SSL_CTX_set_default_verify_paths(soap->ctx)) - return soap_set_receiver_error(soap, "SSL error", "Can't read default CA file and/or directory", SOAP_SSL_ERROR); -/* This code assumes a typical scenario, see alternative code below */ - if (soap->keyfile) - { if (!SSL_CTX_use_certificate_chain_file(soap->ctx, soap->keyfile)) - return soap_set_receiver_error(soap, "SSL error", "Can't read certificate key file", SOAP_SSL_ERROR); - if (soap->password) - { SSL_CTX_set_default_passwd_cb_userdata(soap->ctx, (void*)soap->password); - SSL_CTX_set_default_passwd_cb(soap->ctx, ssl_password); - } - if (!SSL_CTX_use_PrivateKey_file(soap->ctx, soap->keyfile, SSL_FILETYPE_PEM)) - return soap_set_receiver_error(soap, "SSL error", "Can't read key file", SOAP_SSL_ERROR); - } -/* Suggested alternative approach to check cafile first before the key file: - if (soap->password) - { SSL_CTX_set_default_passwd_cb_userdata(soap->ctx, (void*)soap->password); - SSL_CTX_set_default_passwd_cb(soap->ctx, ssl_password); - } - if (!soap->cafile || !SSL_CTX_use_certificate_chain_file(soap->ctx, soap->cafile)) - { if (soap->keyfile) - { if (!SSL_CTX_use_certificate_chain_file(soap->ctx, soap->keyfile)) - return soap_set_receiver_error(soap, "SSL error", "Can't read certificate or key file", SOAP_SSL_ERROR); - if (!SSL_CTX_use_PrivateKey_file(soap->ctx, soap->keyfile, SSL_FILETYPE_PEM)) - return soap_set_receiver_error(soap, "SSL error", "Can't read key file", SOAP_SSL_ERROR); - } - } -*/ - if ((soap->ssl_flags & SOAP_SSL_RSA)) - { RSA *rsa = RSA_generate_key(1024, RSA_F4, NULL, NULL); - if (!SSL_CTX_set_tmp_rsa(soap->ctx, rsa)) - { if (rsa) - RSA_free(rsa); - return soap_set_receiver_error(soap, "SSL error", "Can't set RSA key", SOAP_SSL_ERROR); - } - RSA_free(rsa); - } - else if (soap->dhfile) - { DH *dh = 0; - BIO *bio; - bio = BIO_new_file(soap->dhfile, "r"); - if (!bio) - return soap_set_receiver_error(soap, "SSL error", "Can't read DH file", SOAP_SSL_ERROR); - dh = PEM_read_bio_DHparams(bio, NULL, NULL, NULL); - BIO_free(bio); - if (SSL_CTX_set_tmp_dh(soap->ctx, dh) < 0) - { if (dh) - DH_free(dh); - return soap_set_receiver_error(soap, "SSL error", "Can't set DH parameters", SOAP_SSL_ERROR); - } - DH_free(dh); - } - flags = (SSL_OP_ALL | SSL_OP_NO_SSLv2); - if ((soap->ssl_flags & SOAP_SSLv3)) - flags |= SSL_OP_NO_TLSv1; - if ((soap->ssl_flags & SOAP_TLSv1)) - flags |= SSL_OP_NO_SSLv3; - SSL_CTX_set_options(soap->ctx, flags); - if ((soap->ssl_flags & SOAP_SSL_REQUIRE_CLIENT_AUTHENTICATION)) - mode = (SSL_VERIFY_PEER | SSL_VERIFY_FAIL_IF_NO_PEER_CERT); - else if ((soap->ssl_flags & SOAP_SSL_REQUIRE_SERVER_AUTHENTICATION)) - mode = SSL_VERIFY_PEER; - else - mode = SSL_VERIFY_NONE; - SSL_CTX_set_verify(soap->ctx, mode, soap->fsslverify); -#if (OPENSSL_VERSION_NUMBER < 0x00905100L) - SSL_CTX_set_verify_depth(soap->ctx, 1); -#else - SSL_CTX_set_verify_depth(soap->ctx, 9); -#endif - return SOAP_OK; -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -static int -ssl_verify_callback(int ok, X509_STORE_CTX *store) -{ -#ifdef SOAP_DEBUG - if (!ok) - { char data[256]; - X509 *cert = X509_STORE_CTX_get_current_cert(store); - fprintf(stderr, "SSL verify error or warning with certificate at depth %d: %s\n", X509_STORE_CTX_get_error_depth(store), X509_verify_cert_error_string(X509_STORE_CTX_get_error(store))); - X509_NAME_oneline(X509_get_issuer_name(cert), data, sizeof(data)); - fprintf(stderr, "certificate issuer %s\n", data); - X509_NAME_oneline(X509_get_subject_name(cert), data, sizeof(data)); - fprintf(stderr, "certificate subject %s\n", data); - } -#endif - /* Note: return 1 to continue, but unsafe progress will be terminated by SSL */ - return ok; -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_ssl_accept(struct soap *soap) -{ BIO *bio; - int i, r; - if (!soap_valid_socket(soap->socket)) - return soap_set_receiver_error(soap, "SSL error", "No socket in soap_ssl_accept()", SOAP_SSL_ERROR); - if (!soap->ctx && (soap->error = soap->fsslauth(soap))) - return SOAP_INVALID_SOCKET; - if (!soap->ssl) - { soap->ssl = SSL_new(soap->ctx); - if (!soap->ssl) - return soap_set_receiver_error(soap, "SSL error", "SSL_new() failed in soap_ssl_accept()", SOAP_SSL_ERROR); - } - else - SSL_clear(soap->ssl); - soap->imode |= SOAP_ENC_SSL; - soap->omode |= SOAP_ENC_SSL; -#if defined(WIN32) - { u_long nonblocking = 1; - ioctlsocket((SOAP_SOCKET)soap->socket, FIONBIO, &nonblocking); - } -#elif defined(VXWORKS) - { u_long nonblocking = 1; - ioctl((SOAP_SOCKET)soap->socket, FIONBIO, (int)&nonblocking); - } -#else - fcntl((SOAP_SOCKET)soap->socket, F_SETFL, fcntl((SOAP_SOCKET)soap->socket, F_GETFL)|O_NONBLOCK); -#endif - bio = BIO_new_socket((SOAP_SOCKET)soap->socket, BIO_NOCLOSE); - SSL_set_bio(soap->ssl, bio, bio); - i = 100; /* 100 * 0.1 ms retries */ - while ((r = SSL_accept(soap->ssl)) <= 0) - { int err = SSL_get_error(soap->ssl, r); - if (err == SSL_ERROR_WANT_READ || err == SSL_ERROR_WANT_WRITE) - { struct timeval timeout; - fd_set fd; - if (i-- <= 0) - break; - timeout.tv_sec = 0; - timeout.tv_usec = 100000; -#ifndef WIN32 - if ((int)soap->socket >= (int)FD_SETSIZE) - return SOAP_FD_EXCEEDED; /* Hint: MUST increase FD_SETSIZE */ -#endif - FD_ZERO(&fd); - FD_SET((SOAP_SOCKET)soap->socket, &fd); - r = select((SOAP_SOCKET)(soap->socket + 1), &fd, NULL, &fd, &timeout); - if (r < 0 && (r = soap_socket_errno(soap->socket)) != SOAP_EINTR) - { soap->errnum = r; - return SOAP_EOF; - } - } - else - { soap->errnum = err; - break; - } - } -#if defined(WIN32) - { u_long blocking = 0; - ioctlsocket((SOAP_SOCKET)soap->socket, FIONBIO, &blocking); - } -#elif defined(VXWORKS) - { u_long blocking = 0; - ioctl((SOAP_SOCKET)soap->socket, FIONBIO, (int)&blocking); - } -#else - fcntl((SOAP_SOCKET)soap->socket, F_SETFL, fcntl((SOAP_SOCKET)soap->socket, F_GETFL)&~O_NONBLOCK); -#endif - if (r <= 0) - { soap_set_receiver_error(soap, soap_ssl_error(soap, r), "SSL_accept() failed in soap_ssl_accept()", SOAP_SSL_ERROR); - soap_closesock(soap); - return SOAP_SSL_ERROR; - } - if ((soap->ssl_flags & SOAP_SSL_REQUIRE_CLIENT_AUTHENTICATION)) - { X509 *peer; - int err; - if ((err = SSL_get_verify_result(soap->ssl)) != X509_V_OK) - { soap_closesock(soap); - return soap_set_sender_error(soap, X509_verify_cert_error_string(err), "SSL certificate presented by peer cannot be verified in soap_ssl_accept()", SOAP_SSL_ERROR); - } - peer = SSL_get_peer_certificate(soap->ssl); - if (!peer) - { soap_closesock(soap); - return soap_set_sender_error(soap, "SSL error", "No SSL certificate was presented by the peer in soap_ssl_accept()", SOAP_SSL_ERROR); - } - X509_free(peer); - } - return SOAP_OK; -} -#endif - -/******************************************************************************/ -#endif /* WITH_OPENSSL */ - -/******************************************************************************/ -#ifndef WITH_NOIO -#ifndef PALM_1 -static int -tcp_init(struct soap *soap) -{ soap->errmode = 1; -#ifdef WIN32 - if (tcp_done) - return 0; - else - { WSADATA w; - if (WSAStartup(MAKEWORD(1, 1), &w)) - return -1; - tcp_done = 1; - } -#endif - return 0; -} -#endif -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_done(struct soap *soap) -{ -#ifdef SOAP_DEBUG - int i; -#endif - if (soap_check_state(soap)) - return; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Done with context\n")); - soap_free_temp(soap); - while (soap->clist) - { struct soap_clist *p = soap->clist->next; - SOAP_FREE(soap, soap->clist); - soap->clist = p; - } - soap->keep_alive = 0; /* to force close the socket */ - soap_closesock(soap); -#ifdef WITH_COOKIES - soap_free_cookies(soap); -#endif - while (soap->plugins) - { register struct soap_plugin *p = soap->plugins->next; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Removing plugin '%s'\n", soap->plugins->id)); - if (soap->plugins->fcopy || soap->state == SOAP_INIT) - soap->plugins->fdelete(soap, soap->plugins); - SOAP_FREE(soap, soap->plugins); - soap->plugins = p; - } - soap->fplugin = fplugin; - soap->fmalloc = NULL; -#ifndef WITH_NOHTTP - soap->fpost = http_post; - soap->fget = http_get; - soap->fform = NULL; - soap->fposthdr = http_post_header; - soap->fresponse = http_response; - soap->fparse = http_parse; - soap->fparsehdr = http_parse_header; -#endif - soap->fheader = NULL; -#ifndef WITH_NOIO -#ifndef WITH_IPV6 - soap->fresolve = tcp_gethost; -#else - soap->fresolve = NULL; -#endif - soap->faccept = tcp_accept; - soap->fopen = tcp_connect; - soap->fclose = tcp_disconnect; - soap->fclosesocket = tcp_closesocket; - soap->fshutdownsocket = tcp_shutdownsocket; - soap->fsend = fsend; - soap->frecv = frecv; - soap->fpoll = soap_poll; -#else - soap->fopen = NULL; - soap->fclose = NULL; - soap->fpoll = NULL; -#endif -#ifndef WITH_LEANER - soap->fprepareinit = NULL; - soap->fpreparesend = NULL; - soap->fpreparerecv = NULL; - soap->fpreparefinal = NULL; -#endif - soap->fseterror = NULL; - soap->fignore = NULL; - soap->fserveloop = NULL; -#ifdef WITH_OPENSSL - if (soap->session) - { SSL_SESSION_free(soap->session); - soap->session = NULL; - } -#endif - if (soap->state == SOAP_INIT) - { if (soap_valid_socket(soap->master)) - { soap->fclosesocket(soap, (SOAP_SOCKET)soap->master); - soap->master = SOAP_INVALID_SOCKET; - } -#ifdef WITH_OPENSSL - if (soap->ctx) - { SSL_CTX_free(soap->ctx); - soap->ctx = NULL; - } -#endif - } -#ifdef SOAP_DEBUG - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Free logfiles\n")); - for (i = 0; i < SOAP_MAXLOGS; i++) - { if (soap->logfile[i]) - { SOAP_FREE(soap, (void*)soap->logfile[i]); - soap->logfile[i] = NULL; - } - soap_close_logfile(soap, i); - } - soap_free_mht(soap); - soap->state = 0; -#endif -} -#endif - -/******************************************************************************/ -#ifndef WITH_NOIO -#ifndef PALM_2 -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_cleanup(struct soap *soap) -{ soap_done(soap); -#ifdef WIN32 - if (!tcp_done) - return; - tcp_done = 0; - WSACleanup(); -#endif -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_NOIO -#ifndef PALM_1 -static const char* -tcp_error(struct soap *soap) -{ register const char *msg = NULL; - switch (soap->errmode) - { case 0: - msg = soap_strerror(soap); - break; - case 1: - msg = "WSAStartup failed"; - break; - case 2: - { -#ifndef WITH_LEAN - msg = soap_code_str(h_error_codes, soap->errnum); - if (!msg) -#endif - { sprintf(soap->msgbuf, "TCP/UDP IP error %d", soap->errnum); - msg = soap->msgbuf; - } - } - } - return msg; -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_NOHTTP -#ifndef PALM_1 -static const char* -http_error(struct soap *soap, int status) -{ register const char *msg = SOAP_STR_EOS; -#ifndef WITH_LEAN - msg = soap_code_str(h_http_error_codes, status); - if (!msg) - msg = SOAP_STR_EOS; -#endif - return msg; -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_IPV6 -#ifndef WITH_NOIO -#ifndef PALM_1 -static int -tcp_gethost(struct soap *soap, const char *addr, struct in_addr *inaddr) -{ soap_int32 iadd = -1; - struct hostent hostent, *host = &hostent; -#ifdef VXWORKS - int hostint; - /* inet_addr(), and hostGetByName() expect "char *"; addr is a "const char *". */ - iadd = inet_addr((char*)addr); -#else -#if defined(_AIXVERSION_431) || defined(TRU64) - struct hostent_data ht_data; -#endif -#ifdef AS400 - iadd = inet_addr((void*)addr); -#else - iadd = inet_addr(addr); -#endif -#endif - if (iadd != -1) - { memcpy(inaddr, &iadd, sizeof(iadd)); - return SOAP_OK; - } -#if defined(__GLIBC__) - if (gethostbyname_r(addr, &hostent, soap->buf, SOAP_BUFLEN, &host, &soap->errnum) < 0) - host = NULL; -#elif defined(_AIXVERSION_431) || defined(TRU64) - memset((void*)&ht_data, 0, sizeof(ht_data)); - if (gethostbyname_r(addr, &hostent, &ht_data) < 0) - { host = NULL; - soap->errnum = h_errno; - } -#elif defined(HAVE_GETHOSTBYNAME_R) - host = gethostbyname_r(addr, &hostent, soap->buf, SOAP_BUFLEN, &soap->errnum); -#elif defined(VXWORKS) - /* If the DNS resolver library resolvLib has been configured in the vxWorks - * image, a query for the host IP address is sent to the DNS server, if the - * name was not found in the local host table. */ - hostint = hostGetByName((char*)addr); - if (hostint == ERROR) - { host = NULL; - soap->errnum = soap_errno; - } -#else -#ifdef AS400 - if (!(host = gethostbyname((void*)addr))) - soap->errnum = h_errno; -#else - if (!(host = gethostbyname(addr))) - soap->errnum = h_errno; -#endif -#endif - if (!host) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Host name not found\n")); - return SOAP_ERR; - } -#ifdef VXWORKS - inaddr->s_addr = hostint; -#else - memcpy(inaddr, host->h_addr, host->h_length); -#endif - return SOAP_OK; -} -#endif -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_NOIO -#ifndef PALM_1 -static int -tcp_connect(struct soap *soap, const char *endpoint, const char *host, int port) -{ -#ifdef WITH_IPV6 - struct addrinfo hints, *res, *ressave; -#endif - register int err, fd; -#ifndef WITH_LEAN - int len = SOAP_BUFLEN; - int set = 1; -#endif - if (soap_valid_socket(soap->socket)) - soap->fclosesocket(soap, (SOAP_SOCKET)soap->socket); - soap->socket = SOAP_INVALID_SOCKET; - if (tcp_init(soap)) - { soap->errnum = 0; - soap_set_sender_error(soap, tcp_error(soap), "TCP init failed in tcp_connect()", SOAP_TCP_ERROR); - return SOAP_INVALID_SOCKET; - } - soap->errmode = 0; -#ifdef WITH_IPV6 - memset((void*)&hints, 0, sizeof(hints)); - hints.ai_family = PF_UNSPEC; -#ifdef WITH_UDP - if ((soap->omode & SOAP_IO_UDP)) - hints.ai_socktype = SOCK_DGRAM; - else -#endif - hints.ai_socktype = SOCK_STREAM; - soap->errmode = 2; - if (soap->proxy_host) - err = getaddrinfo(soap->proxy_host, soap_int2s(soap, soap->proxy_port), &hints, &res); - else - err = getaddrinfo(host, soap_int2s(soap, port), &hints, &res); - if (err) - { soap_set_sender_error(soap, gai_strerror(err), "getaddrinfo failed in tcp_connect()", SOAP_TCP_ERROR); - return SOAP_INVALID_SOCKET; - } - ressave = res; -again: - fd = (int)socket(res->ai_family, res->ai_socktype, res->ai_protocol); - soap->errmode = 0; -#else -#ifdef WITH_UDP - if ((soap->omode & SOAP_IO_UDP)) - fd = (int)socket(AF_INET, SOCK_DGRAM, 0); - else -#endif - fd = (int)socket(AF_INET, SOCK_STREAM, 0); -#endif - if (fd < 0) - { soap->errnum = soap_socket_errno(fd); - soap_set_sender_error(soap, tcp_error(soap), "socket failed in tcp_connect()", SOAP_TCP_ERROR); - return SOAP_INVALID_SOCKET; - } -#ifdef SOCKET_CLOSE_ON_EXEC -#ifdef WIN32 -#ifndef UNDER_CE - SetHandleInformation((HANDLE)fd, HANDLE_FLAG_INHERIT, 0); -#endif -#else - fcntl(fd, F_SETFD, 1); -#endif -#endif -#ifndef WITH_LEAN - if (soap->connect_flags == SO_LINGER) - { struct linger linger; - memset((void*)&linger, 0, sizeof(linger)); - linger.l_onoff = 1; - linger.l_linger = 0; - if (setsockopt((SOAP_SOCKET)fd, SOL_SOCKET, SO_LINGER, (char*)&linger, sizeof(struct linger))) - { soap->errnum = soap_socket_errno(fd); - soap_set_sender_error(soap, tcp_error(soap), "setsockopt SO_LINGER failed in tcp_connect()", SOAP_TCP_ERROR); - soap->fclosesocket(soap, (SOAP_SOCKET)fd); - return SOAP_INVALID_SOCKET; - } - } - else if (soap->connect_flags && setsockopt((SOAP_SOCKET)fd, SOL_SOCKET, soap->connect_flags, (char*)&set, sizeof(int))) - { soap->errnum = soap_socket_errno(fd); - soap_set_sender_error(soap, tcp_error(soap), "setsockopt failed in tcp_connect()", SOAP_TCP_ERROR); - soap->fclosesocket(soap, (SOAP_SOCKET)fd); - return SOAP_INVALID_SOCKET; - } - if (soap->keep_alive && setsockopt((SOAP_SOCKET)fd, SOL_SOCKET, SO_KEEPALIVE, (char*)&set, sizeof(int))) - { soap->errnum = soap_socket_errno(fd); - soap_set_sender_error(soap, tcp_error(soap), "setsockopt SO_KEEPALIVE failed in tcp_connect()", SOAP_TCP_ERROR); - soap->fclosesocket(soap, (SOAP_SOCKET)fd); - return SOAP_INVALID_SOCKET; - } - if (setsockopt((SOAP_SOCKET)fd, SOL_SOCKET, SO_SNDBUF, (char*)&len, sizeof(int))) - { soap->errnum = soap_socket_errno(fd); - soap_set_sender_error(soap, tcp_error(soap), "setsockopt SO_SNDBUF failed in tcp_connect()", SOAP_TCP_ERROR); - soap->fclosesocket(soap, (SOAP_SOCKET)fd); - return SOAP_INVALID_SOCKET; - } - if (setsockopt((SOAP_SOCKET)fd, SOL_SOCKET, SO_RCVBUF, (char*)&len, sizeof(int))) - { soap->errnum = soap_socket_errno(fd); - soap_set_sender_error(soap, tcp_error(soap), "setsockopt SO_RCVBUF failed in tcp_connect()", SOAP_TCP_ERROR); - soap->fclosesocket(soap, (SOAP_SOCKET)fd); - return SOAP_INVALID_SOCKET; - } -#ifdef TCP_NODELAY - if (!(soap->omode & SOAP_IO_UDP) && setsockopt((SOAP_SOCKET)fd, IPPROTO_TCP, TCP_NODELAY, (char*)&set, sizeof(int))) - { soap->errnum = soap_socket_errno(fd); - soap_set_sender_error(soap, tcp_error(soap), "setsockopt TCP_NODELAY failed in tcp_connect()", SOAP_TCP_ERROR); - soap->fclosesocket(soap, (SOAP_SOCKET)fd); - return SOAP_INVALID_SOCKET; - } -#endif -#endif - DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Opening socket %d to host='%s' port=%d\n", fd, host, port)); -#ifndef WITH_IPV6 - soap->peerlen = sizeof(soap->peer); - memset((void*)&soap->peer, 0, sizeof(soap->peer)); - soap->peer.sin_family = AF_INET; - soap->errmode = 2; - if (soap->proxy_host) - { if (soap->fresolve(soap, soap->proxy_host, &soap->peer.sin_addr)) - { soap_set_sender_error(soap, tcp_error(soap), "get proxy host by name failed in tcp_connect()", SOAP_TCP_ERROR); - soap->fclosesocket(soap, (SOAP_SOCKET)fd); - return SOAP_INVALID_SOCKET; - } - soap->peer.sin_port = htons((short)soap->proxy_port); - } - else - { if (soap->fresolve(soap, host, &soap->peer.sin_addr)) - { soap_set_sender_error(soap, tcp_error(soap), "get host by name failed in tcp_connect()", SOAP_TCP_ERROR); - soap->fclosesocket(soap, (SOAP_SOCKET)fd); - return SOAP_INVALID_SOCKET; - } - soap->peer.sin_port = htons((short)port); - } - soap->errmode = 0; - if ((soap->omode & SOAP_IO_UDP)) - return fd; -#endif -#ifndef WITH_LEAN - if (soap->connect_timeout) -#if defined(WIN32) - { u_long nonblocking = 1; - ioctlsocket((SOAP_SOCKET)fd, FIONBIO, &nonblocking); - } -#elif defined(VXWORKS) - { u_long nonblocking = 1; - ioctl((SOAP_SOCKET)fd, FIONBIO, (int)(&nonblocking)); /* modified to use fd */ - } -#else - fcntl((SOAP_SOCKET)fd, F_SETFL, fcntl((SOAP_SOCKET)fd, F_GETFL)|O_NONBLOCK); -#endif - else -#if defined(WIN32) - { u_long blocking = 0; - ioctlsocket((SOAP_SOCKET)fd, FIONBIO, &blocking); - } -#elif defined(VXWORKS) - { u_long blocking = 0; - ioctl((SOAP_SOCKET)fd, FIONBIO, (int)(&blocking)); - } -#else - fcntl((SOAP_SOCKET)fd, F_SETFL, fcntl((SOAP_SOCKET)fd, F_GETFL)&~O_NONBLOCK); -#endif -#endif - for (;;) - { -#ifdef WITH_IPV6 - if (connect((SOAP_SOCKET)fd, res->ai_addr, res->ai_addrlen)) -#else - if (connect((SOAP_SOCKET)fd, (struct sockaddr*)&soap->peer, sizeof(soap->peer))) -#endif - { -#ifndef WITH_LEAN - if (soap->connect_timeout && (soap_socket_errno(fd) == SOAP_EINPROGRESS || soap_socket_errno(fd) == SOAP_EWOULDBLOCK)) - { struct timeval timeout; - SOAP_SOCKLEN_T k; - fd_set fds; - if (soap->connect_timeout > 0) - { timeout.tv_sec = soap->connect_timeout; - timeout.tv_usec = 0; - } - else - { timeout.tv_sec = -soap->connect_timeout/1000000; - timeout.tv_usec = -soap->connect_timeout%1000000; - } -#ifndef WIN32 - if ((int)soap->socket >= (int)FD_SETSIZE) - { soap->error = SOAP_FD_EXCEEDED; - return SOAP_INVALID_SOCKET; /* Hint: MUST increase FD_SETSIZE */ - } -#endif - FD_ZERO(&fds); - FD_SET((SOAP_SOCKET)fd, &fds); - for (;;) - { register int r = select((SOAP_SOCKET)(fd + 1), NULL, &fds, NULL, &timeout); - if (r > 0) - break; - if (!r) - { soap->errnum = 0; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Connect timeout\n")); - soap_set_sender_error(soap, "Timeout", "connect failed in tcp_connect()", SOAP_TCP_ERROR); - soap->fclosesocket(soap, (SOAP_SOCKET)fd); - return SOAP_INVALID_SOCKET; - } - r = soap_socket_errno(fd); - if (r != SOAP_EINTR) - { soap->errnum = r; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Could not connect to host\n")); - soap_set_sender_error(soap, tcp_error(soap), "connect failed in tcp_connect()", SOAP_TCP_ERROR); - soap->fclosesocket(soap, (SOAP_SOCKET)fd); - return SOAP_INVALID_SOCKET; - } - } - k = (SOAP_SOCKLEN_T)sizeof(soap->errnum); - if (!getsockopt((SOAP_SOCKET)fd, SOL_SOCKET, SO_ERROR, (char*)&soap->errnum, &k) && !soap->errnum) /* portability note: see SOAP_SOCKLEN_T definition in stdsoap2.h */ - break; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Could not connect to host\n")); - if (!soap->errnum) - soap->errnum = soap_socket_errno(fd); - soap_set_sender_error(soap, tcp_error(soap), "connect failed in tcp_connect()", SOAP_TCP_ERROR); - soap->fclosesocket(soap, (SOAP_SOCKET)fd); - return SOAP_INVALID_SOCKET; - } - else -#endif -#ifdef WITH_IPV6 - if (res->ai_next) - { res = res->ai_next; - soap->fclosesocket(soap, (SOAP_SOCKET)fd); - goto again; - } - else -#endif - err = soap_socket_errno(fd); - if (err && err != SOAP_EINTR) - { soap->errnum = err; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Could not connect to host\n")); - soap_set_sender_error(soap, tcp_error(soap), "connect failed in tcp_connect()", SOAP_TCP_ERROR); - soap->fclosesocket(soap, (SOAP_SOCKET)fd); - return SOAP_INVALID_SOCKET; - } - } - else - break; - } -#ifdef WITH_IPV6 - soap->peerlen = 0; /* IPv6: already connected so use send() */ - freeaddrinfo(ressave); -#endif -#ifndef WITH_LEAN - if (soap->connect_timeout) -#if defined(WIN32) - { u_long blocking = 0; - ioctlsocket((SOAP_SOCKET)fd, FIONBIO, &blocking); - } -#elif defined(VXWORKS) - { u_long blocking = 0; - ioctl((SOAP_SOCKET)fd, FIONBIO, (int)(&blocking)); - } -#else - fcntl((SOAP_SOCKET)fd, F_SETFL, fcntl((SOAP_SOCKET)fd, F_GETFL)&~O_NONBLOCK); -#endif -#endif - soap->socket = fd; - soap->imode &= ~SOAP_ENC_SSL; - soap->omode &= ~SOAP_ENC_SSL; - if (!soap_tag_cmp(endpoint, "https:*")) - { -#ifdef WITH_OPENSSL - BIO *bio; - int r; - if (soap->proxy_host) - { unsigned int k = soap->omode; /* make sure we only parse HTTP */ - size_t n = soap->count; /* save the content length */ - char *userid, *passwd; - char endp[sizeof(soap->endpoint)]; - soap->omode &= ~SOAP_ENC; /* mask IO and ENC */ - soap->omode |= SOAP_IO_BUFFER; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Connecting to %s proxy server\n", soap->proxy_http_version)); - sprintf(soap->tmpbuf, "CONNECT %s:%d HTTP/%s", host, port, soap->proxy_http_version); - if (soap_begin_send(soap) - || (soap->error = soap->fposthdr(soap, soap->tmpbuf, NULL))) - { soap->fclosesocket(soap, (SOAP_SOCKET)fd); - return SOAP_INVALID_SOCKET; - } -#ifndef WITH_LEAN - if (soap->proxy_userid && soap->proxy_passwd && strlen(soap->proxy_userid) + strlen(soap->proxy_passwd) < 761) - { sprintf(soap->tmpbuf + 262, "%s:%s", soap->proxy_userid, soap->proxy_passwd); - strcpy(soap->tmpbuf, "Basic "); - soap_s2base64(soap, (const unsigned char*)(soap->tmpbuf + 262), soap->tmpbuf + 6, strlen(soap->tmpbuf + 262)); - if ((soap->error = soap->fposthdr(soap, "Proxy-Authorization", soap->tmpbuf))) - { soap->fclosesocket(soap, (SOAP_SOCKET)fd); - return soap->error; - } - } -#endif - if ((soap->error = soap->fposthdr(soap, NULL, NULL)) - || soap_flush(soap)) - { soap->fclosesocket(soap, (SOAP_SOCKET)fd); - return SOAP_INVALID_SOCKET; - } - soap->omode = k; - k = soap->imode; - soap->imode &= ~SOAP_ENC; /* mask IO and ENC */ - strcpy(endp, soap->endpoint); - userid = soap->userid; /* preserve */ - passwd = soap->passwd; /* preserve */ - if ((soap->error = soap->fparse(soap))) - { soap->fclosesocket(soap, (SOAP_SOCKET)fd); - return SOAP_INVALID_SOCKET; - } - strcpy(soap->endpoint, endp); /* restore */ - soap->userid = userid; /* restore */ - soap->passwd = passwd; /* restore */ - soap->imode = k; /* restore */ - soap->count = n; /* restore */ - if (soap_begin_send(soap)) - { soap->fclosesocket(soap, (SOAP_SOCKET)fd); - return SOAP_INVALID_SOCKET; - } - } - if (!soap->ctx && (soap->error = soap->fsslauth(soap))) - { soap_set_sender_error(soap, "SSL error", "SSL authentication failed in tcp_connect(): check password, key file, and ca file.", SOAP_SSL_ERROR); - soap->fclosesocket(soap, (SOAP_SOCKET)fd); - return SOAP_INVALID_SOCKET; - } - soap->ssl = SSL_new(soap->ctx); - if (!soap->ssl) - { soap->fclosesocket(soap, (SOAP_SOCKET)fd); - soap->error = SOAP_SSL_ERROR; - return SOAP_INVALID_SOCKET; - } - if (soap->session) - { if (!strcmp(soap->session_host, host) && soap->session_port == port) - SSL_set_session(soap->ssl, soap->session); - SSL_SESSION_free(soap->session); - soap->session = NULL; - } - soap->imode |= SOAP_ENC_SSL; - soap->omode |= SOAP_ENC_SSL; - bio = BIO_new_socket((SOAP_SOCKET)fd, BIO_NOCLOSE); - SSL_set_bio(soap->ssl, bio, bio); -#ifndef WITH_LEAN - if (soap->connect_timeout) -#if defined(WIN32) - { u_long nonblocking = 1; - ioctlsocket((SOAP_SOCKET)fd, FIONBIO, &nonblocking); - } -#elif defined(VXWORKS) - { u_long nonblocking = 1; - ioctl((SOAP_SOCKET)fd, FIONBIO, (int)(&nonblocking)); - } -#else - fcntl((SOAP_SOCKET)fd, F_SETFL, fcntl((SOAP_SOCKET)fd, F_GETFL)|O_NONBLOCK); -#endif -#endif - for (;;) - { if ((r = SSL_connect(soap->ssl)) <= 0) - { int err = SSL_get_error(soap->ssl, r); - if (err != SSL_ERROR_NONE && err != SSL_ERROR_WANT_READ && err != SSL_ERROR_WANT_WRITE) - { soap_set_sender_error(soap, soap_ssl_error(soap, r), "SSL connect failed in tcp_connect()", SOAP_SSL_ERROR); - soap->fclosesocket(soap, (SOAP_SOCKET)fd); - return SOAP_INVALID_SOCKET; - } - if (soap->connect_timeout) - { struct timeval timeout; - fd_set fds; - if (soap->connect_timeout > 0) - { timeout.tv_sec = soap->connect_timeout; - timeout.tv_usec = 0; - } - else - { timeout.tv_sec = -soap->connect_timeout/1000000; - timeout.tv_usec = -soap->connect_timeout%1000000; - } -#ifndef WIN32 - if ((int)soap->socket >= (int)FD_SETSIZE) - { soap->error = SOAP_FD_EXCEEDED; - return SOAP_INVALID_SOCKET; /* Hint: MUST increase FD_SETSIZE */ - } -#endif - FD_ZERO(&fds); - FD_SET((SOAP_SOCKET)fd, &fds); - for (;;) - { int r = select((SOAP_SOCKET)(fd + 1), &fds, NULL, &fds, &timeout); - if (r > 0) - break; - if (!r) - { soap->errnum = 0; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Connect timeout\n")); - soap_set_sender_error(soap, "Timeout", "connect failed in tcp_connect()", SOAP_TCP_ERROR); - soap->fclosesocket(soap, (SOAP_SOCKET)fd); - return SOAP_INVALID_SOCKET; - } - } - continue; - } - } - break; - } -#ifndef WITH_LEAN - if (soap->connect_timeout) -#ifdef WIN32 - { u_long blocking = 0; - ioctlsocket((SOAP_SOCKET)fd, FIONBIO, &blocking); - } -#elif defined(VXWORKS) - { u_long blocking = 0; - ioctl((SOAP_SOCKET)fd, FIONBIO, (int)(&blocking)); - } -#else - fcntl((SOAP_SOCKET)fd, F_SETFL, fcntl((SOAP_SOCKET)fd, F_GETFL)&~O_NONBLOCK); -#endif -#endif - if ((soap->ssl_flags & SOAP_SSL_REQUIRE_SERVER_AUTHENTICATION)) - { int err; - // TODO: add callback to verify server - if ((err = SSL_get_verify_result(soap->ssl)) != X509_V_OK) - { soap_set_sender_error(soap, X509_verify_cert_error_string(err), "SSL certificate presented by peer cannot be verified in tcp_connect()", SOAP_SSL_ERROR); - soap->fclosesocket(soap, (SOAP_SOCKET)fd); - return SOAP_INVALID_SOCKET; - } - if (!(soap->ssl_flags & SOAP_SSL_SKIP_HOST_CHECK)) - { X509_NAME *subj; - int ext_count; - int ok = 0; - X509 *peer; - peer = SSL_get_peer_certificate(soap->ssl); - if (!peer) - { soap_set_sender_error(soap, "SSL error", "No SSL certificate was presented by the peer in tcp_connect()", SOAP_SSL_ERROR); - soap->fclosesocket(soap, (SOAP_SOCKET)fd); - return SOAP_INVALID_SOCKET; - } - ext_count = X509_get_ext_count(peer); - if (ext_count > 0) - { int i; - for (i = 0; i < ext_count; i++) - { X509_EXTENSION *ext = X509_get_ext(peer, i); - const char *ext_str = OBJ_nid2sn(OBJ_obj2nid(X509_EXTENSION_get_object(ext))); - if (ext_str && !strcmp(ext_str, "subjectAltName")) - { X509V3_EXT_METHOD *meth = X509V3_EXT_get(ext); - void *ext_data; - unsigned char *data; - STACK_OF(CONF_VALUE) *val; - int j; - if (!meth) - break; - data = ext->value->data; -#if (OPENSSL_VERSION_NUMBER > 0x00907000L) - if (meth->it) - ext_data = ASN1_item_d2i(NULL, &data, ext->value->length, ASN1_ITEM_ptr(meth->it)); - else - { /* OpenSSL not perfectly portable at this point (?): - Some compilers appear to prefer - meth->d2i(NULL, (const unsigned char**)&data, ... - */ - ext_data = meth->d2i(NULL, &data, ext->value->length); - } -#else - ext_data = meth->d2i(NULL, &data, ext->value->length); -#endif - val = meth->i2v(meth, ext_data, NULL); - for (j = 0; j < sk_CONF_VALUE_num(val); j++) - { CONF_VALUE *nval = sk_CONF_VALUE_value(val, j); - if (nval && !strcmp(nval->name, "DNS") && !strcmp(nval->value, host)) - { ok = 1; - break; - } - } - } - if (ok) - break; - } - } - if (!ok && (subj = X509_get_subject_name(peer))) - { int i = -1; - do - { ASN1_STRING *name; - i = X509_NAME_get_index_by_NID(subj, NID_commonName, i); - if (i == -1) - break; - name = X509_NAME_ENTRY_get_data(X509_NAME_get_entry(subj, i)); - if (name && !soap_tag_cmp((const char*)name, host)) - ok = 1; - else - { unsigned char *tmp = NULL; - ASN1_STRING_to_UTF8(&tmp, name); - if (tmp) - { if (!soap_tag_cmp((const char*)tmp, host)) - ok = 1; - OPENSSL_free(tmp); - } - } - } while (!ok); - } - X509_free(peer); - if (!ok) - { soap_set_sender_error(soap, "SSL error", "SSL certificate host name mismatch in tcp_connect()", SOAP_SSL_ERROR); - soap->fclosesocket(soap, (SOAP_SOCKET)fd); - return SOAP_INVALID_SOCKET; - } - } - } -#else - soap->fclosesocket(soap, (SOAP_SOCKET)fd); - soap->error = SOAP_SSL_ERROR; - return SOAP_INVALID_SOCKET; -#endif - } - return fd; -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_NOIO -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_bind(struct soap *soap, const char *host, int port, int backlog) -{ -#ifdef WITH_IPV6 - struct addrinfo *addrinfo = NULL; - struct addrinfo hints; - struct addrinfo res; - int err; -#endif -#ifndef WITH_LEAN - int len = SOAP_BUFLEN; - int set = 1; -#endif - if (soap_valid_socket(soap->master)) - { soap->fclosesocket(soap, (SOAP_SOCKET)soap->master); - soap->master = SOAP_INVALID_SOCKET; - } - soap->socket = SOAP_INVALID_SOCKET; - soap->errmode = 1; - if (tcp_init(soap)) - { soap_set_receiver_error(soap, tcp_error(soap), "TCP init failed in soap_bind()", SOAP_TCP_ERROR); - return SOAP_INVALID_SOCKET; - } -#ifdef WITH_IPV6 - memset((void*)&hints, 0, sizeof(hints)); - hints.ai_family = PF_UNSPEC; -#ifdef WITH_UDP - if ((soap->omode & SOAP_IO_UDP)) - hints.ai_socktype = SOCK_DGRAM; - else -#endif - hints.ai_socktype = SOCK_STREAM; - hints.ai_flags = AI_PASSIVE; - soap->errmode = 2; - err = getaddrinfo(host, soap_int2s(soap, port), &hints, &addrinfo); - if (addrinfo) - { res = *addrinfo; - soap->peer = *((struct sockaddr_storage*)addrinfo->ai_addr); - soap->peerlen = addrinfo->ai_addrlen; - res.ai_addr = (struct sockaddr*)&soap->peer; - res.ai_addrlen = soap->peerlen; - freeaddrinfo(addrinfo); - } - if (err) - { soap_set_receiver_error(soap, gai_strerror(err), "getaddrinfo failed in soap_bind()", SOAP_TCP_ERROR); - return SOAP_INVALID_SOCKET; - } - soap->master = socket(res.ai_family, res.ai_socktype, res.ai_protocol); -#else -#ifdef WITH_UDP - if ((soap->omode & SOAP_IO_UDP)) - soap->master = (int)socket(AF_INET, SOCK_DGRAM, 0); - else -#endif - soap->master = (int)socket(AF_INET, SOCK_STREAM, 0); -#endif - soap->errmode = 0; - if (!soap_valid_socket(soap->master)) - { soap->errnum = soap_socket_errno(soap->master); - soap_set_receiver_error(soap, tcp_error(soap), "socket failed in soap_bind()", SOAP_TCP_ERROR); - return SOAP_INVALID_SOCKET; - } -#ifdef WITH_UDP - if ((soap->omode & SOAP_IO_UDP)) - soap->socket = soap->master; -#endif -#ifdef SOCKET_CLOSE_ON_EXEC -#ifdef WIN32 -#ifndef UNDER_CE - SetHandleInformation((HANDLE)soap->master, HANDLE_FLAG_INHERIT, 0); -#endif -#else - fcntl(soap->master, F_SETFD, 1); -#endif -#endif -#ifndef WITH_LEAN - if (soap->bind_flags && setsockopt((SOAP_SOCKET)soap->master, SOL_SOCKET, soap->bind_flags, (char*)&set, sizeof(int))) - { soap->errnum = soap_socket_errno(soap->master); - soap_set_receiver_error(soap, tcp_error(soap), "setsockopt failed in soap_bind()", SOAP_TCP_ERROR); - return SOAP_INVALID_SOCKET; - } - if (((soap->imode | soap->omode) & SOAP_IO_KEEPALIVE) && setsockopt((SOAP_SOCKET)soap->master, SOL_SOCKET, SO_KEEPALIVE, (char*)&set, sizeof(int))) - { soap->errnum = soap_socket_errno(soap->master); - soap_set_receiver_error(soap, tcp_error(soap), "setsockopt SO_KEEPALIVE failed in soap_bind()", SOAP_TCP_ERROR); - return SOAP_INVALID_SOCKET; - } - if (setsockopt((SOAP_SOCKET)soap->master, SOL_SOCKET, SO_SNDBUF, (char*)&len, sizeof(int))) - { soap->errnum = soap_socket_errno(soap->master); - soap_set_receiver_error(soap, tcp_error(soap), "setsockopt SO_SNDBUF failed in soap_bind()", SOAP_TCP_ERROR); - return SOAP_INVALID_SOCKET; - } - if (setsockopt((SOAP_SOCKET)soap->master, SOL_SOCKET, SO_RCVBUF, (char*)&len, sizeof(int))) - { soap->errnum = soap_socket_errno(soap->master); - soap_set_receiver_error(soap, tcp_error(soap), "setsockopt SO_RCVBUF failed in soap_bind()", SOAP_TCP_ERROR); - return SOAP_INVALID_SOCKET; - } -#ifdef TCP_NODELAY - if (!(soap->omode & SOAP_IO_UDP) && setsockopt((SOAP_SOCKET)soap->master, IPPROTO_TCP, TCP_NODELAY, (char*)&set, sizeof(int))) - { soap->errnum = soap_socket_errno(soap->master); - soap_set_receiver_error(soap, tcp_error(soap), "setsockopt TCP_NODELAY failed in soap_bind()", SOAP_TCP_ERROR); - return SOAP_INVALID_SOCKET; - } -#endif -#endif -#ifdef WITH_IPV6 - soap->errmode = 0; - if (bind((SOAP_SOCKET)soap->master, res.ai_addr, res.ai_addrlen)) - { soap->errnum = soap_socket_errno(soap->master); - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Could not bind to host\n")); - soap_closesock(soap); - soap_set_receiver_error(soap, tcp_error(soap), "bind failed in soap_bind()", SOAP_TCP_ERROR); - return SOAP_INVALID_SOCKET; - } -#else - soap->peerlen = sizeof(soap->peer); - memset((void*)&soap->peer, 0, sizeof(soap->peer)); - soap->peer.sin_family = AF_INET; - soap->errmode = 2; - if (host) - { if (soap->fresolve(soap, host, &soap->peer.sin_addr)) - { soap_set_receiver_error(soap, tcp_error(soap), "get host by name failed in soap_bind()", SOAP_TCP_ERROR); - return SOAP_INVALID_SOCKET; - } - } - else - soap->peer.sin_addr.s_addr = htonl(INADDR_ANY); - soap->peer.sin_port = htons((short)port); - soap->errmode = 0; - if (bind((SOAP_SOCKET)soap->master, (struct sockaddr*)&soap->peer, soap->peerlen)) - { soap->errnum = soap_socket_errno(soap->master); - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Could not bind to host\n")); - soap_closesock(soap); - soap_set_receiver_error(soap, tcp_error(soap), "bind failed in soap_bind()", SOAP_TCP_ERROR); - return SOAP_INVALID_SOCKET; - } -#endif - if (!(soap->omode & SOAP_IO_UDP) && listen((SOAP_SOCKET)soap->master, backlog)) - { soap->errnum = soap_socket_errno(soap->master); - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Could not bind to host\n")); - soap_closesock(soap); - soap_set_receiver_error(soap, tcp_error(soap), "listen failed in soap_bind()", SOAP_TCP_ERROR); - return SOAP_INVALID_SOCKET; - } - return soap->master; -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_NOIO -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_poll(struct soap *soap) -{ -#ifndef WITH_LEAN - struct timeval timeout; - fd_set rfd, sfd, xfd; - int r; - timeout.tv_sec = 0; - timeout.tv_usec = 0; -#ifndef WIN32 - if ((int)soap->socket >= (int)FD_SETSIZE) - return SOAP_FD_EXCEEDED; /* Hint: MUST increase FD_SETSIZE */ -#endif - FD_ZERO(&rfd); - FD_ZERO(&sfd); - FD_ZERO(&xfd); - if (soap_valid_socket(soap->socket)) - { FD_SET((SOAP_SOCKET)soap->socket, &rfd); - FD_SET((SOAP_SOCKET)soap->socket, &sfd); - FD_SET((SOAP_SOCKET)soap->socket, &xfd); - r = select((SOAP_SOCKET)(soap->socket + 1), &rfd, &sfd, &xfd, &timeout); - if (r > 0 && FD_ISSET((SOAP_SOCKET)soap->socket, &xfd)) - r = -1; - } - else if (soap_valid_socket(soap->master)) - { FD_SET((SOAP_SOCKET)soap->master, &sfd); - r = select((SOAP_SOCKET)(soap->master + 1), NULL, &sfd, NULL, &timeout); - } - else - return SOAP_OK; - if (r > 0) - { -#ifdef WITH_OPENSSL - if (soap->imode & SOAP_ENC_SSL) - { - if (soap_valid_socket(soap->socket) - && FD_ISSET((SOAP_SOCKET)soap->socket, &sfd) - && (!FD_ISSET((SOAP_SOCKET)soap->socket, &rfd) - || SSL_peek(soap->ssl, soap->tmpbuf, 1) > 0)) - return SOAP_OK; - } - else -#endif - if (soap_valid_socket(soap->socket) - && FD_ISSET((SOAP_SOCKET)soap->socket, &sfd) - && (!FD_ISSET((SOAP_SOCKET)soap->socket, &rfd) - || recv((SOAP_SOCKET)soap->socket, soap->tmpbuf, 1, MSG_PEEK) > 0)) - return SOAP_OK; - } - else if (r < 0) - { soap->errnum = soap_socket_errno(soap->master); - if ((soap_valid_socket(soap->master) || soap_valid_socket(soap->socket)) && soap_socket_errno(soap->master) != SOAP_EINTR) - { soap_set_receiver_error(soap, tcp_error(soap), "select failed in soap_poll()", SOAP_TCP_ERROR); - return soap->error = SOAP_TCP_ERROR; - } - } - else - soap->errnum = 0; - DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Polling: other end down on socket=%d select=%d\n", soap->socket, r)); - return SOAP_EOF; -#else - return SOAP_OK; -#endif -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_NOIO -#ifndef PALM_1 -static int -tcp_accept(struct soap *soap, int s, struct sockaddr *a, int *n) -{ int fd; - fd = (int)accept((SOAP_SOCKET)s, a, (SOAP_SOCKLEN_T*)n); /* portability note: see SOAP_SOCKLEN_T definition in stdsoap2.h */ -#ifdef SOCKET_CLOSE_ON_EXEC -#ifdef WIN32 -#ifndef UNDER_CE - SetHandleInformation((HANDLE)fd, HANDLE_FLAG_INHERIT, 0); -#endif -#else - fcntl(fd, F_SETFD, FD_CLOEXEC); -#endif -#endif - return fd; -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_NOIO -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_accept(struct soap *soap) -{ int n = (int)sizeof(soap->peer); -#ifndef WITH_LEAN - int len = SOAP_BUFLEN; - int set = 1; -#endif - soap->error = SOAP_OK; -#ifdef WITH_UDP - if ((soap->omode & SOAP_IO_UDP)) - return soap->socket = soap->master; -#endif - memset((void*)&soap->peer, 0, sizeof(soap->peer)); - soap->socket = SOAP_INVALID_SOCKET; - soap->errmode = 0; - soap->keep_alive = 0; - if (soap_valid_socket(soap->master)) - { register int err; - for (;;) - { -#ifndef WITH_LEAN - if (soap->accept_timeout) - { struct timeval timeout; - fd_set fd; - if (soap->accept_timeout > 0) - { timeout.tv_sec = soap->accept_timeout; - timeout.tv_usec = 0; - } - else - { timeout.tv_sec = -soap->accept_timeout/1000000; - timeout.tv_usec = -soap->accept_timeout%1000000; - } -#ifndef WIN32 - if ((int)soap->socket >= (int)FD_SETSIZE) - { soap->error = SOAP_FD_EXCEEDED; - return SOAP_INVALID_SOCKET; /* Hint: MUST increase FD_SETSIZE */ - } -#endif - FD_ZERO(&fd); - FD_SET((SOAP_SOCKET)soap->master, &fd); - for (;;) - { register int r = select((SOAP_SOCKET)(soap->master + 1), &fd, &fd, NULL, &timeout); - if (r > 0) - break; - if (!r) - { soap->errnum = 0; - soap_set_receiver_error(soap, "Timeout", "accept failed in soap_accept()", SOAP_TCP_ERROR); - return SOAP_INVALID_SOCKET; - } - r = soap_socket_errno(soap->master); - if (r != SOAP_EINTR) - { soap->errnum = r; - soap_closesock(soap); - soap_set_sender_error(soap, tcp_error(soap), "accept failed in soap_accept()", SOAP_TCP_ERROR); - return SOAP_INVALID_SOCKET; - } - } -#if defined(WIN32) - { u_long nonblocking = 1; - ioctlsocket((SOAP_SOCKET)soap->master, FIONBIO, &nonblocking); - } -#elif defined(VXWORKS) - { u_long nonblocking = 1; - ioctl((SOAP_SOCKET)soap->master, FIONBIO, (int)(&nonblocking)); - } -#else - fcntl((SOAP_SOCKET)soap->master, F_SETFL, fcntl((SOAP_SOCKET)soap->master, F_GETFL)|O_NONBLOCK); -#endif - } - else -#if defined(WIN32) - { u_long blocking = 0; - ioctlsocket((SOAP_SOCKET)soap->master, FIONBIO, &blocking); - } -#elif defined(VXWORKS) - { u_long blocking = 0; - ioctl((SOAP_SOCKET)soap->master, FIONBIO, (int)(&blocking)); - } -#else - fcntl((SOAP_SOCKET)soap->master, F_SETFL, fcntl((SOAP_SOCKET)soap->master, F_GETFL)&~O_NONBLOCK); -#endif -#endif - soap->socket = soap->faccept(soap, soap->master, (struct sockaddr*)&soap->peer, &n); - soap->peerlen = (size_t)n; - if (soap_valid_socket(soap->socket)) - { -#ifdef WITH_IPV6 -/* Use soap->host to store the numeric form of the remote host */ - getnameinfo((struct sockaddr*)&soap->peer, n, soap->host, sizeof(soap->host), NULL, 0, NI_NUMERICHOST | NI_NUMERICSERV); - DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Accept socket %d from %s\n", soap->socket, soap->host)); - soap->ip = 0; /* info stored in soap->peer and soap->host */ - soap->port = 0; /* info stored in soap->peer and soap->host */ -#else - soap->ip = ntohl(soap->peer.sin_addr.s_addr); - soap->port = (int)ntohs(soap->peer.sin_port); /* does not return port number on some systems */ - DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Accept socket %d at port %d from IP %d.%d.%d.%d\n", soap->socket, soap->port, (int)(soap->ip>>24)&0xFF, (int)(soap->ip>>16)&0xFF, (int)(soap->ip>>8)&0xFF, (int)soap->ip&0xFF)); -#endif -#ifndef WITH_LEAN - if (soap->accept_flags == SO_LINGER) - { struct linger linger; - memset((void*)&linger, 0, sizeof(linger)); - linger.l_onoff = 1; - linger.l_linger = 0; - if (setsockopt((SOAP_SOCKET)soap->socket, SOL_SOCKET, SO_LINGER, (char*)&linger, sizeof(struct linger))) - { soap->errnum = soap_socket_errno(soap->socket); - soap_set_receiver_error(soap, tcp_error(soap), "setsockopt SO_LINGER failed in soap_accept()", SOAP_TCP_ERROR); - soap_closesock(soap); - return SOAP_INVALID_SOCKET; - } - } - else if (soap->accept_flags && setsockopt((SOAP_SOCKET)soap->socket, SOL_SOCKET, soap->accept_flags, (char*)&set, sizeof(int))) - { soap->errnum = soap_socket_errno(soap->socket); - soap_set_receiver_error(soap, tcp_error(soap), "setsockopt failed in soap_accept()", SOAP_TCP_ERROR); - soap_closesock(soap); - return SOAP_INVALID_SOCKET; - } - if (((soap->imode | soap->omode) & SOAP_IO_KEEPALIVE) && setsockopt((SOAP_SOCKET)soap->socket, SOL_SOCKET, SO_KEEPALIVE, (char*)&set, sizeof(int))) - { soap->errnum = soap_socket_errno(soap->socket); - soap_set_receiver_error(soap, tcp_error(soap), "setsockopt SO_KEEPALIVE failed in soap_accept()", SOAP_TCP_ERROR); - soap_closesock(soap); - return SOAP_INVALID_SOCKET; - } - if (setsockopt((SOAP_SOCKET)soap->socket, SOL_SOCKET, SO_SNDBUF, (char*)&len, sizeof(int))) - { soap->errnum = soap_socket_errno(soap->socket); - soap_set_receiver_error(soap, tcp_error(soap), "setsockopt SO_SNDBUF failed in soap_accept()", SOAP_TCP_ERROR); - soap_closesock(soap); - return SOAP_INVALID_SOCKET; - } - if (setsockopt((SOAP_SOCKET)soap->socket, SOL_SOCKET, SO_RCVBUF, (char*)&len, sizeof(int))) - { soap->errnum = soap_socket_errno(soap->socket); - soap_set_receiver_error(soap, tcp_error(soap), "setsockopt SO_RCVBUF failed in soap_accept()", SOAP_TCP_ERROR); - soap_closesock(soap); - return SOAP_INVALID_SOCKET; - } -#ifdef TCP_NODELAY - if (!(soap->omode & SOAP_IO_UDP) && setsockopt((SOAP_SOCKET)soap->socket, IPPROTO_TCP, TCP_NODELAY, (char*)&set, sizeof(int))) - { soap->errnum = soap_socket_errno(soap->socket); - soap_set_receiver_error(soap, tcp_error(soap), "setsockopt TCP_NODELAY failed in soap_accept()", SOAP_TCP_ERROR); - soap_closesock(soap); - return SOAP_INVALID_SOCKET; - } -#endif -#endif - if (soap->accept_timeout) - { -#if defined(WIN32) - u_long blocking = 0; - ioctlsocket((SOAP_SOCKET)soap->master, FIONBIO, &blocking); - ioctlsocket((SOAP_SOCKET)soap->socket, FIONBIO, &blocking); -#elif defined(VXWORKS) - u_long blocking = 0; - ioctl((SOAP_SOCKET)soap->master, FIONBIO, (int)(&blocking)); - ioctl((SOAP_SOCKET)soap->socket, FIONBIO, (int)(&blocking)); -#elif defined(PALM) - fcntl((SOAP_SOCKET)soap->master, F_SETFL, fcntl((SOAP_SOCKET)soap->master, F_GETFL,0)&~O_NONBLOCK); - fcntl((SOAP_SOCKET)soap->socket, F_SETFL, fcntl((SOAP_SOCKET)soap->socket, F_GETFL,0)&~O_NONBLOCK); -#elif defined(SYMBIAN) - long blocking = 0; - ioctl((SOAP_SOCKET)soap->master, 0/*FIONBIO*/, &blocking); -#else - fcntl((SOAP_SOCKET)soap->master, F_SETFL, fcntl((SOAP_SOCKET)soap->master, F_GETFL)&~O_NONBLOCK); - fcntl((SOAP_SOCKET)soap->socket, F_SETFL, fcntl((SOAP_SOCKET)soap->socket, F_GETFL)&~O_NONBLOCK); -#endif - } - soap->keep_alive = (((soap->imode | soap->omode) & SOAP_IO_KEEPALIVE) != 0); - return soap->socket; - } - err = soap_socket_errno(soap->socket); - if (err != 0 && err != SOAP_EINTR && err != SOAP_EAGAIN) - { DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Accept failed from %s\n", soap->host)); - soap->errnum = err; - soap_set_receiver_error(soap, tcp_error(soap), "accept failed in soap_accept()", SOAP_TCP_ERROR); - soap_closesock(soap); - return SOAP_INVALID_SOCKET; - } - } - } - else - { soap->errnum = 0; - soap_set_receiver_error(soap, tcp_error(soap), "no master socket in soap_accept()", SOAP_TCP_ERROR); - return SOAP_INVALID_SOCKET; - } -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_NOIO -#ifndef PALM_1 -static int -tcp_disconnect(struct soap *soap) -{ -#ifdef WITH_OPENSSL - if (soap->ssl) - { int r, s = 0; - if (soap->session) - SSL_SESSION_free(soap->session); - if (*soap->host) - { soap->session = SSL_get1_session(soap->ssl); - if (soap->session) - { strcpy(soap->session_host, soap->host); - soap->session_port = soap->port; - } - } - r = SSL_shutdown(soap->ssl); - if (r != 1) - { s = ERR_get_error(); - if (s) - { if (soap_valid_socket(soap->socket)) - { soap->fshutdownsocket(soap, (SOAP_SOCKET)soap->socket, 1); - soap->socket = SOAP_INVALID_SOCKET; - } - r = SSL_shutdown(soap->ssl); - } - } - DBGLOG(TEST, if (s) SOAP_MESSAGE(fdebug, "Shutdown failed: %d\n", SSL_get_error(soap->ssl, r))); - SSL_free(soap->ssl); - soap->ssl = NULL; - if (s) - return SOAP_SSL_ERROR; - ERR_remove_state(0); - } -#endif - if (soap_valid_socket(soap->socket) && !(soap->omode & SOAP_IO_UDP)) - { soap->fshutdownsocket(soap, (SOAP_SOCKET)soap->socket, 2); - soap->fclosesocket(soap, (SOAP_SOCKET)soap->socket); - soap->socket = SOAP_INVALID_SOCKET; - } - return SOAP_OK; -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_NOIO -#ifndef PALM_1 -static int -tcp_closesocket(struct soap *soap, SOAP_SOCKET fd) -{ DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Close socket %d\n", (int)fd)); - return soap_closesocket(fd); -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_NOIO -#ifndef PALM_1 -static int -tcp_shutdownsocket(struct soap *soap, SOAP_SOCKET fd, int how) -{ DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Shutdown socket %d how=%d\n", (int)fd, how)); - return shutdown(fd, how); -} -#endif -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_closesock(struct soap *soap) -{ register int status = soap->error; - if (status == SOAP_EOF || status == SOAP_TCP_ERROR || status == SOAP_SSL_ERROR || !soap->keep_alive) - { if (soap->fclose && (soap->error = soap->fclose(soap))) - return soap->error; - soap->keep_alive = 0; - } -#ifdef WITH_ZLIB - if (soap->zlib_state == SOAP_ZLIB_DEFLATE) - deflateEnd(&soap->d_stream); - else if (soap->zlib_state == SOAP_ZLIB_INFLATE) - inflateEnd(&soap->d_stream); - soap->zlib_state = SOAP_ZLIB_NONE; -#endif - return soap->error = status; -} -#endif - -/******************************************************************************/ -#ifndef WITH_NOIDREF -#ifndef PALM_2 -SOAP_FMAC1 -size_t -SOAP_FMAC2 -soap_hash(register const char *s) -{ register size_t h = 0; - while (*s) - h = 65599*h + *s++; - return h % SOAP_IDHASH; -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_NOIDREF -#ifndef PALM_1 -static void -soap_init_pht(struct soap *soap) -{ register int i; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Initializing pointer hashtable\n")); - soap->pblk = NULL; - soap->pidx = 0; - for (i = 0; i < (int)SOAP_PTRHASH; i++) - soap->pht[i] = NULL; -} -#endif -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -struct soap* -SOAP_FMAC2 -soap_new1(soap_mode mode) -{ return soap_new2(mode, mode); -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -struct soap* -SOAP_FMAC2 -soap_new() -{ return soap_new2(SOAP_IO_DEFAULT, SOAP_IO_DEFAULT); -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -struct soap* -SOAP_FMAC2 -soap_new2(soap_mode imode, soap_mode omode) -{ struct soap *soap = (struct soap*)malloc(sizeof(struct soap)); - if (soap) - soap_init2(soap, imode, omode); - return soap; -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_free(struct soap *soap) -{ soap_done(soap); - free(soap); -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_del(struct soap *soap) -{ free(soap); -} -#endif - -/******************************************************************************/ -#ifndef WITH_NOIDREF -#ifndef PALM_1 -static void -soap_free_pht(struct soap *soap) -{ register struct soap_pblk *pb, *next; - register int i; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Free pointer hashtable\n")); - for (pb = soap->pblk; pb; pb = next) - { next = pb->next; - SOAP_FREE(soap, pb); - } - soap->pblk = NULL; - soap->pidx = 0; - for (i = 0; i < (int)SOAP_PTRHASH; i++) - soap->pht[i] = NULL; -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_NOIDREF -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_embed(struct soap *soap, const void *p, const struct soap_array *a, int n, const char *tag, int type) -{ register int i; - struct soap_plist *pp; - if (soap->version != 1) - soap->encoding = 1; - if (a) - i = soap_array_pointer_lookup(soap, p, a, n, type, &pp); - else - i = soap_pointer_lookup(soap, p, type, &pp); - if (i) - { if (soap_is_embedded(soap, pp) - || soap_is_single(soap, pp)) - return 0; - soap_set_embedded(soap, pp); - } - return i; -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_NOIDREF -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_pointer_lookup(struct soap *soap, const void *p, int type, struct soap_plist **ppp) -{ register struct soap_plist *pp; - *ppp = NULL; - if (p) - { for (pp = soap->pht[soap_hash_ptr(p)]; pp; pp = pp->next) - { if (pp->ptr == p && pp->type == type) - { *ppp = pp; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Lookup location=%p type=%d id=%d\n", p, type, pp->id)); - return pp->id; - } - } - } - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Lookup location=%p type=%d: not found\n", p, type)); - return 0; -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_NOIDREF -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_pointer_enter(struct soap *soap, const void *p, const struct soap_array *a, int n, int type, struct soap_plist **ppp) -{ register size_t h; - register struct soap_plist *pp; - if (!soap->pblk || soap->pidx >= SOAP_PTRBLK) - { register struct soap_pblk *pb = (struct soap_pblk*)SOAP_MALLOC(soap, sizeof(struct soap_pblk)); - if (!pb) - { soap->error = SOAP_EOM; - return 0; - } - pb->next = soap->pblk; - soap->pblk = pb; - soap->pidx = 0; - } - *ppp = pp = &soap->pblk->plist[soap->pidx++]; - if (a) - h = soap_hash_ptr(a->__ptr); - else - h = soap_hash_ptr(p); - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Pointer enter location=%p array=%p size=%d dim=%d type=%d id=%d\n", p, a?a->__ptr:NULL, a?a->__size:0, n, type, soap->idnum+1)); - pp->next = soap->pht[h]; - pp->type = type; - pp->mark1 = 0; - pp->mark2 = 0; - pp->ptr = p; - pp->array = a; - soap->pht[h] = pp; - pp->id = ++soap->idnum; - return pp->id; -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_NOIDREF -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_array_pointer_lookup(struct soap *soap, const void *p, const struct soap_array *a, int n, int type, struct soap_plist **ppp) -{ register struct soap_plist *pp; - *ppp = NULL; - if (!p || !a->__ptr) - return 0; - for (pp = soap->pht[soap_hash_ptr(a->__ptr)]; pp; pp = pp->next) - { if (pp->type == type && pp->array && pp->array->__ptr == a->__ptr) - { register int i; - for (i = 0; i < n; i++) - if (((const int*)&pp->array->__size)[i] != ((const int*)&a->__size)[i]) - break; - if (i == n) - { *ppp = pp; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Array lookup location=%p type=%d id=%d\n", a->__ptr, type, pp->id)); - return pp->id; - } - } - } - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Array lookup location=%p type=%d: not found\n", a->__ptr, type)); - return 0; -} -#endif -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_begin_count(struct soap *soap) -{ -#ifndef WITH_LEANER - if ((soap->mode & SOAP_ENC_DIME) || (soap->omode & SOAP_ENC_DIME)) - soap->mode = soap->omode | SOAP_IO_LENGTH | SOAP_ENC_DIME; - else -#endif - { soap->mode = soap->omode; - if ((soap->mode & SOAP_IO) == SOAP_IO_STORE - || (((soap->mode & SOAP_IO) == SOAP_IO_CHUNK || (soap->mode & SOAP_ENC_XML)) -#ifndef WITH_LEANER - && !soap->fpreparesend -#endif - )) - soap->mode &= ~SOAP_IO_LENGTH; - else - soap->mode |= SOAP_IO_LENGTH; - } -#ifdef WITH_ZLIB - if ((soap->mode & SOAP_ENC_ZLIB) && (soap->mode & SOAP_IO) == SOAP_IO_FLUSH) - { if (!(soap->mode & SOAP_ENC_DIME)) - soap->mode &= ~SOAP_IO_LENGTH; - if (soap->mode & SOAP_ENC_XML) - soap->mode |= SOAP_IO_BUFFER; - else - soap->mode |= SOAP_IO_STORE; - } -#endif - if (!soap->encodingStyle && !(soap->mode & SOAP_XML_GRAPH)) - soap->mode |= SOAP_XML_TREE; -#ifndef WITH_LEANER - if ((soap->mode & SOAP_ENC_MTOM) && (soap->mode & SOAP_ENC_DIME)) - soap->mode |= SOAP_ENC_MIME; - else - soap->mode &= ~SOAP_ENC_MTOM; - if (soap->mode & SOAP_ENC_MIME) - soap_select_mime_boundary(soap); - soap->dime.list = soap->dime.last; /* keep track of last DIME attachment */ -#endif - soap->count = 0; - soap->ns = 0; - soap->null = 0; - soap->position = 0; - soap->mustUnderstand = 0; - soap->encoding = 0; - soap->part = SOAP_BEGIN; - soap->idnum = 0; - soap_clr_attr(soap); - soap_set_local_namespaces(soap); - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Begin count phase (socket=%d mode=0x%x count=%lu)\n", soap->socket, soap->mode, (unsigned long)soap->count)); -#ifndef WITH_LEANER - soap->dime.count = 0; /* count # of attachments */ - soap->dime.size = 0; /* accumulate total size of attachments */ - if (soap->fprepareinit && (soap->mode & SOAP_IO) != SOAP_IO_STORE) - return soap->error = soap->fprepareinit(soap); -#endif - return SOAP_OK; -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_end_count(struct soap *soap) -{ -#ifndef WITH_LEANER - if (soap->fpreparefinal) - return soap->error = soap->fpreparefinal(soap); -#endif - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "End of count phase\n")); - return SOAP_OK; -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_begin_send(struct soap *soap) -{ soap->error = SOAP_OK; - soap->mode = soap->omode | (soap->mode & (SOAP_IO_LENGTH | SOAP_ENC_DIME)); -#ifdef WITH_ZLIB - if ((soap->mode & SOAP_ENC_ZLIB) && (soap->mode & SOAP_IO) == SOAP_IO_FLUSH) - { if (soap->mode & SOAP_ENC_XML) - soap->mode |= SOAP_IO_BUFFER; - else - soap->mode |= SOAP_IO_STORE; - } -#endif -#ifdef WITH_UDP - if ((soap->mode & SOAP_IO_UDP)) - { soap->mode |= SOAP_ENC_XML; - if (soap->count > SOAP_BUFLEN) - return soap->error = SOAP_UDP_ERROR; - } -#endif - if ((soap->mode & SOAP_IO) == SOAP_IO_FLUSH && soap_valid_socket(soap->socket)) - { if (soap->count || (soap->mode & SOAP_IO_LENGTH) || (soap->mode & SOAP_ENC_XML)) - soap->mode |= SOAP_IO_BUFFER; - else - soap->mode |= SOAP_IO_STORE; - } - soap->mode &= ~SOAP_IO_LENGTH; - if ((soap->mode & SOAP_IO) == SOAP_IO_STORE) - soap_new_block(soap); - if (!(soap->mode & SOAP_IO_KEEPALIVE)) - soap->keep_alive = 0; - if (!soap->encodingStyle && !(soap->mode & SOAP_XML_GRAPH)) - soap->mode |= SOAP_XML_TREE; -#ifndef WITH_LEANER - if ((soap->mode & SOAP_ENC_MTOM) && (soap->mode & SOAP_ENC_DIME)) - { soap->mode |= SOAP_ENC_MIME; - soap->mode &= ~SOAP_ENC_DIME; - } - else - soap->mode &= ~SOAP_ENC_MTOM; - if (soap->mode & SOAP_ENC_MIME) - soap_select_mime_boundary(soap); -#ifdef WIN32 -#ifndef UNDER_CE -#ifndef WITH_FASTCGI - if (!soap_valid_socket(soap->socket)) /* Set win32 stdout or soap->sendfd to BINARY, e.g. to support DIME */ -#ifdef __BORLANDC__ - setmode((SOAP_SOCKET)soap->sendfd, O_BINARY); -#else - _setmode((SOAP_SOCKET)soap->sendfd, _O_BINARY); -#endif -#endif -#endif -#endif -#endif - if (soap->mode & SOAP_IO) - { soap->bufidx = 0; - soap->buflen = 0; - } - soap->chunksize = 0; - soap->ns = 0; - soap->null = 0; - soap->position = 0; - soap->mustUnderstand = 0; - soap->encoding = 0; - soap->idnum = 0; - soap->level = 0; - soap_clr_attr(soap); - soap_set_local_namespaces(soap); -#ifdef WITH_ZLIB - soap->z_ratio_out = 1.0; - if ((soap->mode & SOAP_ENC_ZLIB) && soap->zlib_state != SOAP_ZLIB_DEFLATE) - { -#ifdef WITH_GZIP - memcpy(soap->z_buf, "\37\213\10\0\0\0\0\0\0\377", 10); - soap->d_stream.next_out = (Byte*)soap->z_buf + 10; - soap->d_stream.avail_out = SOAP_BUFLEN - 10; - soap->z_crc = crc32(0L, NULL, 0); - if (deflateInit2(&soap->d_stream, soap->z_level, Z_DEFLATED, -MAX_WBITS, 8, Z_DEFAULT_STRATEGY) != Z_OK) -#else - soap->d_stream.next_out = (Byte*)soap->z_buf; - soap->d_stream.avail_out = SOAP_BUFLEN; - if (deflateInit(&soap->d_stream, soap->z_level) != Z_OK) -#endif - return soap->error = SOAP_ZLIB_ERROR; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Deflate initialized\n")); - soap->zlib_state = SOAP_ZLIB_DEFLATE; - } -#endif - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Begin send phase (socket=%d mode=0x%x count=%lu)\n", soap->socket, soap->mode, (unsigned long)soap->count)); - soap->part = SOAP_BEGIN; -#ifndef WITH_LEANER - if (soap->fprepareinit && (soap->mode & SOAP_IO) == SOAP_IO_STORE) - soap->fprepareinit(soap); -#endif - return SOAP_OK; -} -#endif - -/******************************************************************************/ -#ifndef WITH_NOIDREF -#ifndef PALM_2 -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_embedded(struct soap *soap, const void *p, int t) -{ struct soap_plist *pp; - if (soap_pointer_lookup(soap, p, t, &pp)) - { pp->mark1 = 1; - pp->mark2 = 1; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Embedded %p type=%d mark set to 1\n", p, t)); - } -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_NOIDREF -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_reference(struct soap *soap, const void *p, int t) -{ struct soap_plist *pp; - if (!p || (soap->mode & SOAP_XML_TREE)) - return 1; - if (soap_pointer_lookup(soap, p, t, &pp)) - { if (pp->mark1 == 0) - { pp->mark1 = 2; - pp->mark2 = 2; - } - } - else if (soap_pointer_enter(soap, p, NULL, 0, t, &pp)) - { pp->mark1 = 0; - pp->mark2 = 0; - } - else - return 1; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Reference %p type=%d (%d %d)\n", p, t, (int)pp->mark1, (int)pp->mark2)); - return pp->mark1; -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_NOIDREF -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_array_reference(struct soap *soap, const void *p, const struct soap_array *a, int n, int t) -{ register int i; - struct soap_plist *pp; - if (!p || !a->__ptr) - return 1; - i = soap_array_pointer_lookup(soap, p, a, n, t, &pp); - if (i) - { if (pp->mark1 == 0) - { pp->mark1 = 2; - pp->mark2 = 2; - } - } - else if (!soap_pointer_enter(soap, p, a, n, t, &pp)) - return 1; - else - { pp->mark1 = 0; - pp->mark2 = 0; - } - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Array reference %p ptr=%p dim=%d type=%d (%d %d)\n", p, a->__ptr, n, t, (int)pp->mark1, (int)pp->mark2)); - return pp->mark1; -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_NOIDREF -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_embedded_id(struct soap *soap, int id, const void *p, int t) -{ struct soap_plist *pp; - if (soap->mode & SOAP_XML_TREE) - return id; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Embedded_id %p type=%d id=%d\n", p, t, id)); - if (soap->version == 1 && soap->encodingStyle && !(soap->mode & SOAP_XML_GRAPH) && soap->part != SOAP_IN_HEADER) - { if (id < 0) - { id = soap_pointer_lookup(soap, p, t, &pp); - if (id) - { if (soap->mode & SOAP_IO_LENGTH) - pp->mark1 = 2; - else - pp->mark2 = 2; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Embedded_id multiref id=%d %p type=%d = (%d %d)\n", id, p, t, (int)pp->mark1, (int)pp->mark2)); - } - return -1; - } - return id; - } - if (id < 0) - id = soap_pointer_lookup(soap, p, t, &pp); - else if (id && !soap_pointer_lookup(soap, p, t, &pp)) - return 0; - if (id && pp) - { if (soap->mode & SOAP_IO_LENGTH) - pp->mark1 = 1; - else - pp->mark2 = 1; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Embedded_id embedded ref id=%d %p type=%d = (%d %d)\n", id, p, t, (int)pp->mark1, (int)pp->mark2)); - } - return id; -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_NOIDREF -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_is_embedded(struct soap *soap, struct soap_plist *pp) -{ if (!pp) - return 0; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Is embedded? %d %d\n", (int)pp->mark1, (int)pp->mark2)); - if (soap->version == 1 && soap->encodingStyle && !(soap->mode & SOAP_XML_GRAPH) && soap->part != SOAP_IN_HEADER) - { if (soap->mode & SOAP_IO_LENGTH) - return pp->mark1 != 0; - return pp->mark2 != 0; - } - if (soap->mode & SOAP_IO_LENGTH) - return pp->mark1 == 1; - return pp->mark2 == 1; -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_NOIDREF -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_is_single(struct soap *soap, struct soap_plist *pp) -{ if (soap->part == SOAP_IN_HEADER) - return 1; - if (!pp) - return 0; - if (soap->mode & SOAP_IO_LENGTH) - return pp->mark1 == 0; - return pp->mark2 == 0; -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_NOIDREF -#ifndef PALM_2 -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_set_embedded(struct soap *soap, struct soap_plist *pp) -{ if (!pp) - return; - if (soap->mode & SOAP_IO_LENGTH) - pp->mark1 = 1; - else - pp->mark2 = 1; -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_NOIDREF -#ifndef WITH_LEANER -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_attachment(struct soap *soap, const char *tag, int id, const void *p, const struct soap_array *a, const char *aid, const char *atype, const char *aoptions, int n, const char *type, int t) -{ struct soap_plist *pp; - int i; - if (!p || !a->__ptr || (!aid && !atype)) - return soap_element_id(soap, tag, id, p, a, n, type, t); - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Attachment tag='%s' id='%s' (%d) type='%s'\n", tag, aid?aid:"", id, atype?atype:"")); - i = soap_array_pointer_lookup(soap, p, a, n, t, &pp); - if (!i) - { i = soap_pointer_enter(soap, p, a, n, t, &pp); - if (!i) - { soap->error = SOAP_EOM; - return -1; - } - } - if (id <= 0) - id = i; - if (!aid) - { sprintf(soap->tmpbuf, soap->dime_id_format, id); - aid = soap_strdup(soap, soap->tmpbuf); - } - /* Add MTOM xop:Include element when necessary */ - /* TODO: this code to be obsoleted with new import/xop.h conventions */ - if ((soap->mode & SOAP_ENC_MTOM) && strcmp(tag, "xop:Include")) - { if (soap_element_begin_out(soap, tag, 0, type) - || soap_element_href(soap, "xop:Include", 0, "href", aid) - || soap_element_end_out(soap, tag)) - return soap->error; - } - else if (soap_element_href(soap, tag, 0, "href", aid)) - return soap->error; - if (soap->mode & SOAP_IO_LENGTH) - { if (pp->mark1 != 3) - { struct soap_multipart *content; - if (soap->mode & SOAP_ENC_MTOM) - content = soap_new_multipart(soap, &soap->mime.first, &soap->mime.last, (char*)a->__ptr, a->__size); - else - content = soap_new_multipart(soap, &soap->dime.first, &soap->dime.last, (char*)a->__ptr, a->__size); - if (!content) - { soap->error = SOAP_EOM; - return -1; - } - if (!strncmp(aid, "cid:", 4)) /* RFC 2111 */ - { if (soap->mode & SOAP_ENC_MTOM) - { char *s = (char*)soap_malloc(soap, strlen(aid) - 1); - if (s) - { *s = '<'; - strcpy(s + 1, aid + 4); - strcat(s, ">"); - content->id = s; - } - } - else - content->id = aid + 4; - } - else - content->id = aid; - content->type = atype; - content->options = aoptions; - content->encoding = SOAP_MIME_BINARY; - pp->mark1 = 3; - } - } - else - pp->mark2 = 3; - return -1; -} -#endif -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_NOIDREF -#ifndef PALM_1 -static void -soap_init_iht(struct soap *soap) -{ register int i; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Initializing ID hashtable\n")); - for (i = 0; i < SOAP_IDHASH; i++) - soap->iht[i] = NULL; -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_NOIDREF -#ifndef PALM_1 -static void -soap_free_iht(struct soap *soap) -{ register int i; - register struct soap_ilist *ip, *p; - register struct soap_flist *fp, *fq; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Free ID hashtable\n")); - for (i = 0; i < SOAP_IDHASH; i++) - { for (ip = soap->iht[i]; ip; ip = p) - { for (fp = ip->flist; fp; fp = fq) - { fq = fp->next; - SOAP_FREE(soap, fp); - } - p = ip->next; - SOAP_FREE(soap, ip); - } - soap->iht[i] = NULL; - } -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_NOIDREF -#ifndef PALM_2 -SOAP_FMAC1 -struct soap_ilist * -SOAP_FMAC2 -soap_lookup(struct soap *soap, const char *id) -{ register struct soap_ilist *ip; - for (ip = soap->iht[soap_hash(id)]; ip; ip = ip->next) - if (!strcmp(ip->id, id)) - return ip; - return NULL; -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_NOIDREF -#ifndef PALM_2 -SOAP_FMAC1 -struct soap_ilist * -SOAP_FMAC2 -soap_enter(struct soap *soap, const char *id) -{ register size_t h; - register struct soap_ilist *ip; - ip = (struct soap_ilist*)SOAP_MALLOC(soap, sizeof(struct soap_ilist) + strlen(id)); - if (ip) - { h = soap_hash(id); - strcpy(ip->id, id); - ip->next = soap->iht[h]; - soap->iht[h] = ip; - return ip; - } - return NULL; -} -#endif -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -void* -SOAP_FMAC2 -soap_malloc(struct soap *soap, size_t n) -{ register char *p; - if (!n) - return (void*)SOAP_NON_NULL; - if (!soap) - return SOAP_MALLOC(soap, n); - if (soap->fmalloc) - p = (char*)soap->fmalloc(soap, n); - else - { n += sizeof(short); - n += (-(long)n) & (sizeof(void*)-1); /* align at 4-, 8- or 16-byte boundary */ - if (!(p = (char*)SOAP_MALLOC(soap, n + sizeof(void*) + sizeof(size_t)))) - { soap->error = SOAP_EOM; - return NULL; - } - /* set the canary to detect corruption */ - *(short*)(p + n - sizeof(short)) = (short)SOAP_CANARY; - /* keep chain of alloced cells for destruction */ - *(void**)(p + n) = soap->alist; - *(size_t*)(p + n + sizeof(void*)) = n; - soap->alist = p + n; - } - soap->alloced = 1; - return p; -} -#endif - -/******************************************************************************/ -#ifdef SOAP_MEM_DEBUG -static void -soap_init_mht(struct soap *soap) -{ register int i; - for (i = 0; i < (int)SOAP_PTRHASH; i++) - soap->mht[i] = NULL; -} -#endif - -/******************************************************************************/ -#ifdef SOAP_MEM_DEBUG -static void -soap_free_mht(struct soap *soap) -{ register int i; - register struct soap_mlist *mp, *mq; - for (i = 0; i < (int)SOAP_PTRHASH; i++) - { for (mp = soap->mht[i]; mp; mp = mq) - { mq = mp->next; - if (mp->live) - fprintf(stderr, "%s(%d): malloc() = %p not freed (memory leak or forgot to call soap_end()?)\n", mp->file, mp->line, mp->ptr); - free(mp); - } - soap->mht[i] = NULL; - } -} -#endif - -/******************************************************************************/ -#ifdef SOAP_MEM_DEBUG -SOAP_FMAC1 -void* -SOAP_FMAC2 -soap_track_malloc(struct soap *soap, const char *file, int line, size_t size) -{ register void *p = malloc(size); - if (soap) - { register size_t h = soap_hash_ptr(p); - register struct soap_mlist *mp = (struct soap_mlist*)malloc(sizeof(struct soap_mlist)); - if (soap->fdebug[SOAP_INDEX_TEST]) - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "%s(%d): malloc(%lu) = %p\n", file, line, (unsigned long)size, p)); - mp->next = soap->mht[h]; - mp->ptr = p; - mp->file = file; - mp->line = line; - mp->live = 1; - soap->mht[h] = mp; - } - return p; -} -#endif - -/******************************************************************************/ -#ifdef SOAP_MEM_DEBUG -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_track_free(struct soap *soap, const char *file, int line, void *p) -{ register size_t h = soap_hash_ptr(p); - register struct soap_mlist *mp; - for (mp = soap->mht[h]; mp; mp = mp->next) - if (mp->ptr == p) - break; - if (mp) - { if (mp->live) - { free(p); - if (soap->fdebug[SOAP_INDEX_TEST]) - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "%s(%d): free(%p)\n", file, line, p)); - mp->live = 0; - } - else - fprintf(stderr, "%s(%d): free(%p) double free of pointer malloced at %s(%d)\n", file, line, p, mp->file, mp->line); - } - else - fprintf(stderr, "%s(%d): free(%p) pointer not malloced\n", file, line, p); -} -#endif - -/******************************************************************************/ -#ifdef SOAP_MEM_DEBUG -static void -soap_track_unlink(struct soap *soap, const void *p) -{ register size_t h = soap_hash_ptr(p); - register struct soap_mlist *mp; - for (mp = soap->mht[h]; mp; mp = mp->next) - if (mp->ptr == p) - break; - if (mp) - mp->live = 0; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_dealloc(struct soap *soap, void *p) -{ if (soap_check_state(soap)) - return; - if (p) - { register char **q; - for (q = (char**)&soap->alist; *q; q = *(char***)q) - { - if (*(short*)(char*)(*q - sizeof(short)) != (short)SOAP_CANARY) - { fprintf(stderr, "Data corruption in dynamic allocation (see logs)\n"); - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Data corruption:\n")); - DBGHEX(TEST, *q - 200, 200); - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "\n")); - soap->error = SOAP_MOE; - return; - } - if (p == (void*)(*q - *(size_t*)(*q + sizeof(void*)))) - { *q = **(char***)q; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Freed data at %p\n", p)); - SOAP_FREE(soap, p); - return; - } - } - soap_delete(soap, p); - } - else - { register char *q; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Free all soap_malloc() data\n")); - while (soap->alist) - { q = (char*)soap->alist; - if (*(short*)(char*)(q - sizeof(short)) != (short)SOAP_CANARY) - { fprintf(stderr, "Data corruption in dynamic allocation (see logs)\n"); - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Data corruption:\n")); - DBGHEX(TEST, q - 200, 200); - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "\n")); - soap->error = SOAP_MOE; - return; - } - soap->alist = *(void**)q; - q -= *(size_t*)(q + sizeof(void*)); - SOAP_FREE(soap, q); - } - } - /* we must assume these were deallocated: */ - soap->action = NULL; - soap->fault = NULL; - soap->header = NULL; - soap->userid = NULL; - soap->passwd = NULL; - soap->authrealm = NULL; -#ifndef WITH_LEANER - soap_clr_mime(soap); -#endif -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_delete(struct soap *soap, void *p) -{ register struct soap_clist **cp; - if (soap_check_state(soap)) - return; - cp = &soap->clist; - if (p) - { while (*cp) - { if (p == (*cp)->ptr) - { register struct soap_clist *q = *cp; - *cp = q->next; - q->fdelete(q); - SOAP_FREE(soap, q); - return; - } - cp = &(*cp)->next; - } - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Could not dealloc data %p: address not in list\n", p)); - } - else - { while (*cp) - { register struct soap_clist *q = *cp; - *cp = q->next; - q->fdelete(q); - SOAP_FREE(soap, q); - } - } -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -struct soap_clist * -SOAP_FMAC2 -soap_link(struct soap *soap, void *p, int t, int n, void (*fdelete)(struct soap_clist*)) -{ register struct soap_clist *cp; - if ((cp = (struct soap_clist*)SOAP_MALLOC(soap, sizeof(struct soap_clist)))) - { cp->next = soap->clist; - cp->type = t; - cp->size = n; - cp->ptr = p; - cp->fdelete = fdelete; - soap->clist = cp; - } - return cp; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_unlink(struct soap *soap, const void *p) -{ register char **q; - register struct soap_clist **cp; - if (!soap || !p) - return; - for (q = (char**)&soap->alist; *q; q = *(char***)q) - { if (p == (void*)(*q - *(size_t*)(*q + sizeof(void*)))) - { *q = **(char***)q; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Unlinked data %p\n", p)); -#ifdef SOAP_DEBUG - soap_track_unlink(soap, p); -#endif - return; - } - } - for (cp = &soap->clist; *cp; cp = &(*cp)->next) - { if (p == (*cp)->ptr) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Unlinked class instance %p\n", p)); - q = (char**)*cp; - *cp = (*cp)->next; - SOAP_FREE(soap, q); - return; - } - } -} -#endif - -/******************************************************************************/ -#ifndef WITH_NOIDREF -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_lookup_type(struct soap *soap, const char *id) -{ register struct soap_ilist *ip; - if (id && *id) - { ip = soap_lookup(soap, id); - if (ip) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Lookup id='%s' type=%d\n", id, ip->type)); - return ip->type; - } - } - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "lookup type id='%s' NOT FOUND! Need to get it from xsi:type\n", id)); - return 0; -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_NOIDREF -#ifndef PALM_2 -SOAP_FMAC1 -void* -SOAP_FMAC2 -soap_id_lookup(struct soap *soap, const char *id, void **p, int t, size_t n, unsigned int k) -{ struct soap_ilist *ip; - void **q; - if (!p || !id || !*id) - return p; - ip = soap_lookup(soap, id); /* lookup pointer to hash table entry for string id */ - if (!ip) - { ip = soap_enter(soap, id); /* new hash table entry for string id */ - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Forwarding first href='%s' type=%d %p (%u bytes)\n", id, t, p, (unsigned int)n)); - ip->type = t; - ip->size = n; - ip->link = p; - ip->copy = NULL; - ip->flist = NULL; - ip->ptr = NULL; - ip->level = k; - *p = NULL; - } - else if (ip->ptr) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Resolved href='%s' type=%d location=%p (%u bytes)\n", id, t, ip->ptr, (unsigned int)n)); - if (ip->type != t) - { strcpy(soap->id, id); - soap->error = SOAP_HREF; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Type incompatibility: id type=%d href type=%d\n", ip->type, t)); - return NULL; - } - while (ip->level < k) - { q = (void**)soap_malloc(soap, sizeof(void*)); - if (!q) - return NULL; - *p = (void*)q; - p = q; - k--; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Descending one level...\n")); - } - *p = ip->ptr; - } - else if (ip->level > k) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Resolving level %u pointers to href='%s'\n", ip->level, id)); - while (ip->level > k) - { void *s, **r = &ip->link; - q = (void**)ip->link; - while (q) - { *r = (void*)soap_malloc(soap, sizeof(void*)); - s = *q; - *q = *r; - r = (void**)*r; - q = (void**)s; - } - *r = NULL; - ip->size = n; - ip->copy = NULL; - ip->level = ip->level - 1; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Descending one level...\n")); - } - q = (void**)ip->link; - ip->link = p; - *p = (void*)q; - } - else - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Forwarded href='%s' type=%d location=%p (%u bytes)\n", id, t, p, (unsigned int)n)); - while (ip->level < k) - { q = (void**)soap_malloc(soap, sizeof(void*)); - *p = q; - p = q; - k--; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Descending one level...\n")); - } - q = (void**)ip->link; - ip->link = p; - *p = (void*)q; - } - return p; -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_NOIDREF -#ifndef PALM_2 -SOAP_FMAC1 -void* -SOAP_FMAC2 -soap_id_forward(struct soap *soap, const char *href, void *p, size_t len, int st, int tt, size_t n, unsigned int k, void (*fcopy)(struct soap*, int, int, void*, size_t, const void*, size_t)) -{ struct soap_ilist *ip; - if (!p || !href || !*href) - return p; - ip = soap_lookup(soap, href); /* lookup pointer to hash table entry for string id */ - if (!ip) - { ip = soap_enter(soap, href); /* new hash table entry for string id */ - ip->type = st; - ip->size = n; - ip->link = NULL; - ip->copy = NULL; - ip->ptr = NULL; - ip->level = 0; - ip->flist = NULL; - DBGLOG(TEST,SOAP_MESSAGE(fdebug, "New entry href='%s' type=%d size=%lu level=%d location=%p\n", href, st, (unsigned long)n, k, p)); - } - else if (ip->type != st || (ip->level == k && ip->size != n)) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Type incompatibility id='%s' expect type=%d size=%lu level=%u got type=%d size=%lu\n", href, ip->type, (unsigned long)ip->size, k, st, (unsigned long)n)); - strcpy(soap->id, href); - soap->error = SOAP_HREF; - return NULL; - } - if (fcopy || n < sizeof(void*) || *href != '#') - { register struct soap_flist *fp = (struct soap_flist*)SOAP_MALLOC(soap, sizeof(struct soap_flist)); - if (!fp) - { soap->error = SOAP_EOM; - return NULL; - } - fp->next = ip->flist; - fp->type = tt; - fp->ptr = p; - fp->level = k; - fp->len = len; - if (fcopy) - fp->fcopy = fcopy; - else - fp->fcopy = soap_fcopy; - ip->flist = fp; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Forwarding type=%d (target type=%d) size=%lu location=%p level=%u len=%lu href='%s'\n", st, tt, (unsigned long)n, p, k, (unsigned long)len, href)); - } - else - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Forwarding copying address %p for type=%d href='%s'\n", p, st, href)); - *(void**)p = ip->copy; - ip->copy = p; - } - return p; -} -#endif -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -void* -SOAP_FMAC2 -soap_id_enter(struct soap *soap, const char *id, void *p, int t, size_t n, unsigned int k, const char *type, const char *arrayType, void *(*finstantiate)(struct soap*, int, const char*, const char*, size_t*)) -{ -#ifndef WITH_NOIDREF - struct soap_ilist *ip; -#endif - DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Enter id='%s' type=%d loc=%p size=%lu level=%u\n", id, t, p, (unsigned long)n, k)); - soap->alloced = 0; - if (!p) - { if (finstantiate) - p = finstantiate(soap, t, type, arrayType, &n); - else - p = soap_malloc(soap, n); - if (p) - soap->alloced = 1; - } -#ifndef WITH_NOIDREF - if (!id || !*id) -#endif - return p; -#ifndef WITH_NOIDREF - ip = soap_lookup(soap, id); /* lookup pointer to hash table entry for string id */ - DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Lookup entry id='%s for location=%p'\n", id, p)); - if (!ip) - { ip = soap_enter(soap, id); /* new hash table entry for string id */ - ip->type = t; - ip->link = NULL; - ip->copy = NULL; - ip->flist = NULL; - ip->size = n; - ip->ptr = p; - ip->level = k; - DBGLOG(TEST,SOAP_MESSAGE(fdebug, "New entry id='%s' type=%d size=%lu level=%u location=%p\n", id, t, (unsigned long)n, k, p)); - } - else if ((ip->type != t || (ip->level == k && ip->size != n)) && (ip->copy || ip->flist)) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Type incompatibility id='%s' expect type=%d size=%lu level=%u got type=%d size=%lu\n", id, ip->type, (unsigned long)ip->size, k, t, (unsigned long)n)); - strcpy(soap->id, id); - soap->error = SOAP_HREF; - return NULL; - } - else if (ip->ptr) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Multiply defined id='%s'\n", id)); - strcpy(soap->id, id); - soap->error = SOAP_DUPLICATE_ID; - return NULL; - } - else - { ip->size = n; - ip->ptr = p; - ip->level = k; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Update entry id='%s' type=%d location=%p size=%lu level=%u\n", id, t, p, (unsigned long)n, k)); - } - return ip->ptr; -#endif -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_fcopy(struct soap *soap, int st, int tt, void *p, size_t len, const void *q, size_t n) -{ DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Copying data type=%d (target type=%d) %p -> %p (%lu bytes)\n", st, tt, q, p, (unsigned long)n)); - memcpy(p, q, n); -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_end_send(struct soap *soap) -{ -#ifndef WITH_LEANER - if (soap->dime.list) - { /* SOAP body referenced attachments must appear first */ - soap->dime.last->next = soap->dime.first; - soap->dime.first = soap->dime.list->next; - soap->dime.list->next = NULL; - soap->dime.last = soap->dime.list; - } - if (soap_putdime(soap) || soap_putmime(soap)) - return soap->error; - soap->mime.list = NULL; - soap->mime.first = NULL; - soap->mime.last = NULL; - soap->dime.list = NULL; - soap->dime.first = NULL; - soap->dime.last = NULL; -#endif - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "End send\n")); - if (soap->mode & SOAP_IO) /* need to flush the remaining data in buffer */ - { if (soap_flush(soap)) -#ifdef WITH_ZLIB - { if (soap->mode & SOAP_ENC_ZLIB && soap->zlib_state == SOAP_ZLIB_DEFLATE) - { soap->zlib_state = SOAP_ZLIB_NONE; - deflateEnd(&soap->d_stream); - } - return soap->error; - } -#else - return soap->error; -#endif -#ifdef WITH_ZLIB - if (soap->mode & SOAP_ENC_ZLIB) - { int r; - soap->d_stream.avail_in = 0; - do - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Deflating remainder\n")); - r = deflate(&soap->d_stream, Z_FINISH); - if (soap->d_stream.avail_out != SOAP_BUFLEN) - { if (soap_flush_raw(soap, soap->z_buf, SOAP_BUFLEN - soap->d_stream.avail_out)) - { soap->zlib_state = SOAP_ZLIB_NONE; - deflateEnd(&soap->d_stream); - return soap->error; - } - soap->d_stream.next_out = (Byte*)soap->z_buf; - soap->d_stream.avail_out = SOAP_BUFLEN; - } - } while (r == Z_OK); - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Deflated %lu->%lu bytes\n", soap->d_stream.total_in, soap->d_stream.total_out)); - soap->z_ratio_out = (float)soap->d_stream.total_out / (float)soap->d_stream.total_in; - soap->mode &= ~SOAP_ENC_ZLIB; - soap->zlib_state = SOAP_ZLIB_NONE; - if (deflateEnd(&soap->d_stream) != Z_OK || r != Z_STREAM_END) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Unable to end deflate: %s\n", soap->d_stream.msg?soap->d_stream.msg:"")); - return soap->error = SOAP_ZLIB_ERROR; - } -#ifdef WITH_GZIP - soap->z_buf[0] = soap->z_crc & 0xFF; - soap->z_buf[1] = (soap->z_crc >> 8) & 0xFF; - soap->z_buf[2] = (soap->z_crc >> 16) & 0xFF; - soap->z_buf[3] = (soap->z_crc >> 24) & 0xFF; - soap->z_buf[4] = soap->d_stream.total_in & 0xFF; - soap->z_buf[5] = (soap->d_stream.total_in >> 8) & 0xFF; - soap->z_buf[6] = (soap->d_stream.total_in >> 16) & 0xFF; - soap->z_buf[7] = (soap->d_stream.total_in >> 24) & 0xFF; - if (soap_flush_raw(soap, soap->z_buf, 8)) - return soap->error; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "gzip crc32=%lu\n", (unsigned long)soap->z_crc)); -#endif - } -#endif - if ((soap->mode & SOAP_IO) == SOAP_IO_STORE) - { char *p; -#ifndef WITH_NOHTTP - if (!(soap->mode & SOAP_ENC_XML)) - { soap->mode--; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Sending buffered message of length %u\n", (unsigned int)soap->blist->size)); - if (soap->status >= SOAP_POST) - soap->error = soap->fpost(soap, soap->endpoint, soap->host, soap->port, soap->path, soap->action, soap->blist->size); - else if (soap->status != SOAP_STOP) - soap->error = soap->fresponse(soap, soap->status, soap->blist->size); - if (soap->error || soap_flush(soap)) - return soap->error; - soap->mode++; - } -#endif - for (p = soap_first_block(soap); p; p = soap_next_block(soap)) - { DBGMSG(SENT, p, soap_block_size(soap)); - if ((soap->error = soap->fsend(soap, p, soap_block_size(soap)))) - { soap_end_block(soap); - return soap->error; - } - } - soap_end_block(soap); - } -#ifndef WITH_LEANER - else if ((soap->mode & SOAP_IO) == SOAP_IO_CHUNK) - { DBGMSG(SENT, "\r\n0\r\n\r\n", 7); - if ((soap->error = soap->fsend(soap, "\r\n0\r\n\r\n", 7))) - return soap->error; - } -#endif - } -#ifdef WITH_TCPFIN -#ifdef WITH_OPENSSL - if (!soap->ssl && soap_valid_socket(soap->socket) && !soap->keep_alive && !(soap->omode & SOAP_IO_UDP)) - soap->fshutdownsocket(soap, (SOAP_SOCKET)soap->socket, 1); /* Send TCP FIN */ -#else - if (soap_valid_socket(soap->socket) && !soap->keep_alive && !(soap->omode & SOAP_IO_UDP)) - soap->fshutdownsocket(soap, (SOAP_SOCKET)soap->socket, 1); /* Send TCP FIN */ -#endif -#endif - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "End of send phase\n")); - soap->omode &= ~SOAP_XML_SEC; - soap->count = 0; - soap->part = SOAP_END; - return SOAP_OK; -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_end_recv(struct soap *soap) -{ soap->part = SOAP_END; -#ifndef WITH_LEANER - if ((soap->mode & SOAP_ENC_DIME) && soap_getdime(soap)) - return soap->error; - soap->dime.list = soap->dime.first; - soap->dime.first = NULL; - soap->dime.last = NULL; - /* Check if MIME attachments and mime-post-check flag is set, if set call soap_resolve() and return */ - if (soap->mode & SOAP_ENC_MIME) - { if (soap->mode & SOAP_MIME_POSTCHECK) - { soap_resolve(soap); - return SOAP_OK; - } - if (soap_getmime(soap)) - return soap->error; - } - soap->mime.list = soap->mime.first; - soap->mime.first = NULL; - soap->mime.last = NULL; - soap->mime.boundary = NULL; - if (soap->xlist) - { struct soap_multipart *content; - for (content = soap->mime.list; content; content = content->next) - soap_resolve_attachment(soap, content); - } -#endif - DBGLOG(TEST,SOAP_MESSAGE(fdebug, "End of receive message ok\n")); -#ifdef WITH_ZLIB - if (soap->mode & SOAP_ENC_ZLIB) - { soap->mode &= ~SOAP_ENC_ZLIB; - memcpy(soap->buf, soap->z_buf, SOAP_BUFLEN); - soap->bufidx = (char*)soap->d_stream.next_in - soap->z_buf; - soap->buflen = soap->z_buflen; - soap->zlib_state = SOAP_ZLIB_NONE; - if (inflateEnd(&soap->d_stream) != Z_OK) - return soap->error = SOAP_ZLIB_ERROR; -#ifdef WITH_GZIP - if (soap->zlib_in == SOAP_ZLIB_GZIP) - { soap_wchar c; - short i; - for (i = 0; i < 8; i++) - { if ((int)(c = soap_getchar(soap)) == EOF) - return soap->error = SOAP_EOF; - soap->z_buf[i] = (char)c; - } - if (soap->z_crc != ((uLong)(unsigned char)soap->z_buf[0] | ((uLong)(unsigned char)soap->z_buf[1] << 8) | ((uLong)(unsigned char)soap->z_buf[2] << 16) | ((uLong)(unsigned char)soap->z_buf[3] << 24))) - { DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Gzip error: crc check failed, message corrupted? (crc32=%lu)\n", (unsigned long)soap->z_crc)); - return soap->error = SOAP_ZLIB_ERROR; - } - if (soap->d_stream.total_out != ((uLong)(unsigned char)soap->z_buf[4] | ((uLong)(unsigned char)soap->z_buf[5] << 8) | ((uLong)(unsigned char)soap->z_buf[6] << 16) | ((uLong)(unsigned char)soap->z_buf[7] << 24))) - { DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Gzip error: incorrect message length\n")); - return soap->error = SOAP_ZLIB_ERROR; - } - } -#endif - } -#endif - if ((soap->mode & SOAP_IO) == SOAP_IO_CHUNK) - while ((int)soap_getchar(soap) != EOF) /* advance to last chunk */ - ; - if (soap->fdisconnect && (soap->error = soap->fdisconnect(soap))) - return soap->error; -#ifndef WITH_NOIDREF - if (soap_resolve(soap)) - return soap->error; -#endif -#ifndef WITH_LEANER - if (soap->xlist) - { if (soap->mode & SOAP_ENC_MTOM) - return soap->error = SOAP_MIME_HREF; - return soap->error = SOAP_DIME_HREF; - } -#endif - return SOAP_OK; -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_free_temp(struct soap *soap) -{ register struct Namespace *ns; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Free namespace stack\n")); - while (soap->nlist) - { register struct soap_nlist *np = soap->nlist->next; - SOAP_FREE(soap, soap->nlist); - soap->nlist = np; - } - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Free any remaining temp blocks\n")); - while (soap->blist) - soap_end_block(soap); - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Free attribute storage\n")); - while (soap->attributes) - { register struct soap_attribute *tp = soap->attributes->next; - if (soap->attributes->value) - SOAP_FREE(soap, soap->attributes->value); - SOAP_FREE(soap, soap->attributes); - soap->attributes = tp; - } -#ifdef WITH_FAST - if (soap->labbuf) - SOAP_FREE(soap, soap->labbuf); - soap->labbuf = NULL; - soap->lablen = 0; - soap->labidx = 0; -#endif - ns = soap->local_namespaces; - if (ns) - { for (; ns->id; ns++) - { if (ns->out) - { if (soap->encodingStyle == ns->out) - soap->encodingStyle = SOAP_STR_EOS; - SOAP_FREE(soap, ns->out); - ns->out = NULL; - } - if (soap->encodingStyle == ns->ns) - soap->encodingStyle = SOAP_STR_EOS; - } - SOAP_FREE(soap, soap->local_namespaces); - soap->local_namespaces = NULL; - } -#ifndef WITH_LEANER - while (soap->xlist) - { struct soap_xlist *xp = soap->xlist->next; - SOAP_FREE(soap, soap->xlist); - soap->xlist = xp; - } -#endif -#ifndef WITH_NOIDREF - soap_free_pht(soap); - soap_free_iht(soap); -#endif -} -#endif - -/******************************************************************************/ -#ifdef SOAP_DEBUG -static void -soap_init_logs(struct soap *soap) -{ int i; - for (i = 0; i < SOAP_MAXLOGS; i++) - { soap->logfile[i] = NULL; - soap->fdebug[i] = NULL; - } -} -#endif - -/******************************************************************************/ -#if !defined(WITH_LEAN) || defined(SOAP_DEBUG) -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_open_logfile(struct soap *soap, int i) -{ if (soap->logfile[i]) - soap->fdebug[i] = fopen(soap->logfile[i], i < 2 ? "ab" : "a"); -} -#endif - -/******************************************************************************/ -#ifdef SOAP_DEBUG -static void -soap_close_logfile(struct soap *soap, int i) -{ if (soap->fdebug[i]) - { fclose(soap->fdebug[i]); - soap->fdebug[i] = NULL; - } -} -#endif - -/******************************************************************************/ -#ifdef SOAP_DEBUG -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_close_logfiles(struct soap *soap) -{ int i; - for (i = 0; i < SOAP_MAXLOGS; i++) - soap_close_logfile(soap, i); -} -#endif - -/******************************************************************************/ -#ifdef SOAP_DEBUG -static void -soap_set_logfile(struct soap *soap, int i, const char *logfile) -{ char *s = NULL; - soap_close_logfile(soap, i); - if (soap->logfile[i]) - SOAP_FREE(soap, (void*)soap->logfile[i]); - if (logfile) - if ((s = (char*)SOAP_MALLOC(soap, strlen(logfile) + 1))) - strcpy(s, logfile); - soap->logfile[i] = s; -} -#endif - -/******************************************************************************/ -#ifdef SOAP_DEBUG -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_set_recv_logfile(struct soap *soap, const char *logfile) -{ soap_set_logfile(soap, SOAP_INDEX_RECV, logfile); -} -#endif - -/******************************************************************************/ -#ifdef SOAP_DEBUG -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_set_sent_logfile(struct soap *soap, const char *logfile) -{ soap_set_logfile(soap, SOAP_INDEX_SENT, logfile); -} -#endif - -/******************************************************************************/ -#ifdef SOAP_DEBUG -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_set_test_logfile(struct soap *soap, const char *logfile) -{ soap_set_logfile(soap, SOAP_INDEX_TEST, logfile); -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -struct soap* -SOAP_FMAC2 -soap_copy(struct soap *soap) -{ return soap_copy_context((struct soap*)malloc(sizeof(struct soap)), soap); -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -struct soap* -SOAP_FMAC2 -soap_copy_context(struct soap *copy, struct soap *soap) -{ if (soap_check_state(soap)) - return NULL; - if (copy) - { register struct soap_plugin *p; - memcpy(copy, soap, sizeof(struct soap)); - copy->state = SOAP_COPY; - copy->error = SOAP_OK; - copy->userid = NULL; - copy->passwd = NULL; - copy->nlist = NULL; - copy->blist = NULL; - copy->clist = NULL; - copy->alist = NULL; - copy->attributes = NULL; - copy->labbuf = NULL; - copy->lablen = 0; - copy->labidx = 0; -#ifdef SOAP_DEBUG - soap_init_mht(copy); -#endif - copy->local_namespaces = NULL; -#ifndef WITH_NOIDREF - soap_init_iht(copy); - soap_init_pht(copy); -#endif - copy->header = NULL; - copy->fault = NULL; - copy->action = NULL; -#ifndef WITH_LEAN -#ifdef WITH_COOKIES - copy->cookies = soap_copy_cookies(copy, soap); -#else - copy->cookies = NULL; -#endif -#endif -#ifdef SOAP_DEBUG - soap_init_logs(copy); - soap_set_recv_logfile(copy, soap->logfile[SOAP_INDEX_RECV]); - soap_set_sent_logfile(copy, soap->logfile[SOAP_INDEX_SENT]); - soap_set_test_logfile(copy, soap->logfile[SOAP_INDEX_TEST]); -#endif - copy->plugins = NULL; - for (p = soap->plugins; p; p = p->next) - { register struct soap_plugin *q = (struct soap_plugin*)SOAP_MALLOC(copy, sizeof(struct soap_plugin)); - if (!q) - return NULL; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copying plugin '%s'\n", p->id)); - *q = *p; - if (p->fcopy && (soap->error = p->fcopy(copy, q, p))) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Could not copy plugin '%s'\n", p->id)); - SOAP_FREE(copy, q); - return NULL; - } - q->next = copy->plugins; - copy->plugins = q; - } - } - else - soap->error = SOAP_EOM; - return copy; -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_copy_stream(struct soap *copy, struct soap *soap) -{ copy->mode = soap->mode; - copy->imode = soap->imode; - copy->omode = soap->omode; - copy->socket = soap->socket; - copy->recv_timeout = soap->recv_timeout; - copy->send_timeout = soap->send_timeout; -#if defined(__cplusplus) && !defined(WITH_LEAN) - copy->os = soap->os; - copy->is = soap->is; -#endif - copy->sendfd = soap->sendfd; - copy->recvfd = soap->recvfd; - copy->bufidx = soap->bufidx; - copy->buflen = soap->buflen; - copy->ahead = soap->ahead; - copy->cdata = soap->cdata; - copy->chunksize = soap->chunksize; - copy->chunkbuflen = soap->chunkbuflen; - copy->keep_alive = soap->keep_alive; - copy->max_keep_alive = soap->max_keep_alive; -#ifndef WITH_NOIO - copy->peer = soap->peer; - copy->peerlen = soap->peerlen; -#endif -#ifdef WITH_OPENSSL - copy->bio = soap->bio; - copy->ssl = soap->ssl; - copy->ctx = soap->ctx; -#endif -#ifdef WITH_ZLIB - copy->zlib_state = soap->zlib_state; - copy->zlib_in = soap->zlib_in; - copy->zlib_out = soap->zlib_out; - copy->d_stream = soap->d_stream; - copy->z_buflen = soap->z_buflen; - copy->z_level = soap->z_level; - copy->z_crc = soap->z_crc; - copy->z_ratio_in = soap->z_ratio_in; - copy->z_ratio_out = soap->z_ratio_out; - memcpy(copy->z_buf, soap->z_buf, sizeof(soap->z_buf)); -#endif - memcpy(copy->buf, soap->buf, sizeof(soap->buf)); -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_init(struct soap *soap) -{ soap->state = SOAP_INIT; - soap->version = 0; - soap_imode(soap, SOAP_IO_DEFAULT); - soap_omode(soap, SOAP_IO_DEFAULT); - soap->plugins = NULL; - soap->user = NULL; - soap->userid = NULL; - soap->passwd = NULL; -#ifndef WITH_NOHTTP - soap->fpost = http_post; - soap->fget = http_get; - soap->fform = NULL; - soap->fposthdr = http_post_header; - soap->fresponse = http_response; - soap->fparse = http_parse; - soap->fparsehdr = http_parse_header; -#endif - soap->fheader = NULL; - soap->fconnect = NULL; - soap->fdisconnect = NULL; -#ifndef WITH_NOIO -#ifndef WITH_IPV6 - soap->fresolve = tcp_gethost; -#else - soap->fresolve = NULL; -#endif - soap->faccept = tcp_accept; - soap->fopen = tcp_connect; - soap->fclose = tcp_disconnect; - soap->fclosesocket = tcp_closesocket; - soap->fshutdownsocket = tcp_shutdownsocket; - soap->fsend = fsend; - soap->frecv = frecv; - soap->fpoll = soap_poll; -#else - soap->fopen = NULL; - soap->fclose = NULL; - soap->fpoll = NULL; -#endif - soap->fseterror = NULL; - soap->fignore = NULL; - soap->fserveloop = NULL; - soap->fplugin = fplugin; - soap->fmalloc = NULL; -#ifndef WITH_LEANER - soap->fprepareinit = NULL; - soap->fpreparesend = NULL; - soap->fpreparerecv = NULL; - soap->fpreparefinal = NULL; - soap->fdimereadopen = NULL; - soap->fdimewriteopen = NULL; - soap->fdimereadclose = NULL; - soap->fdimewriteclose = NULL; - soap->fdimeread = NULL; - soap->fdimewrite = NULL; - soap->fmimereadopen = NULL; - soap->fmimewriteopen = NULL; - soap->fmimereadclose = NULL; - soap->fmimewriteclose = NULL; - soap->fmimeread = NULL; - soap->fmimewrite = NULL; -#endif - soap->float_format = "%G"; - soap->double_format = "%lG"; - soap->dime_id_format = "cid:id%d"; /* default DIME id format */ - soap->http_version = "1.1"; - soap->proxy_http_version = "1.0"; - soap->http_content = NULL; - soap->actor = NULL; - soap->max_keep_alive = SOAP_MAXKEEPALIVE; - soap->keep_alive = 0; - soap->recv_timeout = 0; - soap->send_timeout = 0; - soap->connect_timeout = 0; - soap->accept_timeout = 0; - soap->socket_flags = 0; - soap->connect_flags = 0; - soap->bind_flags = 0; - soap->accept_flags = 0; - soap->ip = 0; - soap->labbuf = NULL; - soap->lablen = 0; - soap->labidx = 0; - soap->encodingStyle = SOAP_STR_EOS; -#ifndef WITH_NONAMESPACES - soap->namespaces = namespaces; -#else - soap->namespaces = NULL; -#endif - soap->local_namespaces = NULL; - soap->nlist = NULL; - soap->blist = NULL; - soap->clist = NULL; - soap->alist = NULL; - soap->attributes = NULL; - soap->header = NULL; - soap->fault = NULL; - soap->master = SOAP_INVALID_SOCKET; - soap->socket = SOAP_INVALID_SOCKET; - soap->os = NULL; - soap->is = NULL; -#ifndef WITH_LEANER - soap->dom = NULL; - soap->dime.list = NULL; - soap->dime.first = NULL; - soap->dime.last = NULL; - soap->mime.list = NULL; - soap->mime.first = NULL; - soap->mime.last = NULL; - soap->mime.boundary = NULL; - soap->mime.start = NULL; - soap->xlist = NULL; -#endif -#ifndef UNDER_CE - soap->recvfd = 0; - soap->sendfd = 1; -#else - soap->recvfd = stdin; - soap->sendfd = stdout; -#endif - soap->host[0] = '\0'; - soap->port = 0; - soap->action = NULL; - soap->proxy_host = NULL; - soap->proxy_port = 8080; - soap->proxy_userid = NULL; - soap->proxy_passwd = NULL; - soap->authrealm = NULL; - soap->prolog = NULL; -#ifdef WITH_OPENSSL - if (!ssl_init_done) - soap_ssl_init(); - soap->fsslauth = ssl_auth_init; - soap->fsslverify = ssl_verify_callback; - soap->bio = NULL; - soap->ssl = NULL; - soap->ctx = NULL; - soap->ssl_flags = SOAP_SSL_DEFAULT; - soap->keyfile = NULL; - soap->password = NULL; - soap->dhfile = NULL; - soap->cafile = NULL; - soap->capath = NULL; - soap->crlfile = NULL; - soap->randfile = NULL; - soap->session = NULL; -#endif -#ifdef WITH_ZLIB - soap->zlib_state = SOAP_ZLIB_NONE; - soap->zlib_in = SOAP_ZLIB_NONE; - soap->zlib_out = SOAP_ZLIB_NONE; - soap->d_stream.zalloc = NULL; - soap->d_stream.zfree = NULL; - soap->d_stream.opaque = NULL; - soap->z_level = 6; -#endif -#ifndef WITH_LEAN - soap->c14ninclude = NULL; - soap->c14nexclude = NULL; - soap->cookies = NULL; - soap->cookie_domain = NULL; - soap->cookie_path = NULL; - soap->cookie_max = 32; -#endif -#ifdef SOAP_DEBUG - soap_init_mht(soap); - soap_init_logs(soap); -#endif -#ifdef WMW_RPM_IO - soap->rpmreqid = NULL; -#endif -#ifdef PALM - palmNetLibOpen(); -#endif -#ifndef WITH_NOIDREF - soap_init_iht(soap); - soap_init_pht(soap); -#endif -#ifdef SOAP_DEBUG - soap_set_recv_logfile(soap, "RECV.log"); - soap_set_sent_logfile(soap, "SENT.log"); - soap_set_test_logfile(soap, "TEST.log"); - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Initializing context\n")); -#endif - soap_begin(soap); -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_init1(struct soap *soap, soap_mode mode) -{ soap_init2(soap, mode, mode); -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_init2(struct soap *soap, soap_mode imode, soap_mode omode) -{ soap_init(soap); - soap_imode(soap, imode); - soap_omode(soap, omode); -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_begin(struct soap *soap) -{ DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Reinitializing context\n")); - if (!soap->keep_alive) - { soap->buflen = 0; - soap->bufidx = 0; - } - soap->keep_alive = (((soap->imode | soap->omode) & SOAP_IO_KEEPALIVE) != 0); - soap->null = 0; - soap->position = 0; - soap->encoding = 0; - soap->mustUnderstand = 0; - soap->mode = 0; - soap->ns = 0; - soap->part = SOAP_END; - soap->alloced = 0; - soap->count = 0; - soap->length = 0; - soap->cdata = 0; - soap->error = SOAP_OK; - soap->peeked = 0; - soap->ahead = 0; - soap->idnum = 0; - soap->level = 0; - soap->endpoint[0] = '\0'; -#ifndef WITH_LEANER - soap->dime.chunksize = 0; - soap->dime.buflen = 0; -#endif - soap_free_temp(soap); -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_end(struct soap *soap) -{ register struct soap_clist *cp; - if (soap_check_state(soap)) - return; - soap_free_temp(soap); - soap_dealloc(soap, NULL); - while (soap->clist) - { cp = soap->clist->next; - SOAP_FREE(soap, soap->clist); - soap->clist = cp; - } - soap_closesock(soap); -#ifdef SOAP_DEBUG - soap_close_logfiles(soap); -#endif -#ifdef PALM - palmNetLibClose(); -#endif -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_set_namespaces(struct soap *soap, const struct Namespace *p) -{ register struct Namespace *ns = soap->local_namespaces; - register struct soap_nlist *np, *nq, *nr; - register unsigned int level = soap->level; - soap->namespaces = p; - soap->local_namespaces = NULL; - soap_set_local_namespaces(soap); - /* reverse the namespace list */ - np = soap->nlist; - soap->nlist = NULL; - if (np) - { nq = np->next; - np->next = NULL; - while (nq) - { nr = nq->next; - nq->next = np; - np = nq; - nq = nr; - } - } - /* then push on new stack */ - while (np) - { register const char *s; - soap->level = np->level; /* preserve element nesting level */ - s = np->ns; - if (!s && np->index >= 0 && ns) - { s = ns[np->index].out; - if (!s) - s = ns[np->index].ns; - } - if (s && soap_push_namespace(soap, np->id, s)) - return soap->error; - nq = np; - np = np->next; - SOAP_FREE(soap, nq); - } - if (ns) - { register int i; - for (i = 0; ns[i].id; i++) - { if (ns[i].out) - { SOAP_FREE(soap, ns[i].out); - ns[i].out = NULL; - } - } - SOAP_FREE(soap, ns); - } - soap->level = level; /* restore level */ - return SOAP_OK; -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_set_local_namespaces(struct soap *soap) -{ if (soap->namespaces && !soap->local_namespaces) - { register const struct Namespace *ns1; - register struct Namespace *ns2; - register size_t n = 1; - for (ns1 = soap->namespaces; ns1->id; ns1++) - n++; - n *= sizeof(struct Namespace); - ns2 = (struct Namespace*)SOAP_MALLOC(soap, n); - if (ns2) - { memcpy(ns2, soap->namespaces, n); - if (ns2[0].ns) - { if (!strcmp(ns2[0].ns, soap_env1)) - soap->version = 1; - else - soap->version = 2; - } - soap->local_namespaces = ns2; - } - } -} -#endif - -/******************************************************************************/ -#ifndef WITH_LEAN -#ifndef PALM_1 -SOAP_FMAC1 -const char * -SOAP_FMAC2 -soap_strsearch(const char *big, const char *little) -{ size_t n = strlen(little); - const char *s = big; - while (s) - { if (!strncmp(s, little, n) && (s[n] == '\0' || s[n] == ' ')) - return s; - s = strchr(s, ' '); - if (s) - s++; - } - return NULL; -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_LEAN -#ifndef PALM_1 -SOAP_FMAC1 -struct soap_nlist * -SOAP_FMAC2 -soap_lookup_ns(struct soap *soap, const char *tag, size_t n) -{ register struct soap_nlist *np; - for (np = soap->nlist; np; np = np->next) - { if (!strncmp(np->id, tag, n) && !np->id[n]) - return np; - } - return NULL; -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_LEAN -static struct soap_nlist * -soap_push_ns(struct soap *soap, const char *id, const char *ns, short utilized) -{ register struct soap_nlist *np; - size_t n, k; - if (soap_strsearch(soap->c14nexclude, id)) - return NULL; - if (!utilized) - { for (np = soap->nlist; np; np = np->next) - { if (!strcmp(np->id, id) && (!np->ns || !strcmp(np->ns, ns))) - break; - } - if (np) - { if ((np->level < soap->level || !np->ns) && np->index == 1) - utilized = 1; - else - return NULL; - } - } - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Adding namespace binding (level=%u) '%s' '%s' utilized=%d\n", soap->level, id, ns?ns:"(null)", utilized)); - n = strlen(id); - if (ns) - k = strlen(ns); - else - k = 0; - np = (struct soap_nlist*)SOAP_MALLOC(soap, sizeof(struct soap_nlist) + n + k + 1); - if (!np) - { soap->error = SOAP_EOM; - return NULL; - } - np->next = soap->nlist; - soap->nlist = np; - strcpy(np->id, id); - if (ns) - { np->ns = np->id + n + 1; - strcpy(np->ns, ns); - } - else - np->ns = NULL; - np->level = soap->level; - np->index = utilized; - return np; -} -#endif - -/******************************************************************************/ -#ifndef WITH_LEAN -static void -soap_utilize_ns(struct soap *soap, const char *tag, size_t n) -{ register struct soap_nlist *np = soap_lookup_ns(soap, tag, n); - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Utilizing namespace of '%s'\n", tag)); - if (np) - { if (np->index == 0) - soap_push_ns(soap, np->id, np->ns, 1); - } - else if (strncmp(tag, "xml", 3)) - { strncpy(soap->tmpbuf, tag, n); - soap->tmpbuf[n] = '\0'; - soap_push_ns(soap, soap->tmpbuf, NULL, 1); - } -} -#endif - -/******************************************************************************/ -#ifndef WITH_LEAN -static void -soap_pop_ns(struct soap *soap) -{ soap_pop_namespace(soap); -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_element(struct soap *soap, const char *tag, int id, const char *type) -{ -#ifdef WITH_XMLNS - register const char *s; -#endif - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Element begin tag='%s' id='%d' type='%s'\n", tag, id, type?type:"")); -#ifdef WITH_DOM - if (soap->part == SOAP_BEGIN_SECURITY && (soap->mode & SOAP_XML_CANONICAL) && !(soap->mode & SOAP_DOM_ASIS)) - { register struct soap_nlist *np; - /* wsu:Id found: clear xmlns renderings, so re-emit them for exc-c14n */ - for (np = soap->nlist; np; np = np->next) - { if (np->index == 2) - np->index = 0; - } - } - if (soap->mode & SOAP_XML_DOM) - { register struct soap_dom_element *elt = (struct soap_dom_element*)soap_malloc(soap, sizeof(struct soap_dom_element)); - if (!elt) - return soap->error = SOAP_EOM; - elt->soap = soap; - elt->next = NULL; - elt->prnt = soap->dom; - elt->name = soap_strdup(soap, tag); - elt->elts = NULL; - elt->atts = NULL; - elt->nstr = NULL; - elt->data = NULL; - elt->wide = NULL; - elt->node = NULL; - elt->type = 0; - elt->head = NULL; - elt->tail = NULL; - if (soap->dom) - { struct soap_dom_element *p = soap->dom->elts; - if (p) - { while (p->next) - p = p->next; - p->next = elt; - } - else - soap->dom->elts = elt; - } - soap->dom = elt; - } - else - { -#endif - soap->level++; -#ifndef WITH_LEAN - if (!soap->ns) - { if (!(soap->mode & SOAP_XML_CANONICAL) - && soap_send(soap, soap->prolog ? soap->prolog : "\n")) - return soap->error; - } - else if (soap->mode & SOAP_XML_INDENT) - { if (soap->ns == 1 && soap_send_raw(soap, soap_indent, soap->level < sizeof(soap_indent) ? soap->level : sizeof(soap_indent) - 1)) - return soap->error; - soap->body = 1; - } -#endif -#ifdef WITH_XMLNS - s = strchr(tag, ':'); - if (s && strncmp(tag, "SOAP-ENV", s - tag)) - { struct Namespace *ns = soap->local_namespaces; - size_t n = s - tag; - if (soap_send_raw(soap, "<", 1) - || soap_send(soap, s + 1)) - return soap->error; - if (soap->nlist && !strncmp(soap->nlist->id, tag, n) && !soap->nlist->id[n]) - ns = NULL; - for (; ns && ns->id; ns++) - { if (*ns->id && (ns->out || ns->ns) && !strncmp(ns->id, tag, n) && !ns->id[n]) - { soap_push_ns(soap, ns->id, ns->out ? ns->out : ns->ns, 0); - if (soap_attribute(soap, "xmlns", ns->out ? ns->out : ns->ns)) - return soap->error; - break; - } - } - } - else -#endif - if (soap_send_raw(soap, "<", 1) - || soap_send(soap, tag)) - return soap->error; -#ifdef WITH_DOM - } -#endif - if (!soap->ns) - { struct Namespace *ns; - for (ns = soap->local_namespaces; ns && ns->id; ns++) - { if (*ns->id && (ns->out || ns->ns)) - { sprintf(soap->tmpbuf, "xmlns:%s", ns->id); - if (soap_attribute(soap, soap->tmpbuf, ns->out ? ns->out : ns->ns)) - return soap->error; - } - } - } - soap->ns = 1; /* start with 0 or 2, but should be one to continue */ -#ifndef WITH_LEAN - if (soap->mode & SOAP_XML_CANONICAL) - { const char *t = strchr(tag, ':'); - if (t) - soap_utilize_ns(soap, tag, t - tag); - } -#endif - if (id > 0) - { sprintf(soap->tmpbuf, "_%d", id); - if (soap_attribute(soap, "id", soap->tmpbuf)) - return soap->error; - } - if (type && *type && (!(soap->mode & SOAP_XML_SEC) || soap->part == SOAP_IN_BODY)) - { if (soap_attribute(soap, "xsi:type", type)) - return soap->error; -#ifndef WITH_LEAN - if (soap->mode & SOAP_XML_CANONICAL) - { const char *t = strchr(type, ':'); - if (t) - soap_utilize_ns(soap, type, t - type); - } -#endif - } - if (soap->null && soap->position > 0) - { register int i; - sprintf(soap->tmpbuf, "[%d", soap->positions[0]); - for (i = 1; i < soap->position; i++) - sprintf(soap->tmpbuf + strlen(soap->tmpbuf), ",%d", soap->positions[i]); - strcat(soap->tmpbuf, "]"); - if (soap_attribute(soap, "SOAP-ENC:position", soap->tmpbuf)) - return soap->error; - } - if (soap->mustUnderstand) - { if (soap->actor && *soap->actor) - { if (soap_attribute(soap, soap->version == 2 ? "SOAP-ENV:role" : "SOAP-ENV:actor", soap->actor)) - return soap->error; - } - if (soap_attribute(soap, "SOAP-ENV:mustUnderstand", soap->version == 2 ? "true" : "1")) - return soap->error; - soap->mustUnderstand = 0; - } - if (soap->encoding) - { if (soap->encodingStyle && soap->local_namespaces) - { if (!*soap->encodingStyle) - { if (soap->local_namespaces[1].out) - soap->encodingStyle = soap->local_namespaces[1].out; - else - soap->encodingStyle = soap->local_namespaces[1].ns; - } - if (soap_attribute(soap, "SOAP-ENV:encodingStyle", soap->encodingStyle)) - return soap->error; - } - soap->encoding = 0; - } - soap->null = 0; - soap->position = 0; - if (soap->part == SOAP_BEGIN_SECURITY && (soap->mode & SOAP_XML_CANONICAL)) - soap->part = SOAP_IN_SECURITY; - return SOAP_OK; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_element_begin_out(struct soap *soap, const char *tag, int id, const char *type) -{ if (*tag == '-') - return SOAP_OK; - if (soap_element(soap, tag, id, type)) - return soap->error; - return soap_element_start_end_out(soap, NULL); -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -#ifndef HAVE_STRRCHR -SOAP_FMAC1 -char* -SOAP_FMAC2 -soap_strrchr(const char *s, int t) -{ register char *r = NULL; - while (*s) - if (*s++ == t) - r = (char*)s - 1; - return r; -} -#endif -#endif - -/******************************************************************************/ -#ifndef PALM_2 -#ifndef HAVE_STRTOL -SOAP_FMAC1 -long -SOAP_FMAC2 -soap_strtol(const char *s, char **t, int b) -{ register long n = 0; - register int c; - while (*s > 0 && *s <= 32) - s++; - if (b == 10) - { short neg = 0; - if (*s == '-') - { s++; - neg = 1; - } - else if (*s == '+') - s++; - while ((c = *s) && c >= '0' && c <= '9') - { if (n >= 214748364 && (n > 214748364 || c >= '8')) - break; - n *= 10; - n += c - '0'; - s++; - } - if (neg) - n = -n; - } - else /* b == 16 and value is always positive */ - { while ((c = *s)) - { if (c >= '0' && c <= '9') - c -= '0'; - else if (c >= 'A' && c <= 'F') - c -= 'A' - 10; - else if (c >= 'a' && c <= 'f') - c -= 'a' - 10; - if (n > 0x07FFFFFF) - break; - n <<= 4; - n += c; - s++; - } - } - if (t) - *t = (char*)s; - return n; -} -#endif -#endif - -/******************************************************************************/ -#ifndef PALM_2 -#ifndef HAVE_STRTOUL -SOAP_FMAC1 -unsigned long -SOAP_FMAC2 -soap_strtoul(const char *s, char **t, int b) -{ unsigned long n = 0; - register int c; - while (*s > 0 && *s <= 32) - s++; - if (b == 10) - { if (*s == '+') - s++; - while ((c = *s) && c >= '0' && c <= '9') - { if (n >= 429496729 && (n > 429496729 || c >= '6')) - break; - n *= 10; - n += c - '0'; - s++; - } - } - else /* b == 16 */ - { while ((c = *s)) - { if (c >= '0' && c <= '9') - c -= '0'; - else if (c >= 'A' && c <= 'F') - c -= 'A' - 10; - else if (c >= 'a' && c <= 'f') - c -= 'a' - 10; - if (n > 0x0FFFFFFF) - break; - n <<= 4; - n += c; - s++; - } - } - if (t) - *t = (char*)s; - return n; -} -#endif -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_array_begin_out(struct soap *soap, const char *tag, int id, const char *type, const char *offset) -{ if (soap_element(soap, tag, id, "SOAP-ENC:Array")) - return soap->error; - if (soap->version == 2) - { const char *s; - s = soap_strrchr(type, '['); - if ((size_t)(s - type) < sizeof(soap->tmpbuf)) - { strncpy(soap->tmpbuf, type, s - type); - soap->tmpbuf[s - type] = '\0'; - if (type && *type && (soap_attribute(soap, "SOAP-ENC:itemType", soap->tmpbuf))) - return soap->error; - if (s && (soap_attribute(soap, "SOAP-ENC:arraySize", s + 1))) - return soap->error; - } - } - else - { if (offset && (soap_attribute(soap, "SOAP-ENC:offset", offset))) - return soap->error; - if (type && *type && (soap_attribute(soap, "SOAP-ENC:arrayType", type))) - return soap->error; - } -#ifndef WITH_LEAN - if (type && *type && (soap->mode & SOAP_XML_CANONICAL)) - { const char *s = strchr(type, ':'); - if (s) - soap_utilize_ns(soap, type, s - type); - } -#endif - return soap_element_start_end_out(soap, NULL); -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_element_start_end_out(struct soap *soap, const char *tag) -{ register struct soap_attribute *tp; -#ifndef WITH_LEAN - if (soap->mode & SOAP_XML_CANONICAL) - { struct soap_nlist *np; - for (tp = soap->attributes; tp; tp = tp->next) - { if (tp->visible && tp->name) - { const char *s = strchr(tp->name, ':'); - if (s) - soap_utilize_ns(soap, tp->name, s - tp->name); - } - } - for (np = soap->nlist; np; np = np->next) - { if (np->index == 1 && np->ns) - { sprintf(soap->tmpbuf, "xmlns:%s", np->id); - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Enabling utilized binding (level=%u) %s='%s'\n", np->level, soap->tmpbuf, np->ns)); - soap_set_attr(soap, soap->tmpbuf, np->ns); - np->index = 2; - } - } - } -#endif -#ifdef WITH_DOM - if ((soap->mode & SOAP_XML_DOM) && soap->dom) - { register struct soap_dom_attribute **att; - att = &soap->dom->atts; - for (tp = soap->attributes; tp; tp = tp->next) - { if (tp->visible) - { *att = (struct soap_dom_attribute*)soap_malloc(soap, sizeof(struct soap_dom_attribute)); - if (!*att) - return soap->error = SOAP_EOM; - (*att)->next = NULL; - (*att)->nstr = NULL; - (*att)->name = soap_strdup(soap, tp->name); - (*att)->data = soap_strdup(soap, tp->value); - (*att)->wide = NULL; - (*att)->soap = soap; - att = &(*att)->next; - tp->visible = 0; - } - } - return SOAP_OK; - } -#endif - for (tp = soap->attributes; tp; tp = tp->next) - { if (tp->visible) - { -#ifdef WITH_XMLNS - const char *s = strchr(tp->name, ':'); - if (s) - { size_t n = s - tp->name; - if (soap->nlist && !strncmp(soap->nlist->id, tp->name, n) && !soap->nlist->id[n]) - s++; - else - s = tp->name; - if (soap_send(soap, " ") || soap_send(soap, s)) - return soap->error; - } - else -#endif - if (soap_send(soap, " ") || soap_send(soap, tp->name)) - return soap->error; - if (tp->visible == 2 && tp->value) - if (soap_send_raw(soap, "=\"", 2) - || soap_string_out(soap, tp->value, 1) - || soap_send_raw(soap, "\"", 1)) - return soap->error; - tp->visible = 0; - } - } - if (tag) - { -#ifndef WITH_LEAN - if (soap->mode & SOAP_XML_CANONICAL) - { if (soap_send_raw(soap, ">", 1) - || soap_element_end_out(soap, tag)) - return soap->error; - return SOAP_OK; - } -#endif - soap->level--; /* decrement level just before /> */ - if (soap_send_raw(soap, "/>", 2)) - return soap->error; - return SOAP_OK; - } - return soap_send_raw(soap, ">", 1); -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_element_end_out(struct soap *soap, const char *tag) -{ if (*tag == '-') - return SOAP_OK; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Element ending tag='%s'\n", tag)); -#ifdef WITH_DOM - if ((soap->mode & SOAP_XML_DOM) && soap->dom) - { if (soap->dom->prnt) - soap->dom = soap->dom->prnt; - return SOAP_OK; - } -#endif -#ifndef WITH_LEAN - if (soap->mode & SOAP_XML_CANONICAL) - soap_pop_ns(soap); - if (soap->mode & SOAP_XML_INDENT) - { if (!soap->body) - { if (soap_send_raw(soap, soap_indent, soap->level < sizeof(soap_indent) ? soap->level : sizeof(soap_indent) - 1)) - return soap->error; - } - soap->body = 0; - } -#endif -#ifdef WITH_XMLNS - { const char *s = strchr(tag, ':'); - if (s && strncmp(tag, "SOAP-ENV", s - tag)) - { soap_pop_ns(soap); - tag = s + 1; - } - } -#endif - if (soap_send_raw(soap, "error; - soap->level--; /* decrement level just before > */ - return soap_send_raw(soap, ">", 1); -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_element_ref(struct soap *soap, const char *tag, int id, int href) -{ register int n = 0; - const char *s = "href"; - if (soap->version == 2) - { s = "SOAP-ENC:ref"; - n = 1; - } - sprintf(soap->href, "#_%d", href); - return soap_element_href(soap, tag, id, s, soap->href + n); -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_element_href(struct soap *soap, const char *tag, int id, const char *ref, const char *val) -{ DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Element '%s' reference %s='%s'\n", tag, ref, val)); - if (soap_element(soap, tag, id, NULL) - || soap_attribute(soap, ref, val) - || soap_element_start_end_out(soap, tag)) - return soap->error; - return SOAP_OK; -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_element_null(struct soap *soap, const char *tag, int id, const char *type) -{ struct soap_attribute *tp; - for (tp = soap->attributes; tp; tp = tp->next) - if (tp->visible) - break; - if (tp || (soap->version == 2 && soap->position > 0) || id > 0 || (soap->mode & SOAP_XML_NIL)) - { if (soap_element(soap, tag, id, type)) - return soap->error; - if (soap->part != SOAP_IN_HEADER && soap->encodingStyle) - if (soap_attribute(soap, "xsi:nil", "true")) - return soap->error; - return soap_element_start_end_out(soap, tag); - } - soap->null = 1; - soap->position = 0; - soap->mustUnderstand = 0; - return SOAP_OK; -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_element_id(struct soap *soap, const char *tag, int id, const void *p, const struct soap_array *a, int n, const char *type, int t) -{ if (!p || (a && !a->__ptr)) - { soap_element_null(soap, tag, id, type); - return -1; - } -#ifndef WITH_NOIDREF - if (soap->mode & SOAP_XML_TREE) - return 0; - if (id < 0) - { struct soap_plist *pp; - if (a) - id = soap_array_pointer_lookup(soap, p, a, n, t, &pp); - else - id = soap_pointer_lookup(soap, p, t, &pp); - if (id) - { if (soap_is_embedded(soap, pp)) - { soap_element_ref(soap, tag, 0, id); - return -1; - } - if (soap_is_single(soap, pp)) - return 0; - soap_set_embedded(soap, pp); - } - } - return id; -#else - return 0; -#endif -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_element_result(struct soap *soap, const char *tag) -{ if (soap->version == 2 && soap->encodingStyle) - if (soap_element(soap, "SOAP-RPC:result", 0, NULL) - || soap_attribute(soap, "xmlns:SOAP-RPC", soap_rpc) - || soap_element_start_end_out(soap, NULL) - || soap_string_out(soap, tag, 0) - || soap_element_end_out(soap, "SOAP-RPC:result")) - return soap->error; - return SOAP_OK; -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_check_result(struct soap *soap, const char *tag) -{ if (soap->version == 2 && soap->encodingStyle) - { soap_instring(soap, ":result", NULL, NULL, 0, 2, -1, -1); - /* should compare tag to element's QName value? */ - } -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_attribute(struct soap *soap, const char *name, const char *value) -{ -#ifdef WITH_DOM - if ((soap->mode & SOAP_XML_DOM) && !(soap->mode & SOAP_XML_CANONICAL) && soap->dom) - { register struct soap_dom_attribute *a = (struct soap_dom_attribute*)soap_malloc(soap, sizeof(struct soap_dom_attribute)); - a->next = soap->dom->atts; - a->nstr = NULL; - a->name = soap_strdup(soap, name); - a->data = soap_strdup(soap, value); - a->wide = NULL; - a->soap = soap; - soap->dom->atts = a; - return SOAP_OK; - } -#endif -#ifndef WITH_LEAN - if (soap->mode & SOAP_XML_CANONICAL) - { /* TODO: consider using this code to handle default namespace bindings - if (!strncmp(name, "xmlns", 5) && (name[5] == ':' || name[5] == '\0')) - { if (name[5] == ':') - soap_push_ns(soap, name + 6, value, 0); - else - soap_push_ns(soap, "", value, 0); - } - */ - if (!strncmp(name, "xmlns:", 6)) - soap_push_ns(soap, name + 6, value, 0); - else if (soap_set_attr(soap, name, value)) - return soap->error; - } - else -#endif - { if (soap_send(soap, " ") || soap_send(soap, name)) - return soap->error; - if (value) - if (soap_send_raw(soap, "=\"", 2) - || soap_string_out(soap, value, 1) - || soap_send_raw(soap, "\"", 1)) - return soap->error; - } - return SOAP_OK; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_element_begin_in(struct soap *soap, const char *tag, int nillable, const char *type) -{ if (!soap_peek_element(soap)) - { if (soap->other) - return soap->error = SOAP_TAG_MISMATCH; - if (tag && *tag == '-') - return SOAP_OK; - if (!(soap->error = soap_match_tag(soap, soap->tag, tag))) - { soap->peeked = 0; - if (soap->body) - soap->level++; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Begin element found (level=%u) '%s'='%s'\n", soap->level, soap->tag, tag?tag:"" )); - if (!nillable && soap->null && (soap->mode & SOAP_XML_STRICT)) - return soap->error = SOAP_NULL; - if (type && *soap->type && soap_match_tag(soap, soap->type, type)) - return soap->error = SOAP_TYPE; - } - } - else if (soap->error == SOAP_NO_TAG && tag && *tag == '-') - soap->error = SOAP_OK; - return soap->error; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_element_end_in(struct soap *soap, const char *tag) -{ register soap_wchar c; - register char *s; - register const char *t; - register int n = 0; - if (tag && *tag == '-') - return SOAP_OK; - soap->level--; - soap_pop_namespace(soap); -#ifdef WITH_DOM - /* this whitespace or mixed content is not insignificant for DOM */ - if ((soap->mode & SOAP_XML_DOM) && soap->dom) - { if (!soap->peeked && !soap_string_in(soap, 3, -1, -1)) - return soap->error; - if (soap->dom->prnt) - soap->dom = soap->dom->prnt; - } -#endif - if (soap->peeked) - { if (soap->error == SOAP_NO_TAG) - soap->error = SOAP_OK; - if (*soap->tag) - n++; - soap->peeked = 0; - } - do - { while (((c = soap_get(soap)) != SOAP_TT)) - { if ((int)c == EOF) - return soap->error = SOAP_EOF; - if (c == SOAP_LT) - n++; - else if (c == '/') - { c = soap_get(soap); - if (c == SOAP_GT) - n--; - else - soap_unget(soap, c); - } - } - } while (n--); - s = soap->tag; - n = sizeof(soap->tag); - while (soap_notblank(c = soap_get(soap))) - { if (--n > 0) - *s++ = (char)c; - } - *s = '\0'; - if ((int)c == EOF) - return soap->error = SOAP_EOF; - while (soap_blank(c)) - c = soap_get(soap); - if (c != SOAP_GT) - return soap->error = SOAP_SYNTAX_ERROR; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "End element found (level=%u) '%s'='%s'\n", soap->level, soap->tag, tag?tag:"")); - if (!tag || !*tag) - return SOAP_OK; - if ((s = strchr(soap->tag, ':'))) - s++; - else - s = soap->tag; - if ((t = strchr(tag, ':'))) - t++; - else - t = tag; - if (!SOAP_STRCMP(s, t)) - return SOAP_OK; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "End element tag name does not match\n")); - return soap->error = SOAP_SYNTAX_ERROR; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -const char * -SOAP_FMAC2 -soap_attr_value(struct soap *soap, const char *name, int flag) -{ register struct soap_attribute *tp; - for (tp = soap->attributes; tp; tp = tp->next) - { if (tp->visible && !soap_match_tag(soap, tp->name, name)) - break; - } - if (tp) - { if (flag == 2 && (soap->mode & SOAP_XML_STRICT)) - soap->error = SOAP_PROHIBITED; - else - return tp->value; - } - else if (flag == 1 && (soap->mode & SOAP_XML_STRICT)) - soap->error = SOAP_REQUIRED; - return NULL; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_set_attr(struct soap *soap, const char *name, const char *value) -{ register struct soap_attribute *tp; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Set attribute %s='%s'\n", name, value?value:"")); - for (tp = soap->attributes; tp; tp = tp->next) - { if (!strcmp(tp->name, name)) - break; - } - if (!tp) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Allocate attribute %s\n", name)); - if (!(tp = (struct soap_attribute*)SOAP_MALLOC(soap, sizeof(struct soap_attribute) + strlen(name)))) - return soap->error = SOAP_EOM; - tp->ns = NULL; -#ifndef WITH_LEAN - if (soap->mode & SOAP_XML_CANONICAL) - { struct soap_attribute **tpp = &soap->attributes; - const char *s = strchr(name, ':'); - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Inserting attribute %s for c14n\n", name)) - if (!strncmp(name, "xmlns", 5)) - { for (; *tpp; tpp = &(*tpp)->next) - if (strncmp((*tpp)->name, "xmlns", 5) || strcmp((*tpp)->name + 5, name + 5) > 0) - break; - } - else if (!s) - { for (; *tpp; tpp = &(*tpp)->next) - if (strncmp((*tpp)->name, "xmlns", 5) && ((*tpp)->ns || strcmp((*tpp)->name, name) > 0)) - break; - } - else - { int k; - for (; *tpp; tpp = &(*tpp)->next) - { if (!strncmp((*tpp)->name, "xmlns:", 6) && !strncmp((*tpp)->name + 6, name, s - name) && !(*tpp)->name[6 + s - name]) - { if (!tp->ns) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Canonicalization: prefix %s=%p (%s)\n", name, (*tpp)->ns, (*tpp)->ns)); - tp->ns = (*tpp)->ns; - } - } - else if (strncmp((*tpp)->name, "xmlns", 5) && (*tpp)->ns && tp->ns && ((k = strcmp((*tpp)->ns, tp->ns)) > 0 || (!k && strcmp((*tpp)->name, name) > 0))) - break; - } - } - tp->next = *tpp; - *tpp = tp; - } - else -#endif - { tp->next = soap->attributes; - soap->attributes = tp; - } - strcpy(tp->name, name); - tp->value = NULL; - } - else if (tp->visible) - { return SOAP_OK; - } - else if (value && tp->value && tp->size <= strlen(value)) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Free attribute value of %s (free %p)\n", name, tp->value)); - SOAP_FREE(soap, tp->value); - tp->value = NULL; - tp->ns = NULL; - } - if (value) - { if (!tp->value) - { tp->size = strlen(value) + 1; - if (!(tp->value = (char*)SOAP_MALLOC(soap, tp->size))) - return soap->error = SOAP_EOM; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Allocate attribute value for %s (%p)\n", tp->name, tp->value)); - } - strcpy(tp->value, value); - if (!strncmp(tp->name, "xmlns:", 6)) - tp->ns = tp->value; - tp->visible = 2; -#ifndef WITH_LEAN - if (!strcmp(name, "wsu:Id")) - { soap->part = SOAP_BEGIN_SECURITY; - strncpy(soap->id, value, sizeof(soap->id)); - soap->id[sizeof(soap->id)-1] = '\0'; - } -#endif - } - else - tp->visible = 1; - return SOAP_OK; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_clr_attr(struct soap *soap) -{ register struct soap_attribute *tp; -#ifndef WITH_LEAN - if ((soap->mode & SOAP_XML_CANONICAL)) - { while (soap->attributes) - { tp = soap->attributes->next; - if (soap->attributes->value) - SOAP_FREE(soap, soap->attributes->value); - SOAP_FREE(soap, soap->attributes); - soap->attributes = tp; - } - } - else -#endif - { for (tp = soap->attributes; tp; tp = tp->next) - tp->visible = 0; - } -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -static int -soap_getattrval(struct soap *soap, char *s, size_t n, soap_wchar d) -{ register size_t i; - for (i = 0; i < n; i++) - { register soap_wchar c = soap_get(soap); - switch (c) - { - case SOAP_TT: - *s++ = '<'; - soap_unget(soap, '/'); - break; - case SOAP_LT: - *s++ = '<'; - break; - case SOAP_GT: - if (d == ' ') - { soap_unget(soap, c); - *s = '\0'; - return SOAP_OK; - } - *s++ = '>'; - break; - case SOAP_QT: - if (c == d) - { *s = '\0'; - return SOAP_OK; - } - *s++ = '"'; - break; - case SOAP_AP: - if (c == d) - { *s = '\0'; - return SOAP_OK; - } - *s++ = '\''; - break; - case '\t': - case '\n': - case '\r': - case ' ': - case '/': - if (d == ' ') - { soap_unget(soap, c); - *s = '\0'; - return SOAP_OK; - } - default: - if ((int)c == EOF) - return soap->error = SOAP_EOF; - *s++ = (char)c; - } - } - return soap->error = SOAP_EOM; -} -#endif - -/******************************************************************************/ -#ifdef WITH_FAST -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_store_lab(struct soap *soap, const char *s, size_t n) -{ soap->labidx = 0; - return soap_append_lab(soap, s, n); -} -#endif -#endif - -/******************************************************************************/ -#ifdef WITH_FAST -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_append_lab(struct soap *soap, const char *s, size_t n) -{ if (soap->labidx + n >= soap->lablen) - { register char *t = soap->labbuf; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Enlarging look-aside buffer to append data, old size=%lu", (unsigned long)soap->lablen)); - if (soap->lablen == 0) - soap->lablen = SOAP_LABLEN; - while (soap->labidx + n >= soap->lablen) - soap->lablen <<= 1; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, ", new size=%lu\n", (unsigned long)soap->lablen)); - soap->labbuf = (char*)SOAP_MALLOC(soap, soap->lablen); - if (!soap->labbuf) - { if (t) - SOAP_FREE(soap, t); - return soap->error = SOAP_EOM; - } - if (t) - { memcpy(soap->labbuf, t, soap->labidx); - SOAP_FREE(soap, t); - } - } - if (s) - { memcpy(soap->labbuf + soap->labidx, s, n); - soap->labidx += n; - } - return SOAP_OK; -} -#endif -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_peek_element(struct soap *soap) -{ -#ifdef WITH_DOM - register struct soap_dom_attribute **att = NULL; - register char *lead = NULL; -#endif - register struct soap_attribute *tp; - const char *t; - register char *s; - register soap_wchar c; - register int i; - if (soap->peeked) - { if (!*soap->tag) - return soap->error = SOAP_NO_TAG; - return SOAP_OK; - } - soap->peeked = 1; - c = soap_getutf8(soap); -#ifdef WITH_DOM - /* whitespace leading to start tag is not insignificant for DOM */ - if (soap_blank(c)) - { soap->labidx = 0; - do - { if (soap_append_lab(soap, NULL, 0)) - return SOAP_EOM; - s = soap->labbuf + soap->labidx; - i = soap->lablen - soap->labidx; - soap->labidx = soap->lablen; - while (soap_blank(c) && i--) - { *s++ = c; - c = soap_getutf8(soap); - } - } - while (soap_blank(c)); - *s = '\0'; - lead = soap_strdup(soap, soap->labbuf); - } -#else - while (soap_blank(c)) - c = soap_getutf8(soap); -#endif - if (c != SOAP_LT) - { *soap->tag = '\0'; - if ((int)c == EOF) - return soap->error = SOAP_EOF; - soap_unget(soap, c); -#ifdef WITH_DOM - /* whitespace leading to end tag is not insignificant for DOM */ - if ((soap->mode & SOAP_XML_DOM) && soap->dom) - soap->dom->tail = soap_strdup(soap, lead); -#endif - return soap->error = SOAP_NO_TAG; - } - s = soap->tag; - do c = soap_get1(soap); - while (soap_blank(c)); - i = sizeof(soap->tag); - while (c != '>' && c != '/' && soap_notblank(c) && (int)c != EOF) - { if (--i > 0) - *s++ = (char)c; - c = soap_get1(soap); - } - while (soap_blank(c)) - c = soap_get1(soap); - *s = '\0'; - soap->id[0] = '\0'; - soap->href[0] = '\0'; - soap->type[0] = '\0'; - soap->arrayType[0] = '\0'; - soap->arraySize[0] = '\0'; - soap->arrayOffset[0] = '\0'; - soap->other = 0; - soap->root = -1; - soap->position = 0; - soap->null = 0; - soap->mustUnderstand = 0; -#ifdef WITH_DOM - if (soap->mode & SOAP_XML_DOM) - { register struct soap_dom_element *elt; - elt = (struct soap_dom_element*)soap_malloc(soap, sizeof(struct soap_dom_element)); - if (!elt) - return soap->error = SOAP_EOM; - elt->next = NULL; - elt->nstr = NULL; - elt->name = soap_strdup(soap, soap->tag); - elt->prnt = soap->dom; - elt->elts = NULL; - elt->atts = NULL; - elt->data = NULL; - elt->wide = NULL; - elt->type = 0; - elt->node = NULL; - elt->head = lead; - elt->tail = NULL; - elt->soap = soap; - if (soap->dom) - { struct soap_dom_element *p = soap->dom->elts; - if (p) - { while (p->next) - p = p->next; - p->next = elt; - } - else - soap->dom->elts = elt; - } - soap->dom = elt; - att = &elt->atts; - } -#endif - for (tp = soap->attributes; tp; tp = tp->next) - tp->visible = 0; - while ((int)c != EOF && c != '>' && c != '/') - { s = soap->tmpbuf; - i = sizeof(soap->tmpbuf); - while (c != '=' && c != '>' && c != '/' && soap_notblank(c) && (int)c != EOF) - { if (--i > 0) - *s++ = (char)c; - c = soap_get1(soap); - } - *s = '\0'; - if (i == sizeof(soap->tmpbuf)) - return soap->error = SOAP_SYNTAX_ERROR; -#ifdef WITH_DOM - /* add attribute name to dom */ - if (att) - { *att = (struct soap_dom_attribute*)soap_malloc(soap, sizeof(struct soap_dom_attribute)); - if (!*att) - return soap->error = SOAP_EOM; - (*att)->next = NULL; - (*att)->nstr = NULL; - (*att)->name = soap_strdup(soap, soap->tmpbuf); - (*att)->data = NULL; - (*att)->wide = NULL; - (*att)->soap = soap; - } -#endif - if (!strncmp(soap->tmpbuf, "xmlns", 5)) - { if (soap->tmpbuf[5] == ':') - { soap->tmpbuf[5] = '\0'; - t = soap->tmpbuf + 6; - } - else if (soap->tmpbuf[5]) - t = NULL; - else - t = SOAP_STR_EOS; - } - else - t = NULL; - for (tp = soap->attributes; tp; tp = tp->next) - { if (!SOAP_STRCMP(tp->name, soap->tmpbuf)) - break; - } - if (!tp) - { tp = (struct soap_attribute*)SOAP_MALLOC(soap, sizeof(struct soap_attribute) + strlen(soap->tmpbuf)); - if (!tp) - return soap->error = SOAP_EOM; - strcpy(tp->name, soap->tmpbuf); - tp->value = NULL; - tp->size = 0; - tp->next = soap->attributes; - soap->attributes = tp; - } - while (soap_blank(c)) - c = soap_get1(soap); - if (c == '=') - { do c = soap_getutf8(soap); - while (soap_blank(c)); - if (c != SOAP_QT && c != SOAP_AP) - { soap_unget(soap, c); - c = ' '; /* blank delimiter */ - } - if (soap_getattrval(soap, tp->value, tp->size, c)) - { -#ifdef WITH_FAST - if (soap->error != SOAP_EOM) - return soap->error; - soap->error = SOAP_OK; - if (soap_store_lab(soap, tp->value, tp->size)) - return soap->error; - if (tp->value) - SOAP_FREE(soap, tp->value); - for (;;) - { if (soap_getattrval(soap, soap->labbuf + soap->labidx, soap->lablen - soap->labidx, c)) - { if (soap->error != SOAP_EOM) - return soap->error; - soap->error = SOAP_OK; - soap->labidx = soap->lablen; - if (soap_append_lab(soap, NULL, 0)) - return soap->error; - } - else - break; - } - if (soap->labidx) - tp->size = soap->lablen; - else - { tp->size = strlen(soap->labbuf) + 1; - if (tp->size < SOAP_LABLEN) - tp->size = SOAP_LABLEN; - } - if (!(tp->value = (char*)SOAP_MALLOC(soap, tp->size))) - return soap->error = SOAP_EOM; - strcpy(tp->value, soap->labbuf); -#else - size_t n; - if (soap->error != SOAP_EOM) - return soap->error; - soap->error = SOAP_OK; - if (soap_new_block(soap)) - return soap->error; - for (;;) - { if (!(s = (char*)soap_push_block(soap, SOAP_BLKLEN))) - return soap->error; - if (soap_getattrval(soap, s, SOAP_BLKLEN, c)) - { if (soap->error != SOAP_EOM) - return soap->error; - soap->error = SOAP_OK; - } - else - break; - } - n = tp->size + soap->blist->size; - if (!(s = (char*)SOAP_MALLOC(soap, n))) - return soap->error = SOAP_EOM; - if (tp->value) - { memcpy(s, tp->value, tp->size); - SOAP_FREE(soap, tp->value); - } - soap_save_block(soap, s + tp->size, 0); - tp->value = s; - tp->size = n; -#endif - } - do c = soap_get1(soap); - while (soap_blank(c)); - tp->visible = 2; /* seen this attribute w/ value */ -#ifdef WITH_DOM - if (att) - (*att)->data = soap_strdup(soap, tp->value); -#endif - } - else - tp->visible = 1; /* seen this attribute w/o value */ -#ifdef WITH_DOM - if (att) - att = &(*att)->next; -#endif - if (t && tp->value) - { if (soap_push_namespace(soap, t, tp->value)) - return soap->error; - tp->visible = 0; - } - } -#ifdef WITH_DOM - if (att) - { soap->dom->nstr = soap_current_namespace(soap, soap->tag); - for (att = &soap->dom->atts; *att; att = &(*att)->next) - (*att)->nstr = soap_current_namespace(soap, (*att)->name); - } -#endif - if ((int)c == EOF) - return soap->error = SOAP_EOF; - if (!(soap->body = (c != '/'))) - do c = soap_get1(soap); - while (soap_blank(c)); -#ifdef WITH_DOM - if (soap->mode & SOAP_XML_DOM) - { if (!soap->body && soap->dom->prnt) - soap->dom = soap->dom->prnt; - } -#endif - for (tp = soap->attributes; tp; tp = tp->next) - { if (tp->visible && tp->value) - { if (!strcmp(tp->name, "id")) - { if (soap->version > 0 - || (soap->mode & SOAP_XML_GRAPH)) - { *soap->id = '#'; - strncpy(soap->id + 1, tp->value, sizeof(soap->id) - 2); - soap->id[sizeof(soap->id)-1] = '\0'; - } - } - else if (!strcmp(tp->name, "href")) - { if (soap->version == 1 - || (soap->mode & SOAP_XML_GRAPH) - || (soap->mode & SOAP_ENC_MTOM)) - { strncpy(soap->href, tp->value, sizeof(soap->href) - 1); - soap->href[sizeof(soap->href)-1] = '\0'; - } - } - else if (!soap_match_tag(soap, tp->name, "xsi:type")) - { strncpy(soap->type, tp->value, sizeof(soap->type) - 1); - soap->type[sizeof(soap->type)-1] = '\0'; - } - else if ((!soap_match_tag(soap, tp->name, "xsi:null") - || !soap_match_tag(soap, tp->name, "xsi:nil")) - && (!strcmp(tp->value, "1") - || !strcmp(tp->value, "true"))) - { soap->null = 1; - } - else if (soap->version == 1) - { if (!soap_match_tag(soap, tp->name, "SOAP-ENC:arrayType")) - { s = soap_strrchr(tp->value, '['); - if (s && (size_t)(s - tp->value) < sizeof(soap->arrayType)) - { strncpy(soap->arrayType, tp->value, s - tp->value); - soap->arrayType[s - tp->value] = '\0'; - strncpy(soap->arraySize, s, sizeof(soap->arraySize) - 1); - } - else - strncpy(soap->arrayType, tp->value, sizeof(soap->arrayType) - 1); - soap->arraySize[sizeof(soap->arrayType)-1] = '\0'; - soap->arrayType[sizeof(soap->arrayType)-1] = '\0'; - } - else if (!soap_match_tag(soap, tp->name, "SOAP-ENC:offset")) - strncpy(soap->arrayOffset, tp->value, sizeof(soap->arrayOffset)); - else if (!soap_match_tag(soap, tp->name, "SOAP-ENC:position")) - soap->position = soap_getposition(tp->value, soap->positions); - else if (!soap_match_tag(soap, tp->name, "SOAP-ENC:root")) - soap->root = ((!strcmp(tp->value, "1") || !strcmp(tp->value, "true"))); - else if (!soap_match_tag(soap, tp->name, "SOAP-ENV:mustUnderstand") - && (!strcmp(tp->value, "1") || !strcmp(tp->value, "true"))) - soap->mustUnderstand = 1; - else if (!soap_match_tag(soap, tp->name, "SOAP-ENV:actor")) - { if ((!soap->actor || strcmp(soap->actor, tp->value)) - && strcmp(tp->value, "http://schemas.xmlsoap.org/soap/actor/next")) - soap->other = 1; - } - } - else if (soap->version == 2) - { if (!strcmp(tp->name, "ref") - || !soap_match_tag(soap, tp->name, "SOAP-ENC:ref")) - { *soap->href = '#'; - strncpy(soap->href + 1, tp->value, sizeof(soap->href) - 2); - soap->href[sizeof(soap->href)-1] = '\0'; - } - else if (!soap_match_tag(soap, tp->name, "SOAP-ENC:itemType")) - strncpy(soap->arrayType, tp->value, sizeof(soap->arrayType) - 1); - else if (!soap_match_tag(soap, tp->name, "SOAP-ENC:arraySize")) - strncpy(soap->arraySize, tp->value, sizeof(soap->arraySize) - 1); - else if (!soap_match_tag(soap, tp->name, "SOAP-ENV:mustUnderstand") - && (!strcmp(tp->value, "1") || !strcmp(tp->value, "true"))) - soap->mustUnderstand = 1; - else if (!soap_match_tag(soap, tp->name, "SOAP-ENV:role")) - { if ((!soap->actor || strcmp(soap->actor, tp->value)) - && strcmp(tp->value, "http://www.w3.org/2003/05/soap-envelope/role/next")) - soap->other = 1; - } - } - } - } - return soap->error = SOAP_OK; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_retry(struct soap *soap) -{ soap->error = SOAP_OK; - soap_revert(soap); -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_revert(struct soap *soap) -{ if (!soap->peeked) - { soap->peeked = 1; - if (soap->body) - soap->level--; - } - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Reverting last element (level=%u)\n", soap->level)); -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_string_out(struct soap *soap, const char *s, int flag) -{ register const char *t; - register soap_wchar c; - register soap_wchar mask = 0xFFFFFF80UL; -#ifdef WITH_DOM - if ((soap->mode & SOAP_XML_DOM) && soap->dom) - { soap->dom->data = soap_strdup(soap, s); - return SOAP_OK; - } -#endif - if (soap->mode & SOAP_C_UTFSTRING) - mask = 0; - t = s; - while ((c = *t++)) - { switch (c) - { - case 0x09: - if (flag) - { if (soap_send_raw(soap, s, t - s - 1) || soap_send_raw(soap, " ", 5)) - return soap->error; - s = t; - } - break; - case 0x0A: - if (flag || !(soap->mode & SOAP_XML_CANONICAL)) - { if (soap_send_raw(soap, s, t - s - 1) || soap_send_raw(soap, " ", 5)) - return soap->error; - s = t; - } - break; - case 0x0D: - if (soap_send_raw(soap, s, t - s - 1) || soap_send_raw(soap, " ", 5)) - return soap->error; - s = t; - break; - case '&': - if (soap_send_raw(soap, s, t - s - 1) || soap_send_raw(soap, "&", 5)) - return soap->error; - s = t; - break; - case '<': - if (soap_send_raw(soap, s, t - s - 1) || soap_send_raw(soap, "<", 4)) - return soap->error; - s = t; - break; - case '>': - if (!flag) - { if (soap_send_raw(soap, s, t - s - 1) || soap_send_raw(soap, ">", 4)) - return soap->error; - s = t; - } - break; - case '"': - if (flag) - { if (soap_send_raw(soap, s, t - s - 1) || soap_send_raw(soap, """, 6)) - return soap->error; - s = t; - } - break; - default: -#ifndef WITH_LEANER -#ifdef HAVE_MBTOWC - if (soap->mode & SOAP_C_MBSTRING) - { wchar_t wc; - register int m = mbtowc(&wc, t - 1, MB_CUR_MAX); - if (m > 0 && wc != c) - { if (soap_send_raw(soap, s, t - s - 1) || soap_pututf8(soap, wc)) - return soap->error; - s = t += m - 1; - continue; - } - } -#endif -#endif - if ((c & mask) || !(c & 0xFFFFFFE0UL)) - { if (soap_send_raw(soap, s, t - s - 1) || soap_pututf8(soap, (unsigned char)c)) - return soap->error; - s = t; - } - } - } - return soap_send_raw(soap, s, t - s - 1); -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -char * -SOAP_FMAC2 -soap_string_in(struct soap *soap, int flag, long minlen, long maxlen) -{ register char *s; - char *t = NULL; - register size_t i; - register long l = 0; - register int n = 0; - register int m = 0; - register soap_wchar c; -#if !defined(WITH_LEANER) && defined(HAVE_WCTOMB) - char buf[MB_LEN_MAX > 8 ? MB_LEN_MAX : 8]; -#else - char buf[8]; -#endif - DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Reading string content\n")); - if (soap->peeked) - { if (!soap->body) - return NULL; - if (*soap->tag) - { n = 1; - soap->peeked = 0; -#ifndef WITH_LEAN - t = soap->tmpbuf; - t[0] = '<'; - strncpy(t + 1, soap->tag, sizeof(soap->tmpbuf) - 1); - strncat(t, ">", sizeof(soap->tmpbuf)); - m = strlen(soap->tag) + 2; -#endif - } - } -#ifdef WITH_CDATA - if (!flag) - { register int state = 0; -#ifdef WITH_FAST - soap->labidx = 0; /* use look-aside buffer */ -#else - if (soap_new_block(soap)) - return NULL; -#endif - for (;;) - { -#ifdef WITH_FAST - register size_t k; - if (soap_append_lab(soap, NULL, 0)) /* allocate more space in look-aside buffer if necessary */ - return NULL; - s = soap->labbuf + soap->labidx; /* space to populate */ - k = soap->lablen - soap->labidx; /* number of bytes available */ - soap->labidx = soap->lablen; /* claim this space */ -#else - register size_t k = SOAP_BLKLEN; - if (!(s = (char*)soap_push_block(soap, k))) - return NULL; -#endif - for (i = 0; i < k; i++) - { if (m > 0) - { *s++ = *t++; /* copy multibyte characters */ - m--; - continue; - } - c = soap_getchar(soap); - if ((int)c == EOF) - goto end; - if (c >= 0x80 && !(soap->mode & SOAP_ENC_LATIN)) - { soap_unget(soap, c); - c = soap_getutf8(soap); - if (soap->mode & SOAP_C_UTFSTRING) - { if ((c & 0x80000000) && c >= -0x7FFFFF80 && c < SOAP_AP) - { c &= 0x7FFFFFFF; - t = buf; - if (c < 0x0800) - *t++ = (char)(0xC0 | ((c >> 6) & 0x1F)); - else - { if (c < 0x010000) - *t++ = (char)(0xE0 | ((c >> 12) & 0x0F)); - else - { if (c < 0x200000) - *t++ = (char)(0xF0 | ((c >> 18) & 0x07)); - else - { if (c < 0x04000000) - *t++ = (char)(0xF8 | ((c >> 24) & 0x03)); - else - { *t++ = (char)(0xFC | ((c >> 30) & 0x01)); - *t++ = (char)(0x80 | ((c >> 24) & 0x3F)); - } - *t++ = (char)(0x80 | ((c >> 18) & 0x3F)); - } - *t++ = (char)(0x80 | ((c >> 12) & 0x3F)); - } - *t++ = (char)(0x80 | ((c >> 6) & 0x3F)); - } - *t++ = (char)(0x80 | (c & 0x3F)); - m = (int)(t - buf) - 1; - t = buf; - *s++ = *t++; - continue; - } - } - } - switch (state) - { case 1: - if (c == ']') - state = 4; - *s++ = c; - continue; - case 2: - if (c == '-') - state = 6; - *s++ = c; - continue; - case 3: - if (c == '?') - state = 8; - *s++ = c; - continue; - /* CDATA */ - case 4: - if (c == ']') - state = 5; - else - state = 1; - *s++ = c; - continue; - case 5: - if (c == '>') - state = 0; - else - state = 1; - *s++ = c; - continue; - /* comment */ - case 6: - if (c == '-') - state = 7; - else - state = 2; - *s++ = c; - continue; - case 7: - if (c == '>') - state = 0; - else - state = 2; - *s++ = c; - continue; - /* PI */ - case 8: - if (c == '>') - state = 0; - else - state = 3; - *s++ = c; - continue; - } - switch (c) - { - case '/': - if (n > 0) - { c = soap_getchar(soap); - if (c == '>') - n--; - soap_unget(soap, c); - } - *s++ = '/'; - break; - case '<': - c = soap_getchar(soap); - if (c == '/') - { if (n == 0) - { c = SOAP_TT; - goto end; - } - n--; - } - else if (c == '!') - { c = soap_getchar(soap); - if (c == '[') - { do c = soap_getchar(soap); - while ((int)c != EOF && c != '['); - if ((int)c == EOF) - goto end; - t = (char*)"![CDATA["; - m = 8; - state = 1; - } - else if (c == '-') - { if ((c = soap_getchar(soap)) == '-') - state = 2; - t = (char*)"!-"; - m = 2; - soap_unget(soap, c); - } - else - { t = (char*)"!"; - m = 1; - soap_unget(soap, c); - } - *s++ = '<'; - break; - } - else if (c == '?') - state = 3; - else - n++; - soap_unget(soap, c); - *s++ = '<'; - break; - case '>': - *s++ = '>'; - break; - case '"': - *s++ = '"'; - break; - default: -#ifndef WITH_LEANER -#ifdef HAVE_WCTOMB - if (soap->mode & SOAP_C_MBSTRING) - { m = wctomb(buf, c & 0x7FFFFFFF); - if (m >= 1 && m <= (int)MB_CUR_MAX) - { t = buf; - *s++ = *t++; - m--; - } - else - { *s++ = SOAP_UNKNOWN_CHAR; - m = 0; - } - } - else -#endif -#endif - *s++ = (char)(c & 0xFF); - } - l++; - if ((soap->mode & SOAP_XML_STRICT) && maxlen >= 0 && l > maxlen) - { DBGLOG(TEST,SOAP_MESSAGE(fdebug, "String too long: maxlen=%ld\n", maxlen)); - soap->error = SOAP_LENGTH; - return NULL; - } - } - } - } -#endif -#ifdef WITH_FAST - soap->labidx = 0; /* use look-aside buffer */ -#else - if (soap_new_block(soap)) - return NULL; -#endif - for (;;) - { -#ifdef WITH_FAST - register size_t k; - if (soap_append_lab(soap, NULL, 0)) /* allocate more space in look-aside buffer if necessary */ - return NULL; - s = soap->labbuf + soap->labidx; /* space to populate */ - k = soap->lablen - soap->labidx; /* number of bytes available */ - soap->labidx = soap->lablen; /* claim this space */ -#else - register size_t k = SOAP_BLKLEN; - if (!(s = (char*)soap_push_block(soap, k))) - return NULL; -#endif - for (i = 0; i < k; i++) - { if (m > 0) - { *s++ = *t++; /* copy multibyte characters */ - m--; - continue; - } - if (soap->mode & SOAP_C_UTFSTRING) - { if (((c = soap_get(soap)) & 0x80000000) && c >= -0x7FFFFF80 && c < SOAP_AP) - { c &= 0x7FFFFFFF; - t = buf; - if (c < 0x0800) - *t++ = (char)(0xC0 | ((c >> 6) & 0x1F)); - else - { if (c < 0x010000) - *t++ = (char)(0xE0 | ((c >> 12) & 0x0F)); - else - { if (c < 0x200000) - *t++ = (char)(0xF0 | ((c >> 18) & 0x07)); - else - { if (c < 0x04000000) - *t++ = (char)(0xF8 | ((c >> 24) & 0x03)); - else - { *t++ = (char)(0xFC | ((c >> 30) & 0x01)); - *t++ = (char)(0x80 | ((c >> 24) & 0x3F)); - } - *t++ = (char)(0x80 | ((c >> 18) & 0x3F)); - } - *t++ = (char)(0x80 | ((c >> 12) & 0x3F)); - } - *t++ = (char)(0x80 | ((c >> 6) & 0x3F)); - } - *t++ = (char)(0x80 | (c & 0x3F)); - m = (int)(t - buf) - 1; - t = buf; - *s++ = *t++; - continue; - } - } - else - c = soap_getutf8(soap); - switch (c) - { - case SOAP_TT: - if (n == 0) - goto end; - n--; - *s++ = '<'; - t = (char*)"/"; - m = 1; - break; - case SOAP_LT: - n++; - *s++ = '<'; - break; - case SOAP_GT: - *s++ = '>'; - break; - case SOAP_QT: - *s++ = '"'; - break; - case SOAP_AP: - *s++ = '\''; - break; - case '/': - if (n > 0) - { c = soap_get(soap); - if (c == SOAP_GT) - n--; - soap_unget(soap, c); - } - *s++ = '/'; - break; - case '<' | 0x80000000: - if (flag) - *s++ = '<'; - else - { *s++ = '&'; - t = (char*)"lt;"; - m = 3; - } - break; - case '>' | 0x80000000: - if (flag) - *s++ = '>'; - else - { *s++ = '&'; - t = (char*)"gt;"; - m = 3; - } - break; - case '&' | 0x80000000: - if (flag) - *s++ = '&'; - else - { *s++ = '&'; - t = (char*)"amp;"; - m = 4; - } - break; - case '"' | 0x80000000: - if (flag) - *s++ = '"'; - else - { *s++ = '&'; - t = (char*)"quot;"; - m = 5; - } - break; - case '\'' | 0x80000000: - if (flag) - *s++ = '\''; - else - { *s++ = '&'; - t = (char*)"apos;"; - m = 5; - } - break; - default: - if ((int)c == EOF) - goto end; -#ifndef WITH_LEANER -#ifdef HAVE_WCTOMB - if (soap->mode & SOAP_C_MBSTRING) - { m = wctomb(buf, c & 0x7FFFFFFF); - if (m >= 1 && m <= (int)MB_CUR_MAX) - { t = buf; - *s++ = *t++; - m--; - } - else - { *s++ = SOAP_UNKNOWN_CHAR; - m = 0; - } - } - else -#endif -#endif - *s++ = (char)(c & 0xFF); - } - l++; - if ((soap->mode & SOAP_XML_STRICT) && maxlen >= 0 && l > maxlen) - { DBGLOG(TEST,SOAP_MESSAGE(fdebug, "String too long: maxlen=%ld\n", maxlen)); - soap->error = SOAP_LENGTH; - return NULL; - } - } - } -end: - soap_unget(soap, c); - *s = '\0'; -#ifdef WITH_FAST - t = soap_strdup(soap, soap->labbuf); -#else - soap_size_block(soap, i+1); - t = soap_save_block(soap, NULL, 0); -#endif - if ((soap->mode & SOAP_XML_STRICT) && l < minlen) - { DBGLOG(TEST,SOAP_MESSAGE(fdebug, "String too short: %ld chars, minlen=%ld\n", l, minlen)); - soap->error = SOAP_LENGTH; - return NULL; - } -#ifdef WITH_DOM - if ((soap->mode & SOAP_XML_DOM) && soap->dom) - { if (flag == 3) - soap->dom->tail = t; - else - soap->dom->data = t; - } -#endif - if (flag == 2) - if (soap_s2QName(soap, t, &t)) - return NULL; - return t; -} -#endif - -/******************************************************************************/ -#ifndef WITH_LEANER -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_wstring_out(struct soap *soap, const wchar_t *s, int flag) -{ const char *t; - char tmp; - register soap_wchar c; -#ifdef WITH_DOM - if ((soap->mode & SOAP_XML_DOM) && soap->dom) - { wchar_t *r = (wchar_t*)s; - int n = 1; - while (*r++) - n++; - soap->dom->wide = r = (wchar_t*)soap_malloc(soap, n * sizeof(wchar_t)); - while (n--) - *r++ = *s++; - return SOAP_OK; - } -#endif - while ((c = *s++)) - { switch (c) - { - case 0x09: - if (flag) - t = " "; - else - t = "\t"; - break; - case 0x0A: - if (flag || !(soap->mode & SOAP_XML_CANONICAL)) - t = " "; - else - t = "\n"; - break; - case 0x0D: - t = " "; - break; - case '&': - t = "&"; - break; - case '<': - t = "<"; - break; - case '>': - if (flag) - t = ">"; - else - t = ">"; - break; - case '"': - if (flag) - t = """; - else - t = "\""; - break; - default: - if (c >= 0x20 && c < 0x80) - { tmp = (char)c; - if (soap_send_raw(soap, &tmp, 1)) - return soap->error; - } - else if (soap_pututf8(soap, (unsigned long)c)) - return soap->error; - continue; - } - if (soap_send(soap, t)) - return soap->error; - } - return SOAP_OK; -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_LEANER -#ifndef PALM_2 -SOAP_FMAC1 -wchar_t * -SOAP_FMAC2 -soap_wstring_in(struct soap *soap, int flag, long minlen, long maxlen) -{ wchar_t *s; - register int i, n = 0; - register long l = 0; - register soap_wchar c; - const char *t = NULL; - DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Reading wide string content\n")); - if (soap->peeked) - { if (!soap->body) - return NULL; - if (*soap->tag) - { n = 1; - soap->peeked = 0; - } - } - if (soap_new_block(soap)) - return NULL; - for (;;) - { if (!(s = (wchar_t*)soap_push_block(soap, sizeof(wchar_t)*SOAP_BLKLEN))) - return NULL; - for (i = 0; i < SOAP_BLKLEN; i++) - { if (t) - { *s++ = (wchar_t)*t++; - if (!*t) - t = NULL; - continue; - } - c = soap_getutf8(soap); - switch (c) - { - case SOAP_TT: - if (n == 0) - goto end; - n--; - *s++ = '<'; - soap_unget(soap, '/'); - break; - case SOAP_LT: - n++; - *s++ = '<'; - break; - case SOAP_GT: - *s++ = '>'; - break; - case SOAP_QT: - *s++ = '"'; - break; - case SOAP_AP: - *s++ = '\''; - break; - case '/': - if (n > 0) - { c = soap_getutf8(soap); - if (c == SOAP_GT) - n--; - soap_unget(soap, c); - } - *s++ = '/'; - break; - case '<': - if (flag) - *s++ = (soap_wchar)'<'; - else - { *s++ = (soap_wchar)'&'; - t = "lt;"; - } - break; - case '>': - if (flag) - *s++ = (soap_wchar)'>'; - else - { *s++ = (soap_wchar)'&'; - t = "gt;"; - } - break; - case '"': - if (flag) - *s++ = (soap_wchar)'"'; - else - { *s++ = (soap_wchar)'&'; - t = "quot;"; - } - break; - default: - if ((int)c == EOF) - goto end; - *s++ = (wchar_t)c & 0x7FFFFFFF; - } - l++; - if ((soap->mode & SOAP_XML_STRICT) && maxlen >= 0 && l > maxlen) - { DBGLOG(TEST,SOAP_MESSAGE(fdebug, "String too long: maxlen=%ld\n", maxlen)); - soap->error = SOAP_LENGTH; - return NULL; - } - } - } -end: - soap_unget(soap, c); - *s = '\0'; - soap_size_block(soap, sizeof(wchar_t) * (i + 1)); - if ((soap->mode & SOAP_XML_STRICT) && l < minlen) - { DBGLOG(TEST,SOAP_MESSAGE(fdebug, "String too short: %ld chars, minlen=%ld\n", l, minlen)); - soap->error = SOAP_LENGTH; - return NULL; - } - s = (wchar_t*)soap_save_block(soap, NULL, 0); -#ifdef WITH_DOM - if ((soap->mode & SOAP_XML_DOM) && soap->dom) - soap->dom->wide = s; -#endif - return s; -} -#endif -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -const char* -SOAP_FMAC2 -soap_int2s(struct soap *soap, int n) -{ return soap_long2s(soap, (long)n); -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_outint(struct soap *soap, const char *tag, int id, const int *p, const char *type, int n) -{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type) - || soap_string_out(soap, soap_long2s(soap, (long)*p), 0)) - return soap->error; - return soap_element_end_out(soap, tag); -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_s2int(struct soap *soap, const char *s, int *p) -{ if (s) - { char *r; -#ifndef WITH_NOIO -#ifndef WITH_LEAN - soap_reset_errno; -#endif -#endif - *p = (int)soap_strtol(s, &r, 10); - if ((s == r && (soap->mode & SOAP_XML_STRICT)) || *r -#ifndef WITH_NOIO -#ifndef WITH_LEAN - || soap_errno == SOAP_ERANGE -#endif -#endif - ) - soap->error = SOAP_TYPE; - } - return soap->error; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int * -SOAP_FMAC2 -soap_inint(struct soap *soap, const char *tag, int *p, const char *type, int t) -{ if (soap_element_begin_in(soap, tag, 0, NULL)) - return NULL; -#ifndef WITH_LEAN - if (*soap->type - && soap_match_tag(soap, soap->type, type) - && soap_match_tag(soap, soap->type, ":int") - && soap_match_tag(soap, soap->type, ":short") - && soap_match_tag(soap, soap->type, ":byte")) - { soap->error = SOAP_TYPE; - soap_revert(soap); - return NULL; - } -#endif - p = (int*)soap_id_enter(soap, soap->id, p, t, sizeof(int), 0, NULL, NULL, NULL); - if (*soap->href) - p = (int*)soap_id_forward(soap, soap->href, p, 0, t, 0, sizeof(int), 0, NULL); - else if (p) - { if (soap_s2int(soap, soap_value(soap), p)) - return NULL; - } - if (soap->body && soap_element_end_in(soap, tag)) - return NULL; - return p; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -const char* -SOAP_FMAC2 -soap_long2s(struct soap *soap, long n) -{ sprintf(soap->tmpbuf, "%ld", n); - return soap->tmpbuf; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_outlong(struct soap *soap, const char *tag, int id, const long *p, const char *type, int n) -{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type) - || soap_string_out(soap, soap_long2s(soap, *p), 0)) - return soap->error; - return soap_element_end_out(soap, tag); -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_s2long(struct soap *soap, const char *s, long *p) -{ if (s) - { char *r; -#ifndef WITH_NOIO -#ifndef WITH_LEAN - soap_reset_errno; -#endif -#endif - *p = soap_strtol(s, &r, 10); - if ((s == r && (soap->mode & SOAP_XML_STRICT)) || *r -#ifndef WITH_NOIO -#ifndef WITH_LEAN - || soap_errno == SOAP_ERANGE -#endif -#endif - ) - soap->error = SOAP_TYPE; - } - return soap->error; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -long * -SOAP_FMAC2 -soap_inlong(struct soap *soap, const char *tag, long *p, const char *type, int t) -{ if (soap_element_begin_in(soap, tag, 0, NULL)) - return NULL; -#ifndef WITH_LEAN - if (*soap->type - && soap_match_tag(soap, soap->type, type) - && soap_match_tag(soap, soap->type, ":int") - && soap_match_tag(soap, soap->type, ":short") - && soap_match_tag(soap, soap->type, ":byte")) - { soap->error = SOAP_TYPE; - soap_revert(soap); - return NULL; - } -#endif - p = (long*)soap_id_enter(soap, soap->id, p, t, sizeof(long), 0, NULL, NULL, NULL); - if (*soap->href) - p = (long*)soap_id_forward(soap, soap->href, p, 0, t, 0, sizeof(long), 0, NULL); - else if (p) - { if (soap_s2long(soap, soap_value(soap), p)) - return NULL; - } - if (soap->body && soap_element_end_in(soap, tag)) - return NULL; - return p; -} -#endif - -/******************************************************************************/ -#ifndef WITH_LEAN -SOAP_FMAC1 -const char* -SOAP_FMAC2 -soap_LONG642s(struct soap *soap, LONG64 n) -{ sprintf(soap->tmpbuf, SOAP_LONG_FORMAT, n); - return soap->tmpbuf; -} -#endif - -/******************************************************************************/ -#ifndef WITH_LEAN -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_outLONG64(struct soap *soap, const char *tag, int id, const LONG64 *p, const char *type, int n) -{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type) - || soap_string_out(soap, soap_LONG642s(soap, *p), 0)) - return soap->error; - return soap_element_end_out(soap, tag); -} -#endif - -/******************************************************************************/ -#ifndef WITH_LEAN -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_s2LONG64(struct soap *soap, const char *s, LONG64 *p) -{ if (s) - { -#ifdef HAVE_STRTOLL - char *r; -#ifndef WITH_NOIO -#ifndef WITH_LEAN - soap_reset_errno; -#endif -#endif - *p = strtoll(s, &r, 10); - if ((s == r && (soap->mode & SOAP_XML_STRICT)) || *r -#ifndef WITH_NOIO -#ifndef WITH_LEAN - || soap_errno == SOAP_ERANGE -#endif -#endif - ) -#else -# ifdef HAVE_SSCANF - if (sscanf(s, SOAP_LONG_FORMAT, p) != 1) -# endif -#endif - soap->error = SOAP_TYPE; - } - return soap->error; -} -#endif - -/******************************************************************************/ -#ifndef WITH_LEAN -SOAP_FMAC1 -LONG64 * -SOAP_FMAC2 -soap_inLONG64(struct soap *soap, const char *tag, LONG64 *p, const char *type, int t) -{ if (soap_element_begin_in(soap, tag, 0, NULL)) - return NULL; -#ifndef WITH_LEAN - if (*soap->type - && soap_match_tag(soap, soap->type, type) - && soap_match_tag(soap, soap->type, ":integer") - && soap_match_tag(soap, soap->type, ":positiveInteger") - && soap_match_tag(soap, soap->type, ":negativeInteger") - && soap_match_tag(soap, soap->type, ":nonPositiveInteger") - && soap_match_tag(soap, soap->type, ":nonNegativeInteger") - && soap_match_tag(soap, soap->type, ":long") - && soap_match_tag(soap, soap->type, ":int") - && soap_match_tag(soap, soap->type, ":short") - && soap_match_tag(soap, soap->type, ":byte")) - { soap->error = SOAP_TYPE; - soap_revert(soap); - return NULL; - } -#endif - p = (LONG64*)soap_id_enter(soap, soap->id, p, t, sizeof(LONG64), 0, NULL, NULL, NULL); - if (*soap->href) - p = (LONG64*)soap_id_forward(soap, soap->href, p, 0, t, 0, sizeof(LONG64), 0, NULL); - else if (p) - { if (soap_s2LONG64(soap, soap_value(soap), p)) - return NULL; - } - if (soap->body && soap_element_end_in(soap, tag)) - return NULL; - return p; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -const char* -SOAP_FMAC2 -soap_byte2s(struct soap *soap, char n) -{ return soap_long2s(soap, (long)n); -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_outbyte(struct soap *soap, const char *tag, int id, const char *p, const char *type, int n) -{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type) - || soap_string_out(soap, soap_long2s(soap, (long)*p), 0)) - return soap->error; - return soap_element_end_out(soap, tag); -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_s2byte(struct soap *soap, const char *s, char *p) -{ if (s) - { long n; - char *r; - n = soap_strtol(s, &r, 10); - if (s == r || *r || n < -128 || n > 127) - soap->error = SOAP_TYPE; - *p = (char)n; - } - return soap->error; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -char * -SOAP_FMAC2 -soap_inbyte(struct soap *soap, const char *tag, char *p, const char *type, int t) -{ if (soap_element_begin_in(soap, tag, 0, NULL)) - return NULL; -#ifndef WITH_LEAN - if (*soap->type - && soap_match_tag(soap, soap->type, type) - && soap_match_tag(soap, soap->type, ":byte")) - { soap->error = SOAP_TYPE; - soap_revert(soap); - return NULL; - } -#endif - p = (char*)soap_id_enter(soap, soap->id, p, t, sizeof(char), 0, NULL, NULL, NULL); - if (*soap->href) - p = (char*)soap_id_forward(soap, soap->href, p, 0, t, 0, sizeof(char), 0, NULL); - else if (p) - { if (soap_s2byte(soap, soap_value(soap), p)) - return NULL; - } - if (soap->body && soap_element_end_in(soap, tag)) - return NULL; - return p; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -const char* -SOAP_FMAC2 -soap_short2s(struct soap *soap, short n) -{ return soap_long2s(soap, (long)n); -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_outshort(struct soap *soap, const char *tag, int id, const short *p, const char *type, int n) -{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type) - || soap_string_out(soap, soap_long2s(soap, (long)*p), 0)) - return soap->error; - return soap_element_end_out(soap, tag); -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_s2short(struct soap *soap, const char *s, short *p) -{ if (s) - { long n; - char *r; - n = soap_strtol(s, &r, 10); - if (s == r || *r || n < -32768 || n > 32767) - soap->error = SOAP_TYPE; - *p = (short)n; - } - return soap->error; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -short * -SOAP_FMAC2 -soap_inshort(struct soap *soap, const char *tag, short *p, const char *type, int t) -{ if (soap_element_begin_in(soap, tag, 0, NULL)) - return NULL; -#ifndef WITH_LEAN - if (*soap->type - && soap_match_tag(soap, soap->type, type) - && soap_match_tag(soap, soap->type, ":short") - && soap_match_tag(soap, soap->type, ":byte")) - { soap->error = SOAP_TYPE; - soap_revert(soap); - return NULL; - } -#endif - p = (short*)soap_id_enter(soap, soap->id, p, t, sizeof(short), 0, NULL, NULL, NULL); - if (*soap->href) - p = (short*)soap_id_forward(soap, soap->href, p, 0, t, 0, sizeof(short), 0, NULL); - else if (p) - { if (soap_s2short(soap, soap_value(soap), p)) - return NULL; - } - if (soap->body && soap_element_end_in(soap, tag)) - return NULL; - return p; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -const char* -SOAP_FMAC2 -soap_float2s(struct soap *soap, float n) -{ char *s; - if (soap_isnan((double)n)) - s = "NaN"; - else if (soap_ispinff(n)) - s = "INF"; - else if (soap_isninff(n)) - s = "-INF"; - else - { char *t; - s = soap->tmpbuf; - sprintf(soap->tmpbuf, soap->float_format, n); - t = strchr(s, ','); /* convert decimal comma to DP */ - if (t) - *t = '.'; - } - return s; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_outfloat(struct soap *soap, const char *tag, int id, const float *p, const char *type, int n) -{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type) - || soap_string_out(soap, soap_float2s(soap, *p), 0)) - return soap->error; - return soap_element_end_out(soap, tag); -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_s2float(struct soap *soap, const char *s, float *p) -{ if (s) - { if (!*s) - return soap->error = SOAP_TYPE; - if (!soap_tag_cmp(s, "INF")) - *p = FLT_PINFTY; - else if (!soap_tag_cmp(s, "+INF")) - *p = FLT_PINFTY; - else if (!soap_tag_cmp(s, "-INF")) - *p = FLT_NINFTY; - else if (!soap_tag_cmp(s, "NaN")) - *p = FLT_NAN; - else - { -/* On some systems, strtof appears to be broken or doesn't link: use with caution */ -#if defined(HAVE_STRTOF) - char *r; - *p = strtof((char*)s, &r); - if (*r) -#elif defined(HAVE_STRTOD) - char *r; - *p = (float)strtod(s, &r); - if (*r) -#endif -#ifdef HAVE_SSCANF - if (sscanf(s, "%g", p) != 1) - soap->error = SOAP_TYPE; -#else - soap->error = SOAP_TYPE; -#endif - } - } - return soap->error; -} -#endif - -/******************************************************************************/ -#ifndef WITH_LEAN -static int soap_isnumeric(struct soap *soap, const char *type) -{ if (soap_match_tag(soap, soap->type, type) - && soap_match_tag(soap, soap->type, ":float") - && soap_match_tag(soap, soap->type, ":double") - && soap_match_tag(soap, soap->type, ":decimal") - && soap_match_tag(soap, soap->type, ":integer") - && soap_match_tag(soap, soap->type, ":positiveInteger") - && soap_match_tag(soap, soap->type, ":negativeInteger") - && soap_match_tag(soap, soap->type, ":nonPositiveInteger") - && soap_match_tag(soap, soap->type, ":nonNegativeInteger") - && soap_match_tag(soap, soap->type, ":long") - && soap_match_tag(soap, soap->type, ":int") - && soap_match_tag(soap, soap->type, ":short") - && soap_match_tag(soap, soap->type, ":byte") - && soap_match_tag(soap, soap->type, ":unsignedLong") - && soap_match_tag(soap, soap->type, ":unsignedInt") - && soap_match_tag(soap, soap->type, ":unsignedShort") - && soap_match_tag(soap, soap->type, ":unsignedByte")) - { soap->error = SOAP_TYPE; - soap_revert(soap); - return SOAP_ERR; - } - return SOAP_OK; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -float * -SOAP_FMAC2 -soap_infloat(struct soap *soap, const char *tag, float *p, const char *type, int t) -{ if (soap_element_begin_in(soap, tag, 0, NULL)) - return NULL; -#ifndef WITH_LEAN - if (*soap->type != '\0' && soap_isnumeric(soap, type)) - return NULL; -#endif - p = (float*)soap_id_enter(soap, soap->id, p, t, sizeof(float), 0, NULL, NULL, NULL); - if (*soap->href) - p = (float*)soap_id_forward(soap, soap->href, p, 0, t, 0, sizeof(float), 0, NULL); - else if (p) - { if (soap_s2float(soap, soap_value(soap), p)) - return NULL; - } - if (soap->body && soap_element_end_in(soap, tag)) - return NULL; - return p; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -const char* -SOAP_FMAC2 -soap_double2s(struct soap *soap, double n) -{ char *s; - if (soap_isnan(n)) - s = "NaN"; - else if (soap_ispinfd(n)) - s = "INF"; - else if (soap_isninfd(n)) - s = "-INF"; - else - { char *t; - s = soap->tmpbuf; - sprintf(soap->tmpbuf, soap->double_format, n); - t = strchr(s, ','); /* convert decimal comma to DP */ - if (t) - *t = '.'; - } - return s; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_outdouble(struct soap *soap, const char *tag, int id, const double *p, const char *type, int n) -{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type) - || soap_string_out(soap, soap_double2s(soap, *p), 0)) - return soap->error; - return soap_element_end_out(soap, tag); -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_s2double(struct soap *soap, const char *s, double *p) -{ if (s) - { if (!*s) - return soap->error = SOAP_TYPE; - if (!soap_tag_cmp(s, "INF")) - *p = DBL_PINFTY; - else if (!soap_tag_cmp(s, "+INF")) - *p = DBL_PINFTY; - else if (!soap_tag_cmp(s, "-INF")) - *p = DBL_NINFTY; - else if (!soap_tag_cmp(s, "NaN")) - *p = DBL_NAN; - else - { -#ifdef HAVE_STRTOD - char *r; - *p = strtod(s, &r); - if (*r) -#endif -#ifdef HAVE_SSCANF - if (sscanf(s, "%lg", p) != 1) - soap->error = SOAP_TYPE; -#else - soap->error = SOAP_TYPE; -#endif - } - } - return soap->error; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -double * -SOAP_FMAC2 -soap_indouble(struct soap *soap, const char *tag, double *p, const char *type, int t) -{ if (soap_element_begin_in(soap, tag, 0, NULL)) - return NULL; -#ifndef WITH_LEAN - if (*soap->type != '\0' && soap_isnumeric(soap, type)) - return NULL; -#endif - p = (double*)soap_id_enter(soap, soap->id, p, t, sizeof(double), 0, NULL, NULL, NULL); - if (*soap->href) - p = (double*)soap_id_forward(soap, soap->href, p, 0, t, 0, sizeof(double), 0, NULL); - else if (p) - { if (soap_s2double(soap, soap_value(soap), p)) - return NULL; - } - if (soap->body && soap_element_end_in(soap, tag)) - return NULL; - return p; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -const char* -SOAP_FMAC2 -soap_unsignedByte2s(struct soap *soap, unsigned char n) -{ return soap_unsignedLong2s(soap, (unsigned long)n); -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_outunsignedByte(struct soap *soap, const char *tag, int id, const unsigned char *p, const char *type, int n) -{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type) - || soap_string_out(soap, soap_unsignedLong2s(soap, (unsigned long)*p), 0)) - return soap->error; - return soap_element_end_out(soap, tag); -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_s2unsignedByte(struct soap *soap, const char *s, unsigned char *p) -{ if (s) - { unsigned long n; - char *r; - n = soap_strtoul(s, &r, 10); - if (s == r || *r || n > 255) - soap->error = SOAP_TYPE; - *p = (unsigned char)n; - } - return soap->error; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -unsigned char * -SOAP_FMAC2 -soap_inunsignedByte(struct soap *soap, const char *tag, unsigned char *p, const char *type, int t) -{ if (soap_element_begin_in(soap, tag, 0, NULL)) - return NULL; -#ifndef WITH_LEAN - if (*soap->type - && soap_match_tag(soap, soap->type, type) - && soap_match_tag(soap, soap->type, ":unsignedByte")) - { soap->error = SOAP_TYPE; - soap_revert(soap); - return NULL; - } -#endif - p = (unsigned char*)soap_id_enter(soap, soap->id, p, t, sizeof(unsigned char), 0, NULL, NULL, NULL); - if (*soap->href) - p = (unsigned char*)soap_id_forward(soap, soap->href, p, 0, t, 0, sizeof(unsigned char), 0, NULL); - else if (p) - { if (soap_s2unsignedByte(soap, soap_value(soap), p)) - return NULL; - } - if (soap->body && soap_element_end_in(soap, tag)) - return NULL; - return p; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -const char* -SOAP_FMAC2 -soap_unsignedShort2s(struct soap *soap, unsigned short n) -{ return soap_unsignedLong2s(soap, (unsigned long)n); -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_outunsignedShort(struct soap *soap, const char *tag, int id, const unsigned short *p, const char *type, int n) -{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type) - || soap_string_out(soap, soap_unsignedLong2s(soap, (unsigned long)*p), 0)) - return soap->error; - return soap_element_end_out(soap, tag); -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_s2unsignedShort(struct soap *soap, const char *s, unsigned short *p) -{ if (s) - { unsigned long n; - char *r; - n = soap_strtoul(s, &r, 10); - if (s == r || *r || n > 65535) - soap->error = SOAP_TYPE; - *p = (unsigned short)n; - } - return soap->error; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -unsigned short * -SOAP_FMAC2 -soap_inunsignedShort(struct soap *soap, const char *tag, unsigned short *p, const char *type, int t) -{ if (soap_element_begin_in(soap, tag, 0, NULL)) - return NULL; -#ifndef WITH_LEAN - if (*soap->type - && soap_match_tag(soap, soap->type, type) - && soap_match_tag(soap, soap->type, ":unsignedShort") - && soap_match_tag(soap, soap->type, ":unsignedByte")) - { soap->error = SOAP_TYPE; - soap_revert(soap); - return NULL; - } -#endif - p = (unsigned short*)soap_id_enter(soap, soap->id, p, t, sizeof(unsigned short), 0, NULL, NULL, NULL); - if (*soap->href) - p = (unsigned short*)soap_id_forward(soap, soap->href, p, 0, t, 0, sizeof(unsigned short), 0, NULL); - else if (p) - { if (soap_s2unsignedShort(soap, soap_value(soap), p)) - return NULL; - } - if (soap->body && soap_element_end_in(soap, tag)) - return NULL; - return p; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -const char* -SOAP_FMAC2 -soap_unsignedInt2s(struct soap *soap, unsigned int n) -{ return soap_unsignedLong2s(soap, (unsigned long)n); -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_outunsignedInt(struct soap *soap, const char *tag, int id, const unsigned int *p, const char *type, int n) -{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type) - || soap_string_out(soap, soap_unsignedLong2s(soap, (unsigned long)*p), 0)) - return soap->error; - return soap_element_end_out(soap, tag); -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_s2unsignedInt(struct soap *soap, const char *s, unsigned int *p) -{ if (s) - { char *r; -#ifndef WITH_NOIO -#ifndef WITH_LEAN - soap_reset_errno; -#endif -#endif - *p = (unsigned int)soap_strtoul(s, &r, 10); - if ((s == r && (soap->mode & SOAP_XML_STRICT)) || *r -#ifndef WITH_NOIO -#ifndef WITH_LEAN - || soap_errno == SOAP_ERANGE -#endif -#endif - ) - soap->error = SOAP_TYPE; - } - return soap->error; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -unsigned int * -SOAP_FMAC2 -soap_inunsignedInt(struct soap *soap, const char *tag, unsigned int *p, const char *type, int t) -{ if (soap_element_begin_in(soap, tag, 0, NULL)) - return NULL; -#ifndef WITH_LEAN - if (*soap->type - && soap_match_tag(soap, soap->type, type) - && soap_match_tag(soap, soap->type, ":unsignedInt") - && soap_match_tag(soap, soap->type, ":unsignedShort") - && soap_match_tag(soap, soap->type, ":unsignedByte")) - { soap->error = SOAP_TYPE; - soap_revert(soap); - return NULL; - } -#endif - p = (unsigned int*)soap_id_enter(soap, soap->id, p, t, sizeof(unsigned int), 0, NULL, NULL, NULL); - if (*soap->href) - p = (unsigned int*)soap_id_forward(soap, soap->href, p, 0, t, 0, sizeof(unsigned int), 0, NULL); - else if (p) - { if (soap_s2unsignedInt(soap, soap_value(soap), p)) - return NULL; - } - if (soap->body && soap_element_end_in(soap, tag)) - return NULL; - return p; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -const char* -SOAP_FMAC2 -soap_unsignedLong2s(struct soap *soap, unsigned long n) -{ sprintf(soap->tmpbuf, "%lu", n); - return soap->tmpbuf; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_outunsignedLong(struct soap *soap, const char *tag, int id, const unsigned long *p, const char *type, int n) -{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type) - || soap_string_out(soap, soap_unsignedLong2s(soap, *p), 0)) - return soap->error; - return soap_element_end_out(soap, tag); -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_s2unsignedLong(struct soap *soap, const char *s, unsigned long *p) -{ if (s) - { char *r; -#ifndef WITH_NOIO -#ifndef WITH_LEAN - soap_reset_errno; -#endif -#endif - *p = soap_strtoul(s, &r, 10); - if ((s == r && (soap->mode & SOAP_XML_STRICT)) || *r -#ifndef WITH_NOIO -#ifndef WITH_LEAN - || soap_errno == SOAP_ERANGE -#endif -#endif - ) - soap->error = SOAP_TYPE; - } - return soap->error; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -unsigned long * -SOAP_FMAC2 -soap_inunsignedLong(struct soap *soap, const char *tag, unsigned long *p, const char *type, int t) -{ if (soap_element_begin_in(soap, tag, 0, NULL)) - return NULL; -#ifndef WITH_LEAN - if (*soap->type - && soap_match_tag(soap, soap->type, type) - && soap_match_tag(soap, soap->type, ":unsignedInt") - && soap_match_tag(soap, soap->type, ":unsignedShort") - && soap_match_tag(soap, soap->type, ":unsignedByte")) - { soap->error = SOAP_TYPE; - soap_revert(soap); - return NULL; - } -#endif - p = (unsigned long*)soap_id_enter(soap, soap->id, p, t, sizeof(unsigned long), 0, NULL, NULL, NULL); - if (*soap->href) - p = (unsigned long*)soap_id_forward(soap, soap->href, p, 0, t, 0, sizeof(unsigned long), 0, NULL); - else if (p) - { if (soap_s2unsignedLong(soap, soap_value(soap), p)) - return NULL; - } - if (soap->body && soap_element_end_in(soap, tag)) - return NULL; - return p; -} -#endif - -/******************************************************************************/ -#ifndef WITH_LEAN -SOAP_FMAC1 -const char* -SOAP_FMAC2 -soap_ULONG642s(struct soap *soap, ULONG64 n) -{ sprintf(soap->tmpbuf, SOAP_ULONG_FORMAT, n); - return soap->tmpbuf; -} -#endif - -/******************************************************************************/ -#ifndef WITH_LEAN -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_outULONG64(struct soap *soap, const char *tag, int id, const ULONG64 *p, const char *type, int n) -{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type) - || soap_string_out(soap, soap_ULONG642s(soap, *p), 0)) - return soap->error; - return soap_element_end_out(soap, tag); -} -#endif - -/******************************************************************************/ -#ifndef WITH_LEAN -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_s2ULONG64(struct soap *soap, const char *s, ULONG64 *p) -{ if (s) - { -#ifdef HAVE_STRTOULL - char *r; -#ifndef WITH_NOIO -#ifndef WITH_LEAN - soap_reset_errno; -#endif -#endif - *p = strtoull(s, &r, 10); - if ((s == r && (soap->mode & SOAP_XML_STRICT)) || *r -#ifndef WITH_NOIO -#ifndef WITH_LEAN - || soap_errno == SOAP_ERANGE -#endif -#endif - ) -#else -# ifdef HAVE_SSCANF - if (sscanf(s, SOAP_ULONG_FORMAT, p) != 1) -# endif -#endif - soap->error = SOAP_TYPE; - } - return soap->error; -} -#endif - -/******************************************************************************/ -#ifndef WITH_LEAN -SOAP_FMAC1 -ULONG64 * -SOAP_FMAC2 -soap_inULONG64(struct soap *soap, const char *tag, ULONG64 *p, const char *type, int t) -{ if (soap_element_begin_in(soap, tag, 0, NULL)) - return NULL; - if (*soap->type - && soap_match_tag(soap, soap->type, type) - && soap_match_tag(soap, soap->type, ":positiveInteger") - && soap_match_tag(soap, soap->type, ":nonNegativeInteger") - && soap_match_tag(soap, soap->type, ":unsignedLong") - && soap_match_tag(soap, soap->type, ":unsignedInt") - && soap_match_tag(soap, soap->type, ":unsignedShort") - && soap_match_tag(soap, soap->type, ":unsignedByte")) - { soap->error = SOAP_TYPE; - soap_revert(soap); - return NULL; - } - p = (ULONG64*)soap_id_enter(soap, soap->id, p, t, sizeof(ULONG64), 0, NULL, NULL, NULL); - if (*soap->href) - p = (ULONG64*)soap_id_forward(soap, soap->href, p, 0, t, 0, sizeof(ULONG64), 0, NULL); - else if (p) - { if (soap_s2ULONG64(soap, soap_value(soap), p)) - return NULL; - } - if (soap->body && soap_element_end_in(soap, tag)) - return NULL; - return p; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_s2string(struct soap *soap, const char *s, char **t) -{ *t = NULL; - if (s) - { if (!(*t = soap_strdup(soap, s))) - return soap->error = SOAP_EOM; - if (!(soap->mode & (SOAP_ENC_LATIN | SOAP_C_UTFSTRING))) - { /* TODO: consider truncating UTF8 to ASCII for regular XML attribute strings? */ - } - } - return soap->error; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_s2QName(struct soap *soap, const char *s, char **t) -{ if (s) - { struct soap_nlist *np = soap->nlist; - const char *p; - /* if there is no namespace stack, or prefix is "xml" then pass string */ - if (!np || !strncmp(s, "xml:", 4)) - { *t = soap_strdup(soap, s); - return SOAP_OK; - } - /* else we normalize the QName by replacing its prefix */ - p = strchr(s, ':'); - if (p) - { register int n = p - s; - while (np && (strncmp(np->id, s, n) || np->id[n])) - np = np->next; - p++; - } - else - { while (np && *np->id) - np = np->next; - p = s; - } - if (np) - { if (np->index >= 0 && soap->local_namespaces) - { register const char *q = soap->local_namespaces[np->index].id; - if (q) - { if ((*t = (char*)soap_malloc(soap, strlen(p) + strlen(q) + 2))) - sprintf(*t, "%s:%s", q, p); - return SOAP_OK; - } - } - if (np->ns) - { if ((*t = (char*)soap_malloc(soap, strlen(p) + strlen(np->ns) + 4))) - sprintf(*t, "\"%s\":%s", np->ns, p); - return SOAP_OK; - } - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Namespace prefix of '%s' not defined (index=%d, URI=%s)\n", s, np->index, np->ns?np->ns:"")); - return soap->error = SOAP_NAMESPACE; - } - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Namespace prefix of '%s' not defined, assuming empty namespace\n", s)); - if ((*t = (char*)soap_malloc(soap, strlen(p) + 4))) - sprintf(*t, "\"\":%s", p); - } - else - *t = NULL; - return soap->error; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -const char* -SOAP_FMAC2 -soap_QName2s(struct soap *soap, const char *s) -{ struct Namespace *p; - char *t; - int n; - if (!s || *s != '"') - { -#ifndef WITH_LEAN - if (s && (soap->mode & SOAP_XML_CANONICAL)) - { t = (char*)strchr(s, ':'); - if (t) - soap_utilize_ns(soap, s, t - s); - } -#endif - return s; - } - s++; - if ((p = soap->local_namespaces)) - { for (; p->id; p++) - { if (p->ns) - if (!soap_tag_cmp(s, p->ns)) - break; - if (p->in) - if (!soap_tag_cmp(s, p->in)) - break; - } - if (p && p->id) - { s = strchr(s, '"'); - if (s) - { t = (char*)soap_malloc(soap, strlen(p->id) + strlen(s)); - strcpy(t, p->id); - strcat(t, s + 1); - return t; - } - } - } - t = (char*)strchr(s, '"'); - if (t) - n = t - s; - else - n = 0; - t = soap_strdup(soap, s); - t[n] = '\0'; - sprintf(soap->tmpbuf, "xmlns:_%d", soap->idnum++); - soap_set_attr(soap, soap->tmpbuf, t); - s = strchr(s, '"'); - if (s) - { t = (char*)soap_malloc(soap, strlen(soap->tmpbuf) + strlen(s) - 6); - strcpy(t, soap->tmpbuf + 6); - strcat(t, s + 1); - } - return t; -} -#endif - -/******************************************************************************/ -#ifndef WITH_LEAN -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_s2wchar(struct soap *soap, const char *s, wchar_t **t) -{ wchar_t *r; - if (!s) - *t = NULL; - else - { *t = r = (wchar_t*)soap_malloc(soap, sizeof(wchar_t) * (strlen(s) + 1)); - if (!r) - return soap->error; - if (soap->mode & SOAP_ENC_LATIN) - { while (*s) - *r++ = (wchar_t)*s++; - } - else - { /* Convert UTF8 to wchar */ - while (*s) - { register soap_wchar c, c1, c2, c3, c4; - c = *s++; - if (c < 0x80) - *r++ = (wchar_t)c; - else - { c1 = (soap_wchar)*s++ & 0x3F; - if (c < 0xE0) - *r++ = (wchar_t)(((soap_wchar)(c & 0x1F) << 6) | c1); - else - { c2 = (soap_wchar)*s++ & 0x3F; - if (c < 0xF0) - *r++ = (wchar_t)(((soap_wchar)(c & 0x0F) << 12) | (c1 << 6) | c2); - else - { c3 = (soap_wchar)*s++ & 0x3F; - if (c < 0xF8) - *r++ = (wchar_t)(((soap_wchar)(c & 0x07) << 18) | (c1 << 12) | (c2 << 6) | c3); - else - { c4 = (soap_wchar)*s++ & 0x3F; - if (c < 0xFC) - *r++ = (wchar_t)(((soap_wchar)(c & 0x03) << 24) | (c1 << 18) | (c2 << 12) | (c3 << 6) | c4); - else - *r++ = (wchar_t)(((soap_wchar)(c & 0x01) << 30) | (c1 << 24) | (c2 << 18) | (c3 << 12) | (c4 << 6) | (soap_wchar)(*s++ & 0x3F)); - } - } - } - } - } - } - *r = L'\0'; - } - return SOAP_OK; -} -#endif - -/******************************************************************************/ -#ifndef WITH_LEAN -SOAP_FMAC1 -const char* -SOAP_FMAC2 -soap_wchar2s(struct soap *soap, const wchar_t *s) -{ register soap_wchar c; - register char *r, *t; - const wchar_t *q = s; - size_t n = 0; - while ((c = *q++)) - { if (c > 0 && c < 0x80) - n++; - else - n += 6; - } - r = t = (char*)soap_malloc(soap, n + 1); - if (r) - { /* Convert wchar to UTF8 */ - while ((c = *s++)) - { if (c > 0 && c < 0x80) - *t++ = (char)c; - else - { if (c < 0x0800) - *t++ = (char)(0xC0 | ((c >> 6) & 0x1F)); - else - { if (c < 0x010000) - *t++ = (char)(0xE0 | ((c >> 12) & 0x0F)); - else - { if (c < 0x200000) - *t++ = (char)(0xF0 | ((c >> 18) & 0x07)); - else - { if (c < 0x04000000) - *t++ = (char)(0xF8 | ((c >> 24) & 0x03)); - else - { *t++ = (char)(0xFC | ((c >> 30) & 0x01)); - *t++ = (char)(0x80 | ((c >> 24) & 0x3F)); - } - *t++ = (char)(0x80 | ((c >> 18) & 0x3F)); - } - *t++ = (char)(0x80 | ((c >> 12) & 0x3F)); - } - *t++ = (char)(0x80 | ((c >> 6) & 0x3F)); - } - *t++ = (char)(0x80 | (c & 0x3F)); - } - } - *t = '\0'; - } - return r; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_outstring(struct soap *soap, const char *tag, int id, char *const*p, const char *type, int n) -{ id = soap_element_id(soap, tag, id, *p, NULL, 0, type, n); - if (id < 0) - return soap->error; - if (!**p && (soap->mode & SOAP_C_NILSTRING)) - return soap_element_null(soap, tag, id, type); - if (soap_element_begin_out(soap, tag, id, type) - || soap_string_out(soap, *p, 0) - || soap_element_end_out(soap, tag)) - return soap->error; - return SOAP_OK; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -char ** -SOAP_FMAC2 -soap_instring(struct soap *soap, const char *tag, char **p, const char *type, int t, int flag, long minlen, long maxlen) -{ if (soap_element_begin_in(soap, tag, 1, NULL)) - { if (!tag || *tag != '-' || soap->error != SOAP_NO_TAG) - return NULL; - soap->error = SOAP_OK; - } - if (!p) - if (!(p = (char**)soap_malloc(soap, sizeof(char*)))) - return NULL; - if (soap->body) - { *p = soap_string_in(soap, flag, minlen, maxlen); - if (!*p || !(char*)soap_id_enter(soap, soap->id, *p, t, sizeof(char*), 0, NULL, NULL, NULL)) - return NULL; - } - else if (soap->null) - *p = NULL; - else - *p = (char*)SOAP_STR_EOS; - if (*soap->href) - p = (char**)soap_id_lookup(soap, soap->href, (void**)p, t, sizeof(char**), 0); - if (soap->body && soap_element_end_in(soap, tag)) - return NULL; - return p; -} -#endif - -/******************************************************************************/ -#ifndef WITH_LEANER -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_outwstring(struct soap *soap, const char *tag, int id, wchar_t *const*p, const char *type, int n) -{ id = soap_element_id(soap, tag, id, *p, NULL, 0, type, n); - if (id < 0) - return soap->error; - if (!**p && (soap->mode & SOAP_C_NILSTRING)) - return soap_element_null(soap, tag, id, type); - if (soap_element_begin_out(soap, tag, id, type) - || soap_wstring_out(soap, *p, 0) - || soap_element_end_out(soap, tag)) - return soap->error; - return SOAP_OK; -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_LEANER -#ifndef PALM_2 -SOAP_FMAC1 -wchar_t ** -SOAP_FMAC2 -soap_inwstring(struct soap *soap, const char *tag, wchar_t **p, const char *type, int t, long minlen, long maxlen) -{ if (soap_element_begin_in(soap, tag, 1, NULL)) - { if (!tag || *tag != '-' || soap->error != SOAP_NO_TAG) - return NULL; - soap->error = SOAP_OK; - } - if (!p) - if (!(p = (wchar_t**)soap_malloc(soap, sizeof(wchar_t*)))) - return NULL; - if (soap->body) - { *p = soap_wstring_in(soap, 1, minlen, maxlen); - if (!*p || !(wchar_t*)soap_id_enter(soap, soap->id, *p, t, sizeof(wchar_t*), 0, NULL, NULL, NULL)) - return NULL; - } - else if (soap->null) - *p = NULL; - else - *p = (wchar_t*)SOAP_STR_EOS; - if (*soap->href) - p = (wchar_t**)soap_id_lookup(soap, soap->href, (void**)p, t, sizeof(wchar_t**), 0); - if (soap->body && soap_element_end_in(soap, tag)) - return NULL; - return p; -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_LEAN -static time_t -soap_timegm(struct tm *T) -{ -#if defined(HAVE_TIMEGM) - return timegm(T); -#else - time_t t, g, z; -#ifdef HAVE_GMTIME_R - struct tm tm, *tmp = &tm; -#else - struct tm *tmp; -#endif - t = mktime(T); - if (t == -1) - return -1; -#ifdef HAVE_GMTIME_R - gmtime_r(&t, tmp); -#else - tmp = gmtime(&t); -#endif - tmp->tm_isdst = 0; - g = mktime(tmp); - if (g == -1) - return -1; - z = g - t; - return t - z; -#endif -} -#endif - -/******************************************************************************/ -#ifndef WITH_LEAN -SOAP_FMAC1 -const char* -SOAP_FMAC2 -soap_dateTime2s(struct soap *soap, time_t n) -{ struct tm T, *pT = &T; -#if defined(HAVE_GMTIME_R) - if (gmtime_r(&n, pT)) - strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%SZ", pT); - /* The following defines were added for VxWorks*/ -#elif defined(HAVE_PGMTIME_R) - if (gmtime_r(&n, pT)) - strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%SZ", pT); -#elif defined(HAVE_PGMTIME) - if (gmtime(&n, pT)) - strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%SZ", pT); -#elif defined(HAVE_GMTIME) - if ((pT = gmtime(&n))) - strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%SZ", pT); -#elif defined(HAVE_GETTIMEOFDAY) - struct timezone tz; - memset((void*)&tz, 0, sizeof(tz)); -# if defined(HAVE_LOCALTIME_R) - if (localtime_r(&n, pT)) - { struct timeval tv; - gettimeofday(&tv, &tz); - strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%S", pT); - sprintf(soap->tmpbuf + strlen(soap->tmpbuf), "%+03d:%02d", -tz.tz_minuteswest/60+(pT->tm_isdst!=0), abs(tz.tz_minuteswest)%60); - } -# else - if ((pT = localtime(&n))) - { struct timeval tv; - gettimeofday(&tv, &tz); - strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%S", pT); - sprintf(soap->tmpbuf + strlen(soap->tmpbuf), "%+03d:%02d", -tz.tz_minuteswest/60+(pT->tm_isdst!=0), abs(tz.tz_minuteswest)%60); - } -#endif -#elif defined(HAVE_FTIME) - struct timeb t; - memset((void*)&t, 0, sizeof(t)); -# if defined(HAVE_LOCALTIME_R) - if (localtime_r(&n, pT)) - { -#ifdef __BORLANDC__ - ::ftime(&t); -#else - ftime(&t); -#endif - strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%S", pT); - sprintf(soap->tmpbuf + strlen(soap->tmpbuf), "%+03d:%02d", -t.timezone/60+(pT->tm_isdst!=0), abs(t.timezone)%60); - } - /* The following defines were added for VxWorks*/ -# elif defined(HAVE_PLOCALTIME_R) - if (localtime_r(&n, pT)) - { strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%S", pT); - sprintf(soap->tmpbuf+strlen(soap->tmpbuf), "%+03d:%02d", t.timezone/60, abs(t.timezone)%60); - } -# else - if ((pT = localtime(&n))) - { -#ifdef __BORLANDC__ - ::ftime(&t); -#else - ftime(&t); -#endif - strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%S", pT); - sprintf(soap->tmpbuf + strlen(soap->tmpbuf), "%+03d:%02d", -t.timezone/60+(pT->tm_isdst!=0), abs(t.timezone)%60); - } -# endif -#elif defined(HAVE_LOCALTIME_R) - if (localtime_r(&n, pT)) - strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%S", pT); - /* The following defines were added for VxWorks*/ -#elif defined(HAVE_PLOCALTIME_R) - if (localtime_r(&n, pT)) - strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%S", pT); -#else - if ((pT = localtime(&n))) - strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%S", pT); -#endif - else - strcpy(soap->tmpbuf, "1969-12-31T23:59:59Z"); - return soap->tmpbuf; -} -#endif - -/******************************************************************************/ -#ifndef WITH_LEAN -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_outdateTime(struct soap *soap, const char *tag, int id, const time_t *p, const char *type, int n) -{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type) - || soap_string_out(soap, soap_dateTime2s(soap, *p), 0)) - return soap->error; - return soap_element_end_out(soap, tag); -} -#endif - -/******************************************************************************/ -#ifndef WITH_LEAN -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_s2dateTime(struct soap *soap, const char *s, time_t *p) -{ if (s) - { struct tm T; - char zone[32]; - const char *t; - memset((void*)&T, 0, sizeof(T)); - zone[sizeof(zone)-1] = '\0'; - if (strchr(s, '-')) - t = "%d-%d-%dT%d:%d:%d%31s"; - else if (strchr(s, ':')) - t = "%4d%2d%2dT%d:%d:%d%31s"; - else /* parse non-XSD-standard alternative ISO 8601 format */ - t = "%4d%2d%2dT%2d%2d%2d%31s"; - sscanf(s, t, &T.tm_year, &T.tm_mon, &T.tm_mday, &T.tm_hour, &T.tm_min, &T.tm_sec, zone); - if (T.tm_year == 1) - T.tm_year = 70; - else - T.tm_year -= 1900; - T.tm_mon--; - if (*zone) - { if (*zone == '.') - { for (s = zone + 1; *s; s++) - if (*s < '0' || *s > '9') - break; - } - else - s = zone; - if (*s == '+' || *s == '-') - { int h = 0, m = 0; - if (s[3] == ':') - { sscanf(s, "%d:%d", &h, &m); - if (h < 0) - m = -m; - } - else - { m = (int)atol(s); - h = m / 100; - m = m % 100; - } - T.tm_hour -= h; - T.tm_min -= m; - } - T.tm_isdst = 0; - *p = soap_timegm(&T); - } - else - { T.tm_isdst = -1; - *p = mktime(&T); /* no time zone: suppose it is localtime? */ - } - } - return soap->error; -} -#endif - -/******************************************************************************/ -#ifndef WITH_LEAN -SOAP_FMAC1 -time_t * -SOAP_FMAC2 -soap_indateTime(struct soap *soap, const char *tag, time_t *p, const char *type, int t) -{ if (soap_element_begin_in(soap, tag, 0, NULL)) - return NULL; - if (*soap->type - && soap_match_tag(soap, soap->type, type) - && soap_match_tag(soap, soap->type, ":dateTime")) - { soap->error = SOAP_TYPE; - soap_revert(soap); - return NULL; - } - p = (time_t*)soap_id_enter(soap, soap->id, p, t, sizeof(time_t), 0, NULL, NULL, NULL); - if (*soap->href) - p = (time_t*)soap_id_forward(soap, soap->href, p, 0, t, 0, sizeof(time_t), 0, NULL); - else if (p) - { if (soap_s2dateTime(soap, soap_value(soap), p)) - return NULL; - } - if (soap->body && soap_element_end_in(soap, tag)) - return NULL; - return p; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_outliteral(struct soap *soap, const char *tag, char *const*p, const char *type) -{ int i; - const char *t = NULL; - if (tag && *tag != '-') - { if (soap->local_namespaces && (t = strchr(tag, ':'))) - { strncpy(soap->tmpbuf, tag, t-tag); - soap->tmpbuf[t-tag] = '\0'; - for (i = 0; soap->local_namespaces[i].id; i++) - if (!strcmp(soap->tmpbuf, soap->local_namespaces[i].id)) - break; - t++; - if (soap_element(soap, t, 0, type) - || soap_attribute(soap, "xmlns", soap->local_namespaces[i].ns ? soap->local_namespaces[i].ns : SOAP_STR_EOS) - || soap_element_start_end_out(soap, NULL)) - return soap->error; - } - else - { t = tag; - if (soap_element_begin_out(soap, t, 0, type)) - return soap->error; - } - } - if (p && *p) - { if (soap_send(soap, *p)) - return soap->error; - } - if (t) - return soap_element_end_out(soap, t); - return SOAP_OK; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -char ** -SOAP_FMAC2 -soap_inliteral(struct soap *soap, const char *tag, char **p) -{ if (soap_element_begin_in(soap, tag, 1, NULL)) - { if (soap->error != SOAP_NO_TAG || soap_unget(soap, soap_get(soap)) == SOAP_TT) - return NULL; - soap->error = SOAP_OK; - } - if (!p) - if (!(p = (char**)soap_malloc(soap, sizeof(char*)))) - return NULL; - if (soap->body) - *p = soap_string_in(soap, 0, -1, -1); - else if (soap->null) - *p = NULL; - else - *p = (char*)SOAP_STR_EOS; - if (soap->body && soap_element_end_in(soap, tag)) - return NULL; - return p; -} -#endif - -/******************************************************************************/ -#ifndef WITH_LEANER -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_outwliteral(struct soap *soap, const char *tag, wchar_t *const*p, const char *type) -{ int i; - const char *t = NULL; - if (tag && *tag != '-') - { if (soap->local_namespaces && (t = strchr(tag, ':'))) - { strncpy(soap->tmpbuf, tag, t-tag); - soap->tmpbuf[t-tag] = '\0'; - for (i = 0; soap->local_namespaces[i].id; i++) - if (!strcmp(soap->tmpbuf, soap->local_namespaces[i].id)) - break; - t++; - if (soap_element(soap, t, 0, type) - || soap_attribute(soap, "xmlns", soap->local_namespaces[i].ns ? soap->local_namespaces[i].ns : SOAP_STR_EOS) - || soap_element_start_end_out(soap, NULL)) - return soap->error; - } - else - { t = tag; - if (soap_element_begin_out(soap, t, 0, type)) - return soap->error; - } - if (soap_send(soap, soap->tmpbuf)) - return soap->error; - } - if (p) - { wchar_t c; - const wchar_t *s = *p; - while ((c = *s++)) - { if (soap_pututf8(soap, (unsigned long)c)) - return soap->error; - } - } - if (t) - return soap_element_end_out(soap, t); - return SOAP_OK; -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_LEANER -#ifndef PALM_2 -SOAP_FMAC1 -wchar_t ** -SOAP_FMAC2 -soap_inwliteral(struct soap *soap, const char *tag, wchar_t **p) -{ if (soap_element_begin_in(soap, tag, 1, NULL)) - { if (soap->error != SOAP_NO_TAG || soap_unget(soap, soap_get(soap)) == SOAP_TT) - return NULL; - soap->error = SOAP_OK; - } - if (!p) - if (!(p = (wchar_t**)soap_malloc(soap, sizeof(wchar_t*)))) - return NULL; - if (soap->body) - *p = soap_wstring_in(soap, 0, -1, -1); - else if (soap->null) - *p = NULL; - else - *p = (wchar_t*)SOAP_STR_EOS; - if (soap->body && soap_element_end_in(soap, tag)) - return NULL; - return p; -} -#endif -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -const char * -SOAP_FMAC2 -soap_value(struct soap *soap) -{ register size_t i; - register soap_wchar c = 0; - register char *s = soap->tmpbuf; - if (!soap->body) - return SOAP_STR_EOS; - do c = soap_get(soap); - while (soap_blank(c)); - for (i = 0; i < sizeof(soap->tmpbuf) - 1; i++) - { if (c == SOAP_TT || (int)c == EOF) - break; - *s++ = (char)c; - c = soap_get(soap); - } - for (s--; i > 0; i--, s--) - { if (!soap_blank(*s)) - break; - } - s[1] = '\0'; - if ((int)c == EOF || c == SOAP_TT) - soap_unget(soap, c); - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Element content value='%s'\n", soap->tmpbuf)); -#ifdef WITH_DOM - if ((soap->mode & SOAP_XML_DOM) && soap->dom) - soap->dom->data = soap_strdup(soap, soap->tmpbuf); -#endif - return soap->tmpbuf; /* return non-null pointer */ -} -#endif - -/******************************************************************************/ -#if !defined(WITH_LEANER) || !defined(WITH_NOHTTP) -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_getline(struct soap *soap, char *s, int len) -{ int i = len; - soap_wchar c = 0; - for (;;) - { while (--i > 0) - { c = soap_getchar(soap); - if (c == '\r' || c == '\n') - break; - if ((int)c == EOF) - return soap->error = SOAP_EOF; - *s++ = (char)c; - } - if (c != '\n') - c = soap_getchar(soap); /* got \r, now get \n */ - if (c == '\n') - { *s = '\0'; - if (i+1 == len) /* empty line: end of HTTP/MIME header */ - break; - c = soap_unget(soap, soap_getchar(soap)); - if (c != ' ' && c != '\t') /* HTTP line continuation? */ - break; - } - else if ((int)c == EOF) - return soap->error = SOAP_EOF; - } - return SOAP_OK; -} -#endif -#endif - -/******************************************************************************/ -#ifndef PALM_1 -static size_t -soap_count_attachments(struct soap *soap) -{ -#ifndef WITH_LEANER - register struct soap_multipart *content; - register size_t count = soap->count; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Calculating the message size with attachments, current count=%lu\n", (unsigned long)count)); - if ((soap->mode & SOAP_ENC_DIME) && !(soap->mode & SOAP_ENC_MTOM)) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Calculating the size of DIME attachments\n")); - for (content = soap->dime.first; content; content = content->next) - { count += 12 + ((content->size+3)&(~3)); - if (content->id) - count += ((strlen(content->id)+3)&(~3)); - if (content->type) - count += ((strlen(content->type)+3)&(~3)); - if (content->options) - count += ((((unsigned char)content->options[2] << 8) | ((unsigned char)content->options[3]))+7)&(~3); - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Size of DIME attachment content is %lu bytes\n", (unsigned long)content->size)); - } - } - if ((soap->mode & SOAP_ENC_MIME) && soap->mime.boundary) - { register size_t n = strlen(soap->mime.boundary); - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Calculating the size of MIME attachments\n")); - for (content = soap->mime.first; content; content = content->next) - { register const char *s; - /* count \r\n--boundary\r\n */ - count += 6 + n; - /* count Content-Type: ...\r\n */ - if (content->type) - count += 16 + strlen(content->type); - /* count Content-Transfer-Encoding: ...\r\n */ - s = soap_code_str(mime_codes, content->encoding); - if (s) - count += 29 + strlen(s); - /* count Content-ID: ...\r\n */ - if (content->id) - count += 14 + strlen(content->id); - /* count Content-Location: ...\r\n */ - if (content->location) - count += 20 + strlen(content->location); - /* count Content-Description: ...\r\n */ - if (content->description) - count += 23 + strlen(content->description); - /* count \r\n...content */ - count += 2 + content->size; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Size of MIME attachment content is %lu bytes\n", (unsigned long)content->size)); - } - /* count \r\n--boundary-- */ - count += 6 + n; - } - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "New count is %lu bytes\n", (unsigned long)count)); - return count; -#else - return soap->count; -#endif -} -#endif - -/******************************************************************************/ -#ifndef WITH_LEANER -#ifndef PALM_1 -static int -soap_putdimefield(struct soap *soap, const char *s, size_t n) -{ if (soap_send_raw(soap, s, n)) - return soap->error; - return soap_send_raw(soap, SOAP_STR_PADDING, -(long)n&3); -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_LEANER -#ifndef PALM_1 -SOAP_FMAC1 -char * -SOAP_FMAC2 -soap_dime_option(struct soap *soap, unsigned short optype, const char *option) -{ size_t n; - char *s = NULL; - if (option) - { n = strlen(option); - s = (char*)soap_malloc(soap, n + 5); - if (s) - { s[0] = optype >> 8; - s[1] = optype & 0xFF; - s[2] = n >> 8; - s[3] = n & 0xFF; - strcpy(s + 4, option); - } - } - return s; -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_LEANER -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_putdimehdr(struct soap *soap) -{ unsigned char tmp[12]; - size_t optlen = 0, idlen = 0, typelen = 0; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Put DIME header id='%s'\n", soap->dime.id?soap->dime.id:"")); - if (soap->dime.options) - optlen = (((unsigned char)soap->dime.options[2] << 8) | ((unsigned char)soap->dime.options[3])) + 4; - if (soap->dime.id) - idlen = strlen(soap->dime.id); - if (soap->dime.type) - typelen = strlen(soap->dime.type); - tmp[0] = SOAP_DIME_VERSION | (soap->dime.flags & 0x7); - tmp[1] = soap->dime.flags & 0xF0; - tmp[2] = optlen >> 8; - tmp[3] = optlen & 0xFF; - tmp[4] = idlen >> 8; - tmp[5] = idlen & 0xFF; - tmp[6] = typelen >> 8; - tmp[7] = typelen & 0xFF; - tmp[8] = soap->dime.size >> 24; - tmp[9] = (soap->dime.size >> 16) & 0xFF; - tmp[10] = (soap->dime.size >> 8) & 0xFF; - tmp[11] = soap->dime.size & 0xFF; - if (soap_send_raw(soap, (char*)tmp, 12) - || soap_putdimefield(soap, soap->dime.options, optlen) - || soap_putdimefield(soap, soap->dime.id, idlen) - || soap_putdimefield(soap, soap->dime.type, typelen)) - return soap->error; - return SOAP_OK; -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_LEANER -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_putdime(struct soap *soap) -{ struct soap_multipart *content; - if (!(soap->mode & SOAP_ENC_DIME)) - return SOAP_OK; - for (content = soap->dime.first; content; content = content->next) - { void *handle; - soap->dime.size = content->size; - soap->dime.id = content->id; - soap->dime.type = content->type; - soap->dime.options = content->options; - soap->dime.flags = SOAP_DIME_VERSION | SOAP_DIME_MEDIA; - if (soap->fdimereadopen && ((handle = soap->fdimereadopen(soap, (void*)content->ptr, content->id, content->type, content->options)) || soap->error)) - { size_t size = content->size; - if (!handle) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "fdimereadopen failed\n")); - return soap->error; - } - if (!size && ((soap->mode & SOAP_ENC_XML) || (soap->mode & SOAP_IO) == SOAP_IO_CHUNK || (soap->mode & SOAP_IO) == SOAP_IO_STORE)) - { size_t chunksize = sizeof(soap->tmpbuf); - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Chunked streaming DIME\n")); - do - { size = soap->fdimeread(soap, handle, soap->tmpbuf, chunksize); - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "fdimeread returned %lu bytes\n", (unsigned long)size)); - if (size < chunksize) - { soap->dime.flags &= ~SOAP_DIME_CF; - if (!content->next) - soap->dime.flags |= SOAP_DIME_ME; - } - else - soap->dime.flags |= SOAP_DIME_CF; - soap->dime.size = size; - if (soap_putdimehdr(soap) - || soap_putdimefield(soap, soap->tmpbuf, size)) - break; - if (soap->dime.id) - { soap->dime.flags &= ~(SOAP_DIME_MB | SOAP_DIME_MEDIA); - soap->dime.id = NULL; - soap->dime.type = NULL; - soap->dime.options = NULL; - } - } while (size >= chunksize); - } - else - { if (!content->next) - soap->dime.flags |= SOAP_DIME_ME; - if (soap_putdimehdr(soap)) - return soap->error; - do - { size_t bufsize; - if (size < sizeof(soap->tmpbuf)) - bufsize = size; - else - bufsize = sizeof(soap->tmpbuf); - if (!(bufsize = soap->fdimeread(soap, handle, soap->tmpbuf, bufsize))) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "fdimeread failed: insufficient data (%lu bytes remaining from %lu bytes)\n", (unsigned long)size, (unsigned long)content->size)); - soap->error = SOAP_EOF; - break; - } - if (soap_send_raw(soap, soap->tmpbuf, bufsize)) - break; - size -= bufsize; - } while (size); - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "fdimereadclose\n")); - soap_send_raw(soap, SOAP_STR_PADDING, -(long)soap->dime.size&3); - } - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "fdimereadclose\n")); - if (soap->fdimereadclose) - soap->fdimereadclose(soap, handle); - } - else - { if (!content->next) - soap->dime.flags |= SOAP_DIME_ME; - if (soap_putdimehdr(soap) - || soap_putdimefield(soap, (char*)content->ptr, content->size)) - return soap->error; - } - } - return SOAP_OK; -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_LEANER -#ifndef PALM_1 -static char * -soap_getdimefield(struct soap *soap, size_t n) -{ register soap_wchar c; - register int i; - register char *s; - char *p = NULL; - if (n) - { p = (char*)soap_malloc(soap, n + 1); - if (p) - { s = p; - for (i = n; i > 0; i--) - { if ((int)(c = soap_get1(soap)) == EOF) - { soap->error = SOAP_EOF; - return NULL; - } - *s++ = (char)c; - } - *s = '\0'; - if ((soap->error = soap_move(soap, -(long)n&3))) - return NULL; - } - else - soap->error = SOAP_EOM; - } - return p; -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_LEANER -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_getdimehdr(struct soap *soap) -{ register soap_wchar c; - register char *s; - register int i; - unsigned char tmp[12]; - size_t optlen, idlen, typelen; - if (!(soap->mode & SOAP_ENC_DIME)) - return soap->error = SOAP_DIME_END; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Get DIME header\n")); - if (soap->dime.buflen || soap->dime.chunksize) - { if (soap_move(soap, (long)(soap->dime.size - soap_tell(soap)))) - return soap->error = SOAP_EOF; - soap_unget(soap, soap_getchar(soap)); /* skip padding and get hdr */ - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "... From chunked\n")); - return SOAP_OK; - } - s = (char*)tmp; - for (i = 12; i > 0; i--) - { if ((int)(c = soap_getchar(soap)) == EOF) - return soap->error = SOAP_EOF; - *s++ = (char)c; - } - if ((tmp[0] & 0xF8) != SOAP_DIME_VERSION) - return soap->error = SOAP_DIME_MISMATCH; - soap->dime.flags = (tmp[0] & 0x7) | (tmp[1] & 0xF0); - optlen = (tmp[2] << 8) | tmp[3]; - idlen = (tmp[4] << 8) | tmp[5]; - typelen = (tmp[6] << 8) | tmp[7]; - soap->dime.size = (tmp[8] << 24) | (tmp[9] << 16) | (tmp[10] << 8) | tmp[11]; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "DIME size=%lu flags=0x%X\n", (unsigned long)soap->dime.size, soap->dime.flags)); - if (!(soap->dime.options = soap_getdimefield(soap, optlen)) && soap->error) - return soap->error; - if (!(soap->dime.id = soap_getdimefield(soap, idlen)) && soap->error) - return soap->error; - if (!(soap->dime.type = soap_getdimefield(soap, typelen)) && soap->error) - return soap->error; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "DIME id=%s, type=%s, options=%s\n", soap->dime.id?soap->dime.id:"", soap->dime.type?soap->dime.type:"", soap->dime.options?soap->dime.options+4:"")); - if (soap->dime.flags & SOAP_DIME_ME) - soap->mode &= ~SOAP_ENC_DIME; - return SOAP_OK; -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_LEANER -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_getdime(struct soap *soap) -{ while (soap->dime.flags & SOAP_DIME_CF) - { if (soap_getdimehdr(soap)) - return soap->error; - if (soap_move(soap, soap->dime.size)) - return soap->error = SOAP_EOF; - } - if (soap_move(soap, ((soap->dime.size+3)&(~3))-soap_tell(soap))) - return soap->error = SOAP_EOF; - for (;;) - { register struct soap_multipart *content; - if (soap_getdimehdr(soap)) - break; - if (soap->fdimewriteopen && ((soap->dime.ptr = (char*)soap->fdimewriteopen(soap, soap->dime.id, soap->dime.type, soap->dime.options)) || soap->error)) - { const char *id, *type, *options; - size_t size, n; - if (!soap->dime.ptr) - return soap->error; - id = soap->dime.id; - type = soap->dime.type; - options = soap->dime.options; - for (;;) - { size = soap->dime.size; - for (;;) - { n = soap->buflen - soap->bufidx; - if (size < n) - n = size; - if ((soap->error = soap->fdimewrite(soap, (void*)soap->dime.ptr, soap->buf + soap->bufidx, n))) - break; - size -= n; - if (!size) - { soap->bufidx += n; - break; - } - if (soap_recv(soap)) - { soap->error = SOAP_EOF; - goto end; - } - } - if (soap_move(soap, -(long)soap->dime.size&3)) - { soap->error = SOAP_EOF; - break; - } - if (!(soap->dime.flags & SOAP_DIME_CF)) - break; - if (soap_getdimehdr(soap)) - break; - } -end: - if (soap->fdimewriteclose) - soap->fdimewriteclose(soap, (void*)soap->dime.ptr); - soap->dime.size = 0; - soap->dime.id = id; - soap->dime.type = type; - soap->dime.options = options; - } - else if (soap->dime.flags & SOAP_DIME_CF) - { const char *id, *type, *options; - register soap_wchar c; - register char *s; - register int i; - id = soap->dime.id; - type = soap->dime.type; - options = soap->dime.options; - if (soap_new_block(soap)) - return SOAP_EOM; - for (;;) - { s = (char*)soap_push_block(soap, soap->dime.size); - if (!s) - return soap->error = SOAP_EOM; - for (i = soap->dime.size; i > 0; i--) - { if ((int)(c = soap_get1(soap)) == EOF) - return soap->error = SOAP_EOF; - *s++ = (char)c; - } - if (soap_move(soap, -(long)soap->dime.size&3)) - return soap->error = SOAP_EOF; - if (!(soap->dime.flags & SOAP_DIME_CF)) - break; - if (soap_getdimehdr(soap)) - return soap->error; - } - soap->dime.size = soap->blist->size++; /* allocate one more for '\0' */ - if (!(soap->dime.ptr = soap_save_block(soap, NULL, 0))) - return soap->error; - soap->dime.ptr[soap->dime.size] = '\0'; /* force 0-terminated */ - soap->dime.id = id; - soap->dime.type = type; - soap->dime.options = options; - } - else - soap->dime.ptr = soap_getdimefield(soap, soap->dime.size); - content = soap_new_multipart(soap, &soap->dime.first, &soap->dime.last, soap->dime.ptr, soap->dime.size); - if (!content) - return soap->error = SOAP_EOM; - content->id = soap->dime.id; - content->type = soap->dime.type; - content->options = soap->dime.options; - if (soap->error) - return soap->error; - soap_resolve_attachment(soap, content); - } - if (soap->error != SOAP_DIME_END) - return soap->error; - return soap->error = SOAP_OK; -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_LEANER -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_getmimehdr(struct soap *soap) -{ struct soap_multipart *content; - do - { if (soap_getline(soap, soap->msgbuf, sizeof(soap->msgbuf))) - return soap->error; - } - while (!*soap->msgbuf); - if (soap->msgbuf[0] == '-' && soap->msgbuf[1] == '-') - { char *s = soap->msgbuf + strlen(soap->msgbuf) - 1; - /* remove white space */ - while (soap_blank(*s)) - s--; - s[1] = '\0'; - if (soap->mime.boundary) - { if (strcmp(soap->msgbuf + 2, soap->mime.boundary)) - return soap->error = SOAP_MIME_ERROR; - } - else - soap->mime.boundary = soap_strdup(soap, soap->msgbuf + 2); - if (soap_getline(soap, soap->msgbuf, sizeof(soap->msgbuf))) - return soap->error; - } - if (soap_set_mime_attachment(soap, NULL, 0, SOAP_MIME_NONE, NULL, NULL, NULL, NULL)) - return soap->error = SOAP_EOM; - content = soap->mime.last; - for (;;) - { register char *key = soap->msgbuf; - register char *val; - if (!*key) - break; - DBGLOG(TEST,SOAP_MESSAGE(fdebug, "MIME header: %s\n", key)); - val = strchr(soap->msgbuf, ':'); - if (val) - { *val = '\0'; - do val++; - while (*val && *val <= 32); - if (!soap_tag_cmp(key, "Content-ID")) - content->id = soap_strdup(soap, val); - else if (!soap_tag_cmp(key, "Content-Location")) - content->location = soap_strdup(soap, val); - else if (!soap_tag_cmp(key, "Content-Disposition")) - content->id = soap_strdup(soap, soap_get_header_attribute(soap, val, "name")); - else if (!soap_tag_cmp(key, "Content-Type")) - content->type = soap_strdup(soap, val); - else if (!soap_tag_cmp(key, "Content-Description")) - content->description = soap_strdup(soap, val); - else if (!soap_tag_cmp(key, "Content-Transfer-Encoding")) - content->encoding = (enum soap_mime_encoding)soap_code_int(mime_codes, val, (long)SOAP_MIME_NONE); - } - if (soap_getline(soap, key, sizeof(soap->msgbuf))) - return soap->error; - } - return SOAP_OK; -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_LEANER -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_getmime(struct soap *soap) -{ while (soap_get_mime_attachment(soap, NULL)) - ; - return soap->error; -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_LEANER -#ifndef PALM_1 -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_post_check_mime_attachments(struct soap *soap) -{ soap->imode |= SOAP_MIME_POSTCHECK; -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_LEANER -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_check_mime_attachments(struct soap *soap) -{ if (soap->mode & SOAP_MIME_POSTCHECK) - return soap_get_mime_attachment(soap, NULL) != NULL; - return 0; -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_LEANER -#ifndef PALM_1 -SOAP_FMAC1 -struct soap_multipart * -SOAP_FMAC2 -soap_get_mime_attachment(struct soap *soap, void *handle) -{ register soap_wchar c = 0; - register size_t i, m = 0; - register char *s, *t = NULL; - register struct soap_multipart *content; - register short flag = 0; - if (!(soap->mode & SOAP_ENC_MIME)) - return NULL; - content = soap->mime.last; - if (!content) - { if (soap_getmimehdr(soap)) - return NULL; - content = soap->mime.last; - } - else if (content != soap->mime.first) - { if (soap->fmimewriteopen && ((content->ptr = (char*)soap->fmimewriteopen(soap, (void*)handle, content->id, content->type, content->description, content->encoding)) || soap->error)) - { if (!content->ptr) - return NULL; - } - } - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Parsing MIME content id=%s type=%s\n", content->id?content->id:"", content->type?content->type:"")); - if (!content->ptr && soap_new_block(soap)) - { soap->error = SOAP_EOM; - return NULL; - } - for (;;) - { if (content->ptr) - s = soap->tmpbuf; - else if (!(s = (char*)soap_push_block(soap, sizeof(soap->tmpbuf)))) - { soap->error = SOAP_EOM; - return NULL; - } - for (i = 0; i < sizeof(soap->tmpbuf); i++) - { if (m > 0) - { *s++ = *t++; - m--; - } - else - { if (!flag) - { c = soap_get1(soap); - if ((int)c == EOF) - { soap->error = SOAP_EOF; - return NULL; - } - } - if (flag || c == '\r') - { t = soap->msgbuf; - memset(t, 0, sizeof(soap->msgbuf)); - strcpy(t, "\n--"); - if (soap->mime.boundary) - strncat(t, soap->mime.boundary, sizeof(soap->msgbuf)-4); - do c = soap_getchar(soap); - while (c == *t++); - if ((int)c == EOF) - { soap->error = SOAP_EOF; - return NULL; - } - if (!*--t) - goto end; - *t = (char)c; - flag = (c == '\r'); - m = t - soap->msgbuf + 1 - flag; - t = soap->msgbuf; - c = '\r'; - } - *s++ = (char)c; - } - } - if (content->ptr && soap->fmimewrite) - { if ((soap->error = soap->fmimewrite(soap, (void*)content->ptr, soap->tmpbuf, i))) - break; - } - } -end: - *s = '\0'; /* force 0-terminated */ - if (content->ptr) - { if (!soap->error && soap->fmimewrite) - soap->error = soap->fmimewrite(soap, (void*)content->ptr, soap->tmpbuf, i); - if (soap->fmimewriteclose) - soap->fmimewriteclose(soap, (void*)content->ptr); - if (soap->error) - return NULL; - } - else - { content->size = soap_size_block(soap, i+1)-1; - content->ptr = soap_save_block(soap, NULL, 0); - } - soap_resolve_attachment(soap, content); - if (c == '-' && soap_getchar(soap) == '-') - { soap->mode &= ~SOAP_ENC_MIME; - if ((soap->mode & SOAP_MIME_POSTCHECK) && soap_end_recv(soap)) - return NULL; - } - else - { while (c != '\r' && (int)c != EOF && soap_blank(c)) - c = soap_getchar(soap); - if (c != '\r' || soap_getchar(soap) != '\n') - { soap->error = SOAP_MIME_ERROR; - return NULL; - } - if (soap_getmimehdr(soap)) - return NULL; - } - return content; -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_LEANER -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_match_cid(struct soap *soap, const char *s, const char *t) -{ register size_t n; - if (!s) - return 1; - if (!strcmp(s, t)) - return 0; - if (!strncmp(s, "cid:", 4)) - s += 4; - n = strlen(t); - if (*t == '<') - { t++; - n -= 2; - } - if (!strncmp(s, t, n) && !s[n]) - return 0; - soap_decode(soap->tmpbuf, sizeof(soap->tmpbuf), s, SOAP_STR_EOS); - if (!strncmp(soap->tmpbuf, t, n) && !soap->tmpbuf[n]) - return 0; - return 1; -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_LEANER -#ifndef PALM_1 -static void -soap_resolve_attachment(struct soap *soap, struct soap_multipart *content) -{ if (content->id) - { register struct soap_xlist **xp = &soap->xlist; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Resolving attachment data for id=%s\n", content->id)); - while (*xp) - { register struct soap_xlist *xq = *xp; - if (!soap_match_cid(soap, xq->id, content->id)) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Found matching attachment %s for content id=%s\n", xq->id, content->id)); - *xp = xq->next; - *xq->ptr = (unsigned char*)content->ptr; - *xq->size = (int)content->size; - *xq->type = (char*)content->type; - if (content->options) - *xq->options = (char*)content->options; - else - *xq->options = (char*)content->description; - SOAP_FREE(soap, xq); - } - else - xp = &(*xp)->next; - } - } -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_LEANER -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_putmimehdr(struct soap *soap, struct soap_multipart *content) -{ const char *s; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "MIME attachment type=%s\n", content->type?content->type:"")); - if (soap_send3(soap, "\r\n--", soap->mime.boundary, "\r\n")) - return soap->error; - if (content->type && soap_send3(soap, "Content-Type: ", content->type, "\r\n")) - return soap->error; - s = soap_code_str(mime_codes, content->encoding); - if (s && soap_send3(soap, "Content-Transfer-Encoding: ", s, "\r\n")) - return soap->error; - if (content->id && soap_send3(soap, "Content-ID: ", content->id, "\r\n")) - return soap->error; - if (content->location && soap_send3(soap, "Content-Location: ", content->location, "\r\n")) - return soap->error; - if (content->description && soap_send3(soap, "Content-Description: ", content->description, "\r\n")) - return soap->error; - return soap_send_raw(soap, "\r\n", 2); -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_LEANER -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_putmime(struct soap *soap) -{ struct soap_multipart *content; - if (!(soap->mode & SOAP_ENC_MIME) || !soap->mime.boundary) - return SOAP_OK; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Sending MIME attachments\n")); - for (content = soap->mime.first; content; content = content->next) - { void *handle; - if (soap->fmimereadopen && ((handle = soap->fmimereadopen(soap, (void*)content->ptr, content->id, content->type, content->description)) || soap->error)) - { size_t size = content->size; - if (!handle) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "fmimereadopen failed\n")); - return soap->error; - } - if (soap_putmimehdr(soap, content)) - return soap->error; - if (!size) - { if ((soap->mode & SOAP_ENC_XML) || (soap->mode & SOAP_IO) == SOAP_IO_CHUNK || (soap->mode & SOAP_IO) == SOAP_IO_STORE) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Chunked streaming MIME\n")); - do - { size = soap->fmimeread(soap, handle, soap->tmpbuf, sizeof(soap->tmpbuf)); - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "fmimeread returned %lu bytes\n", (unsigned long)size)); - if (soap_send_raw(soap, soap->tmpbuf, size)) - break; - } while (size); - } - else - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Error: cannot chunk streaming MIME (no HTTP chunking)\n")); - } - } - else - { do - { size_t bufsize; - if (size < sizeof(soap->tmpbuf)) - bufsize = size; - else - bufsize = sizeof(soap->tmpbuf); - if (!(bufsize = soap->fmimeread(soap, handle, soap->tmpbuf, bufsize))) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "fmimeread failed: insufficient data (%lu bytes remaining from %lu bytes)\n", (unsigned long)size, (unsigned long)content->size)); - soap->error = SOAP_EOF; - break; - } - if (soap_send_raw(soap, soap->tmpbuf, bufsize)) - break; - size -= bufsize; - } while (size); - } - if (soap->fmimereadclose) - soap->fmimereadclose(soap, handle); - } - else - { if (soap_putmimehdr(soap, content) - || soap_send_raw(soap, content->ptr, content->size)) - return soap->error; - } - } - return soap_send3(soap, "\r\n--", soap->mime.boundary, "--"); -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_LEANER -#ifndef PALM_1 -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_set_dime(struct soap *soap) -{ soap->omode |= SOAP_ENC_DIME; - soap->dime.first = NULL; - soap->dime.last = NULL; -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_LEANER -#ifndef PALM_1 -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_set_mime(struct soap *soap, const char *boundary, const char *start) -{ soap->omode |= SOAP_ENC_MIME; - soap->mime.first = NULL; - soap->mime.last = NULL; - soap->mime.boundary = soap_strdup(soap, boundary); - soap->mime.start = soap_strdup(soap, start); -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_LEANER -#ifndef PALM_1 -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_clr_dime(struct soap *soap) -{ soap->omode &= ~SOAP_ENC_DIME; - soap->dime.first = NULL; - soap->dime.last = NULL; -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_LEANER -#ifndef PALM_1 -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_clr_mime(struct soap *soap) -{ soap->omode &= ~SOAP_ENC_MIME; - soap->mime.first = NULL; - soap->mime.last = NULL; - soap->mime.boundary = NULL; - soap->mime.start = NULL; -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_LEANER -#ifndef PALM_1 -static struct soap_multipart* -soap_new_multipart(struct soap *soap, struct soap_multipart **first, struct soap_multipart **last, char *ptr, size_t size) -{ struct soap_multipart *content; - content = (struct soap_multipart*)soap_malloc(soap, sizeof(struct soap_multipart)); - if (content) - { content->next = NULL; - content->ptr = ptr; - content->size = size; - content->id = NULL; - content->type = NULL; - content->options = NULL; - content->encoding = SOAP_MIME_NONE; - content->location = NULL; - content->description = NULL; - if (!*first) - *first = content; - if (*last) - (*last)->next = content; - *last = content; - } - return content; -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_LEANER -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_set_dime_attachment(struct soap *soap, char *ptr, size_t size, const char *type, const char *id, unsigned short optype, const char *option) -{ struct soap_multipart *content = soap_new_multipart(soap, &soap->dime.first, &soap->dime.last, ptr, size); - if (!content) - return SOAP_EOM; - content->id = soap_strdup(soap, id); - content->type = soap_strdup(soap, type); - content->options = soap_dime_option(soap, optype, option); - return SOAP_OK; -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_LEANER -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_set_mime_attachment(struct soap *soap, char *ptr, size_t size, enum soap_mime_encoding encoding, const char *type, const char *id, const char *location, const char *description) -{ struct soap_multipart *content = soap_new_multipart(soap, &soap->mime.first, &soap->mime.last, ptr, size); - if (!content) - return SOAP_EOM; - content->id = soap_strdup(soap, id); - content->type = soap_strdup(soap, type); - content->encoding = encoding; - content->location = soap_strdup(soap, location); - content->description = soap_strdup(soap, description); - return SOAP_OK; -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_LEANER -#ifndef PALM_1 -SOAP_FMAC1 -struct soap_multipart* -SOAP_FMAC2 -soap_next_multipart(struct soap_multipart *content) -{ if (content) - return content->next; - return NULL; -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_LEANER -#ifndef PALM_1 -static void -soap_select_mime_boundary(struct soap *soap) -{ while (!soap->mime.boundary || soap_valid_mime_boundary(soap)) - { register char *s = soap->mime.boundary; - register size_t n = 0; - if (s) - n = strlen(s); - if (n < 16) - { n = 64; - s = soap->mime.boundary = (char*)soap_malloc(soap, n + 1); - if (!s) - return; - } - strcpy(s, "=="); - s += 2; - n -= 4; - while (n) - { *s++ = soap_base64o[soap_random & 0x3F]; - n--; - } - strcpy(s, "=="); - } - if (!soap->mime.start) - soap->mime.start = ""; -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_LEANER -#ifndef PALM_1 -static int -soap_valid_mime_boundary(struct soap *soap) -{ register struct soap_multipart *content; - register size_t k; - if (soap->fmimeread) - return SOAP_OK; - k = strlen(soap->mime.boundary); - for (content = soap->mime.first; content; content = content->next) - { if (content->ptr && content->size >= k) - { register const char *p = (const char*)content->ptr; - register size_t i; - for (i = 0; i < content->size - k; i++, p++) - { if (!strncmp(p, soap->mime.boundary, k)) - return SOAP_ERR; - } - } - } - return SOAP_OK; -} -#endif -#endif - -/******************************************************************************\ - * - * HTTP cookie handling - * -\******************************************************************************/ - -#ifdef WITH_COOKIES -/******************************************************************************/ -SOAP_FMAC1 -size_t -SOAP_FMAC2 -soap_encode_cookie(const char *s, char *t, size_t len) -{ register int c; - register size_t n = len; - while ((c = *s++) && --n > 0) - { if (c > ' ' && c < 128 && !strchr("()<>@,;:\\\"/[]?={}", c)) - *t++ = c; - else if (n > 2) - { *t++ = '%'; - *t++ = (c >> 4) + (c > 159 ? '7' : '0'); - c &= 0xF; - *t++ = c + (c > 9 ? '7' : '0'); - n -= 2; - } - else - break; - } - *t = '\0'; - return len - n; -} - -/******************************************************************************/ -SOAP_FMAC1 -struct soap_cookie* -SOAP_FMAC2 -soap_cookie(struct soap *soap, const char *name, const char *domain, const char *path) -{ struct soap_cookie *p; - size_t n; - if (!domain) - domain = soap->cookie_domain; - if (!path) - path = soap->cookie_path; - if (!path) - path = SOAP_STR_EOS; - else if (*path == '/') - path++; - n = strlen(path); - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Search cookie %s domain=%s path=%s\n", name, domain?domain:"(null)", path?path:"(null)")); - for (p = soap->cookies; p; p = p->next) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Cookie in database: %s=%s domain=%s path=%s env=%hd\n", p->name, p->value?p->value:"(null)", p->domain?p->domain:"(null)", p->path?p->path:"(null)", p->env)); - if (!strcmp(p->name, name) - && p->domain - && p->path - && !strcmp(p->domain, domain) - && !strncmp(p->path, path, n)) - break; - } - return p; -} - -/******************************************************************************/ -SOAP_FMAC1 -struct soap_cookie* -SOAP_FMAC2 -soap_set_cookie(struct soap *soap, const char *name, const char *value, const char *domain, const char *path) -{ struct soap_cookie **p, *q; - int n; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Set cookie: %s=%s domain=%s path=%s\n", name, value?value:"(null)", domain?domain:"(null)", path?path:"(null)")); - if (!domain) - domain = soap->cookie_domain; - if (!path) - path = soap->cookie_path; - if (!path) - path = SOAP_STR_EOS; - else if (*path == '/') - path++; - q = soap_cookie(soap, name, domain, path); - if (!q) - { if ((q = (struct soap_cookie*)SOAP_MALLOC(soap, sizeof(struct soap_cookie)))) - { if ((q->name = (char*)SOAP_MALLOC(soap, strlen(name)+1))) - strcpy(q->name, name); - q->value = NULL; - q->domain = NULL; - q->path = NULL; - q->expire = -1; - q->maxage = -1; - q->version = 1; - q->secure = 0; - q->modified = 0; - for (p = &soap->cookies, n = soap->cookie_max; *p && n; p = &(*p)->next, n--) - if (!strcmp((*p)->name, name) && (*p)->path && path && strcmp((*p)->path, path) < 0) - break; - if (n) - { q->next = *p; - *p = q; - } - else - { SOAP_FREE(soap, q->name); - SOAP_FREE(soap, q); - q = NULL; - } - } - } - else - q->modified = 1; - if (q) - { if (q->value) - { SOAP_FREE(soap, q->value); - q->value = NULL; - } - if (q->domain) - { SOAP_FREE(soap, q->domain); - q->domain = NULL; - } - if (q->path) - { SOAP_FREE(soap, q->path); - q->path = NULL; - } - if (value && *value && (q->value = (char*)SOAP_MALLOC(soap, strlen(value)+1))) - strcpy(q->value, value); - if (domain && (q->domain = (char*)SOAP_MALLOC(soap, strlen(domain)+1))) - strcpy(q->domain, domain); - if (path && (q->path = (char*)SOAP_MALLOC(soap, strlen(path)+1))) - strcpy(q->path, path); - q->session = 1; - q->env = 0; - } - return q; -} - -/******************************************************************************/ -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_clr_cookie(struct soap *soap, const char *name, const char *domain, const char *path) -{ struct soap_cookie **p, *q; - if (!domain) - domain = soap->cookie_domain; - if (!domain) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Error in clear cookie %s: cookie domain not set\n", name?name:"(null)")); - return; - } - if (!path) - path = soap->cookie_path; - if (!path) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Error in clear cookie %s: cookie path not set\n", name?name:"(null)")); - return; - } - if (*path == '/') - path++; - for (p = &soap->cookies, q = *p; q; q = *p) - { if (!strcmp(q->name, name) && !strcmp(q->domain, domain) && !strncmp(q->path, path, strlen(q->path))) - { if (q->value) - SOAP_FREE(soap, q->value); - if (q->domain) - SOAP_FREE(soap, q->domain); - if (q->path) - SOAP_FREE(soap, q->path); - *p = q->next; - SOAP_FREE(soap, q); - } - else - p = &q->next; - } -} - -/******************************************************************************/ -SOAP_FMAC1 -char * -SOAP_FMAC2 -soap_cookie_value(struct soap *soap, const char *name, const char *domain, const char *path) -{ struct soap_cookie *p; - if ((p = soap_cookie(soap, name, domain, path))) - return p->value; - return NULL; -} - -/******************************************************************************/ -SOAP_FMAC1 -char * -SOAP_FMAC2 -soap_env_cookie_value(struct soap *soap, const char *name, const char *domain, const char *path) -{ struct soap_cookie *p; - if ((p = soap_cookie(soap, name, domain, path)) && p->env) - return p->value; - return NULL; -} - -/******************************************************************************/ -SOAP_FMAC1 -time_t -SOAP_FMAC2 -soap_cookie_expire(struct soap *soap, const char *name, const char *domain, const char *path) -{ struct soap_cookie *p; - if ((p = soap_cookie(soap, name, domain, path))) - return p->expire; - return -1; -} - -/******************************************************************************/ -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_set_cookie_expire(struct soap *soap, const char *name, long expire, const char *domain, const char *path) -{ struct soap_cookie *p; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Set cookie expiration max-age %ld: %s domain=%s path=%s\n", expire, name, domain?domain:"(null)", path?path:"(null)")); - if ((p = soap_cookie(soap, name, domain, path))) - { p->maxage = expire; - p->modified = 1; - return SOAP_OK; - } - return SOAP_ERR; -} - -/******************************************************************************/ -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_set_cookie_session(struct soap *soap, const char *name, const char *domain, const char *path) -{ struct soap_cookie *p; - if ((p = soap_cookie(soap, name, domain, path))) - { p->session = 1; - p->modified = 1; - return SOAP_OK; - } - return SOAP_ERR; -} - -/******************************************************************************/ -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_clr_cookie_session(struct soap *soap, const char *name, const char *domain, const char *path) -{ struct soap_cookie *p; - if ((p = soap_cookie(soap, name, domain, path))) - { p->session = 0; - p->modified = 1; - return SOAP_OK; - } - return SOAP_ERR; -} - -/******************************************************************************/ -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_putsetcookies(struct soap *soap) -{ struct soap_cookie *p; - char *s, tmp[4096]; - const char *t; - for (p = soap->cookies; p; p = p->next) - { if (p->modified || !p->env) - { s = tmp; - if (p->name) - s += soap_encode_cookie(p->name, s, tmp-s+4064); - if (p->value && *p->value) - { *s++ = '='; - s += soap_encode_cookie(p->value, s, tmp-s+4064); - } - if (p->domain && (int)strlen(p->domain) < tmp-s+4064) - sprintf(s, ";Domain=\"%s\"", p->domain); - else if (soap->cookie_domain && (int)strlen(soap->cookie_domain) < tmp-s+4064) - sprintf(s, ";Domain=\"%s\"", soap->cookie_domain); - strcat(s, ";Path=/"); - if (p->path) - t = p->path; - else - t = soap->cookie_path; - if (t) - { if (*t == '/') - t++; - if ((int)strlen(t) < tmp-s+4064) - strcat(s, t); - } - s += strlen(s); - if (p->version > 0 && s-tmp < 4060) - { sprintf(s, ";Version=%u", p->version); - s += strlen(s); - } - if (p->maxage >= 0 && s-tmp < 4060) - { sprintf(s, ";Max-Age=%ld", p->maxage); - s += strlen(s); - } - if (p->secure && s-tmp < 4073) - strcpy(s, ";Secure"); - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Set-Cookie: %s\n", tmp)); - if ((soap->error = soap->fposthdr(soap, "Set-Cookie", tmp))) - return soap->error; - } - } - return SOAP_OK; -} - -/******************************************************************************/ -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_putcookies(struct soap *soap, const char *domain, const char *path, int secure) -{ struct soap_cookie **p, *q; - unsigned int version = 0; - time_t now = time(NULL); - char *s, tmp[4096]; - p = &soap->cookies; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Sending cookies for domain=%s path=%s\n", domain, path)); - if (*path == '/') - path++; - while ((q = *p)) - { if (q->expire && now > q->expire) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Cookie %s expired\n", q->name)); - SOAP_FREE(soap, q->name); - if (q->value) - SOAP_FREE(soap, q->value); - if (q->domain) - SOAP_FREE(soap, q->domain); - if (q->path) - SOAP_FREE(soap, q->path); - *p = q->next; - SOAP_FREE(soap, q); - } - else - { size_t domlen = 0; - if (q->domain) - { const char *s = strchr(q->domain, ':'); - if (s) - domlen = s - q->domain; - else - domlen = strlen(q->domain); - } - if ((!q->domain || !strncmp(q->domain, domain, domlen)) - && (!q->path || !strncmp(q->path, path, strlen(q->path))) - && (!q->secure || secure)) - { s = tmp; - if (q->version != version) - { sprintf(s, "$Version=%u;", q->version); - version = q->version; - } - if (q->name) - s += soap_encode_cookie(q->name, s, tmp-s+4080); - if (q->value && *q->value) - { *s++ = '='; - s += soap_encode_cookie(q->value, s, tmp-s+4080); - } - if (q->path && *q->path && (int)strlen(q->path) < tmp-s+4080) - { sprintf(s, ";$Path=\"/%s\"", (*q->path == '/' ? q->path + 1 : q->path)); - s += strlen(s); - } - if (q->domain && (int)strlen(q->domain) < tmp-s+4080) - sprintf(s, ";$Domain=\"%s\"", q->domain); - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Cookie: %s\n", tmp)); - if ((soap->error = soap->fposthdr(soap, "Cookie", tmp))) - return soap->error; - } - p = &q->next; - } - } - return SOAP_OK; -} - -/******************************************************************************/ -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_getcookies(struct soap *soap, const char *val) -{ struct soap_cookie *p = NULL, *q; - const char *s; - char *t, tmp[4096]; /* cookie size is up to 4096 bytes [RFC2109] */ - char *domain = NULL; - char *path = NULL; - unsigned int version = 0; - time_t now = time(NULL); - if (!val) - return; - s = val; - while (*s) - { s = soap_decode_key(tmp, sizeof(tmp), s); - if (!soap_tag_cmp(tmp, "$Version")) - { if ((s = soap_decode_val(tmp, sizeof(tmp), s))) - { if (p) - p->version = (int)atol(tmp); - else - version = (int)atol(tmp); - } - } - else if (!soap_tag_cmp(tmp, "$Path")) - { s = soap_decode_val(tmp, sizeof(tmp), s); - if (*tmp) - { if ((t = (char*)SOAP_MALLOC(soap, strlen(tmp)+1))) - strcpy(t, tmp); - } - else - t = NULL; - if (p) - { if (p->path) - SOAP_FREE(soap, p->path); - p->path = t; - } - else - { if (path) - SOAP_FREE(soap, path); - path = t; - } - } - else if (!soap_tag_cmp(tmp, "$Domain")) - { s = soap_decode_val(tmp, sizeof(tmp), s); - if (*tmp) - { if ((t = (char*)SOAP_MALLOC(soap, strlen(tmp)+1))) - strcpy(t, tmp); - } - else - t = NULL; - if (p) - { if (p->domain) - SOAP_FREE(soap, p->domain); - p->domain = t; - } - else - { if (domain) - SOAP_FREE(soap, domain); - domain = t; - } - } - else if (p && !soap_tag_cmp(tmp, "Path")) - { if (p->path) - SOAP_FREE(soap, p->path); - s = soap_decode_val(tmp, sizeof(tmp), s); - if (*tmp) - { if ((p->path = (char*)SOAP_MALLOC(soap, strlen(tmp)+1))) - strcpy(p->path, tmp); - } - else - p->path = NULL; - } - else if (p && !soap_tag_cmp(tmp, "Domain")) - { if (p->domain) - SOAP_FREE(soap, p->domain); - s = soap_decode_val(tmp, sizeof(tmp), s); - if (*tmp) - { if ((p->domain = (char*)SOAP_MALLOC(soap, strlen(tmp)+1))) - strcpy(p->domain, tmp); - } - else - p->domain = NULL; - } - else if (p && !soap_tag_cmp(tmp, "Version")) - { s = soap_decode_val(tmp, sizeof(tmp), s); - p->version = (unsigned int)atol(tmp); - } - else if (p && !soap_tag_cmp(tmp, "Max-Age")) - { s = soap_decode_val(tmp, sizeof(tmp), s); - p->expire = now + atol(tmp); - } - else if (p && !soap_tag_cmp(tmp, "Expires")) - { struct tm T; - char a[3]; - static const char mns[] = "anebarprayunulugepctovec"; - s = soap_decode_val(tmp, sizeof(tmp), s); - if (strlen(tmp) > 20) - { memset((void*)&T, 0, sizeof(T)); - a[0] = tmp[4]; - a[1] = tmp[5]; - a[2] = '\0'; - T.tm_mday = (int)atol(a); - a[0] = tmp[8]; - a[1] = tmp[9]; - T.tm_mon = (strstr(mns, a) - mns) / 2; - a[0] = tmp[11]; - a[1] = tmp[12]; - T.tm_year = 100 + (int)atol(a); - a[0] = tmp[13]; - a[1] = tmp[14]; - T.tm_hour = (int)atol(a); - a[0] = tmp[16]; - a[1] = tmp[17]; - T.tm_min = (int)atol(a); - a[0] = tmp[19]; - a[1] = tmp[20]; - T.tm_sec = (int)atol(a); - p->expire = soap_timegm(&T); - } - } - else if (p && !soap_tag_cmp(tmp, "Secure")) - p->secure = 1; - else - { if (p) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Got environment cookie %s=%s domain=%s path=%s expire=%ld secure=%d\n", p->name, p->value?p->value:"(null)", p->domain?p->domain:"(null)", p->path?p->path:"(null)", p->expire, p->secure)); - if ((q = soap_set_cookie(soap, p->name, p->value, p->domain, p->path))) - { q->version = p->version; - q->expire = p->expire; - q->secure = p->secure; - q->env = 1; - } - if (p->name) - SOAP_FREE(soap, p->name); - if (p->value) - SOAP_FREE(soap, p->value); - if (p->domain) - SOAP_FREE(soap, p->domain); - if (p->path) - SOAP_FREE(soap, p->path); - SOAP_FREE(soap, p); - } - if ((p = (struct soap_cookie*)SOAP_MALLOC(soap, sizeof(struct soap_cookie)))) - { p->name = (char*)SOAP_MALLOC(soap, strlen(tmp)+1); - strcpy(p->name, tmp); - s = soap_decode_val(tmp, sizeof(tmp), s); - if (*tmp) - { p->value = (char*)SOAP_MALLOC(soap, strlen(tmp)+1); - strcpy(p->value, tmp); - } - else - p->value = NULL; - if (domain) - p->domain = domain; - else - { p->domain = (char*)SOAP_MALLOC(soap, strlen(soap->host)+1); - strcpy(p->domain, soap->host); - } - if (path) - p->path = path; - else - { p->path = (char*)SOAP_MALLOC(soap, strlen(soap->path)+1); - strcpy(p->path, soap->path); - } - p->expire = 0; - p->secure = 0; - p->version = version; - } - } - } - if (p) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Got environment cookie %s=%s domain=%s path=%s expire=%ld secure=%d\n", p->name, p->value?p->value:"(null)", p->domain?p->domain:"(null)", p->path?p->path:"(null)", p->expire, p->secure)); - if ((q = soap_set_cookie(soap, p->name, p->value, p->domain, p->path))) - { q->version = p->version; - q->expire = p->expire; - q->secure = p->secure; - q->env = 1; - } - if (p->name) - SOAP_FREE(soap, p->name); - if (p->value) - SOAP_FREE(soap, p->value); - if (p->domain) - SOAP_FREE(soap, p->domain); - if (p->path) - SOAP_FREE(soap, p->path); - SOAP_FREE(soap, p); - } - if (domain) - SOAP_FREE(soap, domain); - if (path) - SOAP_FREE(soap, path); -} - -/******************************************************************************/ -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_getenv_cookies(struct soap *soap) -{ struct soap_cookie *p; - const char *s; - char key[4096], val[4096]; /* cookie size is up to 4096 bytes [RFC2109] */ - if (!(s = getenv("HTTP_COOKIE"))) - return SOAP_ERR; - do - { s = soap_decode_key(key, sizeof(key), s); - s = soap_decode_val(val, sizeof(val), s); - p = soap_set_cookie(soap, key, val, NULL, NULL); - if (p) - p->env = 1; - } while (*s); - return SOAP_OK; -} - -/******************************************************************************/ -SOAP_FMAC1 -struct soap_cookie* -SOAP_FMAC2 -soap_copy_cookies(struct soap *copy, struct soap *soap) -{ struct soap_cookie *p, **q, *r; - q = &r; - for (p = soap->cookies; p; p = p->next) - { if (!(*q = (struct soap_cookie*)SOAP_MALLOC(copy, sizeof(struct soap_cookie)))) - return r; - **q = *p; - if (p->name) - { if (((*q)->name = (char*)SOAP_MALLOC(copy, strlen(p->name)+1))) - strcpy((*q)->name, p->name); - } - if (p->value) - { if (((*q)->value = (char*)SOAP_MALLOC(copy, strlen(p->value)+1))) - strcpy((*q)->value, p->value); - } - if (p->domain) - { if (((*q)->domain = (char*)SOAP_MALLOC(copy, strlen(p->domain)+1))) - strcpy((*q)->domain, p->domain); - } - if (p->path) - { if (((*q)->path = (char*)SOAP_MALLOC(copy, strlen(p->path)+1))) - strcpy((*q)->path, p->path); - } - q = &(*q)->next; - } - *q = NULL; - return r; -} - -/******************************************************************************/ -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_free_cookies(struct soap *soap) -{ struct soap_cookie *p; - for (p = soap->cookies; p; p = soap->cookies) - { soap->cookies = p->next; - SOAP_FREE(soap, p->name); - if (p->value) - SOAP_FREE(soap, p->value); - if (p->domain) - SOAP_FREE(soap, p->domain); - if (p->path) - SOAP_FREE(soap, p->path); - SOAP_FREE(soap, p); - } -} - -/******************************************************************************/ -#endif /* WITH_COOKIES */ - -/******************************************************************************/ -#ifdef WITH_GZIP -#ifndef PALM_1 -static int -soap_getgziphdr(struct soap *soap) -{ int i; - soap_wchar c, f = 0; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Get gzip header\n")); - for (i = 0; i < 9; i++) - { if ((int)(c = soap_get1(soap) == EOF)) - return soap->error = SOAP_EOF; - if (i == 2) - f = c; - } - if (f & 0x04) /* FEXTRA */ - { for (i = soap_get1(soap) | (soap_get1(soap) << 8); i; i--) - { if ((int)soap_get1(soap) == EOF) - return soap->error = SOAP_EOF; - } - } - if (f & 0x08) /* FNAME */ - { do - c = soap_get1(soap); - while (c && (int)c != EOF); - } - if ((int)c != EOF && (f & 0x10)) /* FCOMMENT */ - { do - c = soap_get1(soap); - while (c && (int)c != EOF); - } - if ((int)c != EOF && (f & 0x01)) /* FHCRC */ - { if ((int)(c = soap_get1(soap)) != EOF) - c = soap_get1(soap); - } - if ((int)c == EOF) - return soap->error = SOAP_EOF; - return SOAP_OK; -} -#endif -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_begin_recv(struct soap *soap) -{ soap_wchar c; - soap->error = SOAP_OK; - soap_free_temp(soap); - soap_set_local_namespaces(soap); - soap->version = 0; /* don't assume we're parsing SOAP content by default */ -#ifndef WITH_NOIDREF - soap_free_iht(soap); -#endif - if ((soap->imode & SOAP_IO) == SOAP_IO_CHUNK) - soap->omode |= SOAP_IO_CHUNK; - soap->imode &= ~SOAP_IO; - soap->mode = soap->imode; - if (!soap->keep_alive) - { soap->buflen = 0; - soap->bufidx = 0; - } - if (!(soap->mode & SOAP_IO_KEEPALIVE)) - soap->keep_alive = 0; - soap->ahead = 0; - soap->peeked = 0; - soap->level = 0; - soap->part = SOAP_BEGIN; - soap->alloced = 0; - soap->count = 0; - soap->length = 0; - soap->cdata = 0; - *soap->endpoint = '\0'; - soap->action = NULL; - soap->status = 0; -#ifndef WITH_LEANER - soap->dom = NULL; - soap->dime.chunksize = 0; - soap->dime.buflen = 0; - soap->dime.list = NULL; - soap->dime.first = NULL; - soap->dime.last = NULL; - soap->mime.list = NULL; - soap->mime.first = NULL; - soap->mime.last = NULL; - soap->mime.boundary = NULL; - soap->mime.start = NULL; - soap->xlist = NULL; -#endif -#ifdef WIN32 -#ifndef UNDER_CE -#ifndef WITH_FASTCGI - if (!soap_valid_socket(soap->socket)) -#ifdef __BORLANDC__ - setmode((SOAP_SOCKET)soap->recvfd, O_BINARY); -#else - _setmode((SOAP_SOCKET)soap->recvfd, _O_BINARY); -#endif -#endif -#endif -#endif -#ifdef WITH_ZLIB - soap->mode &= ~SOAP_ENC_ZLIB; - soap->zlib_in = SOAP_ZLIB_NONE; - soap->zlib_out = SOAP_ZLIB_NONE; - soap->d_stream.next_in = Z_NULL; - soap->d_stream.avail_in = 0; - soap->d_stream.next_out = (Byte*)soap->buf; - soap->d_stream.avail_out = SOAP_BUFLEN; - soap->z_ratio_in = 1.0; -#endif -#ifndef WITH_LEANER - if (soap->fprepareinit) - soap->fprepareinit(soap); -#endif - c = soap_getchar(soap); -#ifdef WITH_GZIP - if (c == 0x1F) - { if (soap_getgziphdr(soap)) - return soap->error; - if (inflateInit2(&soap->d_stream, -MAX_WBITS) != Z_OK) - return soap->error = SOAP_ZLIB_ERROR; - soap->zlib_state = SOAP_ZLIB_INFLATE; - soap->mode |= SOAP_ENC_ZLIB; - soap->zlib_in = SOAP_ZLIB_GZIP; - soap->z_crc = crc32(0L, NULL, 0); - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "gzip initialized\n")); - memcpy(soap->z_buf, soap->buf, SOAP_BUFLEN); - /* should not chunk over plain transport, so why bother to check? */ - /* if ((soap->mode & SOAP_IO) == SOAP_IO_CHUNK) */ - /* soap->z_buflen = soap->bufidx; */ - /* else */ - soap->d_stream.next_in = (Byte*)(soap->z_buf + soap->bufidx); - soap->d_stream.avail_in = soap->buflen - soap->bufidx; - soap->z_buflen = soap->buflen; - soap->buflen = soap->bufidx; - c = soap_getchar(soap); - } -#endif -#ifndef WITH_LEANER - if (c == '-' && soap_get0(soap) == '-') - soap->mode |= SOAP_ENC_MIME; - else if ((c & 0xFFFC) == (SOAP_DIME_VERSION | SOAP_DIME_MB) && (soap_get0(soap) & 0xFFF0) == 0x20) - soap->mode |= SOAP_ENC_DIME; - else -#endif - { while (soap_blank(c)) - c = soap_getchar(soap); - } - if ((int)c == EOF) - return soap->error = SOAP_EOF; - soap_unget(soap, c); -#ifndef WITH_NOHTTP - /* if not XML or (start of)BOM or MIME/DIME/ZLIB, assume HTTP header */ - if (c != '<' && c != 0xEF && !(soap->mode & (SOAP_ENC_MIME | SOAP_ENC_DIME | SOAP_ENC_ZLIB))) - { soap->mode &= ~SOAP_IO; - soap->error = soap->fparse(soap); - if (soap->error && soap->error < SOAP_STOP) - { soap->keep_alive = 0; /* force close later */ - return soap->error; - } - if ((soap->mode & SOAP_IO) == SOAP_IO_CHUNK) - { soap->chunkbuflen = soap->buflen; - soap->buflen = soap->bufidx; - soap->chunksize = 0; - } -#ifndef WITH_LEANER - else if (soap->fpreparerecv && soap->buflen != soap->bufidx) - soap->fpreparerecv(soap, soap->buf + soap->bufidx, soap->buflen - soap->bufidx); -#endif - /* Note: fparse should not use soap_unget to push back last char */ - if (soap_get0(soap) == (int)EOF) - { if (soap->status == 200) - return soap->error = SOAP_NO_DATA; - return soap->error = soap->status; - } -#ifdef WITH_ZLIB - if (soap->zlib_in != SOAP_ZLIB_NONE) -#ifdef WITH_GZIP - { c = soap_get1(soap); - if (c == 0x1F) - { if (soap_getgziphdr(soap)) - return soap->error; - if (inflateInit2(&soap->d_stream, -MAX_WBITS) != Z_OK) - return soap->error = SOAP_ZLIB_ERROR; - soap->zlib_state = SOAP_ZLIB_INFLATE; - soap->z_crc = crc32(0L, NULL, 0); - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "gzip initialized\n")); - } - else - { soap_revget1(soap); -#else - { -#endif - if (inflateInit(&soap->d_stream) != Z_OK) - return soap->error = SOAP_ZLIB_ERROR; - soap->zlib_state = SOAP_ZLIB_INFLATE; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Inflate initialized\n")); - } - soap->mode |= SOAP_ENC_ZLIB; - memcpy(soap->z_buf, soap->buf, SOAP_BUFLEN); - soap->d_stream.next_in = (Byte*)(soap->z_buf + soap->bufidx); - soap->d_stream.avail_in = soap->buflen - soap->bufidx; - soap->z_buflen = soap->buflen; - soap->buflen = soap->bufidx; - } -#endif - if (soap->error) - { if (soap->error == SOAP_FORM && soap->fform) - { soap->error = soap->fform(soap); - if (soap->error == SOAP_OK) - soap->error = SOAP_STOP; /* prevents further processing */ - } - return soap->error; - } - } -#endif -#ifndef WITH_LEANER - if (soap->mode & SOAP_ENC_MIME) - { if (soap_getmimehdr(soap)) - return soap->error; - if (soap->mime.start) - { do - { if (!soap->mime.last->id) - break; - if (!soap_match_cid(soap, soap->mime.start, soap->mime.last->id)) - break; - } while (soap_get_mime_attachment(soap, NULL)); - } - if (soap_get_header_attribute(soap, soap->mime.first->type, "application/dime")) - soap->mode |= SOAP_ENC_DIME; - } - if (soap->mode & SOAP_ENC_DIME) - { if (soap_getdimehdr(soap)) - return soap->error; - if (soap->dime.flags & SOAP_DIME_CF) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Chunked DIME SOAP message\n")); - soap->dime.chunksize = soap->dime.size; - if (soap->buflen - soap->bufidx >= soap->dime.chunksize) - { soap->dime.buflen = soap->buflen; - soap->buflen = soap->bufidx + soap->dime.chunksize; - } - else - soap->dime.chunksize -= soap->buflen - soap->bufidx; - } - soap->count = soap->buflen - soap->bufidx; - } -#endif - return SOAP_OK; -} -#endif - -/******************************************************************************/ -#ifndef WITH_NOHTTP -#ifndef PALM_1 -static int -http_parse(struct soap *soap) -{ char header[SOAP_HDRLEN], *s; - unsigned short get = 0, status = 0, k = 0; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Waiting for HTTP request/response...\n")); - *soap->endpoint = '\0'; - soap->length = 0; - soap->userid = NULL; - soap->passwd = NULL; - soap->action = NULL; - soap->authrealm = NULL; - do - { if (soap_getline(soap, soap->msgbuf, sizeof(soap->msgbuf))) - return soap->error; - DBGLOG(TEST,SOAP_MESSAGE(fdebug, "HTTP status: %s\n", soap->msgbuf)); - for (;;) - { if (soap_getline(soap, header, SOAP_HDRLEN)) - { if (soap->error == SOAP_EOF) - { soap->error = SOAP_OK; - DBGLOG(TEST,SOAP_MESSAGE(fdebug, "EOF in HTTP header, continue anyway\n")); - break; - } - return soap->error; - } - if (!*header) - break; - DBGLOG(TEST,SOAP_MESSAGE(fdebug, "HTTP header: %s\n", header)); - s = strchr(header, ':'); - if (s) - { *s = '\0'; - do s++; - while (*s && *s <= 32); - if ((soap->error = soap->fparsehdr(soap, header, s))) - { if (soap->error < SOAP_STOP) - return soap->error; - status = soap->error; - soap->error = SOAP_OK; - } - } - } - if ((s = strchr(soap->msgbuf, ' '))) - { k = (unsigned short)soap_strtoul(s, &s, 10); - if (!soap_blank(*s)) - k = 0; - } - else - k = 0; - } while (k == 100); - DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Finished HTTP header parsing, status = %d\n", k)); - s = strstr(soap->msgbuf, "HTTP/"); - if (s && s[7] != '1') - { if (soap->keep_alive == 1) - soap->keep_alive = 0; - if (k == 0 && (soap->omode & SOAP_IO) == SOAP_IO_CHUNK) /* k == 0 for HTTP request */ - { soap->imode |= SOAP_IO_CHUNK; - soap->omode = (soap->omode & ~SOAP_IO) | SOAP_IO_STORE; - } - } - if (soap->keep_alive < 0) - soap->keep_alive = 1; - DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Keep alive connection = %d\n", soap->keep_alive)); - if (s && (((get = !strncmp(soap->msgbuf, "GET ", 4))) || !strncmp(soap->msgbuf, "POST ", 5))) - { size_t m = strlen(soap->endpoint); - size_t n = m + (s - soap->msgbuf) - 5 - (!get); - if (n >= sizeof(soap->endpoint)) - n = sizeof(soap->endpoint) - 1; - strncpy(soap->path, soap->msgbuf + 4 + (!get), n - m); - soap->path[n - m] = '\0'; - strcat(soap->endpoint, soap->path); - DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Target endpoint='%s'\n", soap->endpoint)); - if (get) - { soap->error = soap->fget(soap); - if (soap->error == SOAP_OK) - soap->error = SOAP_STOP; /* prevents further processing */ - return soap->error; - } - if (status) - return soap->error = status; - } - soap->status = k; - if (k == 0 || k == 200 || (((k > 200 && k <= 299) || k == 400 || k == 500) && ((soap->mode & SOAP_IO) == SOAP_IO_CHUNK || soap->length > 0))) - return SOAP_OK; - DBGLOG(TEST,SOAP_MESSAGE(fdebug, "HTTP error %d\n", k)); - return soap_set_receiver_error(soap, "HTTP Error", soap->msgbuf, k); -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_NOHTTP -#ifndef PALM_1 -static int -http_parse_header(struct soap *soap, const char *key, const char *val) -{ if (!soap_tag_cmp(key, "Host")) - { -#ifdef WITH_OPENSSL - if (soap->imode & SOAP_ENC_SSL) - strcpy(soap->endpoint, "https://"); - else -#endif - strcpy(soap->endpoint, "http://"); - strncat(soap->endpoint, val, sizeof(soap->endpoint) - 8); - soap->endpoint[sizeof(soap->endpoint) - 1] = '\0'; - } -#ifndef WITH_LEANER - else if (!soap_tag_cmp(key, "Content-Type")) - { soap->http_content = soap_strdup(soap, val); - if (soap_get_header_attribute(soap, val, "application/dime")) - soap->mode |= SOAP_ENC_DIME; - else if (soap_get_header_attribute(soap, val, "multipart/related") - || soap_get_header_attribute(soap, val, "multipart/form-data")) - { soap->mime.boundary = soap_strdup(soap, soap_get_header_attribute(soap, val, "boundary")); - soap->mime.start = soap_strdup(soap, soap_get_header_attribute(soap, val, "start")); - soap->mode |= SOAP_ENC_MIME; - } - } -#endif - else if (!soap_tag_cmp(key, "Content-Length")) - soap->length = soap_strtoul(val, NULL, 10); - else if (!soap_tag_cmp(key, "Content-Encoding")) - { if (!soap_tag_cmp(val, "deflate")) -#ifdef WITH_ZLIB - soap->zlib_in = SOAP_ZLIB_DEFLATE; -#else - return SOAP_ZLIB_ERROR; -#endif - else if (!soap_tag_cmp(val, "gzip")) -#ifdef WITH_GZIP - soap->zlib_in = SOAP_ZLIB_GZIP; -#else - return SOAP_ZLIB_ERROR; -#endif - } -#ifdef WITH_ZLIB - else if (!soap_tag_cmp(key, "Accept-Encoding")) - { -#ifdef WITH_GZIP - if (strchr(val, '*') || soap_get_header_attribute(soap, val, "gzip")) - soap->zlib_out = SOAP_ZLIB_GZIP; - else -#endif - if (strchr(val, '*') || soap_get_header_attribute(soap, val, "deflate")) - soap->zlib_out = SOAP_ZLIB_DEFLATE; - else - soap->zlib_out = SOAP_ZLIB_NONE; - } -#endif - else if (!soap_tag_cmp(key, "Transfer-Encoding")) - { soap->mode &= ~SOAP_IO; - if (!soap_tag_cmp(val, "chunked")) - soap->mode |= SOAP_IO_CHUNK; - } - else if (!soap_tag_cmp(key, "Connection")) - { if (!soap_tag_cmp(val, "keep-alive")) - soap->keep_alive = -soap->keep_alive; - else if (!soap_tag_cmp(val, "close")) - soap->keep_alive = 0; - } -#ifndef WITH_LEAN - else if (!soap_tag_cmp(key, "Authorization")) - { if (!soap_tag_cmp(val, "Basic *")) - { int n; - char *s; - soap_base642s(soap, val + 6, soap->tmpbuf, sizeof(soap->tmpbuf) - 1, &n); - soap->tmpbuf[n] = '\0'; - if ((s = strchr(soap->tmpbuf, ':'))) - { *s = '\0'; - soap->userid = soap_strdup(soap, soap->tmpbuf); - soap->passwd = soap_strdup(soap, s + 1); - } - } - } - else if (!soap_tag_cmp(key, "WWW-Authenticate")) - soap->authrealm = soap_strdup(soap, soap_get_header_attribute(soap, val + 6, "realm")); - else if (!soap_tag_cmp(key, "Expect")) - { if (!soap_tag_cmp(val, "100-continue")) - { if ((soap->error = soap->fposthdr(soap, "HTTP/1.1 100 Continue", NULL)) - || (soap->error = soap->fposthdr(soap, NULL, NULL))) - return soap->error; - } - } -#endif - else if (!soap_tag_cmp(key, "SOAPAction")) - { if (*val == '"') - { soap->action = soap_strdup(soap, val + 1); - soap->action[strlen(soap->action) - 1] = '\0'; - } - } - else if (!soap_tag_cmp(key, "Location")) - { strncpy(soap->endpoint, val, sizeof(soap->endpoint)); - soap->endpoint[sizeof(soap->endpoint) - 1] = '\0'; - } -#ifdef WITH_COOKIES - else if (!soap_tag_cmp(key, "Cookie") - || !soap_tag_cmp(key, "Cookie2") - || !soap_tag_cmp(key, "Set-Cookie") - || !soap_tag_cmp(key, "Set-Cookie2")) - soap_getcookies(soap, val); -#endif - return SOAP_OK; -} -#endif -#endif - -/******************************************************************************/ -#if !defined(WITH_NOHTTP) || !defined(WITH_LEANER) -#ifndef PALM_1 -SOAP_FMAC1 -const char* -SOAP_FMAC2 -soap_get_header_attribute(struct soap *soap, const char *line, const char *key) -{ register const char *s = line; - if (s) - { while (*s) - { register short flag; - s = soap_decode_key(soap->tmpbuf, sizeof(soap->tmpbuf), s); - flag = soap_tag_cmp(soap->tmpbuf, key); - s = soap_decode_val(soap->tmpbuf, sizeof(soap->tmpbuf), s); - if (!flag) - return soap->tmpbuf; - } - } - return NULL; -} -#endif -#endif - -/******************************************************************************/ -#if !defined(WITH_NOHTTP) || !defined(WITH_LEANER) -#ifndef PALM_1 -SOAP_FMAC1 -const char* -SOAP_FMAC2 -soap_decode_key(char *buf, size_t len, const char *val) -{ return soap_decode(buf, len, val, "=,;"); -} -#endif -#endif - -/******************************************************************************/ -#if !defined(WITH_NOHTTP) || !defined(WITH_LEANER) -#ifndef PALM_1 -SOAP_FMAC1 -const char* -SOAP_FMAC2 -soap_decode_val(char *buf, size_t len, const char *val) -{ if (*val != '=') - { *buf = '\0'; - return val; - } - return soap_decode(buf, len, val + 1, ",;"); -} -#endif -#endif - -/******************************************************************************/ -#if !defined(WITH_NOHTTP) || !defined(WITH_LEANER) -#ifndef PALM_1 -static const char* -soap_decode(char *buf, size_t len, const char *val, const char *sep) -{ const char *s; - char *t = buf; - for (s = val; *s; s++) - if (*s != ' ' && *s != '\t' && !strchr(sep, *s)) - break; - if (*s == '"') - { s++; - while (*s && *s != '"' && --len) - *t++ = *s++; - } - else - { while (soap_notblank(*s) && !strchr(sep, *s) && --len) - { if (*s == '%') - { *t++ = ((s[1] >= 'A' ? (s[1] & 0x7) + 9 : s[1] - '0') << 4) - + (s[2] >= 'A' ? (s[2] & 0x7) + 9 : s[2] - '0'); - s += 3; - } - else - *t++ = *s++; - } - } - *t = '\0'; - while (*s && !strchr(sep, *s)) - s++; - return s; -} -#endif -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_envelope_begin_out(struct soap *soap) -{ -#ifndef WITH_LEANER - size_t n = 0; - if ((soap->mode & SOAP_ENC_MIME) && soap->mime.boundary && soap->mime.start && strlen(soap->mime.boundary) + strlen(soap->mime.start) < sizeof(soap->tmpbuf) - 80 ) - { const char *s; - if ((soap->mode & SOAP_ENC_DIME) && !(soap->mode & SOAP_ENC_MTOM)) - s = "application/dime"; - else if (soap->version == 2) - { if (soap->mode & SOAP_ENC_MTOM) - s = "application/xop+xml; charset=utf-8; type=application/soap+xml"; - else - s = "application/soap+xml; charset=utf-8"; - } - else - s = "text/xml; charset=utf-8"; - sprintf(soap->tmpbuf, "--%s\r\nContent-Type: %s\r\nContent-Transfer-Encoding: binary\r\nContent-ID: %s\r\n\r\n", soap->mime.boundary, s, soap->mime.start); - n = strlen(soap->tmpbuf); - if (soap_send_raw(soap, soap->tmpbuf, n)) - return soap->error; - } - if (soap->mode & SOAP_IO_LENGTH) - soap->dime.size = soap->count; /* DIME in MIME correction */ - if (!(soap->mode & SOAP_IO_LENGTH) && (soap->mode & SOAP_ENC_DIME)) - { if (soap_putdimehdr(soap)) - return soap->error; - } -#endif - soap->part = SOAP_IN_ENVELOPE; - return soap_element_begin_out(soap, "SOAP-ENV:Envelope", 0, NULL); -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_envelope_end_out(struct soap *soap) -{ if (soap_element_end_out(soap, "SOAP-ENV:Envelope")) - return soap->error; -#ifndef WITH_LEANER - if ((soap->mode & SOAP_IO_LENGTH) && (soap->mode & SOAP_ENC_DIME) && !(soap->mode & SOAP_ENC_MTOM)) - { soap->dime.size = soap->count - soap->dime.size; /* DIME in MIME correction */ - sprintf(soap->id, soap->dime_id_format, 0); - soap->dime.id = soap->id; - if (soap->local_namespaces) - { if (soap->local_namespaces[0].out) - soap->dime.type = (char*)soap->local_namespaces[0].out; - else - soap->dime.type = (char*)soap->local_namespaces[0].ns; - } - soap->dime.options = NULL; - soap->dime.flags = SOAP_DIME_MB | SOAP_DIME_ABSURI; - if (!soap->dime.first) - soap->dime.flags |= SOAP_DIME_ME; - soap->count += 12 + ((strlen(soap->dime.id)+3)&(~3)) + (soap->dime.type ? ((strlen(soap->dime.type)+3)&(~3)) : 0); - } - if ((soap->mode & SOAP_ENC_DIME) && !(soap->mode & SOAP_ENC_MTOM)) - return soap_send_raw(soap, SOAP_STR_PADDING, -(long)soap->dime.size&3); -#endif - soap->part = SOAP_END_ENVELOPE; - return SOAP_OK; -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_envelope_begin_in(struct soap *soap) -{ register struct Namespace *p; - soap->part = SOAP_IN_ENVELOPE; - if (soap_element_begin_in(soap, "SOAP-ENV:Envelope", 0, NULL)) - { -#ifndef WITH_LEAN - if (!soap_element_begin_in(soap, "html", 0, NULL)) - { /* get HTML from buffer, stop receiving to avoid HTML parsing issues */ - char *s; -#ifndef WITH_NOIO - size_t (*f)(struct soap*, char*, size_t) = soap->frecv; - soap->frecv = frecv_stop; -#endif - soap_revert(soap); - s = soap_string_in(soap, 1, -1, -1); -#ifndef WITH_NOIO - soap->frecv = f; -#endif - return soap_set_receiver_error(soap, "HTTP Error", s, SOAP_HTTP_ERROR); - } -#endif - return soap->error = SOAP_VERSIONMISMATCH; - } - p = soap->local_namespaces; - if (p) - { const char *ns = p[0].out; - if (!ns) - ns = p[0].ns; - if (!strcmp(ns, soap_env1)) - { soap->version = 1; /* make sure we use SOAP 1.1 */ - if (p[1].out) - SOAP_FREE(soap, p[1].out); - if ((p[1].out = (char*)SOAP_MALLOC(soap, sizeof(soap_enc1)))) - strcpy(p[1].out, soap_enc1); - } - else if (!strcmp(ns, soap_env2)) - { soap->version = 2; /* make sure we use SOAP 1.2 */ - if (p[1].out) - SOAP_FREE(soap, p[1].out); - if ((p[1].out = (char*)SOAP_MALLOC(soap, sizeof(soap_enc2)))) - strcpy(p[1].out, soap_enc2); - } - } - return SOAP_OK; -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_envelope_end_in(struct soap *soap) -{ soap->part = SOAP_END_ENVELOPE; - return soap_element_end_in(soap, "SOAP-ENV:Envelope"); -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_body_begin_out(struct soap *soap) -{ soap->part = SOAP_IN_BODY; - if (soap->version == 1) - soap->encoding = 1; -#ifndef WITH_LEAN - if ((soap->mode & SOAP_XML_SEC) && soap_set_attr(soap, "wsu:Id", "Body")) - return soap->error; -#endif - if (soap_element(soap, "SOAP-ENV:Body", 0, NULL)) - return soap->error; - return soap_element_start_end_out(soap, NULL); -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_body_end_out(struct soap *soap) -{ if (soap_element_end_out(soap, "SOAP-ENV:Body")) - return soap->error; - soap->part = SOAP_END_BODY; - return SOAP_OK; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_body_begin_in(struct soap *soap) -{ soap->part = SOAP_IN_BODY; - if (soap_element_begin_in(soap, "SOAP-ENV:Body", 0, NULL)) - return soap->error; - if (!soap->body) - soap->part = SOAP_NO_BODY; - return SOAP_OK; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_body_end_in(struct soap *soap) -{ if (soap->part == SOAP_NO_BODY) - return SOAP_OK; - soap->part = SOAP_END_BODY; - return soap_element_end_in(soap, "SOAP-ENV:Body"); -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_recv_header(struct soap *soap) -{ if (soap_getheader(soap) && soap->error == SOAP_TAG_MISMATCH) - soap->error = SOAP_OK; - else if (soap->error == SOAP_OK && soap->fheader) - soap->error = soap->fheader(soap); - return soap->error; -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_set_endpoint(struct soap *soap, const char *endpoint) -{ register const char *s; - register size_t i, n; - soap->endpoint[0] = '\0'; - soap->host[0] = '\0'; - soap->path[0] = '/'; - soap->path[1] = '\0'; - soap->port = 80; - if (!endpoint || !*endpoint) - return; -#ifdef WITH_OPENSSL - if (!soap_tag_cmp(endpoint, "https:*")) - soap->port = 443; -#endif - strncpy(soap->endpoint, endpoint, sizeof(soap->endpoint) - 1); - soap->endpoint[sizeof(soap->endpoint) - 1] = '\0'; - s = strchr(endpoint, ':'); - if (s && s[1] == '/' && s[2] == '/') - s += 3; - else - s = endpoint; - n = strlen(s); - if (n >= sizeof(soap->host)) - n = sizeof(soap->host) - 1; -#ifdef WITH_IPV6 - if (s[0] == '[') - { s++; - for (i = 0; i < n; i++) - { soap->host[i] = s[i]; - if (s[i] == ']') - { s++; - break; - } - } - } - else - { for (i = 0; i < n; i++) - { soap->host[i] = s[i]; - if (s[i] == '/' || s[i] == ':') - break; - } - } -#else - for (i = 0; i < n; i++) - { soap->host[i] = s[i]; - if (s[i] == '/' || s[i] == ':') - break; - } -#endif - soap->host[i] = '\0'; - if (s[i] == ':') - { soap->port = (int)atol(s + i + 1); - for (i++; i < n; i++) - if (s[i] == '/') - break; - } - if (s[i]) - { strncpy(soap->path, s + i, sizeof(soap->path)); - soap->path[sizeof(soap->path) - 1] = '\0'; - } -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_connect(struct soap *soap, const char *endpoint, const char *action) -{ return soap_connect_command(soap, SOAP_POST, endpoint, action); -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_connect_command(struct soap *soap, int http_command, const char *endpoint, const char *action) -{ char host[sizeof(soap->host)]; - int port; - size_t count; - soap->error = SOAP_OK; - strcpy(host, soap->host); /* save to compare */ - port = soap->port; /* save to compare */ - soap_set_endpoint(soap, endpoint); -#ifndef WITH_LEANER - if (soap->fconnect) - { if ((soap->error = soap->fconnect(soap, endpoint, soap->host, soap->port))) - return soap->error; - } - else -#endif - if (soap->fopen && *soap->host) - { soap->status = http_command; - if (!soap->keep_alive || !soap_valid_socket(soap->socket) || strcmp(soap->host, host) || soap->port != port || !soap->fpoll || soap->fpoll(soap)) - { soap->keep_alive = 0; /* to force close */ - soap->omode &= ~SOAP_IO_UDP; /* to force close */ - soap_closesock(soap); - DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Connect/reconnect to host='%s' path='%s' port=%d\n", soap->host, soap->path, soap->port)); -#ifdef WITH_UDP - if (!strncmp(endpoint, "soap.udp:", 9)) - soap->omode |= SOAP_IO_UDP; -#endif - soap->socket = soap->fopen(soap, endpoint, soap->host, soap->port); - if (soap->error) - return soap->error; - soap->keep_alive = ((soap->omode & SOAP_IO_KEEPALIVE) != 0); - } - } - count = soap_count_attachments(soap); - if (soap_begin_send(soap)) - return soap->error; -#ifndef WITH_NOHTTP - soap->action = soap_strdup(soap, action); - if ((soap->mode & SOAP_IO) != SOAP_IO_STORE && !(soap->mode & SOAP_ENC_XML) && endpoint) - { unsigned int k = soap->mode; - soap->mode &= ~(SOAP_IO | SOAP_ENC_ZLIB); - if ((k & SOAP_IO) != SOAP_IO_FLUSH) - soap->mode |= SOAP_IO_BUFFER; - if ((soap->error = soap->fpost(soap, endpoint, soap->host, soap->port, soap->path, action, count))) - return soap->error; -#ifndef WITH_LEANER - if ((k & SOAP_IO) == SOAP_IO_CHUNK) - { if (soap_flush(soap)) - return soap->error; - } -#endif - soap->mode = k; - } - if (http_command != SOAP_POST) - return soap_end_send(soap); -#endif - return SOAP_OK; -} -#endif - -/******************************************************************************/ -#ifndef WITH_LEAN -SOAP_FMAC1 -char* -SOAP_FMAC2 -soap_s2base64(struct soap *soap, const unsigned char *s, char *t, int n) -{ register int i; - register unsigned long m; - register char *p; - if (!t) - t = (char*)soap_malloc(soap, (n + 2) / 3 * 4 + 1); - if (!t) - { soap->error = SOAP_EOM; - return NULL; - } - p = t; - t[0] = '\0'; - if (!s) - return p; - for (; n > 2; n -= 3, s += 3) - { m = s[0]; - m = (m << 8) | s[1]; - m = (m << 8) | s[2]; - for (i = 4; i > 0; m >>= 6) - t[--i] = soap_base64o[m & 0x3F]; - t += 4; - } - t[0] = '\0'; - if (n > 0) - { m = 0; - for (i = 0; i < n; i++) - m = (m << 8) | *s++; - for (; i < 3; i++) - m <<= 8; - for (i++; i > 0; m >>= 6) - t[--i] = soap_base64o[m & 0x3F]; - for (i = 3; i > n; i--) - t[i] = '='; - t[4] = '\0'; - } - return p; -} -#endif - -/******************************************************************************/ -#ifndef WITH_LEAN -SOAP_FMAC1 -const char* -SOAP_FMAC2 -soap_base642s(struct soap *soap, const char *s, char *t, size_t l, int *n) -{ register int i, j, c; - register unsigned long m; - register const char *p; - if (!s || !*s) - { if (n) - *n = 0; - if (soap->error) - return NULL; - return SOAP_NON_NULL; - } - if (!t) - { l = (strlen(s) + 3) / 4 * 3; - t = (char*)soap_malloc(soap, l); - } - if (!t) - { soap->error = SOAP_EOM; - return NULL; - } - p = t; - if (n) - *n = 0; - for (;;) - { for (i = 0; i < SOAP_BLKLEN; i++) - { m = 0; - j = 0; - while (j < 4) - { c = *s++; - if (c == '=' || !c) - { i *= 3; - switch (j) - { case 2: - *t++ = (char)((m >> 4) & 0xFF); - i++; - break; - case 3: - *t++ = (char)((m >> 10) & 0xFF); - *t++ = (char)((m >> 2) & 0xFF); - i += 2; - } - if (n) - *n += i; - return p; - } - c -= '+'; - if (c >= 0 && c <= 79) - { int b = soap_base64i[c]; - if (b >= 64) - { soap->error = SOAP_TYPE; - return NULL; - } - m = (m << 6) + b; - j++; - } - else if (!soap_blank(c)) - { soap->error = SOAP_TYPE; - return NULL; - } - } - *t++ = (char)((m >> 16) & 0xFF); - *t++ = (char)((m >> 8) & 0xFF); - *t++ = (char)(m & 0xFF); - if (l < 3) - { if (n) - *n += i; - return p; - } - l -= 3; - } - if (n) - *n += 3 * SOAP_BLKLEN; - } -} -#endif - -/******************************************************************************/ -#ifndef WITH_LEAN -SOAP_FMAC1 -char* -SOAP_FMAC2 -soap_s2hex(struct soap *soap, const unsigned char *s, char *t, int n) -{ register char *p; - if (!t) - t = (char*)soap_malloc(soap, 2 * n + 1); - if (!t) - { soap->error = SOAP_EOM; - return NULL; - } - p = t; - t[0] = '\0'; - if (s) - { for (; n > 0; n--) - { register int m = *s++; - *t++ = (char)((m >> 4) + (m > 159 ? 'a' - 10 : '0')); - m &= 0x0F; - *t++ = (char)(m + (m > 9 ? 'a' - 10 : '0')); - } - } - *t++ = '\0'; - return p; -} -#endif - -/******************************************************************************/ -#ifndef WITH_LEAN -SOAP_FMAC1 -const char* -SOAP_FMAC2 -soap_hex2s(struct soap *soap, const char *s, char *t, size_t l, int *n) -{ register const char *p; - if (!s || !*s) - { if (n) - *n = 0; - if (soap->error) - return NULL; - return SOAP_NON_NULL; - } - if (!t) - { l = strlen(s) / 2; - t = (char*)soap_malloc(soap, l); - } - if (!t) - { soap->error = SOAP_EOM; - return NULL; - } - p = t; - while (l) - { register int d1, d2; - d1 = *s++; - if (!d1) - break; - d2 = *s++; - if (!d2) - break; - *t++ = ((d1 >= 'A' ? (d1 & 0x7) + 9 : d1 - '0') << 4) + (d2 >= 'A' ? (d2 & 0x7) + 9 : d2 - '0'); - l--; - } - if (n) - *n = t - p; - return p; -} -#endif - -/******************************************************************************/ -#ifndef WITH_NOHTTP -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_puthttphdr(struct soap *soap, int status, size_t count) -{ register const char *s = "text/xml; charset=utf-8"; - register int err = SOAP_OK; -#ifndef WITH_LEANER - register const char *r = NULL; -#endif - if (status == SOAP_FILE && soap->http_content) - s = soap->http_content; - else if (status == SOAP_HTML) - s = "text/html; charset=utf-8"; - else if (count || ((soap->omode & SOAP_IO) == SOAP_IO_CHUNK)) - { if (soap->version == 2) - s = "application/soap+xml; charset=utf-8"; - } -#ifndef WITH_LEANER - if (soap->mode & (SOAP_ENC_DIME | SOAP_ENC_MTOM)) - { if (soap->mode & SOAP_ENC_MTOM) - { r = s; - s = "application/xop+xml; charset=utf-8"; - } - else - s = "application/dime"; - } - if ((soap->mode & SOAP_ENC_MIME) && soap->mime.boundary && soap->status != SOAP_GET && strlen(soap->mime.boundary) + strlen(soap->mime.start ? soap->mime.start : SOAP_STR_EOS) < sizeof(soap->tmpbuf) - 80) - { register const char *t = strchr(s, ';'); - sprintf(soap->tmpbuf, "multipart/related; boundary=\"%s\"; type=\"", soap->mime.boundary); - if (t) - strncat(soap->tmpbuf, s, t - s); - else - strcat(soap->tmpbuf, s); - if (soap->mime.start) - { strcat(soap->tmpbuf, "\"; start=\""); - strcat(soap->tmpbuf, soap->mime.start); - } - strcat(soap->tmpbuf, "\""); - if (r) - { strcat(soap->tmpbuf, "; start-info=\""); - strcat(soap->tmpbuf, r); - strcat(soap->tmpbuf, "\""); - } - s = soap->tmpbuf; - } -#endif - if (s && (err = soap->fposthdr(soap, "Content-Type", s))) - return err; -#ifdef WITH_ZLIB - if (soap->omode & SOAP_ENC_ZLIB) - { -#ifdef WITH_GZIP - err = soap->fposthdr(soap, "Content-Encoding", "gzip"); -#else - err = soap->fposthdr(soap, "Content-Encoding", "deflate"); -#endif - if (err) - return err; - } -#endif -#ifndef WITH_LEANER - if ((soap->omode & SOAP_IO) == SOAP_IO_CHUNK) - err = soap->fposthdr(soap, "Transfer-Encoding", "chunked"); - else -#endif - if (s && soap->status != SOAP_GET) - { sprintf(soap->tmpbuf, "%lu", (unsigned long)count); - err = soap->fposthdr(soap, "Content-Length", soap->tmpbuf); - } - if (err) - return err; - return soap->fposthdr(soap, "Connection", soap->keep_alive ? "keep-alive" : "close"); -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_NOHTTP -#ifndef PALM_1 -static int -http_get(struct soap *soap) -{ return SOAP_GET_METHOD; -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_NOHTTP -#ifndef PALM_1 -static int -http_post(struct soap *soap, const char *endpoint, const char *host, int port, const char *path, const char *action, size_t count) -{ register const char *s; - register int err; - if (soap->status == SOAP_GET) - s = "GET"; - else - s = "POST"; -#ifdef PALM - if (!endpoint || (soap_tag_cmp(endpoint, "http:*") && soap_tag_cmp(endpoint, "https:*") && strncmp(endpoint, "httpg:", 6)) && strncmp(endpoint, "_beam:", 6) && strncmp(endpoint, "_local:", 7) && strncmp(endpoint, "_btobex:", 8)) -#else - if (!endpoint || (soap_tag_cmp(endpoint, "http:*") && soap_tag_cmp(endpoint, "https:*") && strncmp(endpoint, "httpg:", 6))) -#endif - return SOAP_OK; - if (strlen(endpoint) + strlen(soap->http_version) > sizeof(soap->tmpbuf) - 80) - return soap->error = SOAP_EOM; - if (soap->proxy_host && soap_tag_cmp(endpoint, "https:*")) - sprintf(soap->tmpbuf, "%s %s HTTP/%s", s, endpoint, soap->http_version); - else - sprintf(soap->tmpbuf, "%s /%s HTTP/%s", s, (*path == '/' ? path + 1 : path), soap->http_version); - if ((err = soap->fposthdr(soap, soap->tmpbuf, NULL))) - return err; - if (port != 80) - sprintf(soap->tmpbuf, "%s:%d", host, port); - else - strcpy(soap->tmpbuf, host); - if ((err = soap->fposthdr(soap, "Host", soap->tmpbuf)) - || (err = soap->fposthdr(soap, "User-Agent", "gSOAP/2.7")) - || (err = soap_puthttphdr(soap, SOAP_OK, count))) - return err; -#ifdef WITH_ZLIB -#ifdef WITH_GZIP - if ((err = soap->fposthdr(soap, "Accept-Encoding", "gzip, deflate"))) -#else - if ((err = soap->fposthdr(soap, "Accept-Encoding", "deflate"))) -#endif - return err; -#endif -#ifndef WITH_LEAN - if (soap->userid && soap->passwd && strlen(soap->userid) + strlen(soap->passwd) < 761) - { sprintf(soap->tmpbuf + 262, "%s:%s", soap->userid, soap->passwd); - strcpy(soap->tmpbuf, "Basic "); - soap_s2base64(soap, (const unsigned char*)(soap->tmpbuf + 262), soap->tmpbuf + 6, strlen(soap->tmpbuf + 262)); - if ((err = soap->fposthdr(soap, "Authorization", soap->tmpbuf))) - return err; - } - if (soap->proxy_userid && soap->proxy_passwd && strlen(soap->proxy_userid) + strlen(soap->proxy_passwd) < 761) - { sprintf(soap->tmpbuf + 262, "%s:%s", soap->proxy_userid, soap->proxy_passwd); - strcpy(soap->tmpbuf, "Basic "); - soap_s2base64(soap, (const unsigned char*)(soap->tmpbuf + 262), soap->tmpbuf + 6, strlen(soap->tmpbuf + 262)); - if ((err = soap->fposthdr(soap, "Proxy-Authorization", soap->tmpbuf))) - return err; - } -#endif -#ifdef WITH_COOKIES -#ifdef WITH_OPENSSL - if (soap_putcookies(soap, host, path, soap->ssl != NULL)) - return soap->error; -#else - if (soap_putcookies(soap, host, path, 0)) - return soap->error; -#endif -#endif - if (soap->version == 1 || (action && *action && strlen(action) < sizeof(soap->tmpbuf) - 2)) - { sprintf(soap->tmpbuf, "\"%s\"", action?action:""); - if ((err = soap->fposthdr(soap, "SOAPAction", soap->tmpbuf))) - return err; - } - return soap->fposthdr(soap, NULL, NULL); -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_NOHTTP -#ifndef PALM_1 -static int -http_send_header(struct soap *soap, const char *s) -{ register const char *t; - do - { t = strchr(s, '\n'); /* disallow \n in HTTP headers */ - if (!t) - t = s + strlen(s); - if (soap_send_raw(soap, s, t - s)) - return soap->error; - s = t + 1; - } while (*t); - return SOAP_OK; -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_NOHTTP -#ifndef PALM_1 -static int -http_post_header(struct soap *soap, const char *key, const char *val) -{ if (key) - { if (http_send_header(soap, key)) - return soap->error; - if (val && (soap_send_raw(soap, ": ", 2) || http_send_header(soap, val))) - return soap->error; - } - return soap_send_raw(soap, "\r\n", 2); -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_NOHTTP -#ifndef PALM_1 -static int -http_response(struct soap *soap, int status, size_t count) -{ register int err; -#ifdef WMW_RPM_IO - if (soap->rpmreqid) - httpOutputEnable(soap->rpmreqid); -#endif - if (strlen(soap->http_version) > 4) - return soap->error = SOAP_EOM; - if (!status || status == SOAP_HTML || status == SOAP_FILE) - { const char *s; - if (count || ((soap->omode & SOAP_IO) == SOAP_IO_CHUNK)) - s = "200 OK"; - else - s = "202 ACCEPTED"; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Status = %s\n", s)); -#ifdef WMW_RPM_IO - if (soap->rpmreqid || soap_valid_socket(soap->master) || soap_valid_socket(soap->socket)) /* RPM behaves as if standalone */ -#else - if (soap_valid_socket(soap->master) || soap_valid_socket(soap->socket)) /* standalone application */ -#endif - { sprintf(soap->tmpbuf, "HTTP/%s %s", soap->http_version, s); - if ((err = soap->fposthdr(soap, soap->tmpbuf, NULL))) - return err; - } - else if ((err = soap->fposthdr(soap, "Status", s))) - return err; - } - else if (status >= 200 && status < 600) - { sprintf(soap->tmpbuf, "HTTP/%s %d %s", soap->http_version, status, http_error(soap, status)); - if ((err = soap->fposthdr(soap, soap->tmpbuf, NULL))) - return err; -#ifndef WITH_LEAN - if (status == 401) - { sprintf(soap->tmpbuf, "Basic realm=\"%s\"", strlen(soap->authrealm) < sizeof(soap->tmpbuf) - 14 ? soap->authrealm : "gSOAP Web Service"); - if ((err = soap->fposthdr(soap, "WWW-Authenticate", soap->tmpbuf))) - return err; - } - else if ((status >= 301 && status <= 303) || status == 307) - { if ((err = soap->fposthdr(soap, "Location", soap->endpoint))) - return err; - } -#endif - } - else - { const char *s = *soap_faultcode(soap); - if (soap->version == 2 && !strcmp(s, "SOAP-ENV:Sender")) - s = "400 Bad Request"; - else - s = "500 Internal Server Error"; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Error %s (status=%d)\n", s, status)); -#ifdef WMW_RPM_IO - if (soap->rpmreqid || soap_valid_socket(soap->master) || soap_valid_socket(soap->socket)) /* RPM behaves as if standalone */ -#else - if (soap_valid_socket(soap->master) || soap_valid_socket(soap->socket)) /* standalone application */ -#endif - { sprintf(soap->tmpbuf, "HTTP/%s %s", soap->http_version, s); - if ((err = soap->fposthdr(soap, soap->tmpbuf, NULL))) - return err; - } - else if ((err = soap->fposthdr(soap, "Status", s))) /* CGI */ - return err; - } - if ((err = soap->fposthdr(soap, "Server", "gSOAP/2.7")) - || (err = soap_puthttphdr(soap, status, count))) - return err; -#ifdef WITH_COOKIES - if (soap_putsetcookies(soap)) - return soap->error; -#endif - return soap->fposthdr(soap, NULL, NULL); -} -#endif -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_response(struct soap *soap, int status) -{ register size_t count; - if (!(soap->omode & (SOAP_ENC_XML | SOAP_IO_STORE /* this tests for chunking too */)) - && (status == SOAP_HTML || status == SOAP_FILE)) - { soap->omode &= ~SOAP_IO; - soap->omode |= SOAP_IO_STORE; - } - soap->status = status; - count = soap_count_attachments(soap); - if (soap_begin_send(soap)) - return soap->error; -#ifndef WITH_NOHTTP - if ((soap->mode & SOAP_IO) != SOAP_IO_STORE && !(soap->mode & SOAP_ENC_XML)) - { register int n = soap->mode; - soap->mode &= ~(SOAP_IO | SOAP_ENC_ZLIB); - if ((n & SOAP_IO) != SOAP_IO_FLUSH) - soap->mode |= SOAP_IO_BUFFER; - if ((soap->error = soap->fresponse(soap, status, count))) - return soap->error; -#ifndef WITH_LEANER - if ((n & SOAP_IO) == SOAP_IO_CHUNK) - { if (soap_flush(soap)) - return soap->error; - } -#endif - soap->mode = n; - } -#endif - return SOAP_OK; -} -#endif - -/******************************************************************************/ -#ifndef WITH_LEAN -static const char* -soap_set_validation_fault(struct soap *soap, const char *s, const char *t) -{ if (*soap->tag) - sprintf(soap->msgbuf, "Validation constraint violation: %s%s in element <%s>", s, t?t:SOAP_STR_EOS, soap->tag); - else - sprintf(soap->msgbuf, "Validation constraint violation: %s%s", s, t?t:SOAP_STR_EOS); - return soap->msgbuf; -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_set_fault(struct soap *soap) -{ const char **c = soap_faultcode(soap); - const char **s = soap_faultstring(soap); - if (soap->fseterror) - soap->fseterror(soap, c, s); - if (!*c) - { if (soap->version == 2) - *c = "SOAP-ENV:Sender"; - else - *c = "SOAP-ENV:Client"; - } - if (*s) - return; - switch (soap->error) - { -#ifndef WITH_LEAN - case SOAP_CLI_FAULT: - *s = "Client fault"; - break; - case SOAP_SVR_FAULT: - *s = "Server fault"; - break; - case SOAP_TAG_MISMATCH: - *s = soap_set_validation_fault(soap, "tag name or namespace mismatch", NULL); - break; - case SOAP_TYPE: - *s = soap_set_validation_fault(soap, "data type mismatch ", soap->type); - break; - case SOAP_SYNTAX_ERROR: - *s = "Well-formedness violation"; - break; - case SOAP_NO_TAG: - *s = "No XML element tag"; - break; - case SOAP_MUSTUNDERSTAND: - *c = "SOAP-ENV:MustUnderstand"; - sprintf(soap->msgbuf, "The data in element '%s' must be understood but cannot be handled", soap->tag); - *s = soap->msgbuf; - break; - case SOAP_VERSIONMISMATCH: - *c = "SOAP-ENV:VersionMismatch"; - *s = "SOAP version mismatch or invalid SOAP message"; - break; - case SOAP_DATAENCODINGUNKNOWN: - *c = "SOAP-ENV:DataEncodingUnknown"; - *s = "Unsupported SOAP data encoding"; - break; - case SOAP_NAMESPACE: - *s = soap_set_validation_fault(soap, "namespace mismatch", NULL); - break; - case SOAP_USER_ERROR: - *s = "User error"; - break; - case SOAP_FATAL_ERROR: - *s = "Fatal error"; - break; - case SOAP_NO_METHOD: - sprintf(soap->msgbuf, "Method '%s' not implemented: method name or namespace not recognized", soap->tag); - *s = soap->msgbuf; - break; - case SOAP_NO_DATA: - *s = "Data required for operation"; - break; - case SOAP_GET_METHOD: - *s = "HTTP GET method not implemented"; - break; - case SOAP_EOM: - *s = "Out of memory"; - break; - case SOAP_MOE: - *s = "Memory overflow or corruption error"; - break; - case SOAP_IOB: - *s = "Array index out of bounds"; - break; - case SOAP_NULL: - *s = soap_set_validation_fault(soap, "nil not allowed", NULL); - break; - case SOAP_DUPLICATE_ID: - *s = soap_set_validation_fault(soap, "multiple definitions of id ", soap->id); - if (soap->version == 2) - *soap_faultsubcode(soap) = "SOAP-ENC:DuplicateID"; - break; - case SOAP_MISSING_ID: - *s = soap_set_validation_fault(soap, "missing id for ref ", soap->id); - if (soap->version == 2) - *soap_faultsubcode(soap) = "SOAP-ENC:MissingID"; - break; - case SOAP_HREF: - *s = soap_set_validation_fault(soap, "incompatible object ref ", soap->id); - break; - case SOAP_FAULT: - break; -#ifndef WITH_NOIO - case SOAP_UDP_ERROR: - *s = "Message too large for UDP packet"; - break; - case SOAP_TCP_ERROR: - *s = tcp_error(soap); - break; -#endif - case SOAP_HTTP_ERROR: - *s = "An HTTP processing error occurred"; - break; - case SOAP_SSL_ERROR: -#ifdef WITH_OPENSSL - *s = "SSL error"; -#else - *s = "OpenSSL not installed: recompile with -DWITH_OPENSSL"; -#endif - break; - case SOAP_PLUGIN_ERROR: - *s = "Plugin registry error"; - break; - case SOAP_DIME_ERROR: - *s = "DIME format error"; - break; - case SOAP_DIME_HREF: - *s = "DIME href to missing attachment"; - break; - case SOAP_DIME_MISMATCH: - *s = "DIME version/transmission error"; - break; - case SOAP_DIME_END: - *s = "End of DIME error"; - break; - case SOAP_MIME_ERROR: - *s = "MIME format error"; - break; - case SOAP_MIME_HREF: - *s = "MIME href to missing attachment"; - break; - case SOAP_MIME_END: - *s = "End of MIME error"; - break; - case SOAP_ZLIB_ERROR: -#ifdef WITH_ZLIB - sprintf(soap->msgbuf, "Zlib/gzip error: '%s'", soap->d_stream.msg?soap->d_stream.msg:""); - *s = soap->msgbuf; -#else - *s = "Zlib/gzip not installed for (de)compression: recompile with -DWITH_GZIP"; -#endif - break; - case SOAP_REQUIRED: - *s = soap_set_validation_fault(soap, "missing required attribute", NULL); - break; - case SOAP_PROHIBITED: - *s = soap_set_validation_fault(soap, "prohibited attribute present", NULL); - break; - case SOAP_OCCURS: - *s = soap_set_validation_fault(soap, "min/maxOccurs violation", NULL); - break; - case SOAP_LENGTH: - *s = soap_set_validation_fault(soap, "content length violation", NULL); - break; - case SOAP_FD_EXCEEDED: - *s = "Maximum number of open connections was reached"; - break; - case SOAP_STOP: - *s = "Stopped: no response sent"; - break; -#endif - case SOAP_EOF: -#ifndef WITH_NOIO - sprintf(soap->msgbuf, "End of file or no input: '%s'", soap_strerror(soap)); - *s = soap->msgbuf; - break; -#else - *s = "End of file or no input"; - break; -#endif - default: -#ifndef WITH_NOHTTP -#ifndef WITH_LEAN - if (soap->error > 200 && soap->error < 600) - { sprintf(soap->msgbuf, "HTTP Error: %d %s", soap->error, http_error(soap, soap->error)); - *s = soap->msgbuf; - } - else -#endif -#endif - { sprintf(soap->msgbuf, "Error %d", soap->error); - *s = soap->msgbuf; - } - } -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_send_fault(struct soap *soap) -{ register int status = soap->error; - int r = 1; - if (status == SOAP_STOP) - return status; - DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Sending back fault struct for error code %d\n", soap->error)); - soap->keep_alive = 0; /* to terminate connection */ - soap_set_fault(soap); -#ifndef WITH_NOIO -#ifndef WITH_LEAN - if (soap_valid_socket(soap->socket)) - { struct timeval timeout; - fd_set rfd, sfd; - timeout.tv_sec = 0; - timeout.tv_usec = 0; - FD_ZERO(&rfd); - FD_ZERO(&sfd); - FD_SET((SOAP_SOCKET)soap->socket, &rfd); - FD_SET((SOAP_SOCKET)soap->socket, &sfd); - r = select((SOAP_SOCKET)(soap->socket + 1), &rfd, &sfd, NULL, &timeout); - if (r > 0) - { if (!FD_ISSET((SOAP_SOCKET)soap->socket, &sfd) - || (FD_ISSET((SOAP_SOCKET)soap->socket, &rfd) - && recv((SOAP_SOCKET)soap->socket, soap->tmpbuf, 1, MSG_PEEK) < 0)) - r = 0; - } - } -#endif -#endif - if ((status != SOAP_EOF || (!soap->recv_timeout && !soap->send_timeout)) && r > 0) - { soap->error = SOAP_OK; - soap_serializeheader(soap); - soap_serializefault(soap); - soap_begin_count(soap); - if (soap->mode & SOAP_IO_LENGTH) - { soap_envelope_begin_out(soap); - soap_putheader(soap); - soap_body_begin_out(soap); - soap_putfault(soap); - soap_body_end_out(soap); - soap_envelope_end_out(soap); - } - soap_end_count(soap); - if (soap_response(soap, status) - || soap_envelope_begin_out(soap) - || soap_putheader(soap) - || soap_body_begin_out(soap) - || soap_putfault(soap) - || soap_body_end_out(soap) - || soap_envelope_end_out(soap)) - return soap_closesock(soap); - soap_end_send(soap); - } - soap->error = status; - return soap_closesock(soap); -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_recv_fault(struct soap *soap) -{ register int status = soap->error; - DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Receiving SOAP Fault\n")); - soap->error = SOAP_OK; - if (soap_getfault(soap)) - { DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Error: soap_get_soapfault() failed. Is this a SOAP message at all?\n")); - *soap_faultcode(soap) = (soap->version == 2 ? "SOAP-ENV:Sender" : "SOAP-ENV:Client"); - soap->error = status; - soap_set_fault(soap); - } - else - { register const char *s = *soap_faultcode(soap); - if (!soap_match_tag(soap, s, "SOAP-ENV:Server") || !soap_match_tag(soap, s, "SOAP-ENV:Receiver")) - status = SOAP_SVR_FAULT; - else if (!soap_match_tag(soap, s, "SOAP-ENV:Client") || !soap_match_tag(soap, s, "SOAP-ENV:Sender")) - status = SOAP_CLI_FAULT; - else if (!soap_match_tag(soap, s, "SOAP-ENV:MustUnderstand")) - status = SOAP_MUSTUNDERSTAND; - else if (!soap_match_tag(soap, s, "SOAP-ENV:VersionMismatch")) - status = SOAP_VERSIONMISMATCH; - else - { DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Fault code %s\n", s)); - status = SOAP_FAULT; - } - if (soap_body_end_in(soap) - || soap_envelope_end_in(soap) - || soap_end_recv(soap)) - return soap_closesock(soap); - soap->error = status; - } - return soap_closesock(soap); -} -#endif - -/******************************************************************************/ -#ifndef WITH_NOHTTP -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_send_empty_response(struct soap *soap, int status) -{ register soap_mode m = soap->omode; - soap->count = 0; - if ((m & SOAP_IO) == SOAP_IO_CHUNK) - { soap->omode &= ~SOAP_IO_CHUNK; - soap->omode |= SOAP_IO_BUFFER; - } - if (soap_response(soap, status) || soap_end_send(soap)) - { soap->omode = m; - return soap_closesock(soap); - } - soap->omode = m; - return SOAP_OK; -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_NOHTTP -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_recv_empty_response(struct soap *soap) -{ if (soap_begin_recv(soap) || soap_end_recv(soap)) - { if (soap->error != 202) - return soap_closesock(soap); - soap->error = SOAP_OK; - } - return SOAP_OK; -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_NOIO -#ifndef PALM_1 -static const char* -soap_strerror(struct soap *soap) -{ register int err = soap->errnum; - if (err) - { -#ifndef WIN32 - return strerror(err); -#else -#ifndef UNDER_CE - DWORD len; - *soap->msgbuf = '\0'; - len = FormatMessageA(FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, NULL, err, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), (LPSTR)soap->msgbuf, (DWORD)sizeof(soap->msgbuf), NULL); -#else - DWORD i, len; - *soap->msgbuf = '\0'; - len = FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, NULL, err, 0, (LPTSTR)soap->msgbuf, (DWORD)(sizeof(soap->msgbuf)/sizeof(TCHAR)), NULL); - for (i = 0; i <= len; i++) - { if (((TCHAR*)soap->msgbuf)[i] < 0x80) - soap->msgbuf[i] = (char)((TCHAR*)soap->msgbuf)[i]; - else - soap->msgbuf[i] = '?'; - } -#endif - return soap->msgbuf; -#endif - } - return "Operation interrupted or timed out"; -} -#endif -#endif - -/******************************************************************************/ -#ifndef PALM_2 -static int -soap_set_error(struct soap *soap, const char *faultcode, const char *faultsubcode, const char *faultstring, const char *faultdetail, int soaperror) -{ *soap_faultcode(soap) = faultcode; - if (faultsubcode) - *soap_faultsubcode(soap) = faultsubcode; - *soap_faultstring(soap) = faultstring; - if (faultdetail && *faultdetail) - { register const char **s = soap_faultdetail(soap); - if (s) - *s = faultdetail; - } - return soap->error = soaperror; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_set_sender_error(struct soap *soap, const char *faultstring, const char *faultdetail, int soaperror) -{ return soap_set_error(soap, soap->version == 2 ? "SOAP-ENV:Sender" : "SOAP-ENV:Client", NULL, faultstring, faultdetail, soaperror); -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_set_receiver_error(struct soap *soap, const char *faultstring, const char *faultdetail, int soaperror) -{ return soap_set_error(soap, soap->version == 2 ? "SOAP-ENV:Receiver" : "SOAP-ENV:Server", NULL, faultstring, faultdetail, soaperror); -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -static int -soap_copy_fault(struct soap *soap, const char *faultcode, const char *faultsubcode, const char *faultstring, const char *faultdetail) -{ char *r = NULL, *s = NULL, *t = NULL; - if (faultsubcode) - r = soap_strdup(soap, faultsubcode); - if (faultstring) - s = soap_strdup(soap, faultstring); - if (faultdetail) - t = soap_strdup(soap, faultdetail); - return soap_set_error(soap, faultcode, r, s, t, SOAP_FAULT); -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_sender_fault(struct soap *soap, const char *faultstring, const char *faultdetail) -{ return soap_sender_fault_subcode(soap, NULL, faultstring, faultdetail); -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_sender_fault_subcode(struct soap *soap, const char *faultsubcode, const char *faultstring, const char *faultdetail) -{ return soap_copy_fault(soap, soap->version == 2 ? "SOAP-ENV:Sender" : "SOAP-ENV:Client", faultsubcode, faultstring, faultdetail); -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_receiver_fault(struct soap *soap, const char *faultstring, const char *faultdetail) -{ return soap_receiver_fault_subcode(soap, NULL, faultstring, faultdetail); -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_receiver_fault_subcode(struct soap *soap, const char *faultsubcode, const char *faultstring, const char *faultdetail) -{ return soap_copy_fault(soap, soap->version == 2 ? "SOAP-ENV:Receiver" : "SOAP-ENV:Server", faultsubcode, faultstring, faultdetail); -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -#ifndef WITH_NOSTDLIB -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_print_fault(struct soap *soap, FILE *fd) -{ if (soap_check_state(soap)) - fprintf(fd, "Error: soap struct not initialized\n"); - else if (soap->error) - { const char *c, *v = NULL, *s, **d; - d = soap_faultcode(soap); - if (!*d) - soap_set_fault(soap); - c = *d; - if (soap->version == 2) - v = *soap_faultsubcode(soap); - s = *soap_faultstring(soap); - d = soap_faultdetail(soap); - fprintf(fd, "%s%d fault: %s [%s]\n\"%s\"\nDetail: %s\n", soap->version ? "SOAP 1." : "Error ", soap->version ? (int)soap->version : soap->error, c, v ? v : "no subcode", s ? s : "[no reason]", d && *d ? *d : "[no detail]"); - } -} -#endif -#endif - -/******************************************************************************/ -#ifndef PALM_1 -#ifndef WITH_NOSTDLIB -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_print_fault_location(struct soap *soap, FILE *fd) -{ -#ifndef WITH_LEAN - int i, j, c1, c2; - if (soap->error && soap->bufidx <= soap->buflen && soap->buflen > 0 && soap->buflen <= SOAP_BUFLEN) - { i = (int)soap->bufidx - 1; - if (i <= 0) - i = 0; - c1 = soap->buf[i]; - soap->buf[i] = '\0'; - if ((int)soap->buflen >= i + 1024) - j = i + 1023; - else - j = (int)soap->buflen - 1; - c2 = soap->buf[j]; - soap->buf[j] = '\0'; - fprintf(fd, "%s%c\n\n", soap->buf, c1); - if (soap->bufidx < soap->buflen) - fprintf(fd, "%s\n", soap->buf + soap->bufidx); - soap->buf[i] = c1; - soap->buf[j] = c2; - } -#endif -} -#endif -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_register_plugin_arg(struct soap *soap, int (*fcreate)(struct soap*, struct soap_plugin*, void*), void *arg) -{ register struct soap_plugin *p; - register int r; - if (!(p = (struct soap_plugin*)SOAP_MALLOC(soap, sizeof(struct soap_plugin)))) - return soap->error = SOAP_EOM; - p->id = NULL; - p->data = NULL; - p->fcopy = NULL; - p->fdelete = NULL; - r = fcreate(soap, p, arg); - if (!r && p->fdelete) - { p->next = soap->plugins; - soap->plugins = p; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Registered '%s' plugin\n", p->id)); - return SOAP_OK; - } - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Could not register plugin '%s': plugin returned error %d (or fdelete callback not set)\n", p->id?p->id:"?", r)); - SOAP_FREE(soap, p); - return r; -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -static void * -fplugin(struct soap *soap, const char *id) -{ register struct soap_plugin *p; - for (p = soap->plugins; p; p = p->next) - if (p->id == id || !strcmp(p->id, id)) - return p->data; - return NULL; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -void * -SOAP_FMAC2 -soap_lookup_plugin(struct soap *soap, const char *id) -{ return soap->fplugin(soap, id); -} -#endif - -/******************************************************************************/ -#ifdef __cplusplus -} -#endif - -/******************************************************************************\ - * - * C++ soap struct methods - * -\******************************************************************************/ - -#ifdef __cplusplus -#ifndef WITH_LEAN -soap::soap() -{ soap_init(this); -} -#endif -#endif - -/******************************************************************************/ -#ifdef __cplusplus -#ifndef WITH_LEAN -soap::soap(soap_mode m) -{ soap_init1(this, m); -} -#endif -#endif - -/******************************************************************************/ -#ifdef __cplusplus -#ifndef WITH_LEAN -soap::soap(soap_mode im, soap_mode om) -{ soap_init2(this, im, om); -} -#endif -#endif - -/******************************************************************************/ -#ifdef __cplusplus -#ifndef WITH_LEAN -soap::soap(struct soap& soap) -{ soap_copy_context(this, &soap); -} -#endif -#endif - -/******************************************************************************/ -#ifdef __cplusplus -#ifndef WITH_LEAN -soap::~soap() -{ soap_destroy(this); - soap_end(this); - soap_done(this); -} -#endif -#endif - -/******************************************************************************/ diff --git a/org.glite.security.gsoap-plugin/src/stdsoap2_2.7.9b.h b/org.glite.security.gsoap-plugin/src/stdsoap2_2.7.9b.h deleted file mode 100644 index 2a8928b..0000000 --- a/org.glite.security.gsoap-plugin/src/stdsoap2_2.7.9b.h +++ /dev/null @@ -1,2166 +0,0 @@ -/* - -stdsoap2.h 2.7.9b - -gSOAP runtime - -gSOAP XML Web services tools -Copyright (C) 2000-2007, Robert van Engelen, Genivia Inc., All Rights Reserved. -This part of the software is released under one of the following licenses: -GPL, the gSOAP public license, or Genivia's license for commercial use. --------------------------------------------------------------------------------- -Contributors: - -Wind River Systems, Inc., for the following additions (marked WR[...]): - - vxWorks compatible --------------------------------------------------------------------------------- -gSOAP public license. - -The contents of this file are subject to the gSOAP Public License Version 1.3 -(the "License"); you may not use this file except in compliance with the -License. You may obtain a copy of the License at -http://www.cs.fsu.edu/~engelen/soaplicense.html -Software distributed under the License is distributed on an "AS IS" basis, -WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License -for the specific language governing rights and limitations under the License. - -The Initial Developer of the Original Code is Robert A. van Engelen. -Copyright (C) 2000-2007, Robert van Engelen, Genivia Inc., All Rights Reserved. --------------------------------------------------------------------------------- -GPL license. - -This program is free software; you can redistribute it and/or modify it under -the terms of the GNU General Public License as published by the Free Software -Foundation; either version 2 of the License, or (at your option) any later -version. - -This program is distributed in the hope that it will be useful, but WITHOUT ANY -WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A -PARTICULAR PURPOSE. See the GNU General Public License for more details. - -You should have received a copy of the GNU General Public License along with -this program; if not, write to the Free Software Foundation, Inc., 59 Temple -Place, Suite 330, Boston, MA 02111-1307 USA - -Author contact information: -engelen@genivia.com / engelen@acm.org --------------------------------------------------------------------------------- -A commercial use license is available from Genivia, Inc., contact@genivia.com --------------------------------------------------------------------------------- -*/ - -#ifdef WITH_SOAPDEFS_H -# include "soapdefs.h" /* include user-defined stuff */ -#endif - -#ifndef _THREAD_SAFE -# define _THREAD_SAFE -#endif - -#ifndef OPENSERVER -# ifndef _REENTRANT -# define _REENTRANT -# endif -#endif - -#ifndef SOAP_FMAC1 /* stdsoap2.h declaration macro */ -# define SOAP_FMAC1 -#endif - -#ifndef SOAP_FMAC2 /* stdsoap2.h declaration macro */ -# define SOAP_FMAC2 -#endif - -#ifndef SOAP_FMAC3 /* (de)serializer declaration macro */ -# define SOAP_FMAC3 -#endif - -#ifndef SOAP_FMAC3S /* string converter for (de)serializer declaration macro */ -# define SOAP_FMAC3S SOAP_FMAC3 -#endif - -#ifndef SOAP_FMAC4 /* (de)serializer declaration macro */ -# define SOAP_FMAC4 -#endif - -#ifndef SOAP_FMAC4S /* string converter for (de)serializer declaration macro */ -# define SOAP_FMAC4S SOAP_FMAC4 -#endif - -#ifndef SOAP_FMAC5 /* stub/skeleton declaration macro */ -# define SOAP_FMAC5 -#endif - -#ifndef SOAP_FMAC6 /* stub/skeleton declaration macro */ -# define SOAP_FMAC6 -#endif - -#ifndef SOAP_CMAC /* class declaration macro */ -# define SOAP_CMAC -#endif - -#ifndef SOAP_NMAC /* namespace table declaration macro */ -# define SOAP_NMAC -#endif - -#ifndef SOAP_SOURCE_STAMP -# define SOAP_SOURCE_STAMP(str) -#endif - -/* gSOAP 2.7.4 and higher: fast look-aside buffering is stable */ -#ifndef WITH_FAST -# define WITH_FAST -#endif - -#ifdef WITH_LEANER -# ifndef WITH_LEAN -# define WITH_LEAN -# endif -#endif - -#ifdef WITH_LEAN -# ifdef WITH_COOKIES -# error "Cannot build WITH_LEAN code WITH_COOKIES enabled" -# endif -#endif - -#ifndef STDSOAP_H -#define STDSOAP_H - -#if defined(__vxworks) || defined(__VXWORKS__) -# define VXWORKS -#endif - -#ifdef _WIN32 -# ifndef WIN32 -# define WIN32 -# endif -#endif - -#ifdef _WIN32_WCE -# ifndef UNDER_CE -# define UNDER_CE _WIN32_WCE -# endif -#endif - -#ifdef UNDER_CE -# ifndef WIN32 -# define WIN32 -# endif -#endif - -#ifdef __BORLANDC__ -# ifdef __WIN32__ -# ifndef WIN32 -# define WIN32 -# endif -# endif -#endif - -#ifdef __CYGWIN__ -# ifndef CYGWIN -# define CYGWIN -# endif -#endif - -#ifdef __SYMBIAN32__ -# define SYMBIAN -# undef WIN32 -#endif - -#if defined(__palmos__) || defined(PALM_GCC) || defined(__PALMOS_TRAPS__) -# ifndef PALM -# define PALM -# endif -#endif - -#if defined(__hpux) -# ifndef HP_UX -# define HP_UX -# endif -#endif - -#if defined(__alpha) && !defined(__VMS) -# ifndef TRU64 -# define TRU64 -# endif -#endif - -#ifdef __MVS__ -# ifndef OS390 -# define OS390 -# endif -#endif - -#ifdef HAVE_CONFIG_H -# include "config.h" -# ifdef WITH_OPENSSL -# ifndef HAVE_OPENSSL_SSL_H -# undef WITH_OPENSSL -# endif -# endif -#else -# if defined(UNDER_CE) -# define WITH_LEAN -# define HAVE_SSCANF -# elif defined(WIN32) -# define HAVE_STRRCHR -# define HAVE_STRTOD -# define HAVE_SSCANF -# define HAVE_STRTOL -# define HAVE_STRTOUL -# define HAVE_SYS_TIMEB_H -# define HAVE_FTIME -# define HAVE_WCTOMB -# define HAVE_MBTOWC -# define SOAP_LONG_FORMAT "%I64d" -# define SOAP_ULONG_FORMAT "%I64u" -# elif defined(CYGWIN) -# define HAVE_STRRCHR -# define HAVE_STRTOD -# define HAVE_SSCANF -# define HAVE_STRTOL -# define HAVE_STRTOUL -# define HAVE_SYS_TIMEB_H -# define HAVE_FTIME -# define HAVE_RAND_R -# define HAVE_GMTIME_R -# define HAVE_LOCALTIME_R -# define HAVE_WCTOMB -# define HAVE_MBTOWC -# elif defined(__APPLE__) -# define HAVE_STRRCHR -# define HAVE_STRTOD -# define HAVE_SSCANF -# define HAVE_STRTOL -# define HAVE_STRTOUL -# define HAVE_RAND_R -# define HAVE_GMTIME_R -# define HAVE_LOCALTIME_R -# define HAVE_TIMEGM -# define HAVE_WCTOMB -# define HAVE_MBTOWC -# elif defined(_AIXVERSION_431) -# define HAVE_STRRCHR -# define HAVE_STRTOD -# define HAVE_SSCANF -# define HAVE_STRTOL -# define HAVE_STRTOUL -# define HAVE_SYS_TIMEB_H -# define HAVE_FTIME -# define HAVE_RAND_R -# define HAVE_GMTIME_R -# define HAVE_LOCALTIME_R -# define HAVE_WCTOMB -# define HAVE_MBTOWC -# elif defined(HP_UX) -# define HAVE_STRRCHR -# define HAVE_STRTOD -# define HAVE_SSCANF -# define HAVE_STRTOL -# define HAVE_STRTOUL -# define HAVE_SYS_TIMEB_H -# define HAVE_FTIME -# define HAVE_RAND_R -# define HAVE_GMTIME_R -# define HAVE_LOCALTIME_R -# define HAVE_WCTOMB -# define HAVE_MBTOWC -# elif defined(FREEBSD) || defined(__FreeBSD__) -# define HAVE_STRRCHR -# define HAVE_STRTOD -# define HAVE_SSCANF -# define HAVE_STRTOL -# define HAVE_STRTOUL -# define HAVE_STRTOLL -# define HAVE_STRTOULL -# define HAVE_GETTIMEOFDAY -# define HAVE_RAND_R -# define HAVE_GMTIME_R -# define HAVE_LOCALTIME_R -# define HAVE_WCTOMB -# define HAVE_MBTOWC -# define SOAP_LONG_FORMAT "%qd" -# define SOAP_ULONG_FORMAT "%qu" -# elif defined(__VMS) -# define HAVE_STRRCHR -# define HAVE_STRTOD -# define HAVE_SSCANF -# define HAVE_STRTOL -# define HAVE_STRTOUL -# define HAVE_SYS_TIMEB_H -# define HAVE_FTIME -# define HAVE_RAND_R -# define HAVE_GMTIME_R -# define HAVE_LOCALTIME_R -# define HAVE_WCTOMB -# define HAVE_MBTOWC -# elif defined(__GLIBC__) || defined(__GNU__) -# define HAVE_STRRCHR -# define HAVE_STRTOD -# define HAVE_SSCANF -# define HAVE_STRTOL -# define HAVE_STRTOUL -# define HAVE_STRTOLL -# define HAVE_STRTOULL -# define HAVE_SYS_TIMEB_H -# define HAVE_FTIME -# define HAVE_RAND_R -# define HAVE_GMTIME_R -# define HAVE_LOCALTIME_R -# define HAVE_TIMEGM -# define HAVE_WCTOMB -# define HAVE_MBTOWC -# define HAVE_ISNAN -# elif defined(TRU64) -# define HAVE_STRRCHR -# define HAVE_STRTOD -# define HAVE_SSCANF -# define HAVE_STRTOL -# define HAVE_STRTOUL -# define HAVE_GETTIMEOFDAY -# define HAVE_SYS_TIMEB_H -# define HAVE_RAND_R -# define HAVE_GMTIME_R -# define HAVE_LOCALTIME_R -# define __USE_STD_IOSTREAM -# define HAVE_WCTOMB -# define HAVE_MBTOWC -# define SOAP_LONG_FORMAT "%ld" -# define SOAP_ULONG_FORMAT "%lu" -# elif defined(MAC_CARBON) -# define WITH_NOIO -# define HAVE_STRRCHR -# define HAVE_STRTOD -# define HAVE_SSCANF -# define HAVE_STRTOL -# define HAVE_STRTOUL -# define HAVE_FTIME -# define HAVE_RAND_R -# define HAVE_GETHOSTBYNAME_R -# define HAVE_GMTIME_R -# define HAVE_LOCALTIME_R -# define HAVE_WCTOMB -# define HAVE_MBTOWC -# elif defined(PALM) -# define WITH_LEAN -# define HAVE_STRTOD /* strtod() is defined in palmFunctions.h */ -# include /* Needs to be included before unix headers */ -# include -# define IGNORE_STDIO_STUBS -# include -# define O_NONBLOCK FNONBIO -# include -# include "palmFunctions.h" -# elif defined(SYMBIAN) -# define WITH_LEAN -# define WITH_NONAMESPACES -# define HAVE_STRTOD /* use STRTOD since sscanf doesn't seem to work */ -# include -# include -# elif defined(VXWORKS) -# define HAVE_STRRCHR -# define HAVE_STRTOD -# define HAVE_SSCANF -# define HAVE_STRTOL -# define HAVE_STRTOUL -# define HAVE_PGMTIME_R -# define HAVE_PLOCALTIME_R -# define HAVE_MKTIME -# elif defined(OS390) -# define HAVE_STRRCHR -# define HAVE_STRTOD -# define HAVE_SSCANF -# define HAVE_STRTOL -# define HAVE_STRTOUL -# define HAVE_SYS_TIMEB_H -# define HAVE_FTIME -# define HAVE_RAND_R -# define HAVE_GMTIME_R -# define HAVE_LOCALTIME_R -# define HAVE_WCTOMB -# define HAVE_MBTOWC -# elif defined(AS400) -# define HAVE_STRRCHR -# define HAVE_STRTOD -# define HAVE_SSCANF -# define HAVE_STRTOL -# define HAVE_STRTOUL -# define HAVE_SYS_TIMEB_H -# define HAVE_FTIME -# define HAVE_RAND_R -# define HAVE_GMTIME_R -# define HAVE_LOCALTIME_R -# define HAVE_WCTOMB -# define HAVE_MBTOWC -# elif defined(__QNX__) || defined(QNX) -/* QNX does not have a working version of strtof */ -# undef HAVE_STRTOF -# define HAVE_STRRCHR -# define HAVE_STRTOD -# define HAVE_SSCANF -# define HAVE_STRTOL -# define HAVE_STRTOUL -# define HAVE_SYS_TIMEB_H -# define HAVE_FTIME -# define HAVE_RAND_R -# define HAVE_GETHOSTBYNAME_R -# define HAVE_GMTIME_R -# define HAVE_LOCALTIME_R -# define HAVE_WCTOMB -# define HAVE_MBTOWC -# define LONG64 long -# define ULONG64 unsigned LONG64 -# define SOAP_LONG_FORMAT "%ld" -# define SOAP_ULONG_FORMAT "%lu" -# else -/* Default asumptions on supported functions */ -# define HAVE_STRRCHR -# define HAVE_STRTOD -# define HAVE_SSCANF -# define HAVE_STRTOL -# define HAVE_STRTOUL -# define HAVE_SYS_TIMEB_H -# define HAVE_FTIME -# define HAVE_RAND_R -# define HAVE_GETHOSTBYNAME_R -# define HAVE_GMTIME_R -# define HAVE_LOCALTIME_R -# define HAVE_WCTOMB -# define HAVE_MBTOWC -# endif -#endif - -#ifndef SOAP_LONG_FORMAT -# define SOAP_LONG_FORMAT "%lld" /* printf format for 64 bit ints */ -#endif - -#ifndef SOAP_ULONG_FORMAT -# define SOAP_ULONG_FORMAT "%llu" /* printf format for unsigned 64 bit ints */ -#endif - -#ifndef WITH_NOSTDLIB -# include -# ifndef PALM -# include -# include -# endif -# include -# include -#endif - -#if defined(__cplusplus) && !defined(WITH_LEAN) -# include -# include -#endif - -#ifdef WITH_NOHTTP -# ifndef WITH_NOIO -# define WITH_NOIO -# undef WITH_COOKIES -# endif -#endif - -#ifndef UNDER_CE -# ifndef PALM -# ifndef WITH_NOIO -# include -# include -# endif -# ifndef WITH_LEAN -# ifdef HAVE_SYS_TIMEB_H -# include /* for ftime() */ -# endif -# include -# endif -# endif -#endif - -#ifdef OPENSERVER -# include -# include -# include - extern int h_errno; -#endif - -#ifndef WITH_NOIO -# ifndef WIN32 -# ifndef PALM -# include -# ifdef VXWORKS -# include -# include -# endif -# ifndef VXWORKS -# ifndef SYMBIAN -# include -# endif -# endif -# ifdef SUN_OS -# include /* SUN */ -# include /* SUN < 2.8 (?) */ -# endif -# ifdef VXWORKS -# ifdef _WRS_KERNEL -# include -# endif -# else -# include -# endif -# include -# ifdef OS390 -# include -# else -# include /* TCP_NODELAY */ -# endif -# include -# endif -# endif -#endif - -#ifdef WITH_FASTCGI -# include -#endif - -#ifdef WITH_OPENSSL -# define OPENSSL_NO_KRB5 -# include -# include -# include -# include -# include -# ifndef ALLOW_OLD_VERSIONS -# if (OPENSSL_VERSION_NUMBER < 0x00905100L) -# error "Must use OpenSSL 0.9.6 or later" -# endif -# endif -#endif - -#ifdef WITH_GZIP -# ifndef WITH_ZLIB -# define WITH_ZLIB -# endif -#endif - -#ifdef WITH_CASEINSENSITIVETAGS -# define SOAP_STRCMP soap_tag_cmp /* case insensitve XML element/attribute names */ -#else -# define SOAP_STRCMP strcmp /* case sensitive XML element/attribute names */ -#endif - -#ifdef WITH_ZLIB -# include -#endif - -#ifndef WITH_NOSTDLIB -# ifndef PALM -# include /* for isnan() */ -# endif -#endif - -/* #define DEBUG */ /* Uncomment to debug sending (in file SENT.log) receiving (in file RECV.log) and messages (in file TEST.log) */ - -#ifdef __cplusplus -extern "C" { -#endif - -#ifdef WIN32 -# ifndef UNDER_CE -# include -# include -# endif -# include -/* # include */ /* Alternative: use winsock2 (not available with eVC) */ -# ifdef WITH_IPV6 -# include -# include -# endif -#else -# ifdef VXWORKS -# include -# include -# include -# endif -# ifndef WITH_NOIO -# ifndef PALM -# include -# include -# include -# include -# endif -# endif -#endif - -/* Portability: define SOAP_SOCKLEN_T */ -#if defined(_AIX) -# define SOAP_SOCKLEN_T socklen_t -#elif defined(SOCKLEN_T) -# define SOAP_SOCKLEN_T SOCKLEN_T -#elif defined(__socklen_t_defined) || defined(_SOCKLEN_T) || defined(CYGWIN) || defined(FREEBSD) || defined(__FreeBSD__) || defined(__QNX__) || defined(QNX) -# define SOAP_SOCKLEN_T socklen_t -#elif defined(IRIX) || defined(WIN32) || defined(__APPLE__) || defined(HP_UX) || defined(SUN_OS) || defined(OPENSERVER) || defined(TRU64) || defined(VXWORKS) -# define SOAP_SOCKLEN_T int -#else -# define SOAP_SOCKLEN_T size_t -#endif - -#ifndef SOAP_SOCKET -# ifdef WIN32 -# define SOAP_SOCKET SOCKET -# define soap_closesocket(n) closesocket(n) -# else -# define SOAP_SOCKET int -# define soap_closesocket(n) close(n) -# endif -#endif - -#define SOAP_INVALID_SOCKET (-1) -#define soap_valid_socket(n) ((n) != SOAP_INVALID_SOCKET) - -#ifndef FD_SETSIZE -# define FD_SETSIZE (1024) -#endif - -#if defined(SYMBIAN) -# define LONG64 long -# define ULONG64 unsigned LONG64 -#elif !defined(WIN32) || defined(CYGWIN) || defined(__GLIBC__) || defined(__GNU__) -# ifndef LONG64 -# define LONG64 long long -# define ULONG64 unsigned LONG64 -# endif -#elif defined(UNDER_CE) -# define LONG64 __int64 -# define ULONG64 unsigned LONG64 -#elif defined(__BORLANDC__) -# define LONG64 __int64 -# define ULONG64 unsigned LONG64 -#endif - -#if defined(WIN32) && !defined(CYGWIN) -# define soap_int32 __int32 -#elif defined(SYMBIAN) -# define soap_int32 long -#elif defined(PALM) -# define soap_int32 Int32 -#else -# define soap_int32 int32_t -#endif - -#ifdef WIN32 -# define SOAP_ERANGE ERANGE -# define SOAP_EINTR WSAEINTR -# define SOAP_EAGAIN WSAEWOULDBLOCK -# define SOAP_EWOULDBLOCK WSAEWOULDBLOCK -# define SOAP_EINPROGRESS WSAEINPROGRESS -#else -# define SOAP_ERANGE ERANGE -# define SOAP_EINTR EINTR -# define SOAP_EAGAIN EAGAIN -# ifdef SYMBIAN -# define SOAP_EWOULDBLOCK 9898 -# define SOAP_EINPROGRESS 9899 -# else -# define SOAP_EWOULDBLOCK EWOULDBLOCK -# define SOAP_EINPROGRESS EINPROGRESS -# endif -#endif - -#ifdef WIN32 -# ifdef UNDER_CE -# define soap_errno GetLastError() -# define soap_socket_errno(s) GetLastError() -# define soap_reset_errno SetLastError(0) -# else -# define soap_errno GetLastError() -# define soap_socket_errno(s) WSAGetLastError() -# define soap_reset_errno SetLastError(0) -# endif -#else -# ifndef WITH_NOIO -# define soap_errno errno -# define soap_socket_errno(s) errno -# define soap_reset_errno (errno = 0) -# else -# define soap_errno 0 -# define soap_socket_errno(s) 0 -# define soap_reset_errno -# endif -#endif - -#ifndef SOAP_BUFLEN -# ifdef WITH_UDP -# define SOAP_BUFLEN (65536) /* max UDP packet size */ -# else -# ifndef WITH_LEAN -# define SOAP_BUFLEN (65536) /* buffer length for socket packets, also used by gethostbyname_r so don't make this too small */ -# else -# define SOAP_BUFLEN (2048) -# endif -# endif -#endif -#ifndef SOAP_LABLEN -# define SOAP_LABLEN (256) /* initial look-aside buffer length */ -#endif -#ifndef SOAP_PTRBLK -# define SOAP_PTRBLK (32) /* block allocation for pointer hash table chains */ -#endif -#ifndef SOAP_PTRHASH -# ifndef WITH_LEAN -# define SOAP_PTRHASH (1024) /* size of pointer analysis hash table (must be power of 2) */ -# else -# define SOAP_PTRHASH (32) -# endif -#endif -#ifndef SOAP_IDHASH -# ifndef WITH_LEAN -# define SOAP_IDHASH (1999) /* prime size of hash table for parsed id/ref */ -# else -# define SOAP_IDHASH (19) /* 19, 199 */ -# endif -#endif -#ifndef SOAP_BLKLEN -# ifndef WITH_LEAN -# define SOAP_BLKLEN (256) /* size of blocks to collect long strings and XML attributes */ -# else -# define SOAP_BLKLEN (32) -# endif -#endif -#ifndef SOAP_TAGLEN -# ifndef WITH_LEAN -# define SOAP_TAGLEN (1024) /* maximum length of XML element tag/attribute name or host/path name + 1 */ -# else -# define SOAP_TAGLEN (64) -# endif -#endif -#ifndef SOAP_HDRLEN -# ifndef WITH_LEAN -# define SOAP_HDRLEN (8192) /* maximum length of HTTP header line (must be >4096 to read cookies) */ -# else -# define SOAP_HDRLEN (1024) -# endif -#endif -#ifndef SOAP_MAXDIMS -# ifndef WITH_LEAN -# define SOAP_MAXDIMS (16) /* maximum array dimensions (array nestings) must be less than 64 to protect soap->tmpbuf */ -# else -# define SOAP_MAXDIMS (4) -# endif -#endif - -#ifndef SOAP_MAXLOGS -# define SOAP_MAXLOGS (3) /* max number of debug logs per struct soap environment */ -# define SOAP_INDEX_RECV (0) -# define SOAP_INDEX_SENT (1) -# define SOAP_INDEX_TEST (2) -#endif - -#ifndef SOAP_MAXKEEPALIVE -# define SOAP_MAXKEEPALIVE (100) /* max iterations to keep server connection alive */ -#endif - -#ifndef SOAP_MAXARRAYSIZE -# define SOAP_MAXARRAYSIZE (100000) /* "trusted" max size of inbound SOAP array for compound array allocation */ -#endif - -#ifdef VXWORKS -# ifdef __INCmathh -# include -# ifndef HAVE_ISNAN -# define HAVE_ISNAN -# endif -# define soap_isnan(num) isNan(num) -# endif -#endif - -#ifdef WIN32 -# include -# ifndef HAVE_ISNAN -# define HAVE_ISNAN -# endif -# define soap_isnan(num) _isnan(num) -#endif - -#ifdef SUN_OS -# define HAVE_ISNAN -#endif - -#ifdef __APPLE__ -# ifdef __cplusplus -# ifndef isnan -extern "C" int isnan(double); -# endif -# endif -# define HAVE_ISNAN -#endif - -#if !defined(HAVE_ISNAN) && (defined(_MATH_H) || defined(_MATH_INCLUDED)) -# define HAVE_ISNAN -#endif - -extern const struct soap_double_nan { unsigned int n1, n2; } soap_double_nan; - -#ifdef VXWORKS -# ifndef FLT_MAX -# define FLT_MAX _ARCH_FLT_MAX -# endif -# ifndef DBL_MAX -# define DBL_MAX _ARCH_DBL_MAX -# endif -#endif - -#ifndef FLT_NAN -# define FLT_NAN (*(float*)(void*)&soap_double_nan) -#endif - -#ifndef FLT_PINFTY -# if defined(FLT_MAX) -# define FLT_PINFTY FLT_MAX -# elif defined(HUGE_VALF) -# define FLT_PINFTY (float)HUGE_VALF -# elif defined(HUGE_VAL) -# define FLT_PINFTY (float)HUGE_VAL -# elif defined(FLOAT_MAX) -# define FLT_PINFTY FLOAT_MAX -# else -# define FLT_PINFTY (3.40282347e+38F) -# endif -#endif - -#ifndef FLT_NINFTY -# define FLT_NINFTY (-FLT_PINFTY) -#endif - -#ifndef DBL_NAN -# define DBL_NAN (*(double*)(void*)&soap_double_nan) -#endif - -#ifndef DBL_PINFTY -# if defined(DBL_MAX) -# define DBL_PINFTY DBL_MAX -# elif defined(HUGE_VALF) -# define DBL_PINFTY (double)HUGE_VALF -# elif defined(HUGE_VAL) -# define DBL_PINFTY (double)HUGE_VAL -# elif defined(DOUBLE_MAX) -# define DBL_PINFTY DOUBLE_MAX -# else -# define DBL_PINFTY (1.7976931348623157e+308) -# endif -#endif - -#ifndef DBL_NINFTY -# define DBL_NINFTY (-DBL_PINFTY) -#endif - -#ifndef soap_isnan -# ifdef HAVE_ISNAN -# define soap_isnan(n) isnan(n) -# else -# define soap_isnan(n) (0) -# endif -#endif - -#define soap_ispinfd(n) ((n) >= DBL_PINFTY) -#define soap_ispinff(n) ((n) >= FLT_PINFTY) -#define soap_isninfd(n) ((n) <= DBL_NINFTY) -#define soap_isninff(n) ((n) <= FLT_NINFTY) - -/* gSOAP error codes */ - -#define SOAP_EOF EOF -#define SOAP_ERR EOF -#define SOAP_OK 0 -#define SOAP_CLI_FAULT 1 -#define SOAP_SVR_FAULT 2 -#define SOAP_TAG_MISMATCH 3 -#define SOAP_TYPE 4 -#define SOAP_SYNTAX_ERROR 5 -#define SOAP_NO_TAG 6 -#define SOAP_IOB 7 -#define SOAP_MUSTUNDERSTAND 8 -#define SOAP_NAMESPACE 9 -#define SOAP_USER_ERROR 10 -#define SOAP_FATAL_ERROR 11 -#define SOAP_FAULT 12 -#define SOAP_NO_METHOD 13 -#define SOAP_NO_DATA 14 -#define SOAP_GET_METHOD 15 -#define SOAP_EOM 16 -#define SOAP_MOE 17 -#define SOAP_NULL 18 -#define SOAP_DUPLICATE_ID 19 -#define SOAP_MISSING_ID 20 -#define SOAP_HREF 21 -#define SOAP_UDP_ERROR 22 -#define SOAP_TCP_ERROR 23 -#define SOAP_HTTP_ERROR 24 -#define SOAP_SSL_ERROR 25 -#define SOAP_ZLIB_ERROR 26 -#define SOAP_DIME_ERROR 27 -#define SOAP_DIME_HREF 28 -#define SOAP_DIME_MISMATCH 29 -#define SOAP_DIME_END 30 -#define SOAP_MIME_ERROR 31 -#define SOAP_MIME_HREF 32 -#define SOAP_MIME_END 33 -#define SOAP_VERSIONMISMATCH 34 -#define SOAP_PLUGIN_ERROR 35 -#define SOAP_DATAENCODINGUNKNOWN 36 -#define SOAP_REQUIRED 37 -#define SOAP_PROHIBITED 38 -#define SOAP_OCCURS 39 -#define SOAP_LENGTH 40 -#define SOAP_FD_EXCEEDED 41 - -#define soap_xml_error_check(e) ((e) == SOAP_TAG_MISMATCH || (e) == SOAP_TAG_END || (e) == SOAP_SYNTAX_ERROR || (e) == SOAP_NAMESPACE || (e) == SOAP_DUPLICATE_ID || (e) == SOAP_MISSING_ID || (e) == SOAP_REQUIRED || (e) == SOAP_PROHIBITED || (e) == SOAP_OCCURS || (e) == SOAP_LENGTH || (e) == SOAP_NULL || (e) == SOAP_HREF) -#define soap_soap_error_check(e) ((e) == SOAP_CLI_FAULT || (e) == SOAP_SVR_FAULT || (e) == SOAP_VERSIONMISMATCH || (e) == SOAP_MUSTUNDERSTAND || (e) == SOAP_FAULT || (e) == SOAP_NO_METHOD) -#define soap_tcp_error_check(e) ((e) == SOAP_EOF || (e) == SOAP_TCP_ERROR) -#define soap_ssl_error_check(e) ((e) == SOAP_SSL_ERROR) -#define soap_zlib_error_check(e) ((e) == SOAP_ZLIB_ERROR) -#define soap_http_error_check(e) ((e) == SOAP_HTTP_ERROR || (e) == SOAP_GET_METHOD || (e) == SOAP_NO_DATA || ((e) >= 100 && (e) < 600)) - -/* gSOAP HTTP response status codes 100 to 599 are reserved */ - -/* Codes 600 to 999 are user definable */ - -/* Exceptional gSOAP HTTP response status codes >= 1000 */ - -#define SOAP_STOP 1000 /* No HTTP response */ -#define SOAP_FORM 1001 /* Form request/response */ -#define SOAP_HTML 1002 /* Custom HTML response */ -#define SOAP_FILE 1003 /* Custom file-based response */ - -/* gSOAP HTTP method codes */ - -#define SOAP_POST 2000 -#define SOAP_GET 2001 - -/* gSOAP DIME */ - -#define SOAP_DIME_CF 0x01 -#define SOAP_DIME_ME 0x02 -#define SOAP_DIME_MB 0x04 -#define SOAP_DIME_VERSION 0x08 /* DIME version 1 */ -#define SOAP_DIME_MEDIA 0x10 -#define SOAP_DIME_ABSURI 0x20 - -/* gSOAP ZLIB */ - -#define SOAP_ZLIB_NONE 0x00 -#define SOAP_ZLIB_DEFLATE 0x01 -#define SOAP_ZLIB_INFLATE 0x02 -#define SOAP_ZLIB_GZIP 0x02 - -/* gSOAP transport, connection, and content encoding modes */ - -typedef soap_int32 soap_mode; - -#define SOAP_IO 0x00000003 /* IO mask */ -#define SOAP_IO_FLUSH 0x00000000 /* flush output immediately, no buffering */ -#define SOAP_IO_BUFFER 0x00000001 /* buffer output in packets of size SOAP_BUFLEN */ -#define SOAP_IO_STORE 0x00000002 /* store entire output to determine length for transport */ -#define SOAP_IO_CHUNK 0x00000003 /* use HTTP chunked transfer AND buffer packets */ - -#define SOAP_IO_UDP 0x00000004 /* TCP or UDP */ - -#define SOAP_IO_LENGTH 0x00000008 /* calc message length (internal) */ -#define SOAP_IO_KEEPALIVE 0x00000010 /* keep connection alive */ - -#define SOAP_ENC_LATIN 0x00000020 /* accept iso-8859-1 encoding */ -#define SOAP_ENC_XML 0x00000040 /* plain XML encoding, no HTTP header */ -#define SOAP_ENC_DIME 0x00000080 -#define SOAP_ENC_MIME 0x00000100 -#define SOAP_ENC_MTOM 0x00000200 -#define SOAP_ENC_ZLIB 0x00000400 -#define SOAP_ENC_SSL 0x00000800 - -#define SOAP_ENC 0x00000FFF /* IO and ENC mask */ - -#define SOAP_XML_STRICT 0x00001000 /* apply strict validation */ -#define SOAP_XML_INDENT 0x00002000 /* emit indented XML */ -#define SOAP_XML_CANONICAL 0x00004000 /* EXC C14N canonical XML */ -#define SOAP_XML_TREE 0x00008000 /* emit XML tree (no id/ref) */ -#define SOAP_XML_GRAPH 0x00010000 -#define SOAP_XML_NIL 0x00020000 -#define SOAP_XML_DOM 0x00040000 -#define SOAP_XML_SEC 0x00080000 /* reserved for WS security */ - -#define SOAP_C_NOIOB 0x00100000 /* don't fault on array index out of bounds (just ignore) */ -#define SOAP_C_UTFSTRING 0x00200000 /* (de)serialize strings with UTF8 content */ -#define SOAP_C_MBSTRING 0x00400000 /* (de)serialize strings with multi-byte content */ -#define SOAP_C_NILSTRING 0x00800000 /* serialize empty strings as nil (omitted) */ - -#define SOAP_DOM_TREE 0x01000000 -#define SOAP_DOM_NODE 0x02000000 -#define SOAP_DOM_ASIS 0x04000000 - -#define SOAP_MIME_POSTCHECK 0x10000000 /* MIME flag (internal) */ - -#define SOAP_IO_DEFAULT SOAP_IO_FLUSH - -/* SSL client/server authentication settings */ - -#define SOAP_SSL_NO_AUTHENTICATION 0x00 /* for testing purposes */ -#define SOAP_SSL_REQUIRE_SERVER_AUTHENTICATION 0x01 /* client requires server to authenticate */ -#define SOAP_SSL_REQUIRE_CLIENT_AUTHENTICATION 0x02 /* server requires client to authenticate */ -#define SOAP_SSL_SKIP_HOST_CHECK 0x04 /* client does not check the common name of the host in certificate */ -#define SOAP_SSL_RSA 0x06 /* use RSA */ -#define SOAP_SSLv3_TLSv1 0x00 /* SSL v3 and TLS v1 support by default */ -#define SOAP_SSLv3 0x10 /* SSL v3 only */ -#define SOAP_TLSv1 0x20 /* TLS v1 only */ - -#define SOAP_SSL_DEFAULT (SOAP_SSL_REQUIRE_SERVER_AUTHENTICATION | SOAP_SSLv3_TLSv1) - -/* state */ - -#define SOAP_INIT 1 -#define SOAP_COPY 2 - -#define soap_check_state(soap) (!(soap) || ((soap)->state != SOAP_INIT && (soap)->state != SOAP_COPY)) - -/* part */ - -#define SOAP_BEGIN 0 -#define SOAP_IN_ENVELOPE 2 -#define SOAP_IN_HEADER 3 -#define SOAP_END_HEADER 4 -#define SOAP_NO_BODY 5 -#define SOAP_IN_BODY 6 -#define SOAP_END_BODY 7 -#define SOAP_END_ENVELOPE 8 -#define SOAP_END 9 -#define SOAP_BEGIN_SECURITY 10 -#define SOAP_IN_SECURITY 11 -#define SOAP_END_SECURITY 12 - -/* DEBUG macros */ - -#ifndef WITH_LEAN -# ifdef DEBUG -# ifndef SOAP_DEBUG -# define SOAP_DEBUG -# endif -# ifndef SOAP_MEM_DEBUG -# define SOAP_MEM_DEBUG -# endif -# endif -#endif - -#ifdef SOAP_MEM_DEBUG -# ifndef SOAP_MALLOC -# define SOAP_MALLOC(soap, size) soap_track_malloc(soap, __FILE__, __LINE__, size) -# endif -# ifndef SOAP_FREE -# define SOAP_FREE(soap, ptr) soap_track_free(soap, __FILE__, __LINE__, ptr) -# endif -#endif - -#ifndef SOAP_MALLOC /* use libc malloc */ -# define SOAP_MALLOC(soap, size) malloc(size) -#endif - -#ifndef SOAP_FREE /* use libc free */ -# define SOAP_FREE(soap, ptr) free(ptr) -#endif - -#ifdef SOAP_DEBUG -# ifndef SOAP_MESSAGE -# define SOAP_MESSAGE fprintf -# endif -# ifndef DBGLOG -# define DBGLOG(DBGFILE, CMD) \ -{ if (soap)\ - { if (!soap->fdebug[SOAP_INDEX_##DBGFILE])\ - soap_open_logfile((struct soap*)soap, SOAP_INDEX_##DBGFILE);\ - if (soap->fdebug[SOAP_INDEX_##DBGFILE])\ - { FILE *fdebug = soap->fdebug[SOAP_INDEX_##DBGFILE];\ - CMD;\ - fflush(fdebug);\ - }\ - }\ -} -# endif -# ifndef DBGMSG -# define DBGMSG(DBGFILE, MSG, LEN) \ -{ if (soap)\ - { if (!soap->fdebug[SOAP_INDEX_##DBGFILE])\ - soap_open_logfile((struct soap*)soap, SOAP_INDEX_##DBGFILE);\ - if (soap->fdebug[SOAP_INDEX_##DBGFILE])\ - { fwrite((MSG), 1, (LEN), soap->fdebug[SOAP_INDEX_##DBGFILE]);\ - fflush(soap->fdebug[SOAP_INDEX_##DBGFILE]);\ - }\ - }\ -} -# endif -# ifndef DGBFUN -# define DBGFUN(FNAME) DBGLOG(TEST, SOAP_MESSAGE(fdebug, "%s(%d): %s()\n", __FILE__, __LINE__, FNAME)) -# define DBGFUN1(FNAME, FMT, ARG) DBGLOG(TEST, SOAP_MESSAGE(fdebug, "%s(%d): %s("FMT")\n", __FILE__, __LINE__, FNAME, (ARG))) -# define DBGFUN2(FNAME, FMT1, ARG1, FMT2, ARG2) DBGLOG(TEST, SOAP_MESSAGE(fdebug, "%s(%d): %s("FMT1", "FMT2")\n", __FILE__, __LINE__, FNAME, (ARG1), (ARG2))) -# define DBGFUN3(FNAME, FMT1, ARG1, FMT2, ARG2, FMT3, ARG3) DBGLOG(TEST, SOAP_MESSAGE(fdebug, "%s(%d): %s("FMT1", "FMT2", "FMT3")\n", __FILE__, __LINE__, FNAME, (ARG1), (ARG2), (ARG3))) -# endif -# ifndef DBGHEX -# define DBGHEX(DBGFILE, MSG, LEN) \ -{ if (soap)\ - { if (!soap->fdebug[SOAP_INDEX_##DBGFILE])\ - soap_open_logfile(soap, SOAP_INDEX_##DBGFILE);\ - if (soap->fdebug[SOAP_INDEX_##DBGFILE])\ - { int i; char *s;\ - for (s = (char*)(MSG), i = (LEN); i; i--)\ - fprintf(soap->fdebug[SOAP_INDEX_##DBGFILE], "%2.2X ", (int)*s++&0xFF);\ - fflush(soap->fdebug[SOAP_INDEX_##DBGFILE]);\ - }\ - }\ -} -# endif -#else -# define DBGLOG(DBGFILE, CMD) -# define DBGMSG(DBGFILE, MSG, LEN) -# define DBGFUN(FNAME) -# define DBGFUN1(FNAME, FMT, ARG) -# define DBGFUN2(FNAME, FMT1, ARG1, FMT2, ARG2) -# define DBGFUN3(FNAME, FMT1, ARG1, FMT2, ARG2, FMT3, ARG3) -# define DBGHEX(DBGFILE, MSG, LEN) -#endif - -/* UCS-4 requires 32 bits (0-7FFFFFFF, the sign bit is used by gSOAP to distinguish XML entities) */ -typedef soap_int32 soap_wchar; - -/* namespace table row */ -struct Namespace -{ const char *id; - const char *ns; - const char *in; - char *out; -}; - -/* namespace stack */ -struct soap_nlist -{ struct soap_nlist *next; - unsigned int level; /* nesting depth level */ - short index; /* corresponding entry in ns mapping table */ - char *ns; /* only set when parsed ns URI is not in the ns mapping table */ - char id[1]; /* the actual string value flows into the allocated region below this struct */ -}; - -/* block stack for nested block allocations */ -struct soap_blist -{ struct soap_blist *next; - char *ptr; - size_t size; -}; - -/* array layout */ -struct soap_array -{ void *__ptr; - int __size; -}; - -/* pointer serialization management */ -struct soap_plist -{ struct soap_plist *next; - const void *ptr; - const struct soap_array *array; - int type; - int id; - char mark1; - char mark2; -}; - -/* block allocation for pointer serialization management */ -struct soap_pblk -{ struct soap_pblk *next; - struct soap_plist plist[SOAP_PTRBLK]; -}; - -#ifdef SOAP_MEM_DEBUG -/* malloc/free tracking for debugging */ -struct soap_mlist -{ struct soap_mlist *next; - const void *ptr; - const char *file; - int line; - short live; -}; -#endif - -/* class allocation list */ -struct soap_clist -{ struct soap_clist *next; - void *ptr; - int type; - int size; - void (*fdelete)(struct soap_clist*); -}; - -/* attributes */ -struct soap_attribute -{ struct soap_attribute *next; - char *value; - size_t size; - char *ns; - short visible; - char name[1]; /* the actual name string flows into the allocated region below this struct */ -}; - -#ifndef WITH_LEAN -struct soap_cookie -{ struct soap_cookie *next; - char *name; - char *value; - char *domain; - char *path; - time_t expire; /* client-side: local time to expire */ - long maxage; /* server-side: seconds to expire */ - unsigned int version; - short secure; - short session; /* server-side */ - short env; /* server-side: got cookie from client and should not be (re)send */ - short modified; /* server-side: client cookie was modified and should be send */ -}; -#endif - -#ifdef __cplusplus -SOAP_FMAC1 struct soap_multipart* SOAP_FMAC2 soap_next_multipart(struct soap_multipart*); - -class soap_multipart_iterator -{ public: - struct soap_multipart *content; - bool operator==(const soap_multipart_iterator& iter) const - { return content == iter.content; } - bool operator!=(const soap_multipart_iterator& iter) const - { return content != iter.content; } - struct soap_multipart &operator*() const - { return *content; } - soap_multipart_iterator &operator++() - { content = soap_next_multipart(content); return *this; } - soap_multipart_iterator() : content(NULL) - { } - soap_multipart_iterator(struct soap_multipart *p) : content(p) - { } -}; -#endif - -#ifndef WITH_LEANER -struct soap_dime -{ size_t count; - size_t size; - size_t chunksize; - size_t buflen; - char flags; - char *ptr; - const char *id; - const char *type; - const char *options; - struct soap_multipart *list; /* list of DIME attachments received */ - struct soap_multipart *first, *last; /* temporary in/out queue */ -#ifdef __cplusplus - soap_multipart_iterator begin() - { soap_multipart_iterator iter(list); return iter; }; - soap_multipart_iterator end() - { soap_multipart_iterator iter(NULL); return iter; }; -#endif -}; -#endif - -#ifndef WITH_LEANER -struct soap_mime -{ char *boundary; /* MIME boundary */ - const char *start; /* MIME start ID */ - struct soap_multipart *list; /* list of MIME attachments received */ - struct soap_multipart *first, *last; /* temporary in/out queue */ -#ifdef __cplusplus - soap_multipart_iterator begin() - { soap_multipart_iterator iter(list); return iter; }; - soap_multipart_iterator end() - { soap_multipart_iterator iter(NULL); return iter; }; -#endif -}; -#endif - -#ifndef WITH_LEANER -/* RFC2045 MIME content transfer encodings */ -enum soap_mime_encoding -{ SOAP_MIME_NONE, - SOAP_MIME_7BIT, - SOAP_MIME_8BIT, - SOAP_MIME_BINARY, - SOAP_MIME_QUOTED_PRINTABLE, - SOAP_MIME_BASE64, - SOAP_MIME_IETF_TOKEN, - SOAP_MIME_X_TOKEN -}; -#endif - -#ifndef WITH_LEANER -/* DIME/MIME multipart list */ -struct soap_multipart -{ struct soap_multipart *next; - char *ptr; /* points to raw data content */ - size_t size; /* size of data content */ - const char *id; /* DIME/MIME content ID or form data name */ - const char *type; /* DIME/MIME type (MIME type format) */ - const char *options; /* DIME options */ - enum soap_mime_encoding encoding; /* MIME Content-Transfer-Encoding */ - const char *location; /* MIME Content-Location (optional) */ - const char *description; /* MIME Content-Description (optional) */ -#ifdef __cplusplus - typedef soap_multipart_iterator iterator; -#endif -}; -#endif - -#ifndef WITH_LEANER -/* attachment DIME and MTOM XOP forwarding */ -struct soap_xlist -{ struct soap_xlist *next; - unsigned char **ptr; - int *size; - char *id; - char **type; - char **options; -}; -#endif - -/******************************************************************************/ - -#ifndef WITH_LEANER -#ifdef __cplusplus -class soap_dom_attribute_iterator -{ public: - struct soap_dom_attribute *att; - const char *nstr; - const char *name; - bool operator==(const soap_dom_attribute_iterator&) const; - bool operator!=(const soap_dom_attribute_iterator&) const; - struct soap_dom_attribute &operator*() const; - soap_dom_attribute_iterator &operator++(); - soap_dom_attribute_iterator(); - soap_dom_attribute_iterator(struct soap_dom_attribute*); - ~soap_dom_attribute_iterator(); -}; -#endif -#endif - -#ifndef WITH_LEANER -struct soap_dom_attribute -{ struct soap_dom_attribute *next; - const char *nstr; - char *name; - char *data; - wchar_t *wide; - struct soap *soap; -#ifdef __cplusplus - typedef soap_dom_attribute_iterator iterator; - struct soap_dom_attribute &set(const char *nstr, const char *name); /* set namespace and name */ - struct soap_dom_attribute &set(const char *data); /* set data */ - soap_dom_attribute_iterator begin(); - soap_dom_attribute_iterator end(); - soap_dom_attribute_iterator find(const char *nstr, const char *name); - void unlink(); - soap_dom_attribute(); - soap_dom_attribute(struct soap *soap); - soap_dom_attribute(struct soap *soap, const char *nstr, const char *name, const char *data); - ~soap_dom_attribute(); -#endif -}; -#endif - -#ifndef WITH_LEANER -#ifdef __cplusplus -class soap_dom_element_iterator -{ public: - struct soap_dom_element *elt; - const char *nstr; - const char *name; - int type; - bool operator==(const soap_dom_element_iterator&) const; - bool operator!=(const soap_dom_element_iterator&) const; - struct soap_dom_element &operator*() const; - soap_dom_element_iterator &operator++(); - soap_dom_element_iterator(); - soap_dom_element_iterator(struct soap_dom_element*); - ~soap_dom_element_iterator(); -}; -#endif -#endif - -#ifndef WITH_LEANER -struct soap_dom_element -{ struct soap_dom_element *next; /* next sibling */ - struct soap_dom_element *prnt; /* parent */ - struct soap_dom_element *elts; /* list of child elements */ - struct soap_dom_attribute *atts; /* list of attributes */ - const char *nstr; /* namespace string */ - char *name; /* element tag name */ - char *data; /* element content data (with SOAP_C_UTFSTRING flag set) */ - wchar_t *wide; /* element content data */ - int type; /* optional: serialized C/C++ data type */ - void *node; /* optional: pointer to serialized C/C++ data */ - char *head; /* leading whitespace to start tag */ - char *tail; /* leading whitespace to end tag */ - struct soap *soap; /* soap context that manages this node */ -#ifdef __cplusplus - typedef soap_dom_element_iterator iterator; - struct soap_dom_element &set(const char *nstr, const char *name); - struct soap_dom_element &set(const char *data); - struct soap_dom_element &set(void *node, int type); - struct soap_dom_element &add(struct soap_dom_element*); - struct soap_dom_element &add(struct soap_dom_element&); - struct soap_dom_element &add(struct soap_dom_attribute*); - struct soap_dom_element &add(struct soap_dom_attribute&); - soap_dom_element_iterator begin(); - soap_dom_element_iterator end(); - soap_dom_element_iterator find(const char *nstr, const char *name); - soap_dom_element_iterator find(int type); - void unlink(); - soap_dom_element(); - soap_dom_element(struct soap *soap); - soap_dom_element(struct soap *soap, const char *nstr, const char *name); - soap_dom_element(struct soap *soap, const char *nstr, const char *name, const char *data); - soap_dom_element(struct soap *soap, const char *nstr, const char *name, void *node, int type); - ~soap_dom_element(); -#endif -}; -SOAP_FMAC1 struct soap_dom_element * SOAP_FMAC2 soap_dom_next_element(struct soap_dom_element *elt); -SOAP_FMAC1 struct soap_dom_attribute * SOAP_FMAC2 soap_dom_next_attribute(struct soap_dom_attribute *att); -#endif - -#if defined(__cplusplus) && !defined(WITH_LEAN) -} -extern std::ostream &operator<<(std::ostream&, const struct soap_dom_element&); -extern std::istream &operator>>(std::istream&, struct soap_dom_element&); -extern "C" { -#endif - -/******************************************************************************/ - -#ifdef WIN32 -# ifdef SOAP_STD_EXPORTS -# define SOAP_STD_API __declspec(dllexport) -# else -# define SOAP_STD_API -# endif -#else -# define SOAP_STD_API -#endif - -struct SOAP_STD_API soap -{ short state; /* 0 = uninitialized, 1 = initialized, 2 = copy of another soap struct */ - short version; /* 1 = SOAP1.1 and 2 = SOAP1.2 (set automatically from namespace URI in nsmap table) */ - soap_mode mode; - soap_mode imode; - soap_mode omode; - const char *float_format; /* user-definable format string for floats (<1024 chars) */ - const char *double_format; /* user-definable format string for doubles (<1024 chars) */ - const char *dime_id_format; /* user-definable format string for integer DIME id ( 0, gives socket recv timeout in seconds, < 0 in usec */ - int send_timeout; /* when > 0, gives socket send timeout in seconds, < 0 in usec */ - int connect_timeout; /* when > 0, gives socket connect() timeout in seconds, < 0 in usec */ - int accept_timeout; /* when > 0, gives socket accept() timeout in seconds, < 0 in usec */ - int socket_flags; /* socket recv() and send() flags, e.g. set to MSG_NOSIGNAL to disable sigpipe */ - int connect_flags; /* connect() SOL_SOCKET sockopt flags, e.g. set to SO_DEBUG to debug socket */ - int bind_flags; /* bind() SOL_SOCKET sockopt flags, e.g. set to SO_REUSEADDR to enable reuse */ - int accept_flags; /* accept() SOL_SOCKET sockopt flags */ - const struct Namespace *namespaces; /* Pointer to global namespace mapping table */ - struct Namespace *local_namespaces; /* Local namespace mapping table */ - struct soap_nlist *nlist; /* namespace stack */ - struct soap_blist *blist; /* block allocation stack */ - struct soap_clist *clist; /* class instance allocation list */ - void *alist; /* memory allocation (malloc) list */ - struct soap_ilist *iht[SOAP_IDHASH]; - struct soap_plist *pht[SOAP_PTRHASH]; - struct soap_pblk *pblk; /* plist block allocation */ - short pidx; /* plist block allocation */ - struct SOAP_ENV__Header *header; - struct SOAP_ENV__Fault *fault; - int idnum; - void *user; /* to pass user-defined data */ - struct soap_plugin *plugins; /* linked list of plug-in data */ - char *userid; /* HTTP Basic authorization userid */ - char *passwd; /* HTTP Basic authorization passwd */ - int (*fpost)(struct soap*, const char*, const char*, int, const char*, const char*, size_t); - int (*fget)(struct soap*); - int (*fform)(struct soap*); - int (*fposthdr)(struct soap*, const char*, const char*); - int (*fresponse)(struct soap*, int, size_t); - int (*fparse)(struct soap*); - int (*fparsehdr)(struct soap*, const char*, const char*); - int (*fheader)(struct soap*); - int (*fresolve)(struct soap*, const char*, struct in_addr* inaddr); - int (*fconnect)(struct soap*, const char*, const char*, int); - int (*fdisconnect)(struct soap*); - int (*fclosesocket)(struct soap*, SOAP_SOCKET); - int (*fshutdownsocket)(struct soap*, SOAP_SOCKET, int); - int (*fopen)(struct soap*, const char*, const char*, int); - int (*faccept)(struct soap*, int, struct sockaddr*, int *n); - int (*fclose)(struct soap*); - int (*fsend)(struct soap*, const char*, size_t); - size_t (*frecv)(struct soap*, char*, size_t); - int (*fpoll)(struct soap*); - void (*fseterror)(struct soap*, const char **c, const char **s); - int (*fignore)(struct soap*, const char*); - int (*fserveloop)(struct soap*); - void *(*fplugin)(struct soap*, const char*); - void *(*fmalloc)(struct soap*, size_t); -#ifndef WITH_LEANER - int (*fprepareinit)(struct soap*); - int (*fpreparesend)(struct soap*, const char*, size_t); - int (*fpreparerecv)(struct soap*, const char*, size_t); - int (*fpreparefinal)(struct soap*); - void *(*fdimereadopen)(struct soap*, void*, const char*, const char*, const char*); - void *(*fdimewriteopen)(struct soap*, const char*, const char*, const char*); - void (*fdimereadclose)(struct soap*, void*); - void (*fdimewriteclose)(struct soap*, void*); - size_t (*fdimeread)(struct soap*, void*, char*, size_t); - int (*fdimewrite)(struct soap*, void*, const char*, size_t); - void *(*fmimereadopen)(struct soap*, void*, const char*, const char*, const char*); - void *(*fmimewriteopen)(struct soap*, void*, const char*, const char*, const char*, enum soap_mime_encoding); - void (*fmimereadclose)(struct soap*, void*); - void (*fmimewriteclose)(struct soap*, void*); - size_t (*fmimeread)(struct soap*, void*, char*, size_t); - int (*fmimewrite)(struct soap*, void*, const char*, size_t); -#endif - int master; - int socket; -#if defined(__cplusplus) && !defined(WITH_LEAN) - std::ostream *os; - std::istream *is; -#else - void *os; /* preserve alignment */ - void *is; /* preserve alignment */ -#endif -#ifndef UNDER_CE - int sendfd; - int recvfd; -#else - FILE *sendfd; - FILE *recvfd; -#endif - size_t bufidx; /* index in soap.buf[] */ - size_t buflen; /* length of soap.buf[] content */ - soap_wchar ahead; /* parser lookahead */ - short cdata; /* CDATA parser state */ - short body; /* parsed XML element has a body or not */ - unsigned int level; /* XML nesting level */ - size_t count; /* message length counter */ - size_t length; /* message length as set by HTTP header */ - char *labbuf; /* look-aside buffer */ - size_t lablen; /* look-aside buffer allocated length */ - size_t labidx; /* look-aside buffer index to available part */ - char buf[SOAP_BUFLEN];/* send and receive buffer */ - char tmpbuf[1024]; /* in/output buffer for HTTP/MIME headers, simpleType values, attribute names, and DIME must be >=1024 bytes */ - char msgbuf[1024]; /* in/output buffer for messages >=1024 bytes */ - char tag[SOAP_TAGLEN]; - char id[SOAP_TAGLEN]; - char href[SOAP_TAGLEN]; - char type[SOAP_TAGLEN]; - char arrayType[SOAP_TAGLEN]; - char arraySize[SOAP_TAGLEN]; - char arrayOffset[SOAP_TAGLEN]; - short other; - short position; - int positions[SOAP_MAXDIMS]; - short root; - struct soap_attribute *attributes; /* attribute list */ - short encoding; /* when set, output encodingStyle */ - short mustUnderstand; /* a mustUnderstand element was parsed or is output */ - short keep_alive; /* connection should be kept open */ - short null; /* parsed XML is xsi:nil */ - short ns; /* when not set, output full xmlns bindings */ - short part; /* parsing state */ - short alloced; - short peeked; - size_t chunksize; - size_t chunkbuflen; - char endpoint[SOAP_TAGLEN]; - char path[SOAP_TAGLEN]; - char host[SOAP_TAGLEN]; - char *action; - char *authrealm; /* HTTP authentication realm */ - char *prolog; /* XML declaration prolog */ - unsigned long ip; /* IP number */ - int port; /* port number */ - unsigned int max_keep_alive; - const char *proxy_http_version;/* HTTP version of proxy "1.0" or "1.1" */ - const char *proxy_host; /* Proxy Server host name */ - int proxy_port; /* Proxy Server port (default = 8080) */ - const char *proxy_userid; /* Proxy Authorization user name */ - const char *proxy_passwd; /* Proxy Authorization password */ - int status; /* -1 when request, else error code to be returned by server */ - int error; - int errmode; - int errnum; -#ifndef WITH_LEANER - struct soap_dom_element *dom; - struct soap_dime dime; - struct soap_mime mime; - struct soap_xlist *xlist; -#endif -#if !defined(WITH_LEAN) || defined(SOAP_DEBUG) - const char *logfile[SOAP_MAXLOGS]; - FILE *fdebug[SOAP_MAXLOGS]; - struct soap_mlist *mht[SOAP_PTRHASH]; -#endif -#ifndef WITH_LEAN - const char *c14ninclude; - const char *c14nexclude; - struct soap_cookie *cookies; - const char *cookie_domain; - const char *cookie_path; - int cookie_max; -#endif -#ifndef WITH_NOIO -#ifdef WITH_IPV6 - struct sockaddr_storage peer; /* IPv6: set by soap_accept and by UDP recv */ -#else - struct sockaddr_in peer; /* IPv4: set by soap_connect/soap_accept and by UDP recv */ -#endif -#endif - size_t peerlen; -#ifdef WITH_OPENSSL - int (*fsslauth)(struct soap*); - int (*fsslverify)(int, X509_STORE_CTX*); - BIO *bio; - SSL *ssl; - SSL_CTX *ctx; - unsigned short ssl_flags; - const char *keyfile; - const char *password; - const char *dhfile; - const char *cafile; - const char *capath; - const char *crlfile; - const char *randfile; - SSL_SESSION *session; - char session_host[SOAP_TAGLEN]; - int session_port; -#endif -#ifdef WITH_ZLIB - short zlib_state; /* SOAP_ZLIB_NONE, SOAP_ZLIB_DEFLATE, or SOAP_ZLIB_INFLATE */ - short zlib_in; /* SOAP_ZLIB_NONE, SOAP_ZLIB_DEFLATE, or SOAP_ZLIB_GZIP */ - short zlib_out; /* SOAP_ZLIB_NONE, SOAP_ZLIB_DEFLATE, or SOAP_ZLIB_GZIP */ - z_stream d_stream; /* decompression stream */ - char z_buf[SOAP_BUFLEN]; /* buffer */ - size_t z_buflen; - unsigned short z_level; /* compression level to be used (0=none, 1=fast to 9=best) */ - uLong z_crc; /* internal gzip crc */ - float z_ratio_in; /* detected compression ratio compressed_length/length of inbound message */ - float z_ratio_out; /* detected compression ratio compressed_length/length of outbound message */ -#endif -#ifdef WMW_RPM_IO - void *rpmreqid; -#endif -#ifndef WITH_LEAN -#ifdef __cplusplus - soap(); - soap(soap_mode); - soap(soap_mode, soap_mode); - soap(struct soap&); - ~soap(); -#endif -#endif -}; - -struct soap_code_map -{ long code; - const char *string; -}; - -/* forwarding list */ -struct soap_flist -{ struct soap_flist *next; - int type; - void *ptr; - unsigned int level; - size_t len; - void (*fcopy)(struct soap*, int, int, void*, size_t, const void*, size_t); -}; - -/* id-ref forwarding list */ -struct soap_ilist -{ struct soap_ilist *next; - int type; - size_t size; - void *link; - void *copy; - struct soap_flist *flist; - void *ptr; - unsigned int level; - char id[1]; /* the actual id string value flows into the allocated region below this struct */ -}; - -struct soap_plugin -{ struct soap_plugin *next; - const char *id; - void *data; - int (*fcopy)(struct soap *soap, struct soap_plugin *dst, struct soap_plugin *src); - void (*fdelete)(struct soap *soap, struct soap_plugin *p); /* should delete fields of plugin only and not free(p) */ -}; - -#ifndef WITH_NONAMESPACES -extern SOAP_NMAC struct Namespace namespaces[]; -#endif - -#ifndef WITH_LEAN -# define soap_get0(soap) (((soap)->bufidx>=(soap)->buflen && soap_recv(soap)) ? EOF : (unsigned char)(soap)->buf[(soap)->bufidx]) -# define soap_get1(soap) (((soap)->bufidx>=(soap)->buflen && soap_recv(soap)) ? EOF : (unsigned char)(soap)->buf[(soap)->bufidx++]) -#else -soap_wchar soap_get0(struct soap*); -soap_wchar soap_get1(struct soap*); -#endif - -#define soap_revget1(soap) ((soap)->bufidx--) -#define soap_unget(soap, c) ((soap)->ahead = c) -#define soap_register_plugin(soap, plugin) soap_register_plugin_arg(soap, plugin, NULL) -#define soap_imode(soap, n) ((soap)->mode = (soap)->imode = (n)) -#define soap_set_imode(soap, n) ((soap)->imode |= (n)) -#define soap_clr_imode(soap, n) ((soap)->imode &= ~(n)) -#define soap_omode(soap, n) ((soap)->mode = (soap)->omode = (n)) -#define soap_set_omode(soap, n) ((soap)->omode |= (n)) -#define soap_clr_omode(soap, n) ((soap)->omode &= ~(n)) -#define soap_set_mode(soap, n) ((soap)->imode |= (n), (soap)->omode |= (n)) -#define soap_clr_mode(soap, n) ((soap)->imode &= ~(n), (soap)->omode &= ~(n)) -#define soap_destroy(soap) soap_delete((soap), NULL) - -#ifdef HAVE_STRRCHR -# define soap_strrchr(s, t) strrchr(s, t) -#else - SOAP_FMAC1 char* SOAP_FMAC2 soap_strrchr(const char *s, int t); -#endif - -#ifdef HAVE_STRTOL -# define soap_strtol(s, t, b) strtol(s, t, b) -#else - SOAP_FMAC1 long SOAP_FMAC2 soap_strtol(const char *s, char **t, int b); -#endif - -#ifdef HAVE_STRTOUL -# define soap_strtoul(s, t, b) strtoul(s, t, b) -#else - SOAP_FMAC1 unsigned long SOAP_FMAC2 soap_strtoul(const char *s, char **t, int b); -#endif - -#if defined(WITH_OPENSSL) -# define soap_random soap_rand() -SOAP_FMAC1 int SOAP_FMAC2 soap_rand(void); -#elif defined(HAVE_RANDOM) -# define soap_random (int)random() -#else -# define soap_random rand() -#endif - -#ifdef WITH_NOIDREF -# define soap_embedded(s, p, t) (0) -# define soap_id_lookup(s, i, p, t, n, k) (p) -# define soap_id_forward(s, h, p, len, st, tt, n, k, fc) (p) -# define soap_reference(s, a, t) (1) -# define soap_array_reference(s, p, a, n, t) (1) -# define soap_embed(s, p, a, n, t, pp) (0) -# define soap_embedded_id(s, i, p, t) (i) -# define soap_is_embedded(s, p) (0) -# define soap_is_single(s, p) (1) -# define soap_lookup_type(s, i) (0) -# define soap_getindependent(s) (0) -# define soap_putindependent(s) (0) -# define soap_getelement(s, n) (n) -# define soap_putelement(s, p, t, i, n) (0) -# define soap_markelement(s, p, n) (0) -#endif - -SOAP_FMAC1 void SOAP_FMAC2 soap_fault(struct soap*); -SOAP_FMAC1 const char** SOAP_FMAC2 soap_faultcode(struct soap*); -SOAP_FMAC1 const char** SOAP_FMAC2 soap_faultsubcode(struct soap*); -SOAP_FMAC1 const char** SOAP_FMAC2 soap_faultstring(struct soap*); -SOAP_FMAC1 const char** SOAP_FMAC2 soap_faultdetail(struct soap*); -SOAP_FMAC1 void SOAP_FMAC2 soap_serializeheader(struct soap*); -SOAP_FMAC1 int SOAP_FMAC2 soap_putheader(struct soap*); -SOAP_FMAC1 int SOAP_FMAC2 soap_getheader(struct soap*); -SOAP_FMAC1 void SOAP_FMAC2 soap_serializefault(struct soap*); -SOAP_FMAC1 int SOAP_FMAC2 soap_putfault(struct soap*); -SOAP_FMAC1 int SOAP_FMAC2 soap_getfault(struct soap*); - -SOAP_FMAC1 void SOAP_FMAC2 soap_ssl_init(void); -SOAP_FMAC1 int SOAP_FMAC2 soap_poll(struct soap*); -SOAP_FMAC1 int SOAP_FMAC2 soap_connect_command(struct soap*, int, const char*, const char*); -SOAP_FMAC1 int SOAP_FMAC2 soap_connect(struct soap*, const char*, const char*); -SOAP_FMAC1 int SOAP_FMAC2 soap_bind(struct soap*, const char*, int, int); -SOAP_FMAC1 int SOAP_FMAC2 soap_accept(struct soap*); -SOAP_FMAC1 int SOAP_FMAC2 soap_ssl_accept(struct soap*); -SOAP_FMAC1 const char * SOAP_FMAC2 soap_ssl_error(struct soap*, int); - -SOAP_FMAC1 int SOAP_FMAC2 soap_ssl_server_context(struct soap*, unsigned short, const char*, const char*, const char*, const char*, const char*, const char*, const char*); -SOAP_FMAC1 int SOAP_FMAC2 soap_ssl_client_context(struct soap*, unsigned short, const char*, const char*, const char*, const char*, const char*); - -SOAP_FMAC1 int SOAP_FMAC2 soap_puthttphdr(struct soap*, int status, size_t count); - -SOAP_FMAC1 const char* SOAP_FMAC2 soap_get_header_attribute(struct soap*, const char*, const char*); -SOAP_FMAC1 const char* SOAP_FMAC2 soap_decode_key(char*, size_t, const char*); -SOAP_FMAC1 const char* SOAP_FMAC2 soap_decode_val(char*, size_t, const char*); - -SOAP_FMAC1 size_t SOAP_FMAC2 soap_hash(const char*); -SOAP_FMAC1 void SOAP_FMAC2 soap_set_endpoint(struct soap*, const char*); -SOAP_FMAC1 int SOAP_FMAC2 soap_flush_raw(struct soap*, const char*, size_t); -SOAP_FMAC1 int SOAP_FMAC2 soap_flush(struct soap*); -SOAP_FMAC1 soap_wchar SOAP_FMAC2 soap_get(struct soap*); -SOAP_FMAC1 soap_wchar SOAP_FMAC2 soap_getchar(struct soap*); -SOAP_FMAC1 int SOAP_FMAC2 soap_tag_cmp(const char*, const char*); -SOAP_FMAC1 void SOAP_FMAC2 soap_set_fault(struct soap*); -SOAP_FMAC1 int SOAP_FMAC2 soap_sender_fault(struct soap*, const char*, const char*); -SOAP_FMAC1 int SOAP_FMAC2 soap_sender_fault_subcode(struct soap*, const char*, const char*, const char*); -SOAP_FMAC1 int SOAP_FMAC2 soap_receiver_fault(struct soap*, const char*, const char*); -SOAP_FMAC1 int SOAP_FMAC2 soap_receiver_fault_subcode(struct soap*, const char*, const char*, const char*); -SOAP_FMAC1 int SOAP_FMAC2 soap_set_sender_error(struct soap*, const char*, const char*, int); -SOAP_FMAC1 int SOAP_FMAC2 soap_set_receiver_error(struct soap*, const char*, const char*, int); - -SOAP_FMAC1 int SOAP_FMAC2 soap_send_raw(struct soap*, const char*, size_t); -SOAP_FMAC1 int SOAP_FMAC2 soap_recv_raw(struct soap*); -SOAP_FMAC1 int SOAP_FMAC2 soap_recv(struct soap*); -SOAP_FMAC1 int SOAP_FMAC2 soap_send(struct soap*, const char*); -SOAP_FMAC1 int SOAP_FMAC2 soap_send2(struct soap*, const char*, const char*); -SOAP_FMAC1 int SOAP_FMAC2 soap_send3(struct soap*, const char*, const char*, const char*); - -SOAP_FMAC1 int SOAP_FMAC2 soap_pututf8(struct soap*, unsigned long); -SOAP_FMAC1 soap_wchar SOAP_FMAC2 soap_getutf8(struct soap*); - -SOAP_FMAC1 int SOAP_FMAC2 soap_putbase64(struct soap*, const unsigned char*, int); -SOAP_FMAC1 unsigned char* SOAP_FMAC2 soap_getbase64(struct soap*, int*, int); -SOAP_FMAC1 int SOAP_FMAC2 soap_puthex(struct soap*, const unsigned char*, int); -SOAP_FMAC1 unsigned char* SOAP_FMAC2 soap_gethex(struct soap*, int*); - -#ifndef WITH_LEANER -SOAP_FMAC1 int SOAP_FMAC2 soap_xop_forward(struct soap*, unsigned char**, int*, char**, char**, char**); -SOAP_FMAC1 int SOAP_FMAC2 soap_dime_forward(struct soap*, unsigned char**, int*, char**, char**, char**); -#endif - -#ifndef WITH_NOIDREF -SOAP_FMAC1 int SOAP_FMAC2 soap_pointer_lookup_id(struct soap*, void *p, int t, struct soap_plist**); -SOAP_FMAC1 int SOAP_FMAC2 soap_pointer_lookup(struct soap*, const void *p, int t, struct soap_plist**); -SOAP_FMAC1 int SOAP_FMAC2 soap_pointer_enter(struct soap*, const void *p, const struct soap_array *a, int n, int t, struct soap_plist**); -SOAP_FMAC1 int SOAP_FMAC2 soap_array_pointer_lookup(struct soap*, const void *p, const struct soap_array *a, int n, int t, struct soap_plist**); -SOAP_FMAC1 int SOAP_FMAC2 soap_embed(struct soap *soap, const void *p, const struct soap_array *a, int n, const char *tag, int type); -SOAP_FMAC1 struct soap_ilist* SOAP_FMAC2 soap_lookup(struct soap*, const char*); -SOAP_FMAC1 struct soap_ilist* SOAP_FMAC2 soap_enter(struct soap*, const char*); -SOAP_FMAC1 int SOAP_FMAC2 soap_resolve(struct soap*); -SOAP_FMAC1 void SOAP_FMAC2 soap_embedded(struct soap*, const void *p, int t); -SOAP_FMAC1 int SOAP_FMAC2 soap_reference(struct soap*, const void *p, int t); -SOAP_FMAC1 int SOAP_FMAC2 soap_array_reference(struct soap*, const void *p, const struct soap_array *a, int n, int t); -SOAP_FMAC1 int SOAP_FMAC2 soap_embedded_id(struct soap*, int id, const void *p, int t); -SOAP_FMAC1 int SOAP_FMAC2 soap_is_embedded(struct soap*, struct soap_plist*); -SOAP_FMAC1 int SOAP_FMAC2 soap_is_single(struct soap*, struct soap_plist*); -SOAP_FMAC1 void SOAP_FMAC2 soap_set_embedded(struct soap*, struct soap_plist*); -#endif - -SOAP_FMAC1 int SOAP_FMAC2 soap_begin_count(struct soap*); -SOAP_FMAC1 int SOAP_FMAC2 soap_end_count(struct soap*); -SOAP_FMAC1 int SOAP_FMAC2 soap_begin_send(struct soap*); -SOAP_FMAC1 int SOAP_FMAC2 soap_end_send(struct soap*); - -SOAP_FMAC1 const struct soap_code_map* SOAP_FMAC2 soap_code(const struct soap_code_map*, const char*); -SOAP_FMAC1 long SOAP_FMAC2 soap_code_int(const struct soap_code_map*, const char*, long); -SOAP_FMAC1 const char* SOAP_FMAC2 soap_code_str(const struct soap_code_map*, long); -SOAP_FMAC1 long SOAP_FMAC2 soap_code_bits(const struct soap_code_map*, const char*); -SOAP_FMAC1 const char* SOAP_FMAC2 soap_code_list(struct soap*, const struct soap_code_map*, long); - -SOAP_FMAC1 int SOAP_FMAC2 soap_getline(struct soap*, char*, int); -SOAP_FMAC1 int SOAP_FMAC2 soap_begin_recv(struct soap*); -SOAP_FMAC1 int SOAP_FMAC2 soap_end_recv(struct soap*); - -SOAP_FMAC1 void* SOAP_FMAC2 soap_malloc(struct soap*, size_t); -SOAP_FMAC1 void SOAP_FMAC2 soap_dealloc(struct soap*, void*); -SOAP_FMAC1 struct soap_clist * SOAP_FMAC2 soap_link(struct soap*, void*, int, int, void (*fdelete)(struct soap_clist*)); -SOAP_FMAC1 void SOAP_FMAC2 soap_unlink(struct soap*, const void*); -SOAP_FMAC1 void SOAP_FMAC2 soap_free_temp(struct soap*); -SOAP_FMAC1 void SOAP_FMAC2 soap_del(struct soap*); - -SOAP_FMAC1 void* SOAP_FMAC2 soap_track_malloc(struct soap*, const char*, int, size_t); -SOAP_FMAC1 void SOAP_FMAC2 soap_track_free(struct soap*, const char*, int, void*); - -#ifndef WITH_NOIDREF -SOAP_FMAC1 int SOAP_FMAC2 soap_lookup_type(struct soap*, const char *id); -SOAP_FMAC1 void* SOAP_FMAC2 soap_id_lookup(struct soap*, const char *id, void **p, int t, size_t n, unsigned int k); -SOAP_FMAC1 void* SOAP_FMAC2 soap_id_forward(struct soap*, const char *id, void *p, size_t len, int st, int tt, size_t n, unsigned int k, void(*fcopy)(struct soap*, int, int, void*, size_t, const void*, size_t)); -#endif -SOAP_FMAC1 void* SOAP_FMAC2 soap_id_enter(struct soap*, const char *id, void *p, int t, size_t n, unsigned int k, const char *type, const char *arrayType, void *(*finstantiate)(struct soap*, int, const char*, const char*, size_t*)); -SOAP_FMAC1 void SOAP_FMAC2 soap_fcopy(struct soap *soap, int st, int tt, void *p, size_t, const void *q, size_t n); - -SOAP_FMAC1 int SOAP_FMAC2 soap_size(const int *, int); -SOAP_FMAC1 int SOAP_FMAC2 soap_getoffsets(const char *, const int *, int *, int); -SOAP_FMAC1 int SOAP_FMAC2 soap_getsize(const char *, const char *, int *); -SOAP_FMAC1 int SOAP_FMAC2 soap_getsizes(const char *, int *, int); -SOAP_FMAC1 int SOAP_FMAC2 soap_getposition(const char *, int *); - -SOAP_FMAC1 char* SOAP_FMAC2 soap_putsize(struct soap*, const char *, int); -SOAP_FMAC1 char* SOAP_FMAC2 soap_putsizesoffsets(struct soap*, const char *, const int *, const int *, int); -SOAP_FMAC1 char* SOAP_FMAC2 soap_putsizes(struct soap*, const char *, const int *, int); -SOAP_FMAC1 char* SOAP_FMAC2 soap_putoffset(struct soap*, int); -SOAP_FMAC1 char* SOAP_FMAC2 soap_putoffsets(struct soap*, const int *, int); - -SOAP_FMAC1 int SOAP_FMAC2 soap_closesock(struct soap*); - -SOAP_FMAC1 struct soap *SOAP_FMAC2 soap_new(void); -SOAP_FMAC1 struct soap *SOAP_FMAC2 soap_new1(soap_mode); -SOAP_FMAC1 struct soap *SOAP_FMAC2 soap_new2(soap_mode, soap_mode); -SOAP_FMAC1 void SOAP_FMAC2 soap_free(struct soap*); -SOAP_FMAC1 struct soap *SOAP_FMAC2 soap_copy(struct soap*); -SOAP_FMAC1 struct soap *SOAP_FMAC2 soap_copy_context(struct soap*, struct soap*); -SOAP_FMAC1 void SOAP_FMAC2 soap_copy_stream(struct soap*, struct soap*); -SOAP_FMAC1 void SOAP_FMAC2 soap_init(struct soap*); -SOAP_FMAC1 void SOAP_FMAC2 soap_init1(struct soap*, soap_mode); -SOAP_FMAC1 void SOAP_FMAC2 soap_init2(struct soap*, soap_mode, soap_mode); -SOAP_FMAC1 void SOAP_FMAC2 soap_done(struct soap*); -SOAP_FMAC1 void SOAP_FMAC2 soap_cleanup(struct soap*); -SOAP_FMAC1 void SOAP_FMAC2 soap_begin(struct soap*); -SOAP_FMAC1 void SOAP_FMAC2 soap_end(struct soap*); -SOAP_FMAC1 void SOAP_FMAC2 soap_delete(struct soap*, void*); - -#ifdef SOAP_DEBUG -SOAP_FMAC1 void SOAP_FMAC2 soap_set_recv_logfile(struct soap*, const char*); -SOAP_FMAC1 void SOAP_FMAC2 soap_set_sent_logfile(struct soap*, const char*); -SOAP_FMAC1 void SOAP_FMAC2 soap_set_test_logfile(struct soap*, const char*); -SOAP_FMAC1 void SOAP_FMAC2 soap_close_logfiles(struct soap*); -SOAP_FMAC1 void SOAP_FMAC2 soap_open_logfile(struct soap*, int); -#endif - -SOAP_FMAC1 const char* SOAP_FMAC2 soap_value(struct soap*); - -SOAP_FMAC1 int SOAP_FMAC2 soap_match_tag(struct soap*, const char*, const char *); -SOAP_FMAC1 int SOAP_FMAC2 soap_match_array(struct soap*, const char*); - -SOAP_FMAC1 int SOAP_FMAC2 soap_element(struct soap*, const char*, int, const char*); -SOAP_FMAC1 int SOAP_FMAC2 soap_element_begin_out(struct soap*, const char *tag, int id, const char *type); -SOAP_FMAC1 int SOAP_FMAC2 soap_array_begin_out(struct soap*, const char *tag, int id, const char *type, const char *offset); -SOAP_FMAC1 int SOAP_FMAC2 soap_element_ref(struct soap*, const char *tag, int id, int href); -SOAP_FMAC1 int SOAP_FMAC2 soap_element_href(struct soap*, const char *tag, int id, const char *ref, const char *val); -SOAP_FMAC1 int SOAP_FMAC2 soap_element_null(struct soap*, const char *tag, int id, const char *type); -SOAP_FMAC1 int SOAP_FMAC2 soap_element_id(struct soap*, const char *tag, int id, const void *p, const struct soap_array *a, int d, const char *type, int n); -SOAP_FMAC1 int SOAP_FMAC2 soap_element_result(struct soap*, const char *tag); -SOAP_FMAC1 void SOAP_FMAC2 soap_check_result(struct soap*, const char *tag); -SOAP_FMAC1 int SOAP_FMAC2 soap_element_end_out(struct soap*, const char *tag); -SOAP_FMAC1 int SOAP_FMAC2 soap_element_start_end_out(struct soap*, const char *tag); - -SOAP_FMAC1 int SOAP_FMAC2 soap_attribute(struct soap*, const char*, const char*); - -SOAP_FMAC1 int SOAP_FMAC2 soap_element_begin_in(struct soap*, const char *tag, int nillable, const char *type); - -SOAP_FMAC1 int SOAP_FMAC2 soap_element_end_in(struct soap*, const char *tag); - -SOAP_FMAC1 int SOAP_FMAC2 soap_peek_element(struct soap*); - -SOAP_FMAC1 void SOAP_FMAC2 soap_retry(struct soap*); -SOAP_FMAC1 void SOAP_FMAC2 soap_revert(struct soap*); - -SOAP_FMAC1 char* SOAP_FMAC2 soap_strdup(struct soap*, const char*); -SOAP_FMAC1 const char * SOAP_FMAC2 soap_strsearch(const char *big, const char *little); - -SOAP_FMAC1 int SOAP_FMAC2 soap_string_out(struct soap*, const char *s, int flag); -SOAP_FMAC1 char* SOAP_FMAC2 soap_string_in(struct soap*, int, long, long); - -#ifndef WITH_LEANER -SOAP_FMAC1 int SOAP_FMAC2 soap_wstring_out(struct soap*, const wchar_t *s, int flag); -SOAP_FMAC1 wchar_t* SOAP_FMAC2 soap_wstring_in(struct soap*, int, long, long); -#endif - -SOAP_FMAC1 int SOAP_FMAC2 soap_match_namespace(struct soap*, const char *, const char*, int n1, int n2); - -SOAP_FMAC1 int SOAP_FMAC2 soap_set_namespaces(struct soap*, const struct Namespace*); -SOAP_FMAC1 void SOAP_FMAC2 soap_set_local_namespaces(struct soap*); - -SOAP_FMAC1 void SOAP_FMAC2 soap_pop_namespace(struct soap*); -SOAP_FMAC1 int SOAP_FMAC2 soap_push_namespace(struct soap*, const char *,const char *); -SOAP_FMAC1 const char* SOAP_FMAC2 soap_current_namespace(struct soap *soap, const char *tag); - -SOAP_FMAC1 struct soap_nlist* SOAP_FMAC2 soap_lookup_ns(struct soap *soap, const char *tag, size_t n); - -SOAP_FMAC1 int SOAP_FMAC2 soap_store_lab(struct soap*, const char*, size_t); -SOAP_FMAC1 int SOAP_FMAC2 soap_append_lab(struct soap*, const char*, size_t); - -SOAP_FMAC1 int SOAP_FMAC2 soap_new_block(struct soap*); -SOAP_FMAC1 void* SOAP_FMAC2 soap_push_block(struct soap*, size_t); -SOAP_FMAC1 void SOAP_FMAC2 soap_pop_block(struct soap*); -SOAP_FMAC1 size_t SOAP_FMAC2 soap_size_block(struct soap*, size_t); -SOAP_FMAC1 char* SOAP_FMAC2 soap_first_block(struct soap*); -SOAP_FMAC1 char* SOAP_FMAC2 soap_next_block(struct soap*); -SOAP_FMAC1 size_t SOAP_FMAC2 soap_block_size(struct soap*); -SOAP_FMAC1 char* SOAP_FMAC2 soap_save_block(struct soap*, char*, int); -SOAP_FMAC1 void SOAP_FMAC2 soap_end_block(struct soap*); - -SOAP_FMAC1 int SOAP_FMAC2 soap_envelope_begin_out(struct soap*); -SOAP_FMAC1 int soap_envelope_end_out(struct soap*); - -SOAP_FMAC1 int SOAP_FMAC2 soap_envelope_begin_in(struct soap*); -SOAP_FMAC1 int SOAP_FMAC2 soap_envelope_end_in(struct soap*); - -SOAP_FMAC1 int SOAP_FMAC2 soap_body_begin_out(struct soap*); -SOAP_FMAC1 int SOAP_FMAC2 soap_body_end_out(struct soap*); - -SOAP_FMAC1 int SOAP_FMAC2 soap_body_begin_in(struct soap*); -SOAP_FMAC1 int SOAP_FMAC2 soap_body_end_in(struct soap*); - -SOAP_FMAC1 int SOAP_FMAC2 soap_recv_header(struct soap*); - -SOAP_FMAC1 int SOAP_FMAC2 soap_response(struct soap*, int); - -SOAP_FMAC1 int SOAP_FMAC2 soap_send_empty_response(struct soap*, int status); -SOAP_FMAC1 int SOAP_FMAC2 soap_recv_empty_response(struct soap*); - -SOAP_FMAC1 int SOAP_FMAC2 soap_send_fault(struct soap*); -SOAP_FMAC1 int SOAP_FMAC2 soap_recv_fault(struct soap*); - -#ifndef WITH_NOSTDLIB -SOAP_FMAC1 void SOAP_FMAC2 soap_print_fault(struct soap*, FILE*); -SOAP_FMAC1 void SOAP_FMAC2 soap_print_fault_location(struct soap*, FILE*); -#endif - -SOAP_FMAC1 int SOAP_FMAC2 soap_s2byte(struct soap*, const char*, char*); -SOAP_FMAC1 int SOAP_FMAC2 soap_s2short(struct soap*, const char*, short*); -SOAP_FMAC1 int SOAP_FMAC2 soap_s2int(struct soap*, const char*, int*); -SOAP_FMAC1 int SOAP_FMAC2 soap_s2long(struct soap*, const char*, long*); -SOAP_FMAC1 int SOAP_FMAC2 soap_s2LONG64(struct soap*, const char*, LONG64*); -SOAP_FMAC1 int SOAP_FMAC2 soap_s2float(struct soap*, const char*, float*); -SOAP_FMAC1 int SOAP_FMAC2 soap_s2double(struct soap*, const char*, double*); -SOAP_FMAC1 int SOAP_FMAC2 soap_s2unsignedByte(struct soap*, const char*, unsigned char*); -SOAP_FMAC1 int SOAP_FMAC2 soap_s2unsignedShort(struct soap*, const char*, unsigned short*); -SOAP_FMAC1 int SOAP_FMAC2 soap_s2unsignedInt(struct soap*, const char*, unsigned int*); -SOAP_FMAC1 int SOAP_FMAC2 soap_s2unsignedLong(struct soap*, const char*, unsigned long*); -SOAP_FMAC1 int SOAP_FMAC2 soap_s2ULONG64(struct soap*, const char*, ULONG64*); -SOAP_FMAC1 int SOAP_FMAC2 soap_s2string(struct soap*, const char*, char**); -SOAP_FMAC1 int SOAP_FMAC2 soap_s2QName(struct soap*, const char*, char**); - -#ifndef WITH_LEAN -SOAP_FMAC1 int SOAP_FMAC2 soap_s2wchar(struct soap*, const char*, wchar_t**); -SOAP_FMAC1 int SOAP_FMAC2 soap_s2dateTime(struct soap*, const char*, time_t*); -SOAP_FMAC1 char* SOAP_FMAC2 soap_s2base64(struct soap*, const unsigned char*, char*, int); -SOAP_FMAC1 char* SOAP_FMAC2 soap_s2hex(struct soap*, const unsigned char*, char*, int); -#endif - -SOAP_FMAC1 const char* SOAP_FMAC2 soap_byte2s(struct soap*, char); -SOAP_FMAC1 const char* SOAP_FMAC2 soap_short2s(struct soap*, short); -SOAP_FMAC1 const char* SOAP_FMAC2 soap_int2s(struct soap*, int); -SOAP_FMAC1 const char* SOAP_FMAC2 soap_long2s(struct soap*, long); -SOAP_FMAC1 const char* SOAP_FMAC2 soap_LONG642s(struct soap*, LONG64); -SOAP_FMAC1 const char* SOAP_FMAC2 soap_float2s(struct soap*, float); -SOAP_FMAC1 const char* SOAP_FMAC2 soap_double2s(struct soap*, double); -SOAP_FMAC1 const char* SOAP_FMAC2 soap_unsignedByte2s(struct soap*, unsigned char); -SOAP_FMAC1 const char* SOAP_FMAC2 soap_unsignedShort2s(struct soap*, unsigned short); -SOAP_FMAC1 const char* SOAP_FMAC2 soap_unsignedInt2s(struct soap*, unsigned int); -SOAP_FMAC1 const char* SOAP_FMAC2 soap_unsignedLong2s(struct soap*, unsigned long); -SOAP_FMAC1 const char* SOAP_FMAC2 soap_ULONG642s(struct soap*, ULONG64); -SOAP_FMAC1 const char* SOAP_FMAC2 soap_QName2s(struct soap*, const char*); - -#ifndef WITH_LEAN -SOAP_FMAC1 const char* SOAP_FMAC2 soap_wchar2s(struct soap*, const wchar_t*); -SOAP_FMAC1 const char* SOAP_FMAC2 soap_dateTime2s(struct soap*, time_t); -SOAP_FMAC1 const char* SOAP_FMAC2 soap_base642s(struct soap*, const char*, char*, size_t, int*); -SOAP_FMAC1 const char* SOAP_FMAC2 soap_hex2s(struct soap*, const char*, char*, size_t, int*); -#endif - - -SOAP_FMAC1 int* SOAP_FMAC2 soap_inint(struct soap*, const char *tag, int *p, const char *, int); -SOAP_FMAC1 char* SOAP_FMAC2 soap_inbyte(struct soap*, const char *tag, char *p, const char *, int); -SOAP_FMAC1 long* SOAP_FMAC2 soap_inlong(struct soap*, const char *tag, long *p, const char *, int); -SOAP_FMAC1 LONG64* SOAP_FMAC2 soap_inLONG64(struct soap*, const char *tag, LONG64 *p, const char *, int); -SOAP_FMAC1 short* SOAP_FMAC2 soap_inshort(struct soap*, const char *tag, short *p, const char *, int); -SOAP_FMAC1 float* SOAP_FMAC2 soap_infloat(struct soap*, const char *tag, float *p, const char *, int); -SOAP_FMAC1 double* SOAP_FMAC2 soap_indouble(struct soap*, const char *tag, double *p, const char *, int); -SOAP_FMAC1 unsigned char* SOAP_FMAC2 soap_inunsignedByte(struct soap*, const char *tag, unsigned char *p, const char *, int); -SOAP_FMAC1 unsigned short* SOAP_FMAC2 soap_inunsignedShort(struct soap*, const char *tag, unsigned short *p, const char *, int); -SOAP_FMAC1 unsigned int* SOAP_FMAC2 soap_inunsignedInt(struct soap*, const char *tag, unsigned int *p, const char *, int); -SOAP_FMAC1 unsigned long* SOAP_FMAC2 soap_inunsignedLong(struct soap*, const char *tag, unsigned long *p, const char *, int); -SOAP_FMAC1 ULONG64* SOAP_FMAC2 soap_inULONG64(struct soap*, const char *tag, ULONG64 *p, const char *, int); -SOAP_FMAC1 char** SOAP_FMAC2 soap_instring(struct soap*, const char *tag, char **p, const char *, int, int, long, long); -SOAP_FMAC1 char** SOAP_FMAC2 soap_inliteral(struct soap*, const char *tag, char **p); - -#ifndef WITH_LEAN -SOAP_FMAC1 time_t* SOAP_FMAC2 soap_indateTime(struct soap*, const char *tag, time_t *p, const char *, int); -#endif - -#ifndef WITH_LEANER -SOAP_FMAC1 wchar_t** SOAP_FMAC2 soap_inwstring(struct soap*, const char *tag, wchar_t **p, const char *, int, long, long); -SOAP_FMAC1 wchar_t** SOAP_FMAC2 soap_inwliteral(struct soap*, const char *tag, wchar_t **p); -#endif - -SOAP_FMAC1 int SOAP_FMAC2 soap_outbyte(struct soap*, const char *tag, int id, const char *p, const char *, int); -SOAP_FMAC1 int SOAP_FMAC2 soap_outshort(struct soap*, const char *tag, int id, const short *p, const char *, int); -SOAP_FMAC1 int SOAP_FMAC2 soap_outint(struct soap*, const char *tag, int id, const int *p, const char *, int); -SOAP_FMAC1 int SOAP_FMAC2 soap_outlong(struct soap*, const char *tag, int id, const long *p, const char *, int); -SOAP_FMAC1 int SOAP_FMAC2 soap_outLONG64(struct soap*, const char *tag, int id, const LONG64 *p, const char *, int); -SOAP_FMAC1 int SOAP_FMAC2 soap_outfloat(struct soap*, const char *tag, int id, const float *p, const char *, int); -SOAP_FMAC1 int SOAP_FMAC2 soap_outdouble(struct soap*, const char *tag, int id, const double *p, const char *, int); -SOAP_FMAC1 int SOAP_FMAC2 soap_outunsignedByte(struct soap*, const char *tag, int id, const unsigned char *p, const char *, int); -SOAP_FMAC1 int SOAP_FMAC2 soap_outunsignedShort(struct soap*, const char *tag, int id, const unsigned short *p, const char *, int); -SOAP_FMAC1 int SOAP_FMAC2 soap_outunsignedInt(struct soap*, const char *tag, int id, const unsigned int *p, const char *, int); -SOAP_FMAC1 int SOAP_FMAC2 soap_outunsignedLong(struct soap*, const char *tag, int id, const unsigned long *p, const char *, int); -SOAP_FMAC1 int SOAP_FMAC2 soap_outULONG64(struct soap*, const char *tag, int id, const ULONG64 *p, const char *, int); -SOAP_FMAC1 int SOAP_FMAC2 soap_outstring(struct soap*, const char *tag, int id, char *const*p, const char *, int); -SOAP_FMAC1 int SOAP_FMAC2 soap_outliteral(struct soap*, const char *tag, char *const*p, const char *type); - -#ifndef WITH_LEAN -SOAP_FMAC1 int SOAP_FMAC2 soap_outdateTime(struct soap*, const char *tag, int id, const time_t *p, const char *, int); -#endif - -#ifndef WITH_LEANER -SOAP_FMAC1 int SOAP_FMAC2 soap_outwstring(struct soap*, const char *tag, int id, wchar_t *const*p, const char *, int); -SOAP_FMAC1 int SOAP_FMAC2 soap_outwliteral(struct soap*, const char *tag, wchar_t *const*p, const char *type); -#endif - -#ifndef WITH_LEANER -SOAP_FMAC1 int SOAP_FMAC2 soap_attachment(struct soap *, const char*, int, const void*, const struct soap_array*, const char*, const char*, const char*, int, const char*, int); -SOAP_FMAC1 int SOAP_FMAC2 soap_move(struct soap*, long); -SOAP_FMAC1 size_t SOAP_FMAC2 soap_tell(struct soap*); -SOAP_FMAC1 char* SOAP_FMAC2 soap_dime_option(struct soap*, unsigned short, const char*); -SOAP_FMAC1 int SOAP_FMAC2 soap_getdimehdr(struct soap*); -SOAP_FMAC1 int SOAP_FMAC2 soap_getdime(struct soap*); -SOAP_FMAC1 int SOAP_FMAC2 soap_putdimehdr(struct soap*); -SOAP_FMAC1 int SOAP_FMAC2 soap_putdime(struct soap*); -SOAP_FMAC1 int SOAP_FMAC2 soap_getmimehdr(struct soap*); -SOAP_FMAC1 int SOAP_FMAC2 soap_getmime(struct soap*); -SOAP_FMAC1 int SOAP_FMAC2 soap_putmimehdr(struct soap*, struct soap_multipart*); -SOAP_FMAC1 int SOAP_FMAC2 soap_putmime(struct soap*); -SOAP_FMAC1 void SOAP_FMAC2 soap_set_dime(struct soap*); -SOAP_FMAC1 void SOAP_FMAC2 soap_set_mime(struct soap*, const char *boundary, const char *start); -SOAP_FMAC1 void SOAP_FMAC2 soap_clr_dime(struct soap*); -SOAP_FMAC1 void SOAP_FMAC2 soap_clr_mime(struct soap*); -SOAP_FMAC1 int SOAP_FMAC2 soap_set_dime_attachment(struct soap*, char *ptr, size_t size, const char *type, const char *id, unsigned short optype, const char *option); -SOAP_FMAC1 int SOAP_FMAC2 soap_set_mime_attachment(struct soap*, char *ptr, size_t size, enum soap_mime_encoding encoding, const char *type, const char *id, const char *location, const char *description); -SOAP_FMAC1 void SOAP_FMAC2 soap_post_check_mime_attachments(struct soap *soap); -SOAP_FMAC1 int SOAP_FMAC2 soap_check_mime_attachments(struct soap *soap); -SOAP_FMAC1 struct soap_multipart* SOAP_FMAC2 soap_get_mime_attachment(struct soap *soap, void *handle); -SOAP_FMAC1 struct soap_multipart* SOAP_FMAC2 soap_next_multipart(struct soap_multipart*); -SOAP_FMAC1 int SOAP_FMAC2 soap_match_cid(struct soap*, const char*, const char*); -#endif - -SOAP_FMAC1 int SOAP_FMAC2 soap_register_plugin_arg(struct soap*, int (*fcreate)(struct soap*, struct soap_plugin*, void*), void*); -SOAP_FMAC1 void* SOAP_FMAC2 soap_lookup_plugin(struct soap*, const char*); - -SOAP_FMAC1 const char* SOAP_FMAC2 soap_attr_value(struct soap *soap, const char *name, int flag); -SOAP_FMAC1 int SOAP_FMAC2 soap_set_attr(struct soap *soap, const char *name, const char *value); -SOAP_FMAC1 void SOAP_FMAC2 soap_clr_attr(struct soap *soap); - -#ifdef WITH_COOKIES -SOAP_FMAC1 void SOAP_FMAC2 soap_getcookies(struct soap *soap, const char *val); -SOAP_FMAC1 size_t SOAP_FMAC2 soap_encode_cookie(const char*, char*, size_t); -SOAP_FMAC1 extern struct soap_cookie* SOAP_FMAC2 soap_set_cookie(struct soap*, const char*, const char*, const char*, const char*); -SOAP_FMAC1 extern struct soap_cookie* SOAP_FMAC2 soap_cookie(struct soap*, const char*, const char*, const char*); -SOAP_FMAC1 extern char* SOAP_FMAC2 soap_cookie_value(struct soap*, const char*, const char*, const char*); -SOAP_FMAC1 extern char* SOAP_FMAC2 soap_env_cookie_value(struct soap*, const char*, const char*, const char*); -SOAP_FMAC1 extern time_t SOAP_FMAC2 soap_cookie_expire(struct soap*, const char*, const char*, const char*); -SOAP_FMAC1 extern int SOAP_FMAC2 soap_set_cookie_expire(struct soap*, const char*, long, const char*, const char*); -SOAP_FMAC1 extern int SOAP_FMAC2 soap_set_cookie_session(struct soap*, const char*, const char*, const char*); -SOAP_FMAC1 extern int SOAP_FMAC2 soap_clr_cookie_session(struct soap*, const char*, const char*, const char*); -SOAP_FMAC1 extern void SOAP_FMAC2 soap_clr_cookie(struct soap*, const char*, const char*, const char*); -SOAP_FMAC1 extern int SOAP_FMAC2 soap_getenv_cookies(struct soap*); -SOAP_FMAC1 extern struct soap_cookie* SOAP_FMAC2 soap_copy_cookies(struct soap*, struct soap*); -SOAP_FMAC1 extern void SOAP_FMAC2 soap_free_cookies(struct soap*); -#endif - -#ifdef __cplusplus -} /* extern "C" */ -#endif - -#endif - diff --git a/org.glite.security.gsoap-plugin/src/stdsoap2_2.7.9d.c b/org.glite.security.gsoap-plugin/src/stdsoap2_2.7.9d.c deleted file mode 100644 index efff89b..0000000 --- a/org.glite.security.gsoap-plugin/src/stdsoap2_2.7.9d.c +++ /dev/null @@ -1,14414 +0,0 @@ -/* - -stdsoap2.c[pp] 2.7.9d - -gSOAP runtime - -gSOAP XML Web services tools -Copyright (C) 2000-2007, Robert van Engelen, Genivia Inc., All Rights Reserved. -This part of the software is released under one of the following licenses: -GPL, the gSOAP public license, or Genivia's license for commercial use. --------------------------------------------------------------------------------- -Contributors: - -Wind River Systems Inc., for the following additions under gSOAP public license: - - vxWorks compatible (#define VXWORKS) --------------------------------------------------------------------------------- -gSOAP public license. - -The contents of this file are subject to the gSOAP Public License Version 1.3 -(the "License"); you may not use this file except in compliance with the -License. You may obtain a copy of the License at -http://www.cs.fsu.edu/~engelen/soaplicense.html -Software distributed under the License is distributed on an "AS IS" basis, -WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License -for the specific language governing rights and limitations under the License. - -The Initial Developer of the Original Code is Robert A. van Engelen. -Copyright (C) 2000-2007, Robert van Engelen, Genivia Inc., All Rights Reserved. --------------------------------------------------------------------------------- -GPL license. - -This program is free software; you can redistribute it and/or modify it under -the terms of the GNU General Public License as published by the Free Software -Foundation; either version 2 of the License, or (at your option) any later -version. - -This program is distributed in the hope that it will be useful, but WITHOUT ANY -WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A -PARTICULAR PURPOSE. See the GNU General Public License for more details. - -You should have received a copy of the GNU General Public License along with -this program; if not, write to the Free Software Foundation, Inc., 59 Temple -Place, Suite 330, Boston, MA 02111-1307 USA - -Author contact information: -engelen@genivia.com / engelen@acm.org --------------------------------------------------------------------------------- -A commercial use license is available from Genivia, Inc., contact@genivia.com --------------------------------------------------------------------------------- - -Installation note: - -Win32 build needs winsock.dll (Visual C++ "wsock32.lib") -To do this in Visual C++ 6.0, go to "Project", "settings", select the "Link" -tab (the project file needs to be selected in the file view) and add -"wsock32.lib" to the "Object/library modules" entry - -On Mac OS X with gcc (GCC) 3.1 20020420 (prerelease) you MUST compile with --fstack_check when using -O2 because gcc 3.1 has a bug that smashes the stack -when locally allocated data exceeds 64K. - -*/ - -#ifdef AS400 -# pragma convert(819) /* EBCDIC to ASCII */ -#endif - -#include "stdsoap2.h" - -#ifdef WIN32 -# pragma comment(lib, "wsock32.lib") -#endif - -#ifdef __cplusplus -SOAP_SOURCE_STAMP("@(#) stdsoap2.cpp ver 2.7.9d 2007-02-19 12:00:00 GMT") -extern "C" { -#else -SOAP_SOURCE_STAMP("@(#) stdsoap2.c ver 2.7.9d 2007-02-19 12:00:00 GMT") -#endif - -/* 8bit character representing unknown/nonrepresentable character data (e.g. not supported by current locale with multibyte support enabled) */ -#ifndef SOAP_UNKNOWN_CHAR -#define SOAP_UNKNOWN_CHAR (127) -#endif - -/* EOF=-1 */ -#define SOAP_LT (soap_wchar)(-2) /* XML character '<' */ -#define SOAP_TT (soap_wchar)(-3) /* XML character '' */ -#define SOAP_QT (soap_wchar)(-5) /* XML character '"' */ -#define SOAP_AP (soap_wchar)(-6) /* XML character ''' */ - -#define soap_blank(c) ((c) >= 0 && (c) <= 32) -#define soap_notblank(c) ((c) > 32) - -#ifdef WIN32 -#define soap_hash_ptr(p) ((PtrToUlong(p) >> 3) & (SOAP_PTRHASH - 1)) -#else -#define soap_hash_ptr(p) ((size_t)(((unsigned long)(p) >> 3) & (SOAP_PTRHASH-1))) -#endif - -#ifdef SOAP_DEBUG -static void soap_init_logs(struct soap*); -static void soap_close_logfile(struct soap*, int); -static void soap_set_logfile(struct soap*, int, const char*); -#endif - -#ifdef SOAP_MEM_DEBUG -static void soap_init_mht(struct soap*); -static void soap_free_mht(struct soap*); -static void soap_track_unlink(struct soap*, const void*); -#endif - -#ifndef PALM_2 -static int soap_set_error(struct soap*, const char*, const char*, const char*, const char*, int); -static int soap_copy_fault(struct soap*, const char*, const char*, const char*, const char*); -static int soap_getattrval(struct soap*, char*, size_t, soap_wchar); -#endif - -#ifndef PALM_1 -static soap_wchar soap_char(struct soap*); -static soap_wchar soap_get_pi(struct soap*); -static int soap_isxdigit(int); -static void *fplugin(struct soap*, const char*); -#ifndef WITH_NOIDREF -static void soap_update_ptrs(struct soap*, char*, char*, char*, char*); -static int soap_has_copies(struct soap*, const char*, const char*); -static void soap_init_iht(struct soap*); -static void soap_free_iht(struct soap*); -static void soap_init_pht(struct soap*); -static void soap_free_pht(struct soap*); -#endif -#endif - -#ifndef WITH_LEAN -static const char *soap_set_validation_fault(struct soap*, const char*, const char*); -static int soap_isnumeric(struct soap*, const char*); -static time_t soap_timegm(struct tm*); -static struct soap_nlist *soap_push_ns(struct soap *soap, const char *id, const char *ns, short utilized); -static void soap_pop_ns(struct soap *soap); -static void soap_utilize_ns(struct soap *soap, const char *tag, size_t n); -#endif - -#ifndef WITH_LEANER -#ifndef PALM_1 -static struct soap_multipart *soap_new_multipart(struct soap*, struct soap_multipart**, struct soap_multipart**, char*, size_t); -static int soap_putdimefield(struct soap*, const char*, size_t); -static char *soap_getdimefield(struct soap*, size_t); -static void soap_select_mime_boundary(struct soap*); -static int soap_valid_mime_boundary(struct soap*); -static void soap_resolve_attachment(struct soap*, struct soap_multipart*); -#endif -#endif - -#ifdef WITH_GZIP -static int soap_getgziphdr(struct soap*); -#endif - -#ifdef WITH_OPENSSL -static int ssl_init_done = 0; -static int ssl_auth_init(struct soap*); -static int ssl_verify_callback(int, X509_STORE_CTX*); -static int ssl_password(char*, int, int, void *); -/* This callback is included for future references. It should not be deleted -static DH *ssl_tmp_dh(SSL*, int, int); -*/ -#endif - -#if !defined(WITH_NOHTTP) || !defined(WITH_LEANER) -#ifndef PALM_1 -static const char *soap_decode(char*, size_t, const char*, const char*); -#endif -#endif - -#ifndef WITH_NOHTTP -#ifndef PALM_1 -static soap_wchar soap_getchunkchar(struct soap*); -static const char *http_error(struct soap*, int); -static int http_post(struct soap*, const char*, const char*, int, const char*, const char*, size_t); -static int http_get(struct soap*); -static int http_send_header(struct soap*, const char*); -static int http_post_header(struct soap*, const char*, const char*); -static int http_response(struct soap*, int, size_t); -static int http_parse(struct soap*); -static int http_parse_header(struct soap*, const char*, const char*); -#endif -#endif - -#ifndef WITH_NOIO -#ifndef PALM_1 -static int fsend(struct soap*, const char*, size_t); -static size_t frecv(struct soap*, char*, size_t); -static int tcp_init(struct soap*); -static const char *tcp_error(struct soap*); -#ifndef WITH_LEAN -static size_t frecv_stop(struct soap*, char*, size_t); -#endif -#ifndef WITH_IPV6 -static int tcp_gethost(struct soap*, const char *addr, struct in_addr *inaddr); -#endif -static int tcp_connect(struct soap*, const char *endpoint, const char *host, int port); -static int tcp_accept(struct soap*, int, struct sockaddr*, int*); -static int tcp_disconnect(struct soap*); -static int tcp_closesocket(struct soap*, SOAP_SOCKET); -static int tcp_shutdownsocket(struct soap*, SOAP_SOCKET, int); -static const char *soap_strerror(struct soap*); -#endif -#endif - -#if defined(PALM) && !defined(PALM_2) -unsigned short errno; -#endif - -#ifndef PALM_1 -static const char soap_env1[42] = "http://schemas.xmlsoap.org/soap/envelope/"; -static const char soap_enc1[42] = "http://schemas.xmlsoap.org/soap/encoding/"; -static const char soap_env2[40] = "http://www.w3.org/2003/05/soap-envelope"; -static const char soap_enc2[40] = "http://www.w3.org/2003/05/soap-encoding"; -static const char soap_rpc[35] = "http://www.w3.org/2003/05/soap-rpc"; -#endif - -#ifndef PALM_1 -const struct soap_double_nan soap_double_nan = {0xFFFFFFFF, 0xFFFFFFFF}; -static const char soap_base64o[65] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; -static const char soap_base64i[81] = "\76XXX\77\64\65\66\67\70\71\72\73\74\75XXXXXXX\00\01\02\03\04\05\06\07\10\11\12\13\14\15\16\17\20\21\22\23\24\25\26\27\30\31XXXXXX\32\33\34\35\36\37\40\41\42\43\44\45\46\47\50\51\52\53\54\55\56\57\60\61\62\63"; -#endif - -#ifndef WITH_LEAN -static const char soap_indent[11] = "\n\t\t\t\t\t\t\t\t\t"; -/* Alternative indentation form for SOAP_XML_INDENT: -static const char soap_indent[21] = "\n "; -*/ -#endif - -#ifndef SOAP_CANARY -# define SOAP_CANARY (0xC0DE) -#endif - -static const char soap_padding[4] = "\0\0\0"; -#define SOAP_STR_PADDING (soap_padding) -#define SOAP_STR_EOS (soap_padding) -#define SOAP_NON_NULL (soap_padding) - -#ifndef WITH_LEAN -static const struct soap_code_map html_entity_codes[] = /* entities for XHTML parsing */ -{ { 160, "nbsp" }, - { 161, "iexcl" }, - { 162, "cent" }, - { 163, "pound" }, - { 164, "curren" }, - { 165, "yen" }, - { 166, "brvbar" }, - { 167, "sect" }, - { 168, "uml" }, - { 169, "copy" }, - { 170, "ordf" }, - { 171, "laquo" }, - { 172, "not" }, - { 173, "shy" }, - { 174, "reg" }, - { 175, "macr" }, - { 176, "deg" }, - { 177, "plusmn" }, - { 178, "sup2" }, - { 179, "sup3" }, - { 180, "acute" }, - { 181, "micro" }, - { 182, "para" }, - { 183, "middot" }, - { 184, "cedil" }, - { 185, "sup1" }, - { 186, "ordm" }, - { 187, "raquo" }, - { 188, "frac14" }, - { 189, "frac12" }, - { 190, "frac34" }, - { 191, "iquest" }, - { 192, "Agrave" }, - { 193, "Aacute" }, - { 194, "Acirc" }, - { 195, "Atilde" }, - { 196, "Auml" }, - { 197, "Aring" }, - { 198, "AElig" }, - { 199, "Ccedil" }, - { 200, "Egrave" }, - { 201, "Eacute" }, - { 202, "Ecirc" }, - { 203, "Euml" }, - { 204, "Igrave" }, - { 205, "Iacute" }, - { 206, "Icirc" }, - { 207, "Iuml" }, - { 208, "ETH" }, - { 209, "Ntilde" }, - { 210, "Ograve" }, - { 211, "Oacute" }, - { 212, "Ocirc" }, - { 213, "Otilde" }, - { 214, "Ouml" }, - { 215, "times" }, - { 216, "Oslash" }, - { 217, "Ugrave" }, - { 218, "Uacute" }, - { 219, "Ucirc" }, - { 220, "Uuml" }, - { 221, "Yacute" }, - { 222, "THORN" }, - { 223, "szlig" }, - { 224, "agrave" }, - { 225, "aacute" }, - { 226, "acirc" }, - { 227, "atilde" }, - { 228, "auml" }, - { 229, "aring" }, - { 230, "aelig" }, - { 231, "ccedil" }, - { 232, "egrave" }, - { 233, "eacute" }, - { 234, "ecirc" }, - { 235, "euml" }, - { 236, "igrave" }, - { 237, "iacute" }, - { 238, "icirc" }, - { 239, "iuml" }, - { 240, "eth" }, - { 241, "ntilde" }, - { 242, "ograve" }, - { 243, "oacute" }, - { 244, "ocirc" }, - { 245, "otilde" }, - { 246, "ouml" }, - { 247, "divide" }, - { 248, "oslash" }, - { 249, "ugrave" }, - { 250, "uacute" }, - { 251, "ucirc" }, - { 252, "uuml" }, - { 253, "yacute" }, - { 254, "thorn" }, - { 255, "yuml" }, - { 0, NULL } -}; -#endif - -#ifndef WITH_NOIO -#ifndef WITH_LEAN -static const struct soap_code_map h_error_codes[] = -{ -#ifdef HOST_NOT_FOUND - { HOST_NOT_FOUND, "Host not found" }, -#endif -#ifdef TRY_AGAIN - { TRY_AGAIN, "Try Again" }, -#endif -#ifdef NO_RECOVERY - { NO_RECOVERY, "No Recovery" }, -#endif -#ifdef NO_DATA - { NO_DATA, "No Data" }, -#endif -#ifdef NO_ADDRESS - { NO_ADDRESS, "No Address" }, -#endif - { 0, NULL } -}; -#endif -#endif - -#ifndef WITH_NOHTTP -#ifndef WITH_LEAN -static const struct soap_code_map h_http_error_codes[] = -{ { 200, "OK" }, - { 201, "Created" }, - { 202, "Accepted" }, - { 203, "Non-Authoritative Information" }, - { 204, "No Content" }, - { 205, "Reset Content" }, - { 206, "Partial Content" }, - { 300, "Multiple Choices" }, - { 301, "Moved Permanently" }, - { 302, "Found" }, - { 303, "See Other" }, - { 304, "Not Modified" }, - { 305, "Use Proxy" }, - { 307, "Temporary Redirect" }, - { 400, "Bad Request" }, - { 401, "Unauthorized" }, - { 402, "Payment Required" }, - { 403, "Forbidden" }, - { 404, "Not Found" }, - { 405, "Method Not Allowed" }, - { 406, "Not Acceptable" }, - { 407, "Proxy Authentication Required" }, - { 408, "Request Time-out" }, - { 409, "Conflict" }, - { 410, "Gone" }, - { 411, "Length Required" }, - { 412, "Precondition Failed" }, - { 413, "Request Entity Too Large" }, - { 414, "Request-URI Too Large" }, - { 415, "Unsupported Media Type" }, - { 416, "Requested range not satisfiable" }, - { 417, "Expectation Failed" }, - { 500, "Internal Server Error" }, - { 501, "Not Implemented" }, - { 502, "Bad Gateway" }, - { 503, "Service Unavailable" }, - { 504, "Gateway Time-out" }, - { 505, "HTTP Version not supported" }, - { 0, NULL } -}; -#endif -#endif - -#ifdef WITH_OPENSSL -static const struct soap_code_map h_ssl_error_codes[] = -{ -#define _SSL_ERROR(e) { e, #e } - _SSL_ERROR(SSL_ERROR_SSL), - _SSL_ERROR(SSL_ERROR_ZERO_RETURN), - _SSL_ERROR(SSL_ERROR_WANT_READ), - _SSL_ERROR(SSL_ERROR_WANT_WRITE), - _SSL_ERROR(SSL_ERROR_WANT_CONNECT), - _SSL_ERROR(SSL_ERROR_WANT_X509_LOOKUP), - _SSL_ERROR(SSL_ERROR_SYSCALL), - { 0, NULL } -}; -#endif - -#ifndef WITH_LEANER -static const struct soap_code_map mime_codes[] = -{ { SOAP_MIME_7BIT, "7bit" }, - { SOAP_MIME_8BIT, "8bit" }, - { SOAP_MIME_BINARY, "binary" }, - { SOAP_MIME_QUOTED_PRINTABLE, "quoted-printable" }, - { SOAP_MIME_BASE64, "base64" }, - { SOAP_MIME_IETF_TOKEN, "ietf-token" }, - { SOAP_MIME_X_TOKEN, "x-token" }, - { 0, NULL } -}; -#endif - -#ifdef WIN32 -static int tcp_done = 0; -#endif - -/******************************************************************************/ -#ifndef WITH_NOIO -#ifndef PALM_1 -static int -fsend(struct soap *soap, const char *s, size_t n) -{ register int nwritten, err; -#if defined(__cplusplus) && !defined(WITH_LEAN) - if (soap->os) - { soap->os->write(s, n); - if (soap->os->good()) - return SOAP_OK; - return SOAP_EOF; - } -#endif - while (n) - { if (soap_valid_socket(soap->socket)) - { -#ifndef WITH_LEAN - if (soap->send_timeout) - { struct timeval timeout; - fd_set fd; - if (soap->send_timeout > 0) - { timeout.tv_sec = soap->send_timeout; - timeout.tv_usec = 0; - } - else - { timeout.tv_sec = -soap->send_timeout/1000000; - timeout.tv_usec = -soap->send_timeout%1000000; - } -#ifndef WIN32 - if ((int)soap->socket >= (int)FD_SETSIZE) - return SOAP_FD_EXCEEDED; /* Hint: MUST increase FD_SETSIZE */ -#endif - FD_ZERO(&fd); - FD_SET((SOAP_SOCKET)soap->socket, &fd); - for (;;) - { register int r; -#ifdef WITH_OPENSSL - if (soap->ssl) - r = select((SOAP_SOCKET)(soap->socket + 1), &fd, &fd, &fd, &timeout); - else -#endif - r = select((SOAP_SOCKET)(soap->socket + 1), NULL, &fd, &fd, &timeout); - if (r > 0) - break; - if (!r) - { soap->errnum = 0; - return SOAP_EOF; - } - err = soap_socket_errno(soap->socket); - if (err != SOAP_EINTR && err != SOAP_EAGAIN) - { soap->errnum = err; - return SOAP_EOF; - } - } - } -#endif -#ifdef WITH_OPENSSL - if (soap->ssl) - nwritten = SSL_write(soap->ssl, s, n); - else if (soap->bio) - nwritten = BIO_write(soap->bio, s, n); - else -#endif -#ifdef WITH_UDP - if ((soap->omode & SOAP_IO_UDP)) - { if (soap->peerlen) - nwritten = sendto((SOAP_SOCKET)soap->socket, s, n, soap->socket_flags, (struct sockaddr*)&soap->peer, soap->peerlen); - else - nwritten = send((SOAP_SOCKET)soap->socket, s, n, soap->socket_flags); - /* retry and back-off algorithm */ - /* TODO: this is not very clear from specs so verify and limit conditions under which we should loop (e.g. ENOBUFS) */ - if (nwritten < 0) - { struct timeval timeout; - fd_set fd; - int udp_repeat; - int udp_delay; -#ifndef WIN32 - if ((int)soap->socket >= (int)FD_SETSIZE) - return SOAP_FD_EXCEEDED; /* Hint: MUST increase FD_SETSIZE */ -#endif - if ((soap->connect_flags & SO_BROADCAST)) - udp_repeat = 3; /* SOAP-over-UDP MULTICAST_UDP_REPEAT - 1 */ - else - udp_repeat = 1; /* SOAP-over-UDP UNICAST_UDP_REPEAT - 1 */ - udp_delay = (soap_random % 201) + 50; /* UDP_MIN_DELAY .. UDP_MAX_DELAY */ - do - { timeout.tv_sec = 0; - timeout.tv_usec = 1000 * udp_delay; /* ms */ - FD_ZERO(&fd); - FD_SET((SOAP_SOCKET)soap->socket, &fd); - select((SOAP_SOCKET)(soap->socket + 1), NULL, NULL, &fd, &timeout); - if (soap->peerlen) - nwritten = sendto((SOAP_SOCKET)soap->socket, s, n, soap->socket_flags, (struct sockaddr*)&soap->peer, soap->peerlen); - else - nwritten = send((SOAP_SOCKET)soap->socket, s, n, soap->socket_flags); - udp_delay <<= 1; - if (udp_delay > 500) /* UDP_UPPER_DELAY */ - udp_delay = 500; - } - while (nwritten < 0 && --udp_repeat > 0); - } - } - else -#endif -#if !defined(PALM) && !defined(AS400) - nwritten = send((SOAP_SOCKET)soap->socket, s, n, soap->socket_flags); -#else - nwritten = send((SOAP_SOCKET)soap->socket, (void*)s, n, soap->socket_flags); -#endif - if (nwritten <= 0) - { register int r; -#ifdef WITH_OPENSSL - if (soap->ssl && (r = SSL_get_error(soap->ssl, nwritten)) != SSL_ERROR_NONE && r != SSL_ERROR_WANT_READ && r != SSL_ERROR_WANT_WRITE) - return SOAP_EOF; -#endif - err = soap_socket_errno(soap->socket); - if (err == SOAP_EWOULDBLOCK || err == SOAP_EAGAIN) - { -#ifndef WITH_LEAN - struct timeval timeout; - fd_set fd; - if (soap->send_timeout > 0) - { timeout.tv_sec = soap->send_timeout; - timeout.tv_usec = 0; - } - else if (soap->send_timeout < 0) - { timeout.tv_sec = -soap->send_timeout/1000000; - timeout.tv_usec = -soap->send_timeout%1000000; - } - else - { timeout.tv_sec = 0; - timeout.tv_usec = 10000; - } -#ifndef WIN32 - if ((int)soap->socket >= (int)FD_SETSIZE) - return SOAP_FD_EXCEEDED; /* Hint: MUST increase FD_SETSIZE */ -#endif - FD_ZERO(&fd); - FD_SET((SOAP_SOCKET)soap->socket, &fd); -#ifdef WITH_OPENSSL - if (soap->ssl && r == SSL_ERROR_WANT_READ) - r = select((SOAP_SOCKET)(soap->socket + 1), &fd, NULL, &fd, &timeout); - else - r = select((SOAP_SOCKET)(soap->socket + 1), NULL, &fd, &fd, &timeout); -#else - r = select((SOAP_SOCKET)(soap->socket + 1), NULL, &fd, &fd, &timeout); -#endif - if (r < 0 && (r = soap_socket_errno(soap->socket)) != SOAP_EINTR) - { soap->errnum = r; - return SOAP_EOF; - } -#endif - } - else if (err && err != SOAP_EINTR) - { soap->errnum = err; - return SOAP_EOF; - } - nwritten = 0; /* and call write() again */ - } - } - else - { -#ifdef WITH_FASTCGI - nwritten = fwrite((void*)s, 1, n, stdout); - fflush(stdout); -#else -#ifdef UNDER_CE - nwritten = fwrite(s, 1, n, soap->sendfd); -#else -#ifdef VXWORKS -#ifdef WMW_RPM_IO - if (soap->rpmreqid) - nwritten = (httpBlockPut(soap->rpmreqid, s, n) == 0) ? n : -1; - else -#endif - nwritten = fwrite(s, sizeof(char), n, fdopen(soap->sendfd, "w")); -#else - nwritten = write((SOAP_SOCKET)soap->sendfd, s, n); -#endif -#endif -#endif - if (nwritten <= 0) - { err = soap_errno; - if (err && err != SOAP_EINTR && err != SOAP_EWOULDBLOCK && err != SOAP_EAGAIN) - { soap->errnum = err; - return SOAP_EOF; - } - nwritten = 0; /* and call write() again */ - } - } - n -= nwritten; - s += nwritten; - } - return SOAP_OK; -} -#endif -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_send_raw(struct soap *soap, const char *s, size_t n) -{ if (!n) - return SOAP_OK; - if (soap->mode & SOAP_IO_LENGTH) - { soap->count += n; -#ifndef WITH_LEANER - if (soap->fpreparesend && (soap->mode & SOAP_IO) != SOAP_IO_STORE) - return soap->error = soap->fpreparesend(soap, s, n); -#endif - return SOAP_OK; - } - if (soap->mode & SOAP_IO) - { register size_t i = SOAP_BUFLEN - soap->bufidx; - while (n >= i) - { memcpy(soap->buf + soap->bufidx, s, i); - soap->bufidx = SOAP_BUFLEN; - if (soap_flush(soap)) - return soap->error; - s += i; - n -= i; - i = SOAP_BUFLEN; - } - memcpy(soap->buf + soap->bufidx, s, n); - soap->bufidx += n; - return SOAP_OK; - } - return soap_flush_raw(soap, s, n); -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_flush(struct soap *soap) -{ register int n = soap->bufidx; - if (n) - { soap->bufidx = 0; -#ifdef WITH_ZLIB - if (soap->mode & SOAP_ENC_ZLIB) - { soap->d_stream.next_in = (Byte*)soap->buf; - soap->d_stream.avail_in = (unsigned int)n; -#ifdef WITH_GZIP - soap->z_crc = crc32(soap->z_crc, (Byte*)soap->buf, (unsigned int)n); -#endif - do - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Deflating %u bytes\n", soap->d_stream.avail_in)); - if (deflate(&soap->d_stream, Z_NO_FLUSH) != Z_OK) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Unable to deflate: %s\n", soap->d_stream.msg?soap->d_stream.msg:"")); - return soap->error = SOAP_ZLIB_ERROR; - } - if (!soap->d_stream.avail_out) - { if (soap_flush_raw(soap, soap->z_buf, SOAP_BUFLEN)) - return soap->error; - soap->d_stream.next_out = (Byte*)soap->z_buf; - soap->d_stream.avail_out = SOAP_BUFLEN; - } - } while (soap->d_stream.avail_in); - } - else -#endif - return soap_flush_raw(soap, soap->buf, n); - } - return SOAP_OK; -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_flush_raw(struct soap *soap, const char *s, size_t n) -{ if ((soap->mode & SOAP_IO) == SOAP_IO_STORE) - { register char *t; - if (!(t = (char*)soap_push_block(soap, n))) - return soap->error = SOAP_EOM; - memcpy(t, s, n); -#ifndef WITH_LEANER - if (soap->fpreparesend) - return soap->error = soap->fpreparesend(soap, s, n); -#endif - return SOAP_OK; - } -#ifndef WITH_LEANER - if ((soap->mode & SOAP_IO) == SOAP_IO_CHUNK) - { char t[16]; - sprintf(t, "\r\n%lX\r\n" + (soap->chunksize ? 0 : 2), (unsigned long)n); - DBGMSG(SENT, t, strlen(t)); - if ((soap->error = soap->fsend(soap, t, strlen(t)))) - return soap->error; - soap->chunksize += n; - } - DBGMSG(SENT, s, n); -#endif - return soap->error = soap->fsend(soap, s, n); -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_send(struct soap *soap, const char *s) -{ if (s) - return soap_send_raw(soap, s, strlen(s)); - return SOAP_OK; -} -#endif - -/******************************************************************************/ -#ifndef WITH_LEANER -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_send2(struct soap *soap, const char *s1, const char *s2) -{ if (soap_send(soap, s1)) - return soap->error; - return soap_send(soap, s2); -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_LEANER -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_send3(struct soap *soap, const char *s1, const char *s2, const char *s3) -{ if (soap_send(soap, s1) - || soap_send(soap, s2)) - return soap->error; - return soap_send(soap, s3); -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_NOIO -#ifndef PALM_1 -static size_t -frecv(struct soap *soap, char *s, size_t n) -{ register int r; -#ifdef PALM - register int timeouts = 10; -#endif - soap->errnum = 0; -#if defined(__cplusplus) && !defined(WITH_LEAN) - if (soap->is) - { if (soap->is->good()) - return soap->is->read(s, n).gcount(); - return 0; - } -#endif - if (soap_valid_socket(soap->socket)) - { for (;;) - { -#ifdef WITH_OPENSSL - register int err = 0; -#endif -#ifndef WITH_LEAN - if (soap->recv_timeout) - { struct timeval timeout; - fd_set fd; - if (soap->recv_timeout > 0) - { timeout.tv_sec = soap->recv_timeout; - timeout.tv_usec = 0; - } - else - { timeout.tv_sec = -soap->recv_timeout/1000000; - timeout.tv_usec = -soap->recv_timeout%1000000; - } -#ifndef WIN32 - if ((int)soap->socket >= (int)FD_SETSIZE) - { soap->error = SOAP_FD_EXCEEDED; - return 0; /* Hint: MUST increase FD_SETSIZE */ - } -#endif - FD_ZERO(&fd); - FD_SET((SOAP_SOCKET)soap->socket, &fd); - for (;;) - { -#ifdef WITH_OPENSSL - if (soap->ssl) - r = select((SOAP_SOCKET)(soap->socket + 1), &fd, &fd, &fd, &timeout); - else - r = select((SOAP_SOCKET)(soap->socket + 1), &fd, NULL, &fd, &timeout); -#else - r = select((SOAP_SOCKET)(soap->socket + 1), &fd, NULL, &fd, &timeout); -#endif - if (r > 0) - break; - if (!r) - { soap->errnum = 0; - return 0; - } - r = soap_socket_errno(soap->socket); - if (r != SOAP_EINTR && r != SOAP_EAGAIN) - { soap->errnum = r; - return 0; - } - } - } -#endif -#ifdef WITH_OPENSSL - if (soap->ssl) - { r = SSL_read(soap->ssl, s, n); - if (r > 0) - return (size_t)r; - err = SSL_get_error(soap->ssl, r); - if (err != SSL_ERROR_NONE && err != SSL_ERROR_WANT_READ && err != SSL_ERROR_WANT_WRITE) - return 0; - } - else if (soap->bio) - { r = BIO_read(soap->bio, s, n); - if (r > 0) - return (size_t)r; - return 0; - } - else -#endif - { -#ifdef WITH_UDP - if ((soap->omode & SOAP_IO_UDP)) - { SOAP_SOCKLEN_T k = (SOAP_SOCKLEN_T)sizeof(soap->peer); - memset((void*)&soap->peer, 0, sizeof(soap->peer)); - r = recvfrom((SOAP_SOCKET)soap->socket, s, n, soap->socket_flags, (struct sockaddr*)&soap->peer, &k); /* portability note: see SOAP_SOCKLEN_T definition in stdsoap2.h */ - soap->peerlen = (size_t)k; -#ifndef WITH_IPV6 - soap->ip = ntohl(soap->peer.sin_addr.s_addr); -#endif - } - else -#endif - r = recv((SOAP_SOCKET)soap->socket, s, n, soap->socket_flags); -#ifdef PALM - /* CycleSyncDisplay(curStatusMsg); */ -#endif - if (r >= 0) - return (size_t)r; - r = soap_socket_errno(soap->socket); - if (r != SOAP_EINTR && r != SOAP_EAGAIN && r != SOAP_EWOULDBLOCK) - { soap->errnum = r; - return 0; - } - } -#ifndef WITH_LEAN - { struct timeval timeout; - fd_set fd; - if (soap->recv_timeout > 0) - { timeout.tv_sec = soap->recv_timeout; - timeout.tv_usec = 0; - } - else if (soap->recv_timeout < 0) - { timeout.tv_sec = -soap->recv_timeout/1000000; - timeout.tv_usec = -soap->recv_timeout%1000000; - } - else - { timeout.tv_sec = 0; - timeout.tv_usec = 10000; - } -#ifndef WIN32 - if ((int)soap->socket >= (int)FD_SETSIZE) - { soap->error = SOAP_FD_EXCEEDED; - return 0; /* Hint: MUST increase FD_SETSIZE */ - } -#endif - FD_ZERO(&fd); - FD_SET((SOAP_SOCKET)soap->socket, &fd); -#ifdef WITH_OPENSSL - if (soap->ssl && err == SSL_ERROR_WANT_WRITE) - r = select((SOAP_SOCKET)(soap->socket + 1), NULL, &fd, &fd, &timeout); - else - r = select((SOAP_SOCKET)(soap->socket + 1), &fd, NULL, &fd, &timeout); -#else - r = select((SOAP_SOCKET)(soap->socket + 1), &fd, NULL, &fd, &timeout); -#endif - if (r < 0 && (r = soap_socket_errno(soap->socket)) != SOAP_EINTR) - { soap->errnum = r; - return 0; - } - if (!r && soap->recv_timeout) - { soap->errnum = 0; - return 0; - } - } -#endif -#ifdef PALM - r = soap_socket_errno(soap->socket); - if (r != SOAP_EINTR && timeouts-- <= 0) - { soap->errnum = r; - return 0; - } -#endif - } - } -#ifdef WITH_FASTCGI - return fread(s, 1, n, stdin); -#else -#ifdef UNDER_CE - return fread(s, 1, n, soap->recvfd); -#else -#ifdef WMW_RPM_IO - if (soap->rpmreqid) - r = httpBlockRead(soap->rpmreqid, s, n); - else -#endif - r = read((SOAP_SOCKET)soap->recvfd, s, n); - if (r >= 0) - return (size_t)r; - soap->errnum = soap_errno; - return 0; -#endif -#endif -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_LEAN -#ifndef WITH_NOIO -#ifndef PALM_1 -static size_t -frecv_stop(struct soap *soap, char *s, size_t n) -{ return 0; -} -#endif -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_NOHTTP -#ifndef PALM_1 -static soap_wchar -soap_getchunkchar(struct soap *soap) -{ if (soap->bufidx < soap->buflen) - return soap->buf[soap->bufidx++]; - soap->bufidx = 0; - soap->buflen = soap->chunkbuflen = soap->frecv(soap, soap->buf, SOAP_BUFLEN); - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Read %u bytes from socket %d\n", (unsigned int)soap->buflen, soap->socket)); - DBGMSG(RECV, soap->buf, soap->buflen); - if (soap->buflen) - return soap->buf[soap->bufidx++]; - return EOF; -} -#endif -#endif - -/******************************************************************************/ -#ifndef PALM_1 -static int -soap_isxdigit(int c) -{ return (c >= '0' && c <= '9') || (c >= 'A' && c <= 'F') || (c >= 'a' && c <= 'f'); -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_recv_raw(struct soap *soap) -{ register size_t ret; -#ifdef WITH_ZLIB - if (soap->mode & SOAP_ENC_ZLIB) - { if (soap->d_stream.next_out == Z_NULL) - return EOF; - if (soap->d_stream.avail_in || !soap->d_stream.avail_out) - { register int r; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Inflating\n")); - soap->d_stream.next_out = (Byte*)soap->buf; - soap->d_stream.avail_out = SOAP_BUFLEN; - r = inflate(&soap->d_stream, Z_NO_FLUSH); - if (r == Z_OK || r == Z_STREAM_END) - { soap->bufidx = 0; - ret = soap->buflen = SOAP_BUFLEN - soap->d_stream.avail_out; - if (soap->zlib_in == SOAP_ZLIB_GZIP) - soap->z_crc = crc32(soap->z_crc, (Byte*)soap->buf, (unsigned int)ret); - if (r == Z_STREAM_END) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Inflated %lu->%lu bytes\n", soap->d_stream.total_in, soap->d_stream.total_out)); - soap->z_ratio_in = (float)soap->d_stream.total_in / (float)soap->d_stream.total_out; - soap->d_stream.next_out = Z_NULL; - } - if (ret) - { soap->count += ret; - DBGLOG(RECV, SOAP_MESSAGE(fdebug, "\n---- decompressed ----\n")); - DBGMSG(RECV, soap->buf, ret); - return SOAP_OK; - } - } - else if (r != Z_BUF_ERROR) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Inflate error: %s\n", soap->d_stream.msg?soap->d_stream.msg:"")); - soap->d_stream.next_out = Z_NULL; - soap->error = SOAP_ZLIB_ERROR; - return EOF; - } - } -zlib_again: - if ((soap->mode & SOAP_IO) == SOAP_IO_CHUNK && !soap->chunksize) - { memcpy(soap->buf, soap->z_buf, SOAP_BUFLEN); - soap->buflen = soap->z_buflen; - } - DBGLOG(RECV, SOAP_MESSAGE(fdebug, "\n---- compressed ----\n")); - } -#endif -#ifndef WITH_NOHTTP - if ((soap->mode & SOAP_IO) == SOAP_IO_CHUNK) /* read HTTP chunked transfer */ - { -chunk_again: - if (soap->chunksize) - { soap->buflen = ret = soap->frecv(soap, soap->buf, soap->chunksize > SOAP_BUFLEN ? SOAP_BUFLEN : soap->chunksize); - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Getting chunk: read %u bytes\n", (unsigned int)ret)); - DBGMSG(RECV, soap->buf, ret); - soap->bufidx = 0; - soap->chunksize -= ret; - } - else - { register soap_wchar c; - char *t, tmp[8]; - t = tmp; - if (!soap->chunkbuflen) - { soap->chunkbuflen = ret = soap->frecv(soap, soap->buf, SOAP_BUFLEN); - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Read %u bytes (chunked) from socket %d\n", (unsigned int)ret, soap->socket)); - DBGMSG(RECV, soap->buf, ret); - soap->bufidx = 0; - if (!ret) - return soap->ahead = EOF; - } - else - soap->bufidx = soap->buflen; - soap->buflen = soap->chunkbuflen; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Getting chunk size (idx=%u len=%u)\n", (unsigned int)soap->bufidx, (unsigned int)soap->buflen)); - while (!soap_isxdigit((int)(c = soap_getchunkchar(soap)))) - { if ((int)c == EOF) - return soap->ahead = EOF; - } - do - *t++ = (char)c; - while (soap_isxdigit((int)(c = soap_getchunkchar(soap))) && t - tmp < 7); - while ((int)c != EOF && c != '\n') - c = soap_getchunkchar(soap); - if ((int)c == EOF) - return soap->ahead = EOF; - *t = '\0'; - soap->chunksize = soap_strtoul(tmp, &t, 16); - if (!soap->chunksize) - { soap->chunkbuflen = 0; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "End of chunked message\n")); - while ((int)c != EOF && c != '\n') - c = soap_getchunkchar(soap); - return soap->ahead = EOF; - } - soap->buflen = soap->bufidx + soap->chunksize; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Moving buf len to idx=%u len=%u (%s)\n", (unsigned int)soap->bufidx, (unsigned int)soap->buflen, tmp)); - if (soap->buflen > soap->chunkbuflen) - { soap->buflen = soap->chunkbuflen; - soap->chunksize -= soap->buflen - soap->bufidx; - soap->chunkbuflen = 0; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Passed end of buffer for chunked HTTP (%u bytes left)\n", (unsigned int)(soap->buflen - soap->bufidx))); - } - else if (soap->chunkbuflen) - soap->chunksize = 0; - ret = soap->buflen - soap->bufidx; - if (!ret) - goto chunk_again; - } - } - else -#endif - { soap->bufidx = 0; - soap->buflen = ret = soap->frecv(soap, soap->buf, SOAP_BUFLEN); - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Read %u bytes from socket %d\n", (unsigned int)ret, soap->socket)); - DBGMSG(RECV, soap->buf, ret); - } -#ifndef WITH_LEANER - if (soap->fpreparerecv && (soap->error = soap->fpreparerecv(soap, soap->buf, ret))) - return soap->error; -#endif -#ifdef WITH_ZLIB - if (soap->mode & SOAP_ENC_ZLIB) - { register int r; - memcpy(soap->z_buf, soap->buf, SOAP_BUFLEN); - soap->d_stream.next_in = (Byte*)(soap->z_buf + soap->bufidx); - soap->d_stream.avail_in = (unsigned int)ret; - soap->d_stream.next_out = (Byte*)soap->buf; - soap->d_stream.avail_out = SOAP_BUFLEN; - r = inflate(&soap->d_stream, Z_NO_FLUSH); - if (r == Z_OK || r == Z_STREAM_END) - { soap->bufidx = 0; - soap->z_buflen = soap->buflen; - soap->buflen = ret = SOAP_BUFLEN - soap->d_stream.avail_out; - if (soap->zlib_in == SOAP_ZLIB_GZIP) - soap->z_crc = crc32(soap->z_crc, (Byte*)soap->buf, (unsigned int)soap->buflen); - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Inflated %u bytes\n", (unsigned int)ret)); - if (!ret) - goto zlib_again; - if (r == Z_STREAM_END) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Inflated %lu->%lu bytes\n", soap->d_stream.total_in, soap->d_stream.total_out)); - soap->z_ratio_in = (float)soap->d_stream.total_in / (float)soap->d_stream.total_out; - soap->d_stream.next_out = Z_NULL; - } - DBGLOG(RECV, SOAP_MESSAGE(fdebug, "\n---- decompressed ----\n")); - DBGMSG(RECV, soap->buf, ret); - } - else - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Unable to inflate: (%d) %s\n", r, soap->d_stream.msg?soap->d_stream.msg:"")); - soap->d_stream.next_out = Z_NULL; - soap->error = SOAP_ZLIB_ERROR; - return EOF; - } - } -#endif - soap->count += ret; - return !ret; -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_recv(struct soap *soap) -{ -#ifndef WITH_LEANER - if (soap->mode & SOAP_ENC_DIME) - { if (soap->dime.buflen) - { char *s; - int i; - unsigned char tmp[12]; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "DIME hdr for chunked DIME is in buffer\n")); - soap->count += soap->dime.buflen - soap->buflen; - soap->buflen = soap->dime.buflen; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Skip padding (%ld bytes)\n", -(long)soap->dime.size&3)); - for (i = -(long)soap->dime.size&3; i > 0; i--) - { soap->bufidx++; - if (soap->bufidx >= soap->buflen) - if (soap_recv_raw(soap)) - return EOF; - } - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Get DIME hdr for next chunk\n")); - s = (char*)tmp; - for (i = 12; i > 0; i--) - { *s++ = soap->buf[soap->bufidx++]; - if (soap->bufidx >= soap->buflen) - if (soap_recv_raw(soap)) - return EOF; - } - soap->dime.flags = tmp[0] & 0x7; - soap->dime.size = ((size_t)tmp[8] << 24) | ((size_t)tmp[9] << 16) | ((size_t)tmp[10] << 8) | ((size_t)tmp[11]); - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Get DIME chunk (%u bytes)\n", (unsigned int)soap->dime.size)); - if (soap->dime.flags & SOAP_DIME_CF) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "More chunking\n")); - soap->dime.chunksize = soap->dime.size; - if (soap->buflen - soap->bufidx >= soap->dime.size) - { soap->dime.buflen = soap->buflen; - soap->buflen = soap->bufidx + soap->dime.chunksize; - } - else - soap->dime.chunksize -= soap->buflen - soap->bufidx; - } - else - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Last chunk\n")); - soap->dime.buflen = 0; - soap->dime.chunksize = 0; - } - soap->count = soap->buflen - soap->bufidx; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "%u bytes remaining\n", (unsigned int)soap->count)); - return SOAP_OK; - } - if (soap->dime.chunksize) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Get next DIME hdr for chunked DIME (%u bytes chunk)\n", (unsigned int)soap->dime.chunksize)); - if (soap_recv_raw(soap)) - return EOF; - if (soap->buflen - soap->bufidx >= soap->dime.chunksize) - { soap->dime.buflen = soap->buflen; - soap->count -= soap->buflen - soap->bufidx - soap->dime.chunksize; - soap->buflen = soap->bufidx + soap->dime.chunksize; - } - else - soap->dime.chunksize -= soap->buflen - soap->bufidx; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "%lu bytes remaining, count=%u\n", (unsigned long)(soap->buflen-soap->bufidx), (unsigned int)soap->count)); - return SOAP_OK; - } - } -#endif - return soap_recv_raw(soap); -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -soap_wchar -SOAP_FMAC2 -soap_getchar(struct soap *soap) -{ register soap_wchar c; - c = soap->ahead; - if (c) - { if (c != EOF) - soap->ahead = 0; - return c; - } - return soap_get1(soap); -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -const struct soap_code_map* -SOAP_FMAC2 -soap_code(const struct soap_code_map *code_map, const char *str) -{ if (code_map && str) - { while (code_map->string) - { if (!strcmp(str, code_map->string)) /* case sensitive */ - return code_map; - code_map++; - } - } - return NULL; -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -long -SOAP_FMAC2 -soap_code_int(const struct soap_code_map *code_map, const char *str, long other) -{ if (code_map) - { while (code_map->string) - { if (!soap_tag_cmp(str, code_map->string)) /* case insensitive */ - return code_map->code; - code_map++; - } - } - return other; -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -const char* -SOAP_FMAC2 -soap_code_str(const struct soap_code_map *code_map, long code) -{ if (!code_map) - return NULL; - while (code_map->code != code && code_map->string) - code_map++; - return code_map->string; -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -long -SOAP_FMAC2 -soap_code_bits(const struct soap_code_map *code_map, const char *str) -{ register long bits = 0; - if (code_map) - { while (str && *str) - { const struct soap_code_map *p; - for (p = code_map; p->string; p++) - { register size_t n = strlen(p->string); - if (!strncmp(p->string, str, n) && soap_blank(str[n])) - { bits |= p->code; - str += n; - while (*str > 0 && *str <= 32) - str++; - break; - } - } - if (!p->string) - return 0; - } - } - return bits; -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -const char* -SOAP_FMAC2 -soap_code_list(struct soap *soap, const struct soap_code_map *code_map, long code) -{ register char *t = soap->tmpbuf; - if (code_map) - { while (code_map->string) - { if (code_map->code & code) - { register const char *s = code_map->string; - if (t != soap->tmpbuf) - *t++ = ' '; - while (*s && t < soap->tmpbuf + sizeof(soap->tmpbuf) - 1) - *t++ = *s++; - if (t == soap->tmpbuf + sizeof(soap->tmpbuf) - 1) - break; - } - code_map++; - } - } - *t = '\0'; - return soap->tmpbuf; -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -static soap_wchar -soap_char(struct soap *soap) -{ char tmp[8]; - register int i; - register soap_wchar c; - register char *s = tmp; - for (i = 0; i < 7; i++) - { c = soap_get1(soap); - if (c == ';' || (int)c == EOF) - break; - *s++ = (char)c; - } - *s = '\0'; - if (*tmp == '#') - { if (tmp[1] == 'x' || tmp[1] == 'X') - return soap_strtol(tmp + 2, NULL, 16); - return atol(tmp + 1); - } - if (!strcmp(tmp, "lt")) - return '<'; - if (!strcmp(tmp, "gt")) - return '>'; - if (!strcmp(tmp, "amp")) - return '&'; - if (!strcmp(tmp, "quot")) - return '"'; - if (!strcmp(tmp, "apos")) - return '\''; -#ifndef WITH_LEAN - return (soap_wchar)soap_code_int(html_entity_codes, tmp, SOAP_UNKNOWN_CHAR); -#else - return SOAP_UNKNOWN_CHAR; /* use this to represent unknown code */ -#endif -} -#endif - -/******************************************************************************/ -#ifdef WITH_LEAN -#ifndef PALM_1 -soap_wchar -soap_get0(struct soap *soap) -{ if (soap->bufidx >= soap->buflen && soap_recv(soap)) - return EOF; - return (unsigned char)soap->buf[soap->bufidx]; -} -#endif -#endif - -/******************************************************************************/ -#ifdef WITH_LEAN -#ifndef PALM_1 -soap_wchar -soap_get1(struct soap *soap) -{ if (soap->bufidx >= soap->buflen && soap_recv(soap)) - return EOF; - return (unsigned char)soap->buf[soap->bufidx++]; -} -#endif -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -soap_wchar -SOAP_FMAC2 -soap_get(struct soap *soap) -{ register soap_wchar c; - c = soap->ahead; - if (c) - { if ((int)c != EOF) - soap->ahead = 0; - } - else - c = soap_get1(soap); - while ((int)c != EOF) - { if (soap->cdata) - { if (c == ']') - { c = soap_get1(soap); - if (c == ']') - { c = soap_get0(soap); - if (c == '>') - { soap->cdata = 0; - soap_get1(soap); - c = soap_get1(soap); - } - else - { soap_unget(soap, ']'); - return ']'; - } - } - else - { soap_revget1(soap); - return ']'; - } - } - else - return c; - } - switch (c) - { case '<': - do c = soap_get1(soap); - while (soap_blank(c)); - if (c == '!' || c == '?' || c == '%') - { register int k = 1; - if (c == '!') - { c = soap_get1(soap); - if (c == '[') - { do c = soap_get1(soap); - while ((int)c != EOF && c != '['); - if ((int)c == EOF) - break; - soap->cdata = 1; - c = soap_get1(soap); - continue; - } - if (c == '-' && (c = soap_get1(soap)) == '-') - { do - { c = soap_get1(soap); - if (c == '-' && (c = soap_get1(soap)) == '-') - break; - } while ((int)c != EOF); - } - } - else if (c == '?') - c = soap_get_pi(soap); - while ((int)c != EOF) - { if (c == '<') - k++; - else if (c == '>') - { if (--k <= 0) - break; - } - c = soap_get1(soap); - } - if ((int)c == EOF) - break; - c = soap_get1(soap); - continue; - } - if (c == '/') - return SOAP_TT; - soap_revget1(soap); - return SOAP_LT; - case '>': - return SOAP_GT; - case '"': - return SOAP_QT; - case '\'': - return SOAP_AP; - case '&': - return soap_char(soap) | 0x80000000; - } - break; - } - return c; -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -static soap_wchar -soap_get_pi(struct soap *soap) -{ char buf[64]; - register char *s = buf; - register int i = sizeof(buf); - register soap_wchar c = soap_getchar(soap); - /* This is a quick way to parse XML PI and we could use a callback instead to - * enable applications to intercept processing instructions */ - while ((int)c != EOF && c != '?') - { if (--i > 0) - { if (soap_blank(c)) - c = ' '; - *s++ = (char)c; - } - c = soap_getchar(soap); - } - *s = '\0'; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "XML PI \n", buf)); - if (!strncmp(buf, "xml ", 4)) - { s = strstr(buf, " encoding="); - if (s && s[10]) - { if (!soap_tag_cmp(s + 11, "iso-8859-1*") - || !soap_tag_cmp(s + 11, "latin1*")) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Switching to latin1 encoding\n")); - soap->mode |= SOAP_ENC_LATIN; - } - else if (!soap_tag_cmp(s + 11, "utf-8*")) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Switching to utf-8 encoding\n")); - soap->mode &= ~SOAP_ENC_LATIN; - } - } - } - if ((int)c != EOF) - c = soap_getchar(soap); - return c; -} -#endif - -/******************************************************************************/ -#ifndef WITH_LEANER -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_move(struct soap *soap, long n) -{ DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Moving %ld bytes forward\n", (long)n)); - for (; n > 0; n--) - if ((int)soap_getchar(soap) == EOF) - return SOAP_EOF; - return SOAP_OK; -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_LEANER -#ifndef PALM_1 -SOAP_FMAC1 -size_t -SOAP_FMAC2 -soap_tell(struct soap *soap) -{ return soap->count - soap->buflen + soap->bufidx - (soap->ahead != 0); -} -#endif -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_pututf8(struct soap *soap, register unsigned long c) -{ char tmp[16]; - if (c < 0x80 && c >= 0x20) - { *tmp = (char)c; - return soap_send_raw(soap, tmp, 1); - } -#ifndef WITH_LEAN - if (c >= 0x80 && (soap->mode & SOAP_XML_CANONICAL)) - { register char *t = tmp; - if (c < 0x0800) - *t++ = (char)(0xC0 | ((c >> 6) & 0x1F)); - else - { if (c < 0x010000) - *t++ = (char)(0xE0 | ((c >> 12) & 0x0F)); - else - { if (c < 0x200000) - *t++ = (char)(0xF0 | ((c >> 18) & 0x07)); - else - { if (c < 0x04000000) - *t++ = (char)(0xF8 | ((c >> 24) & 0x03)); - else - { *t++ = (char)(0xFC | ((c >> 30) & 0x01)); - *t++ = (char)(0x80 | ((c >> 24) & 0x3F)); - } - *t++ = (char)(0x80 | ((c >> 18) & 0x3F)); - } - *t++ = (char)(0x80 | ((c >> 12) & 0x3F)); - } - *t++ = (char)(0x80 | ((c >> 6) & 0x3F)); - } - *t++ = (char)(0x80 | (c & 0x3F)); - *t = '\0'; - } - else -#endif - sprintf(tmp, "&#%lu;", c); - return soap_send(soap, tmp); -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -soap_wchar -SOAP_FMAC2 -soap_getutf8(struct soap *soap) -{ register soap_wchar c, c1, c2, c3, c4; - c = soap->ahead; - if (c > 0xFF) - { soap->ahead = 0; - return c; - } -again: - c = soap_get(soap); - if (c < 0x80 || (soap->mode & SOAP_ENC_LATIN)) - return c; - c1 = soap_get1(soap); - if (c1 < 0x80) - { soap_revget1(soap); /* doesn't look like this is UTF8 */ - return c; - } - c1 &= 0x3F; - if (c < 0xE0) - return ((soap_wchar)(c & 0x1F) << 6) | c1; - c2 = (soap_wchar)soap_get1(soap) & 0x3F; - if (c == 0xEF && c1 == 0x3B && c2 == 0x3F) /* ignore UTF-8 BOM */ - goto again; - if (c < 0xF0) - return ((soap_wchar)(c & 0x0F) << 12) | (c1 << 6) | c2; - c3 = (soap_wchar)soap_get1(soap) & 0x3F; - if (c < 0xF8) - return ((soap_wchar)(c & 0x07) << 18) | (c1 << 12) | (c2 << 6) | c3; - c4 = (soap_wchar)soap_get1(soap) & 0x3F; - if (c < 0xFC) - return ((soap_wchar)(c & 0x03) << 24) | (c1 << 18) | (c2 << 12) | (c3 << 6) | c4; - return ((soap_wchar)(c & 0x01) << 30) | (c1 << 24) | (c2 << 18) | (c3 << 12) | (c4 << 6) | (soap_wchar)(soap_get1(soap) & 0x3F); -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_puthex(struct soap *soap, const unsigned char *s, int n) -{ char d[2]; - register int i; -#ifdef WITH_DOM - if ((soap->mode & SOAP_XML_DOM) && soap->dom) - { if (!(soap->dom->data = soap_s2hex(soap, s, NULL, n))) - return soap->error; - return SOAP_OK; - } -#endif - for (i = 0; i < n; i++) - { register int m = *s++; - d[0] = (char)((m >> 4) + (m > 159 ? '7' : '0')); - m &= 0x0F; - d[1] = (char)(m + (m > 9 ? '7' : '0')); - if (soap_send_raw(soap, d, 2)) - return soap->error; - } - return SOAP_OK; -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -unsigned char* -SOAP_FMAC2 -soap_gethex(struct soap *soap, int *n) -{ -#ifdef WITH_DOM - if ((soap->mode & SOAP_XML_DOM) && soap->dom) - { soap->dom->data = soap_string_in(soap, 0, -1, -1); - return (unsigned char*)soap_hex2s(soap, soap->dom->data, NULL, 0, n); - } -#endif -#ifdef WITH_FAST - soap->labidx = 0; - for (;;) - { register char *s; - register int i, k; - if (soap_append_lab(soap, NULL, 0)) - return NULL; - s = soap->labbuf + soap->labidx; - k = soap->lablen - soap->labidx; - soap->labidx = soap->lablen; - for (i = 0; i < k; i++) - { register char d1, d2; - register soap_wchar c; - c = soap_get(soap); - if (soap_isxdigit(c)) - { d1 = (char)c; - c = soap_get(soap); - if (soap_isxdigit(c)) - d2 = (char)c; - else - { soap->error = SOAP_TYPE; - return NULL; - } - } - else - { unsigned char *p; - soap_unget(soap, c); - if (n) - *n = (int)(soap->lablen - k + i); - p = (unsigned char*)soap_malloc(soap, soap->lablen - k + i); - if (p) - memcpy(p, soap->labbuf, soap->lablen - k + i); - return p; - } - *s++ = ((d1 >= 'A' ? (d1 & 0x7) + 9 : d1 - '0') << 4) + (d2 >= 'A' ? (d2 & 0x7) + 9 : d2 - '0'); - } - } -#else - if (soap_new_block(soap)) - return NULL; - for (;;) - { register int i; - register char *s = (char*)soap_push_block(soap, SOAP_BLKLEN); - if (!s) - { soap_end_block(soap); - return NULL; - } - for (i = 0; i < SOAP_BLKLEN; i++) - { register char d1, d2; - register soap_wchar c = soap_get(soap); - if (soap_isxdigit(c)) - { d1 = (char)c; - c = soap_get(soap); - if (soap_isxdigit(c)) - d2 = (char)c; - else - { soap_end_block(soap); - soap->error = SOAP_TYPE; - return NULL; - } - } - else - { unsigned char *p; - soap_unget(soap, c); - if (n) - *n = soap_size_block(soap, i); - p = (unsigned char*)soap_save_block(soap, NULL, 0); - return p; - } - *s++ = ((d1 >= 'A' ? (d1 & 0x7) + 9 : d1 - '0') << 4) + (d2 >= 'A' ? (d2 & 0x7) + 9 : d2 - '0'); - } - } -#endif -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_putbase64(struct soap *soap, const unsigned char *s, int n) -{ register int i; - register unsigned long m; - char d[4]; - if (!s) - return SOAP_OK; -#ifdef WITH_DOM - if ((soap->mode & SOAP_XML_DOM) && soap->dom) - { if (!(soap->dom->data = soap_s2base64(soap, s, NULL, n))) - return soap->error; - return SOAP_OK; - } -#endif - for (; n > 2; n -= 3, s += 3) - { m = s[0]; - m = (m << 8) | s[1]; - m = (m << 8) | s[2]; - for (i = 4; i > 0; m >>= 6) - d[--i] = soap_base64o[m & 0x3F]; - if (soap_send_raw(soap, d, 4)) - return soap->error; - } - if (n > 0) - { m = 0; - for (i = 0; i < n; i++) - m = (m << 8) | *s++; - for (; i < 3; i++) - m <<= 8; - for (i++; i > 0; m >>= 6) - d[--i] = soap_base64o[m & 0x3F]; - for (i = 3; i > n; i--) - d[i] = '='; - if (soap_send_raw(soap, d, 4)) - return soap->error; - } - return SOAP_OK; -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -unsigned char* -SOAP_FMAC2 -soap_getbase64(struct soap *soap, int *n, int malloc_flag) -{ -#ifdef WITH_DOM - if ((soap->mode & SOAP_XML_DOM) && soap->dom) - { soap->dom->data = soap_string_in(soap, 0, -1, -1); - return (unsigned char*)soap_base642s(soap, soap->dom->data, NULL, 0, n); - } -#endif -#ifdef WITH_FAST - soap->labidx = 0; - for (;;) - { register int i, k; - register char *s; - if (soap_append_lab(soap, NULL, 2)) - return NULL; - s = soap->labbuf + soap->labidx; - k = soap->lablen - soap->labidx; - soap->labidx = 3 * (soap->lablen / 3); - if (!s) - return NULL; - for (i = 0; i < k - 2; i += 3) - { register unsigned long m = 0; - register int j = 0; - do - { register soap_wchar c = soap_get(soap); - if (c == '=' || c < 0) - { unsigned char *p; - switch (j) - { case 2: - *s++ = (char)((m >> 4) & 0xFF); - i++; - break; - case 3: - *s++ = (char)((m >> 10) & 0xFF); - *s++ = (char)((m >> 2) & 0xFF); - i += 2; - } - if (n) - *n = (int)(soap->lablen - k + i); - p = (unsigned char*)soap_malloc(soap, soap->lablen - k + i); - if (p) - memcpy(p, soap->labbuf, soap->lablen - k + i); - if (c >= 0) - { while ((int)((c = soap_get(soap)) != EOF) && c != SOAP_LT && c != SOAP_TT) - ; - } - soap_unget(soap, c); - return p; - } - c -= '+'; - if (c >= 0 && c <= 79) - { int b = soap_base64i[c]; - if (b >= 64) - { soap->error = SOAP_TYPE; - return NULL; - } - m = (m << 6) + b; - j++; - } - else if (!soap_blank(c + '+')) - { soap->error = SOAP_TYPE; - return NULL; - } - } while (j < 4); - *s++ = (char)((m >> 16) & 0xFF); - *s++ = (char)((m >> 8) & 0xFF); - *s++ = (char)(m & 0xFF); - } - } -#else - if (soap_new_block(soap)) - return NULL; - for (;;) - { register int i; - register char *s = (char*)soap_push_block(soap, 3 * SOAP_BLKLEN); /* must be multiple of 3 */ - if (!s) - { soap_end_block(soap); - return NULL; - } - for (i = 0; i < SOAP_BLKLEN; i++) - { register unsigned long m = 0; - register int j = 0; - do - { register soap_wchar c = soap_get(soap); - if (c == '=' || c < 0) - { unsigned char *p; - i *= 3; - switch (j) - { case 2: - *s++ = (char)((m >> 4) & 0xFF); - i++; - break; - case 3: - *s++ = (char)((m >> 10) & 0xFF); - *s++ = (char)((m >> 2) & 0xFF); - i += 2; - } - if (n) - *n = (int)soap_size_block(soap, i); - p = (unsigned char*)soap_save_block(soap, NULL, 0); - if (c >= 0) - { while ((int)((c = soap_get(soap)) != EOF) && c != SOAP_LT && c != SOAP_TT) - ; - } - soap_unget(soap, c); - return p; - } - c -= '+'; - if (c >= 0 && c <= 79) - { int b = soap_base64i[c]; - if (b >= 64) - { soap->error = SOAP_TYPE; - return NULL; - } - m = (m << 6) + b; - j++; - } - else if (!soap_blank(c)) - { soap->error = SOAP_TYPE; - return NULL; - } - } while (j < 4); - *s++ = (char)((m >> 16) & 0xFF); - *s++ = (char)((m >> 8) & 0xFF); - *s++ = (char)(m & 0xFF); - } - } -#endif -} -#endif - -/******************************************************************************/ -#ifndef WITH_LEANER -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_xop_forward(struct soap *soap, unsigned char **ptr, int *size, char **id, char **type, char **options) -{ /* Check MTOM xop:Include element (within hex/base64Binary) */ - /* TODO: this code to be obsoleted with new import/xop.h conventions */ - int body = soap->body; /* should save type too? */ - if (!soap_peek_element(soap)) - { if (!soap_element_begin_in(soap, "xop:Include", 0, NULL) && *soap->href) - { if (soap_dime_forward(soap, ptr, size, id, type, options)) - return soap->error; - } - if (soap->body && soap_element_end_in(soap, NULL)) - return soap->error; - } - soap->body = body; - return SOAP_OK; -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_LEANER -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_dime_forward(struct soap *soap, unsigned char **ptr, int *size, char **id, char **type, char **options) -{ struct soap_xlist *xp = (struct soap_xlist*)SOAP_MALLOC(soap, sizeof(struct soap_xlist)); - *ptr = NULL; - *size = 0; - *id = soap_strdup(soap, soap->href); - *type = NULL; - *options = NULL; - if (!xp) - return soap->error = SOAP_EOM; - xp->next = soap->xlist; - xp->ptr = ptr; - xp->size = size; - xp->id = *id; - xp->type = type; - xp->options = options; - soap->xlist = xp; - return SOAP_OK; -} -#endif -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -char * -SOAP_FMAC2 -soap_strdup(struct soap *soap, const char *s) -{ char *t = NULL; - if (s && (t = (char*)soap_malloc(soap, strlen(s) + 1))) - strcpy(t, s); - return t; -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_new_block(struct soap *soap) -{ struct soap_blist *p; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "New block sequence (prev=%p)\n", soap->blist)); - if (!(p = (struct soap_blist*)SOAP_MALLOC(soap, sizeof(struct soap_blist)))) - return SOAP_EOM; - p->next = soap->blist; - p->ptr = NULL; - p->size = 0; - soap->blist = p; - return SOAP_OK; -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -void* -SOAP_FMAC2 -soap_push_block(struct soap *soap, size_t n) -{ char *p; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Push block of %u bytes (%u bytes total)\n", (unsigned int)n, (unsigned int)soap->blist->size + (unsigned int)n)); - if (!(p = (char*)SOAP_MALLOC(soap, n + sizeof(char*) + sizeof(size_t)))) - { soap->error = SOAP_EOM; - return NULL; - } - *(char**)p = soap->blist->ptr; - *(size_t*)(p + sizeof(char*)) = n; - soap->blist->ptr = p; - soap->blist->size += n; - return p + sizeof(char*) + sizeof(size_t); -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_pop_block(struct soap *soap) -{ char *p; - if (!soap->blist->ptr) - return; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Pop block\n")); - p = soap->blist->ptr; - soap->blist->size -= *(size_t*)(p + sizeof(char*)); - soap->blist->ptr = *(char**)p; - SOAP_FREE(soap, p); -} -#endif - -/******************************************************************************/ -#ifndef WITH_NOIDREF -#ifndef PALM_1 -static void -soap_update_ptrs(struct soap *soap, char *start, char *end, char *p1, char *p2) -{ int i; - register struct soap_ilist *ip; - register struct soap_flist *fp; -#ifndef WITH_LEANER - register struct soap_xlist *xp; -#endif - register void *p, **q; - for (i = 0; i < SOAP_IDHASH; i++) - { for (ip = soap->iht[i]; ip; ip = ip->next) - { if (ip->ptr && (char*)ip->ptr >= start && (char*)ip->ptr < end) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Update id='%s' %p -> %p\n", ip->id, ip->ptr, (char*)ip->ptr + (p1-p2))); - ip->ptr = (char*)ip->ptr + (p1-p2); - } - for (q = &ip->link; q; q = (void**)p) - { p = *q; - if (p && (char*)p >= start && (char*)p < end) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Link update id='%s' %p\n", ip->id, p)); - *q = (char*)p + (p1-p2); - } - } - for (q = &ip->copy; q; q = (void**)p) - { p = *q; - if (p && (char*)p >= start && (char*)p < end) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copy chain update id='%s' %p\n", ip->id, p)); - *q = (char*)p + (p1-p2); - } - } - for (fp = ip->flist; fp; fp = fp->next) - { if ((char*)fp->ptr >= start && (char*)fp->ptr < end) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copy list update id='%s' %p\n", ip->id, fp)); - fp->ptr = (char*)fp->ptr + (p1-p2); - } - } - } - } -#ifndef WITH_LEANER - for (xp = soap->xlist; xp; xp = xp->next) - { if (xp->ptr && (char*)xp->ptr >= start && (char*)xp->ptr < end) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Update id='%s' %p -> %p\n", xp->id?xp->id:"", xp->ptr, (char*)xp->ptr + (p1-p2))); - xp->ptr = (unsigned char**)((char*)xp->ptr + (p1-p2)); - xp->size = (int*)((char*)xp->size + (p1-p2)); - xp->type = (char**)((char*)xp->type + (p1-p2)); - xp->options = (char**)((char*)xp->options + (p1-p2)); - } - } -#endif -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_NOIDREF -#ifndef PALM_1 -static int -soap_has_copies(struct soap *soap, register const char *start, register const char *end) -{ register int i; - register struct soap_ilist *ip; - register struct soap_flist *fp; - register const char *p; - for (i = 0; i < SOAP_IDHASH; i++) - { for (ip = soap->iht[i]; ip; ip = ip->next) - { for (p = (const char*)ip->copy; p; p = *(const char**)p) - if (p >= start && p < end) - return SOAP_ERR; - for (fp = ip->flist; fp; fp = fp->next) - if ((const char*)fp->ptr >= start && (const char*)fp->ptr < end) - return SOAP_ERR; - } - } - return SOAP_OK; -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_NOIDREF -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_resolve(struct soap *soap) -{ register int i; - register struct soap_ilist *ip; - register struct soap_flist *fp; - short flag; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Resolving forwarded data\n")); - for (i = 0; i < SOAP_IDHASH; i++) - { for (ip = soap->iht[i]; ip; ip = ip->next) - { if (ip->ptr) - { register void *p, **q, *r; - q = (void**)ip->link; - ip->link = NULL; - r = ip->ptr; - DBGLOG(TEST, if (q) SOAP_MESSAGE(fdebug, "Traversing link chain to resolve id='%s'\n", ip->id)); - while (q) - { p = *q; - *q = r; - DBGLOG(TEST,SOAP_MESSAGE(fdebug, "... link %p -> %p\n", q, r)); - q = (void**)p; - } - } - else if (*ip->id == '#') - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Missing data for id='%s'\n", ip->id)); - strcpy(soap->id, ip->id + 1); - return soap->error = SOAP_MISSING_ID; - } - } - } - do - { flag = 0; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Resolution phase\n")); - for (i = 0; i < SOAP_IDHASH; i++) - { for (ip = soap->iht[i]; ip; ip = ip->next) - { if (ip->ptr && !soap_has_copies(soap, (const char*)ip->ptr, (const char*)ip->ptr + ip->size)) - { if (ip->copy) - { register void *p, **q = (void**)ip->copy; - DBGLOG(TEST, if (q) SOAP_MESSAGE(fdebug, "Traversing copy chain to resolve id='%s'\n", ip->id)); - ip->copy = NULL; - do - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "... copy %p -> %p (%u bytes)\n", ip->ptr, q, (unsigned int)ip->size)); - p = *q; - memcpy(q, ip->ptr, ip->size); - q = (void**)p; - } while (q); - flag = 1; - } - for (fp = ip->flist; fp; fp = ip->flist) - { register unsigned int k = fp->level; - register void *p = ip->ptr; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Resolving forwarded data type=%d location=%p level=%u,%u id='%s'\n", ip->type, p, ip->level, fp->level, ip->id)); - while (ip->level < k) - { register void **q = (void**)soap_malloc(soap, sizeof(void*)); - if (!q) - return soap->error; - *q = p; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Descending one level, new location=%p holds=%p...\n", q, *q)); - p = (void*)q; - k--; - } - if (fp->fcopy) - fp->fcopy(soap, ip->type, fp->type, fp->ptr, fp->len, p, ip->size); - else - soap_fcopy(soap, ip->type, fp->type, fp->ptr, fp->len, p, ip->size); - ip->flist = fp->next; - SOAP_FREE(soap, fp); - flag = 1; - } - } - } - } - } while (flag); -#ifdef SOAP_DEBUG - for (i = 0; i < SOAP_IDHASH; i++) - { for (ip = soap->iht[i]; ip; ip = ip->next) - { if (ip->copy || ip->flist) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Resolution error: forwarded data for id='%s' could not be propagated, please report this problem to the developers\n", ip->id)); - } - } - } -#endif - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Resolution done\n")); - return SOAP_OK; -} -#endif -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -size_t -SOAP_FMAC2 -soap_size_block(struct soap *soap, size_t n) -{ if (soap->blist->ptr) - { soap->blist->size -= *(size_t*)(soap->blist->ptr + sizeof(char*)) - n; - *(size_t*)(soap->blist->ptr + sizeof(char*)) = n; - } - return soap->blist->size; -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -char* -SOAP_FMAC2 -soap_first_block(struct soap *soap) -{ char *p, *q, *r; - p = soap->blist->ptr; - if (!p) - return NULL; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "First block\n")); - r = NULL; - do - { q = *(char**)p; - *(char**)p = r; - r = p; - p = q; - } while (p); - soap->blist->ptr = r; - return r + sizeof(char*) + sizeof(size_t); -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -char* -SOAP_FMAC2 -soap_next_block(struct soap *soap) -{ char *p; - p = soap->blist->ptr; - if (p) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Next block\n")); - soap->blist->ptr = *(char**)p; - SOAP_FREE(soap, p); - if (soap->blist->ptr) - return soap->blist->ptr + sizeof(char*) + sizeof(size_t); - } - return NULL; -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -size_t -SOAP_FMAC2 -soap_block_size(struct soap *soap) -{ return *(size_t*)(soap->blist->ptr + sizeof(char*)); -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_end_block(struct soap *soap) -{ struct soap_blist *bp; - char *p, *q; - bp = soap->blist; - if (bp) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "End of block sequence, free all remaining blocks\n")); - for (p = bp->ptr; p; p = q) - { q = *(char**)p; - SOAP_FREE(soap, p); - } - soap->blist = bp->next; - SOAP_FREE(soap, bp); - } - DBGLOG(TEST, if (soap->blist) SOAP_MESSAGE(fdebug, "Restore previous block sequence\n")); -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -char* -SOAP_FMAC2 -soap_save_block(struct soap *soap, char *p, int flag) -{ register size_t n; - register char *q, *s; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Save all blocks in contiguous memory space of %u bytes (%p->%p)\n", (unsigned int)soap->blist->size, soap->blist->ptr, p)); - if (soap->blist->size) - { if (!p) - p = (char*)soap_malloc(soap, soap->blist->size); - if (p) - { for (s = p, q = soap_first_block(soap); q; q = soap_next_block(soap)) - { n = soap_block_size(soap); -#ifndef WITH_NOIDREF - if (flag) - soap_update_ptrs(soap, q, q + n, s, q); -#endif - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copy %u bytes from %p to %p\n", (unsigned int)n, q, s)); - memcpy(s, q, n); - s += n; - } - } - else - soap->error = SOAP_EOM; - } - soap_end_block(soap); - return p; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -char * -SOAP_FMAC2 -soap_putsize(struct soap *soap, const char *type, int size) -{ return soap_putsizes(soap, type, &size, 1); -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -char * -SOAP_FMAC2 -soap_putsizes(struct soap *soap, const char *type, const int *size, int dim) -{ return soap_putsizesoffsets(soap, type, size, NULL, dim); -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -char * -SOAP_FMAC2 -soap_putsizesoffsets(struct soap *soap, const char *type, const int *size, const int *offset, int dim) -{ int i; - if (!type) - return NULL; - if (soap->version == 2) - { sprintf(soap->type, "%s[%d", type, size[0]); - for (i = 1; i < dim; i++) - sprintf(soap->type + strlen(soap->type), " %d", size[i]); - } - else - { if (offset) - { sprintf(soap->type, "%s[%d", type, size[0] + offset[0]); - for (i = 1; i < dim; i++) - sprintf(soap->type + strlen(soap->type), ",%d", size[i] + offset[i]); - } - else - { sprintf(soap->type, "%s[%d", type, size[0]); - for (i = 1; i < dim; i++) - sprintf(soap->type + strlen(soap->type), ",%d", size[i]); - } - strcat(soap->type, "]"); - } - return soap->type; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -char * -SOAP_FMAC2 -soap_putoffset(struct soap *soap, int offset) -{ return soap_putoffsets(soap, &offset, 1); -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -char * -SOAP_FMAC2 -soap_putoffsets(struct soap *soap, const int *offset, int dim) -{ register int i; - sprintf(soap->arrayOffset, "[%d", offset[0]); - for (i = 1; i < dim; i++) - sprintf(soap->arrayOffset + strlen(soap->arrayOffset), ",%d", offset[i]); - strcat(soap->arrayOffset, "]"); - return soap->arrayOffset; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_size(const int *size, int dim) -{ register int i, n = size[0]; - for (i = 1; i < dim; i++) - n *= size[i]; - return n; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_getoffsets(const char *attr, const int *size, int *offset, int dim) -{ register int i, j = 0; - if (offset) - for (i = 0; i < dim && attr && *attr; i++) - { attr++; - j *= size[i]; - j += offset[i] = (int)atol(attr); - attr = strchr(attr, ','); - } - else - for (i = 0; i < dim && attr && *attr; i++) - { attr++; - j *= size[i]; - j += (int)atol(attr); - attr = strchr(attr, ','); - } - return j; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_getsize(const char *attr1, const char *attr2, int *j) -{ register int n, k; - char *s; - *j = 0; - if (!*attr1) - return -1; - if (*attr1 == '[') - attr1++; - n = 1; - for (;;) - { k = (int)soap_strtol(attr1, &s, 10); - n *= k; - if (k < 0 || n > SOAP_MAXARRAYSIZE || s == attr1) - return -1; - attr1 = strchr(s, ','); - if (!attr1) - attr1 = strchr(s, ' '); - if (attr2 && *attr2) - { attr2++; - *j *= k; - k = (int)soap_strtol(attr2, &s, 10); - *j += k; - if (k < 0) - return -1; - attr2 = s; - } - if (!attr1) - break; - attr1++; - } - return n - *j; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_getsizes(const char *attr, int *size, int dim) -{ register int i, k, n; - if (!*attr) - return -1; - i = strlen(attr); - n = 1; - do - { for (i = i-1; i >= 0; i--) - if (attr[i] == '[' || attr[i] == ',' || attr[i] == ' ') - break; - k = (int)atol(attr + i + 1); - n *= size[--dim] = k; - if (k < 0 || n > SOAP_MAXARRAYSIZE) - return -1; - } while (i >= 0 && attr[i] != '['); - return n; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_getposition(const char *attr, int *pos) -{ register int i, n; - if (!*attr) - return -1; - n = 0; - i = 1; - do - { pos[n++] = (int)atol(attr + i); - while (attr[i] && attr[i] != ',' && attr[i] != ']') - i++; - if (attr[i] == ',') - i++; - } while (n < SOAP_MAXDIMS && attr[i] && attr[i] != ']'); - return n; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_push_namespace(struct soap *soap, const char *id, const char *ns) -{ register struct soap_nlist *np; - register struct Namespace *p; - register short i = -1; - register size_t n, k; - n = strlen(id); - k = strlen(ns) + 1; - p = soap->local_namespaces; - if (p) - { for (i = 0; p->id; p++, i++) - { if (p->ns && !strcmp(ns, p->ns)) - { if (p->out) - { SOAP_FREE(soap, p->out); - p->out = NULL; - } - break; - } - if (p->out) - { if (!strcmp(ns, p->out)) - break; - } - else if (p->in) - { if (!soap_tag_cmp(ns, p->in)) - { if ((p->out = (char*)SOAP_MALLOC(soap, k))) - strcpy(p->out, ns); - break; - } - } - } - if (!p || !p->id) - i = -1; - } - if (i >= 0) - k = 0; - np = (struct soap_nlist*)SOAP_MALLOC(soap, sizeof(struct soap_nlist) + n + k); - if (!np) - return soap->error = SOAP_EOM; - np->next = soap->nlist; - soap->nlist = np; - np->level = soap->level; - np->index = i; - strcpy(np->id, id); - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Push namespace binding (level=%u) '%s' '%s'\n", soap->level, id, ns)); - if (i < 0) - { np->ns = np->id + n + 1; - strcpy(np->ns, ns); - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Push NOT OK: no match found for '%s' in namespace mapping table (added to stack anyway)\n", ns)); - } - else - { np->ns = NULL; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Push OK ('%s' matches '%s' in namespace table)\n", id, p->id)); - } - return SOAP_OK; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_pop_namespace(struct soap *soap) -{ register struct soap_nlist *np; - while (soap->nlist && soap->nlist->level >= soap->level) - { np = soap->nlist->next; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Popped namespace binding (level=%u) '%s'\n", soap->level, soap->nlist->id)); - SOAP_FREE(soap, soap->nlist); - soap->nlist = np; - } -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_match_namespace(struct soap *soap, const char *id1, const char *id2, int n1, int n2) -{ register struct soap_nlist *np = soap->nlist; - while (np && (strncmp(np->id, id1, n1) || np->id[n1])) - np = np->next; - if (np) - { if (np->index < 0 - || (soap->local_namespaces[np->index].id - && (strncmp(soap->local_namespaces[np->index].id, id2, n2) - || soap->local_namespaces[np->index].id[n2]))) - return SOAP_NAMESPACE; - return SOAP_OK; - } - if (n1 == 3 && n1 == n2 && !strcmp(id1, "xml") && !strcmp(id1, id2)) - return SOAP_OK; - return soap->error = SOAP_SYNTAX_ERROR; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -const char* -SOAP_FMAC2 -soap_current_namespace(struct soap *soap, const char *tag) -{ register struct soap_nlist *np; - register const char *s; - np = soap->nlist; - if (!(s = strchr(tag, ':'))) - { while (np && *np->id) /* find default namespace, if present */ - np = np->next; - } - else - { while (np && (strncmp(np->id, tag, s - tag) || np->id[s - tag])) - np = np->next; - if (!np) - soap->error = SOAP_NAMESPACE; - } - if (np) - { if (np->index >= 0) - return soap->namespaces[np->index].ns; - if (np->ns) - return soap_strdup(soap, np->ns); - } - return NULL; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_tag_cmp(const char *s, const char *t) -{ for (;;) - { register int c1 = *s; - register int c2 = *t; - if (!c1 || c1 == '"') - break; - if (c2 != '-') - { if (c1 != c2) - { if (c1 >= 'A' && c1 <= 'Z') - c1 += 'a' - 'A'; - if (c2 >= 'A' && c2 <= 'Z') - c2 += 'a' - 'A'; - } - if (c1 != c2) - { if (c2 != '*') - return 1; - c2 = *++t; - if (!c2) - return 0; - if (c2 >= 'A' && c2 <= 'Z') - c2 += 'a' - 'A'; - for (;;) - { c1 = *s; - if (!c1 || c1 == '"') - break; - if (c1 >= 'A' && c1 <= 'Z') - c1 += 'a' - 'A'; - if (c1 == c2 && !soap_tag_cmp(s + 1, t + 1)) - return 0; - s++; - } - break; - } - } - s++; - t++; - } - if (*t == '*' && !t[1]) - return 0; - return *t; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_match_tag(struct soap *soap, const char *tag1, const char *tag2) -{ register const char *s, *t; - register int err; - if (!tag1 || !tag2 || !*tag2) - return SOAP_OK; - s = strchr(tag1, ':'); - t = strchr(tag2, ':'); - if (t) - { if (s) - { if (t[1] && SOAP_STRCMP(s + 1, t + 1)) - return SOAP_TAG_MISMATCH; - if (t != tag2 && (err = soap_match_namespace(soap, tag1, tag2, s - tag1, t - tag2))) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Tags '%s' and '%s' match but namespaces differ\n", tag1, tag2)); - if (err == SOAP_NAMESPACE) - return SOAP_TAG_MISMATCH; - return err; - } - } - else if (SOAP_STRCMP(tag1, t + 1)) - return SOAP_TAG_MISMATCH; - else if (t != tag2 && (err = soap_match_namespace(soap, tag1, tag2, 0, t - tag2))) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Tags '%s' and '%s' match but namespaces differ\n", tag1, tag2)); - if (err == SOAP_NAMESPACE) - return SOAP_TAG_MISMATCH; - return err; - } - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Tags and (default) namespaces match: '%s' '%s'\n", tag1, tag2)); - return SOAP_OK; - } - if (s) - { if (SOAP_STRCMP(s + 1, tag2)) - return SOAP_TAG_MISMATCH; - } - else if (SOAP_STRCMP(tag1, tag2)) - return SOAP_TAG_MISMATCH; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Tags match: '%s' '%s'\n", tag1, tag2)); - return SOAP_OK; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_match_array(struct soap *soap, const char *type) -{ if (*soap->arrayType) - if (soap_match_tag(soap, soap->arrayType, type) - && soap_match_tag(soap, soap->arrayType, "xsd:anyType") - && soap_match_tag(soap, soap->arrayType, "xsd:ur-type") - ) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Array type mismatch: '%s' '%s'\n", soap->arrayType, type)); - return SOAP_TAG_MISMATCH; - } - return SOAP_OK; -} -#endif - -/******************************************************************************\ - * - * SSL - * -\******************************************************************************/ - -#ifdef WITH_OPENSSL -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_rand() -{ unsigned char buf[4]; - if (!ssl_init_done) - soap_ssl_init(); - RAND_pseudo_bytes(buf, 4); - return *(int*)buf; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_ssl_server_context(struct soap *soap, unsigned short flags, const char *keyfile, const char *password, const char *cafile, const char *capath, const char *dhfile, const char *randfile, const char *sid) -{ int err; - soap->keyfile = keyfile; - soap->password = password; - soap->cafile = cafile; - soap->capath = capath; - soap->dhfile = dhfile; - soap->randfile = randfile; - soap->ssl_flags = flags | (dhfile == NULL ? SOAP_SSL_RSA : 0); - if (!(err = soap->fsslauth(soap))) - { if (sid) - SSL_CTX_set_session_id_context(soap->ctx, (unsigned char*)sid, strlen(sid)); - } - return err; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_ssl_client_context(struct soap *soap, unsigned short flags, const char *keyfile, const char *password, const char *cafile, const char *capath, const char *randfile) -{ soap->keyfile = keyfile; - soap->password = password; - soap->cafile = cafile; - soap->capath = capath; - soap->dhfile = NULL; - soap->ssl_flags = flags; - soap->randfile = randfile; - return soap->fsslauth(soap); -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_ssl_init() -{ /* Note: for MT systems, the main program MUST call soap_ssl_init() before any threads are started */ - if (!ssl_init_done) - { ssl_init_done = 1; - SSL_library_init(); -#ifndef WITH_LEAN - SSL_load_error_strings(); -#endif - if (!RAND_load_file("/dev/urandom", 1024)) - { char buf[1024]; - RAND_seed(buf, sizeof(buf)); - while (!RAND_status()) - { int r = rand(); - RAND_seed(&r, sizeof(int)); - } - } - } -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -const char * -SOAP_FMAC2 -soap_ssl_error(struct soap *soap, int ret) -{ int err = SSL_get_error(soap->ssl, ret); - const char *msg = soap_code_str(h_ssl_error_codes, err); - if (msg) - strcpy(soap->msgbuf, msg); - else - return ERR_error_string(err, soap->msgbuf); - if (ERR_peek_error()) - { unsigned long r; - strcat(soap->msgbuf, "\n"); - while ((r = ERR_get_error())) - ERR_error_string_n(r, soap->msgbuf + strlen(soap->msgbuf), sizeof(soap->msgbuf) - strlen(soap->msgbuf)); - } - else - { switch (ret) - { case 0: - strcpy(soap->msgbuf, "EOF was observed that violates the protocol. The client probably provided invalid authentication information."); - break; - case -1: - sprintf(soap->msgbuf, "Error observed by underlying BIO: %s", strerror(errno)); - break; - } - } - return soap->msgbuf; -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -static int -ssl_password(char *buf, int num, int rwflag, void *userdata) -{ if (num < (int)strlen((char*)userdata) + 1) - return 0; - return strlen(strcpy(buf, (char*)userdata)); -} -#endif - -/******************************************************************************/ -/* This callback is included for future references. It should not be deleted -#ifndef PALM_2 -static DH * -ssl_tmp_dh(SSL *ssl, int is_export, int keylength) -{ static DH *dh512 = NULL; - static DH *dh1024 = NULL; - DH *dh; - switch (keylength) - { case 512: - if (!dh512) - { BIO *bio = BIO_new_file("dh512.pem", "r"); - if (bio) - { dh512 = PEM_read_bio_DHparams(bio, NULL, NULL, NULL); - BIO_free(bio); - return dh512; - } - } - else - return dh512; - default: - if (!dh1024) - { BIO *bio = BIO_new_file("dh1024.pem", "r"); - if (bio) - { dh1024 = PEM_read_bio_DHparams(bio, NULL, NULL, NULL); - BIO_free(bio); - } - } - dh = dh1024; - } - return dh; -} -#endif -*/ - -/******************************************************************************/ -#ifndef PALM_1 -static int -ssl_auth_init(struct soap *soap) -{ long flags; - int mode; - if (!ssl_init_done) - soap_ssl_init(); - if (!soap->ctx) - { if (!(soap->ctx = SSL_CTX_new(SSLv23_method()))) - return soap_set_receiver_error(soap, "SSL error", "Can't setup context", SOAP_SSL_ERROR); - /* Alters the behavior of SSL read/write: - SSL_CTX_set_mode(soap->ctx, SSL_MODE_ENABLE_PARTIAL_WRITE | SSL_MODE_AUTO_RETRY); - */ - } - if (soap->randfile) - { if (!RAND_load_file(soap->randfile, -1)) - return soap_set_receiver_error(soap, "SSL error", "Can't load randomness", SOAP_SSL_ERROR); - } - if (soap->cafile || soap->capath) - { if (!SSL_CTX_load_verify_locations(soap->ctx, soap->cafile, soap->capath)) - return soap_set_receiver_error(soap, "SSL error", "Can't read CA file and directory", SOAP_SSL_ERROR); - if (soap->cafile && (soap->ssl_flags & SOAP_SSL_REQUIRE_CLIENT_AUTHENTICATION)) - SSL_CTX_set_client_CA_list(soap->ctx, SSL_load_client_CA_file(soap->cafile)); - } - if (!SSL_CTX_set_default_verify_paths(soap->ctx)) - return soap_set_receiver_error(soap, "SSL error", "Can't read default CA file and/or directory", SOAP_SSL_ERROR); -/* This code assumes a typical scenario, see alternative code below */ - if (soap->keyfile) - { if (!SSL_CTX_use_certificate_chain_file(soap->ctx, soap->keyfile)) - return soap_set_receiver_error(soap, "SSL error", "Can't read certificate key file", SOAP_SSL_ERROR); - if (soap->password) - { SSL_CTX_set_default_passwd_cb_userdata(soap->ctx, (void*)soap->password); - SSL_CTX_set_default_passwd_cb(soap->ctx, ssl_password); - } - if (!SSL_CTX_use_PrivateKey_file(soap->ctx, soap->keyfile, SSL_FILETYPE_PEM)) - return soap_set_receiver_error(soap, "SSL error", "Can't read key file", SOAP_SSL_ERROR); - } -/* Suggested alternative approach to check cafile first before the key file: - if (soap->password) - { SSL_CTX_set_default_passwd_cb_userdata(soap->ctx, (void*)soap->password); - SSL_CTX_set_default_passwd_cb(soap->ctx, ssl_password); - } - if (!soap->cafile || !SSL_CTX_use_certificate_chain_file(soap->ctx, soap->cafile)) - { if (soap->keyfile) - { if (!SSL_CTX_use_certificate_chain_file(soap->ctx, soap->keyfile)) - return soap_set_receiver_error(soap, "SSL error", "Can't read certificate or key file", SOAP_SSL_ERROR); - if (!SSL_CTX_use_PrivateKey_file(soap->ctx, soap->keyfile, SSL_FILETYPE_PEM)) - return soap_set_receiver_error(soap, "SSL error", "Can't read key file", SOAP_SSL_ERROR); - } - } -*/ - if ((soap->ssl_flags & SOAP_SSL_RSA)) - { RSA *rsa = RSA_generate_key(1024, RSA_F4, NULL, NULL); - if (!SSL_CTX_set_tmp_rsa(soap->ctx, rsa)) - { if (rsa) - RSA_free(rsa); - return soap_set_receiver_error(soap, "SSL error", "Can't set RSA key", SOAP_SSL_ERROR); - } - RSA_free(rsa); - } - else if (soap->dhfile) - { DH *dh = 0; - BIO *bio; - bio = BIO_new_file(soap->dhfile, "r"); - if (!bio) - return soap_set_receiver_error(soap, "SSL error", "Can't read DH file", SOAP_SSL_ERROR); - dh = PEM_read_bio_DHparams(bio, NULL, NULL, NULL); - BIO_free(bio); - if (SSL_CTX_set_tmp_dh(soap->ctx, dh) < 0) - { if (dh) - DH_free(dh); - return soap_set_receiver_error(soap, "SSL error", "Can't set DH parameters", SOAP_SSL_ERROR); - } - DH_free(dh); - } - flags = (SSL_OP_ALL | SSL_OP_NO_SSLv2); - if ((soap->ssl_flags & SOAP_SSLv3)) - flags |= SSL_OP_NO_TLSv1; - if ((soap->ssl_flags & SOAP_TLSv1)) - flags |= SSL_OP_NO_SSLv3; - SSL_CTX_set_options(soap->ctx, flags); - if ((soap->ssl_flags & SOAP_SSL_REQUIRE_CLIENT_AUTHENTICATION)) - mode = (SSL_VERIFY_PEER | SSL_VERIFY_FAIL_IF_NO_PEER_CERT); - else if ((soap->ssl_flags & SOAP_SSL_REQUIRE_SERVER_AUTHENTICATION)) - mode = SSL_VERIFY_PEER; - else - mode = SSL_VERIFY_NONE; - SSL_CTX_set_verify(soap->ctx, mode, soap->fsslverify); -#if (OPENSSL_VERSION_NUMBER < 0x00905100L) - SSL_CTX_set_verify_depth(soap->ctx, 1); -#else - SSL_CTX_set_verify_depth(soap->ctx, 9); -#endif - return SOAP_OK; -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -static int -ssl_verify_callback(int ok, X509_STORE_CTX *store) -{ -#ifdef SOAP_DEBUG - if (!ok) - { char data[256]; - X509 *cert = X509_STORE_CTX_get_current_cert(store); - fprintf(stderr, "SSL verify error or warning with certificate at depth %d: %s\n", X509_STORE_CTX_get_error_depth(store), X509_verify_cert_error_string(X509_STORE_CTX_get_error(store))); - X509_NAME_oneline(X509_get_issuer_name(cert), data, sizeof(data)); - fprintf(stderr, "certificate issuer %s\n", data); - X509_NAME_oneline(X509_get_subject_name(cert), data, sizeof(data)); - fprintf(stderr, "certificate subject %s\n", data); - } -#endif - /* Note: return 1 to continue, but unsafe progress will be terminated by SSL */ - return ok; -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_ssl_accept(struct soap *soap) -{ BIO *bio; - int timeouts, r, s; - if (!soap_valid_socket(soap->socket)) - return soap_set_receiver_error(soap, "SSL error", "No socket in soap_ssl_accept()", SOAP_SSL_ERROR); - if (!soap->ctx && (soap->error = soap->fsslauth(soap))) - return SOAP_INVALID_SOCKET; - if (!soap->ssl) - { soap->ssl = SSL_new(soap->ctx); - if (!soap->ssl) - return soap_set_receiver_error(soap, "SSL error", "SSL_new() failed in soap_ssl_accept()", SOAP_SSL_ERROR); - } - else - SSL_clear(soap->ssl); - soap->imode |= SOAP_ENC_SSL; - soap->omode |= SOAP_ENC_SSL; - /* Set SSL sockets to non-blocking */ -#if defined(WIN32) - { u_long nonblocking = 1; - ioctlsocket((SOAP_SOCKET)soap->socket, FIONBIO, &nonblocking); - } -#elif defined(VXWORKS) - { u_long nonblocking = 1; - ioctl((SOAP_SOCKET)soap->socket, FIONBIO, (int)&nonblocking); - } -#else - fcntl((SOAP_SOCKET)soap->socket, F_SETFL, fcntl((SOAP_SOCKET)soap->socket, F_GETFL)|O_NONBLOCK); -#endif - bio = BIO_new_socket((SOAP_SOCKET)soap->socket, BIO_NOCLOSE); - SSL_set_bio(soap->ssl, bio, bio); - timeouts = 100; /* 10 sec retries, 100 times 0.1 sec */ - while ((r = SSL_accept(soap->ssl)) <= 0) - { int err = SSL_get_error(soap->ssl, r); - if (err == SSL_ERROR_WANT_READ || err == SSL_ERROR_WANT_WRITE) - { struct timeval timeout; - fd_set fd; - timeout.tv_sec = 0; - timeout.tv_usec = 100000; -#ifndef WIN32 - if ((int)soap->socket >= (int)FD_SETSIZE) - return SOAP_FD_EXCEEDED; /* Hint: MUST increase FD_SETSIZE */ -#endif - FD_ZERO(&fd); - FD_SET((SOAP_SOCKET)soap->socket, &fd); - if (err == SSL_ERROR_WANT_READ) - s = select((SOAP_SOCKET)(soap->socket + 1), &fd, NULL, &fd, &timeout); - else - s = select((SOAP_SOCKET)(soap->socket + 1), NULL, &fd, &fd, &timeout); - if (s < 0 && (s = soap_socket_errno(soap->socket)) != SOAP_EINTR) - { soap->errnum = s; - break; - } - } - else - { soap->errnum = err; - break; - } - if (timeouts-- <= 0) - break; - } - if (r <= 0) - { soap_set_receiver_error(soap, soap_ssl_error(soap, r), "SSL_accept() failed in soap_ssl_accept()", SOAP_SSL_ERROR); - soap_closesock(soap); - return SOAP_SSL_ERROR; - } - if ((soap->ssl_flags & SOAP_SSL_REQUIRE_CLIENT_AUTHENTICATION)) - { X509 *peer; - int err; - if ((err = SSL_get_verify_result(soap->ssl)) != X509_V_OK) - { soap_closesock(soap); - return soap_set_sender_error(soap, X509_verify_cert_error_string(err), "SSL certificate presented by peer cannot be verified in soap_ssl_accept()", SOAP_SSL_ERROR); - } - peer = SSL_get_peer_certificate(soap->ssl); - if (!peer) - { soap_closesock(soap); - return soap_set_sender_error(soap, "SSL error", "No SSL certificate was presented by the peer in soap_ssl_accept()", SOAP_SSL_ERROR); - } - X509_free(peer); - } - return SOAP_OK; -} -#endif - -/******************************************************************************/ -#endif /* WITH_OPENSSL */ - -/******************************************************************************/ -#ifndef WITH_NOIO -#ifndef PALM_1 -static int -tcp_init(struct soap *soap) -{ soap->errmode = 1; -#ifdef WIN32 - if (tcp_done) - return 0; - else - { WSADATA w; - if (WSAStartup(MAKEWORD(1, 1), &w)) - return -1; - tcp_done = 1; - } -#endif - return 0; -} -#endif -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_done(struct soap *soap) -{ -#ifdef SOAP_DEBUG - int i; -#endif - if (soap_check_state(soap)) - return; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Done with context\n")); - soap_free_temp(soap); - while (soap->clist) - { struct soap_clist *p = soap->clist->next; - SOAP_FREE(soap, soap->clist); - soap->clist = p; - } - soap->keep_alive = 0; /* to force close the socket */ - soap_closesock(soap); -#ifdef WITH_COOKIES - soap_free_cookies(soap); -#endif - while (soap->plugins) - { register struct soap_plugin *p = soap->plugins->next; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Removing plugin '%s'\n", soap->plugins->id)); - if (soap->plugins->fcopy || soap->state == SOAP_INIT) - soap->plugins->fdelete(soap, soap->plugins); - SOAP_FREE(soap, soap->plugins); - soap->plugins = p; - } - soap->fplugin = fplugin; - soap->fmalloc = NULL; -#ifndef WITH_NOHTTP - soap->fpost = http_post; - soap->fget = http_get; - soap->fform = NULL; - soap->fposthdr = http_post_header; - soap->fresponse = http_response; - soap->fparse = http_parse; - soap->fparsehdr = http_parse_header; -#endif - soap->fheader = NULL; -#ifndef WITH_NOIO -#ifndef WITH_IPV6 - soap->fresolve = tcp_gethost; -#else - soap->fresolve = NULL; -#endif - soap->faccept = tcp_accept; - soap->fopen = tcp_connect; - soap->fclose = tcp_disconnect; - soap->fclosesocket = tcp_closesocket; - soap->fshutdownsocket = tcp_shutdownsocket; - soap->fsend = fsend; - soap->frecv = frecv; - soap->fpoll = soap_poll; -#else - soap->fopen = NULL; - soap->fclose = NULL; - soap->fpoll = NULL; -#endif -#ifndef WITH_LEANER - soap->fprepareinit = NULL; - soap->fpreparesend = NULL; - soap->fpreparerecv = NULL; - soap->fpreparefinal = NULL; -#endif - soap->fseterror = NULL; - soap->fignore = NULL; - soap->fserveloop = NULL; -#ifdef WITH_OPENSSL - if (soap->session) - { SSL_SESSION_free(soap->session); - soap->session = NULL; - } -#endif - if (soap->state == SOAP_INIT) - { if (soap_valid_socket(soap->master)) - { soap->fclosesocket(soap, (SOAP_SOCKET)soap->master); - soap->master = SOAP_INVALID_SOCKET; - } -#ifdef WITH_OPENSSL - if (soap->ctx) - { SSL_CTX_free(soap->ctx); - soap->ctx = NULL; - } -#endif - } -#ifdef SOAP_DEBUG - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Free logfiles\n")); - for (i = 0; i < SOAP_MAXLOGS; i++) - { if (soap->logfile[i]) - { SOAP_FREE(soap, (void*)soap->logfile[i]); - soap->logfile[i] = NULL; - } - soap_close_logfile(soap, i); - } - soap_free_mht(soap); - soap->state = 0; -#endif -} -#endif - -/******************************************************************************/ -#ifndef WITH_NOIO -#ifndef PALM_2 -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_cleanup(struct soap *soap) -{ soap_done(soap); -#ifdef WIN32 - if (!tcp_done) - return; - tcp_done = 0; - WSACleanup(); -#endif -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_NOIO -#ifndef PALM_1 -static const char* -tcp_error(struct soap *soap) -{ register const char *msg = NULL; - switch (soap->errmode) - { case 0: - msg = soap_strerror(soap); - break; - case 1: - msg = "WSAStartup failed"; - break; - case 2: - { -#ifndef WITH_LEAN - msg = soap_code_str(h_error_codes, soap->errnum); - if (!msg) -#endif - { sprintf(soap->msgbuf, "TCP/UDP IP error %d", soap->errnum); - msg = soap->msgbuf; - } - } - } - return msg; -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_NOHTTP -#ifndef PALM_1 -static const char* -http_error(struct soap *soap, int status) -{ register const char *msg = SOAP_STR_EOS; -#ifndef WITH_LEAN - msg = soap_code_str(h_http_error_codes, status); - if (!msg) - msg = SOAP_STR_EOS; -#endif - return msg; -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_IPV6 -#ifndef WITH_NOIO -#ifndef PALM_1 -static int -tcp_gethost(struct soap *soap, const char *addr, struct in_addr *inaddr) -{ soap_int32 iadd = -1; - struct hostent hostent, *host = &hostent; -#ifdef VXWORKS - int hostint; - /* inet_addr(), and hostGetByName() expect "char *"; addr is a "const char *". */ - iadd = inet_addr((char*)addr); -#else -#if defined(_AIXVERSION_431) || defined(TRU64) - struct hostent_data ht_data; -#endif -#ifdef AS400 - iadd = inet_addr((void*)addr); -#else - iadd = inet_addr(addr); -#endif -#endif - if (iadd != -1) - { memcpy(inaddr, &iadd, sizeof(iadd)); - return SOAP_OK; - } -#if defined(__GLIBC__) || defined(FREEBSD) || defined(__FreeBSD__) - if (gethostbyname_r(addr, &hostent, soap->buf, SOAP_BUFLEN, &host, &soap->errnum) < 0) - host = NULL; -#elif defined(_AIXVERSION_431) || defined(TRU64) - memset((void*)&ht_data, 0, sizeof(ht_data)); - if (gethostbyname_r(addr, &hostent, &ht_data) < 0) - { host = NULL; - soap->errnum = h_errno; - } -#elif defined(HAVE_GETHOSTBYNAME_R) - host = gethostbyname_r(addr, &hostent, soap->buf, SOAP_BUFLEN, &soap->errnum); -#elif defined(VXWORKS) - /* If the DNS resolver library resolvLib has been configured in the vxWorks - * image, a query for the host IP address is sent to the DNS server, if the - * name was not found in the local host table. */ - hostint = hostGetByName((char*)addr); - if (hostint == ERROR) - { host = NULL; - soap->errnum = soap_errno; - } -#else -#ifdef AS400 - if (!(host = gethostbyname((void*)addr))) - soap->errnum = h_errno; -#else - if (!(host = gethostbyname(addr))) - soap->errnum = h_errno; -#endif -#endif - if (!host) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Host name not found\n")); - return SOAP_ERR; - } -#ifdef VXWORKS - inaddr->s_addr = hostint; -#else - memcpy(inaddr, host->h_addr, host->h_length); -#endif - return SOAP_OK; -} -#endif -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_NOIO -#ifndef PALM_1 -static int -tcp_connect(struct soap *soap, const char *endpoint, const char *host, int port) -{ -#ifdef WITH_IPV6 - struct addrinfo hints, *res, *ressave; -#endif - register int fd, err = 0; -#ifndef WITH_LEAN - int retry = 10; - int len = SOAP_BUFLEN; - int set = 1; -#endif - if (soap_valid_socket(soap->socket)) - soap->fclosesocket(soap, (SOAP_SOCKET)soap->socket); - soap->socket = SOAP_INVALID_SOCKET; - if (tcp_init(soap)) - { soap->errnum = 0; - soap_set_sender_error(soap, tcp_error(soap), "TCP init failed in tcp_connect()", SOAP_TCP_ERROR); - return SOAP_INVALID_SOCKET; - } - soap->errmode = 0; -#ifdef WITH_IPV6 - memset((void*)&hints, 0, sizeof(hints)); - hints.ai_family = PF_UNSPEC; -#ifdef WITH_UDP - if ((soap->omode & SOAP_IO_UDP)) - hints.ai_socktype = SOCK_DGRAM; - else -#endif - hints.ai_socktype = SOCK_STREAM; - soap->errmode = 2; - if (soap->proxy_host) - err = getaddrinfo(soap->proxy_host, soap_int2s(soap, soap->proxy_port), &hints, &res); - else - err = getaddrinfo(host, soap_int2s(soap, port), &hints, &res); - if (err) - { soap_set_sender_error(soap, gai_strerror(err), "getaddrinfo failed in tcp_connect()", SOAP_TCP_ERROR); - return SOAP_INVALID_SOCKET; - } - ressave = res; -again: - fd = (int)socket(res->ai_family, res->ai_socktype, res->ai_protocol); - soap->errmode = 0; -#else -again: -#ifdef WITH_UDP - if ((soap->omode & SOAP_IO_UDP)) - fd = (int)socket(AF_INET, SOCK_DGRAM, 0); - else -#endif - fd = (int)socket(AF_INET, SOCK_STREAM, 0); -#endif - if (fd < 0) - { soap->errnum = soap_socket_errno(fd); - soap_set_sender_error(soap, tcp_error(soap), "socket failed in tcp_connect()", SOAP_TCP_ERROR); -#ifdef WITH_IPV6 - freeaddrinfo(ressave); -#endif - return SOAP_INVALID_SOCKET; - } -#ifdef SOCKET_CLOSE_ON_EXEC -#ifdef WIN32 -#ifndef UNDER_CE - SetHandleInformation((HANDLE)fd, HANDLE_FLAG_INHERIT, 0); -#endif -#else - fcntl(fd, F_SETFD, 1); -#endif -#endif -#ifndef WITH_LEAN - if (soap->connect_flags == SO_LINGER) - { struct linger linger; - memset((void*)&linger, 0, sizeof(linger)); - linger.l_onoff = 1; - linger.l_linger = 0; - if (setsockopt((SOAP_SOCKET)fd, SOL_SOCKET, SO_LINGER, (char*)&linger, sizeof(struct linger))) - { soap->errnum = soap_socket_errno(fd); - soap_set_sender_error(soap, tcp_error(soap), "setsockopt SO_LINGER failed in tcp_connect()", SOAP_TCP_ERROR); - soap->fclosesocket(soap, (SOAP_SOCKET)fd); -#ifdef WITH_IPV6 - freeaddrinfo(ressave); -#endif - return SOAP_INVALID_SOCKET; - } - } - else if (soap->connect_flags && setsockopt((SOAP_SOCKET)fd, SOL_SOCKET, soap->connect_flags, (char*)&set, sizeof(int))) - { soap->errnum = soap_socket_errno(fd); - soap_set_sender_error(soap, tcp_error(soap), "setsockopt failed in tcp_connect()", SOAP_TCP_ERROR); - soap->fclosesocket(soap, (SOAP_SOCKET)fd); -#ifdef WITH_IPV6 - freeaddrinfo(ressave); -#endif - return SOAP_INVALID_SOCKET; - } - if (soap->keep_alive && setsockopt((SOAP_SOCKET)fd, SOL_SOCKET, SO_KEEPALIVE, (char*)&set, sizeof(int))) - { soap->errnum = soap_socket_errno(fd); - soap_set_sender_error(soap, tcp_error(soap), "setsockopt SO_KEEPALIVE failed in tcp_connect()", SOAP_TCP_ERROR); - soap->fclosesocket(soap, (SOAP_SOCKET)fd); -#ifdef WITH_IPV6 - freeaddrinfo(ressave); -#endif - return SOAP_INVALID_SOCKET; - } - if (setsockopt((SOAP_SOCKET)fd, SOL_SOCKET, SO_SNDBUF, (char*)&len, sizeof(int))) - { soap->errnum = soap_socket_errno(fd); - soap_set_sender_error(soap, tcp_error(soap), "setsockopt SO_SNDBUF failed in tcp_connect()", SOAP_TCP_ERROR); - soap->fclosesocket(soap, (SOAP_SOCKET)fd); -#ifdef WITH_IPV6 - freeaddrinfo(ressave); -#endif - return SOAP_INVALID_SOCKET; - } - if (setsockopt((SOAP_SOCKET)fd, SOL_SOCKET, SO_RCVBUF, (char*)&len, sizeof(int))) - { soap->errnum = soap_socket_errno(fd); - soap_set_sender_error(soap, tcp_error(soap), "setsockopt SO_RCVBUF failed in tcp_connect()", SOAP_TCP_ERROR); - soap->fclosesocket(soap, (SOAP_SOCKET)fd); -#ifdef WITH_IPV6 - freeaddrinfo(ressave); -#endif - return SOAP_INVALID_SOCKET; - } -#ifdef TCP_NODELAY - if (!(soap->omode & SOAP_IO_UDP) && setsockopt((SOAP_SOCKET)fd, IPPROTO_TCP, TCP_NODELAY, (char*)&set, sizeof(int))) - { soap->errnum = soap_socket_errno(fd); - soap_set_sender_error(soap, tcp_error(soap), "setsockopt TCP_NODELAY failed in tcp_connect()", SOAP_TCP_ERROR); - soap->fclosesocket(soap, (SOAP_SOCKET)fd); -#ifdef WITH_IPV6 - freeaddrinfo(ressave); -#endif - return SOAP_INVALID_SOCKET; - } -#endif -#endif - DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Opening socket %d to host='%s' port=%d\n", fd, host, port)); -#ifndef WITH_IPV6 - soap->peerlen = sizeof(soap->peer); - memset((void*)&soap->peer, 0, sizeof(soap->peer)); - soap->peer.sin_family = AF_INET; - soap->errmode = 2; - if (soap->proxy_host) - { if (soap->fresolve(soap, soap->proxy_host, &soap->peer.sin_addr)) - { soap_set_sender_error(soap, tcp_error(soap), "get proxy host by name failed in tcp_connect()", SOAP_TCP_ERROR); - soap->fclosesocket(soap, (SOAP_SOCKET)fd); -#ifdef WITH_IPV6 - freeaddrinfo(ressave); -#endif - return SOAP_INVALID_SOCKET; - } - soap->peer.sin_port = htons((short)soap->proxy_port); - } - else - { if (soap->fresolve(soap, host, &soap->peer.sin_addr)) - { soap_set_sender_error(soap, tcp_error(soap), "get host by name failed in tcp_connect()", SOAP_TCP_ERROR); - soap->fclosesocket(soap, (SOAP_SOCKET)fd); -#ifdef WITH_IPV6 - freeaddrinfo(ressave); -#endif - return SOAP_INVALID_SOCKET; - } - soap->peer.sin_port = htons((short)port); - } - soap->errmode = 0; - if ((soap->omode & SOAP_IO_UDP)) - { -#ifdef WITH_IPV6 - freeaddrinfo(ressave); -#endif - return fd; - } -#endif -#ifndef WITH_LEAN - if (soap->connect_timeout) -#if defined(WIN32) - { u_long nonblocking = 1; - ioctlsocket((SOAP_SOCKET)fd, FIONBIO, &nonblocking); - } -#elif defined(VXWORKS) - { u_long nonblocking = 1; - ioctl((SOAP_SOCKET)fd, FIONBIO, (int)(&nonblocking)); /* modified to use fd */ - } -#else - fcntl((SOAP_SOCKET)fd, F_SETFL, fcntl((SOAP_SOCKET)fd, F_GETFL)|O_NONBLOCK); -#endif - else -#if defined(WIN32) - { u_long blocking = 0; - ioctlsocket((SOAP_SOCKET)fd, FIONBIO, &blocking); - } -#elif defined(VXWORKS) - { u_long blocking = 0; - ioctl((SOAP_SOCKET)fd, FIONBIO, (int)(&blocking)); - } -#else - fcntl((SOAP_SOCKET)fd, F_SETFL, fcntl((SOAP_SOCKET)fd, F_GETFL)&~O_NONBLOCK); -#endif -#endif - for (;;) - { -#ifdef WITH_IPV6 - if (connect((SOAP_SOCKET)fd, res->ai_addr, res->ai_addrlen)) -#else - if (connect((SOAP_SOCKET)fd, (struct sockaddr*)&soap->peer, sizeof(soap->peer))) -#endif - { err = soap_socket_errno(fd); -#ifndef WITH_LEAN - if (err == SOAP_EADDRINUSE) - { soap->fclosesocket(soap, (SOAP_SOCKET)fd); - if (retry-- > 0) - goto again; - } - else if (soap->connect_timeout && (err == SOAP_EINPROGRESS || err == SOAP_EWOULDBLOCK)) - { struct timeval timeout; - SOAP_SOCKLEN_T k; - fd_set fds; - if (soap->connect_timeout > 0) - { timeout.tv_sec = soap->connect_timeout; - timeout.tv_usec = 0; - } - else - { timeout.tv_sec = -soap->connect_timeout/1000000; - timeout.tv_usec = -soap->connect_timeout%1000000; - } -#ifndef WIN32 - if ((int)soap->socket >= (int)FD_SETSIZE) - { soap->error = SOAP_FD_EXCEEDED; -#ifdef WITH_IPV6 - freeaddrinfo(ressave); -#endif - return SOAP_INVALID_SOCKET; /* Hint: MUST increase FD_SETSIZE */ - } -#endif - FD_ZERO(&fds); - FD_SET((SOAP_SOCKET)fd, &fds); - for (;;) - { register int r = select((SOAP_SOCKET)(fd + 1), NULL, &fds, NULL, &timeout); - if (r > 0) - break; - if (!r) - { soap->errnum = 0; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Connect timeout\n")); - soap_set_sender_error(soap, "Timeout", "connect failed in tcp_connect()", SOAP_TCP_ERROR); - soap->fclosesocket(soap, (SOAP_SOCKET)fd); -#ifdef WITH_IPV6 - freeaddrinfo(ressave); -#endif - return SOAP_INVALID_SOCKET; - } - r = soap_socket_errno(fd); - if (r != SOAP_EINTR) - { soap->errnum = r; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Could not connect to host\n")); - soap_set_sender_error(soap, tcp_error(soap), "connect failed in tcp_connect()", SOAP_TCP_ERROR); - soap->fclosesocket(soap, (SOAP_SOCKET)fd); -#ifdef WITH_IPV6 - freeaddrinfo(ressave); -#endif - return SOAP_INVALID_SOCKET; - } - } - k = (SOAP_SOCKLEN_T)sizeof(soap->errnum); - if (!getsockopt((SOAP_SOCKET)fd, SOL_SOCKET, SO_ERROR, (char*)&soap->errnum, &k) && !soap->errnum) /* portability note: see SOAP_SOCKLEN_T definition in stdsoap2.h */ - break; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Could not connect to host\n")); - if (!soap->errnum) - soap->errnum = soap_socket_errno(fd); - soap_set_sender_error(soap, tcp_error(soap), "connect failed in tcp_connect()", SOAP_TCP_ERROR); - soap->fclosesocket(soap, (SOAP_SOCKET)fd); -#ifdef WITH_IPV6 - freeaddrinfo(ressave); -#endif - return SOAP_INVALID_SOCKET; - } -#endif -#ifdef WITH_IPV6 - if (res->ai_next) - { res = res->ai_next; - soap->fclosesocket(soap, (SOAP_SOCKET)fd); - goto again; - } -#endif - if (err && err != SOAP_EINTR) - { soap->errnum = err; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Could not connect to host\n")); - soap_set_sender_error(soap, tcp_error(soap), "connect failed in tcp_connect()", SOAP_TCP_ERROR); - soap->fclosesocket(soap, (SOAP_SOCKET)fd); -#ifdef WITH_IPV6 - freeaddrinfo(ressave); -#endif - return SOAP_INVALID_SOCKET; - } - } - else - break; - } -#ifdef WITH_IPV6 - soap->peerlen = 0; /* IPv6: already connected so use send() */ - freeaddrinfo(ressave); -#endif -#ifndef WITH_LEAN - if (soap->connect_timeout) -#if defined(WIN32) - { u_long blocking = 0; - ioctlsocket((SOAP_SOCKET)fd, FIONBIO, &blocking); - } -#elif defined(VXWORKS) - { u_long blocking = 0; - ioctl((SOAP_SOCKET)fd, FIONBIO, (int)(&blocking)); - } -#else - fcntl((SOAP_SOCKET)fd, F_SETFL, fcntl((SOAP_SOCKET)fd, F_GETFL)&~O_NONBLOCK); -#endif -#endif - soap->socket = fd; - soap->imode &= ~SOAP_ENC_SSL; - soap->omode &= ~SOAP_ENC_SSL; - if (!soap_tag_cmp(endpoint, "https:*")) - { -#ifdef WITH_OPENSSL - BIO *bio; - int r; - if (soap->proxy_host) - { unsigned int k = soap->omode; /* make sure we only parse HTTP */ - size_t n = soap->count; /* save the content length */ - char *userid, *passwd; - char endp[sizeof(soap->endpoint)]; - soap->omode &= ~SOAP_ENC; /* mask IO and ENC */ - soap->omode |= SOAP_IO_BUFFER; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Connecting to %s proxy server\n", soap->proxy_http_version)); - sprintf(soap->tmpbuf, "CONNECT %s:%d HTTP/%s", host, port, soap->proxy_http_version); - if (soap_begin_send(soap) - || (soap->error = soap->fposthdr(soap, soap->tmpbuf, NULL))) - { soap->fclosesocket(soap, (SOAP_SOCKET)fd); - return SOAP_INVALID_SOCKET; - } -#ifndef WITH_LEAN - if (soap->proxy_userid && soap->proxy_passwd && strlen(soap->proxy_userid) + strlen(soap->proxy_passwd) < 761) - { sprintf(soap->tmpbuf + 262, "%s:%s", soap->proxy_userid, soap->proxy_passwd); - strcpy(soap->tmpbuf, "Basic "); - soap_s2base64(soap, (const unsigned char*)(soap->tmpbuf + 262), soap->tmpbuf + 6, strlen(soap->tmpbuf + 262)); - if ((soap->error = soap->fposthdr(soap, "Proxy-Authorization", soap->tmpbuf))) - { soap->fclosesocket(soap, (SOAP_SOCKET)fd); - return soap->error; - } - } -#endif - if ((soap->error = soap->fposthdr(soap, NULL, NULL)) - || soap_flush(soap)) - { soap->fclosesocket(soap, (SOAP_SOCKET)fd); - return SOAP_INVALID_SOCKET; - } - soap->omode = k; - k = soap->imode; - soap->imode &= ~SOAP_ENC; /* mask IO and ENC */ - strcpy(endp, soap->endpoint); - userid = soap->userid; /* preserve */ - passwd = soap->passwd; /* preserve */ - if ((soap->error = soap->fparse(soap))) - { soap->fclosesocket(soap, (SOAP_SOCKET)fd); - return SOAP_INVALID_SOCKET; - } - strcpy(soap->endpoint, endp); /* restore */ - soap->userid = userid; /* restore */ - soap->passwd = passwd; /* restore */ - soap->imode = k; /* restore */ - soap->count = n; /* restore */ - if (soap_begin_send(soap)) - { soap->fclosesocket(soap, (SOAP_SOCKET)fd); - return SOAP_INVALID_SOCKET; - } - } - if (!soap->ctx && (soap->error = soap->fsslauth(soap))) - { soap_set_sender_error(soap, "SSL error", "SSL authentication failed in tcp_connect(): check password, key file, and ca file.", SOAP_SSL_ERROR); - soap->fclosesocket(soap, (SOAP_SOCKET)fd); - return SOAP_INVALID_SOCKET; - } - soap->ssl = SSL_new(soap->ctx); - if (!soap->ssl) - { soap->fclosesocket(soap, (SOAP_SOCKET)fd); - soap->error = SOAP_SSL_ERROR; - return SOAP_INVALID_SOCKET; - } - if (soap->session) - { if (!strcmp(soap->session_host, host) && soap->session_port == port) - SSL_set_session(soap->ssl, soap->session); - SSL_SESSION_free(soap->session); - soap->session = NULL; - } - soap->imode |= SOAP_ENC_SSL; - soap->omode |= SOAP_ENC_SSL; - bio = BIO_new_socket((SOAP_SOCKET)fd, BIO_NOCLOSE); - SSL_set_bio(soap->ssl, bio, bio); - /* Connect timeout: set SSL sockets to non-blocking */ -#ifndef WITH_LEAN - if (soap->connect_timeout) -#if defined(WIN32) - { u_long nonblocking = 1; - ioctlsocket((SOAP_SOCKET)fd, FIONBIO, &nonblocking); - } -#elif defined(VXWORKS) - { u_long nonblocking = 1; - ioctl((SOAP_SOCKET)fd, FIONBIO, (int)(&nonblocking)); - } -#else - fcntl((SOAP_SOCKET)fd, F_SETFL, fcntl((SOAP_SOCKET)fd, F_GETFL)|O_NONBLOCK); -#endif -#endif - /* Try connecting until success or timeout */ - for (;;) - { if ((r = SSL_connect(soap->ssl)) <= 0) - { int err = SSL_get_error(soap->ssl, r); - if (err != SSL_ERROR_NONE && err != SSL_ERROR_WANT_READ && err != SSL_ERROR_WANT_WRITE) - { soap_set_sender_error(soap, soap_ssl_error(soap, r), "SSL connect failed in tcp_connect()", SOAP_SSL_ERROR); - soap->fclosesocket(soap, (SOAP_SOCKET)fd); - return SOAP_INVALID_SOCKET; - } - if (soap->connect_timeout) - { struct timeval timeout; - fd_set fds; - if (soap->connect_timeout > 0) - { timeout.tv_sec = soap->connect_timeout; - timeout.tv_usec = 0; - } - else - { timeout.tv_sec = -soap->connect_timeout/1000000; - timeout.tv_usec = -soap->connect_timeout%1000000; - } -#ifndef WIN32 - if ((int)soap->socket >= (int)FD_SETSIZE) - { soap->error = SOAP_FD_EXCEEDED; - return SOAP_INVALID_SOCKET; /* Hint: MUST increase FD_SETSIZE */ - } -#endif - FD_ZERO(&fds); - FD_SET((SOAP_SOCKET)fd, &fds); - for (;;) - { int r = select((SOAP_SOCKET)(fd + 1), &fds, NULL, &fds, &timeout); - if (r > 0) - break; - if (!r) - { soap->errnum = 0; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Connect timeout\n")); - soap_set_sender_error(soap, "Timeout", "connect failed in tcp_connect()", SOAP_TCP_ERROR); - soap->fclosesocket(soap, (SOAP_SOCKET)fd); - return SOAP_INVALID_SOCKET; - } - } - continue; - } - } - break; - } - /* Set SSL sockets to non-blocking */ -#ifndef WITH_LEAN -#if defined(WIN32) - { u_long nonblocking = 1; - ioctlsocket((SOAP_SOCKET)fd, FIONBIO, &nonblocking); - } -#elif defined(VXWORKS) - { u_long nonblocking = 1; - ioctl((SOAP_SOCKET)fd, FIONBIO, (int)(&nonblocking)); - } -#else - fcntl((SOAP_SOCKET)fd, F_SETFL, fcntl((SOAP_SOCKET)fd, F_GETFL)|O_NONBLOCK); -#endif -#endif - /* Check server credentials when required */ - if ((soap->ssl_flags & SOAP_SSL_REQUIRE_SERVER_AUTHENTICATION)) - { int err; - if ((err = SSL_get_verify_result(soap->ssl)) != X509_V_OK) - { soap_set_sender_error(soap, X509_verify_cert_error_string(err), "SSL certificate presented by peer cannot be verified in tcp_connect()", SOAP_SSL_ERROR); - soap->fclosesocket(soap, (SOAP_SOCKET)fd); - return SOAP_INVALID_SOCKET; - } - if (!(soap->ssl_flags & SOAP_SSL_SKIP_HOST_CHECK)) - { X509_NAME *subj; - int ext_count; - int ok = 0; - X509 *peer; - peer = SSL_get_peer_certificate(soap->ssl); - if (!peer) - { soap_set_sender_error(soap, "SSL error", "No SSL certificate was presented by the peer in tcp_connect()", SOAP_SSL_ERROR); - soap->fclosesocket(soap, (SOAP_SOCKET)fd); - return SOAP_INVALID_SOCKET; - } - ext_count = X509_get_ext_count(peer); - if (ext_count > 0) - { int i; - for (i = 0; i < ext_count; i++) - { X509_EXTENSION *ext = X509_get_ext(peer, i); - const char *ext_str = OBJ_nid2sn(OBJ_obj2nid(X509_EXTENSION_get_object(ext))); - if (ext_str && !strcmp(ext_str, "subjectAltName")) - { X509V3_EXT_METHOD *meth = X509V3_EXT_get(ext); - void *ext_data; - unsigned char *data; - STACK_OF(CONF_VALUE) *val; - int j; - if (!meth) - break; - data = ext->value->data; -#if (OPENSSL_VERSION_NUMBER > 0x00907000L) - if (meth->it) - ext_data = ASN1_item_d2i(NULL, &data, ext->value->length, ASN1_ITEM_ptr(meth->it)); - else - { /* OpenSSL not perfectly portable at this point (?): - Some compilers appear to prefer - meth->d2i(NULL, (const unsigned char**)&data, ... - or - meth->d2i(NULL, &data, ext->value->length); - */ - ext_data = meth->d2i(NULL, &data, ext->value->length); - } -#else - ext_data = meth->d2i(NULL, &data, ext->value->length); -#endif - val = meth->i2v(meth, ext_data, NULL); - for (j = 0; j < sk_CONF_VALUE_num(val); j++) - { CONF_VALUE *nval = sk_CONF_VALUE_value(val, j); - if (nval && !strcmp(nval->name, "DNS") && !strcmp(nval->value, host)) - { ok = 1; - break; - } - } - } - if (ok) - break; - } - } - if (!ok && (subj = X509_get_subject_name(peer))) - { int i = -1; - do - { ASN1_STRING *name; - i = X509_NAME_get_index_by_NID(subj, NID_commonName, i); - if (i == -1) - break; - name = X509_NAME_ENTRY_get_data(X509_NAME_get_entry(subj, i)); - if (name && !soap_tag_cmp(host, (const char*)name)) - ok = 1; - else - { unsigned char *tmp = NULL; - ASN1_STRING_to_UTF8(&tmp, name); - if (tmp) - { if (!soap_tag_cmp(host, (const char*)tmp)) - ok = 1; - OPENSSL_free(tmp); - } - } - } while (!ok); - } - X509_free(peer); - if (!ok) - { soap_set_sender_error(soap, "SSL error", "SSL certificate host name mismatch in tcp_connect()", SOAP_SSL_ERROR); - soap->fclosesocket(soap, (SOAP_SOCKET)fd); - return SOAP_INVALID_SOCKET; - } - } - } -#else - soap->fclosesocket(soap, (SOAP_SOCKET)fd); - soap->error = SOAP_SSL_ERROR; - return SOAP_INVALID_SOCKET; -#endif - } - return fd; -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_NOIO -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_bind(struct soap *soap, const char *host, int port, int backlog) -{ -#ifdef WITH_IPV6 - struct addrinfo *addrinfo = NULL; - struct addrinfo hints; - struct addrinfo res; - int err; -#endif -#ifndef WITH_LEAN - int len = SOAP_BUFLEN; - int set = 1; -#endif - if (soap_valid_socket(soap->master)) - { soap->fclosesocket(soap, (SOAP_SOCKET)soap->master); - soap->master = SOAP_INVALID_SOCKET; - } - soap->socket = SOAP_INVALID_SOCKET; - soap->errmode = 1; - if (tcp_init(soap)) - { soap_set_receiver_error(soap, tcp_error(soap), "TCP init failed in soap_bind()", SOAP_TCP_ERROR); - return SOAP_INVALID_SOCKET; - } -#ifdef WITH_IPV6 - memset((void*)&hints, 0, sizeof(hints)); - hints.ai_family = PF_UNSPEC; -#ifdef WITH_UDP - if ((soap->omode & SOAP_IO_UDP)) - hints.ai_socktype = SOCK_DGRAM; - else -#endif - hints.ai_socktype = SOCK_STREAM; - hints.ai_flags = AI_PASSIVE; - soap->errmode = 2; - err = getaddrinfo(host, soap_int2s(soap, port), &hints, &addrinfo); - if (addrinfo) - { res = *addrinfo; - soap->peer = *((struct sockaddr_storage*)addrinfo->ai_addr); - soap->peerlen = addrinfo->ai_addrlen; - res.ai_addr = (struct sockaddr*)&soap->peer; - res.ai_addrlen = soap->peerlen; - freeaddrinfo(addrinfo); - } - if (err) - { soap_set_receiver_error(soap, gai_strerror(err), "getaddrinfo failed in soap_bind()", SOAP_TCP_ERROR); - return SOAP_INVALID_SOCKET; - } - soap->master = socket(res.ai_family, res.ai_socktype, res.ai_protocol); -#else -#ifdef WITH_UDP - if ((soap->omode & SOAP_IO_UDP)) - soap->master = (int)socket(AF_INET, SOCK_DGRAM, 0); - else -#endif - soap->master = (int)socket(AF_INET, SOCK_STREAM, 0); -#endif - soap->errmode = 0; - if (!soap_valid_socket(soap->master)) - { soap->errnum = soap_socket_errno(soap->master); - soap_set_receiver_error(soap, tcp_error(soap), "socket failed in soap_bind()", SOAP_TCP_ERROR); - return SOAP_INVALID_SOCKET; - } -#ifdef WITH_UDP - if ((soap->omode & SOAP_IO_UDP)) - soap->socket = soap->master; -#endif -#ifdef SOCKET_CLOSE_ON_EXEC -#ifdef WIN32 -#ifndef UNDER_CE - SetHandleInformation((HANDLE)soap->master, HANDLE_FLAG_INHERIT, 0); -#endif -#else - fcntl(soap->master, F_SETFD, 1); -#endif -#endif -#ifndef WITH_LEAN - if (soap->bind_flags && setsockopt((SOAP_SOCKET)soap->master, SOL_SOCKET, soap->bind_flags, (char*)&set, sizeof(int))) - { soap->errnum = soap_socket_errno(soap->master); - soap_set_receiver_error(soap, tcp_error(soap), "setsockopt failed in soap_bind()", SOAP_TCP_ERROR); - return SOAP_INVALID_SOCKET; - } - if (((soap->imode | soap->omode) & SOAP_IO_KEEPALIVE) && setsockopt((SOAP_SOCKET)soap->master, SOL_SOCKET, SO_KEEPALIVE, (char*)&set, sizeof(int))) - { soap->errnum = soap_socket_errno(soap->master); - soap_set_receiver_error(soap, tcp_error(soap), "setsockopt SO_KEEPALIVE failed in soap_bind()", SOAP_TCP_ERROR); - return SOAP_INVALID_SOCKET; - } - if (setsockopt((SOAP_SOCKET)soap->master, SOL_SOCKET, SO_SNDBUF, (char*)&len, sizeof(int))) - { soap->errnum = soap_socket_errno(soap->master); - soap_set_receiver_error(soap, tcp_error(soap), "setsockopt SO_SNDBUF failed in soap_bind()", SOAP_TCP_ERROR); - return SOAP_INVALID_SOCKET; - } - if (setsockopt((SOAP_SOCKET)soap->master, SOL_SOCKET, SO_RCVBUF, (char*)&len, sizeof(int))) - { soap->errnum = soap_socket_errno(soap->master); - soap_set_receiver_error(soap, tcp_error(soap), "setsockopt SO_RCVBUF failed in soap_bind()", SOAP_TCP_ERROR); - return SOAP_INVALID_SOCKET; - } -#ifdef TCP_NODELAY - if (!(soap->omode & SOAP_IO_UDP) && setsockopt((SOAP_SOCKET)soap->master, IPPROTO_TCP, TCP_NODELAY, (char*)&set, sizeof(int))) - { soap->errnum = soap_socket_errno(soap->master); - soap_set_receiver_error(soap, tcp_error(soap), "setsockopt TCP_NODELAY failed in soap_bind()", SOAP_TCP_ERROR); - return SOAP_INVALID_SOCKET; - } -#endif -#endif -#ifdef WITH_IPV6 - soap->errmode = 0; - if (bind((SOAP_SOCKET)soap->master, res.ai_addr, res.ai_addrlen)) - { soap->errnum = soap_socket_errno(soap->master); - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Could not bind to host\n")); - soap_closesock(soap); - soap_set_receiver_error(soap, tcp_error(soap), "bind failed in soap_bind()", SOAP_TCP_ERROR); - return SOAP_INVALID_SOCKET; - } -#else - soap->peerlen = sizeof(soap->peer); - memset((void*)&soap->peer, 0, sizeof(soap->peer)); - soap->peer.sin_family = AF_INET; - soap->errmode = 2; - if (host) - { if (soap->fresolve(soap, host, &soap->peer.sin_addr)) - { soap_set_receiver_error(soap, tcp_error(soap), "get host by name failed in soap_bind()", SOAP_TCP_ERROR); - return SOAP_INVALID_SOCKET; - } - } - else - soap->peer.sin_addr.s_addr = htonl(INADDR_ANY); - soap->peer.sin_port = htons((short)port); - soap->errmode = 0; - if (bind((SOAP_SOCKET)soap->master, (struct sockaddr*)&soap->peer, soap->peerlen)) - { soap->errnum = soap_socket_errno(soap->master); - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Could not bind to host\n")); - soap_closesock(soap); - soap_set_receiver_error(soap, tcp_error(soap), "bind failed in soap_bind()", SOAP_TCP_ERROR); - return SOAP_INVALID_SOCKET; - } -#endif - if (!(soap->omode & SOAP_IO_UDP) && listen((SOAP_SOCKET)soap->master, backlog)) - { soap->errnum = soap_socket_errno(soap->master); - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Could not bind to host\n")); - soap_closesock(soap); - soap_set_receiver_error(soap, tcp_error(soap), "listen failed in soap_bind()", SOAP_TCP_ERROR); - return SOAP_INVALID_SOCKET; - } - return soap->master; -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_NOIO -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_poll(struct soap *soap) -{ -#ifndef WITH_LEAN - struct timeval timeout; - fd_set rfd, sfd, xfd; - int r; - timeout.tv_sec = 0; - timeout.tv_usec = 0; -#ifndef WIN32 - if ((int)soap->socket >= (int)FD_SETSIZE) - return SOAP_FD_EXCEEDED; /* Hint: MUST increase FD_SETSIZE */ -#endif - FD_ZERO(&rfd); - FD_ZERO(&sfd); - FD_ZERO(&xfd); - if (soap_valid_socket(soap->socket)) - { FD_SET((SOAP_SOCKET)soap->socket, &rfd); - FD_SET((SOAP_SOCKET)soap->socket, &sfd); - FD_SET((SOAP_SOCKET)soap->socket, &xfd); - r = select((SOAP_SOCKET)(soap->socket + 1), &rfd, &sfd, &xfd, &timeout); - if (r > 0 && FD_ISSET((SOAP_SOCKET)soap->socket, &xfd)) - r = -1; - } - else if (soap_valid_socket(soap->master)) - { FD_SET((SOAP_SOCKET)soap->master, &sfd); - r = select((SOAP_SOCKET)(soap->master + 1), NULL, &sfd, NULL, &timeout); - } - else - return SOAP_OK; - if (r > 0) - { -#ifdef WITH_OPENSSL - if (soap->imode & SOAP_ENC_SSL) - { - if (soap_valid_socket(soap->socket) - && FD_ISSET((SOAP_SOCKET)soap->socket, &sfd) - && (!FD_ISSET((SOAP_SOCKET)soap->socket, &rfd) - || SSL_peek(soap->ssl, soap->tmpbuf, 1) > 0)) - return SOAP_OK; - } - else -#endif - if (soap_valid_socket(soap->socket) - && FD_ISSET((SOAP_SOCKET)soap->socket, &sfd) - && (!FD_ISSET((SOAP_SOCKET)soap->socket, &rfd) - || recv((SOAP_SOCKET)soap->socket, soap->tmpbuf, 1, MSG_PEEK) > 0)) - return SOAP_OK; - } - else if (r < 0) - { soap->errnum = soap_socket_errno(soap->master); - if ((soap_valid_socket(soap->master) || soap_valid_socket(soap->socket)) && soap_socket_errno(soap->master) != SOAP_EINTR) - { soap_set_receiver_error(soap, tcp_error(soap), "select failed in soap_poll()", SOAP_TCP_ERROR); - return soap->error = SOAP_TCP_ERROR; - } - } - else - soap->errnum = 0; - DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Polling: other end down on socket=%d select=%d\n", soap->socket, r)); - return SOAP_EOF; -#else - return SOAP_OK; -#endif -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_NOIO -#ifndef PALM_1 -static int -tcp_accept(struct soap *soap, int s, struct sockaddr *a, int *n) -{ int fd; - fd = (int)accept((SOAP_SOCKET)s, a, (SOAP_SOCKLEN_T*)n); /* portability note: see SOAP_SOCKLEN_T definition in stdsoap2.h */ -#ifdef SOCKET_CLOSE_ON_EXEC -#ifdef WIN32 -#ifndef UNDER_CE - SetHandleInformation((HANDLE)fd, HANDLE_FLAG_INHERIT, 0); -#endif -#else - fcntl(fd, F_SETFD, FD_CLOEXEC); -#endif -#endif - return fd; -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_NOIO -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_accept(struct soap *soap) -{ int n = (int)sizeof(soap->peer); -#ifndef WITH_LEAN - int len = SOAP_BUFLEN; - int set = 1; -#endif - soap->error = SOAP_OK; -#ifdef WITH_UDP - if ((soap->omode & SOAP_IO_UDP)) - return soap->socket = soap->master; -#endif - memset((void*)&soap->peer, 0, sizeof(soap->peer)); - soap->socket = SOAP_INVALID_SOCKET; - soap->errmode = 0; - soap->keep_alive = 0; - if (soap_valid_socket(soap->master)) - { register int err; - for (;;) - { -#ifndef WITH_LEAN - if (soap->accept_timeout) - { struct timeval timeout; - fd_set fd; - if (soap->accept_timeout > 0) - { timeout.tv_sec = soap->accept_timeout; - timeout.tv_usec = 0; - } - else - { timeout.tv_sec = -soap->accept_timeout/1000000; - timeout.tv_usec = -soap->accept_timeout%1000000; - } -#ifndef WIN32 - if ((int)soap->socket >= (int)FD_SETSIZE) - { soap->error = SOAP_FD_EXCEEDED; - return SOAP_INVALID_SOCKET; /* Hint: MUST increase FD_SETSIZE */ - } -#endif - FD_ZERO(&fd); - FD_SET((SOAP_SOCKET)soap->master, &fd); - for (;;) - { register int r = select((SOAP_SOCKET)(soap->master + 1), &fd, &fd, &fd, &timeout); - if (r > 0) - break; - if (!r) - { soap->errnum = 0; - soap_set_receiver_error(soap, "Timeout", "accept failed in soap_accept()", SOAP_TCP_ERROR); - return SOAP_INVALID_SOCKET; - } - r = soap_socket_errno(soap->master); - if (r != SOAP_EINTR) - { soap->errnum = r; - soap_closesock(soap); - soap_set_sender_error(soap, tcp_error(soap), "accept failed in soap_accept()", SOAP_TCP_ERROR); - return SOAP_INVALID_SOCKET; - } - } -#if defined(WIN32) - { u_long nonblocking = 1; - ioctlsocket((SOAP_SOCKET)soap->master, FIONBIO, &nonblocking); - } -#elif defined(VXWORKS) - { u_long nonblocking = 1; - ioctl((SOAP_SOCKET)soap->master, FIONBIO, (int)(&nonblocking)); - } -#else - fcntl((SOAP_SOCKET)soap->master, F_SETFL, fcntl((SOAP_SOCKET)soap->master, F_GETFL)|O_NONBLOCK); -#endif - } - else -#if defined(WIN32) - { u_long blocking = 0; - ioctlsocket((SOAP_SOCKET)soap->master, FIONBIO, &blocking); - } -#elif defined(VXWORKS) - { u_long blocking = 0; - ioctl((SOAP_SOCKET)soap->master, FIONBIO, (int)(&blocking)); - } -#else - fcntl((SOAP_SOCKET)soap->master, F_SETFL, fcntl((SOAP_SOCKET)soap->master, F_GETFL)&~O_NONBLOCK); -#endif -#endif - soap->socket = soap->faccept(soap, soap->master, (struct sockaddr*)&soap->peer, &n); - soap->peerlen = (size_t)n; - if (soap_valid_socket(soap->socket)) - { -#ifdef WITH_IPV6 -/* Use soap->host to store the numeric form of the remote host */ - getnameinfo((struct sockaddr*)&soap->peer, n, soap->host, sizeof(soap->host), NULL, 0, NI_NUMERICHOST | NI_NUMERICSERV); - DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Accept socket %d from %s\n", soap->socket, soap->host)); - soap->ip = 0; /* info stored in soap->peer and soap->host */ - soap->port = 0; /* info stored in soap->peer and soap->host */ -#else - soap->ip = ntohl(soap->peer.sin_addr.s_addr); - soap->port = (int)ntohs(soap->peer.sin_port); /* does not return port number on some systems */ - DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Accept socket %d at port %d from IP %d.%d.%d.%d\n", soap->socket, soap->port, (int)(soap->ip>>24)&0xFF, (int)(soap->ip>>16)&0xFF, (int)(soap->ip>>8)&0xFF, (int)soap->ip&0xFF)); -#endif -#ifndef WITH_LEAN - if (soap->accept_flags == SO_LINGER) - { struct linger linger; - memset((void*)&linger, 0, sizeof(linger)); - linger.l_onoff = 1; - linger.l_linger = 0; - if (setsockopt((SOAP_SOCKET)soap->socket, SOL_SOCKET, SO_LINGER, (char*)&linger, sizeof(struct linger))) - { soap->errnum = soap_socket_errno(soap->socket); - soap_set_receiver_error(soap, tcp_error(soap), "setsockopt SO_LINGER failed in soap_accept()", SOAP_TCP_ERROR); - soap_closesock(soap); - return SOAP_INVALID_SOCKET; - } - } - else if (soap->accept_flags && setsockopt((SOAP_SOCKET)soap->socket, SOL_SOCKET, soap->accept_flags, (char*)&set, sizeof(int))) - { soap->errnum = soap_socket_errno(soap->socket); - soap_set_receiver_error(soap, tcp_error(soap), "setsockopt failed in soap_accept()", SOAP_TCP_ERROR); - soap_closesock(soap); - return SOAP_INVALID_SOCKET; - } - if (((soap->imode | soap->omode) & SOAP_IO_KEEPALIVE) && setsockopt((SOAP_SOCKET)soap->socket, SOL_SOCKET, SO_KEEPALIVE, (char*)&set, sizeof(int))) - { soap->errnum = soap_socket_errno(soap->socket); - soap_set_receiver_error(soap, tcp_error(soap), "setsockopt SO_KEEPALIVE failed in soap_accept()", SOAP_TCP_ERROR); - soap_closesock(soap); - return SOAP_INVALID_SOCKET; - } - if (setsockopt((SOAP_SOCKET)soap->socket, SOL_SOCKET, SO_SNDBUF, (char*)&len, sizeof(int))) - { soap->errnum = soap_socket_errno(soap->socket); - soap_set_receiver_error(soap, tcp_error(soap), "setsockopt SO_SNDBUF failed in soap_accept()", SOAP_TCP_ERROR); - soap_closesock(soap); - return SOAP_INVALID_SOCKET; - } - if (setsockopt((SOAP_SOCKET)soap->socket, SOL_SOCKET, SO_RCVBUF, (char*)&len, sizeof(int))) - { soap->errnum = soap_socket_errno(soap->socket); - soap_set_receiver_error(soap, tcp_error(soap), "setsockopt SO_RCVBUF failed in soap_accept()", SOAP_TCP_ERROR); - soap_closesock(soap); - return SOAP_INVALID_SOCKET; - } -#ifdef TCP_NODELAY - if (!(soap->omode & SOAP_IO_UDP) && setsockopt((SOAP_SOCKET)soap->socket, IPPROTO_TCP, TCP_NODELAY, (char*)&set, sizeof(int))) - { soap->errnum = soap_socket_errno(soap->socket); - soap_set_receiver_error(soap, tcp_error(soap), "setsockopt TCP_NODELAY failed in soap_accept()", SOAP_TCP_ERROR); - soap_closesock(soap); - return SOAP_INVALID_SOCKET; - } -#endif -#endif - if (soap->accept_timeout) - { -#if defined(WIN32) - u_long blocking = 0; - ioctlsocket((SOAP_SOCKET)soap->master, FIONBIO, &blocking); - ioctlsocket((SOAP_SOCKET)soap->socket, FIONBIO, &blocking); -#elif defined(VXWORKS) - u_long blocking = 0; - ioctl((SOAP_SOCKET)soap->master, FIONBIO, (int)(&blocking)); - ioctl((SOAP_SOCKET)soap->socket, FIONBIO, (int)(&blocking)); -#elif defined(PALM) - fcntl((SOAP_SOCKET)soap->master, F_SETFL, fcntl((SOAP_SOCKET)soap->master, F_GETFL,0)&~O_NONBLOCK); - fcntl((SOAP_SOCKET)soap->socket, F_SETFL, fcntl((SOAP_SOCKET)soap->socket, F_GETFL,0)&~O_NONBLOCK); -#elif defined(SYMBIAN) - long blocking = 0; - ioctl((SOAP_SOCKET)soap->master, 0/*FIONBIO*/, &blocking); -#else - fcntl((SOAP_SOCKET)soap->master, F_SETFL, fcntl((SOAP_SOCKET)soap->master, F_GETFL)&~O_NONBLOCK); - fcntl((SOAP_SOCKET)soap->socket, F_SETFL, fcntl((SOAP_SOCKET)soap->socket, F_GETFL)&~O_NONBLOCK); -#endif - } - soap->keep_alive = (((soap->imode | soap->omode) & SOAP_IO_KEEPALIVE) != 0); - return soap->socket; - } - err = soap_socket_errno(soap->socket); - if (err != 0 && err != SOAP_EINTR && err != SOAP_EAGAIN) - { DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Accept failed from %s\n", soap->host)); - soap->errnum = err; - soap_set_receiver_error(soap, tcp_error(soap), "accept failed in soap_accept()", SOAP_TCP_ERROR); - soap_closesock(soap); - return SOAP_INVALID_SOCKET; - } - } - } - else - { soap->errnum = 0; - soap_set_receiver_error(soap, tcp_error(soap), "no master socket in soap_accept()", SOAP_TCP_ERROR); - return SOAP_INVALID_SOCKET; - } -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_NOIO -#ifndef PALM_1 -static int -tcp_disconnect(struct soap *soap) -{ -#ifdef WITH_OPENSSL - if (soap->ssl) - { int r, s = 0; - if (soap->session) - { SSL_SESSION_free(soap->session); - soap->session = NULL; - } - if (*soap->host) - { soap->session = SSL_get1_session(soap->ssl); - if (soap->session) - { strcpy(soap->session_host, soap->host); - soap->session_port = soap->port; - } - } - r = SSL_shutdown(soap->ssl); - if (r == 0) - { if (soap_valid_socket(soap->socket)) - { struct timeval timeout; - fd_set fd; - if (soap->fshutdownsocket(soap, (SOAP_SOCKET)soap->socket, 1)) - { /* - wait up to 10 seconds for close_notify to be sent by peer (if peer not - present, this avoids calling SSL_shutdown() which has a lengthy return - timeout) - */ -#ifndef WIN32 - if ((int)soap->socket < (int)FD_SETSIZE) - { -#endif - timeout.tv_sec = 10; - timeout.tv_usec = 0; - FD_ZERO(&fd); - FD_SET((SOAP_SOCKET)soap->socket, &fd); - r = select((SOAP_SOCKET)(soap->socket + 1), &fd, NULL, &fd, &timeout); - if (r <= 0 && soap_socket_errno(soap->socket) != SOAP_EINTR) - { soap->errnum = 0; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Connection lost...\n")); - soap->fclosesocket(soap, (SOAP_SOCKET)soap->socket); - soap->socket = SOAP_INVALID_SOCKET; - SSL_free(soap->ssl); - soap->ssl = NULL; - ERR_remove_state(0); - return SOAP_OK; - } -#ifndef WIN32 - } -#endif - } - } - r = SSL_shutdown(soap->ssl); - } - if (r != 1) - { s = ERR_get_error(); - if (s) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Shutdown failed: %d\n", SSL_get_error(soap->ssl, r))); - if (soap_valid_socket(soap->socket) && !(soap->omode & SOAP_IO_UDP)) - { soap->fclosesocket(soap, (SOAP_SOCKET)soap->socket); - soap->socket = SOAP_INVALID_SOCKET; - } - SSL_free(soap->ssl); - soap->ssl = NULL; - ERR_remove_state(0); - return SOAP_SSL_ERROR; - } - } - SSL_free(soap->ssl); - soap->ssl = NULL; - ERR_remove_state(0); - } -#endif - if (soap_valid_socket(soap->socket) && !(soap->omode & SOAP_IO_UDP)) - { soap->fshutdownsocket(soap, (SOAP_SOCKET)soap->socket, 2); - soap->fclosesocket(soap, (SOAP_SOCKET)soap->socket); - soap->socket = SOAP_INVALID_SOCKET; - } - return SOAP_OK; -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_NOIO -#ifndef PALM_1 -static int -tcp_closesocket(struct soap *soap, SOAP_SOCKET fd) -{ DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Close socket %d\n", (int)fd)); - return soap_closesocket(fd); -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_NOIO -#ifndef PALM_1 -static int -tcp_shutdownsocket(struct soap *soap, SOAP_SOCKET fd, int how) -{ DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Shutdown socket %d how=%d\n", (int)fd, how)); - return shutdown(fd, how); -} -#endif -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_closesock(struct soap *soap) -{ register int status = soap->error; - if (status == SOAP_EOF || status == SOAP_TCP_ERROR || status == SOAP_SSL_ERROR || !soap->keep_alive) - { if (soap->fclose && (soap->error = soap->fclose(soap))) - return soap->error; - soap->keep_alive = 0; - } -#ifdef WITH_ZLIB - if (soap->zlib_state == SOAP_ZLIB_DEFLATE) - deflateEnd(&soap->d_stream); - else if (soap->zlib_state == SOAP_ZLIB_INFLATE) - inflateEnd(&soap->d_stream); - soap->zlib_state = SOAP_ZLIB_NONE; -#endif - return soap->error = status; -} -#endif - -/******************************************************************************/ -#ifndef WITH_NOIDREF -#ifndef PALM_2 -SOAP_FMAC1 -size_t -SOAP_FMAC2 -soap_hash(register const char *s) -{ register size_t h = 0; - while (*s) - h = 65599*h + *s++; - return h % SOAP_IDHASH; -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_NOIDREF -#ifndef PALM_1 -static void -soap_init_pht(struct soap *soap) -{ register int i; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Initializing pointer hashtable\n")); - soap->pblk = NULL; - soap->pidx = 0; - for (i = 0; i < (int)SOAP_PTRHASH; i++) - soap->pht[i] = NULL; -} -#endif -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -struct soap* -SOAP_FMAC2 -soap_new1(soap_mode mode) -{ return soap_new2(mode, mode); -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -struct soap* -SOAP_FMAC2 -soap_new() -{ return soap_new2(SOAP_IO_DEFAULT, SOAP_IO_DEFAULT); -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -struct soap* -SOAP_FMAC2 -soap_new2(soap_mode imode, soap_mode omode) -{ struct soap *soap = (struct soap*)malloc(sizeof(struct soap)); - if (soap) - soap_init2(soap, imode, omode); - return soap; -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_free(struct soap *soap) -{ soap_done(soap); - free(soap); -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_del(struct soap *soap) -{ free(soap); -} -#endif - -/******************************************************************************/ -#ifndef WITH_NOIDREF -#ifndef PALM_1 -static void -soap_free_pht(struct soap *soap) -{ register struct soap_pblk *pb, *next; - register int i; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Free pointer hashtable\n")); - for (pb = soap->pblk; pb; pb = next) - { next = pb->next; - SOAP_FREE(soap, pb); - } - soap->pblk = NULL; - soap->pidx = 0; - for (i = 0; i < (int)SOAP_PTRHASH; i++) - soap->pht[i] = NULL; -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_NOIDREF -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_embed(struct soap *soap, const void *p, const struct soap_array *a, int n, const char *tag, int type) -{ register int i; - struct soap_plist *pp; - if (soap->version != 1) - soap->encoding = 1; - if (a) - i = soap_array_pointer_lookup(soap, p, a, n, type, &pp); - else - i = soap_pointer_lookup(soap, p, type, &pp); - if (i) - { if (soap_is_embedded(soap, pp) - || soap_is_single(soap, pp)) - return 0; - soap_set_embedded(soap, pp); - } - return i; -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_NOIDREF -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_pointer_lookup(struct soap *soap, const void *p, int type, struct soap_plist **ppp) -{ register struct soap_plist *pp; - *ppp = NULL; - if (p) - { for (pp = soap->pht[soap_hash_ptr(p)]; pp; pp = pp->next) - { if (pp->ptr == p && pp->type == type) - { *ppp = pp; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Lookup location=%p type=%d id=%d\n", p, type, pp->id)); - return pp->id; - } - } - } - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Lookup location=%p type=%d: not found\n", p, type)); - return 0; -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_NOIDREF -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_pointer_enter(struct soap *soap, const void *p, const struct soap_array *a, int n, int type, struct soap_plist **ppp) -{ register size_t h; - register struct soap_plist *pp; - if (!soap->pblk || soap->pidx >= SOAP_PTRBLK) - { register struct soap_pblk *pb = (struct soap_pblk*)SOAP_MALLOC(soap, sizeof(struct soap_pblk)); - if (!pb) - { soap->error = SOAP_EOM; - return 0; - } - pb->next = soap->pblk; - soap->pblk = pb; - soap->pidx = 0; - } - *ppp = pp = &soap->pblk->plist[soap->pidx++]; - if (a) - h = soap_hash_ptr(a->__ptr); - else - h = soap_hash_ptr(p); - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Pointer enter location=%p array=%p size=%d dim=%d type=%d id=%d\n", p, a?a->__ptr:NULL, a?a->__size:0, n, type, soap->idnum+1)); - pp->next = soap->pht[h]; - pp->type = type; - pp->mark1 = 0; - pp->mark2 = 0; - pp->ptr = p; - pp->array = a; - soap->pht[h] = pp; - pp->id = ++soap->idnum; - return pp->id; -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_NOIDREF -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_array_pointer_lookup(struct soap *soap, const void *p, const struct soap_array *a, int n, int type, struct soap_plist **ppp) -{ register struct soap_plist *pp; - *ppp = NULL; - if (!p || !a->__ptr) - return 0; - for (pp = soap->pht[soap_hash_ptr(a->__ptr)]; pp; pp = pp->next) - { if (pp->type == type && pp->array && pp->array->__ptr == a->__ptr) - { register int i; - for (i = 0; i < n; i++) - if (((const int*)&pp->array->__size)[i] != ((const int*)&a->__size)[i]) - break; - if (i == n) - { *ppp = pp; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Array lookup location=%p type=%d id=%d\n", a->__ptr, type, pp->id)); - return pp->id; - } - } - } - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Array lookup location=%p type=%d: not found\n", a->__ptr, type)); - return 0; -} -#endif -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_begin_count(struct soap *soap) -{ -#ifndef WITH_LEANER - if ((soap->mode & SOAP_ENC_DIME) || (soap->omode & SOAP_ENC_DIME)) - soap->mode = soap->omode | SOAP_IO_LENGTH | SOAP_ENC_DIME; - else -#endif - { soap->mode = soap->omode; - if ((soap->mode & SOAP_IO) == SOAP_IO_STORE - || (((soap->mode & SOAP_IO) == SOAP_IO_CHUNK || (soap->mode & SOAP_ENC_XML)) -#ifndef WITH_LEANER - && !soap->fpreparesend -#endif - )) - soap->mode &= ~SOAP_IO_LENGTH; - else - soap->mode |= SOAP_IO_LENGTH; - } -#ifdef WITH_ZLIB - if ((soap->mode & SOAP_ENC_ZLIB) && (soap->mode & SOAP_IO) == SOAP_IO_FLUSH) - { if (!(soap->mode & SOAP_ENC_DIME)) - soap->mode &= ~SOAP_IO_LENGTH; - if (soap->mode & SOAP_ENC_XML) - soap->mode |= SOAP_IO_BUFFER; - else - soap->mode |= SOAP_IO_STORE; - } -#endif - if (!soap->encodingStyle && !(soap->mode & SOAP_XML_GRAPH)) - soap->mode |= SOAP_XML_TREE; -#ifndef WITH_LEANER - if ((soap->mode & SOAP_ENC_MTOM) && (soap->mode & SOAP_ENC_DIME)) - soap->mode |= SOAP_ENC_MIME; - else - soap->mode &= ~SOAP_ENC_MTOM; - if (soap->mode & SOAP_ENC_MIME) - soap_select_mime_boundary(soap); - soap->dime.list = soap->dime.last; /* keep track of last DIME attachment */ -#endif - soap->count = 0; - soap->ns = 0; - soap->null = 0; - soap->position = 0; - soap->mustUnderstand = 0; - soap->encoding = 0; - soap->part = SOAP_BEGIN; - soap->idnum = 0; - soap_clr_attr(soap); - soap_set_local_namespaces(soap); - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Begin count phase (socket=%d mode=0x%x count=%lu)\n", soap->socket, soap->mode, (unsigned long)soap->count)); -#ifndef WITH_LEANER - soap->dime.count = 0; /* count # of attachments */ - soap->dime.size = 0; /* accumulate total size of attachments */ - if (soap->fprepareinit && (soap->mode & SOAP_IO) != SOAP_IO_STORE) - return soap->error = soap->fprepareinit(soap); -#endif - return SOAP_OK; -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_end_count(struct soap *soap) -{ -#ifndef WITH_LEANER - if (soap->fpreparefinal) - return soap->error = soap->fpreparefinal(soap); -#endif - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "End of count phase\n")); - return SOAP_OK; -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_begin_send(struct soap *soap) -{ soap->error = SOAP_OK; - soap->mode = soap->omode | (soap->mode & (SOAP_IO_LENGTH | SOAP_ENC_DIME)); -#ifdef WITH_ZLIB - if ((soap->mode & SOAP_ENC_ZLIB) && (soap->mode & SOAP_IO) == SOAP_IO_FLUSH) - { if (soap->mode & SOAP_ENC_XML) - soap->mode |= SOAP_IO_BUFFER; - else - soap->mode |= SOAP_IO_STORE; - } -#endif -#ifdef WITH_UDP - if ((soap->mode & SOAP_IO_UDP)) - { soap->mode |= SOAP_ENC_XML; - if (soap->count > SOAP_BUFLEN) - return soap->error = SOAP_UDP_ERROR; - } -#endif - if ((soap->mode & SOAP_IO) == SOAP_IO_FLUSH && soap_valid_socket(soap->socket)) - { if (soap->count || (soap->mode & SOAP_IO_LENGTH) || (soap->mode & SOAP_ENC_XML)) - soap->mode |= SOAP_IO_BUFFER; - else - soap->mode |= SOAP_IO_STORE; - } - soap->mode &= ~SOAP_IO_LENGTH; - if ((soap->mode & SOAP_IO) == SOAP_IO_STORE) - soap_new_block(soap); - if (!(soap->mode & SOAP_IO_KEEPALIVE)) - soap->keep_alive = 0; - if (!soap->encodingStyle && !(soap->mode & SOAP_XML_GRAPH)) - soap->mode |= SOAP_XML_TREE; -#ifndef WITH_LEANER - if ((soap->mode & SOAP_ENC_MTOM) && (soap->mode & SOAP_ENC_DIME)) - { soap->mode |= SOAP_ENC_MIME; - soap->mode &= ~SOAP_ENC_DIME; - } - else - soap->mode &= ~SOAP_ENC_MTOM; - if (soap->mode & SOAP_ENC_MIME) - soap_select_mime_boundary(soap); -#ifdef WIN32 -#ifndef UNDER_CE -#ifndef WITH_FASTCGI - if (!soap_valid_socket(soap->socket)) /* Set win32 stdout or soap->sendfd to BINARY, e.g. to support DIME */ -#ifdef __BORLANDC__ - setmode((SOAP_SOCKET)soap->sendfd, O_BINARY); -#else - _setmode((SOAP_SOCKET)soap->sendfd, _O_BINARY); -#endif -#endif -#endif -#endif -#endif - if (soap->mode & SOAP_IO) - { soap->bufidx = 0; - soap->buflen = 0; - } - soap->chunksize = 0; - soap->ns = 0; - soap->null = 0; - soap->position = 0; - soap->mustUnderstand = 0; - soap->encoding = 0; - soap->idnum = 0; - soap->level = 0; - soap_clr_attr(soap); - soap_set_local_namespaces(soap); -#ifdef WITH_ZLIB - soap->z_ratio_out = 1.0; - if ((soap->mode & SOAP_ENC_ZLIB) && soap->zlib_state != SOAP_ZLIB_DEFLATE) - { -#ifdef WITH_GZIP - memcpy(soap->z_buf, "\37\213\10\0\0\0\0\0\0\377", 10); - soap->d_stream.next_out = (Byte*)soap->z_buf + 10; - soap->d_stream.avail_out = SOAP_BUFLEN - 10; - soap->z_crc = crc32(0L, NULL, 0); - if (deflateInit2(&soap->d_stream, soap->z_level, Z_DEFLATED, -MAX_WBITS, 8, Z_DEFAULT_STRATEGY) != Z_OK) -#else - soap->d_stream.next_out = (Byte*)soap->z_buf; - soap->d_stream.avail_out = SOAP_BUFLEN; - if (deflateInit(&soap->d_stream, soap->z_level) != Z_OK) -#endif - return soap->error = SOAP_ZLIB_ERROR; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Deflate initialized\n")); - soap->zlib_state = SOAP_ZLIB_DEFLATE; - } -#endif - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Begin send phase (socket=%d mode=0x%x count=%lu)\n", soap->socket, soap->mode, (unsigned long)soap->count)); - soap->part = SOAP_BEGIN; -#ifndef WITH_LEANER - if (soap->fprepareinit && (soap->mode & SOAP_IO) == SOAP_IO_STORE) - soap->fprepareinit(soap); -#endif - return SOAP_OK; -} -#endif - -/******************************************************************************/ -#ifndef WITH_NOIDREF -#ifndef PALM_2 -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_embedded(struct soap *soap, const void *p, int t) -{ struct soap_plist *pp; - if (soap_pointer_lookup(soap, p, t, &pp)) - { pp->mark1 = 1; - pp->mark2 = 1; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Embedded %p type=%d mark set to 1\n", p, t)); - } -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_NOIDREF -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_reference(struct soap *soap, const void *p, int t) -{ struct soap_plist *pp; - if (!p || (soap->mode & SOAP_XML_TREE)) - return 1; - if (soap_pointer_lookup(soap, p, t, &pp)) - { if (pp->mark1 == 0) - { pp->mark1 = 2; - pp->mark2 = 2; - } - } - else if (soap_pointer_enter(soap, p, NULL, 0, t, &pp)) - { pp->mark1 = 0; - pp->mark2 = 0; - } - else - return 1; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Reference %p type=%d (%d %d)\n", p, t, (int)pp->mark1, (int)pp->mark2)); - return pp->mark1; -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_NOIDREF -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_array_reference(struct soap *soap, const void *p, const struct soap_array *a, int n, int t) -{ register int i; - struct soap_plist *pp; - if (!p || !a->__ptr) - return 1; - i = soap_array_pointer_lookup(soap, p, a, n, t, &pp); - if (i) - { if (pp->mark1 == 0) - { pp->mark1 = 2; - pp->mark2 = 2; - } - } - else if (!soap_pointer_enter(soap, p, a, n, t, &pp)) - return 1; - else - { pp->mark1 = 0; - pp->mark2 = 0; - } - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Array reference %p ptr=%p dim=%d type=%d (%d %d)\n", p, a->__ptr, n, t, (int)pp->mark1, (int)pp->mark2)); - return pp->mark1; -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_NOIDREF -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_embedded_id(struct soap *soap, int id, const void *p, int t) -{ struct soap_plist *pp = NULL; - if (soap->mode & SOAP_XML_TREE) - return id; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Embedded_id %p type=%d id=%d\n", p, t, id)); - if (soap->version == 1 && soap->encodingStyle && !(soap->mode & SOAP_XML_GRAPH) && soap->part != SOAP_IN_HEADER) - { if (id < 0) - { id = soap_pointer_lookup(soap, p, t, &pp); - if (id) - { if (soap->mode & SOAP_IO_LENGTH) - pp->mark1 = 2; - else - pp->mark2 = 2; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Embedded_id multiref id=%d %p type=%d = (%d %d)\n", id, p, t, (int)pp->mark1, (int)pp->mark2)); - } - return -1; - } - return id; - } - if (id < 0) - id = soap_pointer_lookup(soap, p, t, &pp); - else if (id && !soap_pointer_lookup(soap, p, t, &pp)) - return 0; - if (id && pp) - { if (soap->mode & SOAP_IO_LENGTH) - pp->mark1 = 1; - else - pp->mark2 = 1; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Embedded_id embedded ref id=%d %p type=%d = (%d %d)\n", id, p, t, (int)pp->mark1, (int)pp->mark2)); - } - return id; -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_NOIDREF -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_is_embedded(struct soap *soap, struct soap_plist *pp) -{ if (!pp) - return 0; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Is embedded? %d %d\n", (int)pp->mark1, (int)pp->mark2)); - if (soap->version == 1 && soap->encodingStyle && !(soap->mode & SOAP_XML_GRAPH) && soap->part != SOAP_IN_HEADER) - { if (soap->mode & SOAP_IO_LENGTH) - return pp->mark1 != 0; - return pp->mark2 != 0; - } - if (soap->mode & SOAP_IO_LENGTH) - return pp->mark1 == 1; - return pp->mark2 == 1; -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_NOIDREF -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_is_single(struct soap *soap, struct soap_plist *pp) -{ if (soap->part == SOAP_IN_HEADER) - return 1; - if (!pp) - return 0; - if (soap->mode & SOAP_IO_LENGTH) - return pp->mark1 == 0; - return pp->mark2 == 0; -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_NOIDREF -#ifndef PALM_2 -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_set_embedded(struct soap *soap, struct soap_plist *pp) -{ if (!pp) - return; - if (soap->mode & SOAP_IO_LENGTH) - pp->mark1 = 1; - else - pp->mark2 = 1; -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_NOIDREF -#ifndef WITH_LEANER -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_attachment(struct soap *soap, const char *tag, int id, const void *p, const struct soap_array *a, const char *aid, const char *atype, const char *aoptions, int n, const char *type, int t) -{ struct soap_plist *pp; - int i; - if (!p || !a->__ptr || (!aid && !atype)) - return soap_element_id(soap, tag, id, p, a, n, type, t); - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Attachment tag='%s' id='%s' (%d) type='%s'\n", tag, aid?aid:"", id, atype?atype:"")); - i = soap_array_pointer_lookup(soap, p, a, n, t, &pp); - if (!i) - { i = soap_pointer_enter(soap, p, a, n, t, &pp); - if (!i) - { soap->error = SOAP_EOM; - return -1; - } - } - if (id <= 0) - id = i; - if (!aid) - { sprintf(soap->tmpbuf, soap->dime_id_format, id); - aid = soap_strdup(soap, soap->tmpbuf); - } - /* Add MTOM xop:Include element when necessary */ - /* TODO: this code to be obsoleted with new import/xop.h conventions */ - if ((soap->mode & SOAP_ENC_MTOM) && strcmp(tag, "xop:Include")) - { if (soap_element_begin_out(soap, tag, 0, type) - || soap_element_href(soap, "xop:Include", 0, "href", aid) - || soap_element_end_out(soap, tag)) - return soap->error; - } - else if (soap_element_href(soap, tag, 0, "href", aid)) - return soap->error; - if (soap->mode & SOAP_IO_LENGTH) - { if (pp->mark1 != 3) - { struct soap_multipart *content; - if (soap->mode & SOAP_ENC_MTOM) - content = soap_new_multipart(soap, &soap->mime.first, &soap->mime.last, (char*)a->__ptr, a->__size); - else - content = soap_new_multipart(soap, &soap->dime.first, &soap->dime.last, (char*)a->__ptr, a->__size); - if (!content) - { soap->error = SOAP_EOM; - return -1; - } - if (!strncmp(aid, "cid:", 4)) /* RFC 2111 */ - { if (soap->mode & SOAP_ENC_MTOM) - { char *s = (char*)soap_malloc(soap, strlen(aid) - 1); - if (s) - { *s = '<'; - strcpy(s + 1, aid + 4); - strcat(s, ">"); - content->id = s; - } - } - else - content->id = aid + 4; - } - else - content->id = aid; - content->type = atype; - content->options = aoptions; - content->encoding = SOAP_MIME_BINARY; - pp->mark1 = 3; - } - } - else - pp->mark2 = 3; - return -1; -} -#endif -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_NOIDREF -#ifndef PALM_1 -static void -soap_init_iht(struct soap *soap) -{ register int i; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Initializing ID hashtable\n")); - for (i = 0; i < SOAP_IDHASH; i++) - soap->iht[i] = NULL; -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_NOIDREF -#ifndef PALM_1 -static void -soap_free_iht(struct soap *soap) -{ register int i; - register struct soap_ilist *ip, *p; - register struct soap_flist *fp, *fq; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Free ID hashtable\n")); - for (i = 0; i < SOAP_IDHASH; i++) - { for (ip = soap->iht[i]; ip; ip = p) - { for (fp = ip->flist; fp; fp = fq) - { fq = fp->next; - SOAP_FREE(soap, fp); - } - p = ip->next; - SOAP_FREE(soap, ip); - } - soap->iht[i] = NULL; - } -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_NOIDREF -#ifndef PALM_2 -SOAP_FMAC1 -struct soap_ilist * -SOAP_FMAC2 -soap_lookup(struct soap *soap, const char *id) -{ register struct soap_ilist *ip; - for (ip = soap->iht[soap_hash(id)]; ip; ip = ip->next) - if (!strcmp(ip->id, id)) - return ip; - return NULL; -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_NOIDREF -#ifndef PALM_2 -SOAP_FMAC1 -struct soap_ilist * -SOAP_FMAC2 -soap_enter(struct soap *soap, const char *id) -{ register size_t h; - register struct soap_ilist *ip; - ip = (struct soap_ilist*)SOAP_MALLOC(soap, sizeof(struct soap_ilist) + strlen(id)); - if (ip) - { h = soap_hash(id); - strcpy(ip->id, id); - ip->next = soap->iht[h]; - soap->iht[h] = ip; - return ip; - } - return NULL; -} -#endif -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -void* -SOAP_FMAC2 -soap_malloc(struct soap *soap, size_t n) -{ register char *p; - if (!n) - return (void*)SOAP_NON_NULL; - if (!soap) - return SOAP_MALLOC(soap, n); - if (soap->fmalloc) - p = (char*)soap->fmalloc(soap, n); - else - { n += sizeof(short); - n += (-(long)n) & (sizeof(void*)-1); /* align at 4-, 8- or 16-byte boundary */ - if (!(p = (char*)SOAP_MALLOC(soap, n + sizeof(void*) + sizeof(size_t)))) - { soap->error = SOAP_EOM; - return NULL; - } - /* set the canary to detect corruption */ - *(short*)(p + n - sizeof(short)) = (short)SOAP_CANARY; - /* keep chain of alloced cells for destruction */ - *(void**)(p + n) = soap->alist; - *(size_t*)(p + n + sizeof(void*)) = n; - soap->alist = p + n; - } - soap->alloced = 1; - return p; -} -#endif - -/******************************************************************************/ -#ifdef SOAP_MEM_DEBUG -static void -soap_init_mht(struct soap *soap) -{ register int i; - for (i = 0; i < (int)SOAP_PTRHASH; i++) - soap->mht[i] = NULL; -} -#endif - -/******************************************************************************/ -#ifdef SOAP_MEM_DEBUG -static void -soap_free_mht(struct soap *soap) -{ register int i; - register struct soap_mlist *mp, *mq; - for (i = 0; i < (int)SOAP_PTRHASH; i++) - { for (mp = soap->mht[i]; mp; mp = mq) - { mq = mp->next; - if (mp->live) - fprintf(stderr, "%s(%d): malloc() = %p not freed (memory leak or forgot to call soap_end()?)\n", mp->file, mp->line, mp->ptr); - free(mp); - } - soap->mht[i] = NULL; - } -} -#endif - -/******************************************************************************/ -#ifdef SOAP_MEM_DEBUG -SOAP_FMAC1 -void* -SOAP_FMAC2 -soap_track_malloc(struct soap *soap, const char *file, int line, size_t size) -{ register void *p = malloc(size); - if (soap) - { register size_t h = soap_hash_ptr(p); - register struct soap_mlist *mp = (struct soap_mlist*)malloc(sizeof(struct soap_mlist)); - if (soap->fdebug[SOAP_INDEX_TEST]) - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "%s(%d): malloc(%lu) = %p\n", file, line, (unsigned long)size, p)); - mp->next = soap->mht[h]; - mp->ptr = p; - mp->file = file; - mp->line = line; - mp->live = 1; - soap->mht[h] = mp; - } - return p; -} -#endif - -/******************************************************************************/ -#ifdef SOAP_MEM_DEBUG -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_track_free(struct soap *soap, const char *file, int line, void *p) -{ register size_t h = soap_hash_ptr(p); - register struct soap_mlist *mp; - for (mp = soap->mht[h]; mp; mp = mp->next) - if (mp->ptr == p) - break; - if (mp) - { if (mp->live) - { free(p); - if (soap->fdebug[SOAP_INDEX_TEST]) - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "%s(%d): free(%p)\n", file, line, p)); - mp->live = 0; - } - else - fprintf(stderr, "%s(%d): free(%p) double free of pointer malloced at %s(%d)\n", file, line, p, mp->file, mp->line); - } - else - fprintf(stderr, "%s(%d): free(%p) pointer not malloced\n", file, line, p); -} -#endif - -/******************************************************************************/ -#ifdef SOAP_MEM_DEBUG -static void -soap_track_unlink(struct soap *soap, const void *p) -{ register size_t h = soap_hash_ptr(p); - register struct soap_mlist *mp; - for (mp = soap->mht[h]; mp; mp = mp->next) - if (mp->ptr == p) - break; - if (mp) - mp->live = 0; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_dealloc(struct soap *soap, void *p) -{ if (soap_check_state(soap)) - return; - if (p) - { register char **q; - for (q = (char**)&soap->alist; *q; q = *(char***)q) - { - if (*(short*)(char*)(*q - sizeof(short)) != (short)SOAP_CANARY) - { fprintf(stderr, "Data corruption in dynamic allocation (see logs)\n"); - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Data corruption:\n")); - DBGHEX(TEST, *q - 200, 200); - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "\n")); - soap->error = SOAP_MOE; - return; - } - if (p == (void*)(*q - *(size_t*)(*q + sizeof(void*)))) - { *q = **(char***)q; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Freed data at %p\n", p)); - SOAP_FREE(soap, p); - return; - } - } - soap_delete(soap, p); - } - else - { register char *q; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Free all soap_malloc() data\n")); - while (soap->alist) - { q = (char*)soap->alist; - if (*(short*)(char*)(q - sizeof(short)) != (short)SOAP_CANARY) - { fprintf(stderr, "Data corruption in dynamic allocation (see logs)\n"); - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Data corruption:\n")); - DBGHEX(TEST, q - 200, 200); - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "\n")); - soap->error = SOAP_MOE; - return; - } - soap->alist = *(void**)q; - q -= *(size_t*)(q + sizeof(void*)); - SOAP_FREE(soap, q); - } - } - /* we must assume these were deallocated: */ - soap->action = NULL; - soap->fault = NULL; - soap->header = NULL; - soap->userid = NULL; - soap->passwd = NULL; - soap->authrealm = NULL; -#ifndef WITH_LEANER - soap_clr_mime(soap); -#endif -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_delete(struct soap *soap, void *p) -{ register struct soap_clist **cp; - if (soap_check_state(soap)) - return; - cp = &soap->clist; - if (p) - { while (*cp) - { if (p == (*cp)->ptr) - { register struct soap_clist *q = *cp; - *cp = q->next; - if (q->fdelete(q)) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Could not dealloc data %p: deletion callback failed for object type %d\n", q->ptr, q->type)); -#ifdef SOAP_MEM_DEBUG - fprintf(stderr, "new(object type = %d) = %p not freed: deletion callback failed\n", q->type, q->ptr); -#endif - } - SOAP_FREE(soap, q); - return; - } - cp = &(*cp)->next; - } - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Could not dealloc data %p: address not in list\n", p)); - } - else - { while (*cp) - { register struct soap_clist *q = *cp; - *cp = q->next; - if (q->fdelete(q)) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Could not dealloc data %p: deletion callback failed for object type %d\n", q->ptr, q->type)); -#ifdef SOAP_MEM_DEBUG - fprintf(stderr, "new(object type = %d) = %p not freed: deletion callback failed\n", q->type, q->ptr); -#endif - } - SOAP_FREE(soap, q); - } - } -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -struct soap_clist * -SOAP_FMAC2 -soap_link(struct soap *soap, void *p, int t, int n, int (*fdelete)(struct soap_clist*)) -{ register struct soap_clist *cp; - if ((cp = (struct soap_clist*)SOAP_MALLOC(soap, sizeof(struct soap_clist)))) - { cp->next = soap->clist; - cp->type = t; - cp->size = n; - cp->ptr = p; - cp->fdelete = fdelete; - soap->clist = cp; - } - return cp; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_unlink(struct soap *soap, const void *p) -{ register char **q; - register struct soap_clist **cp; - if (!soap || !p) - return; - for (q = (char**)&soap->alist; *q; q = *(char***)q) - { if (p == (void*)(*q - *(size_t*)(*q + sizeof(void*)))) - { *q = **(char***)q; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Unlinked data %p\n", p)); -#ifdef SOAP_DEBUG - soap_track_unlink(soap, p); -#endif - return; - } - } - for (cp = &soap->clist; *cp; cp = &(*cp)->next) - { if (p == (*cp)->ptr) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Unlinked class instance %p\n", p)); - q = (char**)*cp; - *cp = (*cp)->next; - SOAP_FREE(soap, q); - return; - } - } -} -#endif - -/******************************************************************************/ -#ifndef WITH_NOIDREF -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_lookup_type(struct soap *soap, const char *id) -{ register struct soap_ilist *ip; - if (id && *id) - { ip = soap_lookup(soap, id); - if (ip) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Lookup id='%s' type=%d\n", id, ip->type)); - return ip->type; - } - } - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "lookup type id='%s' NOT FOUND! Need to get it from xsi:type\n", id)); - return 0; -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_NOIDREF -#ifndef PALM_2 -SOAP_FMAC1 -void* -SOAP_FMAC2 -soap_id_lookup(struct soap *soap, const char *id, void **p, int t, size_t n, unsigned int k) -{ struct soap_ilist *ip; - void **q; - if (!p || !id || !*id) - return p; - ip = soap_lookup(soap, id); /* lookup pointer to hash table entry for string id */ - if (!ip) - { ip = soap_enter(soap, id); /* new hash table entry for string id */ - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Forwarding first href='%s' type=%d %p (%u bytes)\n", id, t, p, (unsigned int)n)); - ip->type = t; - ip->size = n; - ip->link = p; - ip->copy = NULL; - ip->flist = NULL; - ip->ptr = NULL; - ip->level = k; - *p = NULL; - } - else if (ip->ptr) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Resolved href='%s' type=%d location=%p (%u bytes)\n", id, t, ip->ptr, (unsigned int)n)); - if (ip->type != t) - { strcpy(soap->id, id); - soap->error = SOAP_HREF; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Type incompatibility: id type=%d href type=%d\n", ip->type, t)); - return NULL; - } - while (ip->level < k) - { q = (void**)soap_malloc(soap, sizeof(void*)); - if (!q) - return NULL; - *p = (void*)q; - p = q; - k--; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Descending one level...\n")); - } - *p = ip->ptr; - } - else if (ip->level > k) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Resolving level %u pointers to href='%s'\n", ip->level, id)); - while (ip->level > k) - { void *s, **r = &ip->link; - q = (void**)ip->link; - while (q) - { *r = (void*)soap_malloc(soap, sizeof(void*)); - s = *q; - *q = *r; - r = (void**)*r; - q = (void**)s; - } - *r = NULL; - ip->size = n; - ip->copy = NULL; - ip->level = ip->level - 1; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Descending one level...\n")); - } - q = (void**)ip->link; - ip->link = p; - *p = (void*)q; - } - else - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Forwarded href='%s' type=%d location=%p (%u bytes)\n", id, t, p, (unsigned int)n)); - while (ip->level < k) - { q = (void**)soap_malloc(soap, sizeof(void*)); - *p = q; - p = q; - k--; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Descending one level...\n")); - } - q = (void**)ip->link; - ip->link = p; - *p = (void*)q; - } - return p; -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_NOIDREF -#ifndef PALM_2 -SOAP_FMAC1 -void* -SOAP_FMAC2 -soap_id_forward(struct soap *soap, const char *href, void *p, size_t len, int st, int tt, size_t n, unsigned int k, void (*fcopy)(struct soap*, int, int, void*, size_t, const void*, size_t)) -{ struct soap_ilist *ip; - if (!p || !href || !*href) - return p; - ip = soap_lookup(soap, href); /* lookup pointer to hash table entry for string id */ - if (!ip) - { ip = soap_enter(soap, href); /* new hash table entry for string id */ - ip->type = st; - ip->size = n; - ip->link = NULL; - ip->copy = NULL; - ip->ptr = NULL; - ip->level = 0; - ip->flist = NULL; - DBGLOG(TEST,SOAP_MESSAGE(fdebug, "New entry href='%s' type=%d size=%lu level=%d location=%p\n", href, st, (unsigned long)n, k, p)); - } - else if (ip->type != st || (ip->level == k && ip->size != n)) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Type incompatibility id='%s' expect type=%d size=%lu level=%u got type=%d size=%lu\n", href, ip->type, (unsigned long)ip->size, k, st, (unsigned long)n)); - strcpy(soap->id, href); - soap->error = SOAP_HREF; - return NULL; - } - if (fcopy || n < sizeof(void*) || *href != '#') - { register struct soap_flist *fp = (struct soap_flist*)SOAP_MALLOC(soap, sizeof(struct soap_flist)); - if (!fp) - { soap->error = SOAP_EOM; - return NULL; - } - fp->next = ip->flist; - fp->type = tt; - fp->ptr = p; - fp->level = k; - fp->len = len; - if (fcopy) - fp->fcopy = fcopy; - else - fp->fcopy = soap_fcopy; - ip->flist = fp; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Forwarding type=%d (target type=%d) size=%lu location=%p level=%u len=%lu href='%s'\n", st, tt, (unsigned long)n, p, k, (unsigned long)len, href)); - } - else - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Forwarding copying address %p for type=%d href='%s'\n", p, st, href)); - *(void**)p = ip->copy; - ip->copy = p; - } - return p; -} -#endif -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -void* -SOAP_FMAC2 -soap_id_enter(struct soap *soap, const char *id, void *p, int t, size_t n, unsigned int k, const char *type, const char *arrayType, void *(*finstantiate)(struct soap*, int, const char*, const char*, size_t*)) -{ -#ifndef WITH_NOIDREF - struct soap_ilist *ip; -#endif - DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Enter id='%s' type=%d loc=%p size=%lu level=%u\n", id, t, p, (unsigned long)n, k)); - soap->alloced = 0; - if (!p) - { if (finstantiate) - p = finstantiate(soap, t, type, arrayType, &n); - else - p = soap_malloc(soap, n); - if (p) - soap->alloced = 1; - } -#ifndef WITH_NOIDREF - if (!id || !*id) -#endif - return p; -#ifndef WITH_NOIDREF - ip = soap_lookup(soap, id); /* lookup pointer to hash table entry for string id */ - DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Lookup entry id='%s for location=%p'\n", id, p)); - if (!ip) - { ip = soap_enter(soap, id); /* new hash table entry for string id */ - ip->type = t; - ip->link = NULL; - ip->copy = NULL; - ip->flist = NULL; - ip->size = n; - ip->ptr = p; - ip->level = k; - DBGLOG(TEST,SOAP_MESSAGE(fdebug, "New entry id='%s' type=%d size=%lu level=%u location=%p\n", id, t, (unsigned long)n, k, p)); - } - else if ((ip->type != t || (ip->level == k && ip->size != n)) && (ip->copy || ip->flist)) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Type incompatibility id='%s' expect type=%d size=%lu level=%u got type=%d size=%lu\n", id, ip->type, (unsigned long)ip->size, k, t, (unsigned long)n)); - strcpy(soap->id, id); - soap->error = SOAP_HREF; - return NULL; - } - else if (ip->ptr) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Multiply defined id='%s'\n", id)); - strcpy(soap->id, id); - soap->error = SOAP_DUPLICATE_ID; - return NULL; - } - else - { ip->size = n; - ip->ptr = p; - ip->level = k; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Update entry id='%s' type=%d location=%p size=%lu level=%u\n", id, t, p, (unsigned long)n, k)); - } - return ip->ptr; -#endif -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_fcopy(struct soap *soap, int st, int tt, void *p, size_t len, const void *q, size_t n) -{ DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Copying data type=%d (target type=%d) %p -> %p (%lu bytes)\n", st, tt, q, p, (unsigned long)n)); - memcpy(p, q, n); -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_end_send(struct soap *soap) -{ -#ifndef WITH_LEANER - if (soap->dime.list) - { /* SOAP body referenced attachments must appear first */ - soap->dime.last->next = soap->dime.first; - soap->dime.first = soap->dime.list->next; - soap->dime.list->next = NULL; - soap->dime.last = soap->dime.list; - } - if (soap_putdime(soap) || soap_putmime(soap)) - return soap->error; - soap->mime.list = NULL; - soap->mime.first = NULL; - soap->mime.last = NULL; - soap->dime.list = NULL; - soap->dime.first = NULL; - soap->dime.last = NULL; -#endif - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "End send\n")); - if (soap->mode & SOAP_IO) /* need to flush the remaining data in buffer */ - { if (soap_flush(soap)) -#ifdef WITH_ZLIB - { if (soap->mode & SOAP_ENC_ZLIB && soap->zlib_state == SOAP_ZLIB_DEFLATE) - { soap->zlib_state = SOAP_ZLIB_NONE; - deflateEnd(&soap->d_stream); - } - return soap->error; - } -#else - return soap->error; -#endif -#ifdef WITH_ZLIB - if (soap->mode & SOAP_ENC_ZLIB) - { int r; - soap->d_stream.avail_in = 0; - do - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Deflating remainder\n")); - r = deflate(&soap->d_stream, Z_FINISH); - if (soap->d_stream.avail_out != SOAP_BUFLEN) - { if (soap_flush_raw(soap, soap->z_buf, SOAP_BUFLEN - soap->d_stream.avail_out)) - { soap->zlib_state = SOAP_ZLIB_NONE; - deflateEnd(&soap->d_stream); - return soap->error; - } - soap->d_stream.next_out = (Byte*)soap->z_buf; - soap->d_stream.avail_out = SOAP_BUFLEN; - } - } while (r == Z_OK); - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Deflated %lu->%lu bytes\n", soap->d_stream.total_in, soap->d_stream.total_out)); - soap->z_ratio_out = (float)soap->d_stream.total_out / (float)soap->d_stream.total_in; - soap->mode &= ~SOAP_ENC_ZLIB; - soap->zlib_state = SOAP_ZLIB_NONE; - if (deflateEnd(&soap->d_stream) != Z_OK || r != Z_STREAM_END) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Unable to end deflate: %s\n", soap->d_stream.msg?soap->d_stream.msg:"")); - return soap->error = SOAP_ZLIB_ERROR; - } -#ifdef WITH_GZIP - soap->z_buf[0] = soap->z_crc & 0xFF; - soap->z_buf[1] = (soap->z_crc >> 8) & 0xFF; - soap->z_buf[2] = (soap->z_crc >> 16) & 0xFF; - soap->z_buf[3] = (soap->z_crc >> 24) & 0xFF; - soap->z_buf[4] = soap->d_stream.total_in & 0xFF; - soap->z_buf[5] = (soap->d_stream.total_in >> 8) & 0xFF; - soap->z_buf[6] = (soap->d_stream.total_in >> 16) & 0xFF; - soap->z_buf[7] = (soap->d_stream.total_in >> 24) & 0xFF; - if (soap_flush_raw(soap, soap->z_buf, 8)) - return soap->error; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "gzip crc32=%lu\n", (unsigned long)soap->z_crc)); -#endif - } -#endif - if ((soap->mode & SOAP_IO) == SOAP_IO_STORE) - { char *p; -#ifndef WITH_NOHTTP - if (!(soap->mode & SOAP_ENC_XML)) - { soap->mode--; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Sending buffered message of length %u\n", (unsigned int)soap->blist->size)); - if (soap->status >= SOAP_POST) - soap->error = soap->fpost(soap, soap->endpoint, soap->host, soap->port, soap->path, soap->action, soap->blist->size); - else if (soap->status != SOAP_STOP) - soap->error = soap->fresponse(soap, soap->status, soap->blist->size); - if (soap->error || soap_flush(soap)) - return soap->error; - soap->mode++; - } -#endif - for (p = soap_first_block(soap); p; p = soap_next_block(soap)) - { DBGMSG(SENT, p, soap_block_size(soap)); - if ((soap->error = soap->fsend(soap, p, soap_block_size(soap)))) - { soap_end_block(soap); - return soap->error; - } - } - soap_end_block(soap); - } -#ifndef WITH_LEANER - else if ((soap->mode & SOAP_IO) == SOAP_IO_CHUNK) - { DBGMSG(SENT, "\r\n0\r\n\r\n", 7); - if ((soap->error = soap->fsend(soap, "\r\n0\r\n\r\n", 7))) - return soap->error; - } -#endif - } -#ifdef WITH_TCPFIN -#ifdef WITH_OPENSSL - if (!soap->ssl && soap_valid_socket(soap->socket) && !soap->keep_alive && !(soap->omode & SOAP_IO_UDP)) - soap->fshutdownsocket(soap, (SOAP_SOCKET)soap->socket, 1); /* Send TCP FIN */ -#else - if (soap_valid_socket(soap->socket) && !soap->keep_alive && !(soap->omode & SOAP_IO_UDP)) - soap->fshutdownsocket(soap, (SOAP_SOCKET)soap->socket, 1); /* Send TCP FIN */ -#endif -#endif - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "End of send phase\n")); - soap->omode &= ~SOAP_XML_SEC; - soap->count = 0; - soap->part = SOAP_END; - return SOAP_OK; -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_end_recv(struct soap *soap) -{ soap->part = SOAP_END; -#ifndef WITH_LEANER - if ((soap->mode & SOAP_ENC_DIME) && soap_getdime(soap)) - return soap->error; - soap->dime.list = soap->dime.first; - soap->dime.first = NULL; - soap->dime.last = NULL; - /* Check if MIME attachments and mime-post-check flag is set, if set call soap_resolve() and return */ - if (soap->mode & SOAP_ENC_MIME) - { -#ifndef WITH_NOIDREF - if (soap->mode & SOAP_MIME_POSTCHECK) - { soap_resolve(soap); - return SOAP_OK; - } -#endif - if (soap_getmime(soap)) - return soap->error; - } - soap->mime.list = soap->mime.first; - soap->mime.first = NULL; - soap->mime.last = NULL; - soap->mime.boundary = NULL; - if (soap->xlist) - { struct soap_multipart *content; - for (content = soap->mime.list; content; content = content->next) - soap_resolve_attachment(soap, content); - } -#endif - DBGLOG(TEST,SOAP_MESSAGE(fdebug, "End of receive message ok\n")); -#ifdef WITH_ZLIB - if (soap->mode & SOAP_ENC_ZLIB) - { soap->mode &= ~SOAP_ENC_ZLIB; - memcpy(soap->buf, soap->z_buf, SOAP_BUFLEN); - soap->bufidx = (char*)soap->d_stream.next_in - soap->z_buf; - soap->buflen = soap->z_buflen; - soap->zlib_state = SOAP_ZLIB_NONE; - if (inflateEnd(&soap->d_stream) != Z_OK) - return soap->error = SOAP_ZLIB_ERROR; -#ifdef WITH_GZIP - if (soap->zlib_in == SOAP_ZLIB_GZIP) - { soap_wchar c; - short i; - for (i = 0; i < 8; i++) - { if ((int)(c = soap_getchar(soap)) == EOF) - return soap->error = SOAP_EOF; - soap->z_buf[i] = (char)c; - } - if (soap->z_crc != ((uLong)(unsigned char)soap->z_buf[0] | ((uLong)(unsigned char)soap->z_buf[1] << 8) | ((uLong)(unsigned char)soap->z_buf[2] << 16) | ((uLong)(unsigned char)soap->z_buf[3] << 24))) - { DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Gzip error: crc check failed, message corrupted? (crc32=%lu)\n", (unsigned long)soap->z_crc)); - return soap->error = SOAP_ZLIB_ERROR; - } - if (soap->d_stream.total_out != ((uLong)(unsigned char)soap->z_buf[4] | ((uLong)(unsigned char)soap->z_buf[5] << 8) | ((uLong)(unsigned char)soap->z_buf[6] << 16) | ((uLong)(unsigned char)soap->z_buf[7] << 24))) - { DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Gzip error: incorrect message length\n")); - return soap->error = SOAP_ZLIB_ERROR; - } - } -#endif - } -#endif - if ((soap->mode & SOAP_IO) == SOAP_IO_CHUNK) - while ((int)soap_getchar(soap) != EOF) /* advance to last chunk */ - ; - if (soap->fdisconnect && (soap->error = soap->fdisconnect(soap))) - return soap->error; -#ifndef WITH_NOIDREF - if (soap_resolve(soap)) - return soap->error; -#endif -#ifndef WITH_LEANER - if (soap->xlist) - { if (soap->mode & SOAP_ENC_MTOM) - return soap->error = SOAP_MIME_HREF; - return soap->error = SOAP_DIME_HREF; - } -#endif - return SOAP_OK; -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_free_temp(struct soap *soap) -{ register struct Namespace *ns; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Free namespace stack\n")); - while (soap->nlist) - { register struct soap_nlist *np = soap->nlist->next; - SOAP_FREE(soap, soap->nlist); - soap->nlist = np; - } - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Free any remaining temp blocks\n")); - while (soap->blist) - soap_end_block(soap); - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Free attribute storage\n")); - while (soap->attributes) - { register struct soap_attribute *tp = soap->attributes->next; - if (soap->attributes->value) - SOAP_FREE(soap, soap->attributes->value); - SOAP_FREE(soap, soap->attributes); - soap->attributes = tp; - } -#ifdef WITH_FAST - if (soap->labbuf) - SOAP_FREE(soap, soap->labbuf); - soap->labbuf = NULL; - soap->lablen = 0; - soap->labidx = 0; -#endif - ns = soap->local_namespaces; - if (ns) - { for (; ns->id; ns++) - { if (ns->out) - { if (soap->encodingStyle == ns->out) - soap->encodingStyle = SOAP_STR_EOS; - SOAP_FREE(soap, ns->out); - ns->out = NULL; - } - if (soap->encodingStyle == ns->ns) - soap->encodingStyle = SOAP_STR_EOS; - } - SOAP_FREE(soap, soap->local_namespaces); - soap->local_namespaces = NULL; - } -#ifndef WITH_LEANER - while (soap->xlist) - { struct soap_xlist *xp = soap->xlist->next; - SOAP_FREE(soap, soap->xlist); - soap->xlist = xp; - } -#endif -#ifndef WITH_NOIDREF - soap_free_pht(soap); - soap_free_iht(soap); -#endif -} -#endif - -/******************************************************************************/ -#ifdef SOAP_DEBUG -static void -soap_init_logs(struct soap *soap) -{ int i; - for (i = 0; i < SOAP_MAXLOGS; i++) - { soap->logfile[i] = NULL; - soap->fdebug[i] = NULL; - } -} -#endif - -/******************************************************************************/ -#if !defined(WITH_LEAN) || defined(SOAP_DEBUG) -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_open_logfile(struct soap *soap, int i) -{ if (soap->logfile[i]) - soap->fdebug[i] = fopen(soap->logfile[i], i < 2 ? "ab" : "a"); -} -#endif - -/******************************************************************************/ -#ifdef SOAP_DEBUG -static void -soap_close_logfile(struct soap *soap, int i) -{ if (soap->fdebug[i]) - { fclose(soap->fdebug[i]); - soap->fdebug[i] = NULL; - } -} -#endif - -/******************************************************************************/ -#ifdef SOAP_DEBUG -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_close_logfiles(struct soap *soap) -{ int i; - for (i = 0; i < SOAP_MAXLOGS; i++) - soap_close_logfile(soap, i); -} -#endif - -/******************************************************************************/ -#ifdef SOAP_DEBUG -static void -soap_set_logfile(struct soap *soap, int i, const char *logfile) -{ const char *s; - char *t = NULL; - soap_close_logfile(soap, i); - s = soap->logfile[i]; - soap->logfile[i] = logfile; - if (s) - SOAP_FREE(soap, (void*)s); - if (logfile) - if ((t = (char*)SOAP_MALLOC(soap, strlen(logfile) + 1))) - strcpy(t, logfile); - soap->logfile[i] = t; -} -#endif - -/******************************************************************************/ -#ifdef SOAP_DEBUG -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_set_recv_logfile(struct soap *soap, const char *logfile) -{ soap_set_logfile(soap, SOAP_INDEX_RECV, logfile); -} -#endif - -/******************************************************************************/ -#ifdef SOAP_DEBUG -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_set_sent_logfile(struct soap *soap, const char *logfile) -{ soap_set_logfile(soap, SOAP_INDEX_SENT, logfile); -} -#endif - -/******************************************************************************/ -#ifdef SOAP_DEBUG -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_set_test_logfile(struct soap *soap, const char *logfile) -{ soap_set_logfile(soap, SOAP_INDEX_TEST, logfile); -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -struct soap* -SOAP_FMAC2 -soap_copy(struct soap *soap) -{ return soap_copy_context((struct soap*)malloc(sizeof(struct soap)), soap); -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -struct soap* -SOAP_FMAC2 -soap_copy_context(struct soap *copy, struct soap *soap) -{ if (soap_check_state(soap)) - return NULL; - if (copy) - { register struct soap_plugin *p; - memcpy(copy, soap, sizeof(struct soap)); - copy->state = SOAP_COPY; - copy->error = SOAP_OK; - copy->userid = NULL; - copy->passwd = NULL; - copy->nlist = NULL; - copy->blist = NULL; - copy->clist = NULL; - copy->alist = NULL; - copy->attributes = NULL; - copy->labbuf = NULL; - copy->lablen = 0; - copy->labidx = 0; -#ifdef SOAP_DEBUG - soap_init_mht(copy); -#endif - copy->local_namespaces = NULL; -#ifndef WITH_NOIDREF - soap_init_iht(copy); - soap_init_pht(copy); -#endif - copy->header = NULL; - copy->fault = NULL; - copy->action = NULL; -#ifndef WITH_LEAN -#ifdef WITH_COOKIES - copy->cookies = soap_copy_cookies(copy, soap); -#else - copy->cookies = NULL; -#endif -#endif -#ifdef SOAP_DEBUG - soap_init_logs(copy); - soap_set_recv_logfile(copy, soap->logfile[SOAP_INDEX_RECV]); - soap_set_sent_logfile(copy, soap->logfile[SOAP_INDEX_SENT]); - soap_set_test_logfile(copy, soap->logfile[SOAP_INDEX_TEST]); -#endif - copy->plugins = NULL; - for (p = soap->plugins; p; p = p->next) - { register struct soap_plugin *q = (struct soap_plugin*)SOAP_MALLOC(copy, sizeof(struct soap_plugin)); - if (!q) - return NULL; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copying plugin '%s'\n", p->id)); - *q = *p; - if (p->fcopy && (soap->error = p->fcopy(copy, q, p))) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Could not copy plugin '%s'\n", p->id)); - SOAP_FREE(copy, q); - return NULL; - } - q->next = copy->plugins; - copy->plugins = q; - } - } - else - soap->error = SOAP_EOM; - return copy; -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_copy_stream(struct soap *copy, struct soap *soap) -{ copy->mode = soap->mode; - copy->imode = soap->imode; - copy->omode = soap->omode; - copy->socket = soap->socket; - copy->recv_timeout = soap->recv_timeout; - copy->send_timeout = soap->send_timeout; -#if defined(__cplusplus) && !defined(WITH_LEAN) - copy->os = soap->os; - copy->is = soap->is; -#endif - copy->sendfd = soap->sendfd; - copy->recvfd = soap->recvfd; - copy->bufidx = soap->bufidx; - copy->buflen = soap->buflen; - copy->ahead = soap->ahead; - copy->cdata = soap->cdata; - copy->chunksize = soap->chunksize; - copy->chunkbuflen = soap->chunkbuflen; - copy->keep_alive = soap->keep_alive; - copy->max_keep_alive = soap->max_keep_alive; -#ifndef WITH_NOIO - copy->peer = soap->peer; - copy->peerlen = soap->peerlen; -#endif -#ifdef WITH_OPENSSL - copy->bio = soap->bio; - copy->ssl = soap->ssl; - copy->ctx = soap->ctx; -#endif -#ifdef WITH_ZLIB - copy->zlib_state = soap->zlib_state; - copy->zlib_in = soap->zlib_in; - copy->zlib_out = soap->zlib_out; - copy->d_stream = soap->d_stream; - copy->z_buflen = soap->z_buflen; - copy->z_level = soap->z_level; - copy->z_crc = soap->z_crc; - copy->z_ratio_in = soap->z_ratio_in; - copy->z_ratio_out = soap->z_ratio_out; - memcpy(copy->z_buf, soap->z_buf, sizeof(soap->z_buf)); -#endif - memcpy(copy->buf, soap->buf, sizeof(soap->buf)); -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_init(struct soap *soap) -{ soap->state = SOAP_INIT; - soap->version = 0; - soap_imode(soap, SOAP_IO_DEFAULT); - soap_omode(soap, SOAP_IO_DEFAULT); - soap->plugins = NULL; - soap->user = NULL; - soap->userid = NULL; - soap->passwd = NULL; -#ifndef WITH_NOHTTP - soap->fpost = http_post; - soap->fget = http_get; - soap->fform = NULL; - soap->fposthdr = http_post_header; - soap->fresponse = http_response; - soap->fparse = http_parse; - soap->fparsehdr = http_parse_header; -#endif - soap->fheader = NULL; - soap->fconnect = NULL; - soap->fdisconnect = NULL; -#ifndef WITH_NOIO -#ifndef WITH_IPV6 - soap->fresolve = tcp_gethost; -#else - soap->fresolve = NULL; -#endif - soap->faccept = tcp_accept; - soap->fopen = tcp_connect; - soap->fclose = tcp_disconnect; - soap->fclosesocket = tcp_closesocket; - soap->fshutdownsocket = tcp_shutdownsocket; - soap->fsend = fsend; - soap->frecv = frecv; - soap->fpoll = soap_poll; -#else - soap->fopen = NULL; - soap->fclose = NULL; - soap->fpoll = NULL; -#endif - soap->fseterror = NULL; - soap->fignore = NULL; - soap->fserveloop = NULL; - soap->fplugin = fplugin; - soap->fmalloc = NULL; -#ifndef WITH_LEANER - soap->fprepareinit = NULL; - soap->fpreparesend = NULL; - soap->fpreparerecv = NULL; - soap->fpreparefinal = NULL; - soap->fdimereadopen = NULL; - soap->fdimewriteopen = NULL; - soap->fdimereadclose = NULL; - soap->fdimewriteclose = NULL; - soap->fdimeread = NULL; - soap->fdimewrite = NULL; - soap->fmimereadopen = NULL; - soap->fmimewriteopen = NULL; - soap->fmimereadclose = NULL; - soap->fmimewriteclose = NULL; - soap->fmimeread = NULL; - soap->fmimewrite = NULL; -#endif - soap->float_format = "%G"; - soap->double_format = "%lG"; - soap->dime_id_format = "cid:id%d"; /* default DIME id format */ - soap->http_version = "1.1"; - soap->proxy_http_version = "1.0"; - soap->http_content = NULL; - soap->actor = NULL; - soap->max_keep_alive = SOAP_MAXKEEPALIVE; - soap->keep_alive = 0; - soap->recv_timeout = 0; - soap->send_timeout = 0; - soap->connect_timeout = 0; - soap->accept_timeout = 0; - soap->socket_flags = 0; - soap->connect_flags = 0; - soap->bind_flags = 0; - soap->accept_flags = 0; - soap->ip = 0; - soap->labbuf = NULL; - soap->lablen = 0; - soap->labidx = 0; - soap->encodingStyle = SOAP_STR_EOS; -#ifndef WITH_NONAMESPACES - soap->namespaces = namespaces; -#else - soap->namespaces = NULL; -#endif - soap->local_namespaces = NULL; - soap->nlist = NULL; - soap->blist = NULL; - soap->clist = NULL; - soap->alist = NULL; - soap->attributes = NULL; - soap->header = NULL; - soap->fault = NULL; - soap->master = SOAP_INVALID_SOCKET; - soap->socket = SOAP_INVALID_SOCKET; - soap->os = NULL; - soap->is = NULL; -#ifndef WITH_LEANER - soap->dom = NULL; - soap->dime.list = NULL; - soap->dime.first = NULL; - soap->dime.last = NULL; - soap->mime.list = NULL; - soap->mime.first = NULL; - soap->mime.last = NULL; - soap->mime.boundary = NULL; - soap->mime.start = NULL; - soap->xlist = NULL; -#endif -#ifndef UNDER_CE - soap->recvfd = 0; - soap->sendfd = 1; -#else - soap->recvfd = stdin; - soap->sendfd = stdout; -#endif - soap->host[0] = '\0'; - soap->port = 0; - soap->action = NULL; - soap->proxy_host = NULL; - soap->proxy_port = 8080; - soap->proxy_userid = NULL; - soap->proxy_passwd = NULL; - soap->authrealm = NULL; - soap->prolog = NULL; -#ifdef WITH_ZLIB - soap->zlib_state = SOAP_ZLIB_NONE; - soap->zlib_in = SOAP_ZLIB_NONE; - soap->zlib_out = SOAP_ZLIB_NONE; - soap->d_stream.zalloc = NULL; - soap->d_stream.zfree = NULL; - soap->d_stream.opaque = NULL; - soap->z_level = 6; -#endif -#ifndef WITH_LEAN - soap->c14ninclude = NULL; - soap->c14nexclude = NULL; - soap->cookies = NULL; - soap->cookie_domain = NULL; - soap->cookie_path = NULL; - soap->cookie_max = 32; -#endif -#ifdef SOAP_DEBUG - soap_init_mht(soap); - soap_init_logs(soap); -#endif -#ifdef WMW_RPM_IO - soap->rpmreqid = NULL; -#endif -#ifdef PALM - palmNetLibOpen(); -#endif -#ifndef WITH_NOIDREF - soap_init_iht(soap); - soap_init_pht(soap); -#endif -#ifdef SOAP_DEBUG - soap_set_recv_logfile(soap, "RECV.log"); - soap_set_sent_logfile(soap, "SENT.log"); - soap_set_test_logfile(soap, "TEST.log"); - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Initializing context\n")); -#endif -#ifdef WITH_OPENSSL - if (!ssl_init_done) - { soap_ssl_init(); - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Initializing OpenSSL, version=%ld\n", (long)OPENSSL_VERSION_NUMBER)); - } - soap->fsslauth = ssl_auth_init; - soap->fsslverify = ssl_verify_callback; - soap->bio = NULL; - soap->ssl = NULL; - soap->ctx = NULL; - soap->ssl_flags = SOAP_SSL_DEFAULT; - soap->keyfile = NULL; - soap->password = NULL; - soap->dhfile = NULL; - soap->cafile = NULL; - soap->capath = NULL; - soap->crlfile = NULL; - soap->randfile = NULL; - soap->session = NULL; -#endif - soap_begin(soap); -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_init1(struct soap *soap, soap_mode mode) -{ soap_init2(soap, mode, mode); -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_init2(struct soap *soap, soap_mode imode, soap_mode omode) -{ soap_init(soap); - soap_imode(soap, imode); - soap_omode(soap, omode); -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_begin(struct soap *soap) -{ DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Reinitializing context\n")); - if (!soap->keep_alive) - { soap->buflen = 0; - soap->bufidx = 0; - } - soap->keep_alive = (((soap->imode | soap->omode) & SOAP_IO_KEEPALIVE) != 0); - soap->null = 0; - soap->position = 0; - soap->encoding = 0; - soap->mustUnderstand = 0; - soap->mode = 0; - soap->ns = 0; - soap->part = SOAP_END; - soap->alloced = 0; - soap->count = 0; - soap->length = 0; - soap->cdata = 0; - soap->error = SOAP_OK; - soap->peeked = 0; - soap->ahead = 0; - soap->idnum = 0; - soap->level = 0; - soap->endpoint[0] = '\0'; -#ifndef WITH_LEANER - soap->dime.chunksize = 0; - soap->dime.buflen = 0; -#endif - soap_free_temp(soap); -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_end(struct soap *soap) -{ if (soap_check_state(soap)) - return; - soap_free_temp(soap); - soap_dealloc(soap, NULL); - while (soap->clist) - { register struct soap_clist *cp = soap->clist->next; - SOAP_FREE(soap, soap->clist); - soap->clist = cp; - } - soap_closesock(soap); -#ifdef SOAP_DEBUG - soap_close_logfiles(soap); -#endif -#ifdef PALM - palmNetLibClose(); -#endif -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_set_namespaces(struct soap *soap, const struct Namespace *p) -{ register struct Namespace *ns = soap->local_namespaces; - register struct soap_nlist *np, *nq, *nr; - register unsigned int level = soap->level; - soap->namespaces = p; - soap->local_namespaces = NULL; - soap_set_local_namespaces(soap); - /* reverse the namespace list */ - np = soap->nlist; - soap->nlist = NULL; - if (np) - { nq = np->next; - np->next = NULL; - while (nq) - { nr = nq->next; - nq->next = np; - np = nq; - nq = nr; - } - } - /* then push on new stack */ - while (np) - { register const char *s; - soap->level = np->level; /* preserve element nesting level */ - s = np->ns; - if (!s && np->index >= 0 && ns) - { s = ns[np->index].out; - if (!s) - s = ns[np->index].ns; - } - if (s && soap_push_namespace(soap, np->id, s)) - return soap->error; - nq = np; - np = np->next; - SOAP_FREE(soap, nq); - } - if (ns) - { register int i; - for (i = 0; ns[i].id; i++) - { if (ns[i].out) - { SOAP_FREE(soap, ns[i].out); - ns[i].out = NULL; - } - } - SOAP_FREE(soap, ns); - } - soap->level = level; /* restore level */ - return SOAP_OK; -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_set_local_namespaces(struct soap *soap) -{ if (soap->namespaces && !soap->local_namespaces) - { register const struct Namespace *ns1; - register struct Namespace *ns2; - register size_t n = 1; - for (ns1 = soap->namespaces; ns1->id; ns1++) - n++; - n *= sizeof(struct Namespace); - ns2 = (struct Namespace*)SOAP_MALLOC(soap, n); - if (ns2) - { memcpy(ns2, soap->namespaces, n); - if (ns2[0].ns) - { if (!strcmp(ns2[0].ns, soap_env1)) - soap->version = 1; - else - soap->version = 2; - } - soap->local_namespaces = ns2; - } - } -} -#endif - -/******************************************************************************/ -#ifndef WITH_LEAN -#ifndef PALM_1 -SOAP_FMAC1 -const char * -SOAP_FMAC2 -soap_strsearch(const char *big, const char *little) -{ size_t n = strlen(little); - const char *s = big; - while (s) - { if (!strncmp(s, little, n) && (s[n] == '\0' || s[n] == ' ')) - return s; - s = strchr(s, ' '); - if (s) - s++; - } - return NULL; -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_LEAN -#ifndef PALM_1 -SOAP_FMAC1 -struct soap_nlist * -SOAP_FMAC2 -soap_lookup_ns(struct soap *soap, const char *tag, size_t n) -{ register struct soap_nlist *np; - for (np = soap->nlist; np; np = np->next) - { if (!strncmp(np->id, tag, n) && !np->id[n]) - return np; - } - return NULL; -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_LEAN -static struct soap_nlist * -soap_push_ns(struct soap *soap, const char *id, const char *ns, short utilized) -{ register struct soap_nlist *np; - size_t n, k; - if (soap_strsearch(soap->c14nexclude, id)) - return NULL; - if (!utilized) - { for (np = soap->nlist; np; np = np->next) - { if (!strcmp(np->id, id) && (!np->ns || !strcmp(np->ns, ns))) - break; - } - if (np) - { if ((np->level < soap->level || !np->ns) && np->index == 1) - utilized = 1; - else - return NULL; - } - } - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Adding namespace binding (level=%u) '%s' '%s' utilized=%d\n", soap->level, id, ns?ns:"(null)", utilized)); - n = strlen(id); - if (ns) - k = strlen(ns); - else - k = 0; - np = (struct soap_nlist*)SOAP_MALLOC(soap, sizeof(struct soap_nlist) + n + k + 1); - if (!np) - { soap->error = SOAP_EOM; - return NULL; - } - np->next = soap->nlist; - soap->nlist = np; - strcpy(np->id, id); - if (ns) - { np->ns = np->id + n + 1; - strcpy(np->ns, ns); - } - else - np->ns = NULL; - np->level = soap->level; - np->index = utilized; - return np; -} -#endif - -/******************************************************************************/ -#ifndef WITH_LEAN -static void -soap_utilize_ns(struct soap *soap, const char *tag, size_t n) -{ register struct soap_nlist *np = soap_lookup_ns(soap, tag, n); - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Utilizing namespace of '%s'\n", tag)); - if (np) - { if (np->index == 0) - soap_push_ns(soap, np->id, np->ns, 1); - } - else if (strncmp(tag, "xml", 3)) - { strncpy(soap->tmpbuf, tag, n); - soap->tmpbuf[n] = '\0'; - soap_push_ns(soap, soap->tmpbuf, NULL, 1); - } -} -#endif - -/******************************************************************************/ -#ifndef WITH_LEAN -static void -soap_pop_ns(struct soap *soap) -{ soap_pop_namespace(soap); -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_element(struct soap *soap, const char *tag, int id, const char *type) -{ -#ifdef WITH_XMLNS - register const char *s; -#endif - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Element begin tag='%s' id='%d' type='%s'\n", tag, id, type?type:"")); -#ifdef WITH_DOM - if (soap->part == SOAP_BEGIN_SECURITY && (soap->mode & SOAP_XML_CANONICAL) && !(soap->mode & SOAP_DOM_ASIS)) - { register struct soap_nlist *np; - /* wsu:Id found: clear xmlns renderings, so re-emit them for exc-c14n */ - for (np = soap->nlist; np; np = np->next) - { if (np->index == 2) - np->index = 0; - } - } - if (soap->mode & SOAP_XML_DOM) - { register struct soap_dom_element *elt = (struct soap_dom_element*)soap_malloc(soap, sizeof(struct soap_dom_element)); - if (!elt) - return soap->error = SOAP_EOM; - elt->soap = soap; - elt->next = NULL; - elt->prnt = soap->dom; - elt->name = soap_strdup(soap, tag); - elt->elts = NULL; - elt->atts = NULL; - elt->nstr = NULL; - elt->data = NULL; - elt->wide = NULL; - elt->node = NULL; - elt->type = 0; - elt->head = NULL; - elt->tail = NULL; - if (soap->dom) - { struct soap_dom_element *p = soap->dom->elts; - if (p) - { while (p->next) - p = p->next; - p->next = elt; - } - else - soap->dom->elts = elt; - } - soap->dom = elt; - } - else - { -#endif - soap->level++; -#ifndef WITH_LEAN - if (!soap->ns) - { if (!(soap->mode & SOAP_XML_CANONICAL) - && soap_send(soap, soap->prolog ? soap->prolog : "\n")) - return soap->error; - } - else if (soap->mode & SOAP_XML_INDENT) - { if (soap->ns == 1 && soap_send_raw(soap, soap_indent, soap->level < sizeof(soap_indent) ? soap->level : sizeof(soap_indent) - 1)) - return soap->error; - soap->body = 1; - } -#endif -#ifdef WITH_XMLNS - s = strchr(tag, ':'); - if (s && strncmp(tag, "SOAP-ENV", s - tag)) - { struct Namespace *ns = soap->local_namespaces; - size_t n = s - tag; - if (soap_send_raw(soap, "<", 1) - || soap_send(soap, s + 1)) - return soap->error; - if (soap->nlist && !strncmp(soap->nlist->id, tag, n) && !soap->nlist->id[n]) - ns = NULL; - for (; ns && ns->id; ns++) - { if (*ns->id && (ns->out || ns->ns) && !strncmp(ns->id, tag, n) && !ns->id[n]) - { soap_push_ns(soap, ns->id, ns->out ? ns->out : ns->ns, 0); - if (soap_attribute(soap, "xmlns", ns->out ? ns->out : ns->ns)) - return soap->error; - break; - } - } - } - else -#endif - if (soap_send_raw(soap, "<", 1) - || soap_send(soap, tag)) - return soap->error; -#ifdef WITH_DOM - } -#endif - if (!soap->ns) - { struct Namespace *ns; - for (ns = soap->local_namespaces; ns && ns->id; ns++) - { if (*ns->id && (ns->out || ns->ns)) - { sprintf(soap->tmpbuf, "xmlns:%s", ns->id); - if (soap_attribute(soap, soap->tmpbuf, ns->out ? ns->out : ns->ns)) - return soap->error; - } - } - } - soap->ns = 1; /* start with 0 or 2, but should be one to continue */ -#ifndef WITH_LEAN - if (soap->mode & SOAP_XML_CANONICAL) - { const char *t = strchr(tag, ':'); - if (t) - soap_utilize_ns(soap, tag, t - tag); - } -#endif - if (id > 0) - { sprintf(soap->tmpbuf, "_%d", id); - if (soap_attribute(soap, "id", soap->tmpbuf)) - return soap->error; - } - if (type && *type && (!(soap->mode & SOAP_XML_SEC) || soap->part == SOAP_IN_BODY)) - { if (soap_attribute(soap, "xsi:type", type)) - return soap->error; -#ifndef WITH_LEAN - if (soap->mode & SOAP_XML_CANONICAL) - { const char *t = strchr(type, ':'); - if (t) - soap_utilize_ns(soap, type, t - type); - } -#endif - } - if (soap->null && soap->position > 0) - { register int i; - sprintf(soap->tmpbuf, "[%d", soap->positions[0]); - for (i = 1; i < soap->position; i++) - sprintf(soap->tmpbuf + strlen(soap->tmpbuf), ",%d", soap->positions[i]); - strcat(soap->tmpbuf, "]"); - if (soap_attribute(soap, "SOAP-ENC:position", soap->tmpbuf)) - return soap->error; - } - if (soap->mustUnderstand) - { if (soap->actor && *soap->actor) - { if (soap_attribute(soap, soap->version == 2 ? "SOAP-ENV:role" : "SOAP-ENV:actor", soap->actor)) - return soap->error; - } - if (soap_attribute(soap, "SOAP-ENV:mustUnderstand", soap->version == 2 ? "true" : "1")) - return soap->error; - soap->mustUnderstand = 0; - } - if (soap->encoding) - { if (soap->encodingStyle && soap->local_namespaces) - { if (!*soap->encodingStyle) - { if (soap->local_namespaces[1].out) - soap->encodingStyle = soap->local_namespaces[1].out; - else - soap->encodingStyle = soap->local_namespaces[1].ns; - } - if (soap_attribute(soap, "SOAP-ENV:encodingStyle", soap->encodingStyle)) - return soap->error; - } - soap->encoding = 0; - } - soap->null = 0; - soap->position = 0; - if (soap->part == SOAP_BEGIN_SECURITY && (soap->mode & SOAP_XML_CANONICAL)) - soap->part = SOAP_IN_SECURITY; - return SOAP_OK; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_element_begin_out(struct soap *soap, const char *tag, int id, const char *type) -{ if (*tag == '-') - return SOAP_OK; - if (soap_element(soap, tag, id, type)) - return soap->error; - return soap_element_start_end_out(soap, NULL); -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -#ifndef HAVE_STRRCHR -SOAP_FMAC1 -char* -SOAP_FMAC2 -soap_strrchr(const char *s, int t) -{ register char *r = NULL; - while (*s) - if (*s++ == t) - r = (char*)s - 1; - return r; -} -#endif -#endif - -/******************************************************************************/ -#ifndef PALM_2 -#ifndef HAVE_STRTOL -SOAP_FMAC1 -long -SOAP_FMAC2 -soap_strtol(const char *s, char **t, int b) -{ register long n = 0; - register int c; - while (*s > 0 && *s <= 32) - s++; - if (b == 10) - { short neg = 0; - if (*s == '-') - { s++; - neg = 1; - } - else if (*s == '+') - s++; - while ((c = *s) && c >= '0' && c <= '9') - { if (n >= 214748364 && (n > 214748364 || c >= '8')) - break; - n *= 10; - n += c - '0'; - s++; - } - if (neg) - n = -n; - } - else /* b == 16 and value is always positive */ - { while ((c = *s)) - { if (c >= '0' && c <= '9') - c -= '0'; - else if (c >= 'A' && c <= 'F') - c -= 'A' - 10; - else if (c >= 'a' && c <= 'f') - c -= 'a' - 10; - if (n > 0x07FFFFFF) - break; - n <<= 4; - n += c; - s++; - } - } - if (t) - *t = (char*)s; - return n; -} -#endif -#endif - -/******************************************************************************/ -#ifndef PALM_2 -#ifndef HAVE_STRTOUL -SOAP_FMAC1 -unsigned long -SOAP_FMAC2 -soap_strtoul(const char *s, char **t, int b) -{ unsigned long n = 0; - register int c; - while (*s > 0 && *s <= 32) - s++; - if (b == 10) - { if (*s == '+') - s++; - while ((c = *s) && c >= '0' && c <= '9') - { if (n >= 429496729 && (n > 429496729 || c >= '6')) - break; - n *= 10; - n += c - '0'; - s++; - } - } - else /* b == 16 */ - { while ((c = *s)) - { if (c >= '0' && c <= '9') - c -= '0'; - else if (c >= 'A' && c <= 'F') - c -= 'A' - 10; - else if (c >= 'a' && c <= 'f') - c -= 'a' - 10; - if (n > 0x0FFFFFFF) - break; - n <<= 4; - n += c; - s++; - } - } - if (t) - *t = (char*)s; - return n; -} -#endif -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_array_begin_out(struct soap *soap, const char *tag, int id, const char *type, const char *offset) -{ if (soap_element(soap, tag, id, "SOAP-ENC:Array")) - return soap->error; - if (soap->version == 2) - { const char *s; - s = soap_strrchr(type, '['); - if ((size_t)(s - type) < sizeof(soap->tmpbuf)) - { strncpy(soap->tmpbuf, type, s - type); - soap->tmpbuf[s - type] = '\0'; - if (type && *type && (soap_attribute(soap, "SOAP-ENC:itemType", soap->tmpbuf))) - return soap->error; - if (s && (soap_attribute(soap, "SOAP-ENC:arraySize", s + 1))) - return soap->error; - } - } - else - { if (offset && (soap_attribute(soap, "SOAP-ENC:offset", offset))) - return soap->error; - if (type && *type && (soap_attribute(soap, "SOAP-ENC:arrayType", type))) - return soap->error; - } -#ifndef WITH_LEAN - if (type && *type && (soap->mode & SOAP_XML_CANONICAL)) - { const char *s = strchr(type, ':'); - if (s) - soap_utilize_ns(soap, type, s - type); - } -#endif - return soap_element_start_end_out(soap, NULL); -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_element_start_end_out(struct soap *soap, const char *tag) -{ register struct soap_attribute *tp; -#ifndef WITH_LEAN - if (soap->mode & SOAP_XML_CANONICAL) - { struct soap_nlist *np; - for (tp = soap->attributes; tp; tp = tp->next) - { if (tp->visible && tp->name) - { const char *s = strchr(tp->name, ':'); - if (s) - soap_utilize_ns(soap, tp->name, s - tp->name); - } - } - for (np = soap->nlist; np; np = np->next) - { if (np->index == 1 && np->ns) - { sprintf(soap->tmpbuf, "xmlns:%s", np->id); - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Enabling utilized binding (level=%u) %s='%s'\n", np->level, soap->tmpbuf, np->ns)); - soap_set_attr(soap, soap->tmpbuf, np->ns); - np->index = 2; - } - } - } -#endif -#ifdef WITH_DOM - if ((soap->mode & SOAP_XML_DOM) && soap->dom) - { register struct soap_dom_attribute **att; - att = &soap->dom->atts; - for (tp = soap->attributes; tp; tp = tp->next) - { if (tp->visible) - { *att = (struct soap_dom_attribute*)soap_malloc(soap, sizeof(struct soap_dom_attribute)); - if (!*att) - return soap->error = SOAP_EOM; - (*att)->next = NULL; - (*att)->nstr = NULL; - (*att)->name = soap_strdup(soap, tp->name); - (*att)->data = soap_strdup(soap, tp->value); - (*att)->wide = NULL; - (*att)->soap = soap; - att = &(*att)->next; - tp->visible = 0; - } - } - return SOAP_OK; - } -#endif - for (tp = soap->attributes; tp; tp = tp->next) - { if (tp->visible) - { -#ifdef WITH_XMLNS - const char *s = strchr(tp->name, ':'); - if (s) - { size_t n = s - tp->name; - if (soap->nlist && !strncmp(soap->nlist->id, tp->name, n) && !soap->nlist->id[n]) - s++; - else - s = tp->name; - if (soap_send(soap, " ") || soap_send(soap, s)) - return soap->error; - } - else -#endif - if (soap_send(soap, " ") || soap_send(soap, tp->name)) - return soap->error; - if (tp->visible == 2 && tp->value) - if (soap_send_raw(soap, "=\"", 2) - || soap_string_out(soap, tp->value, 1) - || soap_send_raw(soap, "\"", 1)) - return soap->error; - tp->visible = 0; - } - } - if (tag) - { -#ifndef WITH_LEAN - if (soap->mode & SOAP_XML_CANONICAL) - { if (soap_send_raw(soap, ">", 1) - || soap_element_end_out(soap, tag)) - return soap->error; - return SOAP_OK; - } -#endif - soap->level--; /* decrement level just before /> */ - if (soap_send_raw(soap, "/>", 2)) - return soap->error; - return SOAP_OK; - } - return soap_send_raw(soap, ">", 1); -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_element_end_out(struct soap *soap, const char *tag) -{ if (*tag == '-') - return SOAP_OK; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Element ending tag='%s'\n", tag)); -#ifdef WITH_DOM - if ((soap->mode & SOAP_XML_DOM) && soap->dom) - { if (soap->dom->prnt) - soap->dom = soap->dom->prnt; - return SOAP_OK; - } -#endif -#ifndef WITH_LEAN - if (soap->mode & SOAP_XML_CANONICAL) - soap_pop_ns(soap); - if (soap->mode & SOAP_XML_INDENT) - { if (!soap->body) - { if (soap_send_raw(soap, soap_indent, soap->level < sizeof(soap_indent) ? soap->level : sizeof(soap_indent) - 1)) - return soap->error; - } - soap->body = 0; - } -#endif -#ifdef WITH_XMLNS - { const char *s = strchr(tag, ':'); - if (s && strncmp(tag, "SOAP-ENV", s - tag)) - { soap_pop_ns(soap); - tag = s + 1; - } - } -#endif - if (soap_send_raw(soap, "error; - soap->level--; /* decrement level just before > */ - return soap_send_raw(soap, ">", 1); -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_element_ref(struct soap *soap, const char *tag, int id, int href) -{ register int n = 0; - const char *s = "href"; - if (soap->version == 2) - { s = "SOAP-ENC:ref"; - n = 1; - } - sprintf(soap->href, "#_%d", href); - return soap_element_href(soap, tag, id, s, soap->href + n); -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_element_href(struct soap *soap, const char *tag, int id, const char *ref, const char *val) -{ DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Element '%s' reference %s='%s'\n", tag, ref, val)); - if (soap_element(soap, tag, id, NULL) - || soap_attribute(soap, ref, val) - || soap_element_start_end_out(soap, tag)) - return soap->error; - return SOAP_OK; -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_element_null(struct soap *soap, const char *tag, int id, const char *type) -{ struct soap_attribute *tp; - for (tp = soap->attributes; tp; tp = tp->next) - if (tp->visible) - break; - if (tp || (soap->version == 2 && soap->position > 0) || id > 0 || (soap->mode & SOAP_XML_NIL)) - { if (soap_element(soap, tag, id, type)) - return soap->error; - if (soap->part != SOAP_IN_HEADER && soap->encodingStyle) - if (soap_attribute(soap, "xsi:nil", "true")) - return soap->error; - return soap_element_start_end_out(soap, tag); - } - soap->null = 1; - soap->position = 0; - soap->mustUnderstand = 0; - return SOAP_OK; -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_element_id(struct soap *soap, const char *tag, int id, const void *p, const struct soap_array *a, int n, const char *type, int t) -{ if (!p || (a && !a->__ptr)) - { soap_element_null(soap, tag, id, type); - return -1; - } -#ifndef WITH_NOIDREF - if (soap->mode & SOAP_XML_TREE) - return 0; - if (id < 0) - { struct soap_plist *pp; - if (a) - id = soap_array_pointer_lookup(soap, p, a, n, t, &pp); - else - id = soap_pointer_lookup(soap, p, t, &pp); - if (id) - { if (soap_is_embedded(soap, pp)) - { soap_element_ref(soap, tag, 0, id); - return -1; - } - if (soap_is_single(soap, pp)) - return 0; - soap_set_embedded(soap, pp); - } - } - return id; -#else - return 0; -#endif -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_element_result(struct soap *soap, const char *tag) -{ if (soap->version == 2 && soap->encodingStyle) - if (soap_element(soap, "SOAP-RPC:result", 0, NULL) - || soap_attribute(soap, "xmlns:SOAP-RPC", soap_rpc) - || soap_element_start_end_out(soap, NULL) - || soap_string_out(soap, tag, 0) - || soap_element_end_out(soap, "SOAP-RPC:result")) - return soap->error; - return SOAP_OK; -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_check_result(struct soap *soap, const char *tag) -{ if (soap->version == 2 && soap->encodingStyle) - { soap_instring(soap, ":result", NULL, NULL, 0, 2, -1, -1); - /* should compare tag to element's QName value? */ - } -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_attribute(struct soap *soap, const char *name, const char *value) -{ -#ifdef WITH_DOM - if ((soap->mode & SOAP_XML_DOM) && !(soap->mode & SOAP_XML_CANONICAL) && soap->dom) - { register struct soap_dom_attribute *a = (struct soap_dom_attribute*)soap_malloc(soap, sizeof(struct soap_dom_attribute)); - a->next = soap->dom->atts; - a->nstr = NULL; - a->name = soap_strdup(soap, name); - a->data = soap_strdup(soap, value); - a->wide = NULL; - a->soap = soap; - soap->dom->atts = a; - return SOAP_OK; - } -#endif -#ifndef WITH_LEAN - if (soap->mode & SOAP_XML_CANONICAL) - { /* TODO: consider using this code to handle default namespace bindings - if (!strncmp(name, "xmlns", 5) && (name[5] == ':' || name[5] == '\0')) - { if (name[5] == ':') - soap_push_ns(soap, name + 6, value, 0); - else - soap_push_ns(soap, "", value, 0); - } - */ - if (!strncmp(name, "xmlns:", 6)) - soap_push_ns(soap, name + 6, value, 0); - else if (soap_set_attr(soap, name, value)) - return soap->error; - } - else -#endif - { if (soap_send(soap, " ") || soap_send(soap, name)) - return soap->error; - if (value) - if (soap_send_raw(soap, "=\"", 2) - || soap_string_out(soap, value, 1) - || soap_send_raw(soap, "\"", 1)) - return soap->error; - } - return SOAP_OK; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_element_begin_in(struct soap *soap, const char *tag, int nillable, const char *type) -{ if (!soap_peek_element(soap)) - { if (soap->other) - return soap->error = SOAP_TAG_MISMATCH; - if (tag && *tag == '-') - return SOAP_OK; - if (!(soap->error = soap_match_tag(soap, soap->tag, tag))) - { soap->peeked = 0; - if (soap->body) - soap->level++; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Begin element found (level=%u) '%s'='%s'\n", soap->level, soap->tag, tag?tag:"" )); - if (!nillable && soap->null && (soap->mode & SOAP_XML_STRICT)) - return soap->error = SOAP_NULL; - if (type && *soap->type && soap_match_tag(soap, soap->type, type)) - return soap->error = SOAP_TYPE; - } - } - else if (soap->error == SOAP_NO_TAG && tag && *tag == '-') - soap->error = SOAP_OK; - return soap->error; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_element_end_in(struct soap *soap, const char *tag) -{ register soap_wchar c; - register char *s; - register int n = 0; - if (tag && *tag == '-') - return SOAP_OK; - if (soap->error == SOAP_NO_TAG) - soap->error = SOAP_OK; -#ifdef WITH_DOM - /* this whitespace or mixed content is not insignificant for DOM */ - if ((soap->mode & SOAP_XML_DOM) && soap->dom) - { if (!soap->peeked && !soap_string_in(soap, 3, -1, -1)) - return soap->error; - if (soap->dom->prnt) - soap->dom = soap->dom->prnt; - } -#endif - if (soap->peeked) - { if (*soap->tag) - n++; - soap->peeked = 0; - } - do - { while (((c = soap_get(soap)) != SOAP_TT)) - { if ((int)c == EOF) - return soap->error = SOAP_EOF; - if (c == SOAP_LT) - n++; - else if (c == '/') - { c = soap_get(soap); - if (c == SOAP_GT) - n--; - else - soap_unget(soap, c); - } - } - } while (n--); - s = soap->tag; - n = sizeof(soap->tag); - while (soap_notblank(c = soap_get(soap))) - { if (--n > 0) - *s++ = (char)c; - } - *s = '\0'; - if ((int)c == EOF) - return soap->error = SOAP_EOF; - while (soap_blank(c)) - c = soap_get(soap); - if (c != SOAP_GT) - return soap->error = SOAP_SYNTAX_ERROR; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "End element found (level=%u) '%s'='%s'\n", soap->level, soap->tag, tag?tag:"")); - if (!tag || !*tag || !soap_match_tag(soap, soap->tag, tag)) - { soap->level--; - soap_pop_namespace(soap); - return SOAP_OK; - } - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "End element tag name does not match\n")); - return soap->error = SOAP_SYNTAX_ERROR; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -const char * -SOAP_FMAC2 -soap_attr_value(struct soap *soap, const char *name, int flag) -{ register struct soap_attribute *tp; - for (tp = soap->attributes; tp; tp = tp->next) - { if (tp->visible && !soap_match_tag(soap, tp->name, name)) - break; - } - if (tp) - { if (flag == 2 && (soap->mode & SOAP_XML_STRICT)) - soap->error = SOAP_PROHIBITED; - else - return tp->value; - } - else if (flag == 1 && (soap->mode & SOAP_XML_STRICT)) - soap->error = SOAP_REQUIRED; - return NULL; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_set_attr(struct soap *soap, const char *name, const char *value) -{ register struct soap_attribute *tp; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Set attribute %s='%s'\n", name, value?value:"")); - for (tp = soap->attributes; tp; tp = tp->next) - { if (!strcmp(tp->name, name)) - break; - } - if (!tp) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Allocate attribute %s\n", name)); - if (!(tp = (struct soap_attribute*)SOAP_MALLOC(soap, sizeof(struct soap_attribute) + strlen(name)))) - return soap->error = SOAP_EOM; - tp->ns = NULL; -#ifndef WITH_LEAN - if (soap->mode & SOAP_XML_CANONICAL) - { struct soap_attribute **tpp = &soap->attributes; - const char *s = strchr(name, ':'); - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Inserting attribute %s for c14n\n", name)) - if (!strncmp(name, "xmlns", 5)) - { for (; *tpp; tpp = &(*tpp)->next) - if (strncmp((*tpp)->name, "xmlns", 5) || strcmp((*tpp)->name + 5, name + 5) > 0) - break; - } - else if (!s) - { for (; *tpp; tpp = &(*tpp)->next) - if (strncmp((*tpp)->name, "xmlns", 5) && ((*tpp)->ns || strcmp((*tpp)->name, name) > 0)) - break; - } - else - { int k; - for (; *tpp; tpp = &(*tpp)->next) - { if (!strncmp((*tpp)->name, "xmlns:", 6) && !strncmp((*tpp)->name + 6, name, s - name) && !(*tpp)->name[6 + s - name]) - { if (!tp->ns) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Canonicalization: prefix %s=%p (%s)\n", name, (*tpp)->ns, (*tpp)->ns)); - tp->ns = (*tpp)->ns; - } - } - else if (strncmp((*tpp)->name, "xmlns", 5) && (*tpp)->ns && tp->ns && ((k = strcmp((*tpp)->ns, tp->ns)) > 0 || (!k && strcmp((*tpp)->name, name) > 0))) - break; - } - } - tp->next = *tpp; - *tpp = tp; - } - else -#endif - { tp->next = soap->attributes; - soap->attributes = tp; - } - strcpy(tp->name, name); - tp->value = NULL; - } - else if (tp->visible) - { return SOAP_OK; - } - else if (value && tp->value && tp->size <= strlen(value)) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Free attribute value of %s (free %p)\n", name, tp->value)); - SOAP_FREE(soap, tp->value); - tp->value = NULL; - tp->ns = NULL; - } - if (value) - { if (!tp->value) - { tp->size = strlen(value) + 1; - if (!(tp->value = (char*)SOAP_MALLOC(soap, tp->size))) - return soap->error = SOAP_EOM; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Allocate attribute value for %s (%p)\n", tp->name, tp->value)); - } - strcpy(tp->value, value); - if (!strncmp(tp->name, "xmlns:", 6)) - tp->ns = tp->value; - tp->visible = 2; -#ifndef WITH_LEAN - if (!strcmp(name, "wsu:Id")) - { soap->part = SOAP_BEGIN_SECURITY; - strncpy(soap->id, value, sizeof(soap->id)); - soap->id[sizeof(soap->id)-1] = '\0'; - } -#endif - } - else - tp->visible = 1; - return SOAP_OK; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_clr_attr(struct soap *soap) -{ register struct soap_attribute *tp; -#ifndef WITH_LEAN - if ((soap->mode & SOAP_XML_CANONICAL)) - { while (soap->attributes) - { tp = soap->attributes->next; - if (soap->attributes->value) - SOAP_FREE(soap, soap->attributes->value); - SOAP_FREE(soap, soap->attributes); - soap->attributes = tp; - } - } - else -#endif - { for (tp = soap->attributes; tp; tp = tp->next) - tp->visible = 0; - } -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -static int -soap_getattrval(struct soap *soap, char *s, size_t n, soap_wchar d) -{ register size_t i; - for (i = 0; i < n; i++) - { register soap_wchar c = soap_get(soap); - switch (c) - { - case SOAP_TT: - *s++ = '<'; - soap_unget(soap, '/'); - break; - case SOAP_LT: - *s++ = '<'; - break; - case SOAP_GT: - if (d == ' ') - { soap_unget(soap, c); - *s = '\0'; - return SOAP_OK; - } - *s++ = '>'; - break; - case SOAP_QT: - if (c == d) - { *s = '\0'; - return SOAP_OK; - } - *s++ = '"'; - break; - case SOAP_AP: - if (c == d) - { *s = '\0'; - return SOAP_OK; - } - *s++ = '\''; - break; - case '\t': - case '\n': - case '\r': - case ' ': - case '/': - if (d == ' ') - { soap_unget(soap, c); - *s = '\0'; - return SOAP_OK; - } - default: - if ((int)c == EOF) - return soap->error = SOAP_EOF; - *s++ = (char)c; - } - } - return soap->error = SOAP_EOM; -} -#endif - -/******************************************************************************/ -#ifdef WITH_FAST -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_store_lab(struct soap *soap, const char *s, size_t n) -{ soap->labidx = 0; - return soap_append_lab(soap, s, n); -} -#endif -#endif - -/******************************************************************************/ -#ifdef WITH_FAST -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_append_lab(struct soap *soap, const char *s, size_t n) -{ if (soap->labidx + n >= soap->lablen) - { register char *t = soap->labbuf; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Enlarging look-aside buffer to append data, old size=%lu", (unsigned long)soap->lablen)); - if (soap->lablen == 0) - soap->lablen = SOAP_LABLEN; - while (soap->labidx + n >= soap->lablen) - soap->lablen <<= 1; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, ", new size=%lu\n", (unsigned long)soap->lablen)); - soap->labbuf = (char*)SOAP_MALLOC(soap, soap->lablen); - if (!soap->labbuf) - { if (t) - SOAP_FREE(soap, t); - return soap->error = SOAP_EOM; - } - if (t) - { memcpy(soap->labbuf, t, soap->labidx); - SOAP_FREE(soap, t); - } - } - if (s) - { memcpy(soap->labbuf + soap->labidx, s, n); - soap->labidx += n; - } - return SOAP_OK; -} -#endif -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_peek_element(struct soap *soap) -{ -#ifdef WITH_DOM - register struct soap_dom_attribute **att = NULL; - register char *lead = NULL; -#endif - register struct soap_attribute *tp; - const char *t; - register char *s; - register soap_wchar c; - register int i; - if (soap->peeked) - { if (!*soap->tag) - return soap->error = SOAP_NO_TAG; - return SOAP_OK; - } - soap->peeked = 1; - c = soap_getutf8(soap); -#ifdef WITH_DOM - /* whitespace leading to start tag is not insignificant for DOM */ - if (soap_blank(c)) - { soap->labidx = 0; - do - { if (soap_append_lab(soap, NULL, 0)) - return SOAP_EOM; - s = soap->labbuf + soap->labidx; - i = soap->lablen - soap->labidx; - soap->labidx = soap->lablen; - while (soap_blank(c) && i--) - { *s++ = c; - c = soap_getutf8(soap); - } - } - while (soap_blank(c)); - *s = '\0'; - lead = soap_strdup(soap, soap->labbuf); - } -#else - while (soap_blank(c)) - c = soap_getutf8(soap); -#endif - if (c != SOAP_LT) - { *soap->tag = '\0'; - if ((int)c == EOF) - return soap->error = SOAP_EOF; - soap_unget(soap, c); -#ifdef WITH_DOM - /* whitespace leading to end tag is not insignificant for DOM */ - if ((soap->mode & SOAP_XML_DOM) && soap->dom) - soap->dom->tail = soap_strdup(soap, lead); -#endif - return soap->error = SOAP_NO_TAG; - } - s = soap->tag; - do c = soap_get1(soap); - while (soap_blank(c)); - i = sizeof(soap->tag); - while (c != '>' && c != '/' && soap_notblank(c) && (int)c != EOF) - { if (--i > 0) - *s++ = (char)c; - c = soap_get1(soap); - } - while (soap_blank(c)) - c = soap_get1(soap); - *s = '\0'; - soap->id[0] = '\0'; - soap->href[0] = '\0'; - soap->type[0] = '\0'; - soap->arrayType[0] = '\0'; - soap->arraySize[0] = '\0'; - soap->arrayOffset[0] = '\0'; - soap->other = 0; - soap->root = -1; - soap->position = 0; - soap->null = 0; - soap->mustUnderstand = 0; -#ifdef WITH_DOM - if (soap->mode & SOAP_XML_DOM) - { register struct soap_dom_element *elt; - elt = (struct soap_dom_element*)soap_malloc(soap, sizeof(struct soap_dom_element)); - if (!elt) - return soap->error = SOAP_EOM; - elt->next = NULL; - elt->nstr = NULL; - elt->name = soap_strdup(soap, soap->tag); - elt->prnt = soap->dom; - elt->elts = NULL; - elt->atts = NULL; - elt->data = NULL; - elt->wide = NULL; - elt->type = 0; - elt->node = NULL; - elt->head = lead; - elt->tail = NULL; - elt->soap = soap; - if (soap->dom) - { struct soap_dom_element *p = soap->dom->elts; - if (p) - { while (p->next) - p = p->next; - p->next = elt; - } - else - soap->dom->elts = elt; - } - soap->dom = elt; - att = &elt->atts; - } -#endif - for (tp = soap->attributes; tp; tp = tp->next) - tp->visible = 0; - while ((int)c != EOF && c != '>' && c != '/') - { s = soap->tmpbuf; - i = sizeof(soap->tmpbuf); - while (c != '=' && c != '>' && c != '/' && soap_notblank(c) && (int)c != EOF) - { if (--i > 0) - *s++ = (char)c; - c = soap_get1(soap); - } - *s = '\0'; - if (i == sizeof(soap->tmpbuf)) - return soap->error = SOAP_SYNTAX_ERROR; -#ifdef WITH_DOM - /* add attribute name to dom */ - if (att) - { *att = (struct soap_dom_attribute*)soap_malloc(soap, sizeof(struct soap_dom_attribute)); - if (!*att) - return soap->error = SOAP_EOM; - (*att)->next = NULL; - (*att)->nstr = NULL; - (*att)->name = soap_strdup(soap, soap->tmpbuf); - (*att)->data = NULL; - (*att)->wide = NULL; - (*att)->soap = soap; - } -#endif - if (!strncmp(soap->tmpbuf, "xmlns", 5)) - { if (soap->tmpbuf[5] == ':') - { soap->tmpbuf[5] = '\0'; - t = soap->tmpbuf + 6; - } - else if (soap->tmpbuf[5]) - t = NULL; - else - t = SOAP_STR_EOS; - } - else - t = NULL; - for (tp = soap->attributes; tp; tp = tp->next) - { if (!SOAP_STRCMP(tp->name, soap->tmpbuf)) - break; - } - if (!tp) - { tp = (struct soap_attribute*)SOAP_MALLOC(soap, sizeof(struct soap_attribute) + strlen(soap->tmpbuf)); - if (!tp) - return soap->error = SOAP_EOM; - strcpy(tp->name, soap->tmpbuf); - tp->value = NULL; - tp->size = 0; - tp->next = soap->attributes; - soap->attributes = tp; - } - while (soap_blank(c)) - c = soap_get1(soap); - if (c == '=') - { do c = soap_getutf8(soap); - while (soap_blank(c)); - if (c != SOAP_QT && c != SOAP_AP) - { soap_unget(soap, c); - c = ' '; /* blank delimiter */ - } - if (soap_getattrval(soap, tp->value, tp->size, c)) - { -#ifdef WITH_FAST - if (soap->error != SOAP_EOM) - return soap->error; - soap->error = SOAP_OK; - if (soap_store_lab(soap, tp->value, tp->size)) - return soap->error; - if (tp->value) - SOAP_FREE(soap, tp->value); - for (;;) - { if (soap_getattrval(soap, soap->labbuf + soap->labidx, soap->lablen - soap->labidx, c)) - { if (soap->error != SOAP_EOM) - return soap->error; - soap->error = SOAP_OK; - soap->labidx = soap->lablen; - if (soap_append_lab(soap, NULL, 0)) - return soap->error; - } - else - break; - } - if (soap->labidx) - tp->size = soap->lablen; - else - { tp->size = strlen(soap->labbuf) + 1; - if (tp->size < SOAP_LABLEN) - tp->size = SOAP_LABLEN; - } - if (!(tp->value = (char*)SOAP_MALLOC(soap, tp->size))) - return soap->error = SOAP_EOM; - strcpy(tp->value, soap->labbuf); -#else - size_t n; - if (soap->error != SOAP_EOM) - return soap->error; - soap->error = SOAP_OK; - if (soap_new_block(soap)) - return soap->error; - for (;;) - { if (!(s = (char*)soap_push_block(soap, SOAP_BLKLEN))) - return soap->error; - if (soap_getattrval(soap, s, SOAP_BLKLEN, c)) - { if (soap->error != SOAP_EOM) - return soap->error; - soap->error = SOAP_OK; - } - else - break; - } - n = tp->size + soap->blist->size; - if (!(s = (char*)SOAP_MALLOC(soap, n))) - return soap->error = SOAP_EOM; - if (tp->value) - { memcpy(s, tp->value, tp->size); - SOAP_FREE(soap, tp->value); - } - soap_save_block(soap, s + tp->size, 0); - tp->value = s; - tp->size = n; -#endif - } - do c = soap_get1(soap); - while (soap_blank(c)); - tp->visible = 2; /* seen this attribute w/ value */ -#ifdef WITH_DOM - if (att) - (*att)->data = soap_strdup(soap, tp->value); -#endif - } - else - tp->visible = 1; /* seen this attribute w/o value */ -#ifdef WITH_DOM - if (att) - att = &(*att)->next; -#endif - if (t && tp->value) - { if (soap_push_namespace(soap, t, tp->value)) - return soap->error; - tp->visible = 0; - } - } -#ifdef WITH_DOM - if (att) - { soap->dom->nstr = soap_current_namespace(soap, soap->tag); - for (att = &soap->dom->atts; *att; att = &(*att)->next) - (*att)->nstr = soap_current_namespace(soap, (*att)->name); - } -#endif - if ((int)c == EOF) - return soap->error = SOAP_EOF; - if (!(soap->body = (c != '/'))) - do c = soap_get1(soap); - while (soap_blank(c)); -#ifdef WITH_DOM - if (soap->mode & SOAP_XML_DOM) - { if (!soap->body && soap->dom->prnt) - soap->dom = soap->dom->prnt; - } -#endif - for (tp = soap->attributes; tp; tp = tp->next) - { if (tp->visible && tp->value) - { if (!strcmp(tp->name, "id")) - { if (soap->version > 0 - || (soap->mode & SOAP_XML_GRAPH)) - { *soap->id = '#'; - strncpy(soap->id + 1, tp->value, sizeof(soap->id) - 2); - soap->id[sizeof(soap->id)-1] = '\0'; - } - } - else if (!strcmp(tp->name, "href")) - { if (soap->version == 1 - || (soap->mode & SOAP_XML_GRAPH) - || (soap->mode & SOAP_ENC_MTOM)) - { strncpy(soap->href, tp->value, sizeof(soap->href) - 1); - soap->href[sizeof(soap->href)-1] = '\0'; - } - } - else if (!soap_match_tag(soap, tp->name, "xsi:type")) - { strncpy(soap->type, tp->value, sizeof(soap->type) - 1); - soap->type[sizeof(soap->type)-1] = '\0'; - } - else if ((!soap_match_tag(soap, tp->name, "xsi:null") - || !soap_match_tag(soap, tp->name, "xsi:nil")) - && (!strcmp(tp->value, "1") - || !strcmp(tp->value, "true"))) - { soap->null = 1; - } - else if (soap->version == 1) - { if (!soap_match_tag(soap, tp->name, "SOAP-ENC:arrayType")) - { s = soap_strrchr(tp->value, '['); - if (s && (size_t)(s - tp->value) < sizeof(soap->arrayType)) - { strncpy(soap->arrayType, tp->value, s - tp->value); - soap->arrayType[s - tp->value] = '\0'; - strncpy(soap->arraySize, s, sizeof(soap->arraySize) - 1); - } - else - strncpy(soap->arrayType, tp->value, sizeof(soap->arrayType) - 1); - soap->arraySize[sizeof(soap->arrayType)-1] = '\0'; - soap->arrayType[sizeof(soap->arrayType)-1] = '\0'; - } - else if (!soap_match_tag(soap, tp->name, "SOAP-ENC:offset")) - strncpy(soap->arrayOffset, tp->value, sizeof(soap->arrayOffset)); - else if (!soap_match_tag(soap, tp->name, "SOAP-ENC:position")) - soap->position = soap_getposition(tp->value, soap->positions); - else if (!soap_match_tag(soap, tp->name, "SOAP-ENC:root")) - soap->root = ((!strcmp(tp->value, "1") || !strcmp(tp->value, "true"))); - else if (!soap_match_tag(soap, tp->name, "SOAP-ENV:mustUnderstand") - && (!strcmp(tp->value, "1") || !strcmp(tp->value, "true"))) - soap->mustUnderstand = 1; - else if (!soap_match_tag(soap, tp->name, "SOAP-ENV:actor")) - { if ((!soap->actor || strcmp(soap->actor, tp->value)) - && strcmp(tp->value, "http://schemas.xmlsoap.org/soap/actor/next")) - soap->other = 1; - } - } - else if (soap->version == 2) - { if (!strcmp(tp->name, "ref") - || !soap_match_tag(soap, tp->name, "SOAP-ENC:ref")) - { *soap->href = '#'; - strncpy(soap->href + 1, tp->value, sizeof(soap->href) - 2); - soap->href[sizeof(soap->href)-1] = '\0'; - } - else if (!soap_match_tag(soap, tp->name, "SOAP-ENC:itemType")) - strncpy(soap->arrayType, tp->value, sizeof(soap->arrayType) - 1); - else if (!soap_match_tag(soap, tp->name, "SOAP-ENC:arraySize")) - strncpy(soap->arraySize, tp->value, sizeof(soap->arraySize) - 1); - else if (!soap_match_tag(soap, tp->name, "SOAP-ENV:mustUnderstand") - && (!strcmp(tp->value, "1") || !strcmp(tp->value, "true"))) - soap->mustUnderstand = 1; - else if (!soap_match_tag(soap, tp->name, "SOAP-ENV:role")) - { if ((!soap->actor || strcmp(soap->actor, tp->value)) - && strcmp(tp->value, "http://www.w3.org/2003/05/soap-envelope/role/next")) - soap->other = 1; - } - } - } - } - return soap->error = SOAP_OK; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_retry(struct soap *soap) -{ soap->error = SOAP_OK; - soap_revert(soap); -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_revert(struct soap *soap) -{ if (!soap->peeked) - { soap->peeked = 1; - if (soap->body) - soap->level--; - } - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Reverting last element (level=%u)\n", soap->level)); -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_string_out(struct soap *soap, const char *s, int flag) -{ register const char *t; - register soap_wchar c; - register soap_wchar mask = 0xFFFFFF80UL; -#ifdef WITH_DOM - if ((soap->mode & SOAP_XML_DOM) && soap->dom) - { soap->dom->data = soap_strdup(soap, s); - return SOAP_OK; - } -#endif - if (soap->mode & SOAP_C_UTFSTRING) - mask = 0; - t = s; - while ((c = *t++)) - { switch (c) - { - case 0x09: - if (flag) - { if (soap_send_raw(soap, s, t - s - 1) || soap_send_raw(soap, " ", 5)) - return soap->error; - s = t; - } - break; - case 0x0A: - if (flag || !(soap->mode & SOAP_XML_CANONICAL)) - { if (soap_send_raw(soap, s, t - s - 1) || soap_send_raw(soap, " ", 5)) - return soap->error; - s = t; - } - break; - case 0x0D: - if (soap_send_raw(soap, s, t - s - 1) || soap_send_raw(soap, " ", 5)) - return soap->error; - s = t; - break; - case '&': - if (soap_send_raw(soap, s, t - s - 1) || soap_send_raw(soap, "&", 5)) - return soap->error; - s = t; - break; - case '<': - if (soap_send_raw(soap, s, t - s - 1) || soap_send_raw(soap, "<", 4)) - return soap->error; - s = t; - break; - case '>': - if (!flag) - { if (soap_send_raw(soap, s, t - s - 1) || soap_send_raw(soap, ">", 4)) - return soap->error; - s = t; - } - break; - case '"': - if (flag) - { if (soap_send_raw(soap, s, t - s - 1) || soap_send_raw(soap, """, 6)) - return soap->error; - s = t; - } - break; - default: -#ifndef WITH_LEANER -#ifdef HAVE_MBTOWC - if (soap->mode & SOAP_C_MBSTRING) - { wchar_t wc; - register int m = mbtowc(&wc, t - 1, MB_CUR_MAX); - if (m > 0 && wc != c) - { if (soap_send_raw(soap, s, t - s - 1) || soap_pututf8(soap, wc)) - return soap->error; - s = t += m - 1; - continue; - } - } -#endif -#endif - if ((c & mask) || !(c & 0xFFFFFFE0UL)) - { if (soap_send_raw(soap, s, t - s - 1) || soap_pututf8(soap, (unsigned char)c)) - return soap->error; - s = t; - } - } - } - return soap_send_raw(soap, s, t - s - 1); -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -char * -SOAP_FMAC2 -soap_string_in(struct soap *soap, int flag, long minlen, long maxlen) -{ register char *s; - char *t = NULL; - register size_t i; - register long l = 0; - register int n = 0; - register int m = 0; - register soap_wchar c; -#if !defined(WITH_LEANER) && defined(HAVE_WCTOMB) - char buf[MB_LEN_MAX > 8 ? MB_LEN_MAX : 8]; -#else - char buf[8]; -#endif - DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Reading string content\n")); - if (soap->peeked) - { if (!soap->body) - return NULL; - if (*soap->tag) - { n = 1; - soap->peeked = 0; -#ifndef WITH_LEAN - t = soap->tmpbuf; - t[0] = '<'; - strncpy(t + 1, soap->tag, sizeof(soap->tmpbuf) - 1); - strncat(t, ">", sizeof(soap->tmpbuf)); - m = strlen(soap->tag) + 2; -#endif - } - } -#ifdef WITH_CDATA - if (!flag) - { register int state = 0; -#ifdef WITH_FAST - soap->labidx = 0; /* use look-aside buffer */ -#else - if (soap_new_block(soap)) - return NULL; -#endif - for (;;) - { -#ifdef WITH_FAST - register size_t k; - if (soap_append_lab(soap, NULL, 0)) /* allocate more space in look-aside buffer if necessary */ - return NULL; - s = soap->labbuf + soap->labidx; /* space to populate */ - k = soap->lablen - soap->labidx; /* number of bytes available */ - soap->labidx = soap->lablen; /* claim this space */ -#else - register size_t k = SOAP_BLKLEN; - if (!(s = (char*)soap_push_block(soap, k))) - return NULL; -#endif - for (i = 0; i < k; i++) - { if (m > 0) - { *s++ = *t++; /* copy multibyte characters */ - m--; - continue; - } - c = soap_getchar(soap); - if ((int)c == EOF) - goto end; - if (c >= 0x80 && !(soap->mode & SOAP_ENC_LATIN)) - { soap_unget(soap, c); - c = soap_getutf8(soap); - if (soap->mode & SOAP_C_UTFSTRING) - { if ((c & 0x80000000) && c >= -0x7FFFFF80 && c < SOAP_AP) - { c &= 0x7FFFFFFF; - t = buf; - if (c < 0x0800) - *t++ = (char)(0xC0 | ((c >> 6) & 0x1F)); - else - { if (c < 0x010000) - *t++ = (char)(0xE0 | ((c >> 12) & 0x0F)); - else - { if (c < 0x200000) - *t++ = (char)(0xF0 | ((c >> 18) & 0x07)); - else - { if (c < 0x04000000) - *t++ = (char)(0xF8 | ((c >> 24) & 0x03)); - else - { *t++ = (char)(0xFC | ((c >> 30) & 0x01)); - *t++ = (char)(0x80 | ((c >> 24) & 0x3F)); - } - *t++ = (char)(0x80 | ((c >> 18) & 0x3F)); - } - *t++ = (char)(0x80 | ((c >> 12) & 0x3F)); - } - *t++ = (char)(0x80 | ((c >> 6) & 0x3F)); - } - *t++ = (char)(0x80 | (c & 0x3F)); - m = (int)(t - buf) - 1; - t = buf; - *s++ = *t++; - continue; - } - } - } - switch (state) - { case 1: - if (c == ']') - state = 4; - *s++ = c; - continue; - case 2: - if (c == '-') - state = 6; - *s++ = c; - continue; - case 3: - if (c == '?') - state = 8; - *s++ = c; - continue; - /* CDATA */ - case 4: - if (c == ']') - state = 5; - else - state = 1; - *s++ = c; - continue; - case 5: - if (c == '>') - state = 0; - else - state = 1; - *s++ = c; - continue; - /* comment */ - case 6: - if (c == '-') - state = 7; - else - state = 2; - *s++ = c; - continue; - case 7: - if (c == '>') - state = 0; - else - state = 2; - *s++ = c; - continue; - /* PI */ - case 8: - if (c == '>') - state = 0; - else - state = 3; - *s++ = c; - continue; - } - switch (c) - { - case '/': - if (n > 0) - { c = soap_getchar(soap); - if (c == '>') - n--; - soap_unget(soap, c); - } - *s++ = '/'; - break; - case '<': - c = soap_getchar(soap); - if (c == '/') - { if (n == 0) - { c = SOAP_TT; - goto end; - } - n--; - } - else if (c == '!') - { c = soap_getchar(soap); - if (c == '[') - { do c = soap_getchar(soap); - while ((int)c != EOF && c != '['); - if ((int)c == EOF) - goto end; - t = (char*)"![CDATA["; - m = 8; - state = 1; - } - else if (c == '-') - { if ((c = soap_getchar(soap)) == '-') - state = 2; - t = (char*)"!-"; - m = 2; - soap_unget(soap, c); - } - else - { t = (char*)"!"; - m = 1; - soap_unget(soap, c); - } - *s++ = '<'; - break; - } - else if (c == '?') - state = 3; - else - n++; - soap_unget(soap, c); - *s++ = '<'; - break; - case '>': - *s++ = '>'; - break; - case '"': - *s++ = '"'; - break; - default: -#ifndef WITH_LEANER -#ifdef HAVE_WCTOMB - if (soap->mode & SOAP_C_MBSTRING) - { m = wctomb(buf, c & 0x7FFFFFFF); - if (m >= 1 && m <= (int)MB_CUR_MAX) - { t = buf; - *s++ = *t++; - m--; - } - else - { *s++ = SOAP_UNKNOWN_CHAR; - m = 0; - } - } - else -#endif -#endif - *s++ = (char)(c & 0xFF); - } - l++; - if ((soap->mode & SOAP_XML_STRICT) && maxlen >= 0 && l > maxlen) - { DBGLOG(TEST,SOAP_MESSAGE(fdebug, "String too long: maxlen=%ld\n", maxlen)); - soap->error = SOAP_LENGTH; - return NULL; - } - } - } - } -#endif -#ifdef WITH_FAST - soap->labidx = 0; /* use look-aside buffer */ -#else - if (soap_new_block(soap)) - return NULL; -#endif - for (;;) - { -#ifdef WITH_FAST - register size_t k; - if (soap_append_lab(soap, NULL, 0)) /* allocate more space in look-aside buffer if necessary */ - return NULL; - s = soap->labbuf + soap->labidx; /* space to populate */ - k = soap->lablen - soap->labidx; /* number of bytes available */ - soap->labidx = soap->lablen; /* claim this space */ -#else - register size_t k = SOAP_BLKLEN; - if (!(s = (char*)soap_push_block(soap, k))) - return NULL; -#endif - for (i = 0; i < k; i++) - { if (m > 0) - { *s++ = *t++; /* copy multibyte characters */ - m--; - continue; - } - if (soap->mode & SOAP_C_UTFSTRING) - { if (((c = soap_get(soap)) & 0x80000000) && c >= -0x7FFFFF80 && c < SOAP_AP) - { c &= 0x7FFFFFFF; - t = buf; - if (c < 0x0800) - *t++ = (char)(0xC0 | ((c >> 6) & 0x1F)); - else - { if (c < 0x010000) - *t++ = (char)(0xE0 | ((c >> 12) & 0x0F)); - else - { if (c < 0x200000) - *t++ = (char)(0xF0 | ((c >> 18) & 0x07)); - else - { if (c < 0x04000000) - *t++ = (char)(0xF8 | ((c >> 24) & 0x03)); - else - { *t++ = (char)(0xFC | ((c >> 30) & 0x01)); - *t++ = (char)(0x80 | ((c >> 24) & 0x3F)); - } - *t++ = (char)(0x80 | ((c >> 18) & 0x3F)); - } - *t++ = (char)(0x80 | ((c >> 12) & 0x3F)); - } - *t++ = (char)(0x80 | ((c >> 6) & 0x3F)); - } - *t++ = (char)(0x80 | (c & 0x3F)); - m = (int)(t - buf) - 1; - t = buf; - *s++ = *t++; - continue; - } - } - else - c = soap_getutf8(soap); - switch (c) - { - case SOAP_TT: - if (n == 0) - goto end; - n--; - *s++ = '<'; - t = (char*)"/"; - m = 1; - break; - case SOAP_LT: - n++; - *s++ = '<'; - break; - case SOAP_GT: - *s++ = '>'; - break; - case SOAP_QT: - *s++ = '"'; - break; - case SOAP_AP: - *s++ = '\''; - break; - case '/': - if (n > 0) - { c = soap_get(soap); - if (c == SOAP_GT) - n--; - soap_unget(soap, c); - } - *s++ = '/'; - break; - case '<' | 0x80000000: - if (flag) - *s++ = '<'; - else - { *s++ = '&'; - t = (char*)"lt;"; - m = 3; - } - break; - case '>' | 0x80000000: - if (flag) - *s++ = '>'; - else - { *s++ = '&'; - t = (char*)"gt;"; - m = 3; - } - break; - case '&' | 0x80000000: - if (flag) - *s++ = '&'; - else - { *s++ = '&'; - t = (char*)"amp;"; - m = 4; - } - break; - case '"' | 0x80000000: - if (flag) - *s++ = '"'; - else - { *s++ = '&'; - t = (char*)"quot;"; - m = 5; - } - break; - case '\'' | 0x80000000: - if (flag) - *s++ = '\''; - else - { *s++ = '&'; - t = (char*)"apos;"; - m = 5; - } - break; - default: - if ((int)c == EOF) - goto end; -#ifndef WITH_LEANER -#ifdef HAVE_WCTOMB - if (soap->mode & SOAP_C_MBSTRING) - { m = wctomb(buf, c & 0x7FFFFFFF); - if (m >= 1 && m <= (int)MB_CUR_MAX) - { t = buf; - *s++ = *t++; - m--; - } - else - { *s++ = SOAP_UNKNOWN_CHAR; - m = 0; - } - } - else -#endif -#endif - *s++ = (char)(c & 0xFF); - } - l++; - if ((soap->mode & SOAP_XML_STRICT) && maxlen >= 0 && l > maxlen) - { DBGLOG(TEST,SOAP_MESSAGE(fdebug, "String too long: maxlen=%ld\n", maxlen)); - soap->error = SOAP_LENGTH; - return NULL; - } - } - } -end: - soap_unget(soap, c); - *s = '\0'; -#ifdef WITH_FAST - t = soap_strdup(soap, soap->labbuf); -#else - soap_size_block(soap, i+1); - t = soap_save_block(soap, NULL, 0); -#endif - if ((soap->mode & SOAP_XML_STRICT) && l < minlen) - { DBGLOG(TEST,SOAP_MESSAGE(fdebug, "String too short: %ld chars, minlen=%ld\n", l, minlen)); - soap->error = SOAP_LENGTH; - return NULL; - } -#ifdef WITH_DOM - if ((soap->mode & SOAP_XML_DOM) && soap->dom) - { if (flag == 3) - soap->dom->tail = t; - else - soap->dom->data = t; - } -#endif - if (flag == 2) - if (soap_s2QName(soap, t, &t)) - return NULL; - return t; -} -#endif - -/******************************************************************************/ -#ifndef WITH_LEANER -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_wstring_out(struct soap *soap, const wchar_t *s, int flag) -{ const char *t; - char tmp; - register soap_wchar c; -#ifdef WITH_DOM - if ((soap->mode & SOAP_XML_DOM) && soap->dom) - { wchar_t *r = (wchar_t*)s; - int n = 1; - while (*r++) - n++; - soap->dom->wide = r = (wchar_t*)soap_malloc(soap, n * sizeof(wchar_t)); - while (n--) - *r++ = *s++; - return SOAP_OK; - } -#endif - while ((c = *s++)) - { switch (c) - { - case 0x09: - if (flag) - t = " "; - else - t = "\t"; - break; - case 0x0A: - if (flag || !(soap->mode & SOAP_XML_CANONICAL)) - t = " "; - else - t = "\n"; - break; - case 0x0D: - t = " "; - break; - case '&': - t = "&"; - break; - case '<': - t = "<"; - break; - case '>': - if (flag) - t = ">"; - else - t = ">"; - break; - case '"': - if (flag) - t = """; - else - t = "\""; - break; - default: - if (c >= 0x20 && c < 0x80) - { tmp = (char)c; - if (soap_send_raw(soap, &tmp, 1)) - return soap->error; - } - else if (soap_pututf8(soap, (unsigned long)c)) - return soap->error; - continue; - } - if (soap_send(soap, t)) - return soap->error; - } - return SOAP_OK; -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_LEANER -#ifndef PALM_2 -SOAP_FMAC1 -wchar_t * -SOAP_FMAC2 -soap_wstring_in(struct soap *soap, int flag, long minlen, long maxlen) -{ wchar_t *s; - register int i, n = 0; - register long l = 0; - register soap_wchar c; - const char *t = NULL; - DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Reading wide string content\n")); - if (soap->peeked) - { if (!soap->body) - return NULL; - if (*soap->tag) - { n = 1; - soap->peeked = 0; - } - } - if (soap_new_block(soap)) - return NULL; - for (;;) - { if (!(s = (wchar_t*)soap_push_block(soap, sizeof(wchar_t)*SOAP_BLKLEN))) - return NULL; - for (i = 0; i < SOAP_BLKLEN; i++) - { if (t) - { *s++ = (wchar_t)*t++; - if (!*t) - t = NULL; - continue; - } - c = soap_getutf8(soap); - switch (c) - { - case SOAP_TT: - if (n == 0) - goto end; - n--; - *s++ = '<'; - soap_unget(soap, '/'); - break; - case SOAP_LT: - n++; - *s++ = '<'; - break; - case SOAP_GT: - *s++ = '>'; - break; - case SOAP_QT: - *s++ = '"'; - break; - case SOAP_AP: - *s++ = '\''; - break; - case '/': - if (n > 0) - { c = soap_getutf8(soap); - if (c == SOAP_GT) - n--; - soap_unget(soap, c); - } - *s++ = '/'; - break; - case '<': - if (flag) - *s++ = (soap_wchar)'<'; - else - { *s++ = (soap_wchar)'&'; - t = "lt;"; - } - break; - case '>': - if (flag) - *s++ = (soap_wchar)'>'; - else - { *s++ = (soap_wchar)'&'; - t = "gt;"; - } - break; - case '"': - if (flag) - *s++ = (soap_wchar)'"'; - else - { *s++ = (soap_wchar)'&'; - t = "quot;"; - } - break; - default: - if ((int)c == EOF) - goto end; - *s++ = (wchar_t)c & 0x7FFFFFFF; - } - l++; - if ((soap->mode & SOAP_XML_STRICT) && maxlen >= 0 && l > maxlen) - { DBGLOG(TEST,SOAP_MESSAGE(fdebug, "String too long: maxlen=%ld\n", maxlen)); - soap->error = SOAP_LENGTH; - return NULL; - } - } - } -end: - soap_unget(soap, c); - *s = '\0'; - soap_size_block(soap, sizeof(wchar_t) * (i + 1)); - if ((soap->mode & SOAP_XML_STRICT) && l < minlen) - { DBGLOG(TEST,SOAP_MESSAGE(fdebug, "String too short: %ld chars, minlen=%ld\n", l, minlen)); - soap->error = SOAP_LENGTH; - return NULL; - } - s = (wchar_t*)soap_save_block(soap, NULL, 0); -#ifdef WITH_DOM - if ((soap->mode & SOAP_XML_DOM) && soap->dom) - soap->dom->wide = s; -#endif - return s; -} -#endif -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -const char* -SOAP_FMAC2 -soap_int2s(struct soap *soap, int n) -{ return soap_long2s(soap, (long)n); -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_outint(struct soap *soap, const char *tag, int id, const int *p, const char *type, int n) -{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type) - || soap_string_out(soap, soap_long2s(soap, (long)*p), 0)) - return soap->error; - return soap_element_end_out(soap, tag); -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_s2int(struct soap *soap, const char *s, int *p) -{ if (s) - { char *r; -#ifndef WITH_NOIO -#ifndef WITH_LEAN - soap_reset_errno; -#endif -#endif - *p = (int)soap_strtol(s, &r, 10); - if ((s == r && (soap->mode & SOAP_XML_STRICT)) || *r -#ifndef WITH_NOIO -#ifndef WITH_LEAN - || soap_errno == SOAP_ERANGE -#endif -#endif - ) - soap->error = SOAP_TYPE; - } - return soap->error; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int * -SOAP_FMAC2 -soap_inint(struct soap *soap, const char *tag, int *p, const char *type, int t) -{ if (soap_element_begin_in(soap, tag, 0, NULL)) - return NULL; -#ifndef WITH_LEAN - if (*soap->type - && soap_match_tag(soap, soap->type, type) - && soap_match_tag(soap, soap->type, ":int") - && soap_match_tag(soap, soap->type, ":short") - && soap_match_tag(soap, soap->type, ":byte")) - { soap->error = SOAP_TYPE; - soap_revert(soap); - return NULL; - } -#endif - p = (int*)soap_id_enter(soap, soap->id, p, t, sizeof(int), 0, NULL, NULL, NULL); - if (*soap->href) - p = (int*)soap_id_forward(soap, soap->href, p, 0, t, 0, sizeof(int), 0, NULL); - else if (p) - { if (soap_s2int(soap, soap_value(soap), p)) - return NULL; - } - if (soap->body && soap_element_end_in(soap, tag)) - return NULL; - return p; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -const char* -SOAP_FMAC2 -soap_long2s(struct soap *soap, long n) -{ sprintf(soap->tmpbuf, "%ld", n); - return soap->tmpbuf; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_outlong(struct soap *soap, const char *tag, int id, const long *p, const char *type, int n) -{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type) - || soap_string_out(soap, soap_long2s(soap, *p), 0)) - return soap->error; - return soap_element_end_out(soap, tag); -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_s2long(struct soap *soap, const char *s, long *p) -{ if (s) - { char *r; -#ifndef WITH_NOIO -#ifndef WITH_LEAN - soap_reset_errno; -#endif -#endif - *p = soap_strtol(s, &r, 10); - if ((s == r && (soap->mode & SOAP_XML_STRICT)) || *r -#ifndef WITH_NOIO -#ifndef WITH_LEAN - || soap_errno == SOAP_ERANGE -#endif -#endif - ) - soap->error = SOAP_TYPE; - } - return soap->error; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -long * -SOAP_FMAC2 -soap_inlong(struct soap *soap, const char *tag, long *p, const char *type, int t) -{ if (soap_element_begin_in(soap, tag, 0, NULL)) - return NULL; -#ifndef WITH_LEAN - if (*soap->type - && soap_match_tag(soap, soap->type, type) - && soap_match_tag(soap, soap->type, ":int") - && soap_match_tag(soap, soap->type, ":short") - && soap_match_tag(soap, soap->type, ":byte")) - { soap->error = SOAP_TYPE; - soap_revert(soap); - return NULL; - } -#endif - p = (long*)soap_id_enter(soap, soap->id, p, t, sizeof(long), 0, NULL, NULL, NULL); - if (*soap->href) - p = (long*)soap_id_forward(soap, soap->href, p, 0, t, 0, sizeof(long), 0, NULL); - else if (p) - { if (soap_s2long(soap, soap_value(soap), p)) - return NULL; - } - if (soap->body && soap_element_end_in(soap, tag)) - return NULL; - return p; -} -#endif - -/******************************************************************************/ -#ifndef WITH_LEAN -SOAP_FMAC1 -const char* -SOAP_FMAC2 -soap_LONG642s(struct soap *soap, LONG64 n) -{ sprintf(soap->tmpbuf, SOAP_LONG_FORMAT, n); - return soap->tmpbuf; -} -#endif - -/******************************************************************************/ -#ifndef WITH_LEAN -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_outLONG64(struct soap *soap, const char *tag, int id, const LONG64 *p, const char *type, int n) -{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type) - || soap_string_out(soap, soap_LONG642s(soap, *p), 0)) - return soap->error; - return soap_element_end_out(soap, tag); -} -#endif - -/******************************************************************************/ -#ifndef WITH_LEAN -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_s2LONG64(struct soap *soap, const char *s, LONG64 *p) -{ if (s) - { -#ifdef HAVE_STRTOLL - char *r; -#ifndef WITH_NOIO -#ifndef WITH_LEAN - soap_reset_errno; -#endif -#endif - *p = strtoll(s, &r, 10); - if ((s == r && (soap->mode & SOAP_XML_STRICT)) || *r -#ifndef WITH_NOIO -#ifndef WITH_LEAN - || soap_errno == SOAP_ERANGE -#endif -#endif - ) -#else -# ifdef HAVE_SSCANF - if (sscanf(s, SOAP_LONG_FORMAT, p) != 1) -# endif -#endif - soap->error = SOAP_TYPE; - } - return soap->error; -} -#endif - -/******************************************************************************/ -#ifndef WITH_LEAN -SOAP_FMAC1 -LONG64 * -SOAP_FMAC2 -soap_inLONG64(struct soap *soap, const char *tag, LONG64 *p, const char *type, int t) -{ if (soap_element_begin_in(soap, tag, 0, NULL)) - return NULL; -#ifndef WITH_LEAN - if (*soap->type - && soap_match_tag(soap, soap->type, type) - && soap_match_tag(soap, soap->type, ":integer") - && soap_match_tag(soap, soap->type, ":positiveInteger") - && soap_match_tag(soap, soap->type, ":negativeInteger") - && soap_match_tag(soap, soap->type, ":nonPositiveInteger") - && soap_match_tag(soap, soap->type, ":nonNegativeInteger") - && soap_match_tag(soap, soap->type, ":long") - && soap_match_tag(soap, soap->type, ":int") - && soap_match_tag(soap, soap->type, ":short") - && soap_match_tag(soap, soap->type, ":byte")) - { soap->error = SOAP_TYPE; - soap_revert(soap); - return NULL; - } -#endif - p = (LONG64*)soap_id_enter(soap, soap->id, p, t, sizeof(LONG64), 0, NULL, NULL, NULL); - if (*soap->href) - p = (LONG64*)soap_id_forward(soap, soap->href, p, 0, t, 0, sizeof(LONG64), 0, NULL); - else if (p) - { if (soap_s2LONG64(soap, soap_value(soap), p)) - return NULL; - } - if (soap->body && soap_element_end_in(soap, tag)) - return NULL; - return p; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -const char* -SOAP_FMAC2 -soap_byte2s(struct soap *soap, char n) -{ return soap_long2s(soap, (long)n); -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_outbyte(struct soap *soap, const char *tag, int id, const char *p, const char *type, int n) -{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type) - || soap_string_out(soap, soap_long2s(soap, (long)*p), 0)) - return soap->error; - return soap_element_end_out(soap, tag); -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_s2byte(struct soap *soap, const char *s, char *p) -{ if (s) - { long n; - char *r; - n = soap_strtol(s, &r, 10); - if (s == r || *r || n < -128 || n > 127) - soap->error = SOAP_TYPE; - *p = (char)n; - } - return soap->error; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -char * -SOAP_FMAC2 -soap_inbyte(struct soap *soap, const char *tag, char *p, const char *type, int t) -{ if (soap_element_begin_in(soap, tag, 0, NULL)) - return NULL; -#ifndef WITH_LEAN - if (*soap->type - && soap_match_tag(soap, soap->type, type) - && soap_match_tag(soap, soap->type, ":byte")) - { soap->error = SOAP_TYPE; - soap_revert(soap); - return NULL; - } -#endif - p = (char*)soap_id_enter(soap, soap->id, p, t, sizeof(char), 0, NULL, NULL, NULL); - if (*soap->href) - p = (char*)soap_id_forward(soap, soap->href, p, 0, t, 0, sizeof(char), 0, NULL); - else if (p) - { if (soap_s2byte(soap, soap_value(soap), p)) - return NULL; - } - if (soap->body && soap_element_end_in(soap, tag)) - return NULL; - return p; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -const char* -SOAP_FMAC2 -soap_short2s(struct soap *soap, short n) -{ return soap_long2s(soap, (long)n); -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_outshort(struct soap *soap, const char *tag, int id, const short *p, const char *type, int n) -{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type) - || soap_string_out(soap, soap_long2s(soap, (long)*p), 0)) - return soap->error; - return soap_element_end_out(soap, tag); -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_s2short(struct soap *soap, const char *s, short *p) -{ if (s) - { long n; - char *r; - n = soap_strtol(s, &r, 10); - if (s == r || *r || n < -32768 || n > 32767) - soap->error = SOAP_TYPE; - *p = (short)n; - } - return soap->error; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -short * -SOAP_FMAC2 -soap_inshort(struct soap *soap, const char *tag, short *p, const char *type, int t) -{ if (soap_element_begin_in(soap, tag, 0, NULL)) - return NULL; -#ifndef WITH_LEAN - if (*soap->type - && soap_match_tag(soap, soap->type, type) - && soap_match_tag(soap, soap->type, ":short") - && soap_match_tag(soap, soap->type, ":byte")) - { soap->error = SOAP_TYPE; - soap_revert(soap); - return NULL; - } -#endif - p = (short*)soap_id_enter(soap, soap->id, p, t, sizeof(short), 0, NULL, NULL, NULL); - if (*soap->href) - p = (short*)soap_id_forward(soap, soap->href, p, 0, t, 0, sizeof(short), 0, NULL); - else if (p) - { if (soap_s2short(soap, soap_value(soap), p)) - return NULL; - } - if (soap->body && soap_element_end_in(soap, tag)) - return NULL; - return p; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -const char* -SOAP_FMAC2 -soap_float2s(struct soap *soap, float n) -{ char *s, *t; - if (soap_isnan((double)n)) - return "NaN"; - if (soap_ispinff(n)) - return "INF"; - if (soap_isninff(n)) - return "-INF"; - s = soap->tmpbuf; - sprintf(soap->tmpbuf, soap->float_format, n); - t = strchr(s, ','); /* convert decimal comma to DP */ - if (t) - *t = '.'; - return s; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_outfloat(struct soap *soap, const char *tag, int id, const float *p, const char *type, int n) -{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type) - || soap_string_out(soap, soap_float2s(soap, *p), 0)) - return soap->error; - return soap_element_end_out(soap, tag); -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_s2float(struct soap *soap, const char *s, float *p) -{ if (s) - { if (!*s) - return soap->error = SOAP_TYPE; - if (!soap_tag_cmp(s, "INF")) - *p = FLT_PINFTY; - else if (!soap_tag_cmp(s, "+INF")) - *p = FLT_PINFTY; - else if (!soap_tag_cmp(s, "-INF")) - *p = FLT_NINFTY; - else if (!soap_tag_cmp(s, "NaN")) - *p = FLT_NAN; - else - { -/* On some systems, strtof appears to be broken or doesn't link: use with caution */ -#if defined(HAVE_STRTOF) - char *r; - *p = strtof((char*)s, &r); - if (*r) -#elif defined(HAVE_STRTOD) - char *r; - *p = (float)strtod(s, &r); - if (*r) -#endif -#ifdef HAVE_SSCANF - if (sscanf(s, "%g", p) != 1) - soap->error = SOAP_TYPE; -#else - soap->error = SOAP_TYPE; -#endif - } - } - return soap->error; -} -#endif - -/******************************************************************************/ -#ifndef WITH_LEAN -static int soap_isnumeric(struct soap *soap, const char *type) -{ if (soap_match_tag(soap, soap->type, type) - && soap_match_tag(soap, soap->type, ":float") - && soap_match_tag(soap, soap->type, ":double") - && soap_match_tag(soap, soap->type, ":decimal") - && soap_match_tag(soap, soap->type, ":integer") - && soap_match_tag(soap, soap->type, ":positiveInteger") - && soap_match_tag(soap, soap->type, ":negativeInteger") - && soap_match_tag(soap, soap->type, ":nonPositiveInteger") - && soap_match_tag(soap, soap->type, ":nonNegativeInteger") - && soap_match_tag(soap, soap->type, ":long") - && soap_match_tag(soap, soap->type, ":int") - && soap_match_tag(soap, soap->type, ":short") - && soap_match_tag(soap, soap->type, ":byte") - && soap_match_tag(soap, soap->type, ":unsignedLong") - && soap_match_tag(soap, soap->type, ":unsignedInt") - && soap_match_tag(soap, soap->type, ":unsignedShort") - && soap_match_tag(soap, soap->type, ":unsignedByte")) - { soap->error = SOAP_TYPE; - soap_revert(soap); - return SOAP_ERR; - } - return SOAP_OK; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -float * -SOAP_FMAC2 -soap_infloat(struct soap *soap, const char *tag, float *p, const char *type, int t) -{ if (soap_element_begin_in(soap, tag, 0, NULL)) - return NULL; -#ifndef WITH_LEAN - if (*soap->type != '\0' && soap_isnumeric(soap, type)) - return NULL; -#endif - p = (float*)soap_id_enter(soap, soap->id, p, t, sizeof(float), 0, NULL, NULL, NULL); - if (*soap->href) - p = (float*)soap_id_forward(soap, soap->href, p, 0, t, 0, sizeof(float), 0, NULL); - else if (p) - { if (soap_s2float(soap, soap_value(soap), p)) - return NULL; - } - if (soap->body && soap_element_end_in(soap, tag)) - return NULL; - return p; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -const char* -SOAP_FMAC2 -soap_double2s(struct soap *soap, double n) -{ char *s, *t; - if (soap_isnan(n)) - return "NaN"; - if (soap_ispinfd(n)) - return "INF"; - if (soap_isninfd(n)) - return "-INF"; - s = soap->tmpbuf; - sprintf(soap->tmpbuf, soap->double_format, n); - t = strchr(s, ','); /* convert decimal comma to DP */ - if (t) - *t = '.'; - return s; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_outdouble(struct soap *soap, const char *tag, int id, const double *p, const char *type, int n) -{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type) - || soap_string_out(soap, soap_double2s(soap, *p), 0)) - return soap->error; - return soap_element_end_out(soap, tag); -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_s2double(struct soap *soap, const char *s, double *p) -{ if (s) - { if (!*s) - return soap->error = SOAP_TYPE; - if (!soap_tag_cmp(s, "INF")) - *p = DBL_PINFTY; - else if (!soap_tag_cmp(s, "+INF")) - *p = DBL_PINFTY; - else if (!soap_tag_cmp(s, "-INF")) - *p = DBL_NINFTY; - else if (!soap_tag_cmp(s, "NaN")) - *p = DBL_NAN; - else - { -#ifdef HAVE_STRTOD - char *r; - *p = strtod(s, &r); - if (*r) -#endif -#ifdef HAVE_SSCANF - if (sscanf(s, "%lg", p) != 1) - soap->error = SOAP_TYPE; -#else - soap->error = SOAP_TYPE; -#endif - } - } - return soap->error; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -double * -SOAP_FMAC2 -soap_indouble(struct soap *soap, const char *tag, double *p, const char *type, int t) -{ if (soap_element_begin_in(soap, tag, 0, NULL)) - return NULL; -#ifndef WITH_LEAN - if (*soap->type != '\0' && soap_isnumeric(soap, type)) - return NULL; -#endif - p = (double*)soap_id_enter(soap, soap->id, p, t, sizeof(double), 0, NULL, NULL, NULL); - if (*soap->href) - p = (double*)soap_id_forward(soap, soap->href, p, 0, t, 0, sizeof(double), 0, NULL); - else if (p) - { if (soap_s2double(soap, soap_value(soap), p)) - return NULL; - } - if (soap->body && soap_element_end_in(soap, tag)) - return NULL; - return p; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -const char* -SOAP_FMAC2 -soap_unsignedByte2s(struct soap *soap, unsigned char n) -{ return soap_unsignedLong2s(soap, (unsigned long)n); -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_outunsignedByte(struct soap *soap, const char *tag, int id, const unsigned char *p, const char *type, int n) -{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type) - || soap_string_out(soap, soap_unsignedLong2s(soap, (unsigned long)*p), 0)) - return soap->error; - return soap_element_end_out(soap, tag); -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_s2unsignedByte(struct soap *soap, const char *s, unsigned char *p) -{ if (s) - { unsigned long n; - char *r; - n = soap_strtoul(s, &r, 10); - if (s == r || *r || n > 255) - soap->error = SOAP_TYPE; - *p = (unsigned char)n; - } - return soap->error; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -unsigned char * -SOAP_FMAC2 -soap_inunsignedByte(struct soap *soap, const char *tag, unsigned char *p, const char *type, int t) -{ if (soap_element_begin_in(soap, tag, 0, NULL)) - return NULL; -#ifndef WITH_LEAN - if (*soap->type - && soap_match_tag(soap, soap->type, type) - && soap_match_tag(soap, soap->type, ":unsignedByte")) - { soap->error = SOAP_TYPE; - soap_revert(soap); - return NULL; - } -#endif - p = (unsigned char*)soap_id_enter(soap, soap->id, p, t, sizeof(unsigned char), 0, NULL, NULL, NULL); - if (*soap->href) - p = (unsigned char*)soap_id_forward(soap, soap->href, p, 0, t, 0, sizeof(unsigned char), 0, NULL); - else if (p) - { if (soap_s2unsignedByte(soap, soap_value(soap), p)) - return NULL; - } - if (soap->body && soap_element_end_in(soap, tag)) - return NULL; - return p; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -const char* -SOAP_FMAC2 -soap_unsignedShort2s(struct soap *soap, unsigned short n) -{ return soap_unsignedLong2s(soap, (unsigned long)n); -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_outunsignedShort(struct soap *soap, const char *tag, int id, const unsigned short *p, const char *type, int n) -{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type) - || soap_string_out(soap, soap_unsignedLong2s(soap, (unsigned long)*p), 0)) - return soap->error; - return soap_element_end_out(soap, tag); -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_s2unsignedShort(struct soap *soap, const char *s, unsigned short *p) -{ if (s) - { unsigned long n; - char *r; - n = soap_strtoul(s, &r, 10); - if (s == r || *r || n > 65535) - soap->error = SOAP_TYPE; - *p = (unsigned short)n; - } - return soap->error; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -unsigned short * -SOAP_FMAC2 -soap_inunsignedShort(struct soap *soap, const char *tag, unsigned short *p, const char *type, int t) -{ if (soap_element_begin_in(soap, tag, 0, NULL)) - return NULL; -#ifndef WITH_LEAN - if (*soap->type - && soap_match_tag(soap, soap->type, type) - && soap_match_tag(soap, soap->type, ":unsignedShort") - && soap_match_tag(soap, soap->type, ":unsignedByte")) - { soap->error = SOAP_TYPE; - soap_revert(soap); - return NULL; - } -#endif - p = (unsigned short*)soap_id_enter(soap, soap->id, p, t, sizeof(unsigned short), 0, NULL, NULL, NULL); - if (*soap->href) - p = (unsigned short*)soap_id_forward(soap, soap->href, p, 0, t, 0, sizeof(unsigned short), 0, NULL); - else if (p) - { if (soap_s2unsignedShort(soap, soap_value(soap), p)) - return NULL; - } - if (soap->body && soap_element_end_in(soap, tag)) - return NULL; - return p; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -const char* -SOAP_FMAC2 -soap_unsignedInt2s(struct soap *soap, unsigned int n) -{ return soap_unsignedLong2s(soap, (unsigned long)n); -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_outunsignedInt(struct soap *soap, const char *tag, int id, const unsigned int *p, const char *type, int n) -{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type) - || soap_string_out(soap, soap_unsignedLong2s(soap, (unsigned long)*p), 0)) - return soap->error; - return soap_element_end_out(soap, tag); -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_s2unsignedInt(struct soap *soap, const char *s, unsigned int *p) -{ if (s) - { char *r; -#ifndef WITH_NOIO -#ifndef WITH_LEAN - soap_reset_errno; -#endif -#endif - *p = (unsigned int)soap_strtoul(s, &r, 10); - if ((s == r && (soap->mode & SOAP_XML_STRICT)) || *r -#ifndef WITH_NOIO -#ifndef WITH_LEAN - || soap_errno == SOAP_ERANGE -#endif -#endif - ) - soap->error = SOAP_TYPE; - } - return soap->error; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -unsigned int * -SOAP_FMAC2 -soap_inunsignedInt(struct soap *soap, const char *tag, unsigned int *p, const char *type, int t) -{ if (soap_element_begin_in(soap, tag, 0, NULL)) - return NULL; -#ifndef WITH_LEAN - if (*soap->type - && soap_match_tag(soap, soap->type, type) - && soap_match_tag(soap, soap->type, ":unsignedInt") - && soap_match_tag(soap, soap->type, ":unsignedShort") - && soap_match_tag(soap, soap->type, ":unsignedByte")) - { soap->error = SOAP_TYPE; - soap_revert(soap); - return NULL; - } -#endif - p = (unsigned int*)soap_id_enter(soap, soap->id, p, t, sizeof(unsigned int), 0, NULL, NULL, NULL); - if (*soap->href) - p = (unsigned int*)soap_id_forward(soap, soap->href, p, 0, t, 0, sizeof(unsigned int), 0, NULL); - else if (p) - { if (soap_s2unsignedInt(soap, soap_value(soap), p)) - return NULL; - } - if (soap->body && soap_element_end_in(soap, tag)) - return NULL; - return p; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -const char* -SOAP_FMAC2 -soap_unsignedLong2s(struct soap *soap, unsigned long n) -{ sprintf(soap->tmpbuf, "%lu", n); - return soap->tmpbuf; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_outunsignedLong(struct soap *soap, const char *tag, int id, const unsigned long *p, const char *type, int n) -{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type) - || soap_string_out(soap, soap_unsignedLong2s(soap, *p), 0)) - return soap->error; - return soap_element_end_out(soap, tag); -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_s2unsignedLong(struct soap *soap, const char *s, unsigned long *p) -{ if (s) - { char *r; -#ifndef WITH_NOIO -#ifndef WITH_LEAN - soap_reset_errno; -#endif -#endif - *p = soap_strtoul(s, &r, 10); - if ((s == r && (soap->mode & SOAP_XML_STRICT)) || *r -#ifndef WITH_NOIO -#ifndef WITH_LEAN - || soap_errno == SOAP_ERANGE -#endif -#endif - ) - soap->error = SOAP_TYPE; - } - return soap->error; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -unsigned long * -SOAP_FMAC2 -soap_inunsignedLong(struct soap *soap, const char *tag, unsigned long *p, const char *type, int t) -{ if (soap_element_begin_in(soap, tag, 0, NULL)) - return NULL; -#ifndef WITH_LEAN - if (*soap->type - && soap_match_tag(soap, soap->type, type) - && soap_match_tag(soap, soap->type, ":unsignedInt") - && soap_match_tag(soap, soap->type, ":unsignedShort") - && soap_match_tag(soap, soap->type, ":unsignedByte")) - { soap->error = SOAP_TYPE; - soap_revert(soap); - return NULL; - } -#endif - p = (unsigned long*)soap_id_enter(soap, soap->id, p, t, sizeof(unsigned long), 0, NULL, NULL, NULL); - if (*soap->href) - p = (unsigned long*)soap_id_forward(soap, soap->href, p, 0, t, 0, sizeof(unsigned long), 0, NULL); - else if (p) - { if (soap_s2unsignedLong(soap, soap_value(soap), p)) - return NULL; - } - if (soap->body && soap_element_end_in(soap, tag)) - return NULL; - return p; -} -#endif - -/******************************************************************************/ -#ifndef WITH_LEAN -SOAP_FMAC1 -const char* -SOAP_FMAC2 -soap_ULONG642s(struct soap *soap, ULONG64 n) -{ sprintf(soap->tmpbuf, SOAP_ULONG_FORMAT, n); - return soap->tmpbuf; -} -#endif - -/******************************************************************************/ -#ifndef WITH_LEAN -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_outULONG64(struct soap *soap, const char *tag, int id, const ULONG64 *p, const char *type, int n) -{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type) - || soap_string_out(soap, soap_ULONG642s(soap, *p), 0)) - return soap->error; - return soap_element_end_out(soap, tag); -} -#endif - -/******************************************************************************/ -#ifndef WITH_LEAN -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_s2ULONG64(struct soap *soap, const char *s, ULONG64 *p) -{ if (s) - { -#ifdef HAVE_STRTOULL - char *r; -#ifndef WITH_NOIO -#ifndef WITH_LEAN - soap_reset_errno; -#endif -#endif - *p = strtoull(s, &r, 10); - if ((s == r && (soap->mode & SOAP_XML_STRICT)) || *r -#ifndef WITH_NOIO -#ifndef WITH_LEAN - || soap_errno == SOAP_ERANGE -#endif -#endif - ) -#else -# ifdef HAVE_SSCANF - if (sscanf(s, SOAP_ULONG_FORMAT, p) != 1) -# endif -#endif - soap->error = SOAP_TYPE; - } - return soap->error; -} -#endif - -/******************************************************************************/ -#ifndef WITH_LEAN -SOAP_FMAC1 -ULONG64 * -SOAP_FMAC2 -soap_inULONG64(struct soap *soap, const char *tag, ULONG64 *p, const char *type, int t) -{ if (soap_element_begin_in(soap, tag, 0, NULL)) - return NULL; - if (*soap->type - && soap_match_tag(soap, soap->type, type) - && soap_match_tag(soap, soap->type, ":positiveInteger") - && soap_match_tag(soap, soap->type, ":nonNegativeInteger") - && soap_match_tag(soap, soap->type, ":unsignedLong") - && soap_match_tag(soap, soap->type, ":unsignedInt") - && soap_match_tag(soap, soap->type, ":unsignedShort") - && soap_match_tag(soap, soap->type, ":unsignedByte")) - { soap->error = SOAP_TYPE; - soap_revert(soap); - return NULL; - } - p = (ULONG64*)soap_id_enter(soap, soap->id, p, t, sizeof(ULONG64), 0, NULL, NULL, NULL); - if (*soap->href) - p = (ULONG64*)soap_id_forward(soap, soap->href, p, 0, t, 0, sizeof(ULONG64), 0, NULL); - else if (p) - { if (soap_s2ULONG64(soap, soap_value(soap), p)) - return NULL; - } - if (soap->body && soap_element_end_in(soap, tag)) - return NULL; - return p; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_s2string(struct soap *soap, const char *s, char **t) -{ *t = NULL; - if (s) - { if (!(*t = soap_strdup(soap, s))) - return soap->error = SOAP_EOM; - if (!(soap->mode & (SOAP_ENC_LATIN | SOAP_C_UTFSTRING))) - { /* TODO: consider truncating UTF8 to ASCII for regular XML attribute strings? */ - } - } - return soap->error; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_s2QName(struct soap *soap, const char *s, char **t) -{ if (s) - { struct soap_nlist *np = soap->nlist; - const char *p; - /* if there is no namespace stack, or prefix is "xml" then pass string */ - if (!np || !strncmp(s, "xml:", 4)) - { *t = soap_strdup(soap, s); - return SOAP_OK; - } - /* else we normalize the QName by replacing its prefix */ - p = strchr(s, ':'); - if (p) - { register int n = p - s; - while (np && (strncmp(np->id, s, n) || np->id[n])) - np = np->next; - p++; - } - else - { while (np && *np->id) - np = np->next; - p = s; - } - if (np) - { if (np->index >= 0 && soap->local_namespaces) - { register const char *q = soap->local_namespaces[np->index].id; - if (q) - { if ((*t = (char*)soap_malloc(soap, strlen(p) + strlen(q) + 2))) - sprintf(*t, "%s:%s", q, p); - return SOAP_OK; - } - } - if (np->ns) - { if ((*t = (char*)soap_malloc(soap, strlen(p) + strlen(np->ns) + 4))) - sprintf(*t, "\"%s\":%s", np->ns, p); - return SOAP_OK; - } - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Namespace prefix of '%s' not defined (index=%d, URI=%s)\n", s, np->index, np->ns?np->ns:"")); - return soap->error = SOAP_NAMESPACE; - } - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Namespace prefix of '%s' not defined, assuming empty namespace\n", s)); - if ((*t = (char*)soap_malloc(soap, strlen(p) + 4))) - sprintf(*t, "\"\":%s", p); - } - else - *t = NULL; - return soap->error; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -const char* -SOAP_FMAC2 -soap_QName2s(struct soap *soap, const char *s) -{ struct Namespace *p; - char *t; - int n; - if (!s || *s != '"') - { -#ifndef WITH_LEAN - if (s && (soap->mode & SOAP_XML_CANONICAL)) - { t = (char*)strchr(s, ':'); - if (t) - soap_utilize_ns(soap, s, t - s); - } -#endif - return s; - } - s++; - if ((p = soap->local_namespaces)) - { for (; p->id; p++) - { if (p->ns) - if (!soap_tag_cmp(s, p->ns)) - break; - if (p->in) - if (!soap_tag_cmp(s, p->in)) - break; - } - if (p && p->id) - { s = strchr(s, '"'); - if (s) - { t = (char*)soap_malloc(soap, strlen(p->id) + strlen(s)); - strcpy(t, p->id); - strcat(t, s + 1); - return t; - } - } - } - t = (char*)strchr(s, '"'); - if (t) - n = t - s; - else - n = 0; - t = soap_strdup(soap, s); - t[n] = '\0'; - sprintf(soap->tmpbuf, "xmlns:_%d", soap->idnum++); - soap_set_attr(soap, soap->tmpbuf, t); - s = strchr(s, '"'); - if (s) - { t = (char*)soap_malloc(soap, strlen(soap->tmpbuf) + strlen(s) - 6); - strcpy(t, soap->tmpbuf + 6); - strcat(t, s + 1); - } - return t; -} -#endif - -/******************************************************************************/ -#ifndef WITH_LEAN -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_s2wchar(struct soap *soap, const char *s, wchar_t **t) -{ wchar_t *r; - if (!s) - *t = NULL; - else - { *t = r = (wchar_t*)soap_malloc(soap, sizeof(wchar_t) * (strlen(s) + 1)); - if (!r) - return soap->error; - if (soap->mode & SOAP_ENC_LATIN) - { while (*s) - *r++ = (wchar_t)*s++; - } - else - { /* Convert UTF8 to wchar */ - while (*s) - { register soap_wchar c, c1, c2, c3, c4; - c = *s++; - if (c < 0x80) - *r++ = (wchar_t)c; - else - { c1 = (soap_wchar)*s++ & 0x3F; - if (c < 0xE0) - *r++ = (wchar_t)(((soap_wchar)(c & 0x1F) << 6) | c1); - else - { c2 = (soap_wchar)*s++ & 0x3F; - if (c < 0xF0) - *r++ = (wchar_t)(((soap_wchar)(c & 0x0F) << 12) | (c1 << 6) | c2); - else - { c3 = (soap_wchar)*s++ & 0x3F; - if (c < 0xF8) - *r++ = (wchar_t)(((soap_wchar)(c & 0x07) << 18) | (c1 << 12) | (c2 << 6) | c3); - else - { c4 = (soap_wchar)*s++ & 0x3F; - if (c < 0xFC) - *r++ = (wchar_t)(((soap_wchar)(c & 0x03) << 24) | (c1 << 18) | (c2 << 12) | (c3 << 6) | c4); - else - *r++ = (wchar_t)(((soap_wchar)(c & 0x01) << 30) | (c1 << 24) | (c2 << 18) | (c3 << 12) | (c4 << 6) | (soap_wchar)(*s++ & 0x3F)); - } - } - } - } - } - } - *r = L'\0'; - } - return SOAP_OK; -} -#endif - -/******************************************************************************/ -#ifndef WITH_LEAN -SOAP_FMAC1 -const char* -SOAP_FMAC2 -soap_wchar2s(struct soap *soap, const wchar_t *s) -{ register soap_wchar c; - register char *r, *t; - const wchar_t *q = s; - size_t n = 0; - while ((c = *q++)) - { if (c > 0 && c < 0x80) - n++; - else - n += 6; - } - r = t = (char*)soap_malloc(soap, n + 1); - if (r) - { /* Convert wchar to UTF8 */ - while ((c = *s++)) - { if (c > 0 && c < 0x80) - *t++ = (char)c; - else - { if (c < 0x0800) - *t++ = (char)(0xC0 | ((c >> 6) & 0x1F)); - else - { if (c < 0x010000) - *t++ = (char)(0xE0 | ((c >> 12) & 0x0F)); - else - { if (c < 0x200000) - *t++ = (char)(0xF0 | ((c >> 18) & 0x07)); - else - { if (c < 0x04000000) - *t++ = (char)(0xF8 | ((c >> 24) & 0x03)); - else - { *t++ = (char)(0xFC | ((c >> 30) & 0x01)); - *t++ = (char)(0x80 | ((c >> 24) & 0x3F)); - } - *t++ = (char)(0x80 | ((c >> 18) & 0x3F)); - } - *t++ = (char)(0x80 | ((c >> 12) & 0x3F)); - } - *t++ = (char)(0x80 | ((c >> 6) & 0x3F)); - } - *t++ = (char)(0x80 | (c & 0x3F)); - } - } - *t = '\0'; - } - return r; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_outstring(struct soap *soap, const char *tag, int id, char *const*p, const char *type, int n) -{ id = soap_element_id(soap, tag, id, *p, NULL, 0, type, n); - if (id < 0) - return soap->error; - if (!**p && (soap->mode & SOAP_C_NILSTRING)) - return soap_element_null(soap, tag, id, type); - if (soap_element_begin_out(soap, tag, id, type) - || soap_string_out(soap, *p, 0) - || soap_element_end_out(soap, tag)) - return soap->error; - return SOAP_OK; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -char ** -SOAP_FMAC2 -soap_instring(struct soap *soap, const char *tag, char **p, const char *type, int t, int flag, long minlen, long maxlen) -{ if (soap_element_begin_in(soap, tag, 1, NULL)) - { if (!tag || *tag != '-' || soap->error != SOAP_NO_TAG) - return NULL; - soap->error = SOAP_OK; - } - if (!p) - { if (!(p = (char**)soap_malloc(soap, sizeof(char*)))) - return NULL; - } - if (soap->body) - { *p = soap_string_in(soap, flag, minlen, maxlen); - if (!*p || !(char*)soap_id_enter(soap, soap->id, *p, t, sizeof(char*), 0, NULL, NULL, NULL)) - return NULL; - if (!**p && (!tag || *tag == '-')) - { soap->error = SOAP_NO_TAG; - return NULL; - } - } - else if (soap->null) - *p = NULL; - else - *p = (char*)SOAP_STR_EOS; - if (*soap->href) - p = (char**)soap_id_lookup(soap, soap->href, (void**)p, t, sizeof(char**), 0); - if (soap->body && soap_element_end_in(soap, tag)) - return NULL; - return p; -} -#endif - -/******************************************************************************/ -#ifndef WITH_LEANER -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_outwstring(struct soap *soap, const char *tag, int id, wchar_t *const*p, const char *type, int n) -{ id = soap_element_id(soap, tag, id, *p, NULL, 0, type, n); - if (id < 0) - return soap->error; - if (!**p && (soap->mode & SOAP_C_NILSTRING)) - return soap_element_null(soap, tag, id, type); - if (soap_element_begin_out(soap, tag, id, type) - || soap_wstring_out(soap, *p, 0) - || soap_element_end_out(soap, tag)) - return soap->error; - return SOAP_OK; -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_LEANER -#ifndef PALM_2 -SOAP_FMAC1 -wchar_t ** -SOAP_FMAC2 -soap_inwstring(struct soap *soap, const char *tag, wchar_t **p, const char *type, int t, long minlen, long maxlen) -{ if (soap_element_begin_in(soap, tag, 1, NULL)) - { if (!tag || *tag != '-' || soap->error != SOAP_NO_TAG) - return NULL; - soap->error = SOAP_OK; - } - if (!p) - { if (!(p = (wchar_t**)soap_malloc(soap, sizeof(wchar_t*)))) - return NULL; - } - if (soap->body) - { *p = soap_wstring_in(soap, 1, minlen, maxlen); - if (!*p || !(wchar_t*)soap_id_enter(soap, soap->id, *p, t, sizeof(wchar_t*), 0, NULL, NULL, NULL)) - return NULL; - if (!**p && (!tag || *tag == '-')) - { soap->error = SOAP_NO_TAG; - return NULL; - } - } - else if (soap->null) - *p = NULL; - else - *p = (wchar_t*)SOAP_STR_EOS; - if (*soap->href) - p = (wchar_t**)soap_id_lookup(soap, soap->href, (void**)p, t, sizeof(wchar_t**), 0); - if (soap->body && soap_element_end_in(soap, tag)) - return NULL; - return p; -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_LEAN -static time_t -soap_timegm(struct tm *T) -{ -#if defined(HAVE_TIMEGM) - return timegm(T); -#else - time_t t, g, z; -#ifdef HAVE_GMTIME_R - struct tm tm, *tmp = &tm; -#else - struct tm *tmp; -#endif - t = mktime(T); - if (t == -1) - return -1; -#ifdef HAVE_GMTIME_R - gmtime_r(&t, tmp); -#else - tmp = gmtime(&t); -#endif - tmp->tm_isdst = 0; - g = mktime(tmp); - if (g == -1) - return -1; - z = g - t; - return t - z; -#endif -} -#endif - -/******************************************************************************/ -#ifndef WITH_LEAN -SOAP_FMAC1 -const char* -SOAP_FMAC2 -soap_dateTime2s(struct soap *soap, time_t n) -{ struct tm T, *pT = &T; -#if defined(HAVE_GMTIME_R) - if (gmtime_r(&n, pT)) - strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%SZ", pT); - /* The following defines were added for VxWorks*/ -#elif defined(HAVE_PGMTIME_R) - if (gmtime_r(&n, pT)) - strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%SZ", pT); -#elif defined(HAVE_PGMTIME) - if (gmtime(&n, pT)) - strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%SZ", pT); -#elif defined(HAVE_GMTIME) - if ((pT = gmtime(&n))) - strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%SZ", pT); -#elif defined(HAVE_GETTIMEOFDAY) - struct timezone tz; - memset((void*)&tz, 0, sizeof(tz)); -# if defined(HAVE_LOCALTIME_R) - if (localtime_r(&n, pT)) - { struct timeval tv; - gettimeofday(&tv, &tz); - strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%S", pT); - sprintf(soap->tmpbuf + strlen(soap->tmpbuf), "%+03d:%02d", -tz.tz_minuteswest/60+(pT->tm_isdst!=0), abs(tz.tz_minuteswest)%60); - } -# else - if ((pT = localtime(&n))) - { struct timeval tv; - gettimeofday(&tv, &tz); - strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%S", pT); - sprintf(soap->tmpbuf + strlen(soap->tmpbuf), "%+03d:%02d", -tz.tz_minuteswest/60+(pT->tm_isdst!=0), abs(tz.tz_minuteswest)%60); - } -#endif -#elif defined(HAVE_FTIME) - struct timeb t; - memset((void*)&t, 0, sizeof(t)); -# if defined(HAVE_LOCALTIME_R) - if (localtime_r(&n, pT)) - { -#ifdef __BORLANDC__ - ::ftime(&t); -#else - ftime(&t); -#endif - strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%S", pT); - sprintf(soap->tmpbuf + strlen(soap->tmpbuf), "%+03d:%02d", -t.timezone/60+(pT->tm_isdst!=0), abs(t.timezone)%60); - } - /* The following defines were added for VxWorks*/ -# elif defined(HAVE_PLOCALTIME_R) - if (localtime_r(&n, pT)) - { strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%S", pT); - sprintf(soap->tmpbuf+strlen(soap->tmpbuf), "%+03d:%02d", t.timezone/60, abs(t.timezone)%60); - } -# else - if ((pT = localtime(&n))) - { -#ifdef __BORLANDC__ - ::ftime(&t); -#else - ftime(&t); -#endif - strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%S", pT); - sprintf(soap->tmpbuf + strlen(soap->tmpbuf), "%+03d:%02d", -t.timezone/60+(pT->tm_isdst!=0), abs(t.timezone)%60); - } -# endif -#elif defined(HAVE_LOCALTIME_R) - if (localtime_r(&n, pT)) - strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%S", pT); - /* The following defines were added for VxWorks*/ -#elif defined(HAVE_PLOCALTIME_R) - if (localtime_r(&n, pT)) - strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%S", pT); -#else - if ((pT = localtime(&n))) - strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%S", pT); -#endif - else - strcpy(soap->tmpbuf, "1969-12-31T23:59:59Z"); - return soap->tmpbuf; -} -#endif - -/******************************************************************************/ -#ifndef WITH_LEAN -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_outdateTime(struct soap *soap, const char *tag, int id, const time_t *p, const char *type, int n) -{ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, p, n), type) - || soap_string_out(soap, soap_dateTime2s(soap, *p), 0)) - return soap->error; - return soap_element_end_out(soap, tag); -} -#endif - -/******************************************************************************/ -#ifndef WITH_LEAN -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_s2dateTime(struct soap *soap, const char *s, time_t *p) -{ if (s) - { struct tm T; - char zone[32]; - const char *t; - memset((void*)&T, 0, sizeof(T)); - zone[sizeof(zone)-1] = '\0'; - if (strchr(s, '-')) - t = "%d-%d-%dT%d:%d:%d%31s"; - else if (strchr(s, ':')) - t = "%4d%2d%2dT%d:%d:%d%31s"; - else /* parse non-XSD-standard alternative ISO 8601 format */ - t = "%4d%2d%2dT%2d%2d%2d%31s"; - sscanf(s, t, &T.tm_year, &T.tm_mon, &T.tm_mday, &T.tm_hour, &T.tm_min, &T.tm_sec, zone); - if (T.tm_year == 1) - T.tm_year = 70; - else - T.tm_year -= 1900; - T.tm_mon--; - if (*zone) - { if (*zone == '.') - { for (s = zone + 1; *s; s++) - if (*s < '0' || *s > '9') - break; - } - else - s = zone; - if (*s == '+' || *s == '-') - { int h = 0, m = 0; - if (s[3] == ':') - { sscanf(s, "%d:%d", &h, &m); - if (h < 0) - m = -m; - } - else - { m = (int)atol(s); - h = m / 100; - m = m % 100; - } - T.tm_hour -= h; - T.tm_min -= m; - } - T.tm_isdst = 0; - *p = soap_timegm(&T); - } - else - { T.tm_isdst = -1; - *p = mktime(&T); /* no time zone: suppose it is localtime? */ - } - } - return soap->error; -} -#endif - -/******************************************************************************/ -#ifndef WITH_LEAN -SOAP_FMAC1 -time_t * -SOAP_FMAC2 -soap_indateTime(struct soap *soap, const char *tag, time_t *p, const char *type, int t) -{ if (soap_element_begin_in(soap, tag, 0, NULL)) - return NULL; - if (*soap->type - && soap_match_tag(soap, soap->type, type) - && soap_match_tag(soap, soap->type, ":dateTime")) - { soap->error = SOAP_TYPE; - soap_revert(soap); - return NULL; - } - p = (time_t*)soap_id_enter(soap, soap->id, p, t, sizeof(time_t), 0, NULL, NULL, NULL); - if (*soap->href) - p = (time_t*)soap_id_forward(soap, soap->href, p, 0, t, 0, sizeof(time_t), 0, NULL); - else if (p) - { if (soap_s2dateTime(soap, soap_value(soap), p)) - return NULL; - } - if (soap->body && soap_element_end_in(soap, tag)) - return NULL; - return p; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_outliteral(struct soap *soap, const char *tag, char *const*p, const char *type) -{ int i; - const char *t = NULL; - if (tag && *tag != '-') - { if (soap->local_namespaces && (t = strchr(tag, ':'))) - { strncpy(soap->tmpbuf, tag, t-tag); - soap->tmpbuf[t-tag] = '\0'; - for (i = 0; soap->local_namespaces[i].id; i++) - if (!strcmp(soap->tmpbuf, soap->local_namespaces[i].id)) - break; - t++; - if (soap_element(soap, t, 0, type) - || soap_attribute(soap, "xmlns", soap->local_namespaces[i].ns ? soap->local_namespaces[i].ns : SOAP_STR_EOS) - || soap_element_start_end_out(soap, NULL)) - return soap->error; - } - else - { t = tag; - if (soap_element_begin_out(soap, t, 0, type)) - return soap->error; - } - } - if (p && *p) - { if (soap_send(soap, *p)) - return soap->error; - } - if (t) - return soap_element_end_out(soap, t); - return SOAP_OK; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -char ** -SOAP_FMAC2 -soap_inliteral(struct soap *soap, const char *tag, char **p) -{ if (soap_element_begin_in(soap, tag, 1, NULL)) - { if (soap->error != SOAP_NO_TAG || soap_unget(soap, soap_get(soap)) == SOAP_TT) - return NULL; - soap->error = SOAP_OK; - } - if (!p) - { if (!(p = (char**)soap_malloc(soap, sizeof(char*)))) - return NULL; - } - if (soap->body) - { *p = soap_string_in(soap, 0, -1, -1); - if (!*p) - return NULL; - if (!**p && (!tag || *tag == '-')) - { soap->error = SOAP_NO_TAG; - return NULL; - } - } - else if (soap->null) - *p = NULL; - else - *p = (char*)SOAP_STR_EOS; - if (soap->body && soap_element_end_in(soap, tag)) - return NULL; - return p; -} -#endif - -/******************************************************************************/ -#ifndef WITH_LEANER -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_outwliteral(struct soap *soap, const char *tag, wchar_t *const*p, const char *type) -{ int i; - const char *t = NULL; - if (tag && *tag != '-') - { if (soap->local_namespaces && (t = strchr(tag, ':'))) - { strncpy(soap->tmpbuf, tag, t-tag); - soap->tmpbuf[t-tag] = '\0'; - for (i = 0; soap->local_namespaces[i].id; i++) - if (!strcmp(soap->tmpbuf, soap->local_namespaces[i].id)) - break; - t++; - if (soap_element(soap, t, 0, type) - || soap_attribute(soap, "xmlns", soap->local_namespaces[i].ns ? soap->local_namespaces[i].ns : SOAP_STR_EOS) - || soap_element_start_end_out(soap, NULL)) - return soap->error; - } - else - { t = tag; - if (soap_element_begin_out(soap, t, 0, type)) - return soap->error; - } - if (soap_send(soap, soap->tmpbuf)) - return soap->error; - } - if (p) - { wchar_t c; - const wchar_t *s = *p; - while ((c = *s++)) - { if (soap_pututf8(soap, (unsigned long)c)) - return soap->error; - } - } - if (t) - return soap_element_end_out(soap, t); - return SOAP_OK; -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_LEANER -#ifndef PALM_2 -SOAP_FMAC1 -wchar_t ** -SOAP_FMAC2 -soap_inwliteral(struct soap *soap, const char *tag, wchar_t **p) -{ if (soap_element_begin_in(soap, tag, 1, NULL)) - { if (soap->error != SOAP_NO_TAG || soap_unget(soap, soap_get(soap)) == SOAP_TT) - return NULL; - soap->error = SOAP_OK; - } - if (!p) - { if (!(p = (wchar_t**)soap_malloc(soap, sizeof(wchar_t*)))) - return NULL; - } - if (soap->body) - { *p = soap_wstring_in(soap, 0, -1, -1); - if (!*p) - return NULL; - if (!**p && (!tag || *tag == '-')) - { soap->error = SOAP_NO_TAG; - return NULL; - } - } - else if (soap->null) - *p = NULL; - else - *p = (wchar_t*)SOAP_STR_EOS; - if (soap->body && soap_element_end_in(soap, tag)) - return NULL; - return p; -} -#endif -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -const char * -SOAP_FMAC2 -soap_value(struct soap *soap) -{ register size_t i; - register soap_wchar c = 0; - register char *s = soap->tmpbuf; - if (!soap->body) - return SOAP_STR_EOS; - do c = soap_get(soap); - while (soap_blank(c)); - for (i = 0; i < sizeof(soap->tmpbuf) - 1; i++) - { if (c == SOAP_TT || (int)c == EOF) - break; - *s++ = (char)c; - c = soap_get(soap); - } - for (s--; i > 0; i--, s--) - { if (!soap_blank(*s)) - break; - } - s[1] = '\0'; - if ((int)c == EOF || c == SOAP_TT) - soap_unget(soap, c); - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Element content value='%s'\n", soap->tmpbuf)); -#ifdef WITH_DOM - if ((soap->mode & SOAP_XML_DOM) && soap->dom) - soap->dom->data = soap_strdup(soap, soap->tmpbuf); -#endif - return soap->tmpbuf; /* return non-null pointer */ -} -#endif - -/******************************************************************************/ -#if !defined(WITH_LEANER) || !defined(WITH_NOHTTP) -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_getline(struct soap *soap, char *s, int len) -{ int i = len; - soap_wchar c = 0; - for (;;) - { while (--i > 0) - { c = soap_getchar(soap); - if (c == '\r' || c == '\n') - break; - if ((int)c == EOF) - return soap->error = SOAP_EOF; - *s++ = (char)c; - } - if (c != '\n') - c = soap_getchar(soap); /* got \r, now get \n */ - if (c == '\n') - { *s = '\0'; - if (i+1 == len) /* empty line: end of HTTP/MIME header */ - break; - c = soap_unget(soap, soap_getchar(soap)); - if (c != ' ' && c != '\t') /* HTTP line continuation? */ - break; - } - else if ((int)c == EOF) - return soap->error = SOAP_EOF; - } - return SOAP_OK; -} -#endif -#endif - -/******************************************************************************/ -#ifndef PALM_1 -static size_t -soap_count_attachments(struct soap *soap) -{ -#ifndef WITH_LEANER - register struct soap_multipart *content; - register size_t count = soap->count; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Calculating the message size with attachments, current count=%lu\n", (unsigned long)count)); - if ((soap->mode & SOAP_ENC_DIME) && !(soap->mode & SOAP_ENC_MTOM)) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Calculating the size of DIME attachments\n")); - for (content = soap->dime.first; content; content = content->next) - { count += 12 + ((content->size+3)&(~3)); - if (content->id) - count += ((strlen(content->id)+3)&(~3)); - if (content->type) - count += ((strlen(content->type)+3)&(~3)); - if (content->options) - count += ((((unsigned char)content->options[2] << 8) | ((unsigned char)content->options[3]))+7)&(~3); - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Size of DIME attachment content is %lu bytes\n", (unsigned long)content->size)); - } - } - if ((soap->mode & SOAP_ENC_MIME) && soap->mime.boundary) - { register size_t n = strlen(soap->mime.boundary); - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Calculating the size of MIME attachments\n")); - for (content = soap->mime.first; content; content = content->next) - { register const char *s; - /* count \r\n--boundary\r\n */ - count += 6 + n; - /* count Content-Type: ...\r\n */ - if (content->type) - count += 16 + strlen(content->type); - /* count Content-Transfer-Encoding: ...\r\n */ - s = soap_code_str(mime_codes, content->encoding); - if (s) - count += 29 + strlen(s); - /* count Content-ID: ...\r\n */ - if (content->id) - count += 14 + strlen(content->id); - /* count Content-Location: ...\r\n */ - if (content->location) - count += 20 + strlen(content->location); - /* count Content-Description: ...\r\n */ - if (content->description) - count += 23 + strlen(content->description); - /* count \r\n...content */ - count += 2 + content->size; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Size of MIME attachment content is %lu bytes\n", (unsigned long)content->size)); - } - /* count \r\n--boundary-- */ - count += 6 + n; - } - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "New count is %lu bytes\n", (unsigned long)count)); - return count; -#else - return soap->count; -#endif -} -#endif - -/******************************************************************************/ -#ifndef WITH_LEANER -#ifndef PALM_1 -static int -soap_putdimefield(struct soap *soap, const char *s, size_t n) -{ if (soap_send_raw(soap, s, n)) - return soap->error; - return soap_send_raw(soap, SOAP_STR_PADDING, -(long)n&3); -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_LEANER -#ifndef PALM_1 -SOAP_FMAC1 -char * -SOAP_FMAC2 -soap_dime_option(struct soap *soap, unsigned short optype, const char *option) -{ size_t n; - char *s = NULL; - if (option) - { n = strlen(option); - s = (char*)soap_malloc(soap, n + 5); - if (s) - { s[0] = optype >> 8; - s[1] = optype & 0xFF; - s[2] = n >> 8; - s[3] = n & 0xFF; - strcpy(s + 4, option); - } - } - return s; -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_LEANER -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_putdimehdr(struct soap *soap) -{ unsigned char tmp[12]; - size_t optlen = 0, idlen = 0, typelen = 0; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Put DIME header id='%s'\n", soap->dime.id?soap->dime.id:"")); - if (soap->dime.options) - optlen = (((unsigned char)soap->dime.options[2] << 8) | ((unsigned char)soap->dime.options[3])) + 4; - if (soap->dime.id) - idlen = strlen(soap->dime.id); - if (soap->dime.type) - typelen = strlen(soap->dime.type); - tmp[0] = SOAP_DIME_VERSION | (soap->dime.flags & 0x7); - tmp[1] = soap->dime.flags & 0xF0; - tmp[2] = optlen >> 8; - tmp[3] = optlen & 0xFF; - tmp[4] = idlen >> 8; - tmp[5] = idlen & 0xFF; - tmp[6] = typelen >> 8; - tmp[7] = typelen & 0xFF; - tmp[8] = soap->dime.size >> 24; - tmp[9] = (soap->dime.size >> 16) & 0xFF; - tmp[10] = (soap->dime.size >> 8) & 0xFF; - tmp[11] = soap->dime.size & 0xFF; - if (soap_send_raw(soap, (char*)tmp, 12) - || soap_putdimefield(soap, soap->dime.options, optlen) - || soap_putdimefield(soap, soap->dime.id, idlen) - || soap_putdimefield(soap, soap->dime.type, typelen)) - return soap->error; - return SOAP_OK; -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_LEANER -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_putdime(struct soap *soap) -{ struct soap_multipart *content; - if (!(soap->mode & SOAP_ENC_DIME)) - return SOAP_OK; - for (content = soap->dime.first; content; content = content->next) - { void *handle; - soap->dime.size = content->size; - soap->dime.id = content->id; - soap->dime.type = content->type; - soap->dime.options = content->options; - soap->dime.flags = SOAP_DIME_VERSION | SOAP_DIME_MEDIA; - if (soap->fdimereadopen && ((handle = soap->fdimereadopen(soap, (void*)content->ptr, content->id, content->type, content->options)) || soap->error)) - { size_t size = content->size; - if (!handle) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "fdimereadopen failed\n")); - return soap->error; - } - if (!size && ((soap->mode & SOAP_ENC_XML) || (soap->mode & SOAP_IO) == SOAP_IO_CHUNK || (soap->mode & SOAP_IO) == SOAP_IO_STORE)) - { size_t chunksize = sizeof(soap->tmpbuf); - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Chunked streaming DIME\n")); - do - { size = soap->fdimeread(soap, handle, soap->tmpbuf, chunksize); - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "fdimeread returned %lu bytes\n", (unsigned long)size)); - if (size < chunksize) - { soap->dime.flags &= ~SOAP_DIME_CF; - if (!content->next) - soap->dime.flags |= SOAP_DIME_ME; - } - else - soap->dime.flags |= SOAP_DIME_CF; - soap->dime.size = size; - if (soap_putdimehdr(soap) - || soap_putdimefield(soap, soap->tmpbuf, size)) - break; - if (soap->dime.id) - { soap->dime.flags &= ~(SOAP_DIME_MB | SOAP_DIME_MEDIA); - soap->dime.id = NULL; - soap->dime.type = NULL; - soap->dime.options = NULL; - } - } while (size >= chunksize); - } - else - { if (!content->next) - soap->dime.flags |= SOAP_DIME_ME; - if (soap_putdimehdr(soap)) - return soap->error; - do - { size_t bufsize; - if (size < sizeof(soap->tmpbuf)) - bufsize = size; - else - bufsize = sizeof(soap->tmpbuf); - if (!(bufsize = soap->fdimeread(soap, handle, soap->tmpbuf, bufsize))) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "fdimeread failed: insufficient data (%lu bytes remaining from %lu bytes)\n", (unsigned long)size, (unsigned long)content->size)); - soap->error = SOAP_EOF; - break; - } - if (soap_send_raw(soap, soap->tmpbuf, bufsize)) - break; - size -= bufsize; - } while (size); - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "fdimereadclose\n")); - soap_send_raw(soap, SOAP_STR_PADDING, -(long)soap->dime.size&3); - } - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "fdimereadclose\n")); - if (soap->fdimereadclose) - soap->fdimereadclose(soap, handle); - } - else - { if (!content->next) - soap->dime.flags |= SOAP_DIME_ME; - if (soap_putdimehdr(soap) - || soap_putdimefield(soap, (char*)content->ptr, content->size)) - return soap->error; - } - } - return SOAP_OK; -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_LEANER -#ifndef PALM_1 -static char * -soap_getdimefield(struct soap *soap, size_t n) -{ register soap_wchar c; - register int i; - register char *s; - char *p = NULL; - if (n) - { p = (char*)soap_malloc(soap, n + 1); - if (p) - { s = p; - for (i = n; i > 0; i--) - { if ((int)(c = soap_get1(soap)) == EOF) - { soap->error = SOAP_EOF; - return NULL; - } - *s++ = (char)c; - } - *s = '\0'; - if ((soap->error = soap_move(soap, -(long)n&3))) - return NULL; - } - else - soap->error = SOAP_EOM; - } - return p; -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_LEANER -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_getdimehdr(struct soap *soap) -{ register soap_wchar c; - register char *s; - register int i; - unsigned char tmp[12]; - size_t optlen, idlen, typelen; - if (!(soap->mode & SOAP_ENC_DIME)) - return soap->error = SOAP_DIME_END; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Get DIME header\n")); - if (soap->dime.buflen || soap->dime.chunksize) - { if (soap_move(soap, (long)(soap->dime.size - soap_tell(soap)))) - return soap->error = SOAP_EOF; - soap_unget(soap, soap_getchar(soap)); /* skip padding and get hdr */ - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "... From chunked\n")); - return SOAP_OK; - } - s = (char*)tmp; - for (i = 12; i > 0; i--) - { if ((int)(c = soap_getchar(soap)) == EOF) - return soap->error = SOAP_EOF; - *s++ = (char)c; - } - if ((tmp[0] & 0xF8) != SOAP_DIME_VERSION) - return soap->error = SOAP_DIME_MISMATCH; - soap->dime.flags = (tmp[0] & 0x7) | (tmp[1] & 0xF0); - optlen = (tmp[2] << 8) | tmp[3]; - idlen = (tmp[4] << 8) | tmp[5]; - typelen = (tmp[6] << 8) | tmp[7]; - soap->dime.size = (tmp[8] << 24) | (tmp[9] << 16) | (tmp[10] << 8) | tmp[11]; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "DIME size=%lu flags=0x%X\n", (unsigned long)soap->dime.size, soap->dime.flags)); - if (!(soap->dime.options = soap_getdimefield(soap, optlen)) && soap->error) - return soap->error; - if (!(soap->dime.id = soap_getdimefield(soap, idlen)) && soap->error) - return soap->error; - if (!(soap->dime.type = soap_getdimefield(soap, typelen)) && soap->error) - return soap->error; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "DIME id=%s, type=%s, options=%s\n", soap->dime.id?soap->dime.id:"", soap->dime.type?soap->dime.type:"", soap->dime.options?soap->dime.options+4:"")); - if (soap->dime.flags & SOAP_DIME_ME) - soap->mode &= ~SOAP_ENC_DIME; - return SOAP_OK; -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_LEANER -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_getdime(struct soap *soap) -{ while (soap->dime.flags & SOAP_DIME_CF) - { if (soap_getdimehdr(soap)) - return soap->error; - if (soap_move(soap, soap->dime.size)) - return soap->error = SOAP_EOF; - } - if (soap_move(soap, ((soap->dime.size+3)&(~3))-soap_tell(soap))) - return soap->error = SOAP_EOF; - for (;;) - { register struct soap_multipart *content; - if (soap_getdimehdr(soap)) - break; - if (soap->fdimewriteopen && ((soap->dime.ptr = (char*)soap->fdimewriteopen(soap, soap->dime.id, soap->dime.type, soap->dime.options)) || soap->error)) - { const char *id, *type, *options; - size_t size, n; - if (!soap->dime.ptr) - return soap->error; - id = soap->dime.id; - type = soap->dime.type; - options = soap->dime.options; - for (;;) - { size = soap->dime.size; - for (;;) - { n = soap->buflen - soap->bufidx; - if (size < n) - n = size; - if ((soap->error = soap->fdimewrite(soap, (void*)soap->dime.ptr, soap->buf + soap->bufidx, n))) - break; - size -= n; - if (!size) - { soap->bufidx += n; - break; - } - if (soap_recv(soap)) - { soap->error = SOAP_EOF; - goto end; - } - } - if (soap_move(soap, -(long)soap->dime.size&3)) - { soap->error = SOAP_EOF; - break; - } - if (!(soap->dime.flags & SOAP_DIME_CF)) - break; - if (soap_getdimehdr(soap)) - break; - } -end: - if (soap->fdimewriteclose) - soap->fdimewriteclose(soap, (void*)soap->dime.ptr); - soap->dime.size = 0; - soap->dime.id = id; - soap->dime.type = type; - soap->dime.options = options; - } - else if (soap->dime.flags & SOAP_DIME_CF) - { const char *id, *type, *options; - register soap_wchar c; - register char *s; - register int i; - id = soap->dime.id; - type = soap->dime.type; - options = soap->dime.options; - if (soap_new_block(soap)) - return SOAP_EOM; - for (;;) - { s = (char*)soap_push_block(soap, soap->dime.size); - if (!s) - return soap->error = SOAP_EOM; - for (i = soap->dime.size; i > 0; i--) - { if ((int)(c = soap_get1(soap)) == EOF) - return soap->error = SOAP_EOF; - *s++ = (char)c; - } - if (soap_move(soap, -(long)soap->dime.size&3)) - return soap->error = SOAP_EOF; - if (!(soap->dime.flags & SOAP_DIME_CF)) - break; - if (soap_getdimehdr(soap)) - return soap->error; - } - soap->dime.size = soap->blist->size++; /* allocate one more for '\0' */ - if (!(soap->dime.ptr = soap_save_block(soap, NULL, 0))) - return soap->error; - soap->dime.ptr[soap->dime.size] = '\0'; /* force 0-terminated */ - soap->dime.id = id; - soap->dime.type = type; - soap->dime.options = options; - } - else - soap->dime.ptr = soap_getdimefield(soap, soap->dime.size); - content = soap_new_multipart(soap, &soap->dime.first, &soap->dime.last, soap->dime.ptr, soap->dime.size); - if (!content) - return soap->error = SOAP_EOM; - content->id = soap->dime.id; - content->type = soap->dime.type; - content->options = soap->dime.options; - if (soap->error) - return soap->error; - soap_resolve_attachment(soap, content); - } - if (soap->error != SOAP_DIME_END) - return soap->error; - return soap->error = SOAP_OK; -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_LEANER -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_getmimehdr(struct soap *soap) -{ struct soap_multipart *content; - do - { if (soap_getline(soap, soap->msgbuf, sizeof(soap->msgbuf))) - return soap->error; - } - while (!*soap->msgbuf); - if (soap->msgbuf[0] == '-' && soap->msgbuf[1] == '-') - { char *s = soap->msgbuf + strlen(soap->msgbuf) - 1; - /* remove white space */ - while (soap_blank(*s)) - s--; - s[1] = '\0'; - if (soap->mime.boundary) - { if (strcmp(soap->msgbuf + 2, soap->mime.boundary)) - return soap->error = SOAP_MIME_ERROR; - } - else - soap->mime.boundary = soap_strdup(soap, soap->msgbuf + 2); - if (soap_getline(soap, soap->msgbuf, sizeof(soap->msgbuf))) - return soap->error; - } - if (soap_set_mime_attachment(soap, NULL, 0, SOAP_MIME_NONE, NULL, NULL, NULL, NULL)) - return soap->error = SOAP_EOM; - content = soap->mime.last; - for (;;) - { register char *key = soap->msgbuf; - register char *val; - if (!*key) - break; - DBGLOG(TEST,SOAP_MESSAGE(fdebug, "MIME header: %s\n", key)); - val = strchr(soap->msgbuf, ':'); - if (val) - { *val = '\0'; - do val++; - while (*val && *val <= 32); - if (!soap_tag_cmp(key, "Content-ID")) - content->id = soap_strdup(soap, val); - else if (!soap_tag_cmp(key, "Content-Location")) - content->location = soap_strdup(soap, val); - else if (!soap_tag_cmp(key, "Content-Disposition")) - content->id = soap_strdup(soap, soap_get_header_attribute(soap, val, "name")); - else if (!soap_tag_cmp(key, "Content-Type")) - content->type = soap_strdup(soap, val); - else if (!soap_tag_cmp(key, "Content-Description")) - content->description = soap_strdup(soap, val); - else if (!soap_tag_cmp(key, "Content-Transfer-Encoding")) - content->encoding = (enum soap_mime_encoding)soap_code_int(mime_codes, val, (long)SOAP_MIME_NONE); - } - if (soap_getline(soap, key, sizeof(soap->msgbuf))) - return soap->error; - } - return SOAP_OK; -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_LEANER -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_getmime(struct soap *soap) -{ while (soap_get_mime_attachment(soap, NULL)) - ; - return soap->error; -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_LEANER -#ifndef PALM_1 -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_post_check_mime_attachments(struct soap *soap) -{ soap->imode |= SOAP_MIME_POSTCHECK; -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_LEANER -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_check_mime_attachments(struct soap *soap) -{ if (soap->mode & SOAP_MIME_POSTCHECK) - return soap_get_mime_attachment(soap, NULL) != NULL; - return 0; -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_LEANER -#ifndef PALM_1 -SOAP_FMAC1 -struct soap_multipart * -SOAP_FMAC2 -soap_get_mime_attachment(struct soap *soap, void *handle) -{ register soap_wchar c = 0; - register size_t i, m = 0; - register char *s, *t = NULL; - register struct soap_multipart *content; - register short flag = 0; - if (!(soap->mode & SOAP_ENC_MIME)) - return NULL; - content = soap->mime.last; - if (!content) - { if (soap_getmimehdr(soap)) - return NULL; - content = soap->mime.last; - } - else if (content != soap->mime.first) - { if (soap->fmimewriteopen && ((content->ptr = (char*)soap->fmimewriteopen(soap, (void*)handle, content->id, content->type, content->description, content->encoding)) || soap->error)) - { if (!content->ptr) - return NULL; - } - } - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Parsing MIME content id=%s type=%s\n", content->id?content->id:"", content->type?content->type:"")); - if (!content->ptr && soap_new_block(soap)) - { soap->error = SOAP_EOM; - return NULL; - } - for (;;) - { if (content->ptr) - s = soap->tmpbuf; - else if (!(s = (char*)soap_push_block(soap, sizeof(soap->tmpbuf)))) - { soap->error = SOAP_EOM; - return NULL; - } - for (i = 0; i < sizeof(soap->tmpbuf); i++) - { if (m > 0) - { *s++ = *t++; - m--; - } - else - { if (!flag) - { c = soap_get1(soap); - if ((int)c == EOF) - { soap->error = SOAP_EOF; - return NULL; - } - } - if (flag || c == '\r') - { t = soap->msgbuf; - memset(t, 0, sizeof(soap->msgbuf)); - strcpy(t, "\n--"); - if (soap->mime.boundary) - strncat(t, soap->mime.boundary, sizeof(soap->msgbuf)-4); - do c = soap_getchar(soap); - while (c == *t++); - if ((int)c == EOF) - { soap->error = SOAP_EOF; - return NULL; - } - if (!*--t) - goto end; - *t = (char)c; - flag = (c == '\r'); - m = t - soap->msgbuf + 1 - flag; - t = soap->msgbuf; - c = '\r'; - } - *s++ = (char)c; - } - } - if (content->ptr && soap->fmimewrite) - { if ((soap->error = soap->fmimewrite(soap, (void*)content->ptr, soap->tmpbuf, i))) - break; - } - } -end: - *s = '\0'; /* force 0-terminated */ - if (content->ptr) - { if (!soap->error && soap->fmimewrite) - soap->error = soap->fmimewrite(soap, (void*)content->ptr, soap->tmpbuf, i); - if (soap->fmimewriteclose) - soap->fmimewriteclose(soap, (void*)content->ptr); - if (soap->error) - return NULL; - } - else - { content->size = soap_size_block(soap, i+1)-1; - content->ptr = soap_save_block(soap, NULL, 0); - } - soap_resolve_attachment(soap, content); - if (c == '-' && soap_getchar(soap) == '-') - { soap->mode &= ~SOAP_ENC_MIME; - if ((soap->mode & SOAP_MIME_POSTCHECK) && soap_end_recv(soap)) - return NULL; - } - else - { while (c != '\r' && (int)c != EOF && soap_blank(c)) - c = soap_getchar(soap); - if (c != '\r' || soap_getchar(soap) != '\n') - { soap->error = SOAP_MIME_ERROR; - return NULL; - } - if (soap_getmimehdr(soap)) - return NULL; - } - return content; -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_LEANER -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_match_cid(struct soap *soap, const char *s, const char *t) -{ register size_t n; - if (!s) - return 1; - if (!strcmp(s, t)) - return 0; - if (!strncmp(s, "cid:", 4)) - s += 4; - n = strlen(t); - if (*t == '<') - { t++; - n -= 2; - } - if (!strncmp(s, t, n) && !s[n]) - return 0; - soap_decode(soap->tmpbuf, sizeof(soap->tmpbuf), s, SOAP_STR_EOS); - if (!strncmp(soap->tmpbuf, t, n) && !soap->tmpbuf[n]) - return 0; - return 1; -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_LEANER -#ifndef PALM_1 -static void -soap_resolve_attachment(struct soap *soap, struct soap_multipart *content) -{ if (content->id) - { register struct soap_xlist **xp = &soap->xlist; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Resolving attachment data for id=%s\n", content->id)); - while (*xp) - { register struct soap_xlist *xq = *xp; - if (!soap_match_cid(soap, xq->id, content->id)) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Found matching attachment %s for content id=%s\n", xq->id, content->id)); - *xp = xq->next; - *xq->ptr = (unsigned char*)content->ptr; - *xq->size = (int)content->size; - *xq->type = (char*)content->type; - if (content->options) - *xq->options = (char*)content->options; - else - *xq->options = (char*)content->description; - SOAP_FREE(soap, xq); - } - else - xp = &(*xp)->next; - } - } -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_LEANER -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_putmimehdr(struct soap *soap, struct soap_multipart *content) -{ const char *s; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "MIME attachment type=%s\n", content->type?content->type:"")); - if (soap_send3(soap, "\r\n--", soap->mime.boundary, "\r\n")) - return soap->error; - if (content->type && soap_send3(soap, "Content-Type: ", content->type, "\r\n")) - return soap->error; - s = soap_code_str(mime_codes, content->encoding); - if (s && soap_send3(soap, "Content-Transfer-Encoding: ", s, "\r\n")) - return soap->error; - if (content->id && soap_send3(soap, "Content-ID: ", content->id, "\r\n")) - return soap->error; - if (content->location && soap_send3(soap, "Content-Location: ", content->location, "\r\n")) - return soap->error; - if (content->description && soap_send3(soap, "Content-Description: ", content->description, "\r\n")) - return soap->error; - return soap_send_raw(soap, "\r\n", 2); -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_LEANER -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_putmime(struct soap *soap) -{ struct soap_multipart *content; - if (!(soap->mode & SOAP_ENC_MIME) || !soap->mime.boundary) - return SOAP_OK; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Sending MIME attachments\n")); - for (content = soap->mime.first; content; content = content->next) - { void *handle; - if (soap->fmimereadopen && ((handle = soap->fmimereadopen(soap, (void*)content->ptr, content->id, content->type, content->description)) || soap->error)) - { size_t size = content->size; - if (!handle) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "fmimereadopen failed\n")); - return soap->error; - } - if (soap_putmimehdr(soap, content)) - return soap->error; - if (!size) - { if ((soap->mode & SOAP_ENC_XML) || (soap->mode & SOAP_IO) == SOAP_IO_CHUNK || (soap->mode & SOAP_IO) == SOAP_IO_STORE) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Chunked streaming MIME\n")); - do - { size = soap->fmimeread(soap, handle, soap->tmpbuf, sizeof(soap->tmpbuf)); - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "fmimeread returned %lu bytes\n", (unsigned long)size)); - if (soap_send_raw(soap, soap->tmpbuf, size)) - break; - } while (size); - } - else - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Error: cannot chunk streaming MIME (no HTTP chunking)\n")); - } - } - else - { do - { size_t bufsize; - if (size < sizeof(soap->tmpbuf)) - bufsize = size; - else - bufsize = sizeof(soap->tmpbuf); - if (!(bufsize = soap->fmimeread(soap, handle, soap->tmpbuf, bufsize))) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "fmimeread failed: insufficient data (%lu bytes remaining from %lu bytes)\n", (unsigned long)size, (unsigned long)content->size)); - soap->error = SOAP_EOF; - break; - } - if (soap_send_raw(soap, soap->tmpbuf, bufsize)) - break; - size -= bufsize; - } while (size); - } - if (soap->fmimereadclose) - soap->fmimereadclose(soap, handle); - } - else - { if (soap_putmimehdr(soap, content) - || soap_send_raw(soap, content->ptr, content->size)) - return soap->error; - } - } - return soap_send3(soap, "\r\n--", soap->mime.boundary, "--"); -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_LEANER -#ifndef PALM_1 -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_set_dime(struct soap *soap) -{ soap->omode |= SOAP_ENC_DIME; - soap->dime.first = NULL; - soap->dime.last = NULL; -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_LEANER -#ifndef PALM_1 -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_set_mime(struct soap *soap, const char *boundary, const char *start) -{ soap->omode |= SOAP_ENC_MIME; - soap->mime.first = NULL; - soap->mime.last = NULL; - soap->mime.boundary = soap_strdup(soap, boundary); - soap->mime.start = soap_strdup(soap, start); -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_LEANER -#ifndef PALM_1 -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_clr_dime(struct soap *soap) -{ soap->omode &= ~SOAP_ENC_DIME; - soap->dime.first = NULL; - soap->dime.last = NULL; -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_LEANER -#ifndef PALM_1 -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_clr_mime(struct soap *soap) -{ soap->omode &= ~SOAP_ENC_MIME; - soap->mime.first = NULL; - soap->mime.last = NULL; - soap->mime.boundary = NULL; - soap->mime.start = NULL; -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_LEANER -#ifndef PALM_1 -static struct soap_multipart* -soap_new_multipart(struct soap *soap, struct soap_multipart **first, struct soap_multipart **last, char *ptr, size_t size) -{ struct soap_multipart *content; - content = (struct soap_multipart*)soap_malloc(soap, sizeof(struct soap_multipart)); - if (content) - { content->next = NULL; - content->ptr = ptr; - content->size = size; - content->id = NULL; - content->type = NULL; - content->options = NULL; - content->encoding = SOAP_MIME_NONE; - content->location = NULL; - content->description = NULL; - if (!*first) - *first = content; - if (*last) - (*last)->next = content; - *last = content; - } - return content; -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_LEANER -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_set_dime_attachment(struct soap *soap, char *ptr, size_t size, const char *type, const char *id, unsigned short optype, const char *option) -{ struct soap_multipart *content = soap_new_multipart(soap, &soap->dime.first, &soap->dime.last, ptr, size); - if (!content) - return SOAP_EOM; - content->id = soap_strdup(soap, id); - content->type = soap_strdup(soap, type); - content->options = soap_dime_option(soap, optype, option); - return SOAP_OK; -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_LEANER -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_set_mime_attachment(struct soap *soap, char *ptr, size_t size, enum soap_mime_encoding encoding, const char *type, const char *id, const char *location, const char *description) -{ struct soap_multipart *content = soap_new_multipart(soap, &soap->mime.first, &soap->mime.last, ptr, size); - if (!content) - return SOAP_EOM; - content->id = soap_strdup(soap, id); - content->type = soap_strdup(soap, type); - content->encoding = encoding; - content->location = soap_strdup(soap, location); - content->description = soap_strdup(soap, description); - return SOAP_OK; -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_LEANER -#ifndef PALM_1 -SOAP_FMAC1 -struct soap_multipart* -SOAP_FMAC2 -soap_next_multipart(struct soap_multipart *content) -{ if (content) - return content->next; - return NULL; -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_LEANER -#ifndef PALM_1 -static void -soap_select_mime_boundary(struct soap *soap) -{ while (!soap->mime.boundary || soap_valid_mime_boundary(soap)) - { register char *s = soap->mime.boundary; - register size_t n = 0; - if (s) - n = strlen(s); - if (n < 16) - { n = 64; - s = soap->mime.boundary = (char*)soap_malloc(soap, n + 1); - if (!s) - return; - } - strcpy(s, "=="); - s += 2; - n -= 4; - while (n) - { *s++ = soap_base64o[soap_random & 0x3F]; - n--; - } - strcpy(s, "=="); - } - if (!soap->mime.start) - soap->mime.start = ""; -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_LEANER -#ifndef PALM_1 -static int -soap_valid_mime_boundary(struct soap *soap) -{ register struct soap_multipart *content; - register size_t k; - if (soap->fmimeread) - return SOAP_OK; - k = strlen(soap->mime.boundary); - for (content = soap->mime.first; content; content = content->next) - { if (content->ptr && content->size >= k) - { register const char *p = (const char*)content->ptr; - register size_t i; - for (i = 0; i < content->size - k; i++, p++) - { if (!strncmp(p, soap->mime.boundary, k)) - return SOAP_ERR; - } - } - } - return SOAP_OK; -} -#endif -#endif - -/******************************************************************************\ - * - * HTTP cookie handling - * -\******************************************************************************/ - -#ifdef WITH_COOKIES -/******************************************************************************/ -SOAP_FMAC1 -size_t -SOAP_FMAC2 -soap_encode_cookie(const char *s, char *t, size_t len) -{ register int c; - register size_t n = len; - while ((c = *s++) && --n > 0) - { if (c > ' ' && c < 128 && !strchr("()<>@,;:\\\"/[]?={}", c)) - *t++ = c; - else if (n > 2) - { *t++ = '%'; - *t++ = (c >> 4) + (c > 159 ? '7' : '0'); - c &= 0xF; - *t++ = c + (c > 9 ? '7' : '0'); - n -= 2; - } - else - break; - } - *t = '\0'; - return len - n; -} - -/******************************************************************************/ -SOAP_FMAC1 -struct soap_cookie* -SOAP_FMAC2 -soap_cookie(struct soap *soap, const char *name, const char *domain, const char *path) -{ struct soap_cookie *p; - size_t n; - if (!domain) - domain = soap->cookie_domain; - if (!path) - path = soap->cookie_path; - if (!path) - path = SOAP_STR_EOS; - else if (*path == '/') - path++; - n = strlen(path); - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Search cookie %s domain=%s path=%s\n", name, domain?domain:"(null)", path?path:"(null)")); - for (p = soap->cookies; p; p = p->next) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Cookie in database: %s=%s domain=%s path=%s env=%hd\n", p->name, p->value?p->value:"(null)", p->domain?p->domain:"(null)", p->path?p->path:"(null)", p->env)); - if (!strcmp(p->name, name) - && p->domain - && p->path - && !strcmp(p->domain, domain) - && !strncmp(p->path, path, n)) - break; - } - return p; -} - -/******************************************************************************/ -SOAP_FMAC1 -struct soap_cookie* -SOAP_FMAC2 -soap_set_cookie(struct soap *soap, const char *name, const char *value, const char *domain, const char *path) -{ struct soap_cookie **p, *q; - int n; - if (!domain) - domain = soap->cookie_domain; - if (!path) - path = soap->cookie_path; - if (!path) - path = SOAP_STR_EOS; - else if (*path == '/') - path++; - q = soap_cookie(soap, name, domain, path); - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Set %scookie: %s=%s domain=%s path=%s\n", q ? "" : "new ", name, value?value:"(null)", domain?domain:"(null)", path?path:"(null)")); - if (!q) - { if ((q = (struct soap_cookie*)SOAP_MALLOC(soap, sizeof(struct soap_cookie)))) - { if ((q->name = (char*)SOAP_MALLOC(soap, strlen(name)+1))) - strcpy(q->name, name); - q->value = NULL; - q->domain = NULL; - q->path = NULL; - q->expire = 0; - q->maxage = -1; - q->version = 1; - q->secure = 0; - q->modified = 0; - for (p = &soap->cookies, n = soap->cookie_max; *p && n; p = &(*p)->next, n--) - if (!strcmp((*p)->name, name) && (*p)->path && path && strcmp((*p)->path, path) < 0) - break; - if (n) - { q->next = *p; - *p = q; - } - else - { SOAP_FREE(soap, q->name); - SOAP_FREE(soap, q); - q = NULL; - } - } - } - else - q->modified = 1; - if (q) - { if (q->value) - { SOAP_FREE(soap, q->value); - q->value = NULL; - } - if (q->domain) - { SOAP_FREE(soap, q->domain); - q->domain = NULL; - } - if (q->path) - { SOAP_FREE(soap, q->path); - q->path = NULL; - } - if (value && *value && (q->value = (char*)SOAP_MALLOC(soap, strlen(value)+1))) - strcpy(q->value, value); - if (domain && (q->domain = (char*)SOAP_MALLOC(soap, strlen(domain)+1))) - strcpy(q->domain, domain); - if (path && (q->path = (char*)SOAP_MALLOC(soap, strlen(path)+1))) - strcpy(q->path, path); - q->session = 1; - q->env = 0; - } - return q; -} - -/******************************************************************************/ -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_clr_cookie(struct soap *soap, const char *name, const char *domain, const char *path) -{ struct soap_cookie **p, *q; - if (!domain) - domain = soap->cookie_domain; - if (!domain) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Error in clear cookie %s: cookie domain not set\n", name?name:"(null)")); - return; - } - if (!path) - path = soap->cookie_path; - if (!path) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Error in clear cookie %s: cookie path not set\n", name?name:"(null)")); - return; - } - if (*path == '/') - path++; - for (p = &soap->cookies, q = *p; q; q = *p) - { if (!strcmp(q->name, name) && !strcmp(q->domain, domain) && !strncmp(q->path, path, strlen(q->path))) - { if (q->value) - SOAP_FREE(soap, q->value); - if (q->domain) - SOAP_FREE(soap, q->domain); - if (q->path) - SOAP_FREE(soap, q->path); - *p = q->next; - SOAP_FREE(soap, q); - } - else - p = &q->next; - } -} - -/******************************************************************************/ -SOAP_FMAC1 -char * -SOAP_FMAC2 -soap_cookie_value(struct soap *soap, const char *name, const char *domain, const char *path) -{ struct soap_cookie *p; - if ((p = soap_cookie(soap, name, domain, path))) - return p->value; - return NULL; -} - -/******************************************************************************/ -SOAP_FMAC1 -char * -SOAP_FMAC2 -soap_env_cookie_value(struct soap *soap, const char *name, const char *domain, const char *path) -{ struct soap_cookie *p; - if ((p = soap_cookie(soap, name, domain, path)) && p->env) - return p->value; - return NULL; -} - -/******************************************************************************/ -SOAP_FMAC1 -time_t -SOAP_FMAC2 -soap_cookie_expire(struct soap *soap, const char *name, const char *domain, const char *path) -{ struct soap_cookie *p; - if ((p = soap_cookie(soap, name, domain, path))) - return p->expire; - return -1; -} - -/******************************************************************************/ -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_set_cookie_expire(struct soap *soap, const char *name, long expire, const char *domain, const char *path) -{ struct soap_cookie *p; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Set cookie expiration max-age %ld: %s domain=%s path=%s\n", expire, name, domain?domain:"(null)", path?path:"(null)")); - if ((p = soap_cookie(soap, name, domain, path))) - { p->maxage = expire; - p->modified = 1; - return SOAP_OK; - } - return SOAP_ERR; -} - -/******************************************************************************/ -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_set_cookie_session(struct soap *soap, const char *name, const char *domain, const char *path) -{ struct soap_cookie *p; - if ((p = soap_cookie(soap, name, domain, path))) - { p->session = 1; - p->modified = 1; - return SOAP_OK; - } - return SOAP_ERR; -} - -/******************************************************************************/ -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_clr_cookie_session(struct soap *soap, const char *name, const char *domain, const char *path) -{ struct soap_cookie *p; - if ((p = soap_cookie(soap, name, domain, path))) - { p->session = 0; - p->modified = 1; - return SOAP_OK; - } - return SOAP_ERR; -} - -/******************************************************************************/ -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_putsetcookies(struct soap *soap) -{ struct soap_cookie *p; - char *s, tmp[4096]; - const char *t; - for (p = soap->cookies; p; p = p->next) - { - if (p->modified -#ifdef WITH_OPENSSL - || (!p->env && !soap->ssl == !p->secure) -#endif - ) - { s = tmp; - if (p->name) - s += soap_encode_cookie(p->name, s, tmp-s+4064); - if (p->value && *p->value) - { *s++ = '='; - s += soap_encode_cookie(p->value, s, tmp-s+4064); - } - if (p->domain && (int)strlen(p->domain) < tmp-s+4064) - { strcpy(s, ";Domain="); - strcat(s, p->domain); - } - else if (soap->cookie_domain && (int)strlen(soap->cookie_domain) < tmp-s+4064) - { strcpy(s, ";Domain="); - strcat(s, soap->cookie_domain); - } - strcat(s, ";Path=/"); - s += strlen(s); - if (p->path) - t = p->path; - else - t = soap->cookie_path; - if (t) - { if (*t == '/') - t++; - if ((int)strlen(t) < tmp-s+4064) - { if (strchr(t, '%')) /* already URL encoded? */ - { strcpy(s, t); - s += strlen(s); - } - else - s += soap_encode_cookie(t, s, tmp-s+4064); - } - } - if (p->version > 0 && s-tmp < 4060) - { sprintf(s, ";Version=%u", p->version); - s += strlen(s); - } - if (p->maxage >= 0 && s-tmp < 4060) - { sprintf(s, ";Max-Age=%ld", p->maxage); - s += strlen(s); - } - if (s-tmp < 4073 - && (p->secure -#ifdef WITH_OPENSSL - || soap->ssl -#endif - )) - strcpy(s, ";Secure"); - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Set-Cookie: %s\n", tmp)); - if ((soap->error = soap->fposthdr(soap, "Set-Cookie", tmp))) - return soap->error; - } - } - return SOAP_OK; -} - -/******************************************************************************/ -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_putcookies(struct soap *soap, const char *domain, const char *path, int secure) -{ struct soap_cookie **p, *q; - unsigned int version = 0; - time_t now = time(NULL); - char *s, tmp[4096]; - p = &soap->cookies; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Sending cookies for domain=%s path=%s\n", domain, path)); - if (*path == '/') - path++; - while ((q = *p)) - { if (q->expire && now > q->expire) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Cookie %s expired\n", q->name)); - SOAP_FREE(soap, q->name); - if (q->value) - SOAP_FREE(soap, q->value); - if (q->domain) - SOAP_FREE(soap, q->domain); - if (q->path) - SOAP_FREE(soap, q->path); - *p = q->next; - SOAP_FREE(soap, q); - } - else - { int flag; - char *t = q->domain; - size_t n = 0; - if (!t) - flag = 1; - else - { const char *r = strchr(t, ':'); - if (r) - n = r - t; - else - n = strlen(t); - flag = !strncmp(t, domain, n); - } - /* domain-level cookies */ - if (!flag) - { struct hostent *hostent = gethostbyname(domain); - if (hostent) - { char *r = strchr(hostent->h_name, '.'); - if (!r) - r = hostent->h_name; - flag = !strncmp(t, r, n); - } - } - if (flag - && (!q->path || !strncmp(q->path, path, strlen(q->path))) - && (!q->secure || secure)) - { s = tmp; - if (q->version != version) - { sprintf(s, "$Version=%u;", q->version); - version = q->version; - } - if (q->name) - s += soap_encode_cookie(q->name, s, tmp-s+4080); - if (q->value && *q->value) - { *s++ = '='; - s += soap_encode_cookie(q->value, s, tmp-s+4080); - } - if (q->path && *q->path && (int)strlen(q->path) < tmp-s+4080) - { sprintf(s, ";$Path=\"/%s\"", (*q->path == '/' ? q->path + 1 : q->path)); - s += strlen(s); - } - if (q->domain && (int)strlen(q->domain) < tmp-s+4080) - sprintf(s, ";$Domain=\"%s\"", q->domain); - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Cookie: %s\n", tmp)); - if ((soap->error = soap->fposthdr(soap, "Cookie", tmp))) - return soap->error; - } - p = &q->next; - } - } - return SOAP_OK; -} - -/******************************************************************************/ -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_getcookies(struct soap *soap, const char *val) -{ struct soap_cookie *p = NULL, *q; - const char *s; - char *t, tmp[4096]; /* cookie size is up to 4096 bytes [RFC2109] */ - char *domain = NULL; - char *path = NULL; - unsigned int version = 0; - time_t now = time(NULL); - if (!val) - return; - s = val; - while (*s) - { s = soap_decode_key(tmp, sizeof(tmp), s); - if (!soap_tag_cmp(tmp, "$Version")) - { if ((s = soap_decode_val(tmp, sizeof(tmp), s))) - { if (p) - p->version = (int)atol(tmp); - else - version = (int)atol(tmp); - } - } - else if (!soap_tag_cmp(tmp, "$Path")) - { s = soap_decode_val(tmp, sizeof(tmp), s); - if (*tmp) - { if ((t = (char*)SOAP_MALLOC(soap, strlen(tmp)+1))) - strcpy(t, tmp); - } - else - t = NULL; - if (p) - { if (p->path) - SOAP_FREE(soap, p->path); - p->path = t; - } - else - { if (path) - SOAP_FREE(soap, path); - path = t; - } - } - else if (!soap_tag_cmp(tmp, "$Domain")) - { s = soap_decode_val(tmp, sizeof(tmp), s); - if (*tmp) - { if ((t = (char*)SOAP_MALLOC(soap, strlen(tmp)+1))) - strcpy(t, tmp); - } - else - t = NULL; - if (p) - { if (p->domain) - SOAP_FREE(soap, p->domain); - p->domain = t; - } - else - { if (domain) - SOAP_FREE(soap, domain); - domain = t; - } - } - else if (p && !soap_tag_cmp(tmp, "Path")) - { if (p->path) - SOAP_FREE(soap, p->path); - s = soap_decode_val(tmp, sizeof(tmp), s); - if (*tmp) - { if ((p->path = (char*)SOAP_MALLOC(soap, strlen(tmp)+1))) - strcpy(p->path, tmp); - } - else - p->path = NULL; - } - else if (p && !soap_tag_cmp(tmp, "Domain")) - { if (p->domain) - SOAP_FREE(soap, p->domain); - s = soap_decode_val(tmp, sizeof(tmp), s); - if (*tmp) - { if ((p->domain = (char*)SOAP_MALLOC(soap, strlen(tmp)+1))) - strcpy(p->domain, tmp); - } - else - p->domain = NULL; - } - else if (p && !soap_tag_cmp(tmp, "Version")) - { s = soap_decode_val(tmp, sizeof(tmp), s); - p->version = (unsigned int)atol(tmp); - } - else if (p && !soap_tag_cmp(tmp, "Max-Age")) - { s = soap_decode_val(tmp, sizeof(tmp), s); - p->expire = now + atol(tmp); - } - else if (p && !soap_tag_cmp(tmp, "Expires")) - { struct tm T; - char a[3]; - static const char mns[] = "anebarprayunulugepctovec"; - s = soap_decode_val(tmp, sizeof(tmp), s); - if (strlen(tmp) > 20) - { memset((void*)&T, 0, sizeof(T)); - a[0] = tmp[4]; - a[1] = tmp[5]; - a[2] = '\0'; - T.tm_mday = (int)atol(a); - a[0] = tmp[8]; - a[1] = tmp[9]; - T.tm_mon = (strstr(mns, a) - mns) / 2; - a[0] = tmp[11]; - a[1] = tmp[12]; - T.tm_year = 100 + (int)atol(a); - a[0] = tmp[13]; - a[1] = tmp[14]; - T.tm_hour = (int)atol(a); - a[0] = tmp[16]; - a[1] = tmp[17]; - T.tm_min = (int)atol(a); - a[0] = tmp[19]; - a[1] = tmp[20]; - T.tm_sec = (int)atol(a); - p->expire = soap_timegm(&T); - } - } - else if (p && !soap_tag_cmp(tmp, "Secure")) - p->secure = 1; - else - { if (p) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Got environment cookie %s=%s domain=%s path=%s expire=%ld secure=%d\n", p->name, p->value?p->value:"(null)", p->domain?p->domain:"(null)", p->path?p->path:"(null)", p->expire, p->secure)); - if ((q = soap_set_cookie(soap, p->name, p->value, p->domain, p->path))) - { q->version = p->version; - q->expire = p->expire; - q->secure = p->secure; - q->env = 1; - } - if (p->name) - SOAP_FREE(soap, p->name); - if (p->value) - SOAP_FREE(soap, p->value); - if (p->domain) - SOAP_FREE(soap, p->domain); - if (p->path) - SOAP_FREE(soap, p->path); - SOAP_FREE(soap, p); - } - if ((p = (struct soap_cookie*)SOAP_MALLOC(soap, sizeof(struct soap_cookie)))) - { p->name = (char*)SOAP_MALLOC(soap, strlen(tmp)+1); - strcpy(p->name, tmp); - s = soap_decode_val(tmp, sizeof(tmp), s); - if (*tmp) - { p->value = (char*)SOAP_MALLOC(soap, strlen(tmp)+1); - strcpy(p->value, tmp); - } - else - p->value = NULL; - if (domain) - p->domain = domain; - else if (*soap->host) - { p->domain = (char*)SOAP_MALLOC(soap, strlen(soap->host)+1); - strcpy(p->domain, soap->host); - } - else - p->domain = NULL; - if (path) - p->path = path; - else if (soap->path && *soap->path) - { p->path = (char*)SOAP_MALLOC(soap, strlen(soap->path)+1); - strcpy(p->path, soap->path); - } - else - { p->path = (char*)SOAP_MALLOC(soap, 2); - strcpy(p->path, "/"); - } - p->expire = 0; - p->secure = 0; - p->version = version; - } - } - } - if (p) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Got environment cookie %s=%s domain=%s path=%s expire=%ld secure=%d\n", p->name, p->value?p->value:"(null)", p->domain?p->domain:"(null)", p->path?p->path:"(null)", p->expire, p->secure)); - if ((q = soap_set_cookie(soap, p->name, p->value, p->domain, p->path))) - { q->version = p->version; - q->expire = p->expire; - q->secure = p->secure; - q->env = 1; - } - if (p->name) - SOAP_FREE(soap, p->name); - if (p->value) - SOAP_FREE(soap, p->value); - if (p->domain) - SOAP_FREE(soap, p->domain); - if (p->path) - SOAP_FREE(soap, p->path); - SOAP_FREE(soap, p); - } - if (domain) - SOAP_FREE(soap, domain); - if (path) - SOAP_FREE(soap, path); -} - -/******************************************************************************/ -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_getenv_cookies(struct soap *soap) -{ struct soap_cookie *p; - const char *s; - char key[4096], val[4096]; /* cookie size is up to 4096 bytes [RFC2109] */ - if (!(s = getenv("HTTP_COOKIE"))) - return SOAP_ERR; - do - { s = soap_decode_key(key, sizeof(key), s); - s = soap_decode_val(val, sizeof(val), s); - p = soap_set_cookie(soap, key, val, NULL, NULL); - if (p) - p->env = 1; - } while (*s); - return SOAP_OK; -} - -/******************************************************************************/ -SOAP_FMAC1 -struct soap_cookie* -SOAP_FMAC2 -soap_copy_cookies(struct soap *copy, struct soap *soap) -{ struct soap_cookie *p, **q, *r; - q = &r; - for (p = soap->cookies; p; p = p->next) - { if (!(*q = (struct soap_cookie*)SOAP_MALLOC(copy, sizeof(struct soap_cookie)))) - return r; - **q = *p; - if (p->name) - { if (((*q)->name = (char*)SOAP_MALLOC(copy, strlen(p->name)+1))) - strcpy((*q)->name, p->name); - } - if (p->value) - { if (((*q)->value = (char*)SOAP_MALLOC(copy, strlen(p->value)+1))) - strcpy((*q)->value, p->value); - } - if (p->domain) - { if (((*q)->domain = (char*)SOAP_MALLOC(copy, strlen(p->domain)+1))) - strcpy((*q)->domain, p->domain); - } - if (p->path) - { if (((*q)->path = (char*)SOAP_MALLOC(copy, strlen(p->path)+1))) - strcpy((*q)->path, p->path); - } - q = &(*q)->next; - } - *q = NULL; - return r; -} - -/******************************************************************************/ -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_free_cookies(struct soap *soap) -{ struct soap_cookie *p; - for (p = soap->cookies; p; p = soap->cookies) - { soap->cookies = p->next; - SOAP_FREE(soap, p->name); - if (p->value) - SOAP_FREE(soap, p->value); - if (p->domain) - SOAP_FREE(soap, p->domain); - if (p->path) - SOAP_FREE(soap, p->path); - SOAP_FREE(soap, p); - } -} - -/******************************************************************************/ -#endif /* WITH_COOKIES */ - -/******************************************************************************/ -#ifdef WITH_GZIP -#ifndef PALM_1 -static int -soap_getgziphdr(struct soap *soap) -{ int i; - soap_wchar c = 0, f = 0; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Get gzip header\n")); - for (i = 0; i < 9; i++) - { if ((int)(c = soap_get1(soap) == EOF)) - return soap->error = SOAP_EOF; - if (i == 2) - f = c; - } - if (f & 0x04) /* FEXTRA */ - { for (i = soap_get1(soap) | (soap_get1(soap) << 8); i; i--) - { if ((int)soap_get1(soap) == EOF) - return soap->error = SOAP_EOF; - } - } - if (f & 0x08) /* FNAME */ - { do - c = soap_get1(soap); - while (c && (int)c != EOF); - } - if ((int)c != EOF && (f & 0x10)) /* FCOMMENT */ - { do - c = soap_get1(soap); - while (c && (int)c != EOF); - } - if ((int)c != EOF && (f & 0x01)) /* FHCRC */ - { if ((int)(c = soap_get1(soap)) != EOF) - c = soap_get1(soap); - } - if ((int)c == EOF) - return soap->error = SOAP_EOF; - return SOAP_OK; -} -#endif -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_begin_recv(struct soap *soap) -{ soap_wchar c; - soap->error = SOAP_OK; - soap_free_temp(soap); - soap_set_local_namespaces(soap); - soap->version = 0; /* don't assume we're parsing SOAP content by default */ -#ifndef WITH_NOIDREF - soap_free_iht(soap); -#endif - if ((soap->imode & SOAP_IO) == SOAP_IO_CHUNK) - soap->omode |= SOAP_IO_CHUNK; - soap->imode &= ~SOAP_IO; - soap->mode = soap->imode; - if (!soap->keep_alive) - { soap->buflen = 0; - soap->bufidx = 0; - } - if (!(soap->mode & SOAP_IO_KEEPALIVE)) - soap->keep_alive = 0; - soap->ahead = 0; - soap->peeked = 0; - soap->level = 0; - soap->part = SOAP_BEGIN; - soap->alloced = 0; - soap->count = 0; - soap->length = 0; - soap->cdata = 0; - *soap->endpoint = '\0'; - soap->action = NULL; - soap->status = 0; -#ifndef WITH_LEANER - soap->dom = NULL; - soap->dime.chunksize = 0; - soap->dime.buflen = 0; - soap->dime.list = NULL; - soap->dime.first = NULL; - soap->dime.last = NULL; - soap->mime.list = NULL; - soap->mime.first = NULL; - soap->mime.last = NULL; - soap->mime.boundary = NULL; - soap->mime.start = NULL; - soap->xlist = NULL; -#endif -#ifdef WIN32 -#ifndef UNDER_CE -#ifndef WITH_FASTCGI - if (!soap_valid_socket(soap->socket)) -#ifdef __BORLANDC__ - setmode((SOAP_SOCKET)soap->recvfd, O_BINARY); -#else - _setmode((SOAP_SOCKET)soap->recvfd, _O_BINARY); -#endif -#endif -#endif -#endif -#ifdef WITH_ZLIB - soap->mode &= ~SOAP_ENC_ZLIB; - soap->zlib_in = SOAP_ZLIB_NONE; - soap->zlib_out = SOAP_ZLIB_NONE; - soap->d_stream.next_in = Z_NULL; - soap->d_stream.avail_in = 0; - soap->d_stream.next_out = (Byte*)soap->buf; - soap->d_stream.avail_out = SOAP_BUFLEN; - soap->z_ratio_in = 1.0; -#endif -#ifndef WITH_LEANER - if (soap->fprepareinit) - soap->fprepareinit(soap); -#endif - c = soap_getchar(soap); -#ifdef WITH_GZIP - if (c == 0x1F) - { if (soap_getgziphdr(soap)) - return soap->error; - if (inflateInit2(&soap->d_stream, -MAX_WBITS) != Z_OK) - return soap->error = SOAP_ZLIB_ERROR; - soap->zlib_state = SOAP_ZLIB_INFLATE; - soap->mode |= SOAP_ENC_ZLIB; - soap->zlib_in = SOAP_ZLIB_GZIP; - soap->z_crc = crc32(0L, NULL, 0); - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "gzip initialized\n")); - memcpy(soap->z_buf, soap->buf, SOAP_BUFLEN); - /* should not chunk over plain transport, so why bother to check? */ - /* if ((soap->mode & SOAP_IO) == SOAP_IO_CHUNK) */ - /* soap->z_buflen = soap->bufidx; */ - /* else */ - soap->d_stream.next_in = (Byte*)(soap->z_buf + soap->bufidx); - soap->d_stream.avail_in = soap->buflen - soap->bufidx; - soap->z_buflen = soap->buflen; - soap->buflen = soap->bufidx; - c = soap_getchar(soap); - } -#endif -#ifndef WITH_LEANER - if (c == '-' && soap_get0(soap) == '-') - soap->mode |= SOAP_ENC_MIME; - else if ((c & 0xFFFC) == (SOAP_DIME_VERSION | SOAP_DIME_MB) && (soap_get0(soap) & 0xFFF0) == 0x20) - soap->mode |= SOAP_ENC_DIME; - else -#endif - { while (soap_blank(c)) - c = soap_getchar(soap); - } - if ((int)c == EOF) - return soap->error = SOAP_EOF; - soap_unget(soap, c); -#ifndef WITH_NOHTTP - /* if not XML or (start of)BOM or MIME/DIME/ZLIB, assume HTTP header */ - if (c != '<' && c != 0xEF && !(soap->mode & (SOAP_ENC_MIME | SOAP_ENC_DIME | SOAP_ENC_ZLIB))) - { soap->mode &= ~SOAP_IO; - soap->error = soap->fparse(soap); - if (soap->error && soap->error < SOAP_STOP) - { soap->keep_alive = 0; /* force close later */ - return soap->error; - } - if (soap->error == SOAP_STOP) - return soap->error; - if ((soap->mode & SOAP_IO) == SOAP_IO_CHUNK) - { soap->chunkbuflen = soap->buflen; - soap->buflen = soap->bufidx; - soap->chunksize = 0; - } -#ifndef WITH_LEANER - else if (soap->fpreparerecv && soap->buflen != soap->bufidx) - soap->fpreparerecv(soap, soap->buf + soap->bufidx, soap->buflen - soap->bufidx); -#endif - /* Note: fparse should not use soap_unget to push back last char */ - if (soap_get0(soap) == (int)EOF) - { if (soap->status == 200) - return soap->error = SOAP_NO_DATA; - return soap->error = soap->status; - } -#ifdef WITH_ZLIB - if (soap->zlib_in != SOAP_ZLIB_NONE) -#ifdef WITH_GZIP - { c = soap_get1(soap); - if (c == 0x1F) - { if (soap_getgziphdr(soap)) - return soap->error; - if (inflateInit2(&soap->d_stream, -MAX_WBITS) != Z_OK) - return soap->error = SOAP_ZLIB_ERROR; - soap->zlib_state = SOAP_ZLIB_INFLATE; - soap->z_crc = crc32(0L, NULL, 0); - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "gzip initialized\n")); - } - else - { soap_revget1(soap); -#else - { -#endif - if (inflateInit(&soap->d_stream) != Z_OK) - return soap->error = SOAP_ZLIB_ERROR; - soap->zlib_state = SOAP_ZLIB_INFLATE; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Inflate initialized\n")); - } - soap->mode |= SOAP_ENC_ZLIB; - memcpy(soap->z_buf, soap->buf, SOAP_BUFLEN); - soap->d_stream.next_in = (Byte*)(soap->z_buf + soap->bufidx); - soap->d_stream.avail_in = soap->buflen - soap->bufidx; - soap->z_buflen = soap->buflen; - soap->buflen = soap->bufidx; - } -#endif - if (soap->error) - { if (soap->error == SOAP_FORM && soap->fform) - { soap->error = soap->fform(soap); - if (soap->error == SOAP_OK) - soap->error = SOAP_STOP; /* prevents further processing */ - } - return soap->error; - } - } -#endif -#ifndef WITH_LEANER - if (soap->mode & SOAP_ENC_MIME) - { if (soap_getmimehdr(soap)) - return soap->error; - if (soap->mime.start) - { do - { if (!soap->mime.last->id) - break; - if (!soap_match_cid(soap, soap->mime.start, soap->mime.last->id)) - break; - } while (soap_get_mime_attachment(soap, NULL)); - } - if (soap_get_header_attribute(soap, soap->mime.first->type, "application/dime")) - soap->mode |= SOAP_ENC_DIME; - } - if (soap->mode & SOAP_ENC_DIME) - { if (soap_getdimehdr(soap)) - return soap->error; - if (soap->dime.flags & SOAP_DIME_CF) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Chunked DIME SOAP message\n")); - soap->dime.chunksize = soap->dime.size; - if (soap->buflen - soap->bufidx >= soap->dime.chunksize) - { soap->dime.buflen = soap->buflen; - soap->buflen = soap->bufidx + soap->dime.chunksize; - } - else - soap->dime.chunksize -= soap->buflen - soap->bufidx; - } - soap->count = soap->buflen - soap->bufidx; - } -#endif - return SOAP_OK; -} -#endif - -/******************************************************************************/ -#ifndef WITH_NOHTTP -#ifndef PALM_1 -static int -http_parse(struct soap *soap) -{ char header[SOAP_HDRLEN], *s; - unsigned short get = 0, status = 0, k = 0; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Waiting for HTTP request/response...\n")); - *soap->endpoint = '\0'; - soap->length = 0; - soap->userid = NULL; - soap->passwd = NULL; - soap->action = NULL; - soap->authrealm = NULL; - do - { if (soap_getline(soap, soap->msgbuf, sizeof(soap->msgbuf))) - return soap->error; - DBGLOG(TEST,SOAP_MESSAGE(fdebug, "HTTP status: %s\n", soap->msgbuf)); - for (;;) - { if (soap_getline(soap, header, SOAP_HDRLEN)) - { if (soap->error == SOAP_EOF) - { soap->error = SOAP_OK; - DBGLOG(TEST,SOAP_MESSAGE(fdebug, "EOF in HTTP header, continue anyway\n")); - break; - } - return soap->error; - } - if (!*header) - break; - DBGLOG(TEST,SOAP_MESSAGE(fdebug, "HTTP header: %s\n", header)); - s = strchr(header, ':'); - if (s) - { *s = '\0'; - do s++; - while (*s && *s <= 32); - if ((soap->error = soap->fparsehdr(soap, header, s))) - { if (soap->error < SOAP_STOP) - return soap->error; - status = soap->error; - soap->error = SOAP_OK; - } - } - } - if ((s = strchr(soap->msgbuf, ' '))) - { k = (unsigned short)soap_strtoul(s, &s, 10); - if (!soap_blank(*s)) - k = 0; - } - else - k = 0; - } while (k == 100); - DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Finished HTTP header parsing, status = %d\n", k)); - s = strstr(soap->msgbuf, "HTTP/"); - if (s && s[7] != '1') - { if (soap->keep_alive == 1) - soap->keep_alive = 0; - if (k == 0 && (soap->omode & SOAP_IO) == SOAP_IO_CHUNK) /* k == 0 for HTTP request */ - { soap->imode |= SOAP_IO_CHUNK; - soap->omode = (soap->omode & ~SOAP_IO) | SOAP_IO_STORE; - } - } - if (soap->keep_alive < 0) - soap->keep_alive = 1; - DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Keep alive connection = %d\n", soap->keep_alive)); - if (s && (((get = !strncmp(soap->msgbuf, "GET ", 4))) || !strncmp(soap->msgbuf, "POST ", 5))) - { size_t m = strlen(soap->endpoint); - size_t n = m + (s - soap->msgbuf) - 5 - (!get); - if (m > n) - m = n; - if (n >= sizeof(soap->endpoint)) - n = sizeof(soap->endpoint) - 1; - strncpy(soap->path, soap->msgbuf + 4 + (!get), n - m); - soap->path[n - m] = '\0'; - strcat(soap->endpoint, soap->path); - DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Target endpoint='%s'\n", soap->endpoint)); - if (get) - { soap->error = soap->fget(soap); - if (soap->error == SOAP_OK) - soap->error = SOAP_STOP; /* prevents further processing */ - return soap->error; - } - if (status) - return soap->error = status; - } - soap->status = k; - if (k == 0 || k == 200 || (((k > 200 && k <= 299) || k == 400 || k == 500) && ((soap->mode & SOAP_IO) == SOAP_IO_CHUNK || soap->length > 0))) - return SOAP_OK; - DBGLOG(TEST,SOAP_MESSAGE(fdebug, "HTTP error %d\n", k)); - return soap_set_receiver_error(soap, "HTTP Error", soap->msgbuf, k); -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_NOHTTP -#ifndef PALM_1 -static int -http_parse_header(struct soap *soap, const char *key, const char *val) -{ if (!soap_tag_cmp(key, "Host")) - { -#ifdef WITH_OPENSSL - if (soap->imode & SOAP_ENC_SSL) - strcpy(soap->endpoint, "https://"); - else -#endif - strcpy(soap->endpoint, "http://"); - strncat(soap->endpoint, val, sizeof(soap->endpoint) - 8); - soap->endpoint[sizeof(soap->endpoint) - 1] = '\0'; - } -#ifndef WITH_LEANER - else if (!soap_tag_cmp(key, "Content-Type")) - { soap->http_content = soap_strdup(soap, val); - if (soap_get_header_attribute(soap, val, "application/dime")) - soap->mode |= SOAP_ENC_DIME; - else if (soap_get_header_attribute(soap, val, "multipart/related") - || soap_get_header_attribute(soap, val, "multipart/form-data")) - { soap->mime.boundary = soap_strdup(soap, soap_get_header_attribute(soap, val, "boundary")); - soap->mime.start = soap_strdup(soap, soap_get_header_attribute(soap, val, "start")); - soap->mode |= SOAP_ENC_MIME; - } - } -#endif - else if (!soap_tag_cmp(key, "Content-Length")) - soap->length = soap_strtoul(val, NULL, 10); - else if (!soap_tag_cmp(key, "Content-Encoding")) - { if (!soap_tag_cmp(val, "deflate")) -#ifdef WITH_ZLIB - soap->zlib_in = SOAP_ZLIB_DEFLATE; -#else - return SOAP_ZLIB_ERROR; -#endif - else if (!soap_tag_cmp(val, "gzip")) -#ifdef WITH_GZIP - soap->zlib_in = SOAP_ZLIB_GZIP; -#else - return SOAP_ZLIB_ERROR; -#endif - } -#ifdef WITH_ZLIB - else if (!soap_tag_cmp(key, "Accept-Encoding")) - { -#ifdef WITH_GZIP - if (strchr(val, '*') || soap_get_header_attribute(soap, val, "gzip")) - soap->zlib_out = SOAP_ZLIB_GZIP; - else -#endif - if (strchr(val, '*') || soap_get_header_attribute(soap, val, "deflate")) - soap->zlib_out = SOAP_ZLIB_DEFLATE; - else - soap->zlib_out = SOAP_ZLIB_NONE; - } -#endif - else if (!soap_tag_cmp(key, "Transfer-Encoding")) - { soap->mode &= ~SOAP_IO; - if (!soap_tag_cmp(val, "chunked")) - soap->mode |= SOAP_IO_CHUNK; - } - else if (!soap_tag_cmp(key, "Connection")) - { if (!soap_tag_cmp(val, "keep-alive")) - soap->keep_alive = -soap->keep_alive; - else if (!soap_tag_cmp(val, "close")) - soap->keep_alive = 0; - } -#ifndef WITH_LEAN - else if (!soap_tag_cmp(key, "Authorization")) - { if (!soap_tag_cmp(val, "Basic *")) - { int n; - char *s; - soap_base642s(soap, val + 6, soap->tmpbuf, sizeof(soap->tmpbuf) - 1, &n); - soap->tmpbuf[n] = '\0'; - if ((s = strchr(soap->tmpbuf, ':'))) - { *s = '\0'; - soap->userid = soap_strdup(soap, soap->tmpbuf); - soap->passwd = soap_strdup(soap, s + 1); - } - } - } - else if (!soap_tag_cmp(key, "WWW-Authenticate")) - soap->authrealm = soap_strdup(soap, soap_get_header_attribute(soap, val + 6, "realm")); - else if (!soap_tag_cmp(key, "Expect")) - { if (!soap_tag_cmp(val, "100-continue")) - { if ((soap->error = soap->fposthdr(soap, "HTTP/1.1 100 Continue", NULL)) - || (soap->error = soap->fposthdr(soap, NULL, NULL))) - return soap->error; - } - } -#endif - else if (!soap_tag_cmp(key, "SOAPAction")) - { if (*val == '"') - { soap->action = soap_strdup(soap, val + 1); - soap->action[strlen(soap->action) - 1] = '\0'; - } - } - else if (!soap_tag_cmp(key, "Location")) - { strncpy(soap->endpoint, val, sizeof(soap->endpoint)); - soap->endpoint[sizeof(soap->endpoint) - 1] = '\0'; - } -#ifdef WITH_COOKIES - else if (!soap_tag_cmp(key, "Cookie") - || !soap_tag_cmp(key, "Cookie2") - || !soap_tag_cmp(key, "Set-Cookie") - || !soap_tag_cmp(key, "Set-Cookie2")) - soap_getcookies(soap, val); -#endif - return SOAP_OK; -} -#endif -#endif - -/******************************************************************************/ -#if !defined(WITH_NOHTTP) || !defined(WITH_LEANER) -#ifndef PALM_1 -SOAP_FMAC1 -const char* -SOAP_FMAC2 -soap_get_header_attribute(struct soap *soap, const char *line, const char *key) -{ register const char *s = line; - if (s) - { while (*s) - { register short flag; - s = soap_decode_key(soap->tmpbuf, sizeof(soap->tmpbuf), s); - flag = soap_tag_cmp(soap->tmpbuf, key); - s = soap_decode_val(soap->tmpbuf, sizeof(soap->tmpbuf), s); - if (!flag) - return soap->tmpbuf; - } - } - return NULL; -} -#endif -#endif - -/******************************************************************************/ -#if !defined(WITH_NOHTTP) || !defined(WITH_LEANER) -#ifndef PALM_1 -SOAP_FMAC1 -const char* -SOAP_FMAC2 -soap_decode_key(char *buf, size_t len, const char *val) -{ return soap_decode(buf, len, val, "=,;"); -} -#endif -#endif - -/******************************************************************************/ -#if !defined(WITH_NOHTTP) || !defined(WITH_LEANER) -#ifndef PALM_1 -SOAP_FMAC1 -const char* -SOAP_FMAC2 -soap_decode_val(char *buf, size_t len, const char *val) -{ if (*val != '=') - { *buf = '\0'; - return val; - } - return soap_decode(buf, len, val + 1, ",;"); -} -#endif -#endif - -/******************************************************************************/ -#if !defined(WITH_NOHTTP) || !defined(WITH_LEANER) -#ifndef PALM_1 -static const char* -soap_decode(char *buf, size_t len, const char *val, const char *sep) -{ const char *s; - char *t = buf; - for (s = val; *s; s++) - if (*s != ' ' && *s != '\t' && !strchr(sep, *s)) - break; - if (*s == '"') - { s++; - while (*s && *s != '"' && --len) - *t++ = *s++; - } - else - { while (soap_notblank(*s) && !strchr(sep, *s) && --len) - { if (*s == '%') - { *t++ = ((s[1] >= 'A' ? (s[1] & 0x7) + 9 : s[1] - '0') << 4) - + (s[2] >= 'A' ? (s[2] & 0x7) + 9 : s[2] - '0'); - s += 3; - } - else - *t++ = *s++; - } - } - *t = '\0'; - while (*s && !strchr(sep, *s)) - s++; - return s; -} -#endif -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_envelope_begin_out(struct soap *soap) -{ -#ifndef WITH_LEANER - size_t n = 0; - if ((soap->mode & SOAP_ENC_MIME) && soap->mime.boundary && soap->mime.start && strlen(soap->mime.boundary) + strlen(soap->mime.start) < sizeof(soap->tmpbuf) - 80 ) - { const char *s; - if ((soap->mode & SOAP_ENC_DIME) && !(soap->mode & SOAP_ENC_MTOM)) - s = "application/dime"; - else if (soap->version == 2) - { if (soap->mode & SOAP_ENC_MTOM) - s = "application/xop+xml; charset=utf-8; type=application/soap+xml"; - else - s = "application/soap+xml; charset=utf-8"; - } - else - s = "text/xml; charset=utf-8"; - sprintf(soap->tmpbuf, "--%s\r\nContent-Type: %s\r\nContent-Transfer-Encoding: binary\r\nContent-ID: %s\r\n\r\n", soap->mime.boundary, s, soap->mime.start); - n = strlen(soap->tmpbuf); - if (soap_send_raw(soap, soap->tmpbuf, n)) - return soap->error; - } - if (soap->mode & SOAP_IO_LENGTH) - soap->dime.size = soap->count; /* DIME in MIME correction */ - if (!(soap->mode & SOAP_IO_LENGTH) && (soap->mode & SOAP_ENC_DIME)) - { if (soap_putdimehdr(soap)) - return soap->error; - } -#endif - soap->part = SOAP_IN_ENVELOPE; - return soap_element_begin_out(soap, "SOAP-ENV:Envelope", 0, NULL); -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_envelope_end_out(struct soap *soap) -{ if (soap_element_end_out(soap, "SOAP-ENV:Envelope")) - return soap->error; -#ifndef WITH_LEANER - if ((soap->mode & SOAP_IO_LENGTH) && (soap->mode & SOAP_ENC_DIME) && !(soap->mode & SOAP_ENC_MTOM)) - { soap->dime.size = soap->count - soap->dime.size; /* DIME in MIME correction */ - sprintf(soap->id, soap->dime_id_format, 0); - soap->dime.id = soap->id; - if (soap->local_namespaces) - { if (soap->local_namespaces[0].out) - soap->dime.type = (char*)soap->local_namespaces[0].out; - else - soap->dime.type = (char*)soap->local_namespaces[0].ns; - } - soap->dime.options = NULL; - soap->dime.flags = SOAP_DIME_MB | SOAP_DIME_ABSURI; - if (!soap->dime.first) - soap->dime.flags |= SOAP_DIME_ME; - soap->count += 12 + ((strlen(soap->dime.id)+3)&(~3)) + (soap->dime.type ? ((strlen(soap->dime.type)+3)&(~3)) : 0); - } - if ((soap->mode & SOAP_ENC_DIME) && !(soap->mode & SOAP_ENC_MTOM)) - return soap_send_raw(soap, SOAP_STR_PADDING, -(long)soap->dime.size&3); -#endif - soap->part = SOAP_END_ENVELOPE; - return SOAP_OK; -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_envelope_begin_in(struct soap *soap) -{ register struct Namespace *p; - soap->part = SOAP_IN_ENVELOPE; - if (soap_element_begin_in(soap, "SOAP-ENV:Envelope", 0, NULL)) - { -#ifndef WITH_LEAN - if (!soap_element_begin_in(soap, "html", 0, NULL)) - { /* get HTML from buffer, stop receiving to avoid HTML parsing issues */ - char *s; -#ifndef WITH_NOIO - size_t (*f)(struct soap*, char*, size_t) = soap->frecv; - soap->frecv = frecv_stop; -#endif - soap_revert(soap); - s = soap_string_in(soap, 1, -1, -1); -#ifndef WITH_NOIO - soap->frecv = f; -#endif - return soap_set_receiver_error(soap, "HTTP Error", s, SOAP_HTTP_ERROR); - } -#endif - return soap->error = SOAP_VERSIONMISMATCH; - } - p = soap->local_namespaces; - if (p) - { const char *ns = p[0].out; - if (!ns) - ns = p[0].ns; - if (!strcmp(ns, soap_env1)) - { soap->version = 1; /* make sure we use SOAP 1.1 */ - if (p[1].out) - SOAP_FREE(soap, p[1].out); - if ((p[1].out = (char*)SOAP_MALLOC(soap, sizeof(soap_enc1)))) - strcpy(p[1].out, soap_enc1); - } - else if (!strcmp(ns, soap_env2)) - { soap->version = 2; /* make sure we use SOAP 1.2 */ - if (p[1].out) - SOAP_FREE(soap, p[1].out); - if ((p[1].out = (char*)SOAP_MALLOC(soap, sizeof(soap_enc2)))) - strcpy(p[1].out, soap_enc2); - } - } - return SOAP_OK; -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_envelope_end_in(struct soap *soap) -{ soap->part = SOAP_END_ENVELOPE; - return soap_element_end_in(soap, "SOAP-ENV:Envelope"); -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_body_begin_out(struct soap *soap) -{ soap->part = SOAP_IN_BODY; - if (soap->version == 1) - soap->encoding = 1; -#ifndef WITH_LEAN - if ((soap->mode & SOAP_XML_SEC) && soap_set_attr(soap, "wsu:Id", "Body")) - return soap->error; -#endif - if (soap_element(soap, "SOAP-ENV:Body", 0, NULL)) - return soap->error; - return soap_element_start_end_out(soap, NULL); -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_body_end_out(struct soap *soap) -{ if (soap_element_end_out(soap, "SOAP-ENV:Body")) - return soap->error; - soap->part = SOAP_END_BODY; - return SOAP_OK; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_body_begin_in(struct soap *soap) -{ soap->part = SOAP_IN_BODY; - if (soap_element_begin_in(soap, "SOAP-ENV:Body", 0, NULL)) - return soap->error; - if (!soap->body) - soap->part = SOAP_NO_BODY; - return SOAP_OK; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_body_end_in(struct soap *soap) -{ if (soap->part == SOAP_NO_BODY) - return SOAP_OK; - soap->part = SOAP_END_BODY; - return soap_element_end_in(soap, "SOAP-ENV:Body"); -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_recv_header(struct soap *soap) -{ if (soap_getheader(soap) && soap->error == SOAP_TAG_MISMATCH) - soap->error = SOAP_OK; - else if (soap->error == SOAP_OK && soap->fheader) - soap->error = soap->fheader(soap); - return soap->error; -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_set_endpoint(struct soap *soap, const char *endpoint) -{ register const char *s; - register size_t i, n; - soap->endpoint[0] = '\0'; - soap->host[0] = '\0'; - soap->path[0] = '/'; - soap->path[1] = '\0'; - soap->port = 80; - if (!endpoint || !*endpoint) - return; -#ifdef WITH_OPENSSL - if (!soap_tag_cmp(endpoint, "https:*")) - soap->port = 443; -#endif - strncpy(soap->endpoint, endpoint, sizeof(soap->endpoint) - 1); - soap->endpoint[sizeof(soap->endpoint) - 1] = '\0'; - s = strchr(endpoint, ':'); - if (s && s[1] == '/' && s[2] == '/') - s += 3; - else - s = endpoint; - n = strlen(s); - if (n >= sizeof(soap->host)) - n = sizeof(soap->host) - 1; -#ifdef WITH_IPV6 - if (s[0] == '[') - { s++; - for (i = 0; i < n; i++) - { soap->host[i] = s[i]; - if (s[i] == ']') - { s++; - break; - } - } - } - else - { for (i = 0; i < n; i++) - { soap->host[i] = s[i]; - if (s[i] == '/' || s[i] == ':') - break; - } - } -#else - for (i = 0; i < n; i++) - { soap->host[i] = s[i]; - if (s[i] == '/' || s[i] == ':') - break; - } -#endif - soap->host[i] = '\0'; - if (s[i] == ':') - { soap->port = (int)atol(s + i + 1); - for (i++; i < n; i++) - if (s[i] == '/') - break; - } - if (s[i]) - { strncpy(soap->path, s + i, sizeof(soap->path)); - soap->path[sizeof(soap->path) - 1] = '\0'; - } -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_connect(struct soap *soap, const char *endpoint, const char *action) -{ return soap_connect_command(soap, SOAP_POST, endpoint, action); -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_connect_command(struct soap *soap, int http_command, const char *endpoint, const char *action) -{ char host[sizeof(soap->host)]; - int port; - size_t count; - soap->error = SOAP_OK; - strcpy(host, soap->host); /* save to compare */ - port = soap->port; /* save to compare */ - soap_set_endpoint(soap, endpoint); -#ifndef WITH_LEANER - if (soap->fconnect) - { if ((soap->error = soap->fconnect(soap, endpoint, soap->host, soap->port))) - return soap->error; - } - else -#endif - if (soap->fopen && *soap->host) - { soap->status = http_command; - if (!soap->keep_alive || !soap_valid_socket(soap->socket) || strcmp(soap->host, host) || soap->port != port || !soap->fpoll || soap->fpoll(soap)) - { soap->keep_alive = 0; /* to force close */ - soap->omode &= ~SOAP_IO_UDP; /* to force close */ - soap_closesock(soap); - DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Connect/reconnect to host='%s' path='%s' port=%d\n", soap->host, soap->path, soap->port)); -#ifdef WITH_UDP - if (!strncmp(endpoint, "soap.udp:", 9)) - soap->omode |= SOAP_IO_UDP; -#endif - soap->socket = soap->fopen(soap, endpoint, soap->host, soap->port); - if (soap->error) - return soap->error; - soap->keep_alive = ((soap->omode & SOAP_IO_KEEPALIVE) != 0); - } - } - count = soap_count_attachments(soap); - if (soap_begin_send(soap)) - return soap->error; - if (http_command != SOAP_POST) - { soap->mode &= ~SOAP_IO; - soap->mode |= SOAP_IO_BUFFER; - } -#ifndef WITH_NOHTTP - soap->action = soap_strdup(soap, action); - if ((soap->mode & SOAP_IO) != SOAP_IO_STORE && !(soap->mode & SOAP_ENC_XML) && endpoint) - { unsigned int k = soap->mode; - soap->mode &= ~(SOAP_IO | SOAP_ENC_ZLIB); - if ((k & SOAP_IO) != SOAP_IO_FLUSH) - soap->mode |= SOAP_IO_BUFFER; - if ((soap->error = soap->fpost(soap, endpoint, soap->host, soap->port, soap->path, action, count))) - return soap->error; -#ifndef WITH_LEANER - if ((k & SOAP_IO) == SOAP_IO_CHUNK) - { if (soap_flush(soap)) - return soap->error; - } -#endif - soap->mode = k; - } - if (http_command != SOAP_POST) - return soap_end_send(soap); -#endif - return SOAP_OK; -} -#endif - -/******************************************************************************/ -#ifndef WITH_LEAN -SOAP_FMAC1 -char* -SOAP_FMAC2 -soap_s2base64(struct soap *soap, const unsigned char *s, char *t, int n) -{ register int i; - register unsigned long m; - register char *p; - if (!t) - t = (char*)soap_malloc(soap, (n + 2) / 3 * 4 + 1); - if (!t) - { soap->error = SOAP_EOM; - return NULL; - } - p = t; - t[0] = '\0'; - if (!s) - return p; - for (; n > 2; n -= 3, s += 3) - { m = s[0]; - m = (m << 8) | s[1]; - m = (m << 8) | s[2]; - for (i = 4; i > 0; m >>= 6) - t[--i] = soap_base64o[m & 0x3F]; - t += 4; - } - t[0] = '\0'; - if (n > 0) - { m = 0; - for (i = 0; i < n; i++) - m = (m << 8) | *s++; - for (; i < 3; i++) - m <<= 8; - for (i++; i > 0; m >>= 6) - t[--i] = soap_base64o[m & 0x3F]; - for (i = 3; i > n; i--) - t[i] = '='; - t[4] = '\0'; - } - return p; -} -#endif - -/******************************************************************************/ -#ifndef WITH_LEAN -SOAP_FMAC1 -const char* -SOAP_FMAC2 -soap_base642s(struct soap *soap, const char *s, char *t, size_t l, int *n) -{ register int i, j, c; - register unsigned long m; - register const char *p; - if (!s || !*s) - { if (n) - *n = 0; - if (soap->error) - return NULL; - return SOAP_NON_NULL; - } - if (!t) - { l = (strlen(s) + 3) / 4 * 3; - t = (char*)soap_malloc(soap, l); - } - if (!t) - { soap->error = SOAP_EOM; - return NULL; - } - p = t; - if (n) - *n = 0; - for (;;) - { for (i = 0; i < SOAP_BLKLEN; i++) - { m = 0; - j = 0; - while (j < 4) - { c = *s++; - if (c == '=' || !c) - { i *= 3; - switch (j) - { case 2: - *t++ = (char)((m >> 4) & 0xFF); - i++; - break; - case 3: - *t++ = (char)((m >> 10) & 0xFF); - *t++ = (char)((m >> 2) & 0xFF); - i += 2; - } - if (n) - *n += i; - return p; - } - c -= '+'; - if (c >= 0 && c <= 79) - { int b = soap_base64i[c]; - if (b >= 64) - { soap->error = SOAP_TYPE; - return NULL; - } - m = (m << 6) + b; - j++; - } - else if (!soap_blank(c + '+')) - { soap->error = SOAP_TYPE; - return NULL; - } - } - *t++ = (char)((m >> 16) & 0xFF); - *t++ = (char)((m >> 8) & 0xFF); - *t++ = (char)(m & 0xFF); - if (l < 3) - { if (n) - *n += i; - return p; - } - l -= 3; - } - if (n) - *n += 3 * SOAP_BLKLEN; - } -} -#endif - -/******************************************************************************/ -#ifndef WITH_LEAN -SOAP_FMAC1 -char* -SOAP_FMAC2 -soap_s2hex(struct soap *soap, const unsigned char *s, char *t, int n) -{ register char *p; - if (!t) - t = (char*)soap_malloc(soap, 2 * n + 1); - if (!t) - { soap->error = SOAP_EOM; - return NULL; - } - p = t; - t[0] = '\0'; - if (s) - { for (; n > 0; n--) - { register int m = *s++; - *t++ = (char)((m >> 4) + (m > 159 ? 'a' - 10 : '0')); - m &= 0x0F; - *t++ = (char)(m + (m > 9 ? 'a' - 10 : '0')); - } - } - *t++ = '\0'; - return p; -} -#endif - -/******************************************************************************/ -#ifndef WITH_LEAN -SOAP_FMAC1 -const char* -SOAP_FMAC2 -soap_hex2s(struct soap *soap, const char *s, char *t, size_t l, int *n) -{ register const char *p; - if (!s || !*s) - { if (n) - *n = 0; - if (soap->error) - return NULL; - return SOAP_NON_NULL; - } - if (!t) - { l = strlen(s) / 2; - t = (char*)soap_malloc(soap, l); - } - if (!t) - { soap->error = SOAP_EOM; - return NULL; - } - p = t; - while (l) - { register int d1, d2; - d1 = *s++; - if (!d1) - break; - d2 = *s++; - if (!d2) - break; - *t++ = ((d1 >= 'A' ? (d1 & 0x7) + 9 : d1 - '0') << 4) + (d2 >= 'A' ? (d2 & 0x7) + 9 : d2 - '0'); - l--; - } - if (n) - *n = t - p; - return p; -} -#endif - -/******************************************************************************/ -#ifndef WITH_NOHTTP -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_puthttphdr(struct soap *soap, int status, size_t count) -{ if (soap->status != SOAP_GET) - { register const char *s = "text/xml; charset=utf-8"; - register int err = SOAP_OK; -#ifndef WITH_LEANER - register const char *r = NULL; -#endif - if (status == SOAP_FILE && soap->http_content) - s = soap->http_content; - else if (status == SOAP_HTML) - s = "text/html; charset=utf-8"; - else if (count || ((soap->omode & SOAP_IO) == SOAP_IO_CHUNK)) - { if (soap->version == 2) - s = "application/soap+xml; charset=utf-8"; - } -#ifndef WITH_LEANER - if (soap->mode & (SOAP_ENC_DIME | SOAP_ENC_MTOM)) - { if (soap->mode & SOAP_ENC_MTOM) - { r = s; - s = "application/xop+xml; charset=utf-8"; - } - else - s = "application/dime"; - } - if ((soap->mode & SOAP_ENC_MIME) && soap->mime.boundary && strlen(soap->mime.boundary) + strlen(soap->mime.start ? soap->mime.start : SOAP_STR_EOS) < sizeof(soap->tmpbuf) - 80) - { register const char *t = strchr(s, ';'); - sprintf(soap->tmpbuf, "multipart/related; boundary=\"%s\"; type=\"", soap->mime.boundary); - if (t) - strncat(soap->tmpbuf, s, t - s); - else - strcat(soap->tmpbuf, s); - if (soap->mime.start) - { strcat(soap->tmpbuf, "\"; start=\""); - strcat(soap->tmpbuf, soap->mime.start); - } - strcat(soap->tmpbuf, "\""); - if (r) - { strcat(soap->tmpbuf, "; start-info=\""); - strcat(soap->tmpbuf, r); - strcat(soap->tmpbuf, "\""); - } - s = soap->tmpbuf; - } -#endif - if (s && (err = soap->fposthdr(soap, "Content-Type", s))) - return err; -#ifdef WITH_ZLIB - if (soap->omode & SOAP_ENC_ZLIB) - { err = soap->fposthdr(soap, "Content-Encoding", soap->zlib_out == SOAP_ZLIB_GZIP ? "gzip" : "deflate"); - if (err) - return err; - } -#endif -#ifndef WITH_LEANER - if ((soap->omode & SOAP_IO) == SOAP_IO_CHUNK) - err = soap->fposthdr(soap, "Transfer-Encoding", "chunked"); - else -#endif - if (s) - { sprintf(soap->tmpbuf, "%lu", (unsigned long)count); - err = soap->fposthdr(soap, "Content-Length", soap->tmpbuf); - } - if (err) - return err; - } - return soap->fposthdr(soap, "Connection", soap->keep_alive ? "keep-alive" : "close"); -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_NOHTTP -#ifndef PALM_1 -static int -http_get(struct soap *soap) -{ return SOAP_GET_METHOD; -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_NOHTTP -#ifndef PALM_1 -static int -http_post(struct soap *soap, const char *endpoint, const char *host, int port, const char *path, const char *action, size_t count) -{ register const char *s; - register int err; - if (soap->status == SOAP_GET) - s = "GET"; - else - s = "POST"; -#ifdef PALM - if (!endpoint || (soap_tag_cmp(endpoint, "http:*") && soap_tag_cmp(endpoint, "https:*") && strncmp(endpoint, "httpg:", 6)) && strncmp(endpoint, "_beam:", 6) && strncmp(endpoint, "_local:", 7) && strncmp(endpoint, "_btobex:", 8)) -#else - if (!endpoint || (soap_tag_cmp(endpoint, "http:*") && soap_tag_cmp(endpoint, "https:*") && strncmp(endpoint, "httpg:", 6))) -#endif - return SOAP_OK; - if (strlen(endpoint) + strlen(soap->http_version) > sizeof(soap->tmpbuf) - 80) - return soap->error = SOAP_EOM; - if (soap->proxy_host && soap_tag_cmp(endpoint, "https:*")) - sprintf(soap->tmpbuf, "%s %s HTTP/%s", s, endpoint, soap->http_version); - else - sprintf(soap->tmpbuf, "%s /%s HTTP/%s", s, (*path == '/' ? path + 1 : path), soap->http_version); - if ((err = soap->fposthdr(soap, soap->tmpbuf, NULL))) - return err; - if (port != 80) - sprintf(soap->tmpbuf, "%s:%d", host, port); - else - strcpy(soap->tmpbuf, host); - if ((err = soap->fposthdr(soap, "Host", soap->tmpbuf)) - || (err = soap->fposthdr(soap, "User-Agent", "gSOAP/2.7")) - || (err = soap_puthttphdr(soap, SOAP_OK, count))) - return err; -#ifdef WITH_ZLIB -#ifdef WITH_GZIP - if ((err = soap->fposthdr(soap, "Accept-Encoding", "gzip, deflate"))) -#else - if ((err = soap->fposthdr(soap, "Accept-Encoding", "deflate"))) -#endif - return err; -#endif -#ifndef WITH_LEAN - if (soap->userid && soap->passwd && strlen(soap->userid) + strlen(soap->passwd) < 761) - { sprintf(soap->tmpbuf + 262, "%s:%s", soap->userid, soap->passwd); - strcpy(soap->tmpbuf, "Basic "); - soap_s2base64(soap, (const unsigned char*)(soap->tmpbuf + 262), soap->tmpbuf + 6, strlen(soap->tmpbuf + 262)); - if ((err = soap->fposthdr(soap, "Authorization", soap->tmpbuf))) - return err; - } - if (soap->proxy_userid && soap->proxy_passwd && strlen(soap->proxy_userid) + strlen(soap->proxy_passwd) < 761) - { sprintf(soap->tmpbuf + 262, "%s:%s", soap->proxy_userid, soap->proxy_passwd); - strcpy(soap->tmpbuf, "Basic "); - soap_s2base64(soap, (const unsigned char*)(soap->tmpbuf + 262), soap->tmpbuf + 6, strlen(soap->tmpbuf + 262)); - if ((err = soap->fposthdr(soap, "Proxy-Authorization", soap->tmpbuf))) - return err; - } -#endif -#ifdef WITH_COOKIES -#ifdef WITH_OPENSSL - if (soap_putcookies(soap, host, path, soap->ssl != NULL)) - return soap->error; -#else - if (soap_putcookies(soap, host, path, 0)) - return soap->error; -#endif -#endif - if (soap->status != SOAP_GET && (soap->version == 1 || (action && *action && strlen(action) < sizeof(soap->tmpbuf) - 2))) - { sprintf(soap->tmpbuf, "\"%s\"", action?action:""); - if ((err = soap->fposthdr(soap, "SOAPAction", soap->tmpbuf))) - return err; - } - return soap->fposthdr(soap, NULL, NULL); -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_NOHTTP -#ifndef PALM_1 -static int -http_send_header(struct soap *soap, const char *s) -{ register const char *t; - do - { t = strchr(s, '\n'); /* disallow \n in HTTP headers */ - if (!t) - t = s + strlen(s); - if (soap_send_raw(soap, s, t - s)) - return soap->error; - s = t + 1; - } while (*t); - return SOAP_OK; -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_NOHTTP -#ifndef PALM_1 -static int -http_post_header(struct soap *soap, const char *key, const char *val) -{ if (key) - { if (http_send_header(soap, key)) - return soap->error; - if (val && (soap_send_raw(soap, ": ", 2) || http_send_header(soap, val))) - return soap->error; - } - return soap_send_raw(soap, "\r\n", 2); -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_NOHTTP -#ifndef PALM_1 -static int -http_response(struct soap *soap, int status, size_t count) -{ register int err; -#ifdef WMW_RPM_IO - if (soap->rpmreqid) - httpOutputEnable(soap->rpmreqid); -#endif - if (strlen(soap->http_version) > 4) - return soap->error = SOAP_EOM; - if (!status || status == SOAP_HTML || status == SOAP_FILE) - { const char *s; - if (count || ((soap->omode & SOAP_IO) == SOAP_IO_CHUNK)) - s = "200 OK"; - else - s = "202 ACCEPTED"; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Status = %s\n", s)); -#ifdef WMW_RPM_IO - if (soap->rpmreqid || soap_valid_socket(soap->master) || soap_valid_socket(soap->socket)) /* RPM behaves as if standalone */ -#else - if (soap_valid_socket(soap->master) || soap_valid_socket(soap->socket)) /* standalone application */ -#endif - { sprintf(soap->tmpbuf, "HTTP/%s %s", soap->http_version, s); - if ((err = soap->fposthdr(soap, soap->tmpbuf, NULL))) - return err; - } - else if ((err = soap->fposthdr(soap, "Status", s))) - return err; - } - else if (status >= 200 && status < 600) - { sprintf(soap->tmpbuf, "HTTP/%s %d %s", soap->http_version, status, http_error(soap, status)); - if ((err = soap->fposthdr(soap, soap->tmpbuf, NULL))) - return err; -#ifndef WITH_LEAN - if (status == 401) - { sprintf(soap->tmpbuf, "Basic realm=\"%s\"", strlen(soap->authrealm) < sizeof(soap->tmpbuf) - 14 ? soap->authrealm : "gSOAP Web Service"); - if ((err = soap->fposthdr(soap, "WWW-Authenticate", soap->tmpbuf))) - return err; - } - else if ((status >= 301 && status <= 303) || status == 307) - { if ((err = soap->fposthdr(soap, "Location", soap->endpoint))) - return err; - } -#endif - } - else - { const char *s = *soap_faultcode(soap); - if (soap->version == 2 && !strcmp(s, "SOAP-ENV:Sender")) - s = "400 Bad Request"; - else - s = "500 Internal Server Error"; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Error %s (status=%d)\n", s, status)); -#ifdef WMW_RPM_IO - if (soap->rpmreqid || soap_valid_socket(soap->master) || soap_valid_socket(soap->socket)) /* RPM behaves as if standalone */ -#else - if (soap_valid_socket(soap->master) || soap_valid_socket(soap->socket)) /* standalone application */ -#endif - { sprintf(soap->tmpbuf, "HTTP/%s %s", soap->http_version, s); - if ((err = soap->fposthdr(soap, soap->tmpbuf, NULL))) - return err; - } - else if ((err = soap->fposthdr(soap, "Status", s))) /* CGI */ - return err; - } - if ((err = soap->fposthdr(soap, "Server", "gSOAP/2.7")) - || (err = soap_puthttphdr(soap, status, count))) - return err; -#ifdef WITH_COOKIES - if (soap_putsetcookies(soap)) - return soap->error; -#endif - return soap->fposthdr(soap, NULL, NULL); -} -#endif -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_response(struct soap *soap, int status) -{ register size_t count; - if (!(soap->omode & (SOAP_ENC_XML | SOAP_IO_STORE /* this tests for chunking too */)) - && (status == SOAP_HTML || status == SOAP_FILE)) - { soap->omode &= ~SOAP_IO; - soap->omode |= SOAP_IO_STORE; - } - soap->status = status; - count = soap_count_attachments(soap); - if (soap_begin_send(soap)) - return soap->error; -#ifndef WITH_NOHTTP - if ((soap->mode & SOAP_IO) != SOAP_IO_STORE && !(soap->mode & SOAP_ENC_XML)) - { register int n = soap->mode; - soap->mode &= ~(SOAP_IO | SOAP_ENC_ZLIB); - if ((n & SOAP_IO) != SOAP_IO_FLUSH) - soap->mode |= SOAP_IO_BUFFER; - if ((soap->error = soap->fresponse(soap, status, count))) - return soap->error; -#ifndef WITH_LEANER - if ((n & SOAP_IO) == SOAP_IO_CHUNK) - { if (soap_flush(soap)) - return soap->error; - } -#endif - soap->mode = n; - } -#endif - return SOAP_OK; -} -#endif - -/******************************************************************************/ -#ifndef WITH_LEAN -static const char* -soap_set_validation_fault(struct soap *soap, const char *s, const char *t) -{ if (*soap->tag) - sprintf(soap->msgbuf, "Validation constraint violation: %s%s in element <%s>", s, t?t:SOAP_STR_EOS, soap->tag); - else - sprintf(soap->msgbuf, "Validation constraint violation: %s%s", s, t?t:SOAP_STR_EOS); - return soap->msgbuf; -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_set_fault(struct soap *soap) -{ const char **c = soap_faultcode(soap); - const char **s = soap_faultstring(soap); - if (soap->fseterror) - soap->fseterror(soap, c, s); - if (!*c) - { if (soap->version == 2) - *c = "SOAP-ENV:Sender"; - else - *c = "SOAP-ENV:Client"; - } - if (*s) - return; - switch (soap->error) - { -#ifndef WITH_LEAN - case SOAP_CLI_FAULT: - *s = "Client fault"; - break; - case SOAP_SVR_FAULT: - *s = "Server fault"; - break; - case SOAP_TAG_MISMATCH: - *s = soap_set_validation_fault(soap, "tag name or namespace mismatch", NULL); - break; - case SOAP_TYPE: - *s = soap_set_validation_fault(soap, "data type mismatch ", soap->type); - break; - case SOAP_SYNTAX_ERROR: - *s = "Well-formedness violation"; - break; - case SOAP_NO_TAG: - *s = "No XML element tag"; - break; - case SOAP_MUSTUNDERSTAND: - *c = "SOAP-ENV:MustUnderstand"; - sprintf(soap->msgbuf, "The data in element '%s' must be understood but cannot be handled", soap->tag); - *s = soap->msgbuf; - break; - case SOAP_VERSIONMISMATCH: - *c = "SOAP-ENV:VersionMismatch"; - *s = "SOAP version mismatch or invalid SOAP message"; - break; - case SOAP_DATAENCODINGUNKNOWN: - *c = "SOAP-ENV:DataEncodingUnknown"; - *s = "Unsupported SOAP data encoding"; - break; - case SOAP_NAMESPACE: - *s = soap_set_validation_fault(soap, "namespace error", NULL); - break; - case SOAP_USER_ERROR: - *s = "User error"; - break; - case SOAP_FATAL_ERROR: - *s = "Fatal error"; - break; - case SOAP_NO_METHOD: - sprintf(soap->msgbuf, "Method '%s' not implemented: method name or namespace not recognized", soap->tag); - *s = soap->msgbuf; - break; - case SOAP_NO_DATA: - *s = "Data required for operation"; - break; - case SOAP_GET_METHOD: - *s = "HTTP GET method not implemented"; - break; - case SOAP_EOM: - *s = "Out of memory"; - break; - case SOAP_MOE: - *s = "Memory overflow or memory corruption error"; - break; - case SOAP_IOB: - *s = "Array index out of bounds"; - break; - case SOAP_NULL: - *s = soap_set_validation_fault(soap, "nil not allowed", NULL); - break; - case SOAP_DUPLICATE_ID: - *s = soap_set_validation_fault(soap, "multiple definitions of id ", soap->id); - if (soap->version == 2) - *soap_faultsubcode(soap) = "SOAP-ENC:DuplicateID"; - break; - case SOAP_MISSING_ID: - *s = soap_set_validation_fault(soap, "missing id for ref ", soap->id); - if (soap->version == 2) - *soap_faultsubcode(soap) = "SOAP-ENC:MissingID"; - break; - case SOAP_HREF: - *s = soap_set_validation_fault(soap, "incompatible object ref ", soap->id); - break; - case SOAP_FAULT: - break; -#ifndef WITH_NOIO - case SOAP_UDP_ERROR: - *s = "Message too large for UDP packet"; - break; - case SOAP_TCP_ERROR: - *s = tcp_error(soap); - break; -#endif - case SOAP_HTTP_ERROR: - *s = "An HTTP processing error occurred"; - break; - case SOAP_SSL_ERROR: -#ifdef WITH_OPENSSL - *s = "SSL error"; -#else - *s = "OpenSSL not installed: recompile with -DWITH_OPENSSL"; -#endif - break; - case SOAP_PLUGIN_ERROR: - *s = "Plugin registry error"; - break; - case SOAP_DIME_ERROR: - *s = "DIME format error"; - break; - case SOAP_DIME_HREF: - *s = "DIME href to missing attachment"; - break; - case SOAP_DIME_MISMATCH: - *s = "DIME version/transmission error"; - break; - case SOAP_DIME_END: - *s = "End of DIME error"; - break; - case SOAP_MIME_ERROR: - *s = "MIME format error"; - break; - case SOAP_MIME_HREF: - *s = "MIME href to missing attachment"; - break; - case SOAP_MIME_END: - *s = "End of MIME error"; - break; - case SOAP_ZLIB_ERROR: -#ifdef WITH_ZLIB - sprintf(soap->msgbuf, "Zlib/gzip error: '%s'", soap->d_stream.msg?soap->d_stream.msg:""); - *s = soap->msgbuf; -#else - *s = "Zlib/gzip not installed for (de)compression: recompile with -DWITH_GZIP"; -#endif - break; - case SOAP_REQUIRED: - *s = soap_set_validation_fault(soap, "missing required attribute", NULL); - break; - case SOAP_PROHIBITED: - *s = soap_set_validation_fault(soap, "prohibited attribute present", NULL); - break; - case SOAP_OCCURS: - *s = soap_set_validation_fault(soap, "min/maxOccurs violation", NULL); - break; - case SOAP_LENGTH: - *s = soap_set_validation_fault(soap, "content length violation", NULL); - break; - case SOAP_FD_EXCEEDED: - *s = "Maximum number of open connections was reached"; - break; - case SOAP_STOP: - *s = "Stopped: no response sent"; - break; -#endif - case SOAP_EOF: -#ifndef WITH_NOIO - strcpy(soap->msgbuf, soap_strerror(soap)); -#ifndef WITH_LEAN - if (strlen(soap->msgbuf) + 25 < sizeof(soap->msgbuf)) - { memmove(soap->msgbuf + 25, soap->msgbuf, strlen(soap->msgbuf) + 1); - memcpy(soap->msgbuf, "End of file or no input: ", 25); - } -#endif - *s = soap->msgbuf; - break; -#else - *s = "End of file or no input"; - break; -#endif - default: -#ifndef WITH_NOHTTP -#ifndef WITH_LEAN - if (soap->error > 200 && soap->error < 600) - { sprintf(soap->msgbuf, "HTTP Error: %d %s", soap->error, http_error(soap, soap->error)); - *s = soap->msgbuf; - } - else -#endif -#endif - { sprintf(soap->msgbuf, "Error %d", soap->error); - *s = soap->msgbuf; - } - } -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_send_fault(struct soap *soap) -{ register int status = soap->error; - int r = 1; - if (status == SOAP_STOP) - return status; - DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Sending back fault struct for error code %d\n", soap->error)); - soap->keep_alive = 0; /* to terminate connection */ - soap_set_fault(soap); -#ifndef WITH_NOIO -#ifndef WITH_LEAN - if (soap_valid_socket(soap->socket)) - { struct timeval timeout; - fd_set rfd, sfd; - timeout.tv_sec = 0; - timeout.tv_usec = 0; - FD_ZERO(&rfd); - FD_ZERO(&sfd); - FD_SET((SOAP_SOCKET)soap->socket, &rfd); - FD_SET((SOAP_SOCKET)soap->socket, &sfd); - r = select((SOAP_SOCKET)(soap->socket + 1), &rfd, &sfd, NULL, &timeout); - if (r > 0) - { if (!FD_ISSET((SOAP_SOCKET)soap->socket, &sfd) - || (FD_ISSET((SOAP_SOCKET)soap->socket, &rfd) - && recv((SOAP_SOCKET)soap->socket, soap->tmpbuf, 1, MSG_PEEK) < 0)) - r = 0; - } - } -#endif -#endif - if ((status != SOAP_EOF || (!soap->recv_timeout && !soap->send_timeout)) && r > 0) - { soap->error = SOAP_OK; - soap_serializeheader(soap); - soap_serializefault(soap); - soap_begin_count(soap); - if (soap->mode & SOAP_IO_LENGTH) - { soap_envelope_begin_out(soap); - soap_putheader(soap); - soap_body_begin_out(soap); - soap_putfault(soap); - soap_body_end_out(soap); - soap_envelope_end_out(soap); - } - soap_end_count(soap); - if (soap_response(soap, status) - || soap_envelope_begin_out(soap) - || soap_putheader(soap) - || soap_body_begin_out(soap) - || soap_putfault(soap) - || soap_body_end_out(soap) - || soap_envelope_end_out(soap)) - return soap_closesock(soap); - soap_end_send(soap); - } - soap->error = status; - return soap_closesock(soap); -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_recv_fault(struct soap *soap) -{ register int status = soap->error; - DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Receiving SOAP Fault\n")); - soap->error = SOAP_OK; - if (soap_getfault(soap)) - { DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Error: soap_get_soapfault() failed. Is this a SOAP message at all?\n")); - *soap_faultcode(soap) = (soap->version == 2 ? "SOAP-ENV:Sender" : "SOAP-ENV:Client"); - soap->error = status; - soap_set_fault(soap); - } - else - { register const char *s = *soap_faultcode(soap); - if (!soap_match_tag(soap, s, "SOAP-ENV:Server") || !soap_match_tag(soap, s, "SOAP-ENV:Receiver")) - status = SOAP_SVR_FAULT; - else if (!soap_match_tag(soap, s, "SOAP-ENV:Client") || !soap_match_tag(soap, s, "SOAP-ENV:Sender")) - status = SOAP_CLI_FAULT; - else if (!soap_match_tag(soap, s, "SOAP-ENV:MustUnderstand")) - status = SOAP_MUSTUNDERSTAND; - else if (!soap_match_tag(soap, s, "SOAP-ENV:VersionMismatch")) - status = SOAP_VERSIONMISMATCH; - else - { DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Fault code %s\n", s)); - status = SOAP_FAULT; - } - if (soap_body_end_in(soap) - || soap_envelope_end_in(soap) - || soap_end_recv(soap)) - return soap_closesock(soap); - soap->error = status; - } - return soap_closesock(soap); -} -#endif - -/******************************************************************************/ -#ifndef WITH_NOHTTP -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_send_empty_response(struct soap *soap, int status) -{ register soap_mode m = soap->omode; - soap->count = 0; - if ((m & SOAP_IO) == SOAP_IO_CHUNK) - { soap->omode &= ~SOAP_IO_CHUNK; - soap->omode |= SOAP_IO_BUFFER; - } - if (soap_response(soap, status) || soap_end_send(soap)) - { soap->omode = m; - return soap_closesock(soap); - } - soap->omode = m; - return SOAP_OK; -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_NOHTTP -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_recv_empty_response(struct soap *soap) -{ if (soap_begin_recv(soap) || soap_end_recv(soap)) - { if (soap->error != 202) - return soap_closesock(soap); - soap->error = SOAP_OK; - } - return SOAP_OK; -} -#endif -#endif - -/******************************************************************************/ -#ifndef WITH_NOIO -#ifndef PALM_1 -static const char* -soap_strerror(struct soap *soap) -{ register int err = soap->errnum; - if (err) - { -#ifndef WIN32 - return strerror(err); -#else -#ifndef UNDER_CE - DWORD len; - *soap->msgbuf = '\0'; - len = FormatMessageA(FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, NULL, err, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), (LPSTR)soap->msgbuf, (DWORD)sizeof(soap->msgbuf), NULL); -#else - DWORD i, len; - *soap->msgbuf = '\0'; - len = FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, NULL, err, 0, (LPTSTR)soap->msgbuf, (DWORD)(sizeof(soap->msgbuf)/sizeof(TCHAR)), NULL); - for (i = 0; i <= len; i++) - { if (((TCHAR*)soap->msgbuf)[i] < 0x80) - soap->msgbuf[i] = (char)((TCHAR*)soap->msgbuf)[i]; - else - soap->msgbuf[i] = '?'; - } -#endif - return soap->msgbuf; -#endif - } - return "Operation interrupted or timed out"; -} -#endif -#endif - -/******************************************************************************/ -#ifndef PALM_2 -static int -soap_set_error(struct soap *soap, const char *faultcode, const char *faultsubcode, const char *faultstring, const char *faultdetail, int soaperror) -{ *soap_faultcode(soap) = faultcode; - if (faultsubcode) - *soap_faultsubcode(soap) = faultsubcode; - *soap_faultstring(soap) = faultstring; - if (faultdetail && *faultdetail) - { register const char **s = soap_faultdetail(soap); - if (s) - *s = faultdetail; - } - return soap->error = soaperror; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_set_sender_error(struct soap *soap, const char *faultstring, const char *faultdetail, int soaperror) -{ return soap_set_error(soap, soap->version == 2 ? "SOAP-ENV:Sender" : "SOAP-ENV:Client", NULL, faultstring, faultdetail, soaperror); -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_set_receiver_error(struct soap *soap, const char *faultstring, const char *faultdetail, int soaperror) -{ return soap_set_error(soap, soap->version == 2 ? "SOAP-ENV:Receiver" : "SOAP-ENV:Server", NULL, faultstring, faultdetail, soaperror); -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -static int -soap_copy_fault(struct soap *soap, const char *faultcode, const char *faultsubcode, const char *faultstring, const char *faultdetail) -{ char *r = NULL, *s = NULL, *t = NULL; - if (faultsubcode) - r = soap_strdup(soap, faultsubcode); - if (faultstring) - s = soap_strdup(soap, faultstring); - if (faultdetail) - t = soap_strdup(soap, faultdetail); - return soap_set_error(soap, faultcode, r, s, t, SOAP_FAULT); -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_sender_fault(struct soap *soap, const char *faultstring, const char *faultdetail) -{ return soap_sender_fault_subcode(soap, NULL, faultstring, faultdetail); -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_sender_fault_subcode(struct soap *soap, const char *faultsubcode, const char *faultstring, const char *faultdetail) -{ return soap_copy_fault(soap, soap->version == 2 ? "SOAP-ENV:Sender" : "SOAP-ENV:Client", faultsubcode, faultstring, faultdetail); -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_receiver_fault(struct soap *soap, const char *faultstring, const char *faultdetail) -{ return soap_receiver_fault_subcode(soap, NULL, faultstring, faultdetail); -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_receiver_fault_subcode(struct soap *soap, const char *faultsubcode, const char *faultstring, const char *faultdetail) -{ return soap_copy_fault(soap, soap->version == 2 ? "SOAP-ENV:Receiver" : "SOAP-ENV:Server", faultsubcode, faultstring, faultdetail); -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -#ifndef WITH_NOSTDLIB -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_print_fault(struct soap *soap, FILE *fd) -{ if (soap_check_state(soap)) - fprintf(fd, "Error: soap struct not initialized\n"); - else if (soap->error) - { const char *c, *v = NULL, *s, **d; - d = soap_faultcode(soap); - if (!*d) - soap_set_fault(soap); - c = *d; - if (soap->version == 2) - v = *soap_faultsubcode(soap); - s = *soap_faultstring(soap); - d = soap_faultdetail(soap); - fprintf(fd, "%s%d fault: %s [%s]\n\"%s\"\nDetail: %s\n", soap->version ? "SOAP 1." : "Error ", soap->version ? (int)soap->version : soap->error, c, v ? v : "no subcode", s ? s : "[no reason]", d && *d ? *d : "[no detail]"); - } -} -#endif -#endif - -/******************************************************************************/ -#ifndef PALM_1 -#ifndef WITH_NOSTDLIB -SOAP_FMAC1 -void -SOAP_FMAC2 -soap_print_fault_location(struct soap *soap, FILE *fd) -{ -#ifndef WITH_LEAN - int i, j, c1, c2; - if (soap->error && soap->bufidx <= soap->buflen && soap->buflen > 0 && soap->buflen <= SOAP_BUFLEN) - { i = (int)soap->bufidx - 1; - if (i <= 0) - i = 0; - c1 = soap->buf[i]; - soap->buf[i] = '\0'; - if ((int)soap->buflen >= i + 1024) - j = i + 1023; - else - j = (int)soap->buflen - 1; - c2 = soap->buf[j]; - soap->buf[j] = '\0'; - fprintf(fd, "%s%c\n\n", soap->buf, c1); - if (soap->bufidx < soap->buflen) - fprintf(fd, "%s\n", soap->buf + soap->bufidx); - soap->buf[i] = c1; - soap->buf[j] = c2; - } -#endif -} -#endif -#endif - -/******************************************************************************/ -#ifndef PALM_1 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_register_plugin_arg(struct soap *soap, int (*fcreate)(struct soap*, struct soap_plugin*, void*), void *arg) -{ register struct soap_plugin *p; - register int r; - if (!(p = (struct soap_plugin*)SOAP_MALLOC(soap, sizeof(struct soap_plugin)))) - return soap->error = SOAP_EOM; - p->id = NULL; - p->data = NULL; - p->fcopy = NULL; - p->fdelete = NULL; - r = fcreate(soap, p, arg); - if (!r && p->fdelete) - { p->next = soap->plugins; - soap->plugins = p; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Registered '%s' plugin\n", p->id)); - return SOAP_OK; - } - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Could not register plugin '%s': plugin returned error %d (or fdelete callback not set)\n", p->id?p->id:"?", r)); - SOAP_FREE(soap, p); - return r; -} -#endif - -/******************************************************************************/ -#ifndef PALM_1 -static void * -fplugin(struct soap *soap, const char *id) -{ register struct soap_plugin *p; - for (p = soap->plugins; p; p = p->next) - if (p->id == id || !strcmp(p->id, id)) - return p->data; - return NULL; -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -void * -SOAP_FMAC2 -soap_lookup_plugin(struct soap *soap, const char *id) -{ return soap->fplugin(soap, id); -} -#endif - -/******************************************************************************/ -#ifdef __cplusplus -} -#endif - -/******************************************************************************\ - * - * C++ soap struct methods - * -\******************************************************************************/ - -#ifdef __cplusplus -#ifndef WITH_LEAN -soap::soap() -{ soap_init(this); -} -#endif -#endif - -/******************************************************************************/ -#ifdef __cplusplus -#ifndef WITH_LEAN -soap::soap(soap_mode m) -{ soap_init1(this, m); -} -#endif -#endif - -/******************************************************************************/ -#ifdef __cplusplus -#ifndef WITH_LEAN -soap::soap(soap_mode im, soap_mode om) -{ soap_init2(this, im, om); -} -#endif -#endif - -/******************************************************************************/ -#ifdef __cplusplus -#ifndef WITH_LEAN -soap::soap(struct soap& soap) -{ soap_copy_context(this, &soap); -} -#endif -#endif - -/******************************************************************************/ -#ifdef __cplusplus -#ifndef WITH_LEAN -soap::~soap() -{ soap_destroy(this); - soap_end(this); - soap_done(this); -} -#endif -#endif - -/******************************************************************************/ diff --git a/org.glite.security.gsoap-plugin/src/stdsoap2_2.7.9d.h b/org.glite.security.gsoap-plugin/src/stdsoap2_2.7.9d.h deleted file mode 100644 index 44efa13..0000000 --- a/org.glite.security.gsoap-plugin/src/stdsoap2_2.7.9d.h +++ /dev/null @@ -1,2184 +0,0 @@ -/* - -stdsoap2.h 2.7.9d - -gSOAP runtime - -gSOAP XML Web services tools -Copyright (C) 2000-2007, Robert van Engelen, Genivia Inc., All Rights Reserved. -This part of the software is released under one of the following licenses: -GPL, the gSOAP public license, or Genivia's license for commercial use. --------------------------------------------------------------------------------- -Contributors: - -Wind River Systems, Inc., for the following additions (marked WR[...]): - - vxWorks compatible --------------------------------------------------------------------------------- -gSOAP public license. - -The contents of this file are subject to the gSOAP Public License Version 1.3 -(the "License"); you may not use this file except in compliance with the -License. You may obtain a copy of the License at -http://www.cs.fsu.edu/~engelen/soaplicense.html -Software distributed under the License is distributed on an "AS IS" basis, -WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License -for the specific language governing rights and limitations under the License. - -The Initial Developer of the Original Code is Robert A. van Engelen. -Copyright (C) 2000-2007, Robert van Engelen, Genivia Inc., All Rights Reserved. --------------------------------------------------------------------------------- -GPL license. - -This program is free software; you can redistribute it and/or modify it under -the terms of the GNU General Public License as published by the Free Software -Foundation; either version 2 of the License, or (at your option) any later -version. - -This program is distributed in the hope that it will be useful, but WITHOUT ANY -WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A -PARTICULAR PURPOSE. See the GNU General Public License for more details. - -You should have received a copy of the GNU General Public License along with -this program; if not, write to the Free Software Foundation, Inc., 59 Temple -Place, Suite 330, Boston, MA 02111-1307 USA - -Author contact information: -engelen@genivia.com / engelen@acm.org --------------------------------------------------------------------------------- -A commercial use license is available from Genivia, Inc., contact@genivia.com --------------------------------------------------------------------------------- -*/ - -#ifdef WITH_SOAPDEFS_H -# include "soapdefs.h" /* include user-defined stuff */ -#endif - -#ifndef _THREAD_SAFE -# define _THREAD_SAFE -#endif - -#ifndef OPENSERVER -# ifndef _REENTRANT -# define _REENTRANT -# endif -#endif - -#ifndef SOAP_FMAC1 /* stdsoap2.h declaration macro */ -# define SOAP_FMAC1 -#endif - -#ifndef SOAP_FMAC2 /* stdsoap2.h declaration macro */ -# define SOAP_FMAC2 -#endif - -#ifndef SOAP_FMAC3 /* (de)serializer declaration macro */ -# define SOAP_FMAC3 -#endif - -#ifndef SOAP_FMAC3S /* string converter for (de)serializer declaration macro */ -# define SOAP_FMAC3S SOAP_FMAC3 -#endif - -#ifndef SOAP_FMAC4 /* (de)serializer declaration macro */ -# define SOAP_FMAC4 -#endif - -#ifndef SOAP_FMAC4S /* string converter for (de)serializer declaration macro */ -# define SOAP_FMAC4S SOAP_FMAC4 -#endif - -#ifndef SOAP_FMAC5 /* stub/skeleton declaration macro */ -# define SOAP_FMAC5 -#endif - -#ifndef SOAP_FMAC6 /* stub/skeleton declaration macro */ -# define SOAP_FMAC6 -#endif - -#ifndef SOAP_CMAC /* class declaration macro */ -# define SOAP_CMAC -#endif - -#ifndef SOAP_NMAC /* namespace table declaration macro */ -# define SOAP_NMAC -#endif - -#ifndef SOAP_SOURCE_STAMP -# define SOAP_SOURCE_STAMP(str) -#endif - -/* gSOAP 2.7.4 and higher: fast look-aside buffering is stable */ -#ifndef WITH_FAST -# define WITH_FAST -#endif - -#ifdef WITH_LEANER -# ifndef WITH_LEAN -# define WITH_LEAN -# endif -#endif - -#ifdef WITH_LEAN -# ifdef WITH_COOKIES -# error "Cannot build WITH_LEAN code WITH_COOKIES enabled" -# endif -#endif - -#ifndef STDSOAP_H -#define STDSOAP_H - -#if defined(__vxworks) || defined(__VXWORKS__) -# define VXWORKS -#endif - -#ifdef _WIN32 -# ifndef WIN32 -# define WIN32 -# endif -#endif - -#ifdef _WIN32_WCE -# ifndef UNDER_CE -# define UNDER_CE _WIN32_WCE -# endif -#endif - -#ifdef UNDER_CE -# ifndef WIN32 -# define WIN32 -# endif -#endif - -#ifdef __BORLANDC__ -# ifdef __WIN32__ -# ifndef WIN32 -# define WIN32 -# endif -# endif -#endif - -#ifdef __CYGWIN__ -# ifndef CYGWIN -# define CYGWIN -# endif -#endif - -#ifdef __SYMBIAN32__ -# define SYMBIAN -# undef WIN32 -#endif - -#if defined(__palmos__) || defined(PALM_GCC) || defined(__PALMOS_TRAPS__) -# ifndef PALM -# define PALM -# endif -#endif - -#if defined(__hpux) -# ifndef HP_UX -# define HP_UX -# endif -#endif - -#if defined(__alpha) && !defined(__VMS) -# ifndef TRU64 -# define TRU64 -# endif -#endif - -#ifdef __MVS__ -# ifndef OS390 -# define OS390 -# endif -#endif - -#ifdef HAVE_CONFIG_H -# include "config.h" -# ifdef WITH_OPENSSL -# ifndef HAVE_OPENSSL_SSL_H -# undef WITH_OPENSSL -# endif -# endif -#else -# if defined(UNDER_CE) -# define WITH_LEAN -# define HAVE_SSCANF -# elif defined(WIN32) -# define HAVE_STRRCHR -# define HAVE_STRTOD -# define HAVE_SSCANF -# define HAVE_STRTOL -# define HAVE_STRTOUL -# define HAVE_SYS_TIMEB_H -# define HAVE_FTIME -# define HAVE_WCTOMB -# define HAVE_MBTOWC -# define SOAP_LONG_FORMAT "%I64d" -# define SOAP_ULONG_FORMAT "%I64u" -# elif defined(CYGWIN) -# define HAVE_STRRCHR -# define HAVE_STRTOD -# define HAVE_SSCANF -# define HAVE_STRTOL -# define HAVE_STRTOUL -# define HAVE_SYS_TIMEB_H -# define HAVE_FTIME -# define HAVE_RAND_R -# define HAVE_GMTIME_R -# define HAVE_LOCALTIME_R -# define HAVE_WCTOMB -# define HAVE_MBTOWC -# elif defined(__APPLE__) -# define HAVE_STRRCHR -# define HAVE_STRTOD -# define HAVE_SSCANF -# define HAVE_STRTOL -# define HAVE_STRTOUL -# define HAVE_RAND_R -# define HAVE_GMTIME_R -# define HAVE_LOCALTIME_R -# define HAVE_TIMEGM -# define HAVE_WCTOMB -# define HAVE_MBTOWC -# elif defined(_AIXVERSION_431) -# define HAVE_STRRCHR -# define HAVE_STRTOD -# define HAVE_SSCANF -# define HAVE_STRTOL -# define HAVE_STRTOUL -# define HAVE_SYS_TIMEB_H -# define HAVE_FTIME -# define HAVE_RAND_R -# define HAVE_GMTIME_R -# define HAVE_LOCALTIME_R -# define HAVE_WCTOMB -# define HAVE_MBTOWC -# elif defined(HP_UX) -# define HAVE_STRRCHR -# define HAVE_STRTOD -# define HAVE_SSCANF -# define HAVE_STRTOL -# define HAVE_STRTOUL -# define HAVE_SYS_TIMEB_H -# define HAVE_FTIME -# define HAVE_RAND_R -# define HAVE_GMTIME_R -# define HAVE_LOCALTIME_R -# define HAVE_WCTOMB -# define HAVE_MBTOWC -# elif defined(FREEBSD) || defined(__FreeBSD__) -# define HAVE_STRRCHR -# define HAVE_STRTOD -# define HAVE_SSCANF -# define HAVE_STRTOL -# define HAVE_STRTOUL -# define HAVE_STRTOLL -# define HAVE_STRTOULL -# define HAVE_GETTIMEOFDAY -# define HAVE_RAND_R -# define HAVE_GMTIME_R -# define HAVE_LOCALTIME_R -# define HAVE_WCTOMB -# define HAVE_MBTOWC -# define SOAP_LONG_FORMAT "%qd" -# define SOAP_ULONG_FORMAT "%qu" -# elif defined(__VMS) -# define HAVE_STRRCHR -# define HAVE_STRTOD -# define HAVE_SSCANF -# define HAVE_STRTOL -# define HAVE_STRTOUL -# define HAVE_SYS_TIMEB_H -# define HAVE_FTIME -# define HAVE_RAND_R -# define HAVE_GMTIME_R -# define HAVE_LOCALTIME_R -# define HAVE_WCTOMB -# define HAVE_MBTOWC -# elif defined(__GLIBC__) || defined(__GNU__) -# define HAVE_STRRCHR -# define HAVE_STRTOD -# define HAVE_SSCANF -# define HAVE_STRTOL -# define HAVE_STRTOUL -# define HAVE_STRTOLL -# define HAVE_STRTOULL -# define HAVE_SYS_TIMEB_H -# define HAVE_FTIME -# define HAVE_RAND_R -# define HAVE_GMTIME_R -# define HAVE_LOCALTIME_R -# define HAVE_TIMEGM -# define HAVE_WCTOMB -# define HAVE_MBTOWC -# define HAVE_ISNAN -# elif defined(TRU64) -# define HAVE_STRRCHR -# define HAVE_STRTOD -# define HAVE_SSCANF -# define HAVE_STRTOL -# define HAVE_STRTOUL -# define HAVE_GETTIMEOFDAY -# define HAVE_SYS_TIMEB_H -# define HAVE_RAND_R -# define HAVE_GMTIME_R -# define HAVE_LOCALTIME_R -# define __USE_STD_IOSTREAM -# define HAVE_WCTOMB -# define HAVE_MBTOWC -# define SOAP_LONG_FORMAT "%ld" -# define SOAP_ULONG_FORMAT "%lu" -# elif defined(MAC_CARBON) -# define WITH_NOIO -# define HAVE_STRRCHR -# define HAVE_STRTOD -# define HAVE_SSCANF -# define HAVE_STRTOL -# define HAVE_STRTOUL -# define HAVE_FTIME -# define HAVE_RAND_R -# define HAVE_GETHOSTBYNAME_R -# define HAVE_GMTIME_R -# define HAVE_LOCALTIME_R -# define HAVE_WCTOMB -# define HAVE_MBTOWC -# elif defined(PALM) -# define WITH_LEAN -# define HAVE_STRTOD /* strtod() is defined in palmFunctions.h */ -# include /* Needs to be included before unix headers */ -# include -# define IGNORE_STDIO_STUBS -# include -# define O_NONBLOCK FNONBIO -# include -# include "palmFunctions.h" -# elif defined(SYMBIAN) -# define WITH_LEAN -# define WITH_NONAMESPACES -# define HAVE_STRTOD /* use STRTOD since sscanf doesn't seem to work */ -# include -# include -# elif defined(VXWORKS) -# define HAVE_STRRCHR -# define HAVE_STRTOD -# define HAVE_SSCANF -# define HAVE_STRTOL -# define HAVE_STRTOUL -# define HAVE_PGMTIME_R -# define HAVE_PLOCALTIME_R -# define HAVE_MKTIME -# elif defined(OS390) -# define HAVE_STRRCHR -# define HAVE_STRTOD -# define HAVE_SSCANF -# define HAVE_STRTOL -# define HAVE_STRTOUL -# define HAVE_SYS_TIMEB_H -# define HAVE_FTIME -# define HAVE_RAND_R -# define HAVE_GMTIME_R -# define HAVE_LOCALTIME_R -# define HAVE_WCTOMB -# define HAVE_MBTOWC -# elif defined(AS400) -# define HAVE_STRRCHR -# define HAVE_STRTOD -# define HAVE_SSCANF -# define HAVE_STRTOL -# define HAVE_STRTOUL -# define HAVE_SYS_TIMEB_H -# define HAVE_FTIME -# define HAVE_RAND_R -# define HAVE_GMTIME_R -# define HAVE_LOCALTIME_R -# define HAVE_WCTOMB -# define HAVE_MBTOWC -# elif defined(__QNX__) || defined(QNX) -/* QNX does not have a working version of strtof */ -# undef HAVE_STRTOF -# define HAVE_STRRCHR -# define HAVE_STRTOD -# define HAVE_SSCANF -# define HAVE_STRTOL -# define HAVE_STRTOUL -# define HAVE_SYS_TIMEB_H -# define HAVE_FTIME -# define HAVE_RAND_R -# define HAVE_GETHOSTBYNAME_R -# define HAVE_GMTIME_R -# define HAVE_LOCALTIME_R -# define HAVE_WCTOMB -# define HAVE_MBTOWC -# define LONG64 long -# define ULONG64 unsigned LONG64 -# define SOAP_LONG_FORMAT "%ld" -# define SOAP_ULONG_FORMAT "%lu" -# else -/* Default asumptions on supported functions */ -# define HAVE_STRRCHR -# define HAVE_STRTOD -# define HAVE_SSCANF -# define HAVE_STRTOL -# define HAVE_STRTOUL -# define HAVE_SYS_TIMEB_H -# define HAVE_FTIME -# define HAVE_RAND_R -# define HAVE_GETHOSTBYNAME_R -# define HAVE_GMTIME_R -# define HAVE_LOCALTIME_R -# define HAVE_WCTOMB -# define HAVE_MBTOWC -# endif -#endif - -#ifndef WITH_NOSTDLIB -# include -# ifndef PALM -# include -# include -# endif -# include -# include -#endif - -#if defined(__cplusplus) && !defined(WITH_LEAN) -# include -# include -#endif - -#ifdef WITH_NOHTTP -# ifndef WITH_NOIO -# define WITH_NOIO -# undef WITH_COOKIES -# endif -#endif - -#ifndef UNDER_CE -# ifndef PALM -# ifndef WITH_NOIO -# include -# include -# endif -# ifndef WITH_LEAN -# ifdef HAVE_SYS_TIMEB_H -# include /* for ftime() */ -# endif -# include -# endif -# endif -#endif - -#ifdef OPENSERVER -# include -# include -# include - extern int h_errno; -#endif - -#ifndef WITH_NOIO -# ifndef WIN32 -# ifndef PALM -# include -# ifdef VXWORKS -# include -# include -# endif -# ifndef VXWORKS -# ifndef SYMBIAN -# include -# endif -# endif -# ifdef SUN_OS -# include /* SUN */ -# include /* SUN < 2.8 (?) */ -# endif -# ifdef VXWORKS -# ifdef _WRS_KERNEL -# include -# endif -# else -# include -# endif -# include -# ifdef OS390 -# include -# else -# include /* TCP_NODELAY */ -# endif -# include -# endif -# endif -#endif - -#ifdef WITH_FASTCGI -# include -#endif - -#ifdef WITH_OPENSSL -# define OPENSSL_NO_KRB5 -# include -# include -# include -# include -# include -# ifndef ALLOW_OLD_VERSIONS -# if (OPENSSL_VERSION_NUMBER < 0x00905100L) -# error "Must use OpenSSL 0.9.6 or later" -# endif -# endif -#endif - -#ifdef WITH_GZIP -# ifndef WITH_ZLIB -# define WITH_ZLIB -# endif -#endif - -#ifdef WITH_CASEINSENSITIVETAGS -# define SOAP_STRCMP soap_tag_cmp /* case insensitve XML element/attribute names */ -#else -# define SOAP_STRCMP strcmp /* case sensitive XML element/attribute names */ -#endif - -#ifdef WITH_ZLIB -# include -#endif - -#ifndef WITH_NOSTDLIB -# ifndef PALM -# include /* for isnan() */ -# endif -#endif - -/* #define DEBUG */ /* Uncomment to debug sending (in file SENT.log) receiving (in file RECV.log) and messages (in file TEST.log) */ - -#ifdef __cplusplus -extern "C" { -#endif - -#ifdef WIN32 -# ifndef UNDER_CE -# include -# include -# endif -# include -/* # include */ /* Alternative: use winsock2 (not available with eVC) */ -# ifdef WITH_IPV6 -# include -# include -# endif -#else -# ifdef VXWORKS -# include -# include -# include -# endif -# ifndef WITH_NOIO -# ifndef PALM -# include -# include -# include -# include -# endif -# endif -#endif - -/* Portability: define SOAP_SOCKLEN_T */ -#if defined(_AIX) -# define SOAP_SOCKLEN_T socklen_t -#elif defined(SOCKLEN_T) -# define SOAP_SOCKLEN_T SOCKLEN_T -#elif defined(__socklen_t_defined) || defined(_SOCKLEN_T) || defined(CYGWIN) || defined(FREEBSD) || defined(__FreeBSD__) || defined(__QNX__) || defined(QNX) -# define SOAP_SOCKLEN_T socklen_t -#elif defined(IRIX) || defined(WIN32) || defined(__APPLE__) || defined(HP_UX) || defined(SUN_OS) || defined(OPENSERVER) || defined(TRU64) || defined(VXWORKS) -# define SOAP_SOCKLEN_T int -#else -# define SOAP_SOCKLEN_T size_t -#endif - -#ifndef SOAP_SOCKET -# ifdef WIN32 -# define SOAP_SOCKET SOCKET -# define soap_closesocket(n) closesocket(n) -# else -# define SOAP_SOCKET int -# define soap_closesocket(n) close(n) -# endif -#endif - -#define SOAP_INVALID_SOCKET (-1) -#define soap_valid_socket(n) ((n) != SOAP_INVALID_SOCKET) - -#ifndef FD_SETSIZE -# define FD_SETSIZE (1024) -#endif - -#if defined(SYMBIAN) -# define LONG64 long -# define ULONG64 unsigned LONG64 -#elif !defined(WIN32) || defined(CYGWIN) || defined(__GLIBC__) || defined(__GNU__) -# ifndef LONG64 -# if defined(__GLIBC__) -# include -# if (__WORDSIZE == 64) -# define LONG64 int64_t -# define ULONG64 uint64_t -# ifndef SOAP_LONG_FORMAT -# define SOAP_LONG_FORMAT "%ld" -# endif -# ifndef SOAP_ULONG_FORMAT -# define SOAP_ULONG_FORMAT "%lu" -# endif -# else -# define LONG64 long long -# define ULONG64 unsigned LONG64 -# endif -# else -# define LONG64 long long -# define ULONG64 unsigned LONG64 -# endif -# endif -#elif defined(UNDER_CE) -# define LONG64 __int64 -# define ULONG64 unsigned LONG64 -#elif defined(__BORLANDC__) -# define LONG64 __int64 -# define ULONG64 unsigned LONG64 -#endif - -#ifndef SOAP_LONG_FORMAT -# define SOAP_LONG_FORMAT "%lld" /* printf format for 64 bit ints */ -#endif - -#ifndef SOAP_ULONG_FORMAT -# define SOAP_ULONG_FORMAT "%llu" /* printf format for unsigned 64 bit ints */ -#endif - -#if defined(WIN32) && !defined(CYGWIN) -# define soap_int32 __int32 -#elif defined(SYMBIAN) -# define soap_int32 long -#elif defined(PALM) -# define soap_int32 Int32 -#else -# define soap_int32 int32_t -#endif - -#ifdef WIN32 -# define SOAP_ERANGE ERANGE -# define SOAP_EINTR WSAEINTR -# define SOAP_EAGAIN WSAEWOULDBLOCK -# define SOAP_EWOULDBLOCK WSAEWOULDBLOCK -# define SOAP_EINPROGRESS WSAEINPROGRESS -# define SOAP_EADDRINUSE WSAEADDRINUSE -#else -# define SOAP_ERANGE ERANGE -# define SOAP_EINTR EINTR -# define SOAP_EAGAIN EAGAIN -# define SOAP_EADDRINUSE EADDRINUSE -# ifdef SYMBIAN -# define SOAP_EWOULDBLOCK 9898 -# define SOAP_EINPROGRESS 9899 -# else -# define SOAP_EWOULDBLOCK EWOULDBLOCK -# define SOAP_EINPROGRESS EINPROGRESS -# endif -#endif - -#ifdef WIN32 -# ifdef UNDER_CE -# define soap_errno GetLastError() -# define soap_socket_errno(s) GetLastError() -# define soap_reset_errno SetLastError(0) -# else -# define soap_errno GetLastError() -# define soap_socket_errno(s) WSAGetLastError() -# define soap_reset_errno SetLastError(0) -# endif -#else -# ifndef WITH_NOIO -# define soap_errno errno -# define soap_socket_errno(s) errno -# define soap_reset_errno (errno = 0) -# else -# define soap_errno 0 -# define soap_socket_errno(s) 0 -# define soap_reset_errno -# endif -#endif - -#ifndef SOAP_BUFLEN -# ifdef WITH_UDP -# define SOAP_BUFLEN (65536) /* max UDP packet size */ -# else -# ifndef WITH_LEAN -# define SOAP_BUFLEN (65536) /* buffer length for socket packets, also used by gethostbyname_r so don't make this too small */ -# else -# define SOAP_BUFLEN (2048) -# endif -# endif -#endif -#ifndef SOAP_LABLEN -# define SOAP_LABLEN (256) /* initial look-aside buffer length */ -#endif -#ifndef SOAP_PTRBLK -# define SOAP_PTRBLK (32) /* block allocation for pointer hash table chains */ -#endif -#ifndef SOAP_PTRHASH -# ifndef WITH_LEAN -# define SOAP_PTRHASH (1024) /* size of pointer analysis hash table (must be power of 2) */ -# else -# define SOAP_PTRHASH (32) -# endif -#endif -#ifndef SOAP_IDHASH -# ifndef WITH_LEAN -# define SOAP_IDHASH (1999) /* prime size of hash table for parsed id/ref */ -# else -# define SOAP_IDHASH (19) /* 19, 199 */ -# endif -#endif -#ifndef SOAP_BLKLEN -# ifndef WITH_LEAN -# define SOAP_BLKLEN (256) /* size of blocks to collect long strings and XML attributes */ -# else -# define SOAP_BLKLEN (32) -# endif -#endif -#ifndef SOAP_TAGLEN -# ifndef WITH_LEAN -# define SOAP_TAGLEN (1024) /* maximum length of XML element tag/attribute name or host/path name + 1 */ -# else -# define SOAP_TAGLEN (64) -# endif -#endif -#ifndef SOAP_HDRLEN -# ifndef WITH_LEAN -# define SOAP_HDRLEN (8192) /* maximum length of HTTP header line (must be >4096 to read cookies) */ -# else -# define SOAP_HDRLEN (1024) -# endif -#endif -#ifndef SOAP_MAXDIMS -# ifndef WITH_LEAN -# define SOAP_MAXDIMS (16) /* maximum array dimensions (array nestings) must be less than 64 to protect soap->tmpbuf */ -# else -# define SOAP_MAXDIMS (4) -# endif -#endif - -#ifndef SOAP_MAXLOGS -# define SOAP_MAXLOGS (3) /* max number of debug logs per struct soap environment */ -# define SOAP_INDEX_RECV (0) -# define SOAP_INDEX_SENT (1) -# define SOAP_INDEX_TEST (2) -#endif - -#ifndef SOAP_MAXKEEPALIVE -# define SOAP_MAXKEEPALIVE (100) /* max iterations to keep server connection alive */ -#endif - -#ifndef SOAP_MAXARRAYSIZE -# define SOAP_MAXARRAYSIZE (100000) /* "trusted" max size of inbound SOAP array for compound array allocation */ -#endif - -#ifdef VXWORKS -# ifdef __INCmathh -# include -# ifndef HAVE_ISNAN -# define HAVE_ISNAN -# endif -# define soap_isnan(num) isNan(num) -# endif -#endif - -#ifdef WIN32 -# include -# ifndef HAVE_ISNAN -# define HAVE_ISNAN -# endif -# define soap_isnan(num) _isnan(num) -#endif - -#ifdef SUN_OS -# define HAVE_ISNAN -#endif - -#ifdef __APPLE__ -# ifdef __cplusplus -# ifndef isnan -extern "C" int isnan(double); -# endif -# endif -# define HAVE_ISNAN -#endif - -#if !defined(HAVE_ISNAN) && (defined(_MATH_H) || defined(_MATH_INCLUDED)) -# define HAVE_ISNAN -#endif - -extern const struct soap_double_nan { unsigned int n1, n2; } soap_double_nan; - -#ifdef VXWORKS -# ifndef FLT_MAX -# define FLT_MAX _ARCH_FLT_MAX -# endif -# ifndef DBL_MAX -# define DBL_MAX _ARCH_DBL_MAX -# endif -#endif - -#ifndef FLT_NAN -# define FLT_NAN (*(float*)(void*)&soap_double_nan) -#endif - -#ifndef FLT_PINFTY -# if defined(FLT_MAX) -# define FLT_PINFTY FLT_MAX -# elif defined(HUGE_VALF) -# define FLT_PINFTY (float)HUGE_VALF -# elif defined(HUGE_VAL) -# define FLT_PINFTY (float)HUGE_VAL -# elif defined(FLOAT_MAX) -# define FLT_PINFTY FLOAT_MAX -# else -# define FLT_PINFTY (3.40282347e+38F) -# endif -#endif - -#ifndef FLT_NINFTY -# define FLT_NINFTY (-FLT_PINFTY) -#endif - -#ifndef DBL_NAN -# define DBL_NAN (*(double*)(void*)&soap_double_nan) -#endif - -#ifndef DBL_PINFTY -# if defined(DBL_MAX) -# define DBL_PINFTY DBL_MAX -# elif defined(HUGE_VALF) -# define DBL_PINFTY (double)HUGE_VALF -# elif defined(HUGE_VAL) -# define DBL_PINFTY (double)HUGE_VAL -# elif defined(DOUBLE_MAX) -# define DBL_PINFTY DOUBLE_MAX -# else -# define DBL_PINFTY (1.7976931348623157e+308) -# endif -#endif - -#ifndef DBL_NINFTY -# define DBL_NINFTY (-DBL_PINFTY) -#endif - -#ifndef soap_isnan -# ifdef HAVE_ISNAN -# define soap_isnan(n) isnan(n) -# else -# define soap_isnan(n) (0) -# endif -#endif - -#define soap_ispinfd(n) ((n) >= DBL_PINFTY) -#define soap_ispinff(n) ((n) >= FLT_PINFTY) -#define soap_isninfd(n) ((n) <= DBL_NINFTY) -#define soap_isninff(n) ((n) <= FLT_NINFTY) - -/* gSOAP error codes */ - -#define SOAP_EOF EOF -#define SOAP_ERR EOF -#define SOAP_OK 0 -#define SOAP_CLI_FAULT 1 -#define SOAP_SVR_FAULT 2 -#define SOAP_TAG_MISMATCH 3 -#define SOAP_TYPE 4 -#define SOAP_SYNTAX_ERROR 5 -#define SOAP_NO_TAG 6 -#define SOAP_IOB 7 -#define SOAP_MUSTUNDERSTAND 8 -#define SOAP_NAMESPACE 9 -#define SOAP_USER_ERROR 10 -#define SOAP_FATAL_ERROR 11 -#define SOAP_FAULT 12 -#define SOAP_NO_METHOD 13 -#define SOAP_NO_DATA 14 -#define SOAP_GET_METHOD 15 -#define SOAP_EOM 16 -#define SOAP_MOE 17 -#define SOAP_NULL 18 -#define SOAP_DUPLICATE_ID 19 -#define SOAP_MISSING_ID 20 -#define SOAP_HREF 21 -#define SOAP_UDP_ERROR 22 -#define SOAP_TCP_ERROR 23 -#define SOAP_HTTP_ERROR 24 -#define SOAP_SSL_ERROR 25 -#define SOAP_ZLIB_ERROR 26 -#define SOAP_DIME_ERROR 27 -#define SOAP_DIME_HREF 28 -#define SOAP_DIME_MISMATCH 29 -#define SOAP_DIME_END 30 -#define SOAP_MIME_ERROR 31 -#define SOAP_MIME_HREF 32 -#define SOAP_MIME_END 33 -#define SOAP_VERSIONMISMATCH 34 -#define SOAP_PLUGIN_ERROR 35 -#define SOAP_DATAENCODINGUNKNOWN 36 -#define SOAP_REQUIRED 37 -#define SOAP_PROHIBITED 38 -#define SOAP_OCCURS 39 -#define SOAP_LENGTH 40 -#define SOAP_FD_EXCEEDED 41 - -#define soap_xml_error_check(e) ((e) == SOAP_TAG_MISMATCH || (e) == SOAP_TAG_END || (e) == SOAP_SYNTAX_ERROR || (e) == SOAP_NAMESPACE || (e) == SOAP_DUPLICATE_ID || (e) == SOAP_MISSING_ID || (e) == SOAP_REQUIRED || (e) == SOAP_PROHIBITED || (e) == SOAP_OCCURS || (e) == SOAP_LENGTH || (e) == SOAP_NULL || (e) == SOAP_HREF) -#define soap_soap_error_check(e) ((e) == SOAP_CLI_FAULT || (e) == SOAP_SVR_FAULT || (e) == SOAP_VERSIONMISMATCH || (e) == SOAP_MUSTUNDERSTAND || (e) == SOAP_FAULT || (e) == SOAP_NO_METHOD) -#define soap_tcp_error_check(e) ((e) == SOAP_EOF || (e) == SOAP_TCP_ERROR) -#define soap_ssl_error_check(e) ((e) == SOAP_SSL_ERROR) -#define soap_zlib_error_check(e) ((e) == SOAP_ZLIB_ERROR) -#define soap_http_error_check(e) ((e) == SOAP_HTTP_ERROR || (e) == SOAP_GET_METHOD || (e) == SOAP_NO_DATA || ((e) >= 100 && (e) < 600)) - -/* gSOAP HTTP response status codes 100 to 599 are reserved */ - -/* Codes 600 to 999 are user definable */ - -/* Exceptional gSOAP HTTP response status codes >= 1000 */ - -#define SOAP_STOP 1000 /* No HTTP response */ -#define SOAP_FORM 1001 /* Form request/response */ -#define SOAP_HTML 1002 /* Custom HTML response */ -#define SOAP_FILE 1003 /* Custom file-based response */ - -/* gSOAP HTTP method codes */ - -#define SOAP_POST 2000 -#define SOAP_GET 2001 - -/* gSOAP DIME */ - -#define SOAP_DIME_CF 0x01 -#define SOAP_DIME_ME 0x02 -#define SOAP_DIME_MB 0x04 -#define SOAP_DIME_VERSION 0x08 /* DIME version 1 */ -#define SOAP_DIME_MEDIA 0x10 -#define SOAP_DIME_ABSURI 0x20 - -/* gSOAP ZLIB */ - -#define SOAP_ZLIB_NONE 0x00 -#define SOAP_ZLIB_DEFLATE 0x01 -#define SOAP_ZLIB_INFLATE 0x02 -#define SOAP_ZLIB_GZIP 0x02 - -/* gSOAP transport, connection, and content encoding modes */ - -typedef soap_int32 soap_mode; - -#define SOAP_IO 0x00000003 /* IO mask */ -#define SOAP_IO_FLUSH 0x00000000 /* flush output immediately, no buffering */ -#define SOAP_IO_BUFFER 0x00000001 /* buffer output in packets of size SOAP_BUFLEN */ -#define SOAP_IO_STORE 0x00000002 /* store entire output to determine length for transport */ -#define SOAP_IO_CHUNK 0x00000003 /* use HTTP chunked transfer AND buffer packets */ - -#define SOAP_IO_UDP 0x00000004 /* TCP or UDP */ - -#define SOAP_IO_LENGTH 0x00000008 /* calc message length (internal) */ -#define SOAP_IO_KEEPALIVE 0x00000010 /* keep connection alive */ - -#define SOAP_ENC_LATIN 0x00000020 /* accept iso-8859-1 encoding */ -#define SOAP_ENC_XML 0x00000040 /* plain XML encoding, no HTTP header */ -#define SOAP_ENC_DIME 0x00000080 -#define SOAP_ENC_MIME 0x00000100 -#define SOAP_ENC_MTOM 0x00000200 -#define SOAP_ENC_ZLIB 0x00000400 -#define SOAP_ENC_SSL 0x00000800 - -#define SOAP_ENC 0x00000FFF /* IO and ENC mask */ - -#define SOAP_XML_STRICT 0x00001000 /* apply strict validation */ -#define SOAP_XML_INDENT 0x00002000 /* emit indented XML */ -#define SOAP_XML_CANONICAL 0x00004000 /* EXC C14N canonical XML */ -#define SOAP_XML_TREE 0x00008000 /* emit XML tree (no id/ref) */ -#define SOAP_XML_GRAPH 0x00010000 -#define SOAP_XML_NIL 0x00020000 -#define SOAP_XML_DOM 0x00040000 -#define SOAP_XML_SEC 0x00080000 /* reserved for WS security */ - -#define SOAP_C_NOIOB 0x00100000 /* don't fault on array index out of bounds (just ignore) */ -#define SOAP_C_UTFSTRING 0x00200000 /* (de)serialize strings with UTF8 content */ -#define SOAP_C_MBSTRING 0x00400000 /* (de)serialize strings with multi-byte content */ -#define SOAP_C_NILSTRING 0x00800000 /* serialize empty strings as nil (omitted) */ - -#define SOAP_DOM_TREE 0x01000000 -#define SOAP_DOM_NODE 0x02000000 -#define SOAP_DOM_ASIS 0x04000000 - -#define SOAP_MIME_POSTCHECK 0x10000000 /* MIME flag (internal) */ - -#define SOAP_IO_DEFAULT SOAP_IO_FLUSH - -/* SSL client/server authentication settings */ - -#define SOAP_SSL_NO_AUTHENTICATION 0x00 /* for testing purposes */ -#define SOAP_SSL_REQUIRE_SERVER_AUTHENTICATION 0x01 /* client requires server to authenticate */ -#define SOAP_SSL_REQUIRE_CLIENT_AUTHENTICATION 0x02 /* server requires client to authenticate */ -#define SOAP_SSL_SKIP_HOST_CHECK 0x04 /* client does not check the common name of the host in certificate */ -#define SOAP_SSL_RSA 0x08 /* use RSA */ -#define SOAP_SSLv3_TLSv1 0x00 /* SSL v3 and TLS v1 support by default */ -#define SOAP_SSLv3 0x10 /* SSL v3 only */ -#define SOAP_TLSv1 0x20 /* TLS v1 only */ - -#define SOAP_SSL_DEFAULT (SOAP_SSL_REQUIRE_SERVER_AUTHENTICATION | SOAP_SSLv3_TLSv1) - -/* state */ - -#define SOAP_INIT 1 -#define SOAP_COPY 2 - -#define soap_check_state(soap) (!(soap) || ((soap)->state != SOAP_INIT && (soap)->state != SOAP_COPY)) - -/* part */ - -#define SOAP_BEGIN 0 -#define SOAP_IN_ENVELOPE 2 -#define SOAP_IN_HEADER 3 -#define SOAP_END_HEADER 4 -#define SOAP_NO_BODY 5 -#define SOAP_IN_BODY 6 -#define SOAP_END_BODY 7 -#define SOAP_END_ENVELOPE 8 -#define SOAP_END 9 -#define SOAP_BEGIN_SECURITY 10 -#define SOAP_IN_SECURITY 11 -#define SOAP_END_SECURITY 12 - -/* DEBUG macros */ - -#ifndef WITH_LEAN -# ifdef DEBUG -# ifndef SOAP_DEBUG -# define SOAP_DEBUG -# endif -# ifndef SOAP_MEM_DEBUG -# define SOAP_MEM_DEBUG -# endif -# endif -#endif - -#ifdef SOAP_MEM_DEBUG -# ifndef SOAP_MALLOC -# define SOAP_MALLOC(soap, size) soap_track_malloc(soap, __FILE__, __LINE__, size) -# endif -# ifndef SOAP_FREE -# define SOAP_FREE(soap, ptr) soap_track_free(soap, __FILE__, __LINE__, ptr) -# endif -#endif - -#ifndef SOAP_MALLOC /* use libc malloc */ -# define SOAP_MALLOC(soap, size) malloc(size) -#endif - -#ifndef SOAP_FREE /* use libc free */ -# define SOAP_FREE(soap, ptr) free(ptr) -#endif - -#ifdef SOAP_DEBUG -# ifndef SOAP_MESSAGE -# define SOAP_MESSAGE fprintf -# endif -# ifndef DBGLOG -# define DBGLOG(DBGFILE, CMD) \ -{ if (soap)\ - { if (!soap->fdebug[SOAP_INDEX_##DBGFILE])\ - soap_open_logfile((struct soap*)soap, SOAP_INDEX_##DBGFILE);\ - if (soap->fdebug[SOAP_INDEX_##DBGFILE])\ - { FILE *fdebug = soap->fdebug[SOAP_INDEX_##DBGFILE];\ - CMD;\ - fflush(fdebug);\ - }\ - }\ -} -# endif -# ifndef DBGMSG -# define DBGMSG(DBGFILE, MSG, LEN) \ -{ if (soap)\ - { if (!soap->fdebug[SOAP_INDEX_##DBGFILE])\ - soap_open_logfile((struct soap*)soap, SOAP_INDEX_##DBGFILE);\ - if (soap->fdebug[SOAP_INDEX_##DBGFILE])\ - { fwrite((MSG), 1, (LEN), soap->fdebug[SOAP_INDEX_##DBGFILE]);\ - fflush(soap->fdebug[SOAP_INDEX_##DBGFILE]);\ - }\ - }\ -} -# endif -# ifndef DGBFUN -# define DBGFUN(FNAME) DBGLOG(TEST, SOAP_MESSAGE(fdebug, "%s(%d): %s()\n", __FILE__, __LINE__, FNAME)) -# define DBGFUN1(FNAME, FMT, ARG) DBGLOG(TEST, SOAP_MESSAGE(fdebug, "%s(%d): %s("FMT")\n", __FILE__, __LINE__, FNAME, (ARG))) -# define DBGFUN2(FNAME, FMT1, ARG1, FMT2, ARG2) DBGLOG(TEST, SOAP_MESSAGE(fdebug, "%s(%d): %s("FMT1", "FMT2")\n", __FILE__, __LINE__, FNAME, (ARG1), (ARG2))) -# define DBGFUN3(FNAME, FMT1, ARG1, FMT2, ARG2, FMT3, ARG3) DBGLOG(TEST, SOAP_MESSAGE(fdebug, "%s(%d): %s("FMT1", "FMT2", "FMT3")\n", __FILE__, __LINE__, FNAME, (ARG1), (ARG2), (ARG3))) -# endif -# ifndef DBGHEX -# define DBGHEX(DBGFILE, MSG, LEN) \ -{ if (soap)\ - { if (!soap->fdebug[SOAP_INDEX_##DBGFILE])\ - soap_open_logfile(soap, SOAP_INDEX_##DBGFILE);\ - if (soap->fdebug[SOAP_INDEX_##DBGFILE])\ - { int i; char *s;\ - for (s = (char*)(MSG), i = (LEN); i; i--)\ - fprintf(soap->fdebug[SOAP_INDEX_##DBGFILE], "%2.2X ", (int)*s++&0xFF);\ - fflush(soap->fdebug[SOAP_INDEX_##DBGFILE]);\ - }\ - }\ -} -# endif -#else -# define DBGLOG(DBGFILE, CMD) -# define DBGMSG(DBGFILE, MSG, LEN) -# define DBGFUN(FNAME) -# define DBGFUN1(FNAME, FMT, ARG) -# define DBGFUN2(FNAME, FMT1, ARG1, FMT2, ARG2) -# define DBGFUN3(FNAME, FMT1, ARG1, FMT2, ARG2, FMT3, ARG3) -# define DBGHEX(DBGFILE, MSG, LEN) -#endif - -/* UCS-4 requires 32 bits (0-7FFFFFFF, the sign bit is used by gSOAP to distinguish XML entities) */ -typedef soap_int32 soap_wchar; - -/* namespace table row */ -struct Namespace -{ const char *id; - const char *ns; - const char *in; - char *out; -}; - -/* namespace stack */ -struct soap_nlist -{ struct soap_nlist *next; - unsigned int level; /* nesting depth level */ - short index; /* corresponding entry in ns mapping table */ - char *ns; /* only set when parsed ns URI is not in the ns mapping table */ - char id[1]; /* the actual string value flows into the allocated region below this struct */ -}; - -/* block stack for nested block allocations */ -struct soap_blist -{ struct soap_blist *next; - char *ptr; - size_t size; -}; - -/* array layout */ -struct soap_array -{ void *__ptr; - int __size; -}; - -/* pointer serialization management */ -struct soap_plist -{ struct soap_plist *next; - const void *ptr; - const struct soap_array *array; - int type; - int id; - char mark1; - char mark2; -}; - -/* block allocation for pointer serialization management */ -struct soap_pblk -{ struct soap_pblk *next; - struct soap_plist plist[SOAP_PTRBLK]; -}; - -#ifdef SOAP_MEM_DEBUG -/* malloc/free tracking for debugging */ -struct soap_mlist -{ struct soap_mlist *next; - const void *ptr; - const char *file; - int line; - short live; -}; -#endif - -/* class allocation list */ -struct soap_clist -{ struct soap_clist *next; - void *ptr; - int type; - int size; - int (*fdelete)(struct soap_clist*); -}; - -/* attributes */ -struct soap_attribute -{ struct soap_attribute *next; - char *value; - size_t size; - char *ns; - short visible; - char name[1]; /* the actual name string flows into the allocated region below this struct */ -}; - -#ifndef WITH_LEAN -struct soap_cookie -{ struct soap_cookie *next; - char *name; - char *value; - char *domain; - char *path; - time_t expire; /* client-side: local time to expire */ - long maxage; /* server-side: seconds to expire */ - unsigned int version; - short secure; - short session; /* server-side */ - short env; /* server-side: got cookie from client and should not be (re)send */ - short modified; /* server-side: client cookie was modified and should be send */ -}; -#endif - -#ifdef __cplusplus -SOAP_FMAC1 struct soap_multipart* SOAP_FMAC2 soap_next_multipart(struct soap_multipart*); - -class soap_multipart_iterator -{ public: - struct soap_multipart *content; - bool operator==(const soap_multipart_iterator& iter) const - { return content == iter.content; } - bool operator!=(const soap_multipart_iterator& iter) const - { return content != iter.content; } - struct soap_multipart &operator*() const - { return *content; } - soap_multipart_iterator &operator++() - { content = soap_next_multipart(content); return *this; } - soap_multipart_iterator() : content(NULL) - { } - soap_multipart_iterator(struct soap_multipart *p) : content(p) - { } -}; -#endif - -#ifndef WITH_LEANER -struct soap_dime -{ size_t count; - size_t size; - size_t chunksize; - size_t buflen; - char flags; - char *ptr; - const char *id; - const char *type; - const char *options; - struct soap_multipart *list; /* list of DIME attachments received */ - struct soap_multipart *first, *last; /* temporary in/out queue */ -#ifdef __cplusplus - soap_multipart_iterator begin() - { soap_multipart_iterator iter(list); return iter; }; - soap_multipart_iterator end() - { soap_multipart_iterator iter(NULL); return iter; }; -#endif -}; -#endif - -#ifndef WITH_LEANER -struct soap_mime -{ char *boundary; /* MIME boundary */ - const char *start; /* MIME start ID */ - struct soap_multipart *list; /* list of MIME attachments received */ - struct soap_multipart *first, *last; /* temporary in/out queue */ -#ifdef __cplusplus - soap_multipart_iterator begin() - { soap_multipart_iterator iter(list); return iter; }; - soap_multipart_iterator end() - { soap_multipart_iterator iter(NULL); return iter; }; -#endif -}; -#endif - -#ifndef WITH_LEANER -/* RFC2045 MIME content transfer encodings */ -enum soap_mime_encoding -{ SOAP_MIME_NONE, - SOAP_MIME_7BIT, - SOAP_MIME_8BIT, - SOAP_MIME_BINARY, - SOAP_MIME_QUOTED_PRINTABLE, - SOAP_MIME_BASE64, - SOAP_MIME_IETF_TOKEN, - SOAP_MIME_X_TOKEN -}; -#endif - -#ifndef WITH_LEANER -/* DIME/MIME multipart list */ -struct soap_multipart -{ struct soap_multipart *next; - char *ptr; /* points to raw data content */ - size_t size; /* size of data content */ - const char *id; /* DIME/MIME content ID or form data name */ - const char *type; /* DIME/MIME type (MIME type format) */ - const char *options; /* DIME options */ - enum soap_mime_encoding encoding; /* MIME Content-Transfer-Encoding */ - const char *location; /* MIME Content-Location (optional) */ - const char *description; /* MIME Content-Description (optional) */ -#ifdef __cplusplus - typedef soap_multipart_iterator iterator; -#endif -}; -#endif - -#ifndef WITH_LEANER -/* attachment DIME and MTOM XOP forwarding */ -struct soap_xlist -{ struct soap_xlist *next; - unsigned char **ptr; - int *size; - char *id; - char **type; - char **options; -}; -#endif - -/******************************************************************************/ - -#ifndef WITH_LEANER -#ifdef __cplusplus -class soap_dom_attribute_iterator -{ public: - struct soap_dom_attribute *att; - const char *nstr; - const char *name; - bool operator==(const soap_dom_attribute_iterator&) const; - bool operator!=(const soap_dom_attribute_iterator&) const; - struct soap_dom_attribute &operator*() const; - soap_dom_attribute_iterator &operator++(); - soap_dom_attribute_iterator(); - soap_dom_attribute_iterator(struct soap_dom_attribute*); - ~soap_dom_attribute_iterator(); -}; -#endif -#endif - -#ifndef WITH_LEANER -struct soap_dom_attribute -{ struct soap_dom_attribute *next; - const char *nstr; - char *name; - char *data; - wchar_t *wide; - struct soap *soap; -#ifdef __cplusplus - typedef soap_dom_attribute_iterator iterator; - struct soap_dom_attribute &set(const char *nstr, const char *name); /* set namespace and name */ - struct soap_dom_attribute &set(const char *data); /* set data */ - soap_dom_attribute_iterator begin(); - soap_dom_attribute_iterator end(); - soap_dom_attribute_iterator find(const char *nstr, const char *name); - void unlink(); - soap_dom_attribute(); - soap_dom_attribute(struct soap *soap); - soap_dom_attribute(struct soap *soap, const char *nstr, const char *name, const char *data); - ~soap_dom_attribute(); -#endif -}; -#endif - -#ifndef WITH_LEANER -#ifdef __cplusplus -class soap_dom_element_iterator -{ public: - struct soap_dom_element *elt; - const char *nstr; - const char *name; - int type; - bool operator==(const soap_dom_element_iterator&) const; - bool operator!=(const soap_dom_element_iterator&) const; - struct soap_dom_element &operator*() const; - soap_dom_element_iterator &operator++(); - soap_dom_element_iterator(); - soap_dom_element_iterator(struct soap_dom_element*); - ~soap_dom_element_iterator(); -}; -#endif -#endif - -#ifndef WITH_LEANER -struct soap_dom_element -{ struct soap_dom_element *next; /* next sibling */ - struct soap_dom_element *prnt; /* parent */ - struct soap_dom_element *elts; /* list of child elements */ - struct soap_dom_attribute *atts; /* list of attributes */ - const char *nstr; /* namespace string */ - char *name; /* element tag name */ - char *data; /* element content data (with SOAP_C_UTFSTRING flag set) */ - wchar_t *wide; /* element content data */ - int type; /* optional: serialized C/C++ data type */ - void *node; /* optional: pointer to serialized C/C++ data */ - char *head; /* leading whitespace to start tag */ - char *tail; /* leading whitespace to end tag */ - struct soap *soap; /* soap context that manages this node */ -#ifdef __cplusplus - typedef soap_dom_element_iterator iterator; - struct soap_dom_element &set(const char *nstr, const char *name); - struct soap_dom_element &set(const char *data); - struct soap_dom_element &set(void *node, int type); - struct soap_dom_element &add(struct soap_dom_element*); - struct soap_dom_element &add(struct soap_dom_element&); - struct soap_dom_element &add(struct soap_dom_attribute*); - struct soap_dom_element &add(struct soap_dom_attribute&); - soap_dom_element_iterator begin(); - soap_dom_element_iterator end(); - soap_dom_element_iterator find(const char *nstr, const char *name); - soap_dom_element_iterator find(int type); - void unlink(); - soap_dom_element(); - soap_dom_element(struct soap *soap); - soap_dom_element(struct soap *soap, const char *nstr, const char *name); - soap_dom_element(struct soap *soap, const char *nstr, const char *name, const char *data); - soap_dom_element(struct soap *soap, const char *nstr, const char *name, void *node, int type); - ~soap_dom_element(); -#endif -}; -SOAP_FMAC1 struct soap_dom_element * SOAP_FMAC2 soap_dom_next_element(struct soap_dom_element *elt); -SOAP_FMAC1 struct soap_dom_attribute * SOAP_FMAC2 soap_dom_next_attribute(struct soap_dom_attribute *att); -#endif - -#if defined(__cplusplus) && !defined(WITH_LEAN) -} -extern std::ostream &operator<<(std::ostream&, const struct soap_dom_element&); -extern std::istream &operator>>(std::istream&, struct soap_dom_element&); -extern "C" { -#endif - -/******************************************************************************/ - -#ifdef WIN32 -# ifdef SOAP_STD_EXPORTS -# define SOAP_STD_API __declspec(dllexport) -# else -# define SOAP_STD_API -# endif -#else -# define SOAP_STD_API -#endif - -struct SOAP_STD_API soap -{ short state; /* 0 = uninitialized, 1 = initialized, 2 = copy of another soap struct */ - short version; /* 1 = SOAP1.1 and 2 = SOAP1.2 (set automatically from namespace URI in nsmap table) */ - soap_mode mode; - soap_mode imode; - soap_mode omode; - const char *float_format; /* user-definable format string for floats (<1024 chars) */ - const char *double_format; /* user-definable format string for doubles (<1024 chars) */ - const char *dime_id_format; /* user-definable format string for integer DIME id ( 0, gives socket recv timeout in seconds, < 0 in usec */ - int send_timeout; /* when > 0, gives socket send timeout in seconds, < 0 in usec */ - int connect_timeout; /* when > 0, gives socket connect() timeout in seconds, < 0 in usec */ - int accept_timeout; /* when > 0, gives socket accept() timeout in seconds, < 0 in usec */ - int socket_flags; /* socket recv() and send() flags, e.g. set to MSG_NOSIGNAL to disable sigpipe */ - int connect_flags; /* connect() SOL_SOCKET sockopt flags, e.g. set to SO_DEBUG to debug socket */ - int bind_flags; /* bind() SOL_SOCKET sockopt flags, e.g. set to SO_REUSEADDR to enable reuse */ - int accept_flags; /* accept() SOL_SOCKET sockopt flags */ - const struct Namespace *namespaces; /* Pointer to global namespace mapping table */ - struct Namespace *local_namespaces; /* Local namespace mapping table */ - struct soap_nlist *nlist; /* namespace stack */ - struct soap_blist *blist; /* block allocation stack */ - struct soap_clist *clist; /* class instance allocation list */ - void *alist; /* memory allocation (malloc) list */ - struct soap_ilist *iht[SOAP_IDHASH]; - struct soap_plist *pht[SOAP_PTRHASH]; - struct soap_pblk *pblk; /* plist block allocation */ - short pidx; /* plist block allocation */ - struct SOAP_ENV__Header *header; - struct SOAP_ENV__Fault *fault; - int idnum; - void *user; /* to pass user-defined data */ - struct soap_plugin *plugins; /* linked list of plug-in data */ - char *userid; /* HTTP Basic authorization userid */ - char *passwd; /* HTTP Basic authorization passwd */ - int (*fpost)(struct soap*, const char*, const char*, int, const char*, const char*, size_t); - int (*fget)(struct soap*); - int (*fform)(struct soap*); - int (*fposthdr)(struct soap*, const char*, const char*); - int (*fresponse)(struct soap*, int, size_t); - int (*fparse)(struct soap*); - int (*fparsehdr)(struct soap*, const char*, const char*); - int (*fheader)(struct soap*); - int (*fresolve)(struct soap*, const char*, struct in_addr* inaddr); - int (*fconnect)(struct soap*, const char*, const char*, int); - int (*fdisconnect)(struct soap*); - int (*fclosesocket)(struct soap*, SOAP_SOCKET); - int (*fshutdownsocket)(struct soap*, SOAP_SOCKET, int); - int (*fopen)(struct soap*, const char*, const char*, int); - int (*faccept)(struct soap*, int, struct sockaddr*, int *n); - int (*fclose)(struct soap*); - int (*fsend)(struct soap*, const char*, size_t); - size_t (*frecv)(struct soap*, char*, size_t); - int (*fpoll)(struct soap*); - void (*fseterror)(struct soap*, const char **c, const char **s); - int (*fignore)(struct soap*, const char*); - int (*fserveloop)(struct soap*); - void *(*fplugin)(struct soap*, const char*); - void *(*fmalloc)(struct soap*, size_t); -#ifndef WITH_LEANER - int (*fprepareinit)(struct soap*); - int (*fpreparesend)(struct soap*, const char*, size_t); - int (*fpreparerecv)(struct soap*, const char*, size_t); - int (*fpreparefinal)(struct soap*); - void *(*fdimereadopen)(struct soap*, void*, const char*, const char*, const char*); - void *(*fdimewriteopen)(struct soap*, const char*, const char*, const char*); - void (*fdimereadclose)(struct soap*, void*); - void (*fdimewriteclose)(struct soap*, void*); - size_t (*fdimeread)(struct soap*, void*, char*, size_t); - int (*fdimewrite)(struct soap*, void*, const char*, size_t); - void *(*fmimereadopen)(struct soap*, void*, const char*, const char*, const char*); - void *(*fmimewriteopen)(struct soap*, void*, const char*, const char*, const char*, enum soap_mime_encoding); - void (*fmimereadclose)(struct soap*, void*); - void (*fmimewriteclose)(struct soap*, void*); - size_t (*fmimeread)(struct soap*, void*, char*, size_t); - int (*fmimewrite)(struct soap*, void*, const char*, size_t); -#endif - int master; - int socket; -#if defined(__cplusplus) && !defined(WITH_LEAN) - std::ostream *os; - std::istream *is; -#else - void *os; /* preserve alignment */ - void *is; /* preserve alignment */ -#endif -#ifndef UNDER_CE - int sendfd; - int recvfd; -#else - FILE *sendfd; - FILE *recvfd; -#endif - size_t bufidx; /* index in soap.buf[] */ - size_t buflen; /* length of soap.buf[] content */ - soap_wchar ahead; /* parser lookahead */ - short cdata; /* CDATA parser state */ - short body; /* parsed XML element has a body or not */ - unsigned int level; /* XML nesting level */ - size_t count; /* message length counter */ - size_t length; /* message length as set by HTTP header */ - char *labbuf; /* look-aside buffer */ - size_t lablen; /* look-aside buffer allocated length */ - size_t labidx; /* look-aside buffer index to available part */ - char buf[SOAP_BUFLEN];/* send and receive buffer */ - char msgbuf[1024]; /* in/output buffer for messages >=1024 bytes */ - char tmpbuf[1024]; /* in/output buffer for HTTP/MIME headers, simpleType values, attribute names, and DIME must be >=1024 bytes */ - char tag[SOAP_TAGLEN]; - char id[SOAP_TAGLEN]; - char href[SOAP_TAGLEN]; - char type[SOAP_TAGLEN]; - char arrayType[SOAP_TAGLEN]; - char arraySize[SOAP_TAGLEN]; - char arrayOffset[SOAP_TAGLEN]; - short other; - short position; - int positions[SOAP_MAXDIMS]; - short root; - struct soap_attribute *attributes; /* attribute list */ - short encoding; /* when set, output encodingStyle */ - short mustUnderstand; /* a mustUnderstand element was parsed or is output */ - short keep_alive; /* connection should be kept open */ - short null; /* parsed XML is xsi:nil */ - short ns; /* when not set, output full xmlns bindings */ - short part; /* parsing state */ - short alloced; - short peeked; - size_t chunksize; - size_t chunkbuflen; - char endpoint[SOAP_TAGLEN]; - char path[SOAP_TAGLEN]; - char host[SOAP_TAGLEN]; - char *action; - char *authrealm; /* HTTP authentication realm */ - char *prolog; /* XML declaration prolog */ - unsigned long ip; /* IP number */ - int port; /* port number */ - unsigned int max_keep_alive; - const char *proxy_http_version;/* HTTP version of proxy "1.0" or "1.1" */ - const char *proxy_host; /* Proxy Server host name */ - int proxy_port; /* Proxy Server port (default = 8080) */ - const char *proxy_userid; /* Proxy Authorization user name */ - const char *proxy_passwd; /* Proxy Authorization password */ - int status; /* -1 when request, else error code to be returned by server */ - int error; - int errmode; - int errnum; -#ifndef WITH_LEANER - struct soap_dom_element *dom; - struct soap_dime dime; - struct soap_mime mime; - struct soap_xlist *xlist; -#endif -#if !defined(WITH_LEAN) || defined(SOAP_DEBUG) - const char *logfile[SOAP_MAXLOGS]; - FILE *fdebug[SOAP_MAXLOGS]; - struct soap_mlist *mht[SOAP_PTRHASH]; -#endif -#ifndef WITH_LEAN - const char *c14ninclude; - const char *c14nexclude; - struct soap_cookie *cookies; - const char *cookie_domain; - const char *cookie_path; - int cookie_max; -#endif -#ifndef WITH_NOIO -#ifdef WITH_IPV6 - struct sockaddr_storage peer; /* IPv6: set by soap_accept and by UDP recv */ -#else - struct sockaddr_in peer; /* IPv4: set by soap_connect/soap_accept and by UDP recv */ -#endif -#endif - size_t peerlen; -#ifdef WITH_OPENSSL - int (*fsslauth)(struct soap*); - int (*fsslverify)(int, X509_STORE_CTX*); - BIO *bio; - SSL *ssl; - SSL_CTX *ctx; - unsigned short ssl_flags; - const char *keyfile; - const char *password; - const char *dhfile; - const char *cafile; - const char *capath; - const char *crlfile; - const char *randfile; - SSL_SESSION *session; - char session_host[SOAP_TAGLEN]; - int session_port; -#endif -#ifdef WITH_ZLIB - short zlib_state; /* SOAP_ZLIB_NONE, SOAP_ZLIB_DEFLATE, or SOAP_ZLIB_INFLATE */ - short zlib_in; /* SOAP_ZLIB_NONE, SOAP_ZLIB_DEFLATE, or SOAP_ZLIB_GZIP */ - short zlib_out; /* SOAP_ZLIB_NONE, SOAP_ZLIB_DEFLATE, or SOAP_ZLIB_GZIP */ - z_stream d_stream; /* decompression stream */ - char z_buf[SOAP_BUFLEN]; /* buffer */ - size_t z_buflen; - unsigned short z_level; /* compression level to be used (0=none, 1=fast to 9=best) */ - uLong z_crc; /* internal gzip crc */ - float z_ratio_in; /* detected compression ratio compressed_length/length of inbound message */ - float z_ratio_out; /* detected compression ratio compressed_length/length of outbound message */ -#endif -#ifdef WMW_RPM_IO - void *rpmreqid; -#endif -#ifndef WITH_LEAN -#ifdef __cplusplus - soap(); - soap(soap_mode); - soap(soap_mode, soap_mode); - soap(struct soap&); - ~soap(); -#endif -#endif -}; - -struct soap_code_map -{ long code; - const char *string; -}; - -/* forwarding list */ -struct soap_flist -{ struct soap_flist *next; - int type; - void *ptr; - unsigned int level; - size_t len; - void (*fcopy)(struct soap*, int, int, void*, size_t, const void*, size_t); -}; - -/* id-ref forwarding list */ -struct soap_ilist -{ struct soap_ilist *next; - int type; - size_t size; - void *link; - void *copy; - struct soap_flist *flist; - void *ptr; - unsigned int level; - char id[1]; /* the actual id string value flows into the allocated region below this struct */ -}; - -struct soap_plugin -{ struct soap_plugin *next; - const char *id; - void *data; - int (*fcopy)(struct soap *soap, struct soap_plugin *dst, struct soap_plugin *src); - void (*fdelete)(struct soap *soap, struct soap_plugin *p); /* should delete fields of plugin only and not free(p) */ -}; - -#ifndef WITH_NONAMESPACES -extern SOAP_NMAC struct Namespace namespaces[]; -#endif - -#ifndef WITH_LEAN -# define soap_get0(soap) (((soap)->bufidx>=(soap)->buflen && soap_recv(soap)) ? EOF : (unsigned char)(soap)->buf[(soap)->bufidx]) -# define soap_get1(soap) (((soap)->bufidx>=(soap)->buflen && soap_recv(soap)) ? EOF : (unsigned char)(soap)->buf[(soap)->bufidx++]) -#else -soap_wchar soap_get0(struct soap*); -soap_wchar soap_get1(struct soap*); -#endif - -#define soap_revget1(soap) ((soap)->bufidx--) -#define soap_unget(soap, c) ((soap)->ahead = c) -#define soap_register_plugin(soap, plugin) soap_register_plugin_arg(soap, plugin, NULL) -#define soap_imode(soap, n) ((soap)->mode = (soap)->imode = (n)) -#define soap_set_imode(soap, n) ((soap)->imode |= (n)) -#define soap_clr_imode(soap, n) ((soap)->imode &= ~(n)) -#define soap_omode(soap, n) ((soap)->mode = (soap)->omode = (n)) -#define soap_set_omode(soap, n) ((soap)->omode |= (n)) -#define soap_clr_omode(soap, n) ((soap)->omode &= ~(n)) -#define soap_set_mode(soap, n) ((soap)->imode |= (n), (soap)->omode |= (n)) -#define soap_clr_mode(soap, n) ((soap)->imode &= ~(n), (soap)->omode &= ~(n)) -#define soap_destroy(soap) soap_delete((soap), NULL) - -#ifdef HAVE_STRRCHR -# define soap_strrchr(s, t) strrchr(s, t) -#else - SOAP_FMAC1 char* SOAP_FMAC2 soap_strrchr(const char *s, int t); -#endif - -#ifdef HAVE_STRTOL -# define soap_strtol(s, t, b) strtol(s, t, b) -#else - SOAP_FMAC1 long SOAP_FMAC2 soap_strtol(const char *s, char **t, int b); -#endif - -#ifdef HAVE_STRTOUL -# define soap_strtoul(s, t, b) strtoul(s, t, b) -#else - SOAP_FMAC1 unsigned long SOAP_FMAC2 soap_strtoul(const char *s, char **t, int b); -#endif - -#if defined(WITH_OPENSSL) -# define soap_random soap_rand() -SOAP_FMAC1 int SOAP_FMAC2 soap_rand(void); -#elif defined(HAVE_RANDOM) -# define soap_random (int)random() -#else -# define soap_random rand() -#endif - -#ifdef WITH_NOIDREF -# define soap_embedded(s, p, t) (0) -# define soap_id_lookup(s, i, p, t, n, k) (p) -# define soap_id_forward(s, h, p, len, st, tt, n, k, fc) (p) -# define soap_reference(s, a, t) (1) -# define soap_array_reference(s, p, a, n, t) (1) -# define soap_embed(s, p, a, n, t, pp) (0) -# define soap_embedded_id(s, i, p, t) (i) -# define soap_is_embedded(s, p) (0) -# define soap_is_single(s, p) (1) -# define soap_lookup_type(s, i) (0) -# define soap_getindependent(s) (0) -# define soap_putindependent(s) (0) -# define soap_getelement(s, n) (n) -# define soap_putelement(s, p, t, i, n) (0) -# define soap_markelement(s, p, n) (0) -#endif - -SOAP_FMAC1 void SOAP_FMAC2 soap_fault(struct soap*); -SOAP_FMAC1 const char** SOAP_FMAC2 soap_faultcode(struct soap*); -SOAP_FMAC1 const char** SOAP_FMAC2 soap_faultsubcode(struct soap*); -SOAP_FMAC1 const char** SOAP_FMAC2 soap_faultstring(struct soap*); -SOAP_FMAC1 const char** SOAP_FMAC2 soap_faultdetail(struct soap*); -SOAP_FMAC1 void SOAP_FMAC2 soap_serializeheader(struct soap*); -SOAP_FMAC1 int SOAP_FMAC2 soap_putheader(struct soap*); -SOAP_FMAC1 int SOAP_FMAC2 soap_getheader(struct soap*); -SOAP_FMAC1 void SOAP_FMAC2 soap_serializefault(struct soap*); -SOAP_FMAC1 int SOAP_FMAC2 soap_putfault(struct soap*); -SOAP_FMAC1 int SOAP_FMAC2 soap_getfault(struct soap*); - -SOAP_FMAC1 void SOAP_FMAC2 soap_ssl_init(void); -SOAP_FMAC1 int SOAP_FMAC2 soap_poll(struct soap*); -SOAP_FMAC1 int SOAP_FMAC2 soap_connect_command(struct soap*, int, const char*, const char*); -SOAP_FMAC1 int SOAP_FMAC2 soap_connect(struct soap*, const char*, const char*); -SOAP_FMAC1 int SOAP_FMAC2 soap_bind(struct soap*, const char*, int, int); -SOAP_FMAC1 int SOAP_FMAC2 soap_accept(struct soap*); -SOAP_FMAC1 int SOAP_FMAC2 soap_ssl_accept(struct soap*); -SOAP_FMAC1 const char * SOAP_FMAC2 soap_ssl_error(struct soap*, int); - -SOAP_FMAC1 int SOAP_FMAC2 soap_ssl_server_context(struct soap*, unsigned short, const char*, const char*, const char*, const char*, const char*, const char*, const char*); -SOAP_FMAC1 int SOAP_FMAC2 soap_ssl_client_context(struct soap*, unsigned short, const char*, const char*, const char*, const char*, const char*); - -SOAP_FMAC1 int SOAP_FMAC2 soap_puthttphdr(struct soap*, int status, size_t count); - -SOAP_FMAC1 const char* SOAP_FMAC2 soap_get_header_attribute(struct soap*, const char*, const char*); -SOAP_FMAC1 const char* SOAP_FMAC2 soap_decode_key(char*, size_t, const char*); -SOAP_FMAC1 const char* SOAP_FMAC2 soap_decode_val(char*, size_t, const char*); - -SOAP_FMAC1 size_t SOAP_FMAC2 soap_hash(const char*); -SOAP_FMAC1 void SOAP_FMAC2 soap_set_endpoint(struct soap*, const char*); -SOAP_FMAC1 int SOAP_FMAC2 soap_flush_raw(struct soap*, const char*, size_t); -SOAP_FMAC1 int SOAP_FMAC2 soap_flush(struct soap*); -SOAP_FMAC1 soap_wchar SOAP_FMAC2 soap_get(struct soap*); -SOAP_FMAC1 soap_wchar SOAP_FMAC2 soap_getchar(struct soap*); -SOAP_FMAC1 int SOAP_FMAC2 soap_tag_cmp(const char*, const char*); -SOAP_FMAC1 void SOAP_FMAC2 soap_set_fault(struct soap*); -SOAP_FMAC1 int SOAP_FMAC2 soap_sender_fault(struct soap*, const char*, const char*); -SOAP_FMAC1 int SOAP_FMAC2 soap_sender_fault_subcode(struct soap*, const char*, const char*, const char*); -SOAP_FMAC1 int SOAP_FMAC2 soap_receiver_fault(struct soap*, const char*, const char*); -SOAP_FMAC1 int SOAP_FMAC2 soap_receiver_fault_subcode(struct soap*, const char*, const char*, const char*); -SOAP_FMAC1 int SOAP_FMAC2 soap_set_sender_error(struct soap*, const char*, const char*, int); -SOAP_FMAC1 int SOAP_FMAC2 soap_set_receiver_error(struct soap*, const char*, const char*, int); - -SOAP_FMAC1 int SOAP_FMAC2 soap_send_raw(struct soap*, const char*, size_t); -SOAP_FMAC1 int SOAP_FMAC2 soap_recv_raw(struct soap*); -SOAP_FMAC1 int SOAP_FMAC2 soap_recv(struct soap*); -SOAP_FMAC1 int SOAP_FMAC2 soap_send(struct soap*, const char*); -SOAP_FMAC1 int SOAP_FMAC2 soap_send2(struct soap*, const char*, const char*); -SOAP_FMAC1 int SOAP_FMAC2 soap_send3(struct soap*, const char*, const char*, const char*); - -SOAP_FMAC1 int SOAP_FMAC2 soap_pututf8(struct soap*, unsigned long); -SOAP_FMAC1 soap_wchar SOAP_FMAC2 soap_getutf8(struct soap*); - -SOAP_FMAC1 int SOAP_FMAC2 soap_putbase64(struct soap*, const unsigned char*, int); -SOAP_FMAC1 unsigned char* SOAP_FMAC2 soap_getbase64(struct soap*, int*, int); -SOAP_FMAC1 int SOAP_FMAC2 soap_puthex(struct soap*, const unsigned char*, int); -SOAP_FMAC1 unsigned char* SOAP_FMAC2 soap_gethex(struct soap*, int*); - -#ifndef WITH_LEANER -SOAP_FMAC1 int SOAP_FMAC2 soap_xop_forward(struct soap*, unsigned char**, int*, char**, char**, char**); -SOAP_FMAC1 int SOAP_FMAC2 soap_dime_forward(struct soap*, unsigned char**, int*, char**, char**, char**); -#endif - -#ifndef WITH_NOIDREF -SOAP_FMAC1 int SOAP_FMAC2 soap_pointer_lookup_id(struct soap*, void *p, int t, struct soap_plist**); -SOAP_FMAC1 int SOAP_FMAC2 soap_pointer_lookup(struct soap*, const void *p, int t, struct soap_plist**); -SOAP_FMAC1 int SOAP_FMAC2 soap_pointer_enter(struct soap*, const void *p, const struct soap_array *a, int n, int t, struct soap_plist**); -SOAP_FMAC1 int SOAP_FMAC2 soap_array_pointer_lookup(struct soap*, const void *p, const struct soap_array *a, int n, int t, struct soap_plist**); -SOAP_FMAC1 int SOAP_FMAC2 soap_embed(struct soap *soap, const void *p, const struct soap_array *a, int n, const char *tag, int type); -SOAP_FMAC1 struct soap_ilist* SOAP_FMAC2 soap_lookup(struct soap*, const char*); -SOAP_FMAC1 struct soap_ilist* SOAP_FMAC2 soap_enter(struct soap*, const char*); -SOAP_FMAC1 int SOAP_FMAC2 soap_resolve(struct soap*); -SOAP_FMAC1 void SOAP_FMAC2 soap_embedded(struct soap*, const void *p, int t); -SOAP_FMAC1 int SOAP_FMAC2 soap_reference(struct soap*, const void *p, int t); -SOAP_FMAC1 int SOAP_FMAC2 soap_array_reference(struct soap*, const void *p, const struct soap_array *a, int n, int t); -SOAP_FMAC1 int SOAP_FMAC2 soap_embedded_id(struct soap*, int id, const void *p, int t); -SOAP_FMAC1 int SOAP_FMAC2 soap_is_embedded(struct soap*, struct soap_plist*); -SOAP_FMAC1 int SOAP_FMAC2 soap_is_single(struct soap*, struct soap_plist*); -SOAP_FMAC1 void SOAP_FMAC2 soap_set_embedded(struct soap*, struct soap_plist*); -#endif - -SOAP_FMAC1 int SOAP_FMAC2 soap_begin_count(struct soap*); -SOAP_FMAC1 int SOAP_FMAC2 soap_end_count(struct soap*); -SOAP_FMAC1 int SOAP_FMAC2 soap_begin_send(struct soap*); -SOAP_FMAC1 int SOAP_FMAC2 soap_end_send(struct soap*); - -SOAP_FMAC1 const struct soap_code_map* SOAP_FMAC2 soap_code(const struct soap_code_map*, const char*); -SOAP_FMAC1 long SOAP_FMAC2 soap_code_int(const struct soap_code_map*, const char*, long); -SOAP_FMAC1 const char* SOAP_FMAC2 soap_code_str(const struct soap_code_map*, long); -SOAP_FMAC1 long SOAP_FMAC2 soap_code_bits(const struct soap_code_map*, const char*); -SOAP_FMAC1 const char* SOAP_FMAC2 soap_code_list(struct soap*, const struct soap_code_map*, long); - -SOAP_FMAC1 int SOAP_FMAC2 soap_getline(struct soap*, char*, int); -SOAP_FMAC1 int SOAP_FMAC2 soap_begin_recv(struct soap*); -SOAP_FMAC1 int SOAP_FMAC2 soap_end_recv(struct soap*); - -SOAP_FMAC1 void* SOAP_FMAC2 soap_malloc(struct soap*, size_t); -SOAP_FMAC1 void SOAP_FMAC2 soap_dealloc(struct soap*, void*); -SOAP_FMAC1 struct soap_clist * SOAP_FMAC2 soap_link(struct soap*, void*, int, int, int (*fdelete)(struct soap_clist*)); -SOAP_FMAC1 void SOAP_FMAC2 soap_unlink(struct soap*, const void*); -SOAP_FMAC1 void SOAP_FMAC2 soap_free_temp(struct soap*); -SOAP_FMAC1 void SOAP_FMAC2 soap_del(struct soap*); - -SOAP_FMAC1 void* SOAP_FMAC2 soap_track_malloc(struct soap*, const char*, int, size_t); -SOAP_FMAC1 void SOAP_FMAC2 soap_track_free(struct soap*, const char*, int, void*); - -#ifndef WITH_NOIDREF -SOAP_FMAC1 int SOAP_FMAC2 soap_lookup_type(struct soap*, const char *id); -SOAP_FMAC1 void* SOAP_FMAC2 soap_id_lookup(struct soap*, const char *id, void **p, int t, size_t n, unsigned int k); -SOAP_FMAC1 void* SOAP_FMAC2 soap_id_forward(struct soap*, const char *id, void *p, size_t len, int st, int tt, size_t n, unsigned int k, void(*fcopy)(struct soap*, int, int, void*, size_t, const void*, size_t)); -#endif -SOAP_FMAC1 void* SOAP_FMAC2 soap_id_enter(struct soap*, const char *id, void *p, int t, size_t n, unsigned int k, const char *type, const char *arrayType, void *(*finstantiate)(struct soap*, int, const char*, const char*, size_t*)); -SOAP_FMAC1 void SOAP_FMAC2 soap_fcopy(struct soap *soap, int st, int tt, void *p, size_t, const void *q, size_t n); - -SOAP_FMAC1 int SOAP_FMAC2 soap_size(const int *, int); -SOAP_FMAC1 int SOAP_FMAC2 soap_getoffsets(const char *, const int *, int *, int); -SOAP_FMAC1 int SOAP_FMAC2 soap_getsize(const char *, const char *, int *); -SOAP_FMAC1 int SOAP_FMAC2 soap_getsizes(const char *, int *, int); -SOAP_FMAC1 int SOAP_FMAC2 soap_getposition(const char *, int *); - -SOAP_FMAC1 char* SOAP_FMAC2 soap_putsize(struct soap*, const char *, int); -SOAP_FMAC1 char* SOAP_FMAC2 soap_putsizesoffsets(struct soap*, const char *, const int *, const int *, int); -SOAP_FMAC1 char* SOAP_FMAC2 soap_putsizes(struct soap*, const char *, const int *, int); -SOAP_FMAC1 char* SOAP_FMAC2 soap_putoffset(struct soap*, int); -SOAP_FMAC1 char* SOAP_FMAC2 soap_putoffsets(struct soap*, const int *, int); - -SOAP_FMAC1 int SOAP_FMAC2 soap_closesock(struct soap*); - -SOAP_FMAC1 struct soap *SOAP_FMAC2 soap_new(void); -SOAP_FMAC1 struct soap *SOAP_FMAC2 soap_new1(soap_mode); -SOAP_FMAC1 struct soap *SOAP_FMAC2 soap_new2(soap_mode, soap_mode); -SOAP_FMAC1 void SOAP_FMAC2 soap_free(struct soap*); -SOAP_FMAC1 struct soap *SOAP_FMAC2 soap_copy(struct soap*); -SOAP_FMAC1 struct soap *SOAP_FMAC2 soap_copy_context(struct soap*, struct soap*); -SOAP_FMAC1 void SOAP_FMAC2 soap_copy_stream(struct soap*, struct soap*); -SOAP_FMAC1 void SOAP_FMAC2 soap_init(struct soap*); -SOAP_FMAC1 void SOAP_FMAC2 soap_init1(struct soap*, soap_mode); -SOAP_FMAC1 void SOAP_FMAC2 soap_init2(struct soap*, soap_mode, soap_mode); -SOAP_FMAC1 void SOAP_FMAC2 soap_done(struct soap*); -SOAP_FMAC1 void SOAP_FMAC2 soap_cleanup(struct soap*); -SOAP_FMAC1 void SOAP_FMAC2 soap_begin(struct soap*); -SOAP_FMAC1 void SOAP_FMAC2 soap_end(struct soap*); -SOAP_FMAC1 void SOAP_FMAC2 soap_delete(struct soap*, void*); - -#ifdef SOAP_DEBUG -SOAP_FMAC1 void SOAP_FMAC2 soap_set_recv_logfile(struct soap*, const char*); -SOAP_FMAC1 void SOAP_FMAC2 soap_set_sent_logfile(struct soap*, const char*); -SOAP_FMAC1 void SOAP_FMAC2 soap_set_test_logfile(struct soap*, const char*); -SOAP_FMAC1 void SOAP_FMAC2 soap_close_logfiles(struct soap*); -SOAP_FMAC1 void SOAP_FMAC2 soap_open_logfile(struct soap*, int); -#endif - -SOAP_FMAC1 const char* SOAP_FMAC2 soap_value(struct soap*); - -SOAP_FMAC1 int SOAP_FMAC2 soap_match_tag(struct soap*, const char*, const char *); -SOAP_FMAC1 int SOAP_FMAC2 soap_match_array(struct soap*, const char*); - -SOAP_FMAC1 int SOAP_FMAC2 soap_element(struct soap*, const char*, int, const char*); -SOAP_FMAC1 int SOAP_FMAC2 soap_element_begin_out(struct soap*, const char *tag, int id, const char *type); -SOAP_FMAC1 int SOAP_FMAC2 soap_array_begin_out(struct soap*, const char *tag, int id, const char *type, const char *offset); -SOAP_FMAC1 int SOAP_FMAC2 soap_element_ref(struct soap*, const char *tag, int id, int href); -SOAP_FMAC1 int SOAP_FMAC2 soap_element_href(struct soap*, const char *tag, int id, const char *ref, const char *val); -SOAP_FMAC1 int SOAP_FMAC2 soap_element_null(struct soap*, const char *tag, int id, const char *type); -SOAP_FMAC1 int SOAP_FMAC2 soap_element_id(struct soap*, const char *tag, int id, const void *p, const struct soap_array *a, int d, const char *type, int n); -SOAP_FMAC1 int SOAP_FMAC2 soap_element_result(struct soap*, const char *tag); -SOAP_FMAC1 void SOAP_FMAC2 soap_check_result(struct soap*, const char *tag); -SOAP_FMAC1 int SOAP_FMAC2 soap_element_end_out(struct soap*, const char *tag); -SOAP_FMAC1 int SOAP_FMAC2 soap_element_start_end_out(struct soap*, const char *tag); - -SOAP_FMAC1 int SOAP_FMAC2 soap_attribute(struct soap*, const char*, const char*); - -SOAP_FMAC1 int SOAP_FMAC2 soap_element_begin_in(struct soap*, const char *tag, int nillable, const char *type); - -SOAP_FMAC1 int SOAP_FMAC2 soap_element_end_in(struct soap*, const char *tag); - -SOAP_FMAC1 int SOAP_FMAC2 soap_peek_element(struct soap*); - -SOAP_FMAC1 void SOAP_FMAC2 soap_retry(struct soap*); -SOAP_FMAC1 void SOAP_FMAC2 soap_revert(struct soap*); - -SOAP_FMAC1 char* SOAP_FMAC2 soap_strdup(struct soap*, const char*); -SOAP_FMAC1 const char * SOAP_FMAC2 soap_strsearch(const char *big, const char *little); - -SOAP_FMAC1 int SOAP_FMAC2 soap_string_out(struct soap*, const char *s, int flag); -SOAP_FMAC1 char* SOAP_FMAC2 soap_string_in(struct soap*, int, long, long); - -#ifndef WITH_LEANER -SOAP_FMAC1 int SOAP_FMAC2 soap_wstring_out(struct soap*, const wchar_t *s, int flag); -SOAP_FMAC1 wchar_t* SOAP_FMAC2 soap_wstring_in(struct soap*, int, long, long); -#endif - -SOAP_FMAC1 int SOAP_FMAC2 soap_match_namespace(struct soap*, const char *, const char*, int n1, int n2); - -SOAP_FMAC1 int SOAP_FMAC2 soap_set_namespaces(struct soap*, const struct Namespace*); -SOAP_FMAC1 void SOAP_FMAC2 soap_set_local_namespaces(struct soap*); - -SOAP_FMAC1 void SOAP_FMAC2 soap_pop_namespace(struct soap*); -SOAP_FMAC1 int SOAP_FMAC2 soap_push_namespace(struct soap*, const char *,const char *); -SOAP_FMAC1 const char* SOAP_FMAC2 soap_current_namespace(struct soap *soap, const char *tag); - -SOAP_FMAC1 struct soap_nlist* SOAP_FMAC2 soap_lookup_ns(struct soap *soap, const char *tag, size_t n); - -SOAP_FMAC1 int SOAP_FMAC2 soap_store_lab(struct soap*, const char*, size_t); -SOAP_FMAC1 int SOAP_FMAC2 soap_append_lab(struct soap*, const char*, size_t); - -SOAP_FMAC1 int SOAP_FMAC2 soap_new_block(struct soap*); -SOAP_FMAC1 void* SOAP_FMAC2 soap_push_block(struct soap*, size_t); -SOAP_FMAC1 void SOAP_FMAC2 soap_pop_block(struct soap*); -SOAP_FMAC1 size_t SOAP_FMAC2 soap_size_block(struct soap*, size_t); -SOAP_FMAC1 char* SOAP_FMAC2 soap_first_block(struct soap*); -SOAP_FMAC1 char* SOAP_FMAC2 soap_next_block(struct soap*); -SOAP_FMAC1 size_t SOAP_FMAC2 soap_block_size(struct soap*); -SOAP_FMAC1 char* SOAP_FMAC2 soap_save_block(struct soap*, char*, int); -SOAP_FMAC1 void SOAP_FMAC2 soap_end_block(struct soap*); - -SOAP_FMAC1 int SOAP_FMAC2 soap_envelope_begin_out(struct soap*); -SOAP_FMAC1 int soap_envelope_end_out(struct soap*); - -SOAP_FMAC1 int SOAP_FMAC2 soap_envelope_begin_in(struct soap*); -SOAP_FMAC1 int SOAP_FMAC2 soap_envelope_end_in(struct soap*); - -SOAP_FMAC1 int SOAP_FMAC2 soap_body_begin_out(struct soap*); -SOAP_FMAC1 int SOAP_FMAC2 soap_body_end_out(struct soap*); - -SOAP_FMAC1 int SOAP_FMAC2 soap_body_begin_in(struct soap*); -SOAP_FMAC1 int SOAP_FMAC2 soap_body_end_in(struct soap*); - -SOAP_FMAC1 int SOAP_FMAC2 soap_recv_header(struct soap*); - -SOAP_FMAC1 int SOAP_FMAC2 soap_response(struct soap*, int); - -SOAP_FMAC1 int SOAP_FMAC2 soap_send_empty_response(struct soap*, int status); -SOAP_FMAC1 int SOAP_FMAC2 soap_recv_empty_response(struct soap*); - -SOAP_FMAC1 int SOAP_FMAC2 soap_send_fault(struct soap*); -SOAP_FMAC1 int SOAP_FMAC2 soap_recv_fault(struct soap*); - -#ifndef WITH_NOSTDLIB -SOAP_FMAC1 void SOAP_FMAC2 soap_print_fault(struct soap*, FILE*); -SOAP_FMAC1 void SOAP_FMAC2 soap_print_fault_location(struct soap*, FILE*); -#endif - -SOAP_FMAC1 int SOAP_FMAC2 soap_s2byte(struct soap*, const char*, char*); -SOAP_FMAC1 int SOAP_FMAC2 soap_s2short(struct soap*, const char*, short*); -SOAP_FMAC1 int SOAP_FMAC2 soap_s2int(struct soap*, const char*, int*); -SOAP_FMAC1 int SOAP_FMAC2 soap_s2long(struct soap*, const char*, long*); -SOAP_FMAC1 int SOAP_FMAC2 soap_s2LONG64(struct soap*, const char*, LONG64*); -SOAP_FMAC1 int SOAP_FMAC2 soap_s2float(struct soap*, const char*, float*); -SOAP_FMAC1 int SOAP_FMAC2 soap_s2double(struct soap*, const char*, double*); -SOAP_FMAC1 int SOAP_FMAC2 soap_s2unsignedByte(struct soap*, const char*, unsigned char*); -SOAP_FMAC1 int SOAP_FMAC2 soap_s2unsignedShort(struct soap*, const char*, unsigned short*); -SOAP_FMAC1 int SOAP_FMAC2 soap_s2unsignedInt(struct soap*, const char*, unsigned int*); -SOAP_FMAC1 int SOAP_FMAC2 soap_s2unsignedLong(struct soap*, const char*, unsigned long*); -SOAP_FMAC1 int SOAP_FMAC2 soap_s2ULONG64(struct soap*, const char*, ULONG64*); -SOAP_FMAC1 int SOAP_FMAC2 soap_s2string(struct soap*, const char*, char**); -SOAP_FMAC1 int SOAP_FMAC2 soap_s2QName(struct soap*, const char*, char**); - -#ifndef WITH_LEAN -SOAP_FMAC1 int SOAP_FMAC2 soap_s2wchar(struct soap*, const char*, wchar_t**); -SOAP_FMAC1 int SOAP_FMAC2 soap_s2dateTime(struct soap*, const char*, time_t*); -SOAP_FMAC1 char* SOAP_FMAC2 soap_s2base64(struct soap*, const unsigned char*, char*, int); -SOAP_FMAC1 char* SOAP_FMAC2 soap_s2hex(struct soap*, const unsigned char*, char*, int); -#endif - -SOAP_FMAC1 const char* SOAP_FMAC2 soap_byte2s(struct soap*, char); -SOAP_FMAC1 const char* SOAP_FMAC2 soap_short2s(struct soap*, short); -SOAP_FMAC1 const char* SOAP_FMAC2 soap_int2s(struct soap*, int); -SOAP_FMAC1 const char* SOAP_FMAC2 soap_long2s(struct soap*, long); -SOAP_FMAC1 const char* SOAP_FMAC2 soap_LONG642s(struct soap*, LONG64); -SOAP_FMAC1 const char* SOAP_FMAC2 soap_float2s(struct soap*, float); -SOAP_FMAC1 const char* SOAP_FMAC2 soap_double2s(struct soap*, double); -SOAP_FMAC1 const char* SOAP_FMAC2 soap_unsignedByte2s(struct soap*, unsigned char); -SOAP_FMAC1 const char* SOAP_FMAC2 soap_unsignedShort2s(struct soap*, unsigned short); -SOAP_FMAC1 const char* SOAP_FMAC2 soap_unsignedInt2s(struct soap*, unsigned int); -SOAP_FMAC1 const char* SOAP_FMAC2 soap_unsignedLong2s(struct soap*, unsigned long); -SOAP_FMAC1 const char* SOAP_FMAC2 soap_ULONG642s(struct soap*, ULONG64); -SOAP_FMAC1 const char* SOAP_FMAC2 soap_QName2s(struct soap*, const char*); - -#ifndef WITH_LEAN -SOAP_FMAC1 const char* SOAP_FMAC2 soap_wchar2s(struct soap*, const wchar_t*); -SOAP_FMAC1 const char* SOAP_FMAC2 soap_dateTime2s(struct soap*, time_t); -SOAP_FMAC1 const char* SOAP_FMAC2 soap_base642s(struct soap*, const char*, char*, size_t, int*); -SOAP_FMAC1 const char* SOAP_FMAC2 soap_hex2s(struct soap*, const char*, char*, size_t, int*); -#endif - - -SOAP_FMAC1 int* SOAP_FMAC2 soap_inint(struct soap*, const char *tag, int *p, const char *, int); -SOAP_FMAC1 char* SOAP_FMAC2 soap_inbyte(struct soap*, const char *tag, char *p, const char *, int); -SOAP_FMAC1 long* SOAP_FMAC2 soap_inlong(struct soap*, const char *tag, long *p, const char *, int); -SOAP_FMAC1 LONG64* SOAP_FMAC2 soap_inLONG64(struct soap*, const char *tag, LONG64 *p, const char *, int); -SOAP_FMAC1 short* SOAP_FMAC2 soap_inshort(struct soap*, const char *tag, short *p, const char *, int); -SOAP_FMAC1 float* SOAP_FMAC2 soap_infloat(struct soap*, const char *tag, float *p, const char *, int); -SOAP_FMAC1 double* SOAP_FMAC2 soap_indouble(struct soap*, const char *tag, double *p, const char *, int); -SOAP_FMAC1 unsigned char* SOAP_FMAC2 soap_inunsignedByte(struct soap*, const char *tag, unsigned char *p, const char *, int); -SOAP_FMAC1 unsigned short* SOAP_FMAC2 soap_inunsignedShort(struct soap*, const char *tag, unsigned short *p, const char *, int); -SOAP_FMAC1 unsigned int* SOAP_FMAC2 soap_inunsignedInt(struct soap*, const char *tag, unsigned int *p, const char *, int); -SOAP_FMAC1 unsigned long* SOAP_FMAC2 soap_inunsignedLong(struct soap*, const char *tag, unsigned long *p, const char *, int); -SOAP_FMAC1 ULONG64* SOAP_FMAC2 soap_inULONG64(struct soap*, const char *tag, ULONG64 *p, const char *, int); -SOAP_FMAC1 char** SOAP_FMAC2 soap_instring(struct soap*, const char *tag, char **p, const char *, int, int, long, long); -SOAP_FMAC1 char** SOAP_FMAC2 soap_inliteral(struct soap*, const char *tag, char **p); - -#ifndef WITH_LEAN -SOAP_FMAC1 time_t* SOAP_FMAC2 soap_indateTime(struct soap*, const char *tag, time_t *p, const char *, int); -#endif - -#ifndef WITH_LEANER -SOAP_FMAC1 wchar_t** SOAP_FMAC2 soap_inwstring(struct soap*, const char *tag, wchar_t **p, const char *, int, long, long); -SOAP_FMAC1 wchar_t** SOAP_FMAC2 soap_inwliteral(struct soap*, const char *tag, wchar_t **p); -#endif - -SOAP_FMAC1 int SOAP_FMAC2 soap_outbyte(struct soap*, const char *tag, int id, const char *p, const char *, int); -SOAP_FMAC1 int SOAP_FMAC2 soap_outshort(struct soap*, const char *tag, int id, const short *p, const char *, int); -SOAP_FMAC1 int SOAP_FMAC2 soap_outint(struct soap*, const char *tag, int id, const int *p, const char *, int); -SOAP_FMAC1 int SOAP_FMAC2 soap_outlong(struct soap*, const char *tag, int id, const long *p, const char *, int); -SOAP_FMAC1 int SOAP_FMAC2 soap_outLONG64(struct soap*, const char *tag, int id, const LONG64 *p, const char *, int); -SOAP_FMAC1 int SOAP_FMAC2 soap_outfloat(struct soap*, const char *tag, int id, const float *p, const char *, int); -SOAP_FMAC1 int SOAP_FMAC2 soap_outdouble(struct soap*, const char *tag, int id, const double *p, const char *, int); -SOAP_FMAC1 int SOAP_FMAC2 soap_outunsignedByte(struct soap*, const char *tag, int id, const unsigned char *p, const char *, int); -SOAP_FMAC1 int SOAP_FMAC2 soap_outunsignedShort(struct soap*, const char *tag, int id, const unsigned short *p, const char *, int); -SOAP_FMAC1 int SOAP_FMAC2 soap_outunsignedInt(struct soap*, const char *tag, int id, const unsigned int *p, const char *, int); -SOAP_FMAC1 int SOAP_FMAC2 soap_outunsignedLong(struct soap*, const char *tag, int id, const unsigned long *p, const char *, int); -SOAP_FMAC1 int SOAP_FMAC2 soap_outULONG64(struct soap*, const char *tag, int id, const ULONG64 *p, const char *, int); -SOAP_FMAC1 int SOAP_FMAC2 soap_outstring(struct soap*, const char *tag, int id, char *const*p, const char *, int); -SOAP_FMAC1 int SOAP_FMAC2 soap_outliteral(struct soap*, const char *tag, char *const*p, const char *type); - -#ifndef WITH_LEAN -SOAP_FMAC1 int SOAP_FMAC2 soap_outdateTime(struct soap*, const char *tag, int id, const time_t *p, const char *, int); -#endif - -#ifndef WITH_LEANER -SOAP_FMAC1 int SOAP_FMAC2 soap_outwstring(struct soap*, const char *tag, int id, wchar_t *const*p, const char *, int); -SOAP_FMAC1 int SOAP_FMAC2 soap_outwliteral(struct soap*, const char *tag, wchar_t *const*p, const char *type); -#endif - -#ifndef WITH_LEANER -SOAP_FMAC1 int SOAP_FMAC2 soap_attachment(struct soap *, const char*, int, const void*, const struct soap_array*, const char*, const char*, const char*, int, const char*, int); -SOAP_FMAC1 int SOAP_FMAC2 soap_move(struct soap*, long); -SOAP_FMAC1 size_t SOAP_FMAC2 soap_tell(struct soap*); -SOAP_FMAC1 char* SOAP_FMAC2 soap_dime_option(struct soap*, unsigned short, const char*); -SOAP_FMAC1 int SOAP_FMAC2 soap_getdimehdr(struct soap*); -SOAP_FMAC1 int SOAP_FMAC2 soap_getdime(struct soap*); -SOAP_FMAC1 int SOAP_FMAC2 soap_putdimehdr(struct soap*); -SOAP_FMAC1 int SOAP_FMAC2 soap_putdime(struct soap*); -SOAP_FMAC1 int SOAP_FMAC2 soap_getmimehdr(struct soap*); -SOAP_FMAC1 int SOAP_FMAC2 soap_getmime(struct soap*); -SOAP_FMAC1 int SOAP_FMAC2 soap_putmimehdr(struct soap*, struct soap_multipart*); -SOAP_FMAC1 int SOAP_FMAC2 soap_putmime(struct soap*); -SOAP_FMAC1 void SOAP_FMAC2 soap_set_dime(struct soap*); -SOAP_FMAC1 void SOAP_FMAC2 soap_set_mime(struct soap*, const char *boundary, const char *start); -SOAP_FMAC1 void SOAP_FMAC2 soap_clr_dime(struct soap*); -SOAP_FMAC1 void SOAP_FMAC2 soap_clr_mime(struct soap*); -SOAP_FMAC1 int SOAP_FMAC2 soap_set_dime_attachment(struct soap*, char *ptr, size_t size, const char *type, const char *id, unsigned short optype, const char *option); -SOAP_FMAC1 int SOAP_FMAC2 soap_set_mime_attachment(struct soap*, char *ptr, size_t size, enum soap_mime_encoding encoding, const char *type, const char *id, const char *location, const char *description); -SOAP_FMAC1 void SOAP_FMAC2 soap_post_check_mime_attachments(struct soap *soap); -SOAP_FMAC1 int SOAP_FMAC2 soap_check_mime_attachments(struct soap *soap); -SOAP_FMAC1 struct soap_multipart* SOAP_FMAC2 soap_get_mime_attachment(struct soap *soap, void *handle); -SOAP_FMAC1 struct soap_multipart* SOAP_FMAC2 soap_next_multipart(struct soap_multipart*); -SOAP_FMAC1 int SOAP_FMAC2 soap_match_cid(struct soap*, const char*, const char*); -#endif - -SOAP_FMAC1 int SOAP_FMAC2 soap_register_plugin_arg(struct soap*, int (*fcreate)(struct soap*, struct soap_plugin*, void*), void*); -SOAP_FMAC1 void* SOAP_FMAC2 soap_lookup_plugin(struct soap*, const char*); - -SOAP_FMAC1 const char* SOAP_FMAC2 soap_attr_value(struct soap *soap, const char *name, int flag); -SOAP_FMAC1 int SOAP_FMAC2 soap_set_attr(struct soap *soap, const char *name, const char *value); -SOAP_FMAC1 void SOAP_FMAC2 soap_clr_attr(struct soap *soap); - -#ifdef WITH_COOKIES -SOAP_FMAC1 void SOAP_FMAC2 soap_getcookies(struct soap *soap, const char *val); -SOAP_FMAC1 size_t SOAP_FMAC2 soap_encode_cookie(const char*, char*, size_t); -SOAP_FMAC1 extern struct soap_cookie* SOAP_FMAC2 soap_set_cookie(struct soap*, const char*, const char*, const char*, const char*); -SOAP_FMAC1 extern struct soap_cookie* SOAP_FMAC2 soap_cookie(struct soap*, const char*, const char*, const char*); -SOAP_FMAC1 extern char* SOAP_FMAC2 soap_cookie_value(struct soap*, const char*, const char*, const char*); -SOAP_FMAC1 extern char* SOAP_FMAC2 soap_env_cookie_value(struct soap*, const char*, const char*, const char*); -SOAP_FMAC1 extern time_t SOAP_FMAC2 soap_cookie_expire(struct soap*, const char*, const char*, const char*); -SOAP_FMAC1 extern int SOAP_FMAC2 soap_set_cookie_expire(struct soap*, const char*, long, const char*, const char*); -SOAP_FMAC1 extern int SOAP_FMAC2 soap_set_cookie_session(struct soap*, const char*, const char*, const char*); -SOAP_FMAC1 extern int SOAP_FMAC2 soap_clr_cookie_session(struct soap*, const char*, const char*, const char*); -SOAP_FMAC1 extern void SOAP_FMAC2 soap_clr_cookie(struct soap*, const char*, const char*, const char*); -SOAP_FMAC1 extern int SOAP_FMAC2 soap_getenv_cookies(struct soap*); -SOAP_FMAC1 extern struct soap_cookie* SOAP_FMAC2 soap_copy_cookies(struct soap*, struct soap*); -SOAP_FMAC1 extern void SOAP_FMAC2 soap_free_cookies(struct soap*); -#endif - -#ifdef __cplusplus -} /* extern "C" */ -#endif - -#endif diff --git a/org.glite.security.gsoap-plugin/test/test_gss.cpp b/org.glite.security.gsoap-plugin/test/test_gss.cpp deleted file mode 100644 index 630de3f..0000000 --- a/org.glite.security.gsoap-plugin/test/test_gss.cpp +++ /dev/null @@ -1,198 +0,0 @@ -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include - -#include "glite_gss.h" - -class GSSTest: public CppUnit::TestFixture -{ - CPPUNIT_TEST_SUITE(GSSTest); - CPPUNIT_TEST(echo); - CPPUNIT_TEST(echo); - CPPUNIT_TEST(bigecho); - CPPUNIT_TEST(errorTest); - CPPUNIT_TEST_SUITE_END(); - -public: - void echo(); - void bigecho(); - void errorTest(); - - void setUp(); - -private: - gss_cred_id_t my_cred; - char * my_subject; - int sock, port; - struct timeval timeout; - - void replier(); -}; - - -void GSSTest::replier() { - edg_wll_GssConnection conn; - edg_wll_GssStatus stat; - struct sockaddr_in a; - socklen_t alen = sizeof(a); - int s, len; - char buf[8*BUFSIZ]; - - std::cerr << "replier " << getpid() << std::endl; - - if ( (s = accept(sock, (struct sockaddr *) &a, &alen)) < 0 ) exit(1); - - if ( edg_wll_gss_accept(my_cred, s, &timeout, &conn, &stat) ) exit(1); - - while ( (len = edg_wll_gss_read(&conn, buf, sizeof(buf), &timeout, &stat)) >= 0 ) { - if ( edg_wll_gss_write(&conn, buf, len, &timeout, &stat) ) exit(1); - } - - exit(0); -} - - -void GSSTest::setUp(void) { - pid_t pid; - edg_wll_GssStatus stat; - struct sockaddr_in a; - socklen_t alen = sizeof(a); - char * cred_file = NULL; - char * key_file = NULL; - char * to = getenv("GSS_TEST_TIMEOUT"); - - timeout.tv_sec = to ? atoi(to) : 10 ; - timeout.tv_usec = 0; - - key_file = cred_file = getenv("X509_USER_PROXY"); - CPPUNIT_ASSERT_MESSAGE("credential file", cred_file); - - if (edg_wll_gss_acquire_cred_gsi(cred_file, key_file, &my_cred, &my_subject, &stat)) - CPPUNIT_ASSERT_MESSAGE("gss_acquire_cred", 0); - - sock = socket(PF_INET,SOCK_STREAM,0); - CPPUNIT_ASSERT_MESSAGE("socket()", sock >= 0); - - a.sin_family = AF_INET; - a.sin_port = 0; - a.sin_addr.s_addr = INADDR_ANY; - - if (bind(sock,(struct sockaddr *) &a,sizeof(a))) { - CPPUNIT_ASSERT_MESSAGE("bind()", 0); - } - - if (listen(sock,1)) { - CPPUNIT_ASSERT_MESSAGE("listen()", 0); - } - - getsockname(sock,(struct sockaddr *) &a,&alen); - port = ntohs(a.sin_port); - - if ( !(pid = fork()) ) replier(); - else close(sock); -} - - - -void GSSTest::echo() -{ - edg_wll_GssConnection conn; - edg_wll_GssStatus stat; - size_t total; - int err; - char buf[] = "f843fejwfanczn nc4*&686%$$&^(*)*#$@WSH"; - char buf2[100]; - - std::cerr << "echo " << getpid() << std::endl; - - err = edg_wll_gss_connect(my_cred, "localhost", port, &timeout, &conn, &stat); - CPPUNIT_ASSERT_MESSAGE("edg_wll_gss_connect()", !err); - - err = edg_wll_gss_write(&conn, buf, strlen(buf)+1, &timeout, &stat); - CPPUNIT_ASSERT_MESSAGE("edg_wll_gss_write()", !err); - - err = edg_wll_gss_read_full(&conn, buf2, strlen(buf)+1, &timeout, &total, &stat); - CPPUNIT_ASSERT_MESSAGE("edg_wll_gss_read_full()", !err); - - CPPUNIT_ASSERT(strlen(buf)+1 == total && !strcmp(buf,buf2) ); - - edg_wll_gss_close(&conn, &timeout); - -} - -void GSSTest::bigecho() -{ - edg_wll_GssConnection conn; - edg_wll_GssStatus stat; - size_t total; - int err; - char buf[7*BUFSIZ]; - char buf2[7*BUFSIZ]; - - std::cerr << "bigecho " << getpid() << std::endl; - - err = edg_wll_gss_connect(my_cred, "localhost", port, &timeout, &conn, &stat); - CPPUNIT_ASSERT_MESSAGE("edg_wll_gss_connect()", !err); - - err = edg_wll_gss_write(&conn, buf, sizeof buf, &timeout, &stat); - CPPUNIT_ASSERT_MESSAGE("edg_wll_gss_write()", !err); - - err = edg_wll_gss_read_full(&conn, buf2, sizeof buf2, &timeout, &total, &stat); - CPPUNIT_ASSERT_MESSAGE("edg_wll_gss_read_full()", !err); - - CPPUNIT_ASSERT(sizeof buf == total && !memcmp(buf,buf2,sizeof buf) ); - - edg_wll_gss_close(&conn, &timeout); - -} - - -void GSSTest::errorTest() -{ - edg_wll_GssConnection conn; - edg_wll_GssStatus stat; - int err; - char * msg = NULL; - - - err = edg_wll_gss_connect(my_cred, "xxx.porno.net", port, &timeout, &conn, &stat); - if (err) edg_wll_gss_get_error(&stat, "gss_connect()", &msg); - CPPUNIT_ASSERT_MESSAGE("edg_wll_gss_get_error()", msg); -} - - -CPPUNIT_TEST_SUITE_REGISTRATION( GSSTest ); - -int main (int ac,const char *av[]) -{ - assert(ac == 2); - std::ofstream xml(av[1]); - - CppUnit::Test *suite = CppUnit::TestFactoryRegistry::getRegistry().makeTest(); - CppUnit::TestRunner runner; - - CppUnit::TestResult controller; - CppUnit::TestResultCollector result; - controller.addListener( &result ); - - runner.addTest(suite); - runner.run(controller); - - - CppUnit::XmlOutputter xout( &result, xml ); - CppUnit::CompilerOutputter tout( &result, std::cout); - xout.write(); - tout.write(); - - return result.wasSuccessful() ? 0 : 1 ; -} diff --git a/org.glite.security.gss/LICENSE b/org.glite.security.gss/LICENSE deleted file mode 100644 index 259a91f..0000000 --- a/org.glite.security.gss/LICENSE +++ /dev/null @@ -1,69 +0,0 @@ -LICENSE file for EGEE Middleware -================================ - -Copyright (c) 2004 on behalf of the EU EGEE Project: -The European Organization for Nuclear Research (CERN), -Istituto Nazionale di Fisica Nucleare (INFN), Italy -Datamat Spa, Italy -Centre National de la Recherche Scientifique (CNRS), France -CS Systeme d'Information (CSSI), France -Royal Institute of Technology, Center for Parallel Computers (KTH-PDC), Sweden -Universiteit van Amsterdam (UvA), Netherlands -University of Helsinki (UH.HIP), Finlan -University of Bergen (UiB), Norway -Council for the Central Laboratory of the Research Councils (CCLRC), United Kingdom - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - -1. Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - -2. Redistributions in binary form must reproduce the above copyright -notice, this list of conditions and the following disclaimer in the -documentation and/or other materials provided with the distribution. - -3. The end-user documentation included with the redistribution, if -any, must include the following acknowledgment: "This product includes -software developed by The EU EGEE Project (http://cern.ch/eu-egee/)." -Alternatively, this acknowledgment may appear in the software itself, if -and wherever such third-party acknowledgments normally appear. - -4. The names EGEE and the EU EGEE Project must not be -used to endorse or promote products derived from this software without -prior written permission. For written permission, please contact -. - -5. You are under no obligation whatsoever to provide anyone with any -bug fixes, patches, or upgrades to the features, functionality or -performance of the Software ("Enhancements") that you may develop over -time; however, if you choose to provide your Enhancements to The EU -EGEE Project, or if you choose to otherwise publish or distribute your -Enhancements, in source code form without contemporaneously requiring -end users of The EU EGEE Proejct to enter into a separate written license -agreement for such Enhancements, then you hereby grant The EU EGEE Project -a non-exclusive, royalty-free perpetual license to install, use, copy, -modify, prepare derivative works, incorporate into the EGEE Middleware -or any other computer software, distribute, and sublicense your -Enhancements or derivative works thereof, in binary and source code -form (if any), whether developed by The EU EGEE Project or third parties. - -THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED -WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL PROJECT OR ITS CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR -BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE -OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN -IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -This software consists of voluntary contributions made by many -individuals on behalf of the EU EGEE Prject. For more information on The -EU EGEE Project, please see http://cern.ch/eu-egee/. For more information on -EGEE Middleware, please see http://egee-jra1.web.cern.ch/egee-jra1/ - - diff --git a/org.glite.security.gss/Makefile b/org.glite.security.gss/Makefile deleted file mode 100644 index 3b248b0..0000000 --- a/org.glite.security.gss/Makefile +++ /dev/null @@ -1,153 +0,0 @@ -# defaults -top_srcdir=.. -builddir=build -top_builddir=${top_srcdir}/${builddir} -stagedir=. -distdir=. -globalprefix=glite -package=gss -version=1.0.0 -PREFIX=/opt/glite - -glite_location=/opt/glite -globus_prefix=/opt/globus -nothrflavour=gcc32 -thrflavour=gcc32pthr - -CC=gcc - --include Makefile.inc --include ../Makefile.inc - -offset=1 -version_info:=-version-info ${shell \ - perl -e '$$,=":"; @F=split "\\.","${version}"; print $$F[0]+$$F[1]+${offset},$$F[2],$$F[1]' } - -# version_info=-version-info `echo ${version} | cut -d. -f1,2 | tr . :` - -VPATH=${top_srcdir}/src:${top_srcdir}/test - -TEST_LIBS:=-L${cppunit}/lib -lcppunit -TEST_INC:=-I${cppunit}/include - -default: all - -DEBUG:=-g -O0 -W -Wall -Wno-unused-parameter -Werror - -CFLAGS:= ${DEBUG} \ - -DVERSION=\"${version}\" \ - -I. -I${top_srcdir}/interface \ - -I${stagedir}/include \ - -I${cares_prefix}/include \ - ${COVERAGE_FLAGS} -D_GNU_SOURCE -DDATAGRID_EXTENSION - -LDFLAGS:=${COVERAGE_FLAGS} - -COMPILE:=libtool --mode=compile ${CC} ${CFLAGS} -LINK:=libtool --mode=link ${CC} -rpath ${stagedir}/lib ${LDFLAGS} -LINKXX:=libtool --mode=link ${CXX} ${LDFLAGS} -INSTALL:=libtool --mode=install install -LINKXX:=libtool --mode=link ${CXX} -rpath ${stagedir}/lib ${LDFLAGS} - -GLOBUS_INC:= -I${globus_prefix}/include/${nothrflavour} -GLOBUS_THR_INC:= -I${globus_prefix}/include/${thrflavour} - -GLOBUS_LIBS:= -L${globus_prefix}/lib \ - -lglobus_common_${nothrflavour} \ - -lglobus_gssapi_gsi_${nothrflavour} \ - -GLOBUS_THR_LIBS:= -L${globus_prefix}/lib \ - -lglobus_common_${thrflavour} \ - -lglobus_gssapi_gsi_${thrflavour} - -ARES_LIBS:=-L${cares_prefix}/lib -lcares - -EX_LIBS:= ${GLOBUS_LIBS} ${ARES_LIBS} -EX_THRLIBS := ${GLOBUS_THR_LIBS} ${ARES_LIBS} - -HDRS:=glite_gss.h - -GSS_OBJS:=glite_gss.o -GSS_LOBJS:=${GSS_OBJS:.o=.lo} -GSS_THROBJS:=${GSS_OBJS:.o=.thr.o} -GSS_THRLOBJS:=${GSS_OBJS:.o=.thr.lo} - -GSS_STATICLIB:=libglite_security_gss_${nothrflavour}.a -GSS_THRSTATICLIB:=libglite_security_gss_${thrflavour}.a -GSS_LTLIB:=libglite_security_gss_${nothrflavour}.la -GSS_THRLTLIB:=libglite_security_gss_${thrflavour}.la - -${GSS_STATICLIB}: ${GSS_OBJS} - ar crv $@ ${GSS_OBJS} - ranlib $@ - -${GSS_THRSTATICLIB}: ${GSS_THROBJS} - ar crv $@ ${GSS_THROBJS} - ranlib $@ - -${GSS_LTLIB}: ${GSS_OBJS} - ${LINK} ${version_info} -o $@ ${GSS_LOBJS} ${EX_LIBS} - -${GSS_THRLTLIB}: ${GSS_THROBJS} - ${LINK} ${version_info} -o $@ ${GSS_THRLOBJS} ${EX_THRLIBS} - - -all compile: \ - ${GSS_STATICLIB} ${GSS_LTLIB} ${GSS_THRSTATICLIB} ${GSS_THRLTLIB} \ - examples - -check: compile check.gss - -check.gss: test_gss - # ./test_gss out.xml - echo test_gss not run automatically util we have got some credentials in X509_USER_PROXY - -test_gss: test_gss.o - ${LINKXX} -o $@ test_gss.o ${GSS_LTLIB} ${TEST_LIBS} ${GLOBUS_LIBS} ${EX_LIBS} - -test_coverage: - -mkdir coverage - cd coverage && $(MAKE) -f ../Makefile top_srcdir=../../ COVERAGE_FLAGS="-fprofile-arcs -ftest-coverage" check - cd coverage && for i in ${OBJS}; do gcov -o .libs/ $$i ; done - -examples: - -doc: - -stage: - $(MAKE) install PREFIX=${stagedir} DOSTAGE=yes - -dist: distsrc distbin - -distsrc: - mkdir -p ${top_srcdir}/${package}-${version} - cd ${top_srcdir} && GLOBIGNORE="${package}-${version}" && cp -Rf * ${package}-${version} - cd ${top_srcdir} && tar -czf ${distdir}/${package}-${version}_src.tar.gz --exclude-from=project/tar_exclude ${package}-${version} - rm -rf ${top_srcdir}/${package}-${version} - -distbin: - $(MAKE) install PREFIX=`pwd`/tmpbuilddir${stagedir} - save_dir=`pwd`; cd tmpbuilddir${stagedir} && tar -czf $$save_dir/${top_srcdir}/${distdir}/${package}-${version}_bin.tar.gz *; cd $$save_dir - rm -rf tmpbuilddir - -install: - -mkdir -p ${PREFIX}/lib - -mkdir -p ${PREFIX}/share/doc/${package}-${version} - -mkdir -p ${PREFIX}/include/glite/security/${package} - ${INSTALL} -m 755 ${GSS_LTLIB} ${GSS_THRLTLIB} ${PREFIX}/lib - ${INSTALL} -m 644 ${top_srcdir}/LICENSE ${PREFIX}/share/doc/${package}-${version} - cd ${top_srcdir}/interface && ${INSTALL} -m 644 ${HDRS} ${PREFIX}/include/glite/security/ - if [ x${DOSTAGE} = xyes ]; then \ - install -m 644 ${GSS_STATICLIB} ${GSS_THRSTATICLIB} ${PREFIX}/lib; \ - fi - -clean: - -%.o: %.c - ${COMPILE} ${GLOBUS_INC} -o $@ -c $< - -%.thr.o: %.c - ${COMPILE} ${GLOBUS_THR_INC} -o $@ -c $< - -test_gss.o: %.o: %.cpp - ${CXX} -c ${CFLAGS} ${GLOBUS_INC} ${TEST_INC} -Wno-error $< diff --git a/org.glite.security.gss/interface/glite_gss.h b/org.glite.security.gss/interface/glite_gss.h deleted file mode 100644 index 52caf02..0000000 --- a/org.glite.security.gss/interface/glite_gss.h +++ /dev/null @@ -1,117 +0,0 @@ -#ifndef __EDG_WORKLOAD_LOGGING_COMMON_LB_GSS_H__ -#define __EDG_WORKLOAD_LOGGING_COMMON_LB_GSS_H__ - -#ident "$Header$" - -#include - -#ifdef __cplusplus -extern "C" { -#endif - -enum { - EDG_WLL_GSS_OK = 0, /* no GSS errors */ - EDG_WLL_GSS_ERROR_GSS = -1, /* GSS specific error, call edg_wll_get_gss_error() for details */ - EDG_WLL_GSS_ERROR_TIMEOUT = -2, /* Timeout */ - EDG_WLL_GSS_ERROR_EOF = -3, /* EOF occured */ - EDG_WLL_GSS_ERROR_ERRNO = -4, /* System error. See errno */ - EDG_WLL_GSS_ERROR_HERRNO = -5 /* Resolver error. See h_errno */ -}; - -typedef struct _edg_wll_GssConnection { - gss_ctx_id_t context; - int sock; - char *buffer; - size_t bufsize; -} edg_wll_GssConnection; - -typedef struct _edg_wll_GssStatus { - OM_uint32 major_status; - OM_uint32 minor_status; -} edg_wll_GssStatus; - -/* XXX Support anonymous connections. Are we able/required to support - * anonymous servers as well. */ - -int -edg_wll_gss_acquire_cred_gsi(const char *cert_file, - const char *key_file, - gss_cred_id_t *cred, - char **name, - edg_wll_GssStatus* gss_code); - -int -edg_wll_gss_connect(gss_cred_id_t cred, - char const *hostname, - int port, - struct timeval *timeout, - edg_wll_GssConnection *connection, - edg_wll_GssStatus* gss_code); - -int -edg_wll_gss_accept(gss_cred_id_t cred, - int sock, - struct timeval *timeout, - edg_wll_GssConnection *connection, - edg_wll_GssStatus* gss_code); - -int -edg_wll_gss_read(edg_wll_GssConnection *connection, - void *buf, - size_t bufsize, - struct timeval *timeout, - edg_wll_GssStatus* gss_code); - -int -edg_wll_gss_write(edg_wll_GssConnection *connection, - const void *buf, - size_t bufsize, - struct timeval *timeout, - edg_wll_GssStatus* gss_code); - -int -edg_wll_gss_read_full(edg_wll_GssConnection *connection, - void *buf, - size_t bufsize, - struct timeval *timeout, - size_t *total, - edg_wll_GssStatus* gss_code); - -int -edg_wll_gss_write_full(edg_wll_GssConnection *connection, - const void *buf, - size_t bufsize, - struct timeval *timeout, - size_t *total, - edg_wll_GssStatus* gss_code); - -int -edg_wll_gss_watch_creds(const char * proxy_file, - time_t * proxy_mtime); - -int -edg_wll_gss_get_error(edg_wll_GssStatus* gss_code, - const char *prefix, - char **errmsg); - -int -edg_wll_gss_close(edg_wll_GssConnection *connection, - struct timeval *timeout); - -int -edg_wll_gss_reject(int sock); - -int -edg_wll_gss_oid_equal(const gss_OID a, - const gss_OID b); - -/* -int -edg_wll_gss_get_name(gss_cred_id_t cred, char **name); -*/ - -#ifdef __cplusplus -} -#endif - -#endif /* __EDG_WORKLOAD_LOGGING_COMMON_LB_GSS_H__ */ diff --git a/org.glite.security.gss/src/glite_gss.c b/org.glite.security.gss/src/glite_gss.c deleted file mode 100644 index d96b52b..0000000 --- a/org.glite.security.gss/src/glite_gss.c +++ /dev/null @@ -1,1057 +0,0 @@ -#ident "$Header$" - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "glite_gss.h" - -#define tv_sub(a,b) {\ - (a).tv_usec -= (b).tv_usec;\ - (a).tv_sec -= (b).tv_sec;\ - if ((a).tv_usec < 0) {\ - (a).tv_sec--;\ - (a).tv_usec += 1000000;\ - }\ -} - -struct asyn_result { - struct hostent *ent; - int err; -}; - -static int decrement_timeout(struct timeval *timeout, struct timeval before, struct timeval after) -{ - (*timeout).tv_sec = (*timeout).tv_sec - (after.tv_sec - before.tv_sec); - (*timeout).tv_usec = (*timeout).tv_usec - (after.tv_usec - before.tv_usec); - while ( (*timeout).tv_usec < 0) { - (*timeout).tv_sec--; - (*timeout).tv_usec += 1000000; - } - if ( ((*timeout).tv_sec < 0) || (((*timeout).tv_sec == 0) && ((*timeout).tv_usec == 0)) ) return(1); - else return(0); -} - -/* ares callback handler for ares_gethostbyname() */ -static void callback_handler(void *arg, int status, struct hostent *h) { - struct asyn_result *arp = (struct asyn_result *) arg; - - switch (status) { - case ARES_SUCCESS: - if (h && h->h_addr_list[0]) { - arp->ent->h_addr_list = - (char **) malloc(2 * sizeof(char *)); - if (arp->ent->h_addr_list == NULL) { - arp->err = NETDB_INTERNAL; - break; - } - arp->ent->h_addr_list[0] = - malloc(sizeof(struct in_addr)); - if (arp->ent->h_addr_list[0] == NULL) { - free(arp->ent->h_addr_list); - arp->err = NETDB_INTERNAL; - break; - } - memcpy(arp->ent->h_addr_list[0], h->h_addr_list[0], - sizeof(struct in_addr)); - arp->ent->h_addr_list[1] = NULL; - arp->err = NETDB_SUCCESS; - } else { - arp->err = NO_DATA; - } - break; - case ARES_EBADNAME: - case ARES_ENOTFOUND: - arp->err = HOST_NOT_FOUND; - break; - case ARES_ENOTIMP: - arp->err = NO_RECOVERY; - break; - case ARES_ENOMEM: - case ARES_EDESTRUCTION: - default: - arp->err = NETDB_INTERNAL; - break; - } -} - -static void free_hostent(struct hostent *h){ - int i; - - if (h) { - if (h->h_name) free(h->h_name); - if (h->h_aliases) { - for (i=0; h->h_aliases[i]; i++) free(h->h_aliases[i]); - free(h->h_aliases); - } - if (h->h_addr_list) { - for (i=0; h->h_addr_list[i]; i++) free(h->h_addr_list[i]); - free(h->h_addr_list); - } - free(h); - } -} - -static int asyn_gethostbyname(char **addrOut, char const *name, struct timeval *timeout) { - struct asyn_result ar; - ares_channel channel; - int nfds; - fd_set readers, writers; - struct timeval tv, *tvp; - struct timeval start_time,check_time; - -/* start timer */ - gettimeofday(&start_time,0); - -/* ares init */ - if ( ares_init(&channel) != ARES_SUCCESS ) return(NETDB_INTERNAL); - ar.ent = (struct hostent *) calloc (sizeof(*ar.ent),1); - -/* query DNS server asynchronously */ - ares_gethostbyname(channel, name, AF_INET, callback_handler, - (void *) &ar); - -/* wait for result */ - while (1) { - FD_ZERO(&readers); - FD_ZERO(&writers); - nfds = ares_fds(channel, &readers, &writers); - if (nfds == 0) - break; - - gettimeofday(&check_time,0); - if (decrement_timeout(timeout, start_time, check_time)) { - ares_destroy(channel); - free_hostent(ar.ent); - return(TRY_AGAIN); - } - start_time = check_time; - - tvp = ares_timeout(channel, timeout, &tv); - - switch ( select(nfds, &readers, &writers, NULL, tvp) ) { - case -1: if (errno != EINTR) { - ares_destroy(channel); - free_hostent(ar.ent); - return NETDB_INTERNAL; - } else - continue; - case 0: - FD_ZERO(&readers); - FD_ZERO(&writers); - /* fallthrough */ - default: ares_process(channel, &readers, &writers); - } - } - - ares_destroy(channel); - - if (ar.err == NETDB_SUCCESS) { - *addrOut = malloc(sizeof(struct in_addr)); - memcpy(*addrOut,ar.ent->h_addr_list[0], sizeof(struct in_addr)); - free_hostent(ar.ent); - } - return(ar.err); -} - -static int -do_connect(int *s, char const *hostname, int port, struct timeval *timeout) -{ - int sock; - struct timeval before,after,to; - struct sockaddr_in a; - int sock_err; - socklen_t err_len; - char *addr; - int h_errno; - - sock = socket(AF_INET, SOCK_STREAM, 0); - if (sock < 0) return EDG_WLL_GSS_ERROR_ERRNO; - - if (timeout) { - int flags = fcntl(sock, F_GETFL, 0); - if (fcntl(sock, F_SETFL, flags | O_NONBLOCK) < 0) - return EDG_WLL_GSS_ERROR_ERRNO; - gettimeofday(&before,NULL); - } - - if (timeout) { - switch (h_errno = asyn_gethostbyname(&addr, hostname, timeout)) { - case NETDB_SUCCESS: - memset(&a,0,sizeof a); - a.sin_family = AF_INET; - memcpy(&a.sin_addr.s_addr,addr,sizeof a.sin_addr.s_addr); - a.sin_port = htons(port); - free(addr); - break; - case TRY_AGAIN: - close(sock); - return EDG_WLL_GSS_ERROR_TIMEOUT; - case NETDB_INTERNAL: - /* fall through */ - default: - close(sock); - /* h_errno may be thread safe with Linux pthread libs, - * but such an assumption is not portable - */ - errno = h_errno; - return EDG_WLL_GSS_ERROR_HERRNO; - } - } else { - struct hostent *hp; - - hp = gethostbyname(hostname); - if (hp == NULL) { - close(sock); - errno = h_errno; - return EDG_WLL_GSS_ERROR_HERRNO; - } - - memset(&a,0,sizeof a); - a.sin_family = AF_INET; - memcpy(&a.sin_addr.s_addr, hp->h_addr_list[0], sizeof(a.sin_addr.s_addr)); - a.sin_port = htons(port); - } - - if (connect(sock,(struct sockaddr *) &a,sizeof a) < 0) { - if (timeout && errno == EINPROGRESS) { - fd_set fds; - FD_ZERO(&fds); - FD_SET(sock,&fds); - memcpy(&to,timeout,sizeof to); - gettimeofday(&before,NULL); - switch (select(sock+1,NULL,&fds,NULL,&to)) { - case -1: close(sock); - return EDG_WLL_GSS_ERROR_ERRNO; - case 0: close(sock); - return EDG_WLL_GSS_ERROR_TIMEOUT; - } - gettimeofday(&after,NULL); - tv_sub(after,before); - tv_sub(*timeout,after); - - err_len = sizeof sock_err; - if (getsockopt(sock,SOL_SOCKET,SO_ERROR,&sock_err,&err_len)) { - close(sock); - return EDG_WLL_GSS_ERROR_ERRNO; - } - if (sock_err) { - close(sock); - errno = sock_err; - return EDG_WLL_GSS_ERROR_ERRNO; - } - } - else { - close(sock); - return EDG_WLL_GSS_ERROR_ERRNO; - } - } - - *s = sock; - return 0; -} - -static int -send_token(int sock, void *token, size_t token_length, struct timeval *to) -{ - size_t num_written = 0; - ssize_t count; - fd_set fds; - struct timeval timeout,before,after; - int ret; - - if (to) { - memcpy(&timeout,to,sizeof(timeout)); - gettimeofday(&before,NULL); - } - - - ret = 0; - while(num_written < token_length) { - FD_ZERO(&fds); - FD_SET(sock,&fds); - switch (select(sock+1, NULL, &fds, NULL, to ? &timeout : NULL)) { - case 0: ret = EDG_WLL_GSS_ERROR_TIMEOUT; - goto end; - break; - case -1: ret = EDG_WLL_GSS_ERROR_ERRNO; - goto end; - break; - } - - count = write(sock, ((char *)token) + num_written, - token_length - num_written); - if(count < 0) { - if(errno == EINTR) - continue; - else { - ret = EDG_WLL_GSS_ERROR_ERRNO; - goto end; - } - } - num_written += count; - } - -end: - if (to) { - gettimeofday(&after,NULL); - tv_sub(after,before); - tv_sub(*to,after); - if (to->tv_sec < 0) { - to->tv_sec = 0; - to->tv_usec = 0; - } - } - - return ret; -} - -#define SSL_TOKEN_HEADER_LENGTH 5 -static size_t ssl_token_length(char *t, int tl) { - unsigned char *b = t; - return (((size_t)(b[3]) << 8) | b[4]) + 5; -} - -static int -recv_token(int sock, void **token, size_t *token_length, struct timeval *to) -{ - ssize_t count; - char buf[4098]; - char *t = NULL; - char *tmp; - size_t tl = 0; - size_t expect = 0; - fd_set fds; - struct timeval timeout,before,after; - int ret; - - if (to) { - memcpy(&timeout,to,sizeof(timeout)); - gettimeofday(&before,NULL); - } - - ret = 0; - expect = SSL_TOKEN_HEADER_LENGTH; - do { - FD_ZERO(&fds); - FD_SET(sock,&fds); - switch (select(sock+1, &fds, NULL, NULL, to ? &timeout : NULL)) { - case 0: - ret = EDG_WLL_GSS_ERROR_TIMEOUT; - goto end; - break; - case -1: - ret = EDG_WLL_GSS_ERROR_ERRNO; - goto end; - break; - } - - count = read(sock, buf, MIN(expect - tl, sizeof(buf))); - if (count < 0) { - if (errno == EINTR) - continue; - else { - ret = EDG_WLL_GSS_ERROR_ERRNO; - goto end; - } - } - - if (count==0) { - if (tl==0) - return EDG_WLL_GSS_ERROR_EOF; - else goto end; - } - tmp=realloc(t, tl + count); - if (tmp == NULL) { - errno = ENOMEM; - return EDG_WLL_GSS_ERROR_ERRNO; - } - t = tmp; - memcpy(t + tl, buf, count); - tl += count; - - if ((expect == SSL_TOKEN_HEADER_LENGTH) && - (tl >= SSL_TOKEN_HEADER_LENGTH)) { - expect = ssl_token_length(t, tl); - } - - } while (count != 0 && tl < expect); - -end: - if (to) { - gettimeofday(&after,NULL); - tv_sub(after,before); - tv_sub(*to,after); - if (to->tv_sec < 0) { - to->tv_sec = 0; - to->tv_usec = 0; - } - } - - if (ret == 0) { - *token = t; - *token_length = tl; - } else - free(t); - - return ret; -} - -static int -create_proxy(const char *cert_file, const char *key_file, char **proxy_file) -{ - char buf[4096]; - int in, out; - char *name = NULL; - int ret, len; - - *proxy_file = NULL; - - asprintf(&name, "%s/%d.lb.XXXXXX", P_tmpdir, getpid()); - - out = mkstemp(name); - if (out < 0) - return EDG_WLL_GSS_ERROR_ERRNO; - - in = open(cert_file, O_RDONLY); - if (in < 0) { - ret = EDG_WLL_GSS_ERROR_ERRNO; - goto end; - } - while ((ret = read(in, buf, sizeof(buf))) > 0) { - len = write(out, buf, ret); - if (len != ret) { - ret = -1; - break; - } - } - close(in); - if (ret < 0) { - ret = EDG_WLL_GSS_ERROR_ERRNO; - goto end; - } - - len = write(out, "\n", 1); - if (len != 1) { - ret = EDG_WLL_GSS_ERROR_ERRNO; - goto end; - } - - in = open(key_file, O_RDONLY); - if (in < 0) { - ret = EDG_WLL_GSS_ERROR_ERRNO; - goto end; - } - while ((ret = read(in, buf, sizeof(buf))) > 0) { - len = write(out, buf, ret); - if (len != ret) { - ret = -1; - break; - } - } - close(in); - if (ret < 0) { - ret = EDG_WLL_GSS_ERROR_ERRNO; - goto end; - } - - ret = 0; - *proxy_file = name; - -end: - close(out); - if (ret) { - unlink(name); - free(name); - } - - return ret; -} - -static int -destroy_proxy(char *proxy_file) -{ - /* XXX we should erase the contents safely (i.e. overwrite with 0's) */ - unlink(proxy_file); - return 0; -} - -int -edg_wll_gss_acquire_cred_gsi(const char *cert_file, const char *key_file, gss_cred_id_t *cred, - char **name, edg_wll_GssStatus* gss_code) -{ - OM_uint32 major_status = 0, minor_status, minor_status2; - gss_cred_id_t gss_cred = GSS_C_NO_CREDENTIAL; - gss_buffer_desc buffer = GSS_C_EMPTY_BUFFER; - gss_name_t gss_name = GSS_C_NO_NAME; - OM_uint32 lifetime; - char *proxy_file = NULL; - int ret; - - if ((cert_file == NULL && key_file != NULL) || - (cert_file != NULL && key_file == NULL)) - return EINVAL; - - if (cert_file == NULL) { - major_status = gss_acquire_cred(&minor_status, GSS_C_NO_NAME, 0, - GSS_C_NO_OID_SET, GSS_C_BOTH, - &gss_cred, NULL, NULL); - if (GSS_ERROR(major_status)) { - ret = EDG_WLL_GSS_ERROR_GSS; - goto end; - } - } else { - proxy_file = (char *)cert_file; - if (strcmp(cert_file, key_file) != 0 && - (ret = create_proxy(cert_file, key_file, &proxy_file))) { - proxy_file = NULL; - goto end; - } - - asprintf((char**)&buffer.value, "X509_USER_PROXY=%s", proxy_file); - if (buffer.value == NULL) { - errno = ENOMEM; - ret = EDG_WLL_GSS_ERROR_ERRNO; - goto end; - } - buffer.length = strlen(proxy_file); - - major_status = gss_import_cred(&minor_status, &gss_cred, GSS_C_NO_OID, 1, - &buffer, 0, NULL); - free(buffer.value); - if (GSS_ERROR(major_status)) { - ret = EDG_WLL_GSS_ERROR_GSS; - goto end; - } - } - - /* gss_import_cred() doesn't check validity of credential loaded, so let's - * verify it now */ - major_status = gss_inquire_cred(&minor_status, gss_cred, &gss_name, - &lifetime, NULL, NULL); - if (GSS_ERROR(major_status)) { - ret = EDG_WLL_GSS_ERROR_GSS; - goto end; - } - - /* Must cast to time_t since OM_uint32 is unsinged and hence we couldn't - * detect negative values. */ - if ((time_t) lifetime <= 0) { - major_status = GSS_S_CREDENTIALS_EXPIRED; - minor_status = 0; /* XXX */ - ret = EDG_WLL_GSS_ERROR_GSS; - goto end; - } - - if (name) { - major_status = gss_display_name(&minor_status, gss_name, &buffer, NULL); - if (GSS_ERROR(major_status)) { - ret = EDG_WLL_GSS_ERROR_GSS; - goto end; - } - *name = buffer.value; - memset(&buffer, 0, sizeof(buffer)); - } - - *cred = gss_cred; - gss_cred = GSS_C_NO_CREDENTIAL; - ret = 0; - -end: - if (cert_file && key_file && proxy_file && strcmp(cert_file, key_file) != 0) { - destroy_proxy(proxy_file); - free(proxy_file); - } - - if (gss_name != GSS_C_NO_NAME) - gss_release_name(&minor_status2, &gss_name); - - if (gss_cred != GSS_C_NO_CREDENTIAL) - gss_release_cred(&minor_status2, &gss_cred); - - if (GSS_ERROR(major_status)) { - if (gss_code) { - gss_code->major_status = major_status; - gss_code->minor_status = minor_status; - } - ret = EDG_WLL_GSS_ERROR_GSS; - } - - return ret; -} - -/* XXX XXX This is black magic. "Sometimes" server refuses the client with SSL - * * alert "certificate expired" even if it is not true. In this case the server - * * slave terminates (which helps, usually), and we can reconnect transparently. - * */ - -/* This string appears in the error message in this case */ -#define _EXPIRED_ALERT_MESSAGE "function SSL3_READ_BYTES: sslv3 alert certificate expired" -#define _EXPIRED_ALERT_RETRY_COUNT 10 /* default number of slaves, hope that not all - are in the bad state */ -#define _EXPIRED_ALERT_RETRY_DELAY 10 /* ms */ - -int -edg_wll_gss_connect(gss_cred_id_t cred, char const *hostname, int port, - struct timeval *timeout, edg_wll_GssConnection *connection, - edg_wll_GssStatus* gss_code) -{ - int sock, ret; - OM_uint32 maj_stat, min_stat, min_stat2, req_flags; - int context_established = 0; - gss_buffer_desc input_token = GSS_C_EMPTY_BUFFER; - gss_buffer_desc output_token = GSS_C_EMPTY_BUFFER; - gss_name_t server = GSS_C_NO_NAME; - gss_ctx_id_t context = GSS_C_NO_CONTEXT; - char *servername = NULL; - int retry = _EXPIRED_ALERT_RETRY_COUNT; - - maj_stat = min_stat = min_stat2 = req_flags = 0; - memset(connection, 0, sizeof(*connection)); - - /* GSI specific */ - req_flags = GSS_C_GLOBUS_SSL_COMPATIBLE; - - ret = do_connect(&sock, hostname, port, timeout); - if (ret) - return ret; - - /* XXX find appropriate fqdn */ - asprintf (&servername, "host@%s", hostname); - if (servername == NULL) { - errno = ENOMEM; - ret = EDG_WLL_GSS_ERROR_ERRNO; - goto end; - } - input_token.value = servername; - input_token.length = strlen(servername) + 1; - - maj_stat = gss_import_name(&min_stat, &input_token, - GSS_C_NT_HOSTBASED_SERVICE, &server); - if (GSS_ERROR(maj_stat)) { - ret = EDG_WLL_GSS_ERROR_GSS; - goto end; - } - - free(servername); - memset(&input_token, 0, sizeof(input_token)); - - /* XXX if cred == GSS_C_NO_CREDENTIAL set the ANONYMOUS flag */ - - do { /* XXX: the black magic above */ - - /* XXX prepsat na do {} while (maj_stat == CONT) a osetrit chyby*/ - while (!context_established) { - /* XXX verify ret_flags match what was requested */ - maj_stat = gss_init_sec_context(&min_stat, cred, &context, - GSS_C_NO_NAME, GSS_C_NO_OID, - req_flags | GSS_C_MUTUAL_FLAG, - 0, GSS_C_NO_CHANNEL_BINDINGS, - &input_token, NULL, &output_token, - NULL, NULL); - if (input_token.length > 0) { - free(input_token.value); - input_token.length = 0; - } - - if (output_token.length != 0) { - ret = send_token(sock, output_token.value, output_token.length, timeout); - gss_release_buffer(&min_stat2, &output_token); - if (ret) - goto end; - } - - if (GSS_ERROR(maj_stat)) { - if (context != GSS_C_NO_CONTEXT) { - /* XXX send closing token to the friend */ - gss_delete_sec_context(&min_stat2, &context, GSS_C_NO_BUFFER); - context = GSS_C_NO_CONTEXT; - } - ret = EDG_WLL_GSS_ERROR_GSS; - goto end; - } - - if(maj_stat & GSS_S_CONTINUE_NEEDED) { - ret = recv_token(sock, &input_token.value, &input_token.length, timeout); - if (ret) - goto end; - } else - context_established = 1; - } - - /* XXX check ret_flags matches to what was requested */ - - /* retry on false "certificate expired" */ - if (ret == EDG_WLL_GSS_ERROR_GSS) { - edg_wll_GssStatus gss_stat; - char *msg = NULL; - - gss_stat.major_status = maj_stat; - gss_stat.minor_status = min_stat; - edg_wll_gss_get_error(&gss_stat,"",&msg); - - if (strstr(msg,_EXPIRED_ALERT_MESSAGE)) { - usleep(_EXPIRED_ALERT_RETRY_DELAY); - retry--; - } - else retry = 0; - - free(msg); - } - else retry = 0; - - } while (retry); - - connection->sock = sock; - connection->context = context; - servername = NULL; - ret = 0; - -end: - if (ret == EDG_WLL_GSS_ERROR_GSS && gss_code) { - gss_code->major_status = maj_stat; - gss_code->minor_status = min_stat; - } - if (server != GSS_C_NO_NAME) - gss_release_name(&min_stat2, &server); - if (servername == NULL) - free(servername); - if (ret) - close(sock); - - return ret; -} - -int -edg_wll_gss_accept(gss_cred_id_t cred, int sock, struct timeval *timeout, - edg_wll_GssConnection *connection, edg_wll_GssStatus* gss_code) -{ - OM_uint32 maj_stat, min_stat, min_stat2; - OM_uint32 ret_flags = 0; - gss_buffer_desc input_token = GSS_C_EMPTY_BUFFER; - gss_buffer_desc output_token = GSS_C_EMPTY_BUFFER; - gss_name_t client_name = GSS_C_NO_NAME; - gss_ctx_id_t context = GSS_C_NO_CONTEXT; - int ret; - - maj_stat = min_stat = min_stat2 = 0; - memset(connection, 0, sizeof(*connection)); - - /* GSI specific */ - ret_flags = GSS_C_GLOBUS_SSL_COMPATIBLE; - - do { - ret = recv_token(sock, &input_token.value, &input_token.length, timeout); - if (ret) - goto end; - - maj_stat = gss_accept_sec_context(&min_stat, &context, - cred, &input_token, - GSS_C_NO_CHANNEL_BINDINGS, - &client_name, NULL, &output_token, - &ret_flags, NULL, NULL); - if (input_token.length > 0) { - free(input_token.value); - input_token.length = 0; - } - - if (output_token.length) { - ret = send_token(sock, output_token.value, output_token.length, timeout); - gss_release_buffer(&min_stat2, &output_token); - if (ret) - goto end; - } - } while(maj_stat & GSS_S_CONTINUE_NEEDED); - - if (GSS_ERROR(maj_stat)) { - if (context != GSS_C_NO_CONTEXT) { - /* XXX send closing token to the friend */ - gss_delete_sec_context(&min_stat2, &context, GSS_C_NO_BUFFER); - context = GSS_C_NO_CONTEXT; - } - ret = EDG_WLL_GSS_ERROR_GSS; - goto end; - } - - maj_stat = gss_display_name(&min_stat, client_name, &output_token, NULL); - if (GSS_ERROR(maj_stat)) { - /* XXX close context ??? */ - ret = EDG_WLL_GSS_ERROR_GSS; - goto end; - } - - connection->sock = sock; - connection->context = context; - memset(&output_token, 0, sizeof(output_token.value)); - ret = 0; - -end: - if (ret == EDG_WLL_GSS_ERROR_GSS && gss_code) { - gss_code->major_status = maj_stat; - gss_code->minor_status = min_stat; - } - if (client_name != GSS_C_NO_NAME) - gss_release_name(&min_stat2, &client_name); - - return ret; -} - -int -edg_wll_gss_write(edg_wll_GssConnection *connection, const void *buf, size_t bufsize, - struct timeval *timeout, edg_wll_GssStatus* gss_code) -{ - OM_uint32 maj_stat, min_stat; - gss_buffer_desc input_token; - gss_buffer_desc output_token; - int ret; - - input_token.value = (void*)buf; - input_token.length = bufsize; - - maj_stat = gss_wrap (&min_stat, connection->context, 1, GSS_C_QOP_DEFAULT, - &input_token, NULL, &output_token); - if (GSS_ERROR(maj_stat)) { - if (gss_code) { - gss_code->minor_status = min_stat; - gss_code->major_status = maj_stat; - } - - return EDG_WLL_GSS_ERROR_GSS; - } - - ret = send_token(connection->sock, output_token.value, output_token.length, - timeout); - gss_release_buffer(&min_stat, &output_token); - - return ret; -} - - -int -edg_wll_gss_read(edg_wll_GssConnection *connection, void *buf, size_t bufsize, - struct timeval *timeout, edg_wll_GssStatus* gss_code) -{ - OM_uint32 maj_stat, min_stat; - gss_buffer_desc input_token; - gss_buffer_desc output_token; - size_t i, len; - int ret; - - if (connection->bufsize > 0) { - len = (connection->bufsize < bufsize) ? connection->bufsize : bufsize; - memcpy(buf, connection->buffer, len); - if (connection->bufsize - len == 0) { - free(connection->buffer); - connection->buffer = NULL; - } else { - for (i = 0; i < connection->bufsize - len; i++) - connection->buffer[i] = connection->buffer[i+len]; - } - connection->bufsize -= len; - - return len; - } - - do { - ret = recv_token(connection->sock, &input_token.value, &input_token.length, - timeout); - if (ret) - /* XXX cleanup */ - return ret; - - - maj_stat = gss_unwrap(&min_stat, connection->context, &input_token, - &output_token, NULL, NULL); - gss_release_buffer(&min_stat, &input_token); - if (GSS_ERROR(maj_stat)) { - /* XXX cleanup */ - return EDG_WLL_GSS_ERROR_GSS; - } - } while (maj_stat == 0 && output_token.length == 0 && output_token.value == NULL); - - if (output_token.length > bufsize) { - connection->bufsize = output_token.length - bufsize; - connection->buffer = malloc(connection->bufsize); - if (connection->buffer == NULL) { - connection->bufsize = 0; - ret = EDG_WLL_GSS_ERROR_ERRNO; - goto end; - } - memcpy(connection->buffer, output_token.value + bufsize, connection->bufsize); - output_token.length = bufsize; - } - - memcpy(buf, output_token.value, output_token.length); - ret = output_token.length; - -end: - gss_release_buffer(&min_stat, &output_token); - - return ret; -} - -int -edg_wll_gss_read_full(edg_wll_GssConnection *connection, void *buf, - size_t bufsize, struct timeval *timeout, size_t *total, - edg_wll_GssStatus* gss_code) -{ - size_t len, i; - *total = 0; - - if (connection->bufsize > 0) { - len = (connection->bufsize < bufsize) ? connection->bufsize : bufsize; - memcpy(buf, connection->buffer, len); - if (connection->bufsize - len == 0) { - free(connection->buffer); - connection->buffer = NULL; - } else { - for (i = 0; i < connection->bufsize - len; i++) - connection->buffer[i] = connection->buffer[i+len]; - } - connection->bufsize -= len; - *total = len; - } - - while (*total < bufsize) { - int len; - - len = edg_wll_gss_read(connection, buf+*total, bufsize-*total, - timeout, gss_code); - if (len < 0) return len; - *total += len; - } - - return 0; -} - -int -edg_wll_gss_write_full(edg_wll_GssConnection *connection, const void *buf, - size_t bufsize, struct timeval *timeout, size_t *total, - edg_wll_GssStatus* gss_code) -{ - return edg_wll_gss_write(connection, buf, bufsize, timeout, gss_code); -} - -/* XXX: I'm afraid the contents of stuct stat is somewhat OS dependent */ -int -edg_wll_gss_watch_creds(const char *proxy_file, time_t *proxy_mtime) -{ - struct stat pstat; - int reload = 0; - - if (!proxy_file) return 0; - if (stat(proxy_file,&pstat)) return -1; - - if (!*proxy_mtime) *proxy_mtime = pstat.st_mtime; - - if (*proxy_mtime != pstat.st_mtime) { - *proxy_mtime = pstat.st_mtime; - reload = 1; - } - - return reload; -} - -int -edg_wll_gss_close(edg_wll_GssConnection *con, struct timeval *timeout) -{ - OM_uint32 min_stat; - - /* XXX if timeout is NULL use value of 120 secs */ - - if (con->context != GSS_C_NO_CONTEXT) { - gss_delete_sec_context(&min_stat, &con->context, GSS_C_NO_BUFFER); - /* XXX send the buffer (if any) to the peer. GSSAPI specs doesn't - * recommend sending it, though */ - - /* XXX can socket be open even if context == GSS_C_NO_CONTEXT) ? */ - /* XXX ensure that edg_wll_GssConnection is created with sock set to -1 */ - if (con->sock >= 0) - close(con->sock); - } - if (con->buffer) - free(con->buffer); - memset(con, 0, sizeof(*con)); - con->context = GSS_C_NO_CONTEXT; - con->sock = -1; - return 0; -} - -int -edg_wll_gss_get_error(edg_wll_GssStatus *gss_err, const char *prefix, char **msg) -{ - OM_uint32 maj_stat, min_stat; - OM_uint32 msg_ctx = 0; - gss_buffer_desc maj_status_string = GSS_C_EMPTY_BUFFER; - gss_buffer_desc min_status_string = GSS_C_EMPTY_BUFFER; - char *str = NULL; - char *line, *tmp; - - str = strdup(prefix); - do { - maj_stat = gss_display_status(&min_stat, gss_err->major_status, - GSS_C_GSS_CODE, GSS_C_NO_OID, - &msg_ctx, &maj_status_string); - if (GSS_ERROR(maj_stat)) - break; - - maj_stat = gss_display_status(&min_stat, gss_err->minor_status, - GSS_C_MECH_CODE, GSS_C_NULL_OID, - &msg_ctx, &min_status_string); - if (GSS_ERROR(maj_stat)) { - gss_release_buffer(&min_stat, &maj_status_string); - break; - } - - asprintf(&line, ": %s (%s)", (char *)maj_status_string.value, - (char *)min_status_string.value); - gss_release_buffer(&min_stat, &maj_status_string); - gss_release_buffer(&min_stat, &min_status_string); - - tmp = realloc(str, strlen(str) + strlen(line) + 1); - if (tmp == NULL) { - /* abort() ? */ - free(line); - free(str); - str = "WARNING: Not enough memory to produce error message"; - break; - } - str = tmp; - strcat(str, line); - free(line); - } while (!GSS_ERROR(maj_stat) && msg_ctx != 0); - - *msg = str; - return 0; -} - -int -edg_wll_gss_oid_equal(const gss_OID a, const gss_OID b) -{ - if (a == b) - return 1; - else { - if (a == GSS_C_NO_OID || b == GSS_C_NO_OID || a->length != b->length) - return 0; - else - return (memcmp(a->elements, b->elements, a->length) == 0); - } -} - -int -edg_wll_gss_reject(int sock) -{ - /* XXX is it possible to cut & paste edg_wll_ssl_reject() ? */ - return 0; -} diff --git a/org.glite.security.gss/test/test_gss.cpp b/org.glite.security.gss/test/test_gss.cpp deleted file mode 100644 index 630de3f..0000000 --- a/org.glite.security.gss/test/test_gss.cpp +++ /dev/null @@ -1,198 +0,0 @@ -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include - -#include "glite_gss.h" - -class GSSTest: public CppUnit::TestFixture -{ - CPPUNIT_TEST_SUITE(GSSTest); - CPPUNIT_TEST(echo); - CPPUNIT_TEST(echo); - CPPUNIT_TEST(bigecho); - CPPUNIT_TEST(errorTest); - CPPUNIT_TEST_SUITE_END(); - -public: - void echo(); - void bigecho(); - void errorTest(); - - void setUp(); - -private: - gss_cred_id_t my_cred; - char * my_subject; - int sock, port; - struct timeval timeout; - - void replier(); -}; - - -void GSSTest::replier() { - edg_wll_GssConnection conn; - edg_wll_GssStatus stat; - struct sockaddr_in a; - socklen_t alen = sizeof(a); - int s, len; - char buf[8*BUFSIZ]; - - std::cerr << "replier " << getpid() << std::endl; - - if ( (s = accept(sock, (struct sockaddr *) &a, &alen)) < 0 ) exit(1); - - if ( edg_wll_gss_accept(my_cred, s, &timeout, &conn, &stat) ) exit(1); - - while ( (len = edg_wll_gss_read(&conn, buf, sizeof(buf), &timeout, &stat)) >= 0 ) { - if ( edg_wll_gss_write(&conn, buf, len, &timeout, &stat) ) exit(1); - } - - exit(0); -} - - -void GSSTest::setUp(void) { - pid_t pid; - edg_wll_GssStatus stat; - struct sockaddr_in a; - socklen_t alen = sizeof(a); - char * cred_file = NULL; - char * key_file = NULL; - char * to = getenv("GSS_TEST_TIMEOUT"); - - timeout.tv_sec = to ? atoi(to) : 10 ; - timeout.tv_usec = 0; - - key_file = cred_file = getenv("X509_USER_PROXY"); - CPPUNIT_ASSERT_MESSAGE("credential file", cred_file); - - if (edg_wll_gss_acquire_cred_gsi(cred_file, key_file, &my_cred, &my_subject, &stat)) - CPPUNIT_ASSERT_MESSAGE("gss_acquire_cred", 0); - - sock = socket(PF_INET,SOCK_STREAM,0); - CPPUNIT_ASSERT_MESSAGE("socket()", sock >= 0); - - a.sin_family = AF_INET; - a.sin_port = 0; - a.sin_addr.s_addr = INADDR_ANY; - - if (bind(sock,(struct sockaddr *) &a,sizeof(a))) { - CPPUNIT_ASSERT_MESSAGE("bind()", 0); - } - - if (listen(sock,1)) { - CPPUNIT_ASSERT_MESSAGE("listen()", 0); - } - - getsockname(sock,(struct sockaddr *) &a,&alen); - port = ntohs(a.sin_port); - - if ( !(pid = fork()) ) replier(); - else close(sock); -} - - - -void GSSTest::echo() -{ - edg_wll_GssConnection conn; - edg_wll_GssStatus stat; - size_t total; - int err; - char buf[] = "f843fejwfanczn nc4*&686%$$&^(*)*#$@WSH"; - char buf2[100]; - - std::cerr << "echo " << getpid() << std::endl; - - err = edg_wll_gss_connect(my_cred, "localhost", port, &timeout, &conn, &stat); - CPPUNIT_ASSERT_MESSAGE("edg_wll_gss_connect()", !err); - - err = edg_wll_gss_write(&conn, buf, strlen(buf)+1, &timeout, &stat); - CPPUNIT_ASSERT_MESSAGE("edg_wll_gss_write()", !err); - - err = edg_wll_gss_read_full(&conn, buf2, strlen(buf)+1, &timeout, &total, &stat); - CPPUNIT_ASSERT_MESSAGE("edg_wll_gss_read_full()", !err); - - CPPUNIT_ASSERT(strlen(buf)+1 == total && !strcmp(buf,buf2) ); - - edg_wll_gss_close(&conn, &timeout); - -} - -void GSSTest::bigecho() -{ - edg_wll_GssConnection conn; - edg_wll_GssStatus stat; - size_t total; - int err; - char buf[7*BUFSIZ]; - char buf2[7*BUFSIZ]; - - std::cerr << "bigecho " << getpid() << std::endl; - - err = edg_wll_gss_connect(my_cred, "localhost", port, &timeout, &conn, &stat); - CPPUNIT_ASSERT_MESSAGE("edg_wll_gss_connect()", !err); - - err = edg_wll_gss_write(&conn, buf, sizeof buf, &timeout, &stat); - CPPUNIT_ASSERT_MESSAGE("edg_wll_gss_write()", !err); - - err = edg_wll_gss_read_full(&conn, buf2, sizeof buf2, &timeout, &total, &stat); - CPPUNIT_ASSERT_MESSAGE("edg_wll_gss_read_full()", !err); - - CPPUNIT_ASSERT(sizeof buf == total && !memcmp(buf,buf2,sizeof buf) ); - - edg_wll_gss_close(&conn, &timeout); - -} - - -void GSSTest::errorTest() -{ - edg_wll_GssConnection conn; - edg_wll_GssStatus stat; - int err; - char * msg = NULL; - - - err = edg_wll_gss_connect(my_cred, "xxx.porno.net", port, &timeout, &conn, &stat); - if (err) edg_wll_gss_get_error(&stat, "gss_connect()", &msg); - CPPUNIT_ASSERT_MESSAGE("edg_wll_gss_get_error()", msg); -} - - -CPPUNIT_TEST_SUITE_REGISTRATION( GSSTest ); - -int main (int ac,const char *av[]) -{ - assert(ac == 2); - std::ofstream xml(av[1]); - - CppUnit::Test *suite = CppUnit::TestFactoryRegistry::getRegistry().makeTest(); - CppUnit::TestRunner runner; - - CppUnit::TestResult controller; - CppUnit::TestResultCollector result; - controller.addListener( &result ); - - runner.addTest(suite); - runner.run(controller); - - - CppUnit::XmlOutputter xout( &result, xml ); - CppUnit::CompilerOutputter tout( &result, std::cout); - xout.write(); - tout.write(); - - return result.wasSuccessful() ? 0 : 1 ; -} diff --git a/org.glite.security.proxyrenewal/.cvsignore b/org.glite.security.proxyrenewal/.cvsignore deleted file mode 100644 index 3a4edf6..0000000 --- a/org.glite.security.proxyrenewal/.cvsignore +++ /dev/null @@ -1 +0,0 @@ -.project diff --git a/org.glite.security.proxyrenewal/LICENSE b/org.glite.security.proxyrenewal/LICENSE deleted file mode 100644 index 01b973b..0000000 --- a/org.glite.security.proxyrenewal/LICENSE +++ /dev/null @@ -1,69 +0,0 @@ -LICENSE file for EGEE Middleware -================================ - -Copyright (c) 2004 on behalf of the EU EGEE Project: -The European Organization for Nuclear Research (CERN), -Istituto Nazionale di Fisica Nucleare (INFN), Italy -Datamat Spa, Italy -Centre National de la Recherche Scientifique (CNRS), France -CS Systeme d'Information (CSSI), France -Royal Institute of Technology, Center for Parallel Computers (KTH-PDC), Sweden -Universiteit van Amsterdam (UvA), Netherlands -University of Helsinki (UH.HIP), Finlan -University of Bergen (UiB), Norway -Council for the Central Laboratory of the Research Councils (CCLRC), United Kingdom - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - -1. Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - -2. Redistributions in binary form must reproduce the above copyright -notice, this list of conditions and the following disclaimer in the -documentation and/or other materials provided with the distribution. - -3. The end-user documentation included with the redistribution, if -any, must include the following acknowledgment: "This product includes -software developed by The EU EGEE Project (http://cern.ch/eu-egee/)." -Alternatively, this acknowledgment may appear in the software itself, if -and wherever such third-party acknowledgments normally appear. - -4. The names EGEE and the EU EGEE Project must not be -used to endorse or promote products derived from this software without -prior written permission. For written permission, please contact -. - -5. You are under no obligation whatsoever to provide anyone with any -bug fixes, patches, or upgrades to the features, functionality or -performance of the Software ("Enhancements") that you may develop over -time; however, if you choose to provide your Enhancements to The EU -EGEE Project, or if you choose to otherwise publish or distribute your -Enhancements, in source code form without contemporaneously requiring -end users of The EU EGEE Proejct to enter into a separate written license -agreement for such Enhancements, then you hereby grant The EU EGEE Project -a non-exclusive, royalty-free perpetual license to install, use, copy, -modify, prepare derivative works, incorporate into the EGEE Middleware -or any other computer software, distribute, and sublicense your -Enhancements or derivative works thereof, in binary and source code -form (if any), whether developed by The EU EGEE Project or third parties. - -THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED -WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL PROJECT OR ITS CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR -BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE -OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN -IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -This software consists of voluntary contributions made by many -individuals on behalf of the EU EGEE Prject. For more information on The -EU EGEE Project, please see http://cern.ch/eu-egee/. For more information on -EGEE Middleware, please see http://egee-jra1.web.cern.ch/egee-jra1/ - - diff --git a/org.glite.security.proxyrenewal/Makefile b/org.glite.security.proxyrenewal/Makefile deleted file mode 100644 index 24252c7..0000000 --- a/org.glite.security.proxyrenewal/Makefile +++ /dev/null @@ -1,167 +0,0 @@ -# -# Copyright (c) 2004 on behalf of the EU EGEE Project: -# The European Organization for Nuclear Research (CERN), -# Istituto Nazionale di Fisica Nucleare (INFN), Italy -# Datamat Spa, Italy -# Centre National de la Recherche Scientifique (CNRS), France -# CS Systeme d'Information (CSSI), France -# Royal Institute of Technology, Center for Parallel Computers (KTH-PDC), Sweden -# Universiteit van Amsterdam (UvA), Netherlands -# University of Helsinki (UH.HIP), Finland -# University of Bergen (UiB), Norway -# Council for the Central Laboratory of the Research Councils (CCLRC), United Kingdom -# -# Top Makefile file for the GLite Security Proxyrenewal module -# -# Authors: Ales Krenek -# Version info: $Id$ -# Release: $Name$ -# -# Revision history: -# $Log -# - -# defaults -top_srcdir=. -builddir=build -top_builddir=${top_srcdir}/${builddir} -stagedir=. -distdir=. -globalprefix=glite -lbprefix=lb -package=glite-security-proxyrenewal -version=0.0.0 -PREFIX=/opt/glite - -glite_location=$PREFIX -globus_prefix=/opt/globus -nothrflavour=gcc32 -thrflavour=gcc32pthr -myproxy_prefix=$globus_prefix - --include Makefile.inc - -VPATH:=${top_srcdir}/src:${top_srcdir}/examples - -GLOBUSINC:= -I${globus_prefix}/include/${nothrflavour} \ - -I${globus_prefix}/include/${nothrflavour}/openssl - -GLOBUSTHRINC:= -I${globus_prefix}/include/${thrflavour} \ - -I${globus_prefix}/include/${thrflavour}/openssl - -MYPROXYINC:= -I${myproxy_prefix}/include/${nothrflavour} -MYPROXYTHRINC:= -I${myproxy_prefix}/include/${thrflavour} - -DEBUG:=-g -O0 - -CFLAGS:= ${DEBUG} \ - ${MYPROXYINC} \ - -I${top_srcdir}/src -I${top_srcdir}/interface \ - -I${glite_location}/include - -GLOBUS_LIBS:=-L${globus_prefix}/lib \ - -lglobus_common_${nothrflavour} \ - -lssl_${nothrflavour} - -MYPROXY_LIB_NOTHR :=-L${myproxy_prefix}/lib -lmyproxy_${nothrflavour} -MYPROXY_LIB_THR:=-L${myproxy_prefix}/lib -lmyproxy_${thrflavour} - -offset=1 -version_info:=-version-info ${shell \ - perl -e '$$,=":"; @F=split "\\.","${version}"; print $$F[0]+$$F[1]+${offset},$$F[2],$$F[1]' } - -COMPILE:=libtool --mode=compile ${CC} ${CFLAGS} -LINK:=libtool --mode=link ${CC} ${LDFLAGS} -INSTALL:=libtool --mode=install install - -DAEMONOBJ:=renewd.o renew.o common.o commands.o api.o voms.o -LIBOBJ:=api.o common.o -LIB_CORE_OBJS := renewal_core.o voms.o -CLIENTOBJ:=client.o - -THRLIBOBJ:=${LIBOBJ:.o=.thr.o} -LIBLOBJ:=${LIBOBJ:.o=.lo} -THRLIBLOBJ:=${LIBOBJ:.o=.thr.lo} - -LIB_CORE_NOTHR_OBJS := ${LIB_CORE_OBJS} -LIB_CORE_NOTHR_LOBJS := ${LIB_CORE_OBJS:.o=.lo} -LIB_CORE_THR_OBJS := ${LIB_CORE_OBJS:.o=.thr.o} -LIB_CORE_THR_LOBJS := ${LIB_CORE_OBJS:.o=.thr.lo} - -LIB:=libglite_security_proxyrenewal_${nothrflavour}.la -THRLIB:=libglite_security_proxyrenewal_${thrflavour}.la -LIB_CORE_NOTHR := libglite_security_proxyrenewal_core_${nothrflavour}.la -LIB_CORE_THR := libglite_security_proxyrenewal_core_${thrflavour}.la - -VOMS_LIB_NOTHR := -L${glite_location}/lib -lvomsc_${nothrflavour} -VOMS_LIB_THR := -L${glite_location}/lib -lvomsc_${thrflavour} - -DAEMON:=glite-proxy-renewd -CLIENT:=glite-proxy-renew -EXAMPLES := renew_core - -default: all -compile all: ${LIB} ${THRLIB} ${LIB_CORE_NOTHR} ${DAEMON} ${CLIENT} - -${LIB}: ${LIBOBJ} - ${LINK} ${version_info} -o $@ ${LIBLOBJ} -rpath ${glite_location}/lib - -${THRLIB}: ${THRLIBOBJ} - ${LINK} ${version_info} -o $@ ${THRLIBLOBJ} -rpath ${glite_location}/lib - -${LIB_CORE_NOTHR}: ${LIB_CORE_NOTHR_OBJS} - ${LINK} ${version_info} -o $@ ${LIB_CORE_NOTHR_LOBJS} -rpath ${glite_location}/lib ${MYPROXY_LIB_NOTHR} ${VOMS_LIB_NOTHR} - -${LIB_CORE_THR}: ${LIB_CORE_THR_OBJS} - ${LINK} ${version_info} -o $@ ${LIB_CORE_THR_LOBJS} -rpath ${glite_location}/lib ${MYPROXY_LIB_THR} ${VOMS_LIB_THR} - -${DAEMON}: ${DAEMONOBJ} ${LIB_CORE_NOTHR} - ${LINK} -o $@ ${DAEMONOBJ} ${LIB_CORE_NOTHR} - -${CLIENT}: ${CLIENTOBJ} ${LIB} - ${LINK} -o $@ ${CLIENTOBJ} ${LIB} ${GLOBUS_LIBS} - -${THRLIBOBJ} ${LIB_CORE_THR_OBJS}: %.thr.o: %.c - ${COMPILE} ${GLOBUSTHRINC} -o $@ -c $< - -%.o: %.c - ${COMPILE} ${GLOBUSINC} -c $< - -${EXAMPLES}: %: %.o - ${LINK} -o $@ $< ${LIB_CORE_NOTHR} - -stage: compile - $(MAKE) install PREFIX=${stagedir} - -check: - echo No unit tests - -examples: ${EXAMPLES} - -dist: distsrc distbin - -distsrc: - mkdir -p ${top_srcdir}/${package}-${version} - cd ${top_srcdir} && GLOBIGNORE="${package}-${version}" && cp -Rf * ${package}-${version} - cd ${top_srcdir} && tar -czf ${distdir}/${package}-${version}_src.tar.gz --exclude-from=project/tar_exclude ${package}-${version} - rm -rf ${top_srcdir}/${package}-${version} - -distbin: - $(MAKE) install PREFIX=`pwd`/tmpbuilddir - cd tmpbuilddir && tar -czf ../${top_srcdir}/${distdir}/${package}-${version}_bin.tar.gz * - rm -rf tmpbuilddir - -install: - -mkdir -p ${PREFIX}/bin ${PREFIX}/lib ${PREFIX}/include/glite/security/proxyrenewal ${PREFIX}/share/doc/${package}-${version} ${PREFIX}/etc/init.d - ${INSTALL} -m 644 ${LIB} ${THRLIB} ${LIB_CORE_NOTHR} ${PREFIX}/lib - ${INSTALL} -m 755 ${DAEMON} ${CLIENT} ${PREFIX}/bin - ${INSTALL} -m 644 ${top_srcdir}/LICENSE ${PREFIX}/share/doc/${package}-${version} - cd ${top_srcdir}/interface && ${INSTALL} -m 644 renewal.h renewal_core.h ${PREFIX}/include/glite/security/proxyrenewal - - ${INSTALL} -m 755 ${top_srcdir}/config/startup ${PREFIX}/etc/init.d/glite-proxy-renewald - - -clean: - $(RM) $(LIB) ${THRLIB} ${LIB_CORE_NOTHR} ${LIB_CORE_THR} $(DAEMON) $(CLIENT) $(EXAMPLES) *.o *.lo core - -.PHONY: default all compile examples check stage dist distsrc distbin install clean diff --git a/org.glite.security.proxyrenewal/build.xml b/org.glite.security.proxyrenewal/build.xml deleted file mode 100755 index 2ddf1c0..0000000 --- a/org.glite.security.proxyrenewal/build.xml +++ /dev/null @@ -1,128 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/org.glite.security.proxyrenewal/config/startup b/org.glite.security.proxyrenewal/config/startup deleted file mode 100755 index 26ba757..0000000 --- a/org.glite.security.proxyrenewal/config/startup +++ /dev/null @@ -1,80 +0,0 @@ -#!/bin/sh - -GLITE_LOCATION=${GLITE_LOCATION:-/opt/glite} -GLITE_LOCATION_VAR=${GLITE_LOCATION_VAR:-/opt/glite/var} - -[ -f /etc/glite.conf ] && . /etc/glite.conf -[ -f $GLITE_LOCATION/etc/glite-wms.conf ] && . $GLITE_LOCATION/etc/glite-wms.conf -[ -f $HOME/.glite.conf ] && . $HOME/.glite.conf - -PROXY_REPOSITORY="$GLITE_LOCATION_VAR/spool/glite-renewd" - -unset creds - -start() -{ - if test -z "$GLITE_USER" ;then - echo 'Error: GLITE_USER is not set' - echo FAILED - return 1 - fi - - [ -n "$GLITE_HOST_CERT" -a -n "$GLITE_HOST_KEY" ] && - creds="-t $GLITE_HOST_CERT -k $GLITE_HOST_KEY" - - if test -z "$creds"; then - if su - $GLITE_USER -c "test -r /etc/grid-security/hostkey.pem -a -r /etc/grid-security/hostcert.pem"; then - echo "$0: WARNING: /etc/grid-security/hostkey.pem readable by $GLITE_USER" - creds="-t /etc/grid-security/hostcert.pem -k /etc/grid-security/hostkey.pem" - fi - fi - - [ -z "$creds" ] && - echo $0: WARNING: No credentials specified. Using default lookup which is dangerous. >&2 - - # workaround for VOMS_FindByVO that seems to always require user's own VOMS config file (bug #7511) - user_voms_config=$HOME/.glite/vomses - if [ ! -f "$user_voms_config" ]; then - rm -f /tmp/renewal_vomses - su - $GLITE_USER -c "touch /tmp/renewal_vomses && chmod 644 /tmp/renewal_vomses" - user_voms_config=/tmp/renewal_vomses - fi - - echo -n Starting ProxyRenewal Daemon: glite-proxy-renewd ... - - if [ ! -d "$PROXY_REPOSITORY" ]; then - mkdir -p $PROXY_REPOSITORY || exit 1 - chown $GLITE_USER $PROXY_REPOSITORY - chmod 0700 $PROXY_REPOSITORY - fi - - su - $GLITE_USER -c "VOMS_USERCONF=$user_voms_config \ - $GLITE_LOCATION/bin/glite-proxy-renewd \ - -r $PROXY_REPOSITORY $creds -A" && echo " done" -} - -stop() -{ - echo -n "Stopping ProxyRenewal Daemon: glite-proxy-renewd ..." - killall glite-proxy-renewd - echo " done" -} - -status() -{ - if netstat -an --unix | grep "^unix .* LISTEN.* /tmp/dgpr_renew_" >/dev/null 2>&1 ;then - echo glite-proxy-renewd running - else - echo glite-proxy-renewd not running - return 1 - fi -} - -case x$1 in - xstart) start;; - xstop) stop;; - xrestart) stop; start;; - xstatus) status;; - x*) echo usage: $0 start,stop,restart,status >&2 - exit 1;; -esac diff --git a/org.glite.security.proxyrenewal/examples/renew_core.c b/org.glite.security.proxyrenewal/examples/renew_core.c deleted file mode 100644 index 69518ea..0000000 --- a/org.glite.security.proxyrenewal/examples/renew_core.c +++ /dev/null @@ -1,63 +0,0 @@ -#include -#include -#include -#include - -static struct option const long_options[] = { - { "server", required_argument, 0, 's' }, - { "proxy", required_argument, 0, 'p' }, - { "help", no_argument, 0, 'h' }, - { NULL, 0, NULL, 0} -}; - -static char short_options[] = "s:p:h"; - -int -main(int argc, char *argv[]) -{ - char *server = NULL; - char *proxy = NULL; - char *new_proxy = NULL; - extern int optind; - char arg; - glite_renewal_core_context ctx = NULL; - int ret; - - while ((arg = getopt_long(argc, argv, short_options, long_options, NULL)) != EOF) { - switch(arg) { - case 's': - server = optarg; break; - case 'p': - proxy = optarg; break; - case 'h': - fprintf(stdout, "Usage: %s --server --proxy \n", argv[0]); - exit(1); - } - } - - if (server == NULL || proxy == NULL) { - fprintf(stderr, "both server and proxy parameters must be given\n"); - exit(1); - } - - ret = glite_renewal_core_init_ctx(&ctx); - if (ret) { - fprintf(stderr, "glite_renewal_core_init_ctx() failed\n"); - exit(1); - } - - ctx->log_dst = GLITE_RENEWAL_LOG_NONE; - - ret = glite_renewal_core_renew(ctx, server, 0, proxy, &new_proxy); - if (ret) { - fprintf(stderr, "%s: glite_renewal_core_renew() failed: %s", - argv[0], ctx->err_message); - exit(1); - } - - ret = glite_renewal_core_destroy_ctx(ctx); - - printf("%s\n", new_proxy); - - return 0; -} diff --git a/org.glite.security.proxyrenewal/interface/renewal.h b/org.glite.security.proxyrenewal/interface/renewal.h deleted file mode 100644 index e07a89f..0000000 --- a/org.glite.security.proxyrenewal/interface/renewal.h +++ /dev/null @@ -1,175 +0,0 @@ -/** - * \file proxyrenewal/renewal.h - * \author Daniel Kouril - * \author Miroslav Ruda - * \brief API for proxy renewal. - * \version 2.0 - * - * General rules: - * - functions return 0 on success, nonzero on error, errror details can - * be found via edg_wlpr_GetErrorText() - */ - -#ifndef RENEWAL_H -#define RENEWAL_H - -#ident "$Header$" - -#ifdef RENEWAL_HAVE_JOBID -#include "glite/wmsutils/jobid/cjobid.h" -#endif - -#ifdef __cplusplus -extern "C" { -#endif - -#define EDG_WLPR_FLAG_UNIQUE 1 -#define EDG_WLPR_FLAG_UPDATE 2 - -typedef enum _edg_wlpr_ErrorCode { -/** - * Base for proxy renewal specific code. - * Start sufficently high not to collide with standard errno. */ - /* XXX see common/exception_codes.h */ - EDG_WLPR_ERROR_BASE = 1900, - EDG_WLPR_ERROR_UNEXPECTED_EOF, - EDG_WLPR_ERROR_GENERIC, - EDG_WLPR_ERROR_PROTO_PARSE_ERROR, - EDG_WLPR_ERROR_PROTO_PARSE_NOT_FOUND, - EDG_WLPR_ERROR_UNKNOWN_COMMAND, - EDG_WLPR_ERROR_SSL, - EDG_WLPR_ERROR_MYPROXY, - EDG_WLPR_PROXY_NOT_REGISTERED, - EDG_WLPR_PROXY_EXPIRED, - EDG_WLPR_ERROR_VOMS, - EDG_WLPR_ERROR_TIMEOUT, - EDG_WLPR_ERROR_ERRNO, -} edg_wlpr_ErrorCode; - -/** - * Return a human readable string containg description of the errorcode - * \retval char* pointer to a error description - */ -const char * -edg_wlpr_GetErrorText(int err_code); - -/** - * This function contacts the renewal daemon and registers the specified proxy - * for periodic renewal. - * \param filename IN: specification of the proxy to register. - * \param jdl IN: JDL of the job owing the proxy. The JDL is looked for a - * myproxy server contact. - * \param flags IN: one of EDG_WLPR_FLAG_UNIQUE or EDG_WLPR_FLAG_UPDATE, or - * their bitwise OR. - * \param repository_filename OUT: filename of registered proxy in repository. - * \retval 0 success - * \retval nonzero on error. Human readable form of the error can be get via - * edg_wlpr_GetErrorText(). - */ -int -edg_wlpr_RegisterProxy( - const char * filename, - const char *jdl, - int flags, - char ** repository_filename -); - -/** - * The same function as edg_wlpr_RegisterProxy() but information about the - * myproxy server and jobid are passed as parameters instead of in JDL. - */ -#ifdef RENEWAL_HAVE_JOBID -int -edg_wlpr_RegisterProxyExt( - const char * filename, - const char * server, - unsigned int port, - edg_wlc_JobId jobid, - int flags, - char ** repository_filename -); -#endif - -int -glite_renewal_RegisterProxy( - const char * filename, - const char * server, - unsigned int port, - const char *jobid, - int flags, - char ** repository_filename -); - -/** - * Unregister proxy from the renewal daemon. - * \param jobid IN: specification of job whose proxy shall be unregistered - * \param filename IN: (optional) specification of the proxy to unregister. - * \retval 0 success - * \retval nonzero on error. Human readable form of the error can be get via - * edg_wlpr_GetErrorText(). - */ -#ifdef RENEWAL_HAVE_JOBID -int -edg_wlpr_UnregisterProxy( - edg_wlc_JobId jobid, - const char * repository_filename -); -#endif - -int -glite_renewal_UnregisterProxy( - const char * jobid, - const char * repository_filename -); - -/** - * Get a list of registered proxies maintained by the renewal daemon. - * \param count OUT: number of proxies - * \param list OUT: a list of filenames separated by '\n' - * specifying the registered proxies. - * \warning The caller is responsible for freeing the data. - * \retval 0 success - * \retval nonzero on error. Human readable form of the error can be get via - * edg_wlpr_GetErrorText(). - */ -int -edg_wlpr_GetList(int *count, char **list); - -/** - * Get a status message about a proxy. - * The function contacts the renewal daemon and retrieve information it - * maintains about the proxy. - * \param filename IN: specification of the proxy to query - * \param info OUT: status message. - * \warning The caller is responsible for freeing the data. - * \retval 0 success - * \retval nonzero on error. Human readable form of the error can be get via - * edg_wlpr_GetErrorText(). - */ -int -edg_wlpr_GetStatus(const char *repository_filename, char **info); - -/** - * For given jobid return registered proxy filename from repository - * \param jobid IN: specification of jobid - * \param repository_filename OUT: proxy regitered for given jobid - * \warning The caller is responsible for freeing the data. - * \retval 0 success - * \retval nonzero on error. Human readable form of the error can be get via - * edg_wlpr_GetErrorText(). - */ -#ifdef RENEWAL_HAVE_JOBID -int -edg_wlpr_GetProxy(edg_wlc_JobId jobid, char **repository_filename); -#endif - -int -glite_renewal_GetProxy( - const char * jobid, - char **repository_filename); - -#ifdef __cplusplus -} -#endif - -#endif /* RENEWAL_H */ diff --git a/org.glite.security.proxyrenewal/interface/renewal_core.h b/org.glite.security.proxyrenewal/interface/renewal_core.h deleted file mode 100644 index 8348963..0000000 --- a/org.glite.security.proxyrenewal/interface/renewal_core.h +++ /dev/null @@ -1,62 +0,0 @@ -#ifndef RENEWAL_CORE_H -#define RENEWAL_CORE_H - -#ident "$Id$" - -#include - -#ifdef __cplusplus -extern "C" { -#endif - -typedef enum { - GLITE_RENEWAL_LOG_NONE, - GLITE_RENEWAL_LOG_STDOUT, - GLITE_RENEWAL_LOG_SYSLOG, -} glite_renewal_log_dst; - -typedef struct glite_renewal_core_context_data { - int log_level; - glite_renewal_log_dst log_dst; - char *err_message; - char *voms_conf; -} glite_renewal_core_context_data; - -typedef struct glite_renewal_core_context_data *glite_renewal_core_context; - -/** - * This cal initializes the context and sets default values - */ -int -glite_renewal_core_init_ctx(glite_renewal_core_context *context); - -/** - * This call frees the context and all memory used by the context - */ -int -glite_renewal_core_destroy_ctx(glite_renewal_core_context context); - -/** - * This call tries to renew the proxy certificate using the MyProxy - * repository. If VOMS attributes are present in the proxy they are renewed - * as well. - * \param context IN: context with authentication information - * \param myproxy_server IN: hostname of the myproxy repository - * \param myproxy_port IN: TCP port of the myproxy repository, if 0 the - * default value will be used - * \param current_proxy IN: filename with the proxy to renew - * \param new_proxy OUT: filename with the renewed proxy, the caller is - * responsible for removing the file when it's not needed. - */ -int -glite_renewal_core_renew(glite_renewal_core_context context, - const char *myproxy_server, - unsigned int myproxy_port, - const char *current_proxy, - char **new_proxy); - -#ifdef __cplusplus -} -#endif - -#endif /* RENEWAL_CORE_H */ diff --git a/org.glite.security.proxyrenewal/project/build.number b/org.glite.security.proxyrenewal/project/build.number deleted file mode 100644 index 1936771..0000000 --- a/org.glite.security.proxyrenewal/project/build.number +++ /dev/null @@ -1 +0,0 @@ -module.build=137 diff --git a/org.glite.security.proxyrenewal/project/build.properties b/org.glite.security.proxyrenewal/project/build.properties deleted file mode 100644 index e69de29..0000000 diff --git a/org.glite.security.proxyrenewal/project/configure.properties.xml b/org.glite.security.proxyrenewal/project/configure.properties.xml deleted file mode 100644 index 3d6914b..0000000 --- a/org.glite.security.proxyrenewal/project/configure.properties.xml +++ /dev/null @@ -1,60 +0,0 @@ - - - - - - - - - - - -top_srcdir=.. -builddir=build -stagedir=${stage.abs.dir} -distdir=${dist.dir} -globalprefix=${global.prefix} -package=${module.package.name} -PREFIX=${install.dir} -version=${module.version} -glite_location=${with.glite.location} -globus_prefix=${with.globus.prefix} -thrflavour=${with.globus.thr.flavor} -nothrflavour=${with.globus.nothr.flavor} -myproxy_prefix=${with.myproxy.prefix} - - - diff --git a/org.glite.security.proxyrenewal/project/properties.xml b/org.glite.security.proxyrenewal/project/properties.xml deleted file mode 100755 index f1e51dd..0000000 --- a/org.glite.security.proxyrenewal/project/properties.xml +++ /dev/null @@ -1,62 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/org.glite.security.proxyrenewal/project/tar_exclude b/org.glite.security.proxyrenewal/project/tar_exclude deleted file mode 100644 index e1fcd1a..0000000 --- a/org.glite.security.proxyrenewal/project/tar_exclude +++ /dev/null @@ -1,10 +0,0 @@ -tar_exclude -CVS -build.xml -build -build.properties -properties.xml -configure.properties.xml -.cvsignore -.project -.cdtproject diff --git a/org.glite.security.proxyrenewal/project/taskdefs.xml b/org.glite.security.proxyrenewal/project/taskdefs.xml deleted file mode 100755 index 13e894e..0000000 --- a/org.glite.security.proxyrenewal/project/taskdefs.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/org.glite.security.proxyrenewal/project/version.properties b/org.glite.security.proxyrenewal/project/version.properties deleted file mode 100644 index 1441742..0000000 --- a/org.glite.security.proxyrenewal/project/version.properties +++ /dev/null @@ -1,2 +0,0 @@ -module.version=1.3.0 -module.age=1 diff --git a/org.glite.security.proxyrenewal/src/api.c b/org.glite.security.proxyrenewal/src/api.c deleted file mode 100644 index a72d692..0000000 --- a/org.glite.security.proxyrenewal/src/api.c +++ /dev/null @@ -1,550 +0,0 @@ -#include "renewal.h" -#include "renewal_locl.h" - -#ident "$Header$" - -#define SEPARATORS "\n" - -/* prototypes of static routines */ -static int -encode_request(edg_wlpr_Request *request, char **msg); - -static int -decode_response(const char *msg, const size_t msg_len, edg_wlpr_Response *response); - -static int -do_connect(char *socket_name, struct timeval *timeout, int *sock); - -static int -send_request(int sock, struct timeval *timeout, edg_wlpr_Request *request, edg_wlpr_Response *response); - -static int -encode_request(edg_wlpr_Request *request, char **msg) -{ - char *buf; - size_t buf_len; - int ret; - - buf_len = EDG_WLPR_BUF_SIZE; - buf = malloc(buf_len); - if (buf == NULL) - return ENOMEM; - buf[0] = '\0'; - - ret = edg_wlpr_StoreToken(&buf, &buf_len, EDG_WLPR_PROTO_VERSION, - EDG_WLPR_VERSION, SEPARATORS); - if (ret) - goto err; - - ret = edg_wlpr_StoreToken(&buf, &buf_len, EDG_WLPR_PROTO_COMMAND, - edg_wlpr_EncodeInt(request->command), - SEPARATORS); - if (ret) - goto err; - - if (request->myproxy_server) { - char host[1024]; - -#if 0 - snprintf(host, sizeof(host), "%s:%d", request->myproxy_server, - (request->myproxy_port) ? request->myproxy_port : EDG_WLPR_MYPROXY_PORT); /* XXX let server decide ? */ -#else - snprintf(host, sizeof(host), "%s", request->myproxy_server); -#endif - ret = edg_wlpr_StoreToken(&buf, &buf_len, EDG_WLPR_PROTO_MYPROXY_SERVER, - host, SEPARATORS); - if (ret) - goto err; - } - - if (request->proxy_filename) { - ret = edg_wlpr_StoreToken(&buf, &buf_len, EDG_WLPR_PROTO_PROXY, - request->proxy_filename, SEPARATORS); - if (ret) - goto err; - } - - if (request->jobid) { - ret = edg_wlpr_StoreToken(&buf, &buf_len, EDG_WLPR_PROTO_JOBID, - request->jobid, SEPARATORS); - if (ret) - goto err; - } - - if (request->entries) { - char **p = request->entries; - while (*p) { - ret = edg_wlpr_StoreToken(&buf, &buf_len, EDG_WLPR_PROTO_ENTRY, - *p, SEPARATORS); - if (ret) - goto err; - p++; - } - } - - buf[strlen(buf)] = '\0'; - *msg = buf; - return 0; - -err: - free(buf); - *msg = NULL; - return ret; -} - -static int -decode_response(const char *msg, const size_t msg_len, edg_wlpr_Response *response) -{ - int ret; - char *value = NULL; - /* char *p; */ - int i; - int current_size = 0; - - /* XXX add an ending zero '\0' */ - - assert(msg != NULL); - assert(response != NULL); - - memset(response, 0, sizeof(*response)); - - ret = edg_wlpr_GetToken(msg, msg_len, EDG_WLPR_PROTO_VERSION, SEPARATORS, - 0, &response->version); - if (ret) - goto err; - - ret = edg_wlpr_GetToken(msg, msg_len, EDG_WLPR_PROTO_RESPONSE, SEPARATORS, - 0, &value); - if (ret) - goto err; - - ret = edg_wlpr_DecodeInt(value, (int *)(&response->response_code)); - free(value); - if (ret) - goto err; - - ret = edg_wlpr_GetToken(msg, msg_len, EDG_WLPR_PROTO_MYPROXY_SERVER, - SEPARATORS, 0, &response->myproxy_server); - if (ret && ret != EDG_WLPR_ERROR_PROTO_PARSE_NOT_FOUND) - goto err; - -#if 0 - response->myproxy_port = EDG_WLPR_MYPROXY_PORT; /* ??? */ - if (response->myproxy_server && (p = strchr(response->myproxy_server, ':'))) { - int port; - *p = '\0'; - port = atol(p+1); /* XXX */ - response->myproxy_port = port; - } -#endif - - ret = edg_wlpr_GetToken(msg, msg_len, EDG_WLPR_PROTO_START_TIME, SEPARATORS, - 0, &value); - if (ret && ret != EDG_WLPR_ERROR_PROTO_PARSE_NOT_FOUND) - goto err; - if (ret == 0) { - ret = edg_wlpr_DecodeInt(value, (int *)(&response->start_time)); - free(value); - if (ret) - goto err; - } - - ret = edg_wlpr_GetToken(msg, msg_len, EDG_WLPR_PROTO_END_TIME, SEPARATORS, - 0, &value); - if (ret && ret != EDG_WLPR_ERROR_PROTO_PARSE_NOT_FOUND) - goto err; - if (ret == 0) { - ret = edg_wlpr_DecodeInt(value, (int *)(&response->end_time)); - free(value); - if (ret) - goto err; - } - - ret = edg_wlpr_GetToken(msg, msg_len, EDG_WLPR_PROTO_RENEWAL_TIME, - SEPARATORS, 0, &value); - if (ret && ret != EDG_WLPR_ERROR_PROTO_PARSE_NOT_FOUND) - goto err; - if (ret == 0) { - ret = edg_wlpr_DecodeInt(value, (int *)(&response->next_renewal_time)); - free(value); - if (ret) - goto err; - } - - /* XXX Counter */ - - i = 0; - while ((ret = edg_wlpr_GetToken(msg, msg_len, EDG_WLPR_PROTO_PROXY, - SEPARATORS, i, &value)) == 0) { - if (i >= current_size) { - char **tmp; - - tmp = realloc(response->filenames, - (current_size + 16 + 1) * sizeof(*tmp)); - if (tmp == NULL) { - ret = ENOMEM; - goto err; - } - response->filenames = tmp; - current_size += 16; - } - response->filenames[i] = value; - i++; - } - if (ret != EDG_WLPR_ERROR_PROTO_PARSE_NOT_FOUND) - goto err; - if (response->filenames) - response->filenames[i] = NULL; - - return 0; - -err: - edg_wlpr_CleanResponse(response); - - return ret; -} - -static int -do_connect(char *socket_name, struct timeval *timeout, int *sock) -{ - struct sockaddr_un my_addr; - int s; - int ret; - struct timeval before,after; - int sock_err; - socklen_t err_len; - - assert(sock != NULL); - memset(&my_addr, 0, sizeof(my_addr)); - - s = socket(AF_UNIX, SOCK_STREAM, 0); - if (s == -1) { - return errno; - } - - if (timeout) { - int flags = fcntl(s, F_GETFL, 0); - if (fcntl(s, F_SETFL, flags | O_NONBLOCK) < 0) - return errno; - } - - my_addr.sun_family = AF_UNIX; - strncpy(my_addr.sun_path, socket_name, sizeof(my_addr.sun_path)); - - ret = connect(s, (struct sockaddr *) &my_addr, sizeof(my_addr)); - if (ret == -1) { - if (errno == EINPROGRESS) { - struct pollfd pollfds[1]; - - pollfds[0].fd = s; - pollfds[0].events = POLLOUT; - - gettimeofday(&before,NULL); - switch (poll(pollfds, 1, timeout->tv_sec*1000+timeout->tv_usec/1000)) { - case -1: close(s); - return errno; - case 0: close(s); - return EDG_WLPR_ERROR_TIMEOUT; - } - gettimeofday(&after,NULL); - if (edg_wlpr_DecrementTimeout(timeout, before, after)) { - close (s); - return EDG_WLPR_ERROR_TIMEOUT; - } - - err_len = sizeof sock_err; - if (getsockopt(s,SOL_SOCKET,SO_ERROR,&sock_err,&err_len)) { - close(s); - return errno; - } - if (sock_err) { - close(s); - errno = sock_err; - return errno; - } - } else { - close(s); - return errno; - } - } - - *sock = s; - return 0; -} - -static int -send_request(int sock, struct timeval *timeout, edg_wlpr_Request *request, edg_wlpr_Response *response) -{ - int ret; - char *buf = NULL; - size_t buf_len; - - /* timeouts ?? */ - - ret = encode_request(request, &buf); - if (ret) - return ret; - - ret = edg_wlpr_Write(sock, timeout, buf, strlen(buf) + 1); - free(buf); - if (ret) - return ret; - - ret = edg_wlpr_Read(sock, timeout, &buf, &buf_len); - if (ret) - return ret; - - ret = decode_response(buf, buf_len, response); - free(buf); - if (ret) - return ret; - - return 0; -} - -int -edg_wlpr_RequestSend(edg_wlpr_Request *request, edg_wlpr_Response *response) -{ - char sockname[1024]; - int ret; - int sock; - struct timeval timeout; - const char *s = NULL; - double d; - - s = getenv("GLITE_PR_TIMEOUT"); - d = s ? atof(s) : GLITE_PR_TIMEOUT_DEFAULT; - timeout.tv_sec = (long) d; - timeout.tv_usec = (long) ((d-timeout.tv_sec) * 1e6); - - snprintf(sockname, sizeof(sockname), "%s%d", - DGPR_REG_SOCKET_NAME_ROOT, getuid()); - ret = do_connect(sockname, &timeout, &sock); - if (ret) - return ret; - - ret = send_request(sock, &timeout, request, response); - - close(sock); - return ret; -} - -int -glite_renewal_RegisterProxy(const char *filename, const char * server, - unsigned int port, - const char *jobid, int flags, - char **repository_filename) -{ - edg_wlpr_Request request; - edg_wlpr_Response response; - int ret; - - memset(&request, 0, sizeof(request)); - memset(&response, 0, sizeof(response)); - - if (jobid == NULL) - return EINVAL; - - request.command = EDG_WLPR_COMMAND_REG; - request.myproxy_server = server; - request.proxy_filename = filename; - request.jobid = strdup(jobid); - if (request.jobid == NULL) - return ENOMEM; - - ret = edg_wlpr_RequestSend(&request, &response); - free(request.jobid); - if (ret == 0 && response.response_code == 0 && repository_filename && - response.filenames && response.filenames[0] ) - *repository_filename = strdup(response.filenames[0]); - - if (ret == 0) - ret = response.response_code; - - edg_wlpr_CleanResponse(&response); - - return ret; -} - -#ifdef RENEWAL_HAVE_JOBID -int -edg_wlpr_RegisterProxyExt(const char *filename, const char * server, - unsigned int port, - edg_wlc_JobId jobid, int flags, - char **repository_filename) -{ - char *ji; - int ret; - - ji = edg_wlc_JobIdUnparse(jobid); - if (ji == NULL) - return EINVAL; - - ret = glite_renewal_RegisterProxy(filename, server, port, ji, flags, - repository_filename); - free(ji); - return ret; -} -#endif /* RENEWAL_HAVE_JOBID */ - -#if 0 -int -edg_wlpr_RegisterProxy(const char *filename, const char *jdl, - int flags, char **repository_filename) -{ - char server[1024]; - size_t server_len; - unsigned int port = 0; - char *p, *q; - - memset(server, 0, sizeof(server)); - - /* parse JDL and find information about myproxy server */ - p = strstr(jdl, JDL_MYPROXY); - if (p == NULL) - return 0; /* XXX */ - q = strchr(p, '\n'); /* XXX */ - if (q) - server_len = q - p; - else - server_len = jdl + strlen(jdl) - p; - if (server_len >= sizeof(server)) - return EINVAL; /* XXX */ - strncmp(server, p, sizeof(server)); - - return (edg_wlpr_RegisterProxyExt(filename, server, port, NULL, flags, - repository_filename)); -} -#endif - -int -glite_renewal_UnregisterProxy(const char *jobid, const char *repository_filename) -{ - edg_wlpr_Request request; - edg_wlpr_Response response; - int ret; - - memset(&request, 0, sizeof(request)); - memset(&response, 0, sizeof(response)); - - if (jobid == NULL) - return EINVAL; - - request.command = EDG_WLPR_COMMAND_UNREG; - request.proxy_filename = repository_filename; - request.jobid = strdup(jobid); - if (request.jobid == NULL) - return ENOMEM; - - ret = edg_wlpr_RequestSend(&request, &response); - free(request.jobid); - - if (ret == 0) - ret = response.response_code; - edg_wlpr_CleanResponse(&response); - - return ret; -} - -#ifdef RENEWAL_HAVE_JOBID -int -edg_wlpr_UnregisterProxy(edg_wlc_JobId jobid, const char *repository_filename) -{ - char *ji; - int ret; - - ji = edg_wlc_JobIdUnparse(jobid); - if (ji == NULL) - return EINVAL; - ret = glite_renewal_UnregisterProxy(ji, repository_filename); - free(ji); - return ret; -} -#endif /* RENEWAL_HAVE_JOBID */ - -int -edg_wlpr_GetList(int *count, char **list) -{ - return ENOSYS; /* XXX */ -} - -int -edg_wlpr_GetStatus(const char *filename, char **info) -{ - return ENOSYS; /* XXX */ -} - -static const char* const errTexts[] = { - "Unexpected EOF from peer", - "Generic error", - "Protocol parse error", - "Compulsory element not found in message", - "Unknown protocol command", - "SSL error", - "Error from Myproxy server", - "Proxy not registered", - "Proxy expired", - "VOMS error", - "Operation timed out", - "System error" -}; - -const char * -edg_wlpr_GetErrorText(int code) -{ - return code ? - (code <= EDG_WLPR_ERROR_BASE ? - strerror(code) : - errTexts[code - EDG_WLPR_ERROR_BASE - 1] - ) : - NULL; -} - -int -glite_renewal_GetProxy(const char *jobid, char **repository_filename) -{ - edg_wlpr_Request request; - edg_wlpr_Response response; - int ret; - - memset(&request, 0, sizeof(request)); - memset(&response, 0, sizeof(response)); - - if (jobid == NULL) - return EINVAL; - - request.command = EDG_WLPR_COMMAND_GET; - request.jobid = strdup(jobid); - if (request.jobid == NULL) - return ENOMEM; - - ret = edg_wlpr_RequestSend(&request, &response); - free(request.jobid); - - if (ret == 0 && response.response_code == 0 && repository_filename && - response.filenames && response.filenames[0] ) - *repository_filename = strdup(response.filenames[0]); - - if (ret == 0) - ret = response.response_code; - edg_wlpr_CleanResponse(&response); - - return ret; -} - -#ifdef RENEWAL_HAVE_JOBID -int -edg_wlpr_GetProxy(edg_wlc_JobId jobid, char **repository_filename) -{ - char *ji; - int ret; - - ji = edg_wlc_JobIdUnparse(jobid); - if (ji == NULL) - return EINVAL; - - ret = glite_renewal_GetProxy(ji, repository_filename); - free(ji); - return ret; -} -#endif /* RENEWAL_HAVE_JOBID */ diff --git a/org.glite.security.proxyrenewal/src/client.c b/org.glite.security.proxyrenewal/src/client.c deleted file mode 100644 index 87efd78..0000000 --- a/org.glite.security.proxyrenewal/src/client.c +++ /dev/null @@ -1,111 +0,0 @@ -#include -#include -#include -#include -#include "renewal.h" - -static const char rcsid[] = "$Header$"; - -static struct option const long_options[] = { - { "help", no_argument, 0, 'h' }, - { "version", no_argument, 0, 'v' }, - { "server", required_argument, 0, 's' }, - { "port", required_argument, 0, 'p' }, - { "file", required_argument, 0, 'f' }, - { "jobid", required_argument, 0, 'j' }, - { NULL, 0, NULL, 0} -}; - -static char short_options[] = "hvs:p:f:j:"; - -static void -usage(exit_code) -{ - fprintf(stdout, "Usage: edg-wl-renew [option] operation\n" - "\t-s myproxy_server [-p port] -f filename -j jobid start |\n" - "\t-j jobid [-f filename] stop |\n" - "\t-j jobid get\n" - "-h, --help display this help and exit\n" - "-v, --version output version information and exit\n" - "-s, --server address of myproxy server\n" - "-p, --port port of myproxy server\n" - "-f, --file filename with proxy\n" - "-j, --jobid datagrid jobid\n"); - exit(exit_code); -} - -int -main(int argc, char *argv[]) -{ - char *server = NULL; - int port = 0; - char *proxyfile = NULL; - char *jobid_str = NULL; - char *repository_filename = NULL; - int ret; - int arg; - extern int optind; - - while ((arg = getopt_long(argc, argv, - short_options, long_options, (int *) 0)) != EOF) - switch(arg) { - case 'h': - usage(0); break; - case 'v': - fprintf(stdout, "%s:\t%s\n", argv[0], rcsid); exit(0); - case 's': - server = strdup(optarg); break; - case 'p': - port = atoi(optarg); break; - case 'f': - proxyfile = strdup(optarg); break; - case 'j': - jobid_str = strdup(optarg); break; - default: - usage(1); break; - } - - if (optind >= argc) - usage(1); - - if (strcmp(argv[optind], "start") == 0) { - if (proxyfile == NULL || server == NULL || jobid_str == NULL) - usage(1); - ret = glite_renewal_RegisterProxy(proxyfile, server, port, jobid_str, 0, - &repository_filename); - if (ret) { - fprintf(stderr, "Registering proxy failed: %s\n", - edg_wlpr_GetErrorText(ret)); - exit(1); - } - printf("%s\n", repository_filename); - free(repository_filename); - exit(0); - } - else if (strcmp(argv[optind], "stop") == 0) { - if (jobid_str == NULL) - usage(1); - ret = glite_renewal_UnregisterProxy(jobid_str, proxyfile); - if (ret) { - fprintf(stderr, "Unregistering proxy failed: %s\n", - edg_wlpr_GetErrorText(ret)); - exit(1); - } - } - else if (strcmp(argv[optind], "get") == 0) { - if (jobid_str == NULL) - usage(1); - ret = glite_renewal_GetProxy(jobid_str, &proxyfile); - if (ret) { - fprintf(stderr, "GET request failed: %s\n", - edg_wlpr_GetErrorText(ret)); - exit(1); - } - printf("%s\n", proxyfile); - free(proxyfile); - } - else - usage(1); - - return 0; -} diff --git a/org.glite.security.proxyrenewal/src/commands.c b/org.glite.security.proxyrenewal/src/commands.c deleted file mode 100644 index abc4809..0000000 --- a/org.glite.security.proxyrenewal/src/commands.c +++ /dev/null @@ -1,1256 +0,0 @@ -#include "renewal_locl.h" -#include "renewd_locl.h" - -#include "glite/security/voms/voms_apic.h" - -#ident "$Header$" - -#define SEPARATORS ",\n" -#define RENEWAL_START_FRACTION 0.75 /* XXX */ -#define RENEWAL_MIN_LIFETIME (15 * 60) - -extern char *repository; -extern time_t condor_limit; -extern char *cadir; -extern char *vomsdir; -extern int voms_enabled; - -static char * -strmd5(glite_renewal_core_context ctx, const char *s, unsigned char *digest); - -static int -get_record_ext(glite_renewal_core_context ctx, FILE *fd, proxy_record *record, int *last_used_suffix); - -static int -get_record(glite_renewal_core_context ctx, FILE *fd, proxy_record *record); - -static int -store_record(glite_renewal_core_context ctx, char *basename, proxy_record *record); - -static int -copy_file_content(glite_renewal_core_context ctx, FILE *in, FILE *out); - -static int -copy_file(glite_renewal_core_context ctx, char *src, char *dst); - -static int -get_base_filename(glite_renewal_core_context ctx, char *proxy_file, char **basefilename); - -int -decode_record(glite_renewal_core_context ctx, char *line, proxy_record *record); - -int -encode_record(glite_renewal_core_context ctx, proxy_record *record, char **line); - -static int -open_metafile(glite_renewal_core_context ctx, char *proxy_file, FILE **fd); - -void -free_record(glite_renewal_core_context ctx, proxy_record *record); - -static int -realloc_prd_list(glite_renewal_core_context ctx, prd_list *list); - -/* make public: */ -static int -edg_wlpr_GetTokenInt(glite_renewal_core_context ctx, const char *msg, const size_t msg_len, - const char *key, const char *separators, - int req_index, int *value); - -static void -record_to_response(glite_renewal_core_context ctx, int status_code, proxy_record *record, - edg_wlpr_Response *response); - -static int -filename_to_response(glite_renewal_core_context ctx, char *filename, edg_wlpr_Response *response); - - - - -static char * -strmd5(glite_renewal_core_context ctx, const char *s, unsigned char *digest) -{ - MD5_CTX md5; - unsigned char d[16]; - int i; - static char mbuf[33]; - - MD5_Init(&md5); - MD5_Update(&md5,s,strlen(s)); - MD5_Final(d,&md5); - - if (digest) - memcpy(digest,d,sizeof(d)); - for (i=0; i<16; i++) { - int dd = d[i] & 0x0f; - mbuf[2*i+1] = dd<10 ? dd+'0' : dd-10+'a'; - dd = d[i] >> 4; - mbuf[2*i] = dd<10 ? dd+'0' : dd-10+'a'; - } - mbuf[32] = 0; - return mbuf; -} - -static int -get_base_filename(glite_renewal_core_context ctx, char *proxy_file, char **basefilename) -{ - char *subject = NULL; - char file[FILENAME_MAX]; - int ret; - - assert(basefilename != NULL); - - ret = glite_renewal_get_proxy_base_name(ctx, proxy_file, &subject); - if (ret) - goto end; - - snprintf(file, sizeof(file), "%s/%s", repository, strmd5(ctx, subject, NULL)); - *basefilename = strdup(file); /* XXX test ENOMEM */ - ret = 0; - -end: - if (subject) - free(subject); - return ret; -} - -static int -copy_file_content(glite_renewal_core_context ctx, FILE *in, FILE *out) -{ - char buf[1024]; - size_t num; - int ret; - - while (1) { - num = fread(buf, sizeof(*buf), sizeof(buf), in); - if ((ret = ferror(in))) { - glite_renewal_log(ctx, LOG_ERR, "Reading failed: %s", strerror(errno)); - return ret; - } - num = fwrite(buf, sizeof(*buf), num, out); - if ((ret = ferror(in))) { - glite_renewal_log(ctx, LOG_ERR, "Writing failed: %s", strerror(errno)); - return ret; - } - if (feof(in)) - return 0; - } -} - -/* return the time interval, after which the renewal should be started */ -static time_t -get_delta(glite_renewal_core_context ctx, time_t current_time, time_t start_time, time_t end_time) -{ - time_t remaining_life; - time_t life_to_lose; - time_t limit; - time_t delta; - - if (RENEWAL_MIN_LIFETIME > condor_limit) { - limit = RENEWAL_MIN_LIFETIME; - } else { - limit = condor_limit; - } - - limit += RENEWAL_CLOCK_SKEW; - - if (current_time + limit >= end_time) { - /* if the proxy is too short, renew it as soon as possible */ - - if (current_time + condor_limit > end_time ) { - glite_renewal_log(ctx, LOG_ERR, "Remaining proxy lifetime fell below the value of the Condor limit!"); - } - - return 0; - } - - remaining_life = end_time - current_time; - - /* renewal should gain the jobs an extra lifetime of - RENEWAL_START_FRACTION (default 3/4) of the new proxy's - lifetime. If the time remaining on the current proxy is already - small then the jobs may gain an extra lifetime of more than that. - - In any case, a renewal will be scheduled to happen before the - lifetime limit. - - 'life_to_lose' is the lifetime that will be lost, ie the time that - will still remain on the current proxy when it is renewed - */ - - life_to_lose = (1.0-RENEWAL_START_FRACTION)*60*60*DGPR_RETRIEVE_DEFAULT_HOURS; - - if (life_to_lose < limit) { - life_to_lose = limit; - } - - delta = life_to_lose - limit; - - while( remaining_life < (limit + delta) ) { - delta *= (1.0-RENEWAL_START_FRACTION); - } - - life_to_lose = limit + delta; - - return (remaining_life - life_to_lose); -} - -int -get_times(glite_renewal_core_context ctx, char *proxy_file, proxy_record *record) -{ - FILE *fd; - X509 *cert = NULL; - ASN1_UTCTIME *asn1_time = NULL; - int ret; - time_t current_time, start_time, end_time; - - assert(record != NULL); - assert(proxy_file != NULL); - - fd = fopen(proxy_file, "r"); - if (fd == NULL) { - glite_renewal_log(ctx, LOG_ERR, "Opening proxy file %s failed: %s", - proxy_file, strerror(errno)); - return errno; - } - - cert = PEM_read_X509(fd, NULL, NULL, NULL); - if (cert == NULL) { - glite_renewal_log(ctx, LOG_ERR, "Cannot read X.509 certificate from %s", - proxy_file); - ret = -1; /* XXX SSL_ERROR */ - goto end; - } - - asn1_time = ASN1_UTCTIME_new(); - X509_gmtime_adj(asn1_time,0); - globus_gsi_cert_utils_make_time(X509_get_notAfter(cert), &end_time); - globus_gsi_cert_utils_make_time(X509_get_notBefore(cert), &start_time); - current_time = time(NULL); - ASN1_UTCTIME_free(asn1_time); - /* if (end_time - RENEWAL_CLOCK_SKEW < current_time) { Too short proxy } */ - if (end_time + RENEWAL_CLOCK_SKEW < current_time) { - glite_renewal_log(ctx, LOG_ERR, "Expired proxy in %s", proxy_file); - ret = EDG_WLPR_PROXY_EXPIRED; - goto end; - } - - /* Myproxy seems not to do check on expiration and return expired proxies - if credentials in repository are expired */ - X509_free(cert); - cert = NULL; - while (1) { - time_t tmp_end; - /* see http://www.openssl.org/docs/crypto/pem.html section BUGS */ - cert = PEM_read_X509(fd, NULL, NULL, NULL); - if (cert == NULL) { - if (ERR_GET_REASON(ERR_peek_error()) == PEM_R_NO_START_LINE) { - /* End of file reached. no error */ - ERR_clear_error(); - break; - } - glite_renewal_log(ctx, LOG_ERR, "Cannot read additional certificates from %s", - proxy_file); - ret = -1; /* XXX SSL_ERROR */ - goto end; - } - globus_gsi_cert_utils_make_time(X509_get_notAfter(cert), &tmp_end); - if (tmp_end + RENEWAL_CLOCK_SKEW < current_time) { - glite_renewal_log(ctx, LOG_ERR, "Expired proxy in %s", proxy_file); - ret = EDG_WLPR_PROXY_EXPIRED; - goto end; - } - X509_free(cert); - cert = NULL; - } - - record->next_renewal = current_time + get_delta(ctx, current_time, start_time, - end_time); - record->end_time = end_time; - ret = 0; - -end: - fclose(fd); - if (cert) - X509_free(cert); - - return ret; -} - -static int -copy_file(glite_renewal_core_context ctx, char *src, char *dst) -{ - FILE *from = NULL; - FILE *tmp_to = NULL; - int tmp_fd; - char tmpfile[FILENAME_MAX]; - int ret; - - if (strcmp(src, dst) == 0) - return 0; - - from = fopen(src, "r"); - if (from == NULL) { - glite_renewal_log(ctx, LOG_ERR, "Cannot open file %s for reading (%s)", - src, strerror(errno)); - return errno; - } - - snprintf(tmpfile, sizeof(tmpfile), "%s.XXXXXX", dst); - tmp_fd = mkstemp(tmpfile); - if (tmp_fd == -1) { - glite_renewal_log(ctx, LOG_ERR, "Cannot create temporary file (%s)", - strerror(errno)); - ret = errno; - goto end; - } - - - tmp_to = fdopen(tmp_fd, "w"); - if (tmp_to == NULL) { - glite_renewal_log(ctx, LOG_ERR, "Cannot associate stream with temporary file (%s)", - strerror(errno)); - unlink(tmpfile); - ret = errno; - goto end; - } - - ret = copy_file_content(ctx, from, tmp_to); - fclose(tmp_to); - if (ret) { - goto end; - } - - ret = rename(tmpfile, dst); - if (ret) { - glite_renewal_log(ctx, LOG_ERR, "Cannot replace repository file %s with temporary file (%s)", - strerror(errno)); - unlink(tmpfile); - ret = errno; - goto end; - } - tmp_to = NULL; - -end: - fclose(from); - close(tmp_fd); - unlink(tmpfile); - - return ret; -} - -void -free_record(glite_renewal_core_context ctx, proxy_record *record) -{ - int i; - - if (record == NULL) - return; - if (record->myproxy_server) - free(record->myproxy_server); - if (record->jobids.val) { - for (i = 0; i < record->jobids.len; i++) - free(record->jobids.val[i]); - free(record->jobids.val); - } - memset(record, 0, sizeof(*record)); -} - -static int -realloc_prd_list(glite_renewal_core_context ctx, prd_list *list) -{ - char **tmp; - - tmp = realloc(list->val, (list->len + 1) * sizeof(*list->val)); - if (tmp == NULL) - return ENOMEM; - list->val = tmp; - list->len++; - return 0; -} - -static int -get_jobids(glite_renewal_core_context ctx, const char *msg, const size_t msg_len, proxy_record *record) -{ - int index = 0; - int ret; - char *value; - char **tmp; - - memset(&record->jobids, 0, sizeof(record->jobids)); - while ((ret = edg_wlpr_GetToken(msg, msg_len, "jobid=", SEPARATORS, - index, &value)) == 0) { - tmp = realloc(record->jobids.val, (record->jobids.len + 1) * sizeof(*tmp)); - if (tmp == NULL) { - ret = ENOMEM; - break; - } - record->jobids.val = tmp; - record->jobids.val[index] = value; - record->jobids.len++; - index++; - } - if (ret != EDG_WLPR_ERROR_PROTO_PARSE_NOT_FOUND) { - if (record->jobids.len) - free(record->jobids.val); - record->jobids.len = 0; - record->jobids.val = NULL; - return ret; - } - - return 0; -} - -static int -edg_wlpr_GetTokenInt(glite_renewal_core_context ctx, const char *msg, const size_t msg_len, - const char *key, const char *separators, - int req_index, int *value) -{ - int ret; - char *str_value = NULL; - - ret = edg_wlpr_GetToken(msg, msg_len, key, separators, req_index, &str_value); - if (ret) - return ret; - - ret = edg_wlpr_DecodeInt(str_value, value); - free(str_value); - return ret; -} - -int -decode_record(glite_renewal_core_context ctx, char *line, proxy_record *record) -{ - /* line must be ended with '\0' */ - int ret; - size_t len; - - assert(line != NULL); - assert(record != NULL); - - memset(record, 0, sizeof(*record)); - - len = strlen(line) + 1; - - ret = edg_wlpr_GetTokenInt(ctx, line, len, "suffix=", SEPARATORS, 0, - &record->suffix); - if (ret) - return ret; - -#if 0 - ret = edg_wlpr_GetTokenInt(ctx, line, len, "counter=", SEPARATORS, 0, - &record->counter); - if (ret) - goto end; -#endif - - ret = edg_wlpr_GetTokenInt(ctx, line, len, "unique=", SEPARATORS, 0, - &record->unique); - if (ret) - goto end; - - ret = edg_wlpr_GetTokenInt(ctx, line, len, "voms_exts=", SEPARATORS, 0, - &record->voms_exts); - - ret = edg_wlpr_GetToken(line, len, "server=", SEPARATORS, 0, - &record->myproxy_server); - if (ret) - goto end; - - ret = edg_wlpr_GetTokenInt(ctx, line, len, "next_renewal=", SEPARATORS, 0, - (int *)&record->next_renewal); - if (ret) - goto end; - - ret = edg_wlpr_GetTokenInt(ctx, line, len, "end_time=", SEPARATORS, 0, - (int *)&record->end_time); - if (ret) - goto end; - - ret = get_jobids(ctx, line, len, record); - if (ret) - goto end; - -end: - if (ret) - free_record(ctx, record); - - return ret; -} - -int -encode_record(glite_renewal_core_context ctx, proxy_record *record, char **line) -{ - char tmp_line[1024]; - size_t jobids_len = 0; - int i; - - snprintf(tmp_line, sizeof(tmp_line), "suffix=%d, unique=%d, voms_exts=%d, server=%s, next_renewal=%ld, end_time=%ld", - record->suffix, record->unique, record->voms_exts, - (record->myproxy_server) ? record->myproxy_server : "", - record->next_renewal, record->end_time); - for (i = 0; i < record->jobids.len; i++) - /* alloc space for string ", jobid=" */ - jobids_len += 2 + strlen("jobid=") + strlen(record->jobids.val[i]); - - *line = calloc(1, strlen(tmp_line) + jobids_len + 1); - if (*line == NULL) - return ENOMEM; - - strcat(*line, tmp_line); - memset(tmp_line, 0, sizeof(tmp_line)); - - for (i = 0; i < record->jobids.len; i++) { - snprintf(tmp_line, sizeof(tmp_line), ", jobid=%s", record->jobids.val[i]); - strcat(*line, tmp_line); - } - - return 0; -} - -/* Get proxy record from the index file. If no suffix is defined return a free - record with the smallest index */ -static int -get_record_ext(glite_renewal_core_context ctx, FILE *fd, proxy_record *record, int *last_used_suffix) -{ - char line[1024]; - int last_suffix = -1; - int ret; - char *p; - proxy_record tmp_record; - time_t current_time; - int line_num = 0; - - assert(record != NULL); - memset(&tmp_record, 0, sizeof(tmp_record)); - - current_time = time(NULL); - while (fgets(line, sizeof(line), fd) != NULL) { - line_num++; - free_record(ctx, &tmp_record); - p = strchr(line, '\n'); - if (p) - *p = '\0'; - ret = decode_record(ctx, line, &tmp_record); - if (ret) { - glite_renewal_log(ctx, LOG_ERR, "Skipping invalid entry at line %d", line_num); - continue; - } - if (record->suffix >= 0) { - if (record->suffix == tmp_record.suffix) { - record->suffix = tmp_record.suffix; - record->jobids.len = tmp_record.jobids.len; - record->jobids.val = tmp_record.jobids.val; - record->unique = tmp_record.unique; - record->voms_exts = tmp_record.voms_exts; - if (record->myproxy_server) - free(record->myproxy_server); - record->myproxy_server = tmp_record.myproxy_server; - record->end_time = tmp_record.end_time; - record->next_renewal = tmp_record.next_renewal; - return 0; - } else - continue; - } - if (tmp_record.suffix > last_suffix) - last_suffix = tmp_record.suffix; - - /* if no particular suffix was specified get the first free record - available */ - if (tmp_record.jobids.len >= MAX_PROXIES || tmp_record.unique || - tmp_record.voms_exts) - continue; - - if (tmp_record.jobids.len == 0) { - /* no jobs registered for this record, so use it initialized with the - * parameters (currently myproxy location) provided by user */ - record->suffix = tmp_record.suffix; - record->next_renewal = record->end_time = 0; - free_record(ctx, &tmp_record); - return 0; - } - - /* Proxies with VOMS attributes require a separate record, which is not - * shared with another proxies. The same applies it the unique flag was - * set by the caller */ - if (record->voms_exts || record->unique) - continue; - - if (tmp_record.jobids.len > 0 && record->myproxy_server && - strcmp(record->myproxy_server, tmp_record.myproxy_server) != 0) - continue; - - if (tmp_record.jobids.len > 0 && - current_time + condor_limit + RENEWAL_CLOCK_SKEW > tmp_record.end_time) { - - /* skip expired proxy (or ones that are going to expire soon), - leaving it untouched (it will be removed after next run of the - renewal process) */ - - continue; - } - - record->suffix = tmp_record.suffix; - record->jobids.len = tmp_record.jobids.len; - record->jobids.val = tmp_record.jobids.val; - record->unique = tmp_record.unique; - record->voms_exts = tmp_record.voms_exts; - if (record->myproxy_server) - free(record->myproxy_server); - record->myproxy_server = tmp_record.myproxy_server; - record->end_time = tmp_record.end_time; - record->next_renewal = tmp_record.next_renewal; - return 0; - } - - if (last_used_suffix) - *last_used_suffix = last_suffix; - - if (record->suffix >= 0) { - glite_renewal_log(ctx, LOG_DEBUG, "Requested suffix %d not found in meta file", - record->suffix); - } - - free_record(ctx, &tmp_record); - - return EDG_WLPR_ERROR_PROTO_PARSE_NOT_FOUND; -} - -static int -get_record(glite_renewal_core_context ctx, FILE *fd, proxy_record *record) -{ - return get_record_ext(ctx, fd, record, NULL); -} - -static int -store_record(glite_renewal_core_context ctx, char *basename, proxy_record *record) -{ - int stored = 0; - FILE *fd = NULL; - int temp; - char line[1024]; - char *new_line = NULL; - int ret, i; - char *p; - proxy_record tmp_record; - char tmp_file[FILENAME_MAX]; - char meta_file[FILENAME_MAX]; - int line_num = 0; - - assert (record != NULL); - - memset(&tmp_record, 0, sizeof(tmp_record)); - - snprintf(meta_file, sizeof(meta_file), "%s.data", basename); - snprintf(tmp_file, sizeof(tmp_file), "%s.XXXXXX", meta_file); - - temp = mkstemp(tmp_file); - if (temp < 0) - return errno; - - fd = fopen(meta_file, "r"); - if (fd == NULL) { - ret = errno; - goto end; - } - while (fgets(line, sizeof(line), fd) != NULL) { - line_num++; - free_record(ctx, &tmp_record); - p = strchr(line, '\n'); - if (p) - *p = '\0'; - ret = decode_record(ctx, line, &tmp_record); - if (ret) { - glite_renewal_log(ctx, LOG_ERR, "Removing invalid entry at line %d in %s", line_num, basename); - continue; - } - if (record->suffix == tmp_record.suffix && - record->unique == tmp_record.unique) { - tmp_record.next_renewal = record->next_renewal; - tmp_record.end_time = record->end_time; - tmp_record.voms_exts = record->voms_exts; - if (tmp_record.myproxy_server != NULL) - free(tmp_record.myproxy_server); - tmp_record.myproxy_server = strdup(record->myproxy_server); - if (tmp_record.jobids.val) { - for (i = 0; i < tmp_record.jobids.len; i++) - free(tmp_record.jobids.val[i]); - free(tmp_record.jobids.val); - } - tmp_record.jobids.len = 0; - tmp_record.jobids.val = NULL; - for (i = 0; i < record->jobids.len; i++) { - realloc_prd_list(ctx, &tmp_record.jobids); - tmp_record.jobids.val[tmp_record.jobids.len - 1] = - strdup(record->jobids.val[i]); - } - stored = 1; - } - ret = encode_record(ctx, &tmp_record, &new_line); - if (ret) - goto end; - dprintf(temp, "%s\n", new_line); - free(new_line); - new_line = NULL; - } - if (! stored) { - ret = encode_record(ctx, record, &new_line); - if (ret) - goto end; - ret = dprintf(temp, "%s\n", new_line); - free(new_line); - new_line = NULL; - } - fclose(fd); fd = NULL; - close(temp); - - ret = rename(tmp_file, meta_file); - if (ret) - ret = errno; - -end: - free_record(ctx, &tmp_record); - if (fd) - fclose(fd); - close(temp); - return ret; -} - -static int -open_metafile(glite_renewal_core_context ctx, char *basename, FILE **fd) -{ - FILE *meta_fd; - char meta_filename[FILENAME_MAX]; - - snprintf(meta_filename, sizeof(meta_filename), "%s.data", basename); - meta_fd = fopen(meta_filename, "a+"); - if (meta_fd == NULL) { - glite_renewal_log(ctx, LOG_ERR, "Opening meta file %s failed (%s)", - meta_filename, strerror(errno)); - return errno; - } - rewind(meta_fd); - *fd = meta_fd; - glite_renewal_log(ctx, LOG_DEBUG, "Using meta file %s", meta_filename); - return 0; -} - -static int -filename_to_response(glite_renewal_core_context ctx, char *filename, edg_wlpr_Response *response) -{ - response->filenames = malloc(2 * sizeof(*response->filenames)); - if (response->filenames == NULL) { - glite_renewal_log(ctx, LOG_DEBUG, "Not enough memory"); - return errno; - } - response->filenames[0] = strdup(filename); - if (response->filenames[0] == NULL) { - glite_renewal_log(ctx, LOG_DEBUG, "Not enough memory"); - free(response->filenames); - return errno; - } - response->filenames[1] = NULL; - return 0; -} - -static void -record_to_response(glite_renewal_core_context ctx, int status_code, proxy_record *record, - edg_wlpr_Response *response) -{ - /* XXX Neni struktrura proxy_record zbytecna? Mohla by se pouzivat primo - edg_wlpr_Response? */ - response->response_code = status_code; /* XXX chyba parsovatelna pres API */ - if (status_code) - return; - - if (response->myproxy_server) { - response->myproxy_server = strdup(record->myproxy_server); - if (response->myproxy_server == NULL) { - response->response_code = ENOMEM; /* XXX */ - return; - } - } - response->end_time = record->end_time; - response->next_renewal_time = record->next_renewal; - /* XXX use jobid response->counter = record->counter; */ -} - -int -check_proxyname(glite_renewal_core_context ctx, char *datafile, char *jobid, char **filename) -{ - proxy_record record; - FILE *meta_fd = NULL; - char line[1024]; - char proxy[FILENAME_MAX]; - char *p; - int ret, i; - - memset(&record, 0, sizeof(record)); - - meta_fd = fopen(datafile, "r"); - if (meta_fd == NULL) { - glite_renewal_log(ctx, LOG_ERR, "Cannot open meta file %s (%s)", - datafile, strerror(errno)); - return errno; - } - - while (fgets(line, sizeof(line), meta_fd) != NULL) { - free_record(ctx, &record); - p = strchr(line, '\n'); - if (p) - *p = '\0'; - ret = decode_record(ctx, line, &record); - if (ret) - continue; /* XXX exit? */ - for (i = 0; i < record.jobids.len; i++) { - if (strcmp(jobid, record.jobids.val[i]) == 0) { - snprintf(proxy, sizeof(proxy), "%s/%s", repository, datafile); - p = strrchr(proxy, '.'); - sprintf(p, ".%d", record.suffix); - *filename = strdup(proxy); - free_record(ctx, &record); - fclose(meta_fd); - return 0; - } - } - } - free_record(ctx, &record); - fclose(meta_fd); - return EDG_WLPR_ERROR_PROTO_PARSE_NOT_FOUND; -} - -int -find_proxyname(glite_renewal_core_context ctx, char *jobid, char **filename) -{ - DIR *dir = NULL; - struct dirent *file; - int ret; - - chdir(repository); - - dir = opendir(repository); - if (dir == NULL) { - glite_renewal_log(ctx, LOG_ERR, "Cannot open repository directory %s (%s)", - repository, strerror(errno)); - return errno; - } - - while ((file = readdir(dir))) { - /* read files of format `md5sum`.data, where md5sum() is of fixed length - 32 chars */ - if (file->d_name == NULL || strlen(file->d_name) != 37 || - strcmp(file->d_name + 32, ".data") != 0) - continue; - ret = check_proxyname(ctx, file->d_name, jobid, filename); - if (ret == 0) { - closedir(dir); - return 0; - } - } - closedir(dir); - glite_renewal_log(ctx, LOG_ERR, "Requested proxy is not registered"); - return EDG_WLPR_PROXY_NOT_REGISTERED; -} - -#ifdef NOVOMS -int -find_voms_cert(glite_renewal_core_context ctx, char *file, int *present) -{ - *present = 0; - return 0; -} - -#else -int -find_voms_cert(glite_renewal_core_context ctx, char *file, int *present) -{ - struct vomsdata *voms_info = NULL; - STACK_OF(X509) *chain = NULL; - EVP_PKEY *privkey = NULL; - X509 *cert = NULL; - int ret, err; - - *present = 0; - - voms_info = VOMS_Init(vomsdir, cadir); - if (voms_info == NULL) { - glite_renewal_log(ctx, LOG_ERR, "check_voms_cert(): Cannot initialize VOMS context (VOMS_Init() failed, probably voms dir was not specified)"); - return EDG_WLPR_ERROR_VOMS; - } - - ret = glite_renewal_load_proxy(ctx, file, &cert, &privkey, &chain, NULL); - if (ret) { - VOMS_Destroy(voms_info); - return ret; - } - - ret = VOMS_Retrieve(cert, chain, RECURSE_CHAIN, voms_info, &err); - if (ret == 1) { - *present = 1; - } - - VOMS_Destroy(voms_info); - X509_free(cert); - EVP_PKEY_free(privkey); - sk_X509_pop_free(chain, X509_free); - return 0; -} -#endif - -void -register_proxy(glite_renewal_core_context ctx, edg_wlpr_Request *request, edg_wlpr_Response *response) -{ - proxy_record record; - int ret; - FILE *meta_fd = NULL; - int last_suffix; - char *basename = NULL; - char filename[FILENAME_MAX]; - - assert(request != NULL); - assert(response != NULL); - - memset(&record, 0, sizeof(record)); - memset(response, 0, sizeof(*response)); - glite_renewal_log(ctx, LOG_DEBUG, "Registration request for %s", request->proxy_filename); - - if (request->proxy_filename == NULL || request->jobid == NULL) { - glite_renewal_log(ctx, LOG_ERR, "Registration request doesn't contain registration information"); - return; /* EINVAL; */ - } - umask(0177); - - ret = get_base_filename(ctx, request->proxy_filename, &basename); - if (ret) - goto end; - - ret = open_metafile(ctx, basename, &meta_fd); - if (ret) - goto end; - - if (voms_enabled) - ret = find_voms_cert(ctx, request->proxy_filename, &record.voms_exts); - /* ignore VOMS related error */ - - /* Find first free record */ - record.suffix = -1; - record.myproxy_server = strdup(request->myproxy_server); - ret = get_record_ext(ctx, meta_fd, &record, &last_suffix); - fclose(meta_fd); meta_fd = NULL; - if (ret && ret != EDG_WLPR_ERROR_PROTO_PARSE_NOT_FOUND) - goto end; - - if (ret == EDG_WLPR_ERROR_PROTO_PARSE_NOT_FOUND || record.jobids.len == 0 || request->unique || record.voms_exts) { - /* create a new proxy file in the repository */ - int suffix; - - suffix = (record.jobids.len == 0 && record.suffix >= 0) ? - record.suffix : last_suffix + 1; - snprintf(filename, sizeof(filename), "%s.%d", basename, suffix); - ret = copy_file(ctx, request->proxy_filename, filename); - if (ret) - goto end; - ret = get_times(ctx, filename, &record); - if (ret) - goto end; - record.suffix = suffix; - ret = realloc_prd_list(ctx, &record.jobids); - if (ret) - goto end; - record.jobids.val[record.jobids.len - 1] = strdup(request->jobid); - record.unique = request->unique; - glite_renewal_log(ctx, LOG_DEBUG, "Created a new proxy file in repository (%s)", - filename); - } else { - ret = realloc_prd_list(ctx, &record.jobids); - if (ret) - goto end; - record.jobids.val[record.jobids.len - 1] = strdup(request->jobid); - snprintf(filename, sizeof(filename), "%s.%d", basename, record.suffix); - glite_renewal_log(ctx, LOG_DEBUG, "Inremented counter on %s", filename); - } - - ret = store_record(ctx, basename, &record); - -end: - if (meta_fd) { - fclose(meta_fd); - } - - if (basename) - free(basename); - - if (ret == 0) - ret = filename_to_response(ctx, filename, response); - record_to_response(ctx, ret, &record, response); - free_record(ctx, &record); -} - -void -unregister_proxy(glite_renewal_core_context ctx, edg_wlpr_Request *request, edg_wlpr_Response *response) -{ - proxy_record record; - int ret, i, index; - FILE *meta_fd = NULL; - char *basename = NULL; - char *p; - struct stat stat_buf; - - memset(&record, 0, sizeof(record)); - glite_renewal_log(ctx, LOG_DEBUG, "Unregistration request for %s", request->jobid); - - if (request->jobid == NULL) { - glite_renewal_log(ctx, LOG_ERR, "Unregistration request doesn't contain needed information"); - ret = EINVAL; - goto end; - } - - if (request->proxy_filename == NULL) { - ret = find_proxyname(ctx, request->jobid, &request->proxy_filename); - if (ret) - goto end; - } - - ret = get_base_filename(ctx, request->proxy_filename, &basename); - if (ret) { - goto end; - } - - if (strncmp(request->proxy_filename, basename, strlen(basename) != 0)) { - glite_renewal_log(ctx, LOG_DEBUG, "Requested proxy %s is not from repository", - request->proxy_filename); - ret = EDG_WLPR_PROXY_NOT_REGISTERED; - goto end; - } - - p = strrchr(request->proxy_filename, '.'); - if (p == NULL) { - glite_renewal_log(ctx, LOG_DEBUG, "Requested proxy %s is not from repository", - request->proxy_filename); - ret = EDG_WLPR_PROXY_NOT_REGISTERED; - goto end; - } - - ret = edg_wlpr_DecodeInt(p+1, &record.suffix); - if (ret) { - glite_renewal_log(ctx, LOG_DEBUG, "Requested proxy %s is not from repository", - request->proxy_filename); - ret = EDG_WLPR_PROXY_NOT_REGISTERED; - goto end; - } - - ret = open_metafile(ctx, basename, &meta_fd); - if (ret) { - /* fill in error response */ - return; - } - - ret = get_record(ctx, meta_fd, &record); - if (ret) - goto end; - - ret = EDG_WLPR_PROXY_NOT_REGISTERED; - for (i = 0; i < record.jobids.len; i++) - if (strcmp(request->jobid, record.jobids.val[i]) == 0) { - ret = 0; - break; - } - if (ret) { - glite_renewal_log(ctx, LOG_DEBUG, "Requested proxy %s is not registered", - request->proxy_filename); - goto end; - } - - /* remove jobid from the list */ - index = i; - free(record.jobids.val[i]); - record.jobids.len--; - for (i = index; i < record.jobids.len; i++) - record.jobids.val[i] = record.jobids.val[i+1]; - - if (record.jobids.len == 0) { - record.unique = 0; - record.voms_exts = 0; - record.end_time = 0; - record.next_renewal = 0; - } - - ret = stat(request->proxy_filename, &stat_buf); - if (ret) { - glite_renewal_log(ctx, LOG_DEBUG, "Cannot stat file %s: (%s)", - request->proxy_filename, strerror(errno)); - ret = errno; - goto end; - } - - ret = store_record(ctx, basename, &record); - if (ret) - goto end; - - if (record.jobids.len == 0) - unlink(request->proxy_filename); - -end: - if (meta_fd) { - fclose(meta_fd); - } - if (basename) - free(basename); - - if (ret == 0) - ret = filename_to_response(ctx, request->proxy_filename, response); - record_to_response(ctx, ret, &record, response); - free_record(ctx, &record); -} - -void -get_proxy(glite_renewal_core_context ctx, edg_wlpr_Request *request, edg_wlpr_Response *response) -{ - char *filename = NULL; - int ret; - - memset(response, 0, sizeof(*response)); - - glite_renewal_log(ctx, LOG_DEBUG, "GET request for %s", request->jobid); - - if (request->jobid == NULL) { - glite_renewal_log(ctx, LOG_ERR, "GET request doesn't contain jobid specification"); - ret = EINVAL; - goto end; - } - - ret = find_proxyname(ctx, request->jobid, &filename); - -end: - if (ret == 0) - ret = filename_to_response(ctx, filename, response); - if (filename) - free(filename); - response->response_code = ret; -} - -void -update_db(glite_renewal_core_context ctx, edg_wlpr_Request *request, edg_wlpr_Response *response) -{ - FILE *fd = NULL; - int tmp_fd = -1; - int suffix = -1; - char tmp_file[FILENAME_MAX]; - char cur_proxy[FILENAME_MAX]; - char datafile[FILENAME_MAX]; - char line[1024]; - char *new_line = NULL; - char *basename, *proxy = NULL; - char **entry; - proxy_record record; - int ret; - char *p; - time_t current_time; - - memset(&record, 0, sizeof(record)); - - glite_renewal_log(ctx, LOG_DEBUG, "UPDATE_DB request for %s", request->proxy_filename); - - chdir(repository); - basename = request->proxy_filename; - - snprintf(datafile, sizeof(datafile), "%s.data", basename); - fd = fopen(datafile, "r"); - if (fd == NULL) { - glite_renewal_log(ctx, LOG_ERR, "Cannot open meta file %s (%s)", - datafile, strerror(errno)); - ret = errno; - return; - } - - snprintf(tmp_file, sizeof(tmp_file), "%s.XXXXXX", datafile); - tmp_fd = mkstemp(tmp_file); - if (tmp_fd < 0) { - glite_renewal_log(ctx, LOG_ERR, "Cannot create temporary file (%s)", - strerror(errno)); - ret = errno; - goto end; - } - - entry = request->entries; - if (entry) { - p = strchr(*entry, ':'); - *p = '\0'; - suffix = atoi(*entry); - proxy = p+1; - } - - current_time = time(NULL); - - while (fgets(line, sizeof(line), fd) != NULL) { - free_record(ctx, &record); - p = strchr(line, '\n'); - if (p) - *p = '\0'; - ret = decode_record(ctx, line, &record); - if (ret) - goto end; - - if (record.suffix > suffix && entry && *entry) { - do { - entry++; - if (entry == NULL || *entry == NULL) { - suffix = -1; - break; - } - - p = strchr(*entry, ':'); - suffix = atoi(*entry); - proxy = p+1; - } while (record.suffix > suffix); - } - - if (record.suffix == suffix) { - snprintf(cur_proxy, sizeof(cur_proxy), "%s.%d", basename, suffix); - if (proxy == NULL || *proxy == '\0') { - /* if proxy isn't specified use file registered currently and - * reschedule renewal */ - if (record.end_time < current_time) { - char *server; - /* remove file with expired proxy and clean the record in db */ - unlink(cur_proxy); - server = strdup(record.myproxy_server); - free_record(ctx, &record); - record.suffix = suffix; - record.myproxy_server = server; - glite_renewal_log(ctx, LOG_WARNING, "Removed expired proxy %s", cur_proxy); - } else - get_times(ctx, cur_proxy, &record); - } else { - ret = get_times(ctx, proxy, &record); - (ret == 0) ? rename(proxy, cur_proxy) : unlink(proxy); - } - } - - ret = encode_record(ctx, &record, &new_line); - if (ret) - goto end; - - dprintf(tmp_fd, "%s\n", new_line); - free(new_line); - new_line = NULL; - } - free_record(ctx, &record); - - close(tmp_fd); - fclose(fd); - - rename(tmp_file, datafile); - - return; - -end: - if (fd) - fclose(fd); - unlink(tmp_file); - if (tmp_fd > 0) - close(tmp_fd); - free_record(ctx, &record); - - return; -} diff --git a/org.glite.security.proxyrenewal/src/common.c b/org.glite.security.proxyrenewal/src/common.c deleted file mode 100644 index 206bc2f..0000000 --- a/org.glite.security.proxyrenewal/src/common.c +++ /dev/null @@ -1,322 +0,0 @@ -#include "renewal_locl.h" - -#ident "$Header$" - -/* nread() and nwrite() never return partial data */ -static int -nread(int sock, struct timeval *to, char *buf, size_t buf_len, size_t *read_len) -{ - int count; - size_t remain = buf_len; - char *cbuf = buf; - struct pollfd pollfds[1]; - struct timeval before,after; - int ret; - - if (to) { - gettimeofday(&before,NULL); - } - - while (remain > 0) { - pollfds[0].fd = sock; - pollfds[0].events = POLLIN; - switch (poll(pollfds, 1, to ? (to->tv_sec*1000+to->tv_usec/1000) : INFTIM)) { - case 0: - ret = EDG_WLPR_ERROR_TIMEOUT; - goto end; - case -1: - ret = EDG_WLPR_ERROR_ERRNO; - goto end; - } - - count = read(sock, cbuf, remain); - if (count < 0) { - if (errno == EINTR) - continue; - else { - ret = EDG_WLPR_ERROR_ERRNO; - goto end; - } - } else - if (count == 0) { - *read_len = 0; - return 0; - } - cbuf += count; - remain -= count; - } - *read_len = buf_len; - ret = 0; - -end: - if (to) { - gettimeofday(&after,NULL); - edg_wlpr_DecrementTimeout(to, before, after); - if (to->tv_sec < 0) { - to->tv_sec = 0; - to->tv_usec = 0; - } - } - - return ret; -} - -static int -nwrite(int sock, struct timeval *to, const char *buf, size_t buf_len) -{ - const char *cbuf = buf; - int count; - size_t remain = buf_len; - struct pollfd pollfds[1]; - struct timeval before,after; - int ret; - - if (to) { - gettimeofday(&before,NULL); - } - - while (remain > 0) { - pollfds[0].fd = sock; - pollfds[0].events = POLLOUT; - switch (poll(pollfds, 1, to ? (to->tv_sec*1000+to->tv_usec/1000) : INFTIM)) { - case 0: ret = EDG_WLPR_ERROR_TIMEOUT; - goto end; - case -1: ret = EDG_WLPR_ERROR_ERRNO; - goto end; - } - - count = write(sock, cbuf, remain); - if (count < 0) { - if (errno == EINTR) - continue; - else { - ret = EDG_WLPR_ERROR_ERRNO; - goto end; - } - } - cbuf += count; - remain -= count; - } - ret = 0; - -end: - if (to) { - gettimeofday(&after,NULL); - edg_wlpr_DecrementTimeout(to, before, after); - if (to->tv_sec < 0) { - to->tv_sec = 0; - to->tv_usec = 0; - } - } - - return ret; -} - -int -edg_wlpr_Read(int sock, struct timeval *timeout, char **buf, size_t *buf_len) -{ - int ret; - unsigned char length[4]; - size_t len; - - ret = nread(sock, timeout, length, 4, &len); - if (ret) { - *buf_len = 0; - return ret; - } - if (len != 4) { - *buf_len = 0; - return EDG_WLPR_ERROR_UNEXPECTED_EOF; /* XXX vraci i kdyz peer spadne a zavre trubku */ - } - *buf_len = (length[0] << 24) | - (length[1] << 16) | - (length[2] << 8 ) | - (length[3] << 0); - - *buf = malloc(*buf_len); - if (*buf == NULL) - return ENOMEM; - - ret = nread(sock, timeout, *buf, *buf_len, &len); - if (ret) - return ret; - - if (len != *buf_len) { - free(*buf); - *buf_len = 0; - return EDG_WLPR_ERROR_UNEXPECTED_EOF; /* XXX */ - } - - return 0; -} - -int -edg_wlpr_Write(int sock, struct timeval *timeout, char *buf, size_t buf_len) -{ - unsigned char length[4]; - int ret; - - length[0] = (buf_len >> 24) & 0xFF; - length[1] = (buf_len >> 16) & 0xFF; - length[2] = (buf_len >> 8) & 0xFF; - length[3] = (buf_len >> 0) & 0xFF; - - if ((ret = nwrite(sock, timeout, length, 4)) != 0 || - (ret = nwrite(sock, timeout, buf, buf_len)) != 0) - return ret; - - return 0; -} - -int -edg_wlpr_GetToken(const char *msg, const size_t msg_len, - const char *key, const char *separators, - int req_index, char **value) -{ - char *p; - size_t len; - int index; - - assert(separators != NULL); - - /* Add ending zero ? */ - - index = 0; - p = (char *)msg; - while (p && (p = strstr(p, key))) { - if (index == req_index) - break; - index++; - p += strlen(key); - } - if (p == NULL) - return EDG_WLPR_ERROR_PROTO_PARSE_NOT_FOUND; - - p = strchr(p, '='); - if (p == NULL) - return EDG_WLPR_ERROR_PROTO_PARSE_ERROR; - - len = strcspn(p+1, separators); - if (len == 0) - return EDG_WLPR_ERROR_PROTO_PARSE_ERROR; - - *value = malloc(len + 1); - if (*value == NULL) - return ENOMEM; - - memcpy(*value, p+1, len); - (*value)[len] = '\0'; - - return 0; -} - -int -edg_wlpr_StoreToken(char **buf, size_t *buf_len, char *command, - char *value, const char *separator) -{ - char line[2048]; - char *tmp; - - assert(buf != NULL); - assert(separator != NULL); - - if (strlen(command) + 1 + strlen(value) + 2 > sizeof(line)) - return ERANGE; /* XXX */ - - snprintf(line, sizeof(line), "%s%s%s", command, value, separator); - - while (strlen(*buf) + strlen(line) + 1 > *buf_len) { - tmp = realloc(*buf, *buf_len + EDG_WLPR_BUF_SIZE); - if (tmp == NULL) - return ENOMEM; - *buf = tmp; - *buf_len += EDG_WLPR_BUF_SIZE; - } - strcat(*buf, line); - - return 0; -} - -void -edg_wlpr_CleanRequest(edg_wlpr_Request *request) -{ - assert(request != NULL); - if (request->version) - free(request->version); - if (request->proxy_filename) - free(request->proxy_filename); - if (request->myproxy_server) - free(request->myproxy_server); - if (request->jobid) - free(request->jobid); - if (request->entries) { - char **p = request->entries; - char **next; - while (*p) { - next = p+1; - free(*p); - p = next; - } - free(request->entries); - } - - memset(request, 0, sizeof(request)); -} - -void -edg_wlpr_CleanResponse(edg_wlpr_Response *response) -{ - assert(response != NULL); - if (response->version) - free(response->version); - if (response->myproxy_server) - free(response->myproxy_server); - if (response->filenames) { - char **p = response->filenames; - char **next; - - while (*p) { - next = p+1; - free(*p); - p = next; - } - free(response->filenames); - } - memset(response, 0, sizeof(*response)); -} - -const char * -edg_wlpr_GetErrorString(int code) -{ - return (code == 0) ? "OK" : "Error"; -} - -char * -edg_wlpr_EncodeInt(int num) /* long? time */ -{ - static char ret[64]; - - snprintf(ret, sizeof(ret), "%d", num); - return ret; -} - -int -edg_wlpr_DecodeInt(char *str, int *num) -{ - *num = atol(str); /* XXX */ - return 0; -} - -int -edg_wlpr_DecrementTimeout(struct timeval *timeout, struct timeval before, struct timeval after) -{ - (*timeout).tv_sec = (*timeout).tv_sec - (after.tv_sec - before.tv_sec); - (*timeout).tv_usec = (*timeout).tv_usec - (after.tv_usec - before.tv_usec); - while ( (*timeout).tv_usec < 0) { - (*timeout).tv_sec--; - (*timeout).tv_usec += 1000000; - } - - if ( ((*timeout).tv_sec < 0) || (((*timeout).tv_sec == 0) && ((*timeout).tv_usec == 0)) ) return(1); - else return(0); -} diff --git a/org.glite.security.proxyrenewal/src/renew.c b/org.glite.security.proxyrenewal/src/renew.c deleted file mode 100644 index 29105d2..0000000 --- a/org.glite.security.proxyrenewal/src/renew.c +++ /dev/null @@ -1,256 +0,0 @@ -#include "renewal_locl.h" -#include "renewd_locl.h" - -#include "glite/security/voms/voms_apic.h" - -#ident "$Header$" - -#define RENEWAL_COUNTS_MAX 1000 /* the slave daemon exits after that many attemtps */ - -extern char *repository; -extern char *cadir; -extern char *vomsdir; -extern int voms_enabled; -static int received_signal = -1, die = 0; - -static void -check_renewal(glite_renewal_core_context ctx, char *datafile, int force_renew, int *num_renewed); - -static int -renew_proxy(glite_renewal_core_context ctx, proxy_record *record, char *basename, char **new_proxy); - -static void -register_signal(int signal); - -static void -register_signal(int signal) -{ - received_signal = signal; - switch ((received_signal = signal)) { - case SIGINT: - case SIGTERM: - case SIGQUIT: - die = signal; - break; - default: - break; - } -} - -static int -renew_proxy(glite_renewal_core_context ctx, proxy_record *record, char *basename, char **new_proxy) -{ - char repository_file[FILENAME_MAX]; - int ret = -1; - char *p = NULL; - char *server = NULL; - unsigned int port = 0; - - snprintf(repository_file, sizeof(repository_file),"%s.%d", - basename, record->suffix); - - if (record->myproxy_server) - server = strdup(record->myproxy_server); - - if (server && (p = strchr(server, ':'))) { - *p++ = '\0'; - ret = edg_wlpr_DecodeInt(p, &port); - } - - ret = glite_renewal_core_renew(ctx, server, port, repository_file, new_proxy); - if (ret) - goto end; - - ret = 0; - -end: - if (server) - free(server); - - return ret; -} - -static void -check_renewal(glite_renewal_core_context ctx, char *datafile, int force_renew, int *num_renewed) -{ - char line[1024]; - proxy_record record; - char *p; - int ret, i; - time_t current_time; - FILE *meta_fd = NULL; - char basename[FILENAME_MAX]; - edg_wlpr_Request request; - edg_wlpr_Response response; - char *new_proxy = NULL; - char *entry = NULL; - char **tmp; - int num = 0; - - assert(datafile != NULL); - - *num_renewed = 0; - - memset(&record, 0, sizeof(record)); - memset(basename, 0, sizeof(basename)); - memset(&request, 0, sizeof(request)); - memset(&response, 0, sizeof(response)); - - strncpy(basename, datafile, sizeof(basename) - 1); - p = basename + strlen(basename) - strlen(".data"); - if (strcmp(p, ".data") != 0) { - glite_renewal_log(ctx, LOG_ERR, "Meta filename doesn't end with '.data'"); - return; - } - *p = '\0'; - - request.command = EDG_WLPR_COMMAND_UPDATE_DB; - request.proxy_filename = strdup(basename); - - meta_fd = fopen(datafile, "r"); - if (meta_fd == NULL) { - glite_renewal_log(ctx, LOG_ERR, "Cannot open meta file %s (%s)", - datafile, strerror(errno)); - return; - } - - current_time = time(NULL); - glite_renewal_log(ctx, LOG_DEBUG, "Reading metafile %s", datafile); - - while (fgets(line, sizeof(line), meta_fd) != NULL) { - free_record(ctx, &record); - p = strchr(line, '\n'); - if (p) - *p = '\0'; - ret = decode_record(ctx, line, &record); - if (ret) - continue; /* XXX exit? */ - if (record.jobids.len == 0) /* no jobid registered for this proxy */ - continue; - if (current_time + RENEWAL_CLOCK_SKEW >= record.end_time || - record.next_renewal <= current_time || - force_renew) { - ret = EDG_WLPR_PROXY_EXPIRED; - if ( record.end_time + RENEWAL_CLOCK_SKEW >= current_time) { - /* only try renewal if the proxy hasn't already expired */ - ret = renew_proxy(ctx, &record, basename, &new_proxy); - } - - /* if the proxy wasn't renewed have the daemon planned another renewal */ - asprintf(&entry, "%d:%s", record.suffix, (ret == 0) ? new_proxy : ""); - if (new_proxy) { - free(new_proxy); new_proxy = NULL; - } - - tmp = realloc(request.entries, (num + 2) * sizeof(*tmp)); - if (tmp == NULL) { - free_record(ctx, &record); - return; - } - request.entries = tmp; - request.entries[num] = entry; - request.entries[num+1] = NULL; - num++; - } - } - free_record(ctx, &record); - - if (num > 0) { - ret = edg_wlpr_RequestSend(&request, &response); - if (ret != 0) - glite_renewal_log(ctx, LOG_ERR, - "Failed to send update request to master (%d)", ret); - else if (response.response_code != 0) - glite_renewal_log(ctx, LOG_ERR, - "Master failed to update database (%d)", response.response_code); - - /* delete all tmp proxy files which may survive */ - for (i = 0; i < num; i++) { - p = strchr(request.entries[i], ':'); - if (p+1) - unlink(p+1); - } - } - fclose(meta_fd); - - edg_wlpr_CleanResponse(&response); - edg_wlpr_CleanRequest(&request); - - *num_renewed = num; - - return; -} - -int renewal(glite_renewal_core_context ctx, int force_renew, int *num_renewed) -{ - DIR *dir = NULL; - struct dirent *file; - FILE *fd; - int num = 0; - - glite_renewal_log(ctx, LOG_DEBUG, "Starting renewal process"); - - *num_renewed = 0; - - if (chdir(repository)) { - glite_renewal_log(ctx, LOG_ERR, "Cannot access repository directory %s (%s)", - repository, strerror(errno)); - return errno; - } - - dir = opendir(repository); - if (dir == NULL) { - glite_renewal_log(ctx, LOG_ERR, "Cannot open repository directory %s (%s)", - repository, strerror(errno)); - return errno; - } - - while ((file = readdir(dir))) { - /* read files of format `md5sum`.data, where md5sum() is of fixed length - 32 chars */ - if (file->d_name == NULL || strlen(file->d_name) != 37 || - strcmp(file->d_name + 32, ".data") != 0) - continue; - fd = fopen(file->d_name, "r"); - if (fd == NULL) { - glite_renewal_log(ctx, LOG_ERR, "Cannot open meta file %s (%s)", - file->d_name, strerror(errno)); - continue; - } - check_renewal(ctx, file->d_name, force_renew, &num); - *num_renewed += num; - fclose(fd); - } - closedir(dir); - glite_renewal_log(ctx, LOG_DEBUG, "Finishing renewal process"); - return 0; -} - -void -watchdog_start(glite_renewal_core_context ctx) -{ - struct sigaction sa; - int force_renewal; - int count = 0, num; - - memset(&sa,0,sizeof(sa)); - sa.sa_handler = register_signal; - sigaction(SIGUSR1, &sa, NULL); - sigaction(SIGINT,&sa,NULL); - sigaction(SIGQUIT,&sa,NULL); - sigaction(SIGTERM,&sa,NULL); - sigaction(SIGPIPE,&sa,NULL); - - while (count < RENEWAL_COUNTS_MAX && !die) { - received_signal = -1; - sleep(60 * 5); - force_renewal = (received_signal == SIGUSR1) ? 1 : 0; - if (die) - break; - /* XXX uninstall signal handler ? */ - renewal(ctx, force_renewal, &num); - count += num; - } - glite_renewal_log(ctx, LOG_DEBUG, "Terminating after %d renewal attempts", count); - exit(0); -} diff --git a/org.glite.security.proxyrenewal/src/renewal_core.c b/org.glite.security.proxyrenewal/src/renewal_core.c deleted file mode 100644 index 3bd2d1d..0000000 --- a/org.glite.security.proxyrenewal/src/renewal_core.c +++ /dev/null @@ -1,283 +0,0 @@ -#include -#include - -#include "renewal_core.h" -#include "renewal_locl.h" -#include "renewd_locl.h" - -static const char rcsid[] = "$Id$"; - -int -glite_renewal_load_proxy(glite_renewal_core_context ctx, const char *cur_file, X509 **cert, EVP_PKEY **priv_key, - STACK_OF(X509) **chain, globus_gsi_cred_handle_t *cur_proxy) -{ - globus_result_t result; - globus_gsi_cred_handle_t proxy = NULL; - int ret; - - result = globus_gsi_cred_handle_init(&proxy, NULL); - if (result) { - fprintf(stderr, "globus_gsi_cred_handle_init() failed\n"); - goto end; - } - - result = globus_gsi_cred_read_proxy(proxy, (char *) cur_file); - if (result) { - fprintf(stderr, "globus_gsi_cred_read_proxy() failed\n"); - goto end; - } - - if (cert) { - result = globus_gsi_cred_get_cert(proxy, cert); - if (result) { - fprintf(stderr, "globus_gsi_cred_get_cert() failed\n"); - goto end; - } - } - - if (priv_key) { - result = globus_gsi_cred_get_key(proxy, priv_key); - if (result) { - fprintf(stderr, "globus_gsi_cred_get_key() failed\n"); - goto end; - } - } - - if (chain) { - result = globus_gsi_cred_get_cert_chain(proxy, chain); - if (result) { - fprintf(stderr, "globus_gsi_cred_get_cert_chain() failed\n"); - goto end; - } - } - - if (cur_proxy) { - *cur_proxy = proxy; - proxy = NULL; - } - - ret = 0; - -end: - if (proxy) - globus_gsi_cred_handle_destroy(proxy); - if (result) - ret = EDG_WLPR_ERROR_GENERIC; - - return ret; -} - -int -glite_renewal_get_proxy_base_name(glite_renewal_core_context ctx, const char *file, char **name) -{ - X509 *cert = NULL; - EVP_PKEY *key = NULL; - STACK_OF(X509) *chain = NULL; - X509_NAME *subject = NULL; - int ret; - globus_result_t result; - - ret = glite_renewal_load_proxy(ctx, file, &cert, &key, &chain, NULL); - if (ret) - return ret; - - subject = X509_NAME_dup(X509_get_subject_name(cert)); - - sk_X509_insert(chain, cert, 0); - cert = NULL; - - result = globus_gsi_cert_utils_get_base_name(subject, chain); - if (result) { - glite_renewal_log(ctx, LOG_ERR, "Cannot get subject name from proxy %s", file); - ret = EDG_WLPR_ERROR_SSL; /* XXX ??? */ - goto end; - } - - *name = X509_NAME_oneline(subject, NULL, 0); - ret = 0; - -end: - if (cert) - X509_free(cert); - if (key) - EVP_PKEY_free(key); - if (chain) - sk_X509_pop_free(chain, X509_free); - if (subject) - X509_NAME_free(subject); - - return ret; -} - -int -glite_renewal_core_renew(glite_renewal_core_context ctx, - const char * myproxy_server, - unsigned int myproxy_port, - const char *current_proxy, - char **new_proxy) -{ - char tmp_proxy[FILENAME_MAX]; - int tmp_fd; - int ret = -1; - char *p; - const char *server = NULL; - myproxy_socket_attrs_t *socket_attrs; - myproxy_request_t *client_request; - myproxy_response_t *server_response; - char *renewed_proxy; - int voms_exts; - - socket_attrs = malloc(sizeof(*socket_attrs)); - memset(socket_attrs, 0, sizeof(*socket_attrs)); - - client_request = malloc(sizeof(*client_request)); - memset(client_request, 0, sizeof(*client_request)); - - server_response = malloc(sizeof(*server_response)); - memset(server_response, 0, sizeof(*server_response)); - - myproxy_set_delegation_defaults(socket_attrs, client_request); - - glite_renewal_log(ctx, LOG_DEBUG, "Trying to renew proxy in %s", current_proxy); - - snprintf(tmp_proxy, sizeof(tmp_proxy), "%s.myproxy.XXXXXX", current_proxy); - tmp_fd = mkstemp(tmp_proxy); - if (tmp_fd == -1) { - glite_renewal_log(ctx, LOG_ERR, "Cannot create temporary file (%s)", - strerror(errno)); - return errno; - } - - ret = glite_renewal_get_proxy_base_name(ctx, current_proxy, &client_request->username); - if (ret) - goto end; - - voms_exts = glite_renewal_check_voms_attrs(ctx, current_proxy); - - client_request->proxy_lifetime = 60 * 60 * DGPR_RETRIEVE_DEFAULT_HOURS; - - server = (myproxy_server) ? myproxy_server : socket_attrs->pshost; - if (server == NULL) { - glite_renewal_log(ctx, LOG_ERR, "No myproxy server specified"); - ret = EINVAL; - goto end; - } - socket_attrs->pshost = strdup(server); - - socket_attrs->psport = (myproxy_port) ? myproxy_port : MYPROXY_SERVER_PORT; - - verror_clear(); - ret = myproxy_get_delegation(socket_attrs, client_request, (char *) current_proxy, - server_response, tmp_proxy); - if (ret == 1) { - ret = EDG_WLPR_ERROR_MYPROXY; - glite_renewal_log(ctx, LOG_ERR, "Error contacting MyProxy server for proxy %s: %s", - current_proxy, verror_get_string()); - verror_clear(); - goto end; - } - - renewed_proxy = tmp_proxy; - - if (voms_exts) { - char tmp_voms_proxy[FILENAME_MAX]; - int tmp_voms_fd; - - snprintf(tmp_voms_proxy, sizeof(tmp_voms_proxy), "%s.voms.XXXXXX", - current_proxy); - tmp_voms_fd = mkstemp(tmp_voms_proxy); - if (tmp_voms_fd == -1) { - glite_renewal_log(ctx, LOG_ERR, "Cannot create temporary file (%s)", - strerror(errno)); - ret = errno; - goto end; - } - - ret = glite_renewal_renew_voms_creds(ctx, current_proxy, renewed_proxy, tmp_voms_proxy); - close(tmp_voms_fd); - if (ret) { - unlink(tmp_voms_proxy); - goto end; - } - - renewed_proxy = tmp_voms_proxy; - unlink(tmp_proxy); - } - - if (new_proxy) - *new_proxy = strdup(renewed_proxy); - - ret = 0; - -end: - if (socket_attrs->socket_fd) - close(socket_attrs->socket_fd); - close(tmp_fd); - if (ret) - unlink(tmp_proxy); - myproxy_free(socket_attrs, client_request, server_response); - - return ret; -} - -int -glite_renewal_core_init_ctx(glite_renewal_core_context *context) -{ - glite_renewal_core_context p = NULL; - - *context = NULL; - - p = calloc(1, sizeof(*p)); - if (p == NULL) - return ENOMEM; - - p->log_level = LOG_ERR; - p->log_dst = GLITE_RENEWAL_LOG_SYSLOG; - - *context = p; - return 0; -} - -int -glite_renewal_core_destroy_ctx(glite_renewal_core_context context) -{ - if (context == NULL) - return 0; - if (context->err_message); - free(context->err_message); - free(context); - return 0; -} - -void -glite_renewal_log(glite_renewal_core_context context, int dbg_level, const char *format, ...) -{ - va_list ap; - - if (context->err_message) { - free(context->err_message); - context->err_message = NULL; - } - - /* cannot handle the %m format argument specific for syslog() */ - va_start(ap, format); - vasprintf(&context->err_message, format, ap); - va_end(ap); - - if (dbg_level > context->log_level) - return; - - switch (context->log_dst) { - case GLITE_RENEWAL_LOG_STDOUT: - printf("%s\n", context->err_message); - break; - case GLITE_RENEWAL_LOG_SYSLOG: - syslog(dbg_level, "%s", context->err_message); - break; - case GLITE_RENEWAL_LOG_NONE: - default: - break; - } - - return; -} diff --git a/org.glite.security.proxyrenewal/src/renewal_locl.h b/org.glite.security.proxyrenewal/src/renewal_locl.h deleted file mode 100644 index 256eb26..0000000 --- a/org.glite.security.proxyrenewal/src/renewal_locl.h +++ /dev/null @@ -1,148 +0,0 @@ -#ifndef RENEWAL_LOCL_H -#define RENEWAL_LOCL_H - -#ident "$Header$" - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#ifndef INFTIM -#define INFTIM (-1) -#endif - -#include -#include -#include -#include - -#include "renewal.h" - -#define JDL_MYPROXY "Myproxy_server=" - -typedef enum { - EDG_WLPR_COMMAND_NONE = 0, - EDG_WLPR_COMMAND_REG = 1, - EDG_WLPR_COMMAND_UNREG, - EDG_WLPR_COMMAND_GET, - EDG_WLPR_COMMAND_LIST, - EDG_WLPR_COMMAND_STATUS, - EDG_WLPR_COMMAND_UPDATE_DB, -} edg_wlpr_Command; - -/* prefix neni nutny */ -#define EDG_WLPR_PROTO_VERSION "Version=" -#define EDG_WLPR_PROTO_COMMAND "Command=" -#define EDG_WLPR_PROTO_MYPROXY_SERVER "Myproxy_server=" -#define EDG_WLPR_PROTO_PROXY "Proxy_name=" -#define EDG_WLPR_PROTO_UNIQUE_PROXY "Unique=" /* XXX */ -#define EDG_WLPR_PROTO_JOBID "Jobid=" -#define EDG_WLPR_PROTO_ENTRY "Entry=" - -#define EDG_WLPR_PROTO_RESPONSE "Response=" /* XXX result ?? */ -#define EDG_WLPR_PROTO_START_TIME "Start_time=" -#define EDG_WLPR_PROTO_END_TIME "End_time=" -#define EDG_WLPR_PROTO_RENEWAL_TIME "Renewal_time=" /* XXX Next renewal ?? */ - -#define EDG_WLPR_MYPROXY_PORT 7512 - -#define EDG_WLPR_REPOSITORY_ROOT "/var/spool/edg-wl-renewd" - -#define EDG_WLPR_BUF_SIZE 4096 - -#define EDG_WLPR_VERSION "EDG Proxy Renewal 1.0" - -#define MAX_PROXIES 4 /* max. number of jobids sharing one proxy */ - -#define RENEWAL_CLOCK_SKEW (5 * 60) - -#define DGPR_RETRIEVE_DEFAULT_HOURS 10 - -#define GLITE_PR_TIMEOUT_DEFAULT 120 - -typedef struct { - char *version; - edg_wlpr_Command command; - char *myproxy_server; - char *proxy_filename; - int unique; - char *jobid; - char **entries; /* for updates from the renewal part (renew.c) */ -} edg_wlpr_Request; - -typedef struct { - char *version; - int response_code; - time_t start_time; - time_t end_time; - time_t next_renewal_time; - int counter; - char *myproxy_server; - char **filenames; -} edg_wlpr_Response; - -#define DGPR_REG_SOCKET_NAME_ROOT "/tmp/dgpr_renew_" - -#if 0 -/* Errors: */ -/* XXX enum */ -#define EDG_WLPR_ERROR_EOF 1 -#define EDG_WLPR_ERROR_PARSE_NOT_FOUND 2 -#define EDG_WLPR_ERROR_PARSE_ERROR 3 -#define EDG_WLPR_ERROR_UNKNOWN_COMMAND 4 -#define EDG_WLPR_ERROR_NOTFOUND 5 -#endif - -int -edg_wlpr_GetToken(const char *msg, const size_t msg_len, - const char *key, const char *separators, - int req_index, char **value); - -int -edg_wlpr_StoreToken(char **buf, size_t *buf_len, char *command, - char *value, const char *separator); - -int -edg_wlpr_Read(int sock, struct timeval *timeout, char **buf, size_t *buf_len); - -int -edg_wlpr_Write(int sock, struct timeval *timeout, char *buf, size_t buf_len); - -void -edg_wlpr_CleanRequest(edg_wlpr_Request *request); - -void -edg_wlpr_CleanResponse(edg_wlpr_Response *response); - -const char * -edg_wlpr_GetErrorString(int err); - -char * -edg_wlpr_EncodeInt(int num); /* long? time */ - -int -edg_wlpr_DecodeInt(char *str, int *num); - -int -edg_wlpr_RequestSend(edg_wlpr_Request *request, edg_wlpr_Response *response); - -int -edg_wlpr_DecrementTimeout(struct timeval *timeout, struct timeval before, struct timeval after); - -#endif /* RENEWAL_LOCL_H */ diff --git a/org.glite.security.proxyrenewal/src/renewd.c b/org.glite.security.proxyrenewal/src/renewd.c deleted file mode 100644 index 3c8512c..0000000 --- a/org.glite.security.proxyrenewal/src/renewd.c +++ /dev/null @@ -1,609 +0,0 @@ -#include "renewal_locl.h" -#include "renewd_locl.h" - -static const char rcsid[] = "$Header$"; - -#define SEPARATORS "\n" -/* GRIDMANAGER_CHECKPROXY_INTERVAL + GRIDMANAGER_MINIMUM_PROXY_TIME */ -#define CONDOR_MINIMUM_PROXY_TIME (1800) - -int debug = 0; -char *repository = NULL; -time_t condor_limit = CONDOR_MINIMUM_PROXY_TIME; -char *cadir = NULL; -char *vomsdir = NULL; -int voms_enabled = 0; -char *cert = NULL; -char *key = NULL; -char *vomsconf = NULL; - -static volatile int die = 0, child_died = 0; -double default_timeout = 0; - -static struct option opts[] = { - { "help", no_argument, NULL, 'h' }, - { "version", no_argument, NULL, 'v' }, - { "debug", no_argument, NULL, 'd' }, - { "repository", required_argument, NULL, 'r' }, - { "condor-limit", required_argument, NULL, 'c' }, - { "CAdir", required_argument, NULL, 'C' }, - { "VOMSdir", required_argument, NULL, 'V' }, - { "enable-voms", no_argument, NULL, 'A' }, - { "voms-config", required_argument, NULL, 'G' }, - { "cert", required_argument, NULL, 't' }, - { "key", required_argument, NULL, 'k' }, - { NULL, 0, NULL, 0 } -}; - -typedef struct { - edg_wlpr_Command code; - void (*handler) (glite_renewal_core_context ctx, edg_wlpr_Request *request, edg_wlpr_Response *response); -} command_table; - -static command_table commands[] = { - { EDG_WLPR_COMMAND_REG, register_proxy, }, - { EDG_WLPR_COMMAND_UNREG, unregister_proxy, }, - { EDG_WLPR_COMMAND_GET, get_proxy, }, -#if 0 - { EDG_WLPR_COMMAND_LIST, list_proxies, }, - { EDG_WLPR_COMMAND_STATUS, status_proxy, }, -#endif - { EDG_WLPR_COMMAND_UPDATE_DB, update_db, }, - { 0, NULL }, -}; - -/* static prototypes */ -static void -usage(glite_renewal_core_context ctx, char *progname); - -static int -do_listen(glite_renewal_core_context ctx, char *socket_name, int *sock); - -static int -encode_response(glite_renewal_core_context ctx, edg_wlpr_Response *response, char **msg); - -static command_table * -find_command(glite_renewal_core_context ctx, edg_wlpr_Command code); - -static int -proto(glite_renewal_core_context ctx, int sock); - -static int -doit(glite_renewal_core_context ctx, int sock); - -static int -decode_request(glite_renewal_core_context ctx, const char *msg, const size_t msg_len, edg_wlpr_Request *request); - -int -start_watchdog(glite_renewal_core_context ctx, pid_t *pid); - -static void -catchsig(int sig) -{ - switch (sig) { - case SIGINT: - case SIGTERM: - case SIGQUIT: - die = sig; - break; - case SIGCHLD: - child_died = 1; - break; - default: - break; - } -} - -static command_table * -find_command(glite_renewal_core_context ctx, edg_wlpr_Command code) -{ - command_table *c; - - for (c = commands; c->code; c++) { - if (c->code == code) - return c; - } - return NULL; -} - -static int -proto(glite_renewal_core_context ctx, int sock) -{ - char *buf = NULL; - size_t buf_len; - int ret; - edg_wlpr_Response response; - edg_wlpr_Request request; - command_table *command; - struct timeval timeout; - - memset(&request, 0, sizeof(request)); - memset(&response, 0, sizeof(response)); - - timeout.tv_sec = (long) default_timeout; - timeout.tv_usec = (long) ((default_timeout - timeout.tv_sec) * 1e6); - - ret = edg_wlpr_Read(sock, &timeout, &buf, &buf_len); - if (ret) { - glite_renewal_log(ctx, LOG_ERR, "Error reading from client: %s", - edg_wlpr_GetErrorString(ret)); - return ret; - } - - ret = decode_request(ctx, buf, buf_len, &request); - free(buf); - if (ret) - goto end; - - /* XXX check request (protocol version, ...) */ - - command = find_command(ctx, request.command); - if (command == NULL) { - ret = EDG_WLPR_ERROR_UNKNOWN_COMMAND; - glite_renewal_log(ctx, LOG_ERR, "Received unknown command (%d)", request.command); - goto end; - } - - glite_renewal_log(ctx, LOG_INFO, "Received command code %d for proxy %s and jobid %s", - request.command, - request.proxy_filename ? request.proxy_filename : "(unspecified)", - request.jobid ? request.jobid : "(unspecified)"); - - command->handler(ctx, &request, &response); - - ret = encode_response(ctx, &response, &buf); - if (ret) - goto end; - - ret = edg_wlpr_Write(sock, &timeout, buf, strlen(buf) + 1); - free(buf); - if (ret) { - glite_renewal_log(ctx, LOG_ERR, "Error sending response to client: %s", - edg_wlpr_GetErrorString(ret)); - goto end; - } - -end: - edg_wlpr_CleanRequest(&request); - edg_wlpr_CleanResponse(&response); - - return ret; -} - -static int -doit(glite_renewal_core_context ctx, int sock) -{ - int newsock; - struct sockaddr_un client_addr; - int client_addr_len = sizeof(client_addr); - int flags; - - while (!die) { - - if (child_died) { - int pid, newpid, ret; - - while ((pid=waitpid(-1,NULL,WNOHANG))>0) - ; - ret = start_watchdog(ctx, &newpid); - if (ret) - return ret; - glite_renewal_log(ctx, LOG_DEBUG, "Renewal slave process re-started"); - child_died = 0; - continue; - } - - newsock = accept(sock, (struct sockaddr *) &client_addr, &client_addr_len); - if (newsock == -1) { - if (errno != EINTR) - glite_renewal_log(ctx, LOG_ERR, "accept() failed"); - continue; - } - glite_renewal_log(ctx, LOG_DEBUG, "Got connection"); - - flags = fcntl(newsock, F_GETFL, 0); - if (fcntl(newsock, F_SETFL, flags | O_NONBLOCK) < 0) { - glite_renewal_log(ctx, LOG_ERR, "Can't set O_NONBLOCK mode (%s), closing.\n", - strerror(errno)); - close(newsock); - continue; - } - - proto(ctx, newsock); - - glite_renewal_log(ctx, LOG_DEBUG, "Connection closed"); - close(newsock); - } - glite_renewal_log(ctx, LOG_DEBUG, "Terminating on signal %d\n",die); - return 0; -} - -static int -decode_request(glite_renewal_core_context ctx, const char *msg, const size_t msg_len, edg_wlpr_Request *request) -{ - char *value = NULL; -#if 0 - char *p; - int port; -#endif - int ret; - int index; - - /* XXX add an ending zero '\0' */ - - assert(msg != NULL); - assert(request != NULL); - - memset(request, 0, sizeof(*request)); - - ret = edg_wlpr_GetToken(msg, msg_len, EDG_WLPR_PROTO_VERSION, SEPARATORS, - 0, &request->version); - if (ret) { - glite_renewal_log(ctx, LOG_ERR, "Protocol error reading protocol specification: %s", - edg_wlpr_GetErrorString(ret)); - return ret; - } - - ret = edg_wlpr_GetToken(msg, msg_len, EDG_WLPR_PROTO_COMMAND, SEPARATORS, - 0, &value); - if (ret) { - glite_renewal_log(ctx, LOG_ERR, "Protocol error reading command specification: %s", - edg_wlpr_GetErrorString(ret)); - goto err; - } - - ret = edg_wlpr_DecodeInt(value, (int *)(&request->command)); - if (ret) { - glite_renewal_log(ctx, LOG_ERR, "Received non-numeric command specification (%s)", - value); - free(value); - goto err; - } - free(value); - - if (find_command(ctx, request->command) == NULL) { - glite_renewal_log(ctx, LOG_ERR, "Received unknown command (%d)", request->command); - ret = EDG_WLPR_ERROR_UNKNOWN_COMMAND; - goto err; - } - - ret = edg_wlpr_GetToken(msg, msg_len, EDG_WLPR_PROTO_MYPROXY_SERVER, - SEPARATORS, 0, &request->myproxy_server); - if (ret && ret != EDG_WLPR_ERROR_PROTO_PARSE_NOT_FOUND) { - glite_renewal_log(ctx, LOG_ERR, "Protocol error reading myproxy server specification: %s", - edg_wlpr_GetErrorString(ret)); - goto err; - } - -#if 0 - request->myproxy_port = EDG_WLPR_MYPROXY_PORT; /* ??? */ - if (request->myproxy_server && (p = strchr(request->myproxy_server, ':'))) { - *p = '\0'; - port = atol(p+1); /* XXX see myproxy for err check */ - request->myproxy_port = port; - } -#endif - - ret = edg_wlpr_GetToken(msg, msg_len, EDG_WLPR_PROTO_PROXY, SEPARATORS, - 0, &request->proxy_filename); - if (ret && ret != EDG_WLPR_ERROR_PROTO_PARSE_NOT_FOUND) { - glite_renewal_log(ctx, LOG_ERR, "Protocol error reading proxy specification: %s", - edg_wlpr_GetErrorString(ret)); - goto err; - } - -#if 0 - ret = edg_wlpr_GetToken(msg, msg_len, EDG_WLPR_PROTO_UNIQUE_PROXY, - SEPARATORS, 0, &value); - if (ret && ret != EDG_WLPR_ERROR_PARSE_NOT_FOUND) - goto err; - if (ret == 0 && strcasecmp(value, "yes") == 0) - request->unique = 1; - free(value); -#endif - - ret = edg_wlpr_GetToken(msg, msg_len, EDG_WLPR_PROTO_JOBID, SEPARATORS, - 0, &request->jobid); - if (ret && ret != EDG_WLPR_ERROR_PROTO_PARSE_NOT_FOUND) { - glite_renewal_log(ctx, LOG_ERR, "Protocol error reading JobId : %s", - edg_wlpr_GetErrorString(ret)); - goto err; - } - - index = 0; - while ((ret = edg_wlpr_GetToken(msg, msg_len, EDG_WLPR_PROTO_ENTRY, - SEPARATORS, index, &value)) == 0) { - char **tmp; - - tmp = realloc(request->entries, (index + 2) * sizeof(*tmp)); - if (tmp == NULL) { - ret = ENOMEM; - goto err; - } - request->entries = tmp; - request->entries[index] = value; - index++; - } - if (ret != EDG_WLPR_ERROR_PROTO_PARSE_NOT_FOUND) - goto err; - if (request->entries) - request->entries[index] = NULL; - - return 0; - -err: - edg_wlpr_CleanRequest(request); - return ret; -} - -static int -encode_response(glite_renewal_core_context ctx, edg_wlpr_Response *response, char **msg) -{ - char *buf; - size_t buf_len; - int ret; - - buf_len = EDG_WLPR_BUF_SIZE; - buf = malloc(buf_len); - if (buf == NULL) - return ENOMEM; - buf[0] = '\0'; - - ret = edg_wlpr_StoreToken(&buf, &buf_len, EDG_WLPR_PROTO_VERSION, - EDG_WLPR_VERSION, SEPARATORS); - if (ret) - goto err; - - ret = edg_wlpr_StoreToken(&buf, &buf_len, EDG_WLPR_PROTO_RESPONSE, - edg_wlpr_EncodeInt(response->response_code), - SEPARATORS); - if (ret) - goto err; - - if (response->myproxy_server) { - char host[1024]; - -#if 0 - snprintf(host, sizeof(host), "%s:%d", response->myproxy_server, - (response->myproxy_port) ? response->myproxy_port : EDG_WLPR_MYPROXY_PORT); -#endif - ret = edg_wlpr_StoreToken(&buf, &buf_len, EDG_WLPR_PROTO_MYPROXY_SERVER, - host, SEPARATORS); - if (ret) - goto err; - } - - if (response->start_time) { - ret = edg_wlpr_StoreToken(&buf, &buf_len, EDG_WLPR_PROTO_START_TIME, - edg_wlpr_EncodeInt(response->start_time), - SEPARATORS); - if (ret) - goto err; - } - - if (response->end_time) { - ret = edg_wlpr_StoreToken(&buf, &buf_len, EDG_WLPR_PROTO_END_TIME, - edg_wlpr_EncodeInt(response->end_time), - SEPARATORS); - if (ret) - goto err; - } - - if (response->next_renewal_time) { - ret = edg_wlpr_StoreToken(&buf, &buf_len, EDG_WLPR_PROTO_RENEWAL_TIME, - edg_wlpr_EncodeInt(response->next_renewal_time), - SEPARATORS); - if (ret) - goto err; - } - - if (response->filenames) { - char **p = response->filenames; - while (*p) { - ret = edg_wlpr_StoreToken(&buf, &buf_len, EDG_WLPR_PROTO_PROXY, *p, - SEPARATORS); - if (ret) - goto err; - p++; - } - } - - buf[strlen(buf)] = '\0'; - *msg = buf; - return 0; - -err: - free(buf); - *msg = NULL; - return ret; -} - - -static void -usage(glite_renewal_core_context ctx, char *progname) -{ - fprintf(stderr,"usage: %s [option]\n" - "\t-h, --help display this help and exit\n" - "\t-v, --version output version information and exit\n" - "\t-d, --debug don't fork, print out debugging information\n" - "\t-r, --repository repository directory\n" - "\t-c, --condor-limit how long before expiration the proxy must be renewed\n" - "\t-C, --CAdir trusted certificates directory\n" - "\t-V, --VOMSdir trusted VOMS servers certificates directory\n" - "\t-A, --enable-voms renew also VOMS certificates in proxies\n" - "\t-G, --voms-config location of the vomses configuration file\n", - progname); -} - -static int -do_listen(glite_renewal_core_context ctx, char *socket_name, int *sock) -{ - struct sockaddr_un my_addr; - int s; - int ret; - - assert(sock != NULL); - - memset(&my_addr, 0, sizeof(my_addr)); - my_addr.sun_family = AF_UNIX; - strncpy(my_addr.sun_path, socket_name, sizeof(my_addr.sun_path)); - unlink(socket_name); - umask(0177); - - s = socket(AF_UNIX, SOCK_STREAM, 0); - if (s == -1) { - glite_renewal_log(ctx, LOG_ERR, "socket(): %s", strerror(errno)); - return errno; - } - - ret = bind(s, (struct sockaddr *)&my_addr, sizeof(my_addr)); - if (ret == -1) { - glite_renewal_log(ctx, LOG_ERR, "bind(): %s", strerror(errno)); - close(s); - return errno; - } - - ret = listen(s, 50); - if (ret == -1) { - glite_renewal_log(ctx, LOG_ERR, "listen(): %s", strerror(errno)); - close(s); - return errno; - } - - *sock = s; - return 0; -} - -int -start_watchdog(glite_renewal_core_context ctx, pid_t *pid) -{ - pid_t p; - - switch ((p = fork())) { - case -1: - glite_renewal_log(ctx, LOG_ERR, "fork() failed: %s", - strerror(errno)); - return errno; - case 0: - watchdog_start(ctx); - exit(0); - break; - default: - *pid = p; - return 0; - } - /* not reachable */ - exit(0); -} - -int main(int argc, char *argv[]) -{ - int sock; - char *progname; - int opt; - int fd; - char sockname[PATH_MAX]; - int ret; - pid_t pid; - struct sigaction sa; - const char *s = NULL; - glite_renewal_core_context ctx = NULL; - - progname = strrchr(argv[0],'/'); - if (progname) progname++; - else progname = argv[0]; - - repository = EDG_WLPR_REPOSITORY_ROOT; - debug = 0; - - while ((opt = getopt_long(argc, argv, "hvdr:c:C:V:AG:t:k:", opts, NULL)) != EOF) - switch (opt) { - case 'h': usage(ctx, progname); exit(0); - case 'v': fprintf(stdout, "%s:\t%s\n", progname, rcsid); exit(0); - case 'd': debug = 1; break; - case 'r': repository = optarg; break; - case 'c': condor_limit = atoi(optarg); break; - case 'C': cadir = optarg; break; - case 'V': vomsdir = optarg; break; - case 'A': voms_enabled = 1; break; - case 'G': vomsconf = optarg; break; - case 't': cert = optarg; break; - case 'k': key = optarg; break; - case '?': usage(ctx, progname); return 1; - } - - if (optind < argc) { - usage(ctx, progname); - exit(1); - } - - ret = glite_renewal_core_init_ctx(&ctx); - if (ret) { - fprintf(stderr, "Cannot initialize context\n"); - exit(1); - } - if (debug) { - ctx->log_level = LOG_DEBUG; - ctx->log_dst = GLITE_RENEWAL_LOG_STDOUT; - } - ctx->voms_conf = vomsconf; - - if (chdir(repository)) { - glite_renewal_log(ctx, LOG_ERR, "Cannot access repository directory %s (%s)", - repository, strerror(errno)); - exit(1); - } - - globus_module_activate(GLOBUS_GSI_CERT_UTILS_MODULE); - globus_module_activate(GLOBUS_GSI_PROXY_MODULE); - - if (!debug) - for (fd = 3; fd < OPEN_MAX; fd++) close(fd); - - if (!debug) { - /* chdir ? */ - if (daemon(1,0) == -1) { - perror("deamon()"); - exit(1); - } - openlog(progname, LOG_PID, LOG_DAEMON); - } - - if (cert) - setenv("X509_USER_CERT", cert, 1); - - if (key) - setenv("X509_USER_KEY", key, 1); - - if (cadir) - setenv("X509_CERT_DIR", cadir, 1); - - s = getenv("GLITE_PR_TIMEOUT"); - default_timeout = s ? atof(s) : GLITE_PR_TIMEOUT_DEFAULT; - - memset(&sa,0,sizeof(sa)); - sa.sa_handler = catchsig; - sigaction(SIGINT,&sa,NULL); - sigaction(SIGQUIT,&sa,NULL); - sigaction(SIGTERM,&sa,NULL); - sigaction(SIGCHLD,&sa,NULL); - sigaction(SIGPIPE,&sa,NULL); - - ret = start_watchdog(ctx, &pid); - if (ret) - return 1; - - umask(0177); - snprintf(sockname, sizeof(sockname), "%s%d", - DGPR_REG_SOCKET_NAME_ROOT, getuid()); - /* XXX check that the socket is not already active */ - ret = do_listen(ctx, sockname, &sock); - if (ret) - return 1; - glite_renewal_log(ctx, LOG_DEBUG, "Listening at %s", sockname); - - ret = doit(ctx, sock); - - close(sock); - return ret; -} diff --git a/org.glite.security.proxyrenewal/src/renewd_locl.h b/org.glite.security.proxyrenewal/src/renewd_locl.h deleted file mode 100644 index 489e909..0000000 --- a/org.glite.security.proxyrenewal/src/renewd_locl.h +++ /dev/null @@ -1,82 +0,0 @@ -#ifndef RENEWALD_LOCL_H -#define RENEWALD_LOCL_H - -#ident "$Header$" - -#include -#include -#include - -#include "renewal.h" -#include "renewal_core.h" - -#ifdef HAVE_DMALLOC_H -#include -#endif - -/* XXX */ -#if 0 -#define EDG_WLPR_ERROR_PARSE_NOT_FOUND EDG_WLPR_ERROR_PROTO_PARSE_ERROR -#define EDG_WLPR_ERROR_NOTFOUND EDG_WLPR_PROXY_NOT_REGISTERED -#endif - -typedef struct { - unsigned int len; - char **val; -} prd_list; - -typedef struct { - int suffix; - prd_list jobids; - int unique; - int voms_exts; - char *myproxy_server; - time_t end_time; - time_t next_renewal; -} proxy_record; - -/* commands */ -void -register_proxy(glite_renewal_core_context ctx, edg_wlpr_Request *request, edg_wlpr_Response *response); - -void -unregister_proxy(glite_renewal_core_context ctx, edg_wlpr_Request *request, edg_wlpr_Response *response); - -void -get_proxy(glite_renewal_core_context ctx, edg_wlpr_Request *request, edg_wlpr_Response *response); - -void -update_db(glite_renewal_core_context ctx, edg_wlpr_Request *request, edg_wlpr_Response *response); - -int -get_times(glite_renewal_core_context ctx, char *proxy_file, proxy_record *record); - -void -watchdog_start(glite_renewal_core_context ctx); - -void -glite_renewal_log(glite_renewal_core_context ctx, int dbg_level, const char *format, ...); - -int -decode_record(glite_renewal_core_context ctx, char *line, proxy_record *record); - -int -encode_record(glite_renewal_core_context ctx, proxy_record *record, char **line); - -void -free_record(glite_renewal_core_context ctx, proxy_record *record); - -int -glite_renewal_load_proxy(glite_renewal_core_context ctx, const char *filename, X509 **cert, EVP_PKEY **privkey, - STACK_OF(X509) **chain, globus_gsi_cred_handle_t *proxy); - -int -glite_renewal_get_proxy_base_name(glite_renewal_core_context ctx, const char *file, char **subject); - -int -glite_renewal_renew_voms_creds(glite_renewal_core_context ctx, const char *cur_file, const char *renewed_file, const char *new_file); - -int -glite_renewal_check_voms_attrs(glite_renewal_core_context ctx, const char *proxy); - -#endif /* RENEWALD_LOCL_H */ diff --git a/org.glite.security.proxyrenewal/src/voms.c b/org.glite.security.proxyrenewal/src/voms.c deleted file mode 100644 index 687d93b..0000000 --- a/org.glite.security.proxyrenewal/src/voms.c +++ /dev/null @@ -1,356 +0,0 @@ -#include "renewal_locl.h" -#include "renewd_locl.h" - -#include -#include - -#include "glite/security/voms/voms_apic.h" - -#include "glite/security/voms/newformat.h" - -char * Decode(const char *, int, int *); -char **listadd(char **, char *, int); - -static int -generate_proxy(glite_renewal_core_context ctx, globus_gsi_cred_handle_t cur_proxy, - X509_EXTENSION *voms_extension, const char *new_file) -{ - globus_result_t result; - globus_gsi_proxy_handle_t proxy_handle = NULL; - globus_gsi_cred_handle_t proxy = NULL; - EVP_PKEY *cur_proxy_priv_key = NULL; - X509 *new_cert = NULL; - X509 *voms_cert = NULL; - globus_gsi_cert_utils_cert_type_t proxy_type; - - result = globus_gsi_proxy_handle_init(&proxy_handle, NULL); - if (result) { - glite_renewal_log(ctx, LOG_ERR, "globus_gsi_proxy_handle_init() failed\n"); - goto end; - } - - result = globus_gsi_cred_get_key(cur_proxy, &cur_proxy_priv_key); - if (result) { - glite_renewal_log(ctx, LOG_ERR, "globus_gsi_cred_get_key() failed\n"); - goto end; - } - - /* Create and sign a new proxy */ - result = globus_gsi_cred_get_cert_type(cur_proxy, &proxy_type); - if (result) { - glite_renewal_log(ctx, LOG_ERR, "globus_gsi_cred_get_cert_type() failed\n"); - goto end; - } - - result = globus_gsi_proxy_handle_set_type(proxy_handle, proxy_type); - if (result) { - glite_renewal_log(ctx, LOG_ERR, "globus_gsi_proxy_handle_set_type() failed\n"); - goto end; - } - - result = globus_gsi_proxy_create_signed(proxy_handle, cur_proxy, &proxy); - if (result) { - glite_renewal_log(ctx, LOG_ERR, "globus_gsi_proxy_handle_init() failed\n"); - goto end; - } - - /* Get the new proxy */ - result = globus_gsi_cred_get_cert(proxy, &new_cert); - if (result) { - glite_renewal_log(ctx, LOG_ERR, "globus_gsi_cred_get_cert() failed\n"); - goto end; - } - - /* The Globus API doesn't allow to store custom X.509 extensions */ - voms_cert = X509_dup(new_cert); - if (voms_cert->cert_info->extensions == NULL) - voms_cert->cert_info->extensions = sk_X509_EXTENSION_new_null(); - sk_X509_EXTENSION_push(voms_cert->cert_info->extensions, voms_extension); - - /* Openssl ensures that memory containing old signature structures is unallocated */ -#if 0 - X509_sign(voms_cert, cur_proxy_priv_key, proxy_handle->attrs->signing_algorithm); -#else - X509_sign(voms_cert, cur_proxy_priv_key, EVP_md5()); -#endif - - /* And put the cert back, older one is unallocated by the function */ - result = globus_gsi_cred_set_cert(proxy, voms_cert); - if (result) { - glite_renewal_log(ctx, LOG_ERR, "globus_gsi_cred_set_cert() failed\n"); - goto end; - } - - result = globus_gsi_cred_write_proxy(proxy, (char *)new_file); - -end: - - return 0; -} - -static int -my_VOMS_Export(glite_renewal_core_context ctx, void *buf, int buf_len, X509_EXTENSION **extension) -{ - AC *ac = NULL; - unsigned char *p, *pp; - AC **voms_attrs = NULL; - - p = pp = buf; - ac = d2i_AC(NULL, &p, buf_len+1); - if (ac == NULL) { - glite_renewal_log(ctx, LOG_ERR, "d2i_AC() failed\n"); - return 1; - } - - voms_attrs = (AC **)listadd((char **)voms_attrs, (char *)ac, sizeof(AC *)); - - *extension = X509V3_EXT_conf_nid(NULL, NULL, OBJ_txt2nid("acseq"), - (char*)voms_attrs); - return 0; -} - -static int -create_voms_command(glite_renewal_core_context ctx, struct vomsdata *vd, struct voms **voms_cert, char **command) -{ - int voms_error, ret; - struct data **attribs; - -#if 0 - VOMS_ResetOrder(vd, &voms_error); - for (i = 2; i < argc; i++) { - ret = VOMS_Ordering(argv[i], vd, &voms_error); - if (ret == 0) { - glite_renewal_log(ctx, LOG_ERR, "VOMS_Ordering() failed\n"); - return 1; - } - } -#endif - - if (voms_cert == NULL || *voms_cert == NULL || (*voms_cert)->std == NULL) { - glite_renewal_log(ctx, LOG_ERR, "Invalid VOMS certificate\n"); - return 1; - } - - attribs = (*voms_cert)->std; - - if (strcmp (attribs[0]->role, "NULL") == 0 ) - ret = asprintf(command, "G%s", attribs[0]->group); - else - ret = asprintf(command, "B%s:%s", attribs[0]->group, attribs[0]->role); - -end: - - return 0; -} - -static int -renew_voms_cert(glite_renewal_core_context ctx, struct vomsdata *vd, struct voms **voms_cert, - char **buf, size_t *buf_len) -{ - int voms_error = 0, i, ret, voms_version; - struct contactdata **voms_contacts = NULL; - char *command = NULL; - - voms_contacts = VOMS_FindByVO(vd, (*voms_cert)->voname, ctx->voms_conf, NULL, &voms_error); - - if (voms_contacts == NULL) { - glite_renewal_log(ctx, LOG_ERR, "VOMS_FindByVO() failed\n"); - return 1; - } - - ret = create_voms_command(ctx, vd, voms_cert, &command); - - /* XXX the lifetime should be taken from the older proxy */ - ret = VOMS_SetLifetime(60*60*12, vd, &voms_error); - - /* XXX iterate over all servers on the list on errors */ - ret = VOMS_ContactRaw(voms_contacts[0]->host, voms_contacts[0]->port, - voms_contacts[0]->contact, command, - (void**) buf, buf_len, &voms_version, - vd, &voms_error); - if (ret == 0) { - glite_renewal_log(ctx, LOG_ERR, "VOMS_Contact() failed\n"); - return 1; - } - - VOMS_DeleteContacts(voms_contacts); - - if (command) - free(command); - - return 0; -} - -static int -renew_voms_certs(glite_renewal_core_context ctx, const char *cur_file, const char *renewed_file, const char *new_file) -{ - globus_gsi_cred_handle_t cur_proxy = NULL; - globus_gsi_cred_handle_t new_proxy = NULL; - struct vomsdata *vd = NULL; - struct voms **voms_cert = NULL; - int voms_err, ret; - X509 *cert = NULL; - STACK_OF(X509) *chain = NULL; - char *buf = NULL; - size_t buf_len = 0; - X509_EXTENSION *extension = NULL; - char *old_env_proxy = getenv("X509_USER_PROXY"); - char *old_env_cert = getenv("X509_USER_CERT"); - char *old_env_key = getenv("X509_USER_KEY"); - - setenv("X509_USER_PROXY", cur_file, 1); - setenv("X509_USER_CERT", renewed_file, 1); - setenv("X509_USER_KEY", renewed_file, 1); - - ret = glite_renewal_load_proxy(ctx, cur_file, &cert, NULL, &chain, &cur_proxy); - if (ret) - goto end; - - vd = VOMS_Init(NULL, NULL); - if (vd == NULL) { - glite_renewal_log(ctx, LOG_ERR, "VOMS_Init() failed\n"); - return 1; - } - - ret = VOMS_Retrieve(cert, chain, RECURSE_CHAIN, vd, &voms_err); - if (ret == 0) { - if (voms_err == VERR_NOEXT) { - /* no VOMS cred, no problem; continue */ - /* XXX this part shouldn't be reachable, this call is only called - * if the proxy does contain VOMS attributes */ - glite_renewal_log(ctx, LOG_ERR, "No VOMS attributes found in proxy %s\n", cur_file); - ret = 0; - goto end; - } else { - glite_renewal_log(ctx, LOG_ERR, "Cannot get VOMS certificate(s) from proxy"); - ret = 1; - goto end; - } - } - - /* XXX make sure this loop can really work for multiple voms certificates - * embedded in the proxy */ - for (voms_cert = vd->data; voms_cert && *voms_cert; voms_cert++) { - char *tmp, *ptr; - size_t tmp_len; - - ret = renew_voms_cert(ctx, vd, voms_cert, &tmp, &tmp_len); - if (ret) - goto end; - ptr = realloc(buf, buf_len + tmp_len); - if (ptr == NULL) { - ret = ENOMEM; - goto end; - } - buf = ptr; - memcpy(buf + buf_len, tmp, tmp_len); - buf_len += tmp_len; - } - - if (buf == NULL) { - /* no extension renewed, return */ - ret = 0; - goto end; - } - - ret = my_VOMS_Export(ctx, buf, buf_len, &extension); - if (ret) - goto end; - - ret = glite_renewal_load_proxy(ctx, renewed_file, NULL, NULL, NULL, &new_proxy); - if (ret) - goto end; - - ret = generate_proxy(ctx, new_proxy, extension, new_file); - -end: - (old_env_proxy) ? setenv("X509_USER_PROXY", old_env_proxy, 1) : - unsetenv("X509_USER_PROXY"); - (old_env_cert) ? setenv("X509_USER_CERT", old_env_cert, 1) : - unsetenv("X509_USER_CERT"); - (old_env_key) ? setenv("X509_USER_KEY", old_env_key, 1) : - unsetenv("X509_USER_KEY"); - - if (cert) - X509_free(cert); - if (chain) - sk_X509_pop_free(chain, X509_free); - if (vd) - VOMS_Destroy(vd); - if (cur_proxy) - globus_gsi_cred_handle_destroy(cur_proxy); - if (new_proxy) - globus_gsi_cred_handle_destroy(new_proxy); - if (buf) - free(buf); - - return ret; -} - -int -glite_renewal_renew_voms_creds(glite_renewal_core_context ctx, const char *cur_file, const char *renewed_file, const char *new_file) -{ - return renew_voms_certs(ctx, cur_file, renewed_file, new_file); -} - -int -glite_renewal_check_voms_attrs(glite_renewal_core_context ctx, const char *proxy) -{ - int ret, voms_err, present; - X509 *cert = NULL; - STACK_OF(X509) *chain = NULL; - struct vomsdata *vd = NULL; - - ret = glite_renewal_load_proxy(ctx, proxy, &cert, NULL, &chain, NULL); - if (ret) - return 0; - - vd = VOMS_Init(NULL, NULL); - if (vd == NULL) { - present = 0; - goto end; - } - - ret = VOMS_Retrieve(cert, chain, RECURSE_CHAIN, vd, &voms_err); - if (ret == 0) { - present = 0; - goto end; - } - - present = 1; - -end: - if (cert) - X509_free(cert); - if (chain) - sk_X509_pop_free(chain, X509_free); - if (vd) - VOMS_Destroy(vd); - - return present; -} - -#if 0 -int -main(int argc, char *argv[]) -{ - int ret; - const char *current_proxy = "/tmp/x509up_u11930"; - const char *renewed_proxy = "/tmp/proxy"; - - if (argc > 1) - current_proxy = argv[1]; - if (argc > 2) - renewed_proxy = argv[2]; - - if (globus_module_activate(GLOBUS_GSI_PROXY_MODULE) != GLOBUS_SUCCESS || - globus_module_activate(GLOBUS_GSI_CERT_UTILS_MODULE) != GLOBUS_SUCCESS) { - glite_renewal_log(ctx, LOG_ERR, "[%d]: Unable to initialize Globus modules\n", getpid()); - return 1; - } - - ret = renew_voms_certs(current_proxy, renewed_proxy); - - return 0; -} -#endif diff --git a/org.glite.testsuites.ctb/LB/Makefile b/org.glite.testsuites.ctb/LB/Makefile deleted file mode 100644 index 34295c1..0000000 --- a/org.glite.testsuites.ctb/LB/Makefile +++ /dev/null @@ -1,14 +0,0 @@ -CC=gcc -CFLAGS= -EXEC=testSocket - -all: $(EXEC) - -testSocket: testSocket.c - $(CC) -o $@ $< $(CFLAGS) - -clean: - rm -rf *.o - -mrproper: clean - rm -rf $(EXEC) diff --git a/org.glite.testsuites.ctb/LB/Readme.txt b/org.glite.testsuites.ctb/LB/Readme.txt deleted file mode 100644 index 1a7033f..0000000 --- a/org.glite.testsuites.ctb/LB/Readme.txt +++ /dev/null @@ -1,53 +0,0 @@ - - -Readme file for lb1 v1.0************************************* -Date: 19.03.2007 * -Author: * -************************************************************* - -lb-l1.sh -******** - -Script for testing of LB services - -* Prerequisities: All services running (user does not have to get any credentials) - -* Basic test: PING - check LB binaries - check running services -* Options: - -h | --help Show this help message. - -m | --m lb_host - -g | --log 'logfile' Redirect all output to the 'logfile'. - -* The name of the bkserver has to be specified everytime - - -Examples -******** - -[ui] /home/fmunster> ./lb-l1.sh -g log -USAGE: TCPecho - -[ui] /home/fmunster> ./lb-l1.sh -g log -m gliterb.iihe.ac.be - -[ui] /home/fmunster> cat log - -Basic services test...... -Checking binary glite-lb-job_reg ? OK -Checking binary glite-lb-job_log ? OK -Checking binary glite-lb-logevent ? OK -Checking binary glite-lb-user_jobs ? OK -Checking binary glite-lb-job_status ? OK -Checking binary glite-lb-change_acl ? OK -Checking binary glite-lb-lbmon OK -Listening to locallogger port (9002) -Connecting a socket with : 193.190.246.245,9002 [OK] -glite-lb-logd running ? - [OK] -Listening to interlogger ports (9000-9001-9003) -Connecting a socket with : 193.190.246.245,9000 [OK] -Connecting a socket with : 193.190.246.245,9001 [OK] -Connecting a socket with : 193.190.246.245,9003 [OK] -Interlogd running ? - [OK] - - diff --git a/org.glite.testsuites.ctb/LB/Readme2.txt b/org.glite.testsuites.ctb/LB/Readme2.txt deleted file mode 100644 index b32404f..0000000 --- a/org.glite.testsuites.ctb/LB/Readme2.txt +++ /dev/null @@ -1,158 +0,0 @@ -Readme file for lb2 v1.0************************************* -Date: 19.03.2007 * -Author: * -************************************************************* - -lb-l2.sh -******** - -Normal event delivery and Normal Job States - -* Prerequisities: All services running (LBProxy not used), user must have a valid proxy on the UI - -* Test: -Registers jobs with glite-lb-job-reg preferably pointing to remote LB Server -Check of the job status -Logs sequences of events with glite-lb-..... sh scripts (ex: gite-lb-ready.sh) -Checks with glite-lb-job_log that the events got delivered aftewards -Checks with glite-lb-job_status that the status of the jobs are correct - -* Options: -echo " -h | --help Show this help message." -echo " -r | --retries Number of test retries (2 by default)" -echo " -n | --nbjobs Number of jobs (10 by default)" -echo " -m | --bkserver Host address of the BKServer ex:pc900.iihe.ac.be " -echo " -s | --states List of states in which could tested jobs fall." -echo " -l | --large-stress 'size' Do a large stress logging ('size' random data added to the messages." - - -* The name of the bkserver has to be specified everytime - -* The option -l 'size' addes random data to the messages send to the BKServer with glite-lb-logevent. - -* With the option -s you can specify the list of states that will be submitted randomly to the jobs created - -* When you specify a state, the script will send all the events the job has to pass trough. - - - -lb-l2Stat.sh -************ - -* This script is mainly the same than lb-l2.sh but it includes a mesure of time. - -* You can specify one more option - - echo " -t | --tags Number of user tags to load to each job." - - - - - -examples -******** - -./lb-l2.sh -n 4 -m gliterb.iihe.ac.be -s "Running Done" - -Registering 4 jobs.................... -https://pc900.iihe.ac.be:9000/3E8xyyH_FCb4z1rN5TymFw -https://pc900.iihe.ac.be:9000/aTLnW6Mmm_whpt_tbxHjPQ -https://pc900.iihe.ac.be:9000/TnuSJvVZCLcYDDv1GXdocw -https://pc900.iihe.ac.be:9000/WW-0FU8g4tID1TMMPZCEBg -Logging events to the 4 jobs.................................... - -Logging tags to the 4 jobs.................................... - -Checking the Events............................................. -Job 0 ....................[OK] -Job 1 ....................[OK] -Job 2 ....................[OK] -Job 3 ....................[OK] - -A detailed list of the sequence of events logged to each job has been printed to 1174296170.log - -Checking the Jobs Status........................................ - -Job: 0 ..Logged state:running-Recorded state : Running.......[OK] -Job: 1 ..Logged state:done-Recorded state : Done.......[OK] -Job: 2 ..Logged state:done-Recorded state : Done.......[OK] -Job: 3 ..Logged state:done-Recorded state : Done.......[OK] - -Final test result .........................................[OK] - - -1174296170.log (this file contains a detailed list of the sequence of events logged to each job during the test) - -... -Events Sent..... - 1 UserTag - 2 RegJob - 3 Accepted - 4 EnQueued - 5 DeQueued - 6 HelperCall - 7 Match - 8 HelperReturn - 9 EnQueued - 10 DeQueued - 11 Transfer - 12 Accepted - 13 Transfer - 14 Running - 15 Done -Events recorded in the LB server..... - 1 UserTag - 2 RegJob - 3 Accepted - 4 EnQueued - 5 DeQueued - 6 HelperCall - 7 Match - 8 HelperReturn - 9 EnQueued - 10 DeQueued - 11 Transfer - 12 Accepted - 13 Transfer - 14 Running - 15 Done -... - - - -./lb-l2Stat.sh -n 3 -m gliterb.iihe.ac.be -... -Sending events took for individual jobs the following time -https://pc900.iihe.ac.be:9000/QZUecSg86IXtZeMmU4Rd6Q 11.061101000 seconds -https://pc900.iihe.ac.be:9000/-R0CDDoicKdwqAZHEI32gA 9.438249000 seconds -https://pc900.iihe.ac.be:9000/x6qFebsaNOR1a31NlAhJIQ 3.167140000 seconds -Total time for 3 jobs: 23.666490000 -Average time for event: 7.888830000 -Average time for event and tags: .157776600 -Event throughput (events/sec): 6.338075481 -... - - -List of possible job Status -*************************** - -"Submitted Waiting Ready Cancelled Scheduled Aborted Running Done Cleared" - -* Submitted: The job has been submitted by the user but not yet processed by the Network Server - -* Waiting: The job has been accepted by the Network Server but not yet processed by the workload manager - -* Ready: The job has been assigned to a Computing Element but not yet transferred to it - -* Scheduled: The job is wainting in the CE's queue - -* Running: The job is running - -* Done: The job has finished - -* Aborted: The job has been aborted by the WMS (it was too long or the proxy certificate expired) - -* Cancelled: The job has been cancelled by the user - -* Cleared: The output sandbox has been transferred to the UserInterface - diff --git a/org.glite.testsuites.ctb/LB/lb-l1.sh b/org.glite.testsuites.ctb/LB/lb-l1.sh deleted file mode 100755 index e60f40b..0000000 --- a/org.glite.testsuites.ctb/LB/lb-l1.sh +++ /dev/null @@ -1,145 +0,0 @@ -#!/bin/bash -########################################################################################## -# Script for testing of LB services -# Basic test: PING -# check LB binaries -# check running services with sockets -##################################################################################### -# # -# Returned values: # -# # -# Exit TEST_OK: Test Passed # -# Exit TEST_ERROR: Test Failed # -# Exit 2: Wrong Input # -# # -# Authors: Shkelzen Rugovac, Frederic Munster, Othmane Bouhali # -################################################################ - -## -# defining variables -########################" -PATH=/opt/glite/examples:$PATH -#echo $PATH -LBLOGEV=${LBLOGEV:-glite-lb-logevent} -LBJOBLOG=${LBJOBLOG:-glite-lb-job_log} -LBJOBREG=${LBJOBREG:-glite-lb-job_reg} -LBUSERJOBS=${LBUSERJOBS:-glite-lb-user_jobs} -LBJOBSTAT=${LBJOBSTAT:-glite-lb-job_status} -LBPURGE=${LBPURGE:-glite-lb-purge} -LBCHANGEACL=${LBCHANGEACL:-glite-lb-change_acl} -LBMON=${LBMON:-glite-lb-lbmon} -LB_INTERLOGD=glite-lb-interlogd -LB_LOGD=glite-lb-logd -DEBUG=2 -## -# show help and usage -######################" -showHelp() -{ - echo "Usage: $0 [OPTIONS] " - echo "Options:" - echo " -h | --help Show this help message." - echo " -m | --m lb_host hostName or IPV4 adress " - echo " -g | --log 'logfile' Redirect all output to the 'logfile'." - echo "" -# echo "For proper operation check your grid-proxy-info" -# grid-proxy-info -} -if [ -z "$1" ]; then - showHelp - exit 2 -fi -logfile=output.log -flag=0 -while test -n "$1" -do - case "$1" in - "-h" | "--help") showHelp && exit 2 ;; - "-m" | "--bkserver") shift ; LB_HOST=$1 ;; - "-g" | "--log") shift ; logfile=$1 flag=1 ;; - - *) echo "Unrecognized option $1 try -h for help"; exit 2 ;; - - esac - shift -done - - -## -# Ping the LB_HOST -###################### - -function ping_host -{ - echo " Testing ping to $LB_HOST" >> $logfile - result=`ping -c 5 $LB_HOST 2>/dev/null | grep "0% packet loss"| wc -l` - if [ $result -gt 0 ]; then - echo "Pinging $LB_HOST OK " >> $logfile - else - echo "" >> $logfile - echo "Ping failed: The $LB_HOST is not accessible! " >> $logfile - echo "" >> $logfile - echo " LB Basic Test: Failed. " >> $logfile - exit $TEST_ERROR - fi -# echo " - OK " -} - -check_exec() -{ - [ $DEBUG -gt 0 ] && [ -n "$2" ] && echo -n -e "$2\t" >> $logfile || echo -n -e "$1\t" >> $logfile - eval $1 - RV=$? - [ $DEBUG -gt 0 ] && [ $RV -eq 0 ] && echo "OK" >> $logfile || echo "FAILED" >> $logfile - return $RV -} - -# -# check the binaries -######################### -check_binaries() -{ - check_exec 'LBJOBREG=`which $LBJOBREG`' "Checking binary $LBJOBREG ? " || exit 1 - check_exec 'LBJOBLOG=`which $LBJOBLOG`' "Checking binary $LBJOBLOG ? " || exit 1 - check_exec 'LBLOGEV=`which $LBLOGEV`' "Checking binary $LBLOGEV ?" || exit 1 - check_exec 'LBUSERJOBS=`which $LBUSERJOBS`' "Checking binary $LBUSERJOBS ?" || exit 1 - check_exec 'LBJOBSTAT=`which $LBJOBSTAT`' "Checking binary $LBJOBSTAT ? " || exit 1 - check_exec 'LBCHANGEACL=`which $LBCHANGEACL`' "Checking binary $LBCHANGEACL ?" || exit 1 - check_exec 'LBMON=`which $LBMON`' "Checking binary $LBMON " || exit 1 -} -# -# check the services -##################" -check_services() -{ -echo "Listening to locallogger port (9002)" >> $logfile -./testSocket $LB_HOST 9002 >> $logfile -if [ $? -eq 0 ]; then - echo "logd running ? - [OK]" >> $logfile - else - echo "logd running ? - [FAILED]" >> $logfile - exit $TEST_ERROR - fi -echo "Listening to interlogger ports (9000-9001-9003)" >> $logfile -./testSocket $LB_HOST 9000 >> $logfile && -./testSocket $LB_HOST 9001 >> $logfile && -./testSocket $LB_HOST 9003 >> $logfile -if [ $? -eq 0 ]; then - echo "Inetrlogd running ? - [OK]" >> $logfile - else - echo "interlogd running ? - [FAILED]" >> $logfile - exit $TEST_ERROR - fi -} - -##################### -# Starting the test -##################### -ping_host -check_binaries -check_services -if [ $flag -ne 1 ];then - cat $logfile - rm $logfile -fi - diff --git a/org.glite.testsuites.ctb/LB/lb-l2.sh b/org.glite.testsuites.ctb/LB/lb-l2.sh deleted file mode 100755 index 1972a4e..0000000 --- a/org.glite.testsuites.ctb/LB/lb-l2.sh +++ /dev/null @@ -1,264 +0,0 @@ -#!/bin/bash -#3.1.4 et 3.2.1: Normal event delivery and Normal Job States - -#Prerequisities: All services running - -#Actions: -#Registers jobs with glite-lb-job-reg prferably pointing to remote LB Server -#Check of the job status -#Logs sequences of events with glite-lb-logevent -#Checks with glite-lb-job_log that the events got delivered aftewards -#Checks with glite-lb-job_status that the status of the jobs are correct - - -PATH=/opt/glite/examples:$PATH -#echo $PATH -LBJOBREG=${LBJOBREG:-glite-lb-job_reg} -LBLOGEVENT=${LBLOGEVENT:-glite-lb-logevent} -LBJOBSTATUS=${LBJOBSTATUS:-glite-lb-job_status} -LBJOBLOG=${LBJOBLOG:-glite-lb-job_log} -LBJOBSTAT=${LBJOBSTAT:-glite-lb-job_status} -LBPURGE=${PURGE:-glite-lb-purge} - -BKSERVER="localhost" -STATES="aborted cancelled done ready running scheduled waiting submitted " -SOURCES="NetworkServer WorkloadManager BigHelper JobController LogMonitor LRMS Application UserInterface" - -dtest=1 -i=0 -JOBS_ARRAY_SIZE=10 -INTERVAL=2 -DATE_S=`date +"%s"` -DATE=`date` -LOG_FILE="$DATE_S.log" - - -init() -{ -echo "Date: $DATE" > $LOG_FILE -export EDG_WL_QUERY_SERVER="$BKSERVER:9000" -export EDG_WL_LOG_DESTINATION="$BKSERVER:9002" -BKSERVER_HOST="$BKSERVER:9000" -BKSERVER_OPT="-m $BKSERVER" -} - - -getJobId() -{ -cat jobreg |grep "EDG_JOBID" |cut -c12- > jobList2 -res=`cat jobList2 |wc -c` -res=$[$res-2] -cat jobList2 |cut -c1-`echo $res` > jobreg -rm jobList2 -} - -#registrating a job -job_reg() -{ -eval $LBJOBREG $BKSERVER_OPT -s $1 > jobreg -getJobId -job=`cat jobreg` -rm jobreg -} - -#registering a list of jobs which jobid's are placed in an array -array_job_reg() -{ -echo "Registering $JOBS_ARRAY_SIZE jobs...................." -job_id=0 -st_count=`echo $SOURCES | wc -w` -while [ $job_id -lt $JOBS_ARRAY_SIZE ] ; do - tmp=`echo $RANDOM % $st_count + 1 | bc` - jsource=`echo $SOURCES | cut -d " " -f $tmp | tr A-Z a-z` - job_reg $jsource - echo $job - SAMPLE_JOBS_ARRAY[$job_id]=$job - job_id=$[$job_id+1] - done -} - -#Event delivery test -testLB() -{ -echo "Checking the Events............................................." -echo -job_id=0 -while [ $job_id -lt $JOBS_ARRAY_SIZE ] ; do - #sleep 2 - #out is the list of events sent, we count the number of events and then we extract the job status - nbEvents=`cat out[$job_id] |grep glite-lb-logevent | wc -l` - nbEvents=$[$nbEvents+1] - cat out[$job_id] |gawk -F"-e " '{ print $2 }' > eventsTemp - echo "UserTag"> events - echo "RegJob">> events - cat eventsTemp|gawk -F" --" '{ print $1 }'>> events - rm eventsTemp - events3="blank" - i=0 - cmp -s events events3 - while [ $? -ne 0 ] && [ $i -lt $INTERVAL ] ; do - - - #we use glite-lb-job_log and apply the same treatment as above to the output - eval $LBJOBLOG -r $INTERVAL -d 2 ${SAMPLE_JOBS_ARRAY[$job_id]} > joblog2 - nbevents=`cat joblog2 | grep DATE | wc -l` - cat joblog2|gawk -F"DG.EVNT=\"" '{ print $2 }' > eventsTemp2 - cat eventsTemp2|gawk -F"\"" '{ print $1 }'> events2 - cat events2|sed /^$/d > events3 - rm eventsTemp2 events2 joblog2 - #Comparison of the outputs and intermediary printout - echo "Events Sent....." >> $LOG_FILE - cat -n events >> $LOG_FILE -# cat -n events - echo "Events recorded in the LB server....." >> $LOG_FILE - cat -n events3 >> $LOG_FILE -# cat -n events3 - i=$[$i+1] - cmp -s events events3 - done - cmp -s events events3 - if [ $? -eq 0 ]; then - echo "Job $job_id ....................[OK]" - i=0 - - else - echo "Job $job_id.....................[FAILED]" - dtest=0 - fi - rm events events3 out[$job_id] - job_id=$[$job_id+1] -done -echo -echo "A detailed list of events logged has been printed to $LOG_FILE" -echo -} - -#job status test -testLB2() -{ -echo "Checking the Jobs Status........................................" -echo -job_id=0 - while [ $job_id -lt $JOBS_ARRAY_SIZE ] ; do - #sleep 1 - eval $LBJOBSTATUS ${SAMPLE_JOBS_ARRAY[$job_id]} > status - testStatus=`cat status |grep -i state.*${SAMPLE_JOBS_STATES[$job_id]}|wc -l` - i=0 - while [ $testStatus -ne 1 ] && [ $i -lt $INTERVAL ] ; do - bkserver_state=`cat status |grep -i state.*${SAMPLE_JOBS_STATES[$job_id]}` - testStatus=`cat status |grep -i state.*${SAMPLE_JOBS_STATES[$job_id]}|wc -l` - i=$[$i+1] - done - if [$testStatus -eq 1 ] ; then - echo "Job: $job_id ..Logged state:${SAMPLE_JOBS_STATES[$job_id]}-Recorded `cat status |grep -i state.*${SAMPLE_JOBS_STATES[$job_id]}`.......[OK]" - else - echo "Job: $job_id ..Logged state:${SAMPLE_JOBS_STATES[$job_id]}-Recorded `cat status |grep -i state.*${SAMPLE_JOBS_STATES[$job_id]}`.......[FAILED]" - cat status > errorStatus.tmp - echo "Detailed status has been copied to errorStatus.tmp" - echo - dtest=0 - fi - rm status -job_id=$[$job_id+1] -done -} - -#logging events to the jobs. Events are selected randomly from a list. -logEvents() -{ -echo "Logging events to the $JOBS_ARRAY_SIZE jobs...................................." -echo -job_id2=0 -st_count=`echo $STATES | wc -w` - while [ $job_id2 -lt $JOBS_ARRAY_SIZE ] ; do - tmp=`echo $RANDOM % $st_count + 1 | bc` - state=`echo $STATES | cut -d " " -f $tmp | tr A-Z a-z` - SAMPLE_JOBS_STATES[$job_id2]=$state - echo >> $LOG_FILE - echo "Submitting events to the job: ${SAMPLE_JOBS_ARRAY[$job_id2]} " >> $LOG_FILE - echo >> $LOG_FILE - - echo "event submitted.......................................[$state]" >> $LOG_FILE - eval glite-lb-$state.sh $LARGE_STRESS -j ${SAMPLE_JOBS_ARRAY[$job_id2]} 2>out[$job_id2] - job_id2=$(($job_id2 + 1)) -done -} - -#logging tags to the jobs -logTags() -{ -echo "Logging tags to the $JOBS_ARRAY_SIZE jobs...................................." -echo - -job_id=0 -while [ $job_id -lt $JOBS_ARRAY_SIZE ] ; do - eval $LBLOGEVENT -s Application -e UserTag -j ${SAMPLE_JOBS_ARRAY[$job_id]} -name testTag -value 12345 >> $LOG_FILE -job_id=$[$job_id+1] -done -} - -showHelp() -{ -echo "Usage: $0 [OPTIONS] " -echo "Options:" -echo " -h | --help Show this help message." -echo " -r | --retries Number of test retries (2 by default)" -echo " -n | --nbjobs Number of jobs (10 by default)" -echo " -m | --bkserver Host address of the BKServer ex:pc900.iihe.ac.be " -echo " -s | --states List of states in which could tested jobs fall." -echo " -l | --large-stress 'size' Do a large stress logging ('size' random data added to the messages." -echo "" - -# echo "For proper operation check your grid-proxy-info" -# grid-proxy-info -} - - -#input -if [ -z "$1" ]; then - showHelp - exit 2 -fi -BK=0 -while test -n "$1" -do - case "$1" in - "-h" | "--help") showHelp && exit 2 ;; - "-r" | "--retries") shift ; INTERVAL=$1 ;; - "-n" | "--nbjobs") shift ; JOBS_ARRAY_SIZE=$1 ;; - "-m" | "--bkserver") shift ; BKSERVER=$1 BK=1;; - "-s" | "--states") shift; STATES="$1" ;; - "-l" | "--large-stress") shift ; LARGE_STRESS="-l $1" ;; -# "-g" | "--log") shift ; logfile=$1 ;; - - *) echo "Unrecognized option $1 try -h for help"; exit 2 ;; - - esac - shift -done -if [ $BK -ne 1 ]; then - echo - echo "You must specify the hostname of the LB Server with the option -m (ex: -m pf435.ulb.ac.be)" - echo - exit 2 -fi -echo - - -#main.................................................................. -init -array_job_reg -logEvents -logTags -testLB -testLB2 -#testProxy -#eval $LBPURGE -h -echo -if [ $dtest -eq 1 ];then - echo "Final test result .........................................[OK]" - exit 1 -else echo "Final test result .........................................[FAILED]" - exit 0 - fi -echo diff --git a/org.glite.testsuites.ctb/LB/lb-l2ILR.sh b/org.glite.testsuites.ctb/LB/lb-l2ILR.sh deleted file mode 100755 index c3fc137..0000000 --- a/org.glite.testsuites.ctb/LB/lb-l2ILR.sh +++ /dev/null @@ -1,262 +0,0 @@ -#3.1.3: Interlogger Recovery -############################################################################################## -#Prerequisities: locallogger(glite-lb-logd) and BKServer (glite-lb-bkserv) must be running. -#The interlogger(glite-lb-interl) must be stopped. (kill the process manually on the LB machine) - -#Actions: -#Registers jobs with glite-lb-job-reg -#Logs sequences of events with glite-lb-logevent -#User starts the interlogger daemon -#(/opt/glite/etc/config/scripts/glite-lb-cofig.py --start on your LB machine (as root)) -#Checks with glite-lb-job_log that the events got delivered aftewards -#by the interloger to the bookkeeping server. (from the localloger which is linked to the WMS) -#Checks with glite-lb-job_status that the status of the jobs are correct in the BKserver -############################################################################################### - -PATH=/opt/glite/examples:$PATH -#echo $PATH -LBJOBREG=${LBJOBREG:-glite-lb-job_reg} -LBLOGEVENT=${LBLOGEVENT:-glite-lb-logevent} -LBJOBSTATUS=${LBJOBSTATUS:-glite-lb-job_status} -LBJOBLOG=${LBJOBLOG:-glite-lb-job_log} -LBJOBSTAT=${LBJOBSTAT:-glite-lb-job_status} -LBPURGE=${PURGE:-glite-lb-purge} - -STATES="aborted cancelled done ready running scheduled waiting submitted " -SOURCES="NetworkServer WorkloadManager BigHelper JobController LogMonitor LRMS Application UserInterface" -dtest=1 -i=0 -JOBS_ARRAY_SIZE=10 -INTERVAL=2 -DATE_S=`date +"%s"` -DATE=`date` -LOG_FILE="$DATE_S.log" - -#initialisation -init() -{ -echo "Date: $DATE" > $LOG_FILE -export EDG_WL_QUERY_SERVER="$BKSERVER:9000" -export EDG_WL_LOG_DESTINATION="$BKSERVER:9002" -BKSERVER_HOST="$BKSERVER:9000" -BKSERVER_OPT="-m $BKSERVER" -} - -#extracting the job id -getJobId() -{ -cat jobreg |grep "EDG_JOBID" |cut -c12- > jobList2 -res=`cat jobList2 |wc -c` -res=$[$res-2] -cat jobList2 |cut -c1-`echo $res` > jobreg -rm jobList2 -} - -#registrating a job -job_reg() -{ -eval $LBJOBREG $BKSERVER_OPT -s $1 > jobreg -getJobId -job=`cat jobreg` -rm jobreg -} - -#registering a list of jobs which jobid's are placed in an array -array_job_reg() -{ -echo "Registering $JOBS_ARRAY_SIZE jobs...................." -job_id=0 -st_count=`echo $SOURCES | wc -w` -while [ $job_id -lt $JOBS_ARRAY_SIZE ] ; do - tmp=`echo $RANDOM % $st_count + 1 | bc` - jsource=`echo $SOURCES | cut -d " " -f $tmp | tr A-Z a-z` - job_reg $jsource - echo $job - SAMPLE_JOBS_ARRAY[$job_id]=$job - job_id=$[$job_id+1] - done -} - -#Event delivery test -testLB() -{ -echo "Checking the Events............................................." -echo -job_id=0 -while [ $job_id -lt $JOBS_ARRAY_SIZE ] ; do - #sleep 2 - #out is the list of events sent, we count the number of events and then we extract the job status - nbEvents=`cat out[$job_id] |grep glite-lb-logevent | wc -l` - nbEvents=$[$nbEvents+1] - cat out[$job_id] |gawk -F"-e " '{ print $2 }' > eventsTemp - echo "RegJob">> events - cat eventsTemp|gawk -F" --" '{ print $1 }'>> events - rm eventsTemp - events3="blank" - i=0 - cmp -s events events3 - while [ $? -ne 0 ] && [ $i -lt $INTERVAL ] ; do - - - #we use glite-lb-job_log and apply the same treatment as above to the output - eval $LBJOBLOG -r $INTERVAL -d 2 ${SAMPLE_JOBS_ARRAY[$job_id]} > joblog2 - nbevents=`cat joblog2 | grep DATE | wc -l` - cat joblog2|gawk -F"DG.EVNT=\"" '{ print $2 }' > eventsTemp2 - cat eventsTemp2|gawk -F"\"" '{ print $1 }'> events2 - cat events2|sed /^$/d > events3 - rm eventsTemp2 events2 joblog2 - #Comparison of the outputs and intermediary printout - echo "Events Sent....." >> $LOG_FILE - cat -n events >> $LOG_FILE -# cat -n events - echo "Events recorded in the LB server....." >> $LOG_FILE - cat -n events3 >> $LOG_FILE -# cat -n events3 - i=$[$i+1] - cmp -s events events3 - done - cmp -s events events3 - if [ $? -eq 0 ]; then - echo "Job $job_id ....................[OK]" - i=0 - - else - echo "Job $job_id.....................[FAILED]" - dtest=0 - fi - rm events events3 out[$job_id] - job_id=$[$job_id+1] -done -echo -echo "A detailed list of events logged has been printed to $LOG_FILE" -echo -} - -#job status test -testLB2() -{ -echo "Checking the Jobs Status........................................" -echo -job_id=0 - while [ $job_id -lt $JOBS_ARRAY_SIZE ] ; do - #sleep 1 - eval $LBJOBSTATUS ${SAMPLE_JOBS_ARRAY[$job_id]} > status - testStatus=`cat status |grep -i state.*${SAMPLE_JOBS_STATES[$job_id]}|wc -l` - i=0 - while [ $testStatus -ne 1 ] && [ $i -lt $INTERVAL ] ; do - bkserver_state=`cat status |grep -i state.*${SAMPLE_JOBS_STATES[$job_id]}` - testStatus=`cat status |grep -i state.*${SAMPLE_JOBS_STATES[$job_id]}|wc -l` - i=$[$i+1] - done - if [$testStatus -eq 1 ] ; then - echo "Job: $job_id ..Logged state:${SAMPLE_JOBS_STATES[$job_id]}-Recorded `cat status |grep -i state.*${SAMPLE_JOBS_STATES[$job_id]}`.......[OK]" - else - echo "Job: $job_id ..Logged state:${SAMPLE_JOBS_STATES[$job_id]}-Recorded `cat status |grep -i state.*${SAMPLE_JOBS_STATES[$job_id]}`.......[FAILED]" - cat status > errorStatus.tmp - echo "Detailed status has been copied to errorStatus.tmp" - echo - dtest=0 - fi - rm status -job_id=$[$job_id+1] -done -} - -#logging events to the jobs. Events are selected randomly from a list. -logEvents() -{ -echo "Logging events to the $JOBS_ARRAY_SIZE jobs...................................." -echo -job_id2=0 -st_count=`echo $STATES | wc -w` - while [ $job_id2 -lt $JOBS_ARRAY_SIZE ] ; do - tmp=`echo $RANDOM % $st_count + 1 | bc` - state=`echo $STATES | cut -d " " -f $tmp | tr A-Z a-z` - SAMPLE_JOBS_STATES[$job_id2]=$state - echo >> $LOG_FILE - echo "Submitting events to the job: ${SAMPLE_JOBS_ARRAY[$job_id2]} " >> $LOG_FILE - echo >> $LOG_FILE - - echo "event submitted.......................................[$state]" >> $LOG_FILE - eval glite-lb-$state.sh $LARGE_STRESS -j ${SAMPLE_JOBS_ARRAY[$job_id2]} 2>out[$job_id2] - job_id2=$(($job_id2 + 1)) -done -} - - -showHelp() -{ -echo "Usage: $0 [OPTIONS] " -echo "Options:" -echo " -h | --help Show this help message." -echo " -r | --retries Number of test retries (2 by default)" -echo " -n | --nbjobs Number of jobs (10 by default)" -echo " -m | --bkserver Host address of the BKServer ex:pc900.iihe.ac.be " -echo " -s | --states List of states in which could tested jobs fall." -echo " -l | --large-stress 'size' Do a large stress logging ('size' random data added to the messages." -echo "" - -# echo "For proper operation check your grid-proxy-info" -# grid-proxy-info -} - - -#input -if [ -z "$1" ]; then - showHelp - exit 2 -fi -BK=0 -while test -n "$1" -do - case "$1" in - "-h" | "--help") showHelp && exit 2 ;; - "-r" | "--retries") shift ; INTERVAL=$1 ;; - "-n" | "--nbjobs") shift ; JOBS_ARRAY_SIZE=$1 ;; - "-m" | "--bkserver") shift ; BKSERVER=$1 BK=1;; - "-s" | "--states") shift; STATES="$1" ;; - "-l" | "--large-stress") shift ; LARGE_STRESS="-l $1" ;; -# "-g" | "--log") shift ; logfile=$1 ;; - - *) echo "Unrecognized option $1 try -h for help"; exit 2 ;; - - esac - shift -done -if [ $BK -ne 1 ]; then - echo - echo "You must specify the hostname of the LB Server with the option -m (ex: -m pf435.ulb.ac.be)" - echo - exit 2 -fi -echo - - -#main.................................................................. - -#main.................................................................. -init -echo "Be sure you have stopped glite-lb-interlogd .........................." -echo "You have to log on on your LB machine and kill the process manually..." -echo "Press any key........................................................." -read x -array_job_reg -logEvents -echo "Please start the glite-lb-interlogd..................................." -echo "Please use /opt/glite/etc/config/scripts/glite-lb-cofig.py --start...." -echo "Press any key........................................................." -read x -echo "Sleeping 10 seconds......................................................" -sleep 10 -testLB -testLB2 -#testProxy -#eval $LBPURGE -h -echo -if [ $dtest -eq 1 ];then - echo "Final test result .........................................[OK]" - exit 1 -else echo "Final test result .........................................[FAILED]" - exit 0 - fi -echo diff --git a/org.glite.testsuites.ctb/LB/lb-l2Stat.sh b/org.glite.testsuites.ctb/LB/lb-l2Stat.sh deleted file mode 100755 index b7bf2fb..0000000 --- a/org.glite.testsuites.ctb/LB/lb-l2Stat.sh +++ /dev/null @@ -1,223 +0,0 @@ -#!/bin/bash -# Normal event delivery and Normal Job States with internal BKsrever performance - -#Prerequisities: All services running -#Actions: -#Registers jobs with glite-lb-job-reg prferably pointing to remote LB Server -#Check of the job status -#Logs sequences of events with glite-lb-logevent -#Check with glite-lb-job_status that the status of the jobs are correct and mesures how long it took to get results - - -PATH=/opt/glite/examples:$PATH -#echo $PATH -LBJOBREG=${LBJOBREG:-glite-lb-job_reg} -LBLOGEVENT=${LBLOGEVENT:-glite-lb-logevent} -LBJOBSTATUS=${LBJOBSTATUS:-glite-lb-job_status} -LBJOBLOG=${LBJOBLOG:-glite-lb-job_log} -LBJOBSTAT=${LBJOBSTAT:-glite-lb-job_status} -LBPURGE=${PURGE:-glite-lb-purge} - - -STATES="aborted cancelled done ready running scheduled waiting submitted " -SOURCES="NetworkServer WorkloadManager BigHelper JobController LogMonitor LRMS Application UserInterface" -dtest=1 -i=0 -JOBS_ARRAY_SIZE=10 -# timeouts for polling the bkserver -timeout=10 -maxtimeout=300 -NB_TAGS=50 -INTERVAL=2 -DATE_S=`date +"%s"` -DATE=`date` -LOG_FILE="$DATE_S.log" - -init() -{ -echo "Date: $DATE" > $LOG_FILE -export EDG_WL_QUERY_SERVER="$BKSERVER:9000" -export EDG_WL_LOG_DESTINATION="$BKSERVER:9002" -BKSERVER_HOST="$BKSERVER:9000" -BKSERVER_OPT="-m $BKSERVER" -} - -get_time() -{ - sec=`date +%s` - nsec=`date +%N` - time=`echo "1000000000*$sec + $nsec"|bc` -# time=$sec - return 0 -} - -getJobId() -{ -cat jobreg |grep "EDG_JOBID" |cut -c12- > jobList2 -res=`cat jobList2 |wc -c` -res=$[$res-2] -cat jobList2 |cut -c1-`echo $res` > jobreg -rm jobList2 -} - -#registrating a job -job_reg() -{ -eval $LBJOBREG $BKSERVER_OPT -s $1 > jobreg -getJobId -job=`cat jobreg` -rm jobreg -} - -array_job_reg() -{ -echo "Registering $JOBS_ARRAY_SIZE jobs...................." -job_id=0 -st_count=`echo $SOURCES | wc -w` -while [ $job_id -lt $JOBS_ARRAY_SIZE ] ; do - tmp=`echo $RANDOM % $st_count + 1 | bc` - jsource=`echo $SOURCES | cut -d " " -f $tmp | tr A-Z a-z` - job_reg $jsource - echo $job - SAMPLE_JOBS_ARRAY[$job_id]=$job - job_id=$[$job_id+1] - done -} - -#job status test -testLBP() -{ -echo "Checking the Events............................................." -echo -job_id=0 -while [ $job_id -lt $JOBS_ARRAY_SIZE ] ; do - get_time - start=$time - logEvent $job_id - logTag $job_id - - - eval $LBJOBSTATUS ${SAMPLE_JOBS_ARRAY[$job_id]} > status - testStatus=`cat status |grep -i state.*${SAMPLE_JOBS_STATES[$job_id]}|wc -l` - response=0 - while [ $testStatus -ne 1 ];do - bkserver_state=`cat status |grep -i state.*${SAMPLE_JOBS_STATES[$job_id]}` - testStatus=`cat status |grep -i state.*${SAMPLE_JOBS_STATES[$job_id]}|wc -l` - echo "**Retrying**" - sleep $timeout - response=$(($response + $timeout )) - if test $response -gt $maxtimeout ; then - echo -e "ERROR\n\tstatus of job ${SAMPLE_JOBS_ARRAY[$job_id]} as queried from bkserver ($bkserver_state) has not become ${SAMPLE_JOBS_STATES[$job_id]} for more than $response seconds!" - echo "Detailed status has been copied to errorStatus.tmp" - echo - dtest=0 - fi - done - get_time - response=`echo "scale=9; ($time - $start)/1000000000"|bc` - SAMPLE_JOBS_RESPONSES[$job_id]=$response - echo "Job: $job_id ....[`cat status |grep -i state.*${SAMPLE_JOBS_STATES[$job_id]}`].......[OK]" - echo - rm status - job_id=$[$job_id+1] - done - j=0 - total=0 - echo "Sending events took for individual jobs the following time" - while [ $j -lt $JOBS_ARRAY_SIZE ] ; do - total=`echo "scale=9; $total + ${SAMPLE_JOBS_RESPONSES[$j]}" |bc` - echo -e "${SAMPLE_JOBS_ARRAY[$j]} \t${SAMPLE_JOBS_RESPONSES[$j]} seconds" - j=$(($j + 1)) - done - echo -e "Total time for $JOBS_ARRAY_SIZE jobs: \t$total" - echo -e -n "Average time for event: \t" - echo "scale=9; $total / $JOBS_ARRAY_SIZE "|bc - echo -e -n "Average time for event and tags: \t" - echo "scale=9; $total / $JOBS_ARRAY_SIZE / $NB_TAGS"|bc - echo -e -n "Event throughput (events/sec): \t" - echo "scale=9; $NB_TAGS * $JOBS_ARRAY_SIZE / $total"|bc - echo - echo "A detailed list of events logged has been printed to $LOG_FILE" - echo -} - -logEvent() -#ARG1: Number of the job considered in the jobs array -{ -st_count=`echo $STATES | wc -w` -tmp=`echo $RANDOM % $st_count + 1 | bc` -state=`echo $STATES | cut -d " " -f $tmp | tr A-Z a-z` -SAMPLE_JOBS_STATES[$1]=$state -echo "Logging event to the job($1).........................[$state]" -echo > LoggedEvents.log -echo "Submitting events to the job: ${SAMPLE_JOBS_ARRAY[$1]} " >> $LOG_FILE -echo >> LoggedEvents.log -echo "event submitted.......................................[$state]" >> $LOG_FILE -eval glite-lb-$state.sh $LARGE_STRESS -j ${SAMPLE_JOBS_ARRAY[$1]} 2>out -} -logTag() -{ -i=0 -echo "Logging $NB_TAGS tags to the job................" -eval $LBLOGEVENT -s Application -n $NB_TAGS -e UserTag -j ${SAMPLE_JOBS_ARRAY[$1]} -name testTag -value 12345 >> $LOG_FILE -} - -showHelp() -{ - echo "Usage: $0 [OPTIONS] " - echo "Options:" - echo " -h | --help Show this help message." - echo " -n | --nbjobs Number of jobs" - echo " -s | --states List of states in which could tested jobs fall." - echo " -m | --bkserver Host address of the BKServer " - echo " -t | --tags Number of user tags to load to each job." - echo " -l | --large-stress 'size' Do a large stress logging ('size' rand om data added to the messages." - echo "" - -# echo "For proper operation check your grid-proxy-info" -# grid-proxy-info -} - -#input -if [ -z "$1" ]; then - showHelp - exit 2 -fi -BK=0 -while test -n "$1" -do - case "$1" in - "-h" | "--help") showHelp && exit 2 ;; - "-n" | "--nbjobs") shift ; JOBS_ARRAY_SIZE=$1 ;; - "-s" | "--states") shift; STATES="$1" ;; - "-m" | "--bkserver") shift ; BKSERVER=$1 BK=1 ;; - "-t" | "--tags") shift ; NB_TAGS=$1 ;; - "-l" | "--large-stress") shift ; LARGE_STRESS="-l $1" ;; -# "-g" | "--log") shift ; logfile=$1 ;; - - *) echo "Unrecognized option $1 try -h for help"; exit 2 ;; - - esac - shift -done -if [ $BK -ne 1 ]; then - echo - echo "You must specify the hostname of the LB Server with the option -m (ex: -m pf435.ulb.ac.be)" - echo - exit 2 -fi - -echo -init -array_job_reg -testLBP -echo -if [ $dtest -eq 1 ];then - echo "Final test result .........................................[OK]" - exit 1 -else echo "Final test result .........................................[FAILED]" - exit 0 - fi -echo - - diff --git a/org.glite.testsuites.ctb/LB/testSocket.c b/org.glite.testsuites.ctb/LB/testSocket.c deleted file mode 100755 index cf1adc8..0000000 --- a/org.glite.testsuites.ctb/LB/testSocket.c +++ /dev/null @@ -1,58 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#define BUFFSIZE 32 -void Die(char *mess) { -perror(mess); -exit(1); } -int main(int argc, char *argv[]) { -int sock; -struct hostent *hip; -char *adrIPp; -struct in_addr adrIP; -struct sockaddr_in echoserver; -char buffer[BUFFSIZE]; -unsigned int echolen; -int received = 0; -if (argc != 3) { - fprintf(stderr, "USAGE: TCPecho \n"); - exit(1); - } -//conversion from DNS to IPv4 -if((hip=gethostbyname(argv[1]))==NULL) -{ -printf("Erreur avec gethostbyname\n"); -// exit(1); -} -adrIP.s_addr=*(int *)hip->h_addr; -adrIPp =(char *)inet_ntoa(adrIP); -/* Create the TCP socket */ -if ((sock = socket(PF_INET, SOCK_STREAM, IPPROTO_TCP)) < 0) { - Die("Failed to create socket"); - } -/* Construct the server sockaddr_in structure */ -memset(&echoserver, 0, sizeof(echoserver)); /* Clear struct */ -echoserver.sin_family = AF_INET; /* Internet/IP */ -echoserver.sin_addr.s_addr = inet_addr(adrIPp); /* IP address */ -echoserver.sin_port = htons(atoi(argv[2])); /* server port */ -printf("Connecting a socket with : %s,%s", adrIPp,argv[2]); -/* Establish connection */ -if (connect(sock, - (struct sockaddr *) &echoserver, - sizeof(echoserver)) < 0) { - Die("Failed to connect with server"); - } -else - { - shutdown(sock,2); - printf(" [OK]\n"); - exit(0); - } -} diff --git a/org.glite.wms-utils.exception/.cvsignore b/org.glite.wms-utils.exception/.cvsignore deleted file mode 100644 index e970233..0000000 --- a/org.glite.wms-utils.exception/.cvsignore +++ /dev/null @@ -1 +0,0 @@ -.project \ No newline at end of file diff --git a/org.glite.wms-utils.exception/LICENSE b/org.glite.wms-utils.exception/LICENSE deleted file mode 100755 index 01b973b..0000000 --- a/org.glite.wms-utils.exception/LICENSE +++ /dev/null @@ -1,69 +0,0 @@ -LICENSE file for EGEE Middleware -================================ - -Copyright (c) 2004 on behalf of the EU EGEE Project: -The European Organization for Nuclear Research (CERN), -Istituto Nazionale di Fisica Nucleare (INFN), Italy -Datamat Spa, Italy -Centre National de la Recherche Scientifique (CNRS), France -CS Systeme d'Information (CSSI), France -Royal Institute of Technology, Center for Parallel Computers (KTH-PDC), Sweden -Universiteit van Amsterdam (UvA), Netherlands -University of Helsinki (UH.HIP), Finlan -University of Bergen (UiB), Norway -Council for the Central Laboratory of the Research Councils (CCLRC), United Kingdom - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - -1. Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - -2. Redistributions in binary form must reproduce the above copyright -notice, this list of conditions and the following disclaimer in the -documentation and/or other materials provided with the distribution. - -3. The end-user documentation included with the redistribution, if -any, must include the following acknowledgment: "This product includes -software developed by The EU EGEE Project (http://cern.ch/eu-egee/)." -Alternatively, this acknowledgment may appear in the software itself, if -and wherever such third-party acknowledgments normally appear. - -4. The names EGEE and the EU EGEE Project must not be -used to endorse or promote products derived from this software without -prior written permission. For written permission, please contact -. - -5. You are under no obligation whatsoever to provide anyone with any -bug fixes, patches, or upgrades to the features, functionality or -performance of the Software ("Enhancements") that you may develop over -time; however, if you choose to provide your Enhancements to The EU -EGEE Project, or if you choose to otherwise publish or distribute your -Enhancements, in source code form without contemporaneously requiring -end users of The EU EGEE Proejct to enter into a separate written license -agreement for such Enhancements, then you hereby grant The EU EGEE Project -a non-exclusive, royalty-free perpetual license to install, use, copy, -modify, prepare derivative works, incorporate into the EGEE Middleware -or any other computer software, distribute, and sublicense your -Enhancements or derivative works thereof, in binary and source code -form (if any), whether developed by The EU EGEE Project or third parties. - -THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED -WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL PROJECT OR ITS CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR -BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE -OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN -IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -This software consists of voluntary contributions made by many -individuals on behalf of the EU EGEE Prject. For more information on The -EU EGEE Project, please see http://cern.ch/eu-egee/. For more information on -EGEE Middleware, please see http://egee-jra1.web.cern.ch/egee-jra1/ - - diff --git a/org.glite.wms-utils.exception/Makefile.am b/org.glite.wms-utils.exception/Makefile.am deleted file mode 100755 index b66c2bb..0000000 --- a/org.glite.wms-utils.exception/Makefile.am +++ /dev/null @@ -1,67 +0,0 @@ -## ********************************************************************* -## * -## * Copyright (c) 2002 CERN and INFN on behalf of the EU DataGrid. -## * For license conditions see LICENSE file or -## * http://www.edg.org/license.html -## * -## ********************************************************************* - -## Process this file with automake to produce Makefile.in -EXTRA_DIST = LICENSE - -docdir = $(datadir)/doc/@PACKAGE@-@VERSION@ -doc_DATA = LICENSE -## Subdirectories list -SUBDIRS = interface src - -## Default flags to run aclocal -ACLOCAL_AMFLAGS = -I project - -stage: - @set fnord $(MAKEFLAGS); amf=$$2; \ - dot_seen=no; \ - target="install"; \ - prefix_arg="@prefix@"; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ - echo "Making $$target $$prefix_arg in $$subdir"; \ - if test "$$subdir" = "."; then \ - dot_seen=yes; \ - local_target="$$target-am"; \ - else \ - local_target="$$target"; \ - fi; \ - (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target $$prefix_arg) \ - || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ - done; \ - if test "$$dot_seen" = "no"; then \ - $(MAKE) $(AM_MAKEFLAGS) "$$target-am" $$prefix_arg || exit 1; \ - fi; test -z "$$fail" - -distsrc: dist - mv $(distdir).tar.gz $(DISTTAR)/$(distdir)_src.tar.gz - -distbin: - @set fnord $(MAKEFLAGS); amf=$$2; \ - dot_seen=no; \ - target="install"; \ - tmpdistbin="$(WORKDIR)/dist_bin"; \ - prefix_arg="prefix=$$tmpdistbin"; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ - echo "Making $$target $$prefix_arg in $$subdir"; \ - if test "$$subdir" = "."; then \ - dot_seen=yes; \ - local_target="$$target-am"; \ - else \ - local_target="$$target"; \ - fi; \ - (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target $$prefix_arg) \ - || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ - done; \ - if test "$$dot_seen" = "no"; then \ - $(MAKE) $(AM_MAKEFLAGS) "$$target-am" $$prefix_arg || exit 1; \ - fi; test -z "$$fail"; \ - pushd $$tmpdistbin; \ - $(AMTAR) -zcf $(DISTTAR)/$(distdir)_bin.tar.gz .; \ - popd; \ - rm -rf $$tmpdistbin - diff --git a/org.glite.wms-utils.exception/bootstrap b/org.glite.wms-utils.exception/bootstrap deleted file mode 100755 index ceeb099..0000000 --- a/org.glite.wms-utils.exception/bootstrap +++ /dev/null @@ -1,9 +0,0 @@ -#! /bin/sh - -mkdir -p src/autogen -set -x -aclocal -I project -libtoolize --force -autoheader -automake --foreign --add-missing --copy -autoconf diff --git a/org.glite.wms-utils.exception/build.xml b/org.glite.wms-utils.exception/build.xml deleted file mode 100755 index d12e8c2..0000000 --- a/org.glite.wms-utils.exception/build.xml +++ /dev/null @@ -1,104 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/org.glite.wms-utils.exception/configure.ac b/org.glite.wms-utils.exception/configure.ac deleted file mode 100755 index 398817a..0000000 --- a/org.glite.wms-utils.exception/configure.ac +++ /dev/null @@ -1,127 +0,0 @@ -# -# Copyright (c) 2004 on behalf of the EU EGEE Project: -# The European Organization for Nuclear Research (CERN), -# Istituto Nazionale di Fisica Nucleare (INFN), Italy -# Datamat Spa, Italy -# Centre National de la Recherche Scientifique (CNRS), France -# CS Systeme d'Information (CSSI), France -# Royal Institute of Technology, Center for Parallel Computers (KTH-PDC), Sweden -# Universiteit van Amsterdam (UvA), Netherlands -# University of Helsinki (UH.HIP), Finland -# University of Bergen (UiB), Norway -# Council for the Central Laboratory of the Research Councils (CCLRC), United Kingdom -# -# Common configure.ac file for the GLite WMS Common module -# -# Authors: Alberto Di Meglio -# Version info: $Id$ -# Release: $Name$ -# -# Revision history: -# $Log$ -# Revision 1.13 2006/03/20 15:29:52 eronchie -# Increased version -# -# Revision 1.12 2005/10/15 07:54:17 eronchie -# Increased version -# -# Revision 1.11 2005/09/20 10:20:52 eronchie -# Started merged with 1.4 -# -# Revision 1.10 2004/12/10 07:31:35 eronchie -# Increased version -# -# Revision 1.9 2004/11/16 15:31:13 eronchie -# Increased version -# -# Revision 1.8 2004/09/22 00:25:17 glbuild -# Fixed missing parenthesis -# -# Revision 1.7 2004/09/21 19:21:57 glbuild -# modified module.version -# -# Revision 1.6 2004/08/17 10:41:47 eronchie -# Added optimize option -# -# Revision 1.5 2004/07/23 08:02:09 eronchie -# Updated configure.ac -# -# Revision 1.4 2004/07/21 18:49:26 eronchie -# Added AC_GLITE -# -# Revision 1.3 2004/07/21 18:47:49 eronchie -# Removed obsolete things -# -# Revision 1.2 2004/07/21 18:44:22 eronchie -# Updated header file -# -# Revision 1.1.1.1 2004/07/21 18:16:57 eronchie -# Moved out exception from org.glite.wms.common/src/utilitiesY -# -# -# - -# Process this file with autoconf to produce a configure script. - -AC_PREREQ(2.57) -AC_INIT([GLite WMS Utils Exception], [3.1.1]) -AC_CONFIG_AUX_DIR([./project]) -AM_INIT_AUTOMAKE([1.6.3 subdir-objects]) -AC_CONFIG_SRCDIR([src/Exception.cpp]) - -# Notices. -AC_COPYRIGHT([Copyright (c) 2004 The EU EGEE Project -See LICENCE file for details -]) -AC_REVISION([$Revision$]) - -#Environment. -WORKDIR=`pwd` -AC_SUBST(WORKDIR) - -# Checks for programs. -AC_PROG_CC -AC_PROG_CPP -AC_PROG_CXX -AC_PROG_CXXCPP -AM_PROG_CC_C_O -AC_PROG_LIBTOOL - -# Checks for libraries. - -# Checks for header files. -AC_CHECK_HEADERS([fcntl.h mntent.h sys/vfs.h syslog.h unistd.h]) - -# Checks for typedefs, structures, and compiler characteristics. -AC_HEADER_STDBOOL -AC_C_CONST -AC_C_INLINE -AC_TYPE_OFF_T -AC_TYPE_SIZE_T -AC_CHECK_MEMBERS([struct stat.st_rdev]) -AC_TYPE_UID_T -AC_CHECK_TYPES([ptrdiff_t]) - -# Checks for library functions. -AC_HEADER_STDC -AC_FUNC_ERROR_AT_LINE -AC_FUNC_GETMNTENT -AC_FUNC_MEMCMP -AC_FUNC_STAT -AC_FUNC_STRFTIME -AC_FUNC_VPRINTF -AC_CHECK_FUNCS([bzero endpwent ftruncate getmntent memset mkdir pow strerror strtol]) - -AC_GLITE - -AC_OPTIMIZE - -# Configuration items -AC_PREFIX_DEFAULT([/opt/glite]) -AM_CONFIG_HEADER([src/autogen/config.h]) -AC_CONFIG_FILES([Makefile]) -AC_CONFIG_FILES([src/Makefile]) -AC_CONFIG_FILES([interface/Makefile]) - -AC_OUTPUT - diff --git a/org.glite.wms-utils.exception/interface/Makefile.am b/org.glite.wms-utils.exception/interface/Makefile.am deleted file mode 100755 index 3c4ccb7..0000000 --- a/org.glite.wms-utils.exception/interface/Makefile.am +++ /dev/null @@ -1,14 +0,0 @@ -## ********************************************************************* -## * -## * Copyright (c) 2002 CERN and INFN on behalf of the EU DataGrid. -## * For license conditions see LICENSE file or -## * http://www.edg.org/license.html -## * -## ********************************************************************* - -exceptiondir = $(includedir) -nobase_exception_HEADERS = \ - glite/wmsutils/exception/exception_codes.h \ - glite/wmsutils/exception/Exception.h - -MAINTAINERCLEANFILES = Makefile.in diff --git a/org.glite.wms-utils.exception/interface/glite/wmsutils/exception/Exception.h b/org.glite.wms-utils.exception/interface/glite/wmsutils/exception/Exception.h deleted file mode 100644 index 19ca7c7..0000000 --- a/org.glite.wms-utils.exception/interface/glite/wmsutils/exception/Exception.h +++ /dev/null @@ -1,138 +0,0 @@ -#ifndef GLITE_WMS_UTILS_EXCEPTION_EXCEPTION_H -#define GLITE_WMS_UTILS_EXCEPTION_EXCEPTION_H - -/* - * Exception.h - * Copyright (c) 2001 The European Datagrid Project - IST programme, all rights reserved. - * Contributors are mentioned in the code where appropriate. - */ - -#include -#include -//#include -#include // For logging exceptions to log file -#include // list the exception codes -#include -#include -#include // base ancestor stl::exception - - -namespace glite { - namespace wmsutils { - namespace exception { - -extern pthread_mutex_t METHOD_MUTEX; // used in order to store info into a file (rather then syslog) -#define GLITE_STACK_TRY(method_name) std::string METHOD = method_name ; int LINE = __LINE__ ; try { -#define GLITE_STACK_CATCH() } catch (glite::wmsutils::exception::Exception &exc){ exc.push_back ( __FILE__ , LINE, METHOD ); throw exc ; } catch (std::exception &ex){ glite::wmsutils::exception::Exception exc( __FILE__ , LINE, METHOD, 0, "Standard exception: " + std::string(ex.what()) ); throw exc; } - -/** - * The Exception base classe contains attributes into which are placed exception information and provides - * constructor that beyond the error code take parameters specifying the source file and line number - * (e.g. through __FILE__ and __LINE__) where the error has been generated and string messages, - * allowing an easy way of storing the origin of the exception. - * Moreover it provides methods for getting all the exception information and for logging them either - * in a log file or to the syslog daemon. - * Each of the derived types may contain its private attributes describing the actual error instance in detail. - * Moreover each exception has an attribute representing the exception identifier that is set by the - * class constructor and allows the identification of the original exception. - * - * @version 0.1 - * @date 22 July 2004 - * @author Alessandro Maraschini -*/ - -class Exception : public std::exception{ - public: - /** - * Constructor Update all mandatory fields - * @param method the name of the method that raised the exception - * @param source The source that raised the exception (could be the file path, the class Name, etc etc) - * @param exc the previous exception as in the stack trace */ - Exception ( const std::string& source, const std::string& method, Exception *exc); - /** - * Constructor Update all mandatory fields - * @param code the code representing the thrown exception - * @param exception the name of the thrown exception - * @param method the name of the method that raised the exception - * @param source The source that raised the exception (could be the file path, the class Name, etc etc) */ - Exception ( const std::string& source, const std::string& method, int code, const std::string& exception); - - /** - * Constructor Update all mandatory fields - * @param source the path of the file that raised the exception - * @param line_number the number of the line in the file that raised the exception - * @param method the name of the method that raised the exception - * @param code the code representing the thrown exception - * @param exception the name of the thrown exception */ - Exception (const std::string& source, int line_number, const std::string& method, int code, const std::string& exception); - /** - * Default Destructor - */ - virtual ~Exception() throw (); - /** - * Return a string debug message containing information about Exception thrown - * Debug message contains all the attributes stored in an exception instance such as the method, the file and the line - * that threw the exception. - *@return the debug message string representation - */ - virtual std::string dbgMessage(); - /** - * Return the error code - * @return The integer representing the code of the error that generated the exception - */ - virtual int getCode(); - - /** - * return the Error Message associated to the Exception - * @return The Exception string message representation - */ - virtual const char* what() const throw (); - - /** - * Print Exception error information into a log file - * @param logfile the file where to log exception information - */ - virtual void log(const std::string& logfile = ""); - /** - * Retrieve the Exception name - * @return the name of the Exception thrown - */ - virtual std::string getExceptionName(); - - /** - * Retrieve the Stack of the exception as a list of previous generated exceptions - *@return the string representation of the stack trace: each line correspond to an exception message - */ - virtual std::string printStackTrace() ; - /** - * Return the list of methods that caused the Exception - */ - virtual std::vector getStackTrace() ; - /** - * Update stack information - */ - virtual void push_back ( const std::string& source, int line_number, const std::string& method ) ; - protected: - /** Empty constructor*/ - Exception(); - /** integer error code representing the cause of the error */ - int error_code; - /** string exception message representation*/ - std::string error_message ; - /** line number where the exception was raised */ - int line; - /** The name of the file where the exception was raised */ - std::string source_file; - /** the name of the exception */ - std::string exception_name; - /** the name of the method where the expceiton was raised */ - std::string method_name ; - /** a string representation of the stacktrace */ - std::string stack; - /** the actual internal stacktrace representation */ - std::vector< std::string> stack_strings ; - /** the name of the ancestor exception */ - std::string ancestor ; -}; //End Exception Class -}}} // Closing namespace -#endif diff --git a/org.glite.wms-utils.exception/interface/glite/wmsutils/exception/exception_codes.h b/org.glite.wms-utils.exception/interface/glite/wmsutils/exception/exception_codes.h deleted file mode 100755 index fce99aa..0000000 --- a/org.glite.wms-utils.exception/interface/glite/wmsutils/exception/exception_codes.h +++ /dev/null @@ -1,41 +0,0 @@ -#ifndef GLITE_WMSUTILS_EXCEPTION_CODES_H -#define GLITE_WMSUTILS_EXCEPTION_CODES_H -// pure C-style code (needed by some libraries) -#define GLITE_WMS_COMMON_ERROR_BASE 900 -#define GLITE_WMS_USERINTERFACE_ERROR_BASE 1000 -#define GLITE_WMS_NETWORKSERVER_ERROR_BASE 1200 -#define GLITE_WMS_SOCKET_ERROR_BASE 1300 -#define GLITE_WMS_LDAP_ERROR_BASE 1350 -#define GLITE_WMS_LOGGING_ERROR_BASE 1400 -#define GLITE_WMS_REQUESTAD_ERROR_BASE 1500 -#define GLITE_WMS_CHECKPOINT_ERROR_BASE 1600 -#define GLITE_WMS_CONFIGURATION_ERROR_BASE 1800 -#ifdef __cplusplus -namespace glite { -namespace wmsutils { -namespace exception { - /** - * The Error Code - */ - enum { - WMS_COMMON_BASE = GLITE_WMS_COMMON_ERROR_BASE, - THREAD_INIT , // pthread_attr_init method failed - THREAD_DETACH , // pthread_attr_setdetachstate method failed - THREAD_CREATE , // pthread_create method failed - THREAD_JOIN, - THREAD_SSL, - WMS_FATAL_ERROR, - WMS_UI_ERROR_BASE = GLITE_WMS_USERINTERFACE_ERROR_BASE, - WMS_NS_ERROR_BASE = GLITE_WMS_NETWORKSERVER_ERROR_BASE, - WMS_SOCKET_ERROR_BASE = GLITE_WMS_SOCKET_ERROR_BASE, - WMS_LDAP_ERROR_BASE = GLITE_WMS_LDAP_ERROR_BASE, - WMS_LB_ERROR_BASE = GLITE_WMS_LOGGING_ERROR_BASE , - WMS_REQUESTAD_ERROR_BASE = GLITE_WMS_REQUESTAD_ERROR_BASE, - WMS_CHKPT_ERROR_BASE = GLITE_WMS_CHECKPOINT_ERROR_BASE, - WMS_CONFIGURATION_ERROR_BASE = GLITE_WMS_CONFIGURATION_ERROR_BASE - }; -} // exception namespace -} // wmsutils namespace -} // glite namespace -#endif //ifdef c++ -#endif diff --git a/org.glite.wms-utils.exception/project/build.number b/org.glite.wms-utils.exception/project/build.number deleted file mode 100644 index 95bc38e..0000000 --- a/org.glite.wms-utils.exception/project/build.number +++ /dev/null @@ -1,2 +0,0 @@ -#Sat Oct 15 02:08:14 CEST 2005 -module.build=154 diff --git a/org.glite.wms-utils.exception/project/build.properties b/org.glite.wms-utils.exception/project/build.properties deleted file mode 100755 index f4aef51..0000000 --- a/org.glite.wms-utils.exception/project/build.properties +++ /dev/null @@ -1,2 +0,0 @@ -build.package.summary="files for gLite wms utils exception" -build.package.description="exception api" diff --git a/org.glite.wms-utils.exception/project/configure.properties.xml b/org.glite.wms-utils.exception/project/configure.properties.xml deleted file mode 100644 index 04d3b17..0000000 --- a/org.glite.wms-utils.exception/project/configure.properties.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - diff --git a/org.glite.wms-utils.exception/project/properties.xml b/org.glite.wms-utils.exception/project/properties.xml deleted file mode 100755 index 1e49af0..0000000 --- a/org.glite.wms-utils.exception/project/properties.xml +++ /dev/null @@ -1,83 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/org.glite.wms-utils.exception/project/version.properties b/org.glite.wms-utils.exception/project/version.properties deleted file mode 100755 index 40c3916..0000000 --- a/org.glite.wms-utils.exception/project/version.properties +++ /dev/null @@ -1,2 +0,0 @@ -module.version=3.1.1 -module.age=1 diff --git a/org.glite.wms-utils.exception/src/Exception.cpp b/org.glite.wms-utils.exception/src/Exception.cpp deleted file mode 100644 index 546f253..0000000 --- a/org.glite.wms-utils.exception/src/Exception.cpp +++ /dev/null @@ -1,124 +0,0 @@ -/* ************************************************************************** -* filename : Exceptions.cpp -* author : Alessandro Maraschini -* copyright : (C) 2002 by DATAMAT -***************************************************************************/ - -#include "glite/wmsutils/exception/Exception.h" -#include "glite/wmsutils/exception/exception_codes.h" - -namespace glite { -namespace wmsutils{ -namespace exception { -using namespace std ; -pthread_mutex_t METHOD_MUTEX ; // This mutex is used in order to lock the file for writing log infornation - -/* ********************************* -* Exception Class Implementation -************************************/ -//Constructor/Destructor - -Exception::Exception () { - line = 0; -}; - -Exception::~Exception() throw(){ } - -/** -* Exception chainig -*/ -void Exception::push_back (const string& source, int line_number, const string& method){ - stack_strings.push_back (dbgMessage()); - ancestor = what(); - source_file = source; - line = line_number; - method_name = method; - error_message = ""; - exception_name = ""; -} - -Exception::Exception( const std::string& file, int line_number, const std::string& method, int code, const std::string& name) - : error_code(code), exception_name(name){ - source_file = file; - line = line_number; - method_name = method; -}; - -Exception::Exception (const string& source, const string& method, int code, const string& exception) - : error_code(code), exception_name(exception){ - source_file = source; - method_name = method; - // stack= ""; - line = 0; -}; - -int Exception::getCode(){ - if (error_code != 0) return error_code; - else - return WMS_COMMON_BASE; -}; - -const char* Exception::what() const throw(){ - if (!ancestor.empty()) return ancestor.c_str(); - - return error_message.c_str(); -}; - -string Exception::getExceptionName(){ - return exception_name; -}; - -void Exception::log(const std::string& logfile) -{ - if (logfile == "") - syslog (LOG_PERROR, (char *)(dbgMessage()).c_str()); - else{ - pthread_mutex_lock( &METHOD_MUTEX); // LOCK - //TBD : test if file exist-->>Create HEADER ?? - ofstream fout ((char *) logfile.c_str() , ios::app ); //Open the file for writing (if it doesn't exist then it will be created) - fout << "\n" << dbgMessage() ; //write (append) the message - fout.close(); //close the file - pthread_mutex_unlock( &METHOD_MUTEX); // UNLOCK - } -}; - -string Exception::printStackTrace(){ - string stack = "" ; - for (unsigned int i = 0 ; i < stack_strings.size() ; i++ ){ - stack+=stack_strings[i] +"\n" ; - } - return stack +dbgMessage(); -}; - -vector Exception::getStackTrace(){ - // make a copy of the stack - vector stack = stack_strings ; - stack.push_back(dbgMessage()) ; - return stack; -}; - -string Exception::dbgMessage(){ - string result ; - //Adding exception Name - result = exception_name; - - //Adding error msg - if (error_message!="") result +=": " + string(what()); - - if (result != "") result+="\n"; - - //Adding Source - result +="\tat " + method_name +"[" +source_file; - - //Adding line number - if (line!=0){ - char buffer [1024] ; - sprintf (buffer, "%i" , line) ; - result += ":" + string ( buffer ); - } - result +="]" ; - return result; -} - -}}} // Closing namespace - diff --git a/org.glite.wms-utils.exception/src/Makefile.am b/org.glite.wms-utils.exception/src/Makefile.am deleted file mode 100755 index 0c5caac..0000000 --- a/org.glite.wms-utils.exception/src/Makefile.am +++ /dev/null @@ -1,17 +0,0 @@ -## ********************************************************************* -## * -## * Copyright (c) 2002 CERN and INFN on behalf of the EU DataGrid. -## * For license conditions see LICENSE file or -## * http://www.edg.org/license.html -## * -## ********************************************************************* - -lib_LTLIBRARIES = libglite_wmsutils_exception.la - -libglite_wmsutils_exception_la_SOURCES = \ - Exception.cpp - -AM_CPPFLAGS = -I$(top_srcdir)/interface \ - -I$(top_srcdir)/src - -MAINTAINERCLEANFILES = Makefile.in *.*~ diff --git a/org.glite.wms-utils.exception/test/Makefile.am b/org.glite.wms-utils.exception/test/Makefile.am deleted file mode 100755 index a972450..0000000 --- a/org.glite.wms-utils.exception/test/Makefile.am +++ /dev/null @@ -1,33 +0,0 @@ -## ********************************************************************* -## * -## * Copyright (c) 2002 CERN and INFN on behalf of the EU DataGrid. -## * For license conditions see LICENSE file or -## * http://www.edg.org/license.html -## * -## ********************************************************************* - -EXCEPTION_LIBS = $(top_builddir)/src/libglite_wmsutils_exception.la - -TESTS = glite-wmsutils-exception - -check_PROGRAMS = $(TESTS) - -glite_wmsutils_exception_SOURCES = exception_cu_suite.cpp \ - exception_cu_suite.h \ - exception_cu_main.cpp - -glite_wmsutils_exception_LDADD = \ - $(GLITE_WMSUTILS_EXCEPTION_LIBS) \ - $(GLOBUS_GSS_THR_LIBS) \ - $(EXCEPTION_LIBS) \ - $(CPPUNIT_LIBS) - -AM_CPPFLAGS = \ - -I$(top_srcdir)/src \ - -I$(top_srcdir)/test \ - $(GLITE_CFLAGS) \ - $(GLOBUS_THR_CFLAGS) \ - $(CPPUNIT_CFLAGS) - -MAINTAINERCLEANFILES = Makefile.in *~ - diff --git a/org.glite.wms-utils.exception/test/exception_cu_main.cpp b/org.glite.wms-utils.exception/test/exception_cu_main.cpp deleted file mode 100644 index 182df4c..0000000 --- a/org.glite.wms-utils.exception/test/exception_cu_main.cpp +++ /dev/null @@ -1,33 +0,0 @@ -#include -#include - -#include "exception_cu_suite.h" - -#include -#include -#include -#include -#include - -using namespace CppUnit; -using namespace std; - -int main (int argc , char** argv) -{ - std::ofstream xml("./cppUnit_output.xml",ios::app); - - CppUnit::TestResult controller; - CppUnit::TestResultCollector result; - controller.addListener( &result ); - - TestRunner runner; - runner.addTest(Exception_test::suite()); - runner.run(controller); - - CppUnit::XmlOutputter outputter( &result, xml ); - CppUnit::TextOutputter outputter2( &result, std::cerr ); - outputter.write(); - outputter2.write(); - - return result.wasSuccessful() ? 0 : 1 ; -} diff --git a/org.glite.wms-utils.exception/test/exception_cu_suite.cpp b/org.glite.wms-utils.exception/test/exception_cu_suite.cpp deleted file mode 100644 index f749af9..0000000 --- a/org.glite.wms-utils.exception/test/exception_cu_suite.cpp +++ /dev/null @@ -1,56 +0,0 @@ -#include "exception_cu_suite.h" -#include "glite/wmsutils/exception/Exception.h" -#include -#include - -using namespace CppUnit; -using namespace std; -using namespace glite::wmsutils::exception; - -void Exception_test::setUp() -{} - -void Exception_test::tearDown() -{} - - -void Exception_test::constructor_case() -{ - - //constructor class name, line number, method name, code, exception name - glite::wmsutils::exception::Exception exc_5("TEST_Class", 3, "test_method", 1, "exception_test"); - - //constructor class name, method name, code, exception name - glite::wmsutils::exception::Exception exc_4("TEST_Class", "test_method", 1, "exception_test"); - - CPPUNIT_ASSERT(exc_5.getExceptionName() == "exception_test"); - CPPUNIT_ASSERT(exc_5.getCode() == 1); -} - -void Exception_test::tostring_case() -{ - cout<<"TEST TO STRING METHODS"< msgvec = exc_5.getStackTrace(); - - for (int i=0; i -#include -#include - -#include - - -class Exception_test : public CppUnit::TestFixture { - - CPPUNIT_TEST_SUITE(Exception_test); - CPPUNIT_TEST(constructor_case); - CPPUNIT_TEST(tostring_case); - CPPUNIT_TEST(stackTrace_case); - CPPUNIT_TEST_SUITE_END(); - - -public: - - void setUp(); - void tearDown(); - - void constructor_case(); - void tostring_case(); - void stackTrace_case(); - -}; - - - diff --git a/org.glite.wms-utils.jobid/.cvsignore b/org.glite.wms-utils.jobid/.cvsignore deleted file mode 100755 index 1df717b..0000000 --- a/org.glite.wms-utils.jobid/.cvsignore +++ /dev/null @@ -1,2 +0,0 @@ -.project -.cdtproject \ No newline at end of file diff --git a/org.glite.wms-utils.jobid/LICENSE b/org.glite.wms-utils.jobid/LICENSE deleted file mode 100755 index 01b973b..0000000 --- a/org.glite.wms-utils.jobid/LICENSE +++ /dev/null @@ -1,69 +0,0 @@ -LICENSE file for EGEE Middleware -================================ - -Copyright (c) 2004 on behalf of the EU EGEE Project: -The European Organization for Nuclear Research (CERN), -Istituto Nazionale di Fisica Nucleare (INFN), Italy -Datamat Spa, Italy -Centre National de la Recherche Scientifique (CNRS), France -CS Systeme d'Information (CSSI), France -Royal Institute of Technology, Center for Parallel Computers (KTH-PDC), Sweden -Universiteit van Amsterdam (UvA), Netherlands -University of Helsinki (UH.HIP), Finlan -University of Bergen (UiB), Norway -Council for the Central Laboratory of the Research Councils (CCLRC), United Kingdom - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - -1. Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - -2. Redistributions in binary form must reproduce the above copyright -notice, this list of conditions and the following disclaimer in the -documentation and/or other materials provided with the distribution. - -3. The end-user documentation included with the redistribution, if -any, must include the following acknowledgment: "This product includes -software developed by The EU EGEE Project (http://cern.ch/eu-egee/)." -Alternatively, this acknowledgment may appear in the software itself, if -and wherever such third-party acknowledgments normally appear. - -4. The names EGEE and the EU EGEE Project must not be -used to endorse or promote products derived from this software without -prior written permission. For written permission, please contact -. - -5. You are under no obligation whatsoever to provide anyone with any -bug fixes, patches, or upgrades to the features, functionality or -performance of the Software ("Enhancements") that you may develop over -time; however, if you choose to provide your Enhancements to The EU -EGEE Project, or if you choose to otherwise publish or distribute your -Enhancements, in source code form without contemporaneously requiring -end users of The EU EGEE Proejct to enter into a separate written license -agreement for such Enhancements, then you hereby grant The EU EGEE Project -a non-exclusive, royalty-free perpetual license to install, use, copy, -modify, prepare derivative works, incorporate into the EGEE Middleware -or any other computer software, distribute, and sublicense your -Enhancements or derivative works thereof, in binary and source code -form (if any), whether developed by The EU EGEE Project or third parties. - -THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED -WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL PROJECT OR ITS CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR -BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE -OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN -IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -This software consists of voluntary contributions made by many -individuals on behalf of the EU EGEE Prject. For more information on The -EU EGEE Project, please see http://cern.ch/eu-egee/. For more information on -EGEE Middleware, please see http://egee-jra1.web.cern.ch/egee-jra1/ - - diff --git a/org.glite.wms-utils.jobid/Makefile.am b/org.glite.wms-utils.jobid/Makefile.am deleted file mode 100755 index bf956e1..0000000 --- a/org.glite.wms-utils.jobid/Makefile.am +++ /dev/null @@ -1,69 +0,0 @@ -## ********************************************************************* -## * -## * Copyright (c) 2002 CERN and INFN on behalf of the EU DataGrid. -## * For license conditions see LICENSE file or -## * http://www.edg.org/license.html -## * -## ********************************************************************* - -## Process this file with automake to produce Makefile.in - -EXTRA_DIST = LICENSE - -docdir = $(datadir)/doc/@PACKAGE@-@VERSION@ -doc_DATA = LICENSE - -## Subdirectories list -SUBDIRS = interface src examples - -## Default flags to run aclocal -ACLOCAL_AMFLAGS = -I project - -stage: - @set fnord $(MAKEFLAGS); amf=$$2; \ - dot_seen=no; \ - target="install"; \ - prefix_arg="@prefix@"; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ - echo "Making $$target $$prefix_arg in $$subdir"; \ - if test "$$subdir" = "."; then \ - dot_seen=yes; \ - local_target="$$target-am"; \ - else \ - local_target="$$target"; \ - fi; \ - (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target $$prefix_arg) \ - || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ - done; \ - if test "$$dot_seen" = "no"; then \ - $(MAKE) $(AM_MAKEFLAGS) "$$target-am" $$prefix_arg || exit 1; \ - fi; test -z "$$fail" - -distsrc: dist - mv $(distdir).tar.gz $(DISTTAR)/$(distdir)_src.tar.gz - -distbin: - @set fnord $(MAKEFLAGS); amf=$$2; \ - dot_seen=no; \ - target="install"; \ - tmpdistbin="$(WORKDIR)/dist_bin"; \ - prefix_arg="prefix=$$tmpdistbin"; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ - echo "Making $$target $$prefix_arg in $$subdir"; \ - if test "$$subdir" = "."; then \ - dot_seen=yes; \ - local_target="$$target-am"; \ - else \ - local_target="$$target"; \ - fi; \ - (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target $$prefix_arg) \ - || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ - done; \ - if test "$$dot_seen" = "no"; then \ - $(MAKE) $(AM_MAKEFLAGS) "$$target-am" $$prefix_arg || exit 1; \ - fi; test -z "$$fail"; \ - pushd $$tmpdistbin; \ - $(AMTAR) -zcf $(DISTTAR)/$(distdir)_bin.tar.gz .; \ - popd; \ - rm -rf $$tmpdistbin - diff --git a/org.glite.wms-utils.jobid/bootstrap b/org.glite.wms-utils.jobid/bootstrap deleted file mode 100755 index ceeb099..0000000 --- a/org.glite.wms-utils.jobid/bootstrap +++ /dev/null @@ -1,9 +0,0 @@ -#! /bin/sh - -mkdir -p src/autogen -set -x -aclocal -I project -libtoolize --force -autoheader -automake --foreign --add-missing --copy -autoconf diff --git a/org.glite.wms-utils.jobid/build.xml b/org.glite.wms-utils.jobid/build.xml deleted file mode 100755 index 44c110c..0000000 --- a/org.glite.wms-utils.jobid/build.xml +++ /dev/null @@ -1,104 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/org.glite.wms-utils.jobid/configure.ac b/org.glite.wms-utils.jobid/configure.ac deleted file mode 100755 index e255849..0000000 --- a/org.glite.wms-utils.jobid/configure.ac +++ /dev/null @@ -1,147 +0,0 @@ -# -# Copyright (c) 2004 on behalf of the EU EGEE Project: -# The European Organization for Nuclear Research (CERN), -# Istituto Nazionale di Fisica Nucleare (INFN), Italy -# Datamat Spa, Italy -# Centre National de la Recherche Scientifique (CNRS), France -# CS Systeme d'Information (CSSI), France -# Royal Institute of Technology, Center for Parallel Computers (KTH-PDC), Sweden -# Universiteit van Amsterdam (UvA), Netherlands -# University of Helsinki (UH.HIP), Finland -# University of Bergen (UiB), Norway -# Council for the Central Laboratory of the Research Councils (CCLRC), United Kingdom -# -# Common configure.ac file for the GLite WMS Common module -# -# Authors: Alberto Di Meglio -# Version info: $Id$ -# Release: $Name$ -# -# Revision history: -# $Log$ -# Revision 1.19 2006/03/20 15:30:43 eronchie -# Increased version -# -# Revision 1.18 2005/10/15 07:55:00 eronchie -# Increased version -# -# Revision 1.17 2005/09/20 10:41:49 eronchie -# Started merging with rc1.4 -# -# Revision 1.16 2004/12/10 07:33:42 eronchie -# Increased version -# -# Revision 1.15 2004/11/16 15:35:22 eronchie -# Increased version -# -# Revision 1.14 2004/11/16 15:15:45 eronchie -# Increased version -# -# Revision 1.13 2004/09/22 00:25:17 glbuild -# Fixed missing parenthesis -# -# Revision 1.12 2004/09/21 19:22:09 glbuild -# modified module.version -# -# Revision 1.11 2004/08/17 13:46:28 eronchie -# Added interface -# -# Revision 1.10 2004/08/17 13:41:20 eronchie -# Moved out JobIdExceptions.h cjobid.h JobId.h -# Put in interface/glite/wmsutils/jobid -# -# Revision 1.9 2004/08/17 10:40:34 eronchie -# Added optimize option -# -# Revision 1.8 2004/07/27 09:14:19 eronchie -# Removed AC_WMSUTILS_EXCEPTION and AC_GLOBUS_SSL_UTILS checks -# Set directly exception library macro -# -# Revision 1.7 2004/07/21 17:53:36 eronchie -# Moved out org.glite.wms.jobid from org.glite.wms and put in org.glite.wms-utils -# -# -# - -# Process this file with autoconf to produce a configure script. - -AC_PREREQ(2.57) -AC_INIT([GLite WMS Utils Jobid], [3.1.1]) -AC_CONFIG_AUX_DIR([./project]) -AM_INIT_AUTOMAKE([1.6.3 subdir-objects]) -AC_CONFIG_SRCDIR([src/jobid/strmd5.h]) - -# Notices. -AC_COPYRIGHT([Copyright (c) 2004 The EU EGEE Project -See LICENCE file for details -]) -AC_REVISION([$Revision$]) - -#Environment. -WORKDIR=`pwd` -AC_SUBST(WORKDIR) - -# Checks for programs. -AC_PROG_CC -AC_PROG_CPP -AC_PROG_CXX -AC_PROG_CXXCPP -AM_PROG_CC_C_O -AC_PROG_LIBTOOL - -# Checks for libraries. - -# Checks for header files. -AC_CHECK_HEADERS([fcntl.h mntent.h sys/vfs.h syslog.h unistd.h]) - -# Checks for typedefs, structures, and compiler characteristics. -AC_HEADER_STDBOOL -AC_C_CONST -AC_C_INLINE -AC_TYPE_OFF_T -AC_TYPE_SIZE_T -AC_CHECK_MEMBERS([struct stat.st_rdev]) -AC_TYPE_UID_T -AC_CHECK_TYPES([ptrdiff_t]) - -# Checks for library functions. -AC_HEADER_STDC -AC_FUNC_ERROR_AT_LINE -AC_FUNC_GETMNTENT -AC_FUNC_MEMCMP -AC_FUNC_STAT -AC_FUNC_STRFTIME -AC_FUNC_VPRINTF -AC_CHECK_FUNCS([bzero endpwent ftruncate getmntent memset mkdir pow strerror strtol]) - -have_globus=no - -AC_GLOBUS([], have_globus=yes, have_globus=no) -AC_MSG_RESULT(["GLOBUS found $have_globus"]) - -if test "$have_globus" = "no"; then - AC_MSG_RESULT(["Please verify GLOBUS package"]) -fi - -if test "$have_globus" = "no"; then - AC_MSG_ERROR([Cannot continue building]) -fi -AC_GLITE - -GLITE_WMSUTILS_EXCEPTION_LIBS="-L$GLITE_LOCATION/lib -lglite_wmsutils_exception" - -AC_SUBST(GLITE_WMSUTILS_EXCEPTION_LIBS) - -AC_OPTIMIZE - -# Configuration items -AC_PREFIX_DEFAULT([/opt/glite]) -AM_CONFIG_HEADER([src/autogen/config.h]) -AC_CONFIG_FILES([Makefile]) -AC_CONFIG_FILES([examples/Makefile]) -AC_CONFIG_FILES([interface/Makefile]) -AC_CONFIG_FILES([src/Makefile]) -AC_CONFIG_FILES([src/jobid/Makefile]) - -AC_OUTPUT - diff --git a/org.glite.wms-utils.jobid/examples/Makefile.am b/org.glite.wms-utils.jobid/examples/Makefile.am deleted file mode 100755 index fa9a407..0000000 --- a/org.glite.wms-utils.jobid/examples/Makefile.am +++ /dev/null @@ -1,28 +0,0 @@ -## ********************************************************************* -## * -## * Copyright (c) 2002 CERN and INFN on behalf of the EU DataGrid. -## * For license conditions see LICENSE file or -## * http://www.edg.org/license.html -## * -## ********************************************************************* - -STDCPP = -lstdc++ - -JOBID = $(top_builddir)/src/jobid/libglite_wmsutils_cjobid.la - -check_PROGRAMS = testjobid - -testjobid_SOURCES = testjobid.c -testjobid_LDADD = \ - $(JOBID) \ - $(GLITE_WMSUTILS_EXCEPTION_LIBS) \ - $(GLOBUS_SSL_THR_LIBS) \ - $(STDCPP) - -AM_CPPFLAGS = -I$(top_srcdir)/src \ - -I$(top_srcdir)/interface \ - $(GLITE_CFLAGS) \ - $(GLOBUS_THR_CFLAGS) - -MAINTAINERCLEANFILES = Makefile.in *~ - diff --git a/org.glite.wms-utils.jobid/examples/testjobid.c b/org.glite.wms-utils.jobid/examples/testjobid.c deleted file mode 100755 index 56f6cba..0000000 --- a/org.glite.wms-utils.jobid/examples/testjobid.c +++ /dev/null @@ -1,33 +0,0 @@ -/* test code for jobid routines */ - -#include -#include - -#include "glite/wmsutils/jobid/cjobid.h" - -int main(int argc, char* argv[]) -{ - char* ju; - char* bkserver = "ujsa.uhjs"; - - edg_wlc_JobId ji = 0; - edg_wlc_JobId ji2 = 0; - - int r = edg_wlc_JobIdCreate(bkserver, 0, &ji); - printf("Create: %d\n", r); - - ju = edg_wlc_JobIdUnparse(ji); - printf("Unparse: %s\n", ju); - - edg_wlc_JobIdParse(ju, &ji2); - free(ju); - - ju = edg_wlc_JobIdUnparse(ji); - printf("Unparse2: %s\n", ju); - free(ju); - - edg_wlc_JobIdFree(ji); - edg_wlc_JobIdFree(ji2); - - return 0; -} diff --git a/org.glite.wms-utils.jobid/interface/Makefile.am b/org.glite.wms-utils.jobid/interface/Makefile.am deleted file mode 100755 index 8737f19..0000000 --- a/org.glite.wms-utils.jobid/interface/Makefile.am +++ /dev/null @@ -1,16 +0,0 @@ -## ********************************************************************* -## * -## * Copyright (c) 2002 CERN and INFN on behalf of the EU DataGrid. -## * For license conditions see LICENSE file or -## * http://www.edg.org/license.html -## * -## ********************************************************************* - -jobiddir = $(includedir) -nobase_jobid_HEADERS = \ - glite/wmsutils/jobid/cjobid.h \ - glite/wmsutils/jobid/manipulation.h \ - glite/wmsutils/jobid/JobIdExceptions.h \ - glite/wmsutils/jobid/JobId.h - -MAINTAINERCLEANFILES = Makefile.in diff --git a/org.glite.wms-utils.jobid/interface/glite/wmsutils/jobid/JobId.h b/org.glite.wms-utils.jobid/interface/glite/wmsutils/jobid/JobId.h deleted file mode 100755 index 8d0b7b4..0000000 --- a/org.glite.wms-utils.jobid/interface/glite/wmsutils/jobid/JobId.h +++ /dev/null @@ -1,126 +0,0 @@ -#ifndef GLITE_WMSUTILS_JOBID_JOBID_H -#define GLITE_WMSUTILS_JOBID_JOBID_H - -/* - * JobId.h - * Copyright (c) 2001 The European Datagrid Project - IST programme, all rights reserved. - * - */ - -#include -#include - -#include "glite/wmsutils/jobid/cjobid.h" - -typedef struct _edg_wlc_jobid_s* edg_wlc_jobid_t; - -namespace glite { -namespace wmsutils { -namespace jobid { - -/** - * Managing Identification, checking, retreiving info from a job - * File name: JobId.h - * The JobId class provides a representation of the Datagrid job identifier - * (dg_jobId) and the methods for manipulating it. - * We remind that the format of the dg_jobId is as follows: - * :/ - * - * @ingroup common - * @version 0.1 - * @date 15 April 2002 - * @author Alessandro Maraschini */ - -class JobId { -public: - /**@name Constructors/Destructor */ - //@{ - /** Instantiates an empty JobId object */ - JobId() ; - /** - * Instantiates a JobId object from the passed dg_jobId in string format. - * @param job_id_string a string representig a classAd expression - * @throws WrongIdException When a string is passed in a wrong format - */ - JobId(const std::string& job_id_string); - JobId(const JobId&); - JobId(const edg_wlc_JobId&); - /** - * Destructor - * Destroy the Job Id instance - */ - ~JobId() ; - //@} - - /**@name Miscellaneous */ - //@{ - /** Unsets the JobId instance. Clear all it's memebers */ - void clear() ; - /** - * Check wheater the jobId has been already created (true) or not (false) - *@return true (jobId created) or false (jobId not yet created) - */ - bool isSet() { return ( m_JobId != 0 ) ; } - /** - * Set the JobId instance according to the LB and RB server addresses and the unique string passed as input parameters. - * @param lb_server Loggin and Bookkeeping server address - * @param port Loggin and Bookkeeping port ( dafault value is 9000 ) - * @param unique A Unique identification ( automatically generatad by md5 protocol ) - * @throws WrongIdException When one parameter has been passed in a wrong format */ - void setJobId(const std::string& lb_server, int port = 0, const std::string& unique = ""); - //@} - /**@name Get Methods */ - //@{ - /** @return the LB address into its string format - * @throws EmptyIdException If the jobId has not been initialised yet */ - std::string getServer() const; - /** @return the Unique string into its string format - * @throws EmptyIdException If the jobId has not been initialised yet */ - std::string getUnique() const; - //@} - /** This method sets the JobId instance from the JobId in string format given - * as input. - * @param dg_JobId the string representing the job - * @throws WrongIdException When a string is passed in a wrong format */ - void fromString ( const std::string& dg_JobId ); - /** Converts the jobId into a string - @return the string representation of a JobId*/ - std::string toString() const; - /** casting operator */ - operator const edg_wlc_JobId() const { return m_JobId; } - /** Operator "=" create a deep copy of the JobId instance*/ - JobId & operator=(JobId const &); - /** Operator "=" create a deep copy of the JobId instance*/ - JobId & operator=(const edg_wlc_JobId &); - /** Retrieve the internal id reference - *@return the JobId internal reference used by some LB methods */ - edg_wlc_JobId getId() const ; -private: - // This Variable stores the Job unique identification String - edg_wlc_JobId m_JobId; - mutable char* m_pStr; - mutable char* m_pBkserver; - mutable char* m_pUnique; - /** Operator "<"*/ - friend bool operator<(JobId const& lhs, JobId const& rhs); - /** Operator "=="*/ - friend bool operator==(JobId const& lhs, JobId const& rhs); -}; - -inline bool operator<(JobId const& lhs, JobId const& rhs) -{ - return strcmp ( lhs.m_pStr , rhs.m_pStr ) <0 ; -} - -inline bool operator==(JobId const& lhs, JobId const& rhs) -{ -return strcmp ( lhs.m_pStr , rhs.m_pStr ) ==0 ; -} - -std::ostream& operator<<(std::ostream& os, JobId const& id); - -} // namespace jobid -} // namespace wmsutils -} // namespace glite - -#endif // GLITE_WMSUTILS_JOBID_JOBID_H diff --git a/org.glite.wms-utils.jobid/interface/glite/wmsutils/jobid/JobIdExceptions.h b/org.glite.wms-utils.jobid/interface/glite/wmsutils/jobid/JobIdExceptions.h deleted file mode 100755 index 42cbdf4..0000000 --- a/org.glite.wms-utils.jobid/interface/glite/wmsutils/jobid/JobIdExceptions.h +++ /dev/null @@ -1,80 +0,0 @@ -#ifndef GLITE_WMSUTILS_JOBID_EXCEPTIONS_H -#define GLITE_WMSUTILS_JOBID_EXCEPTIONS_H - -/* - * JobIdExceptions.h - * Copyright (c) 2001 The European Datagrid Project - IST programme, all rights reserved. - */ - -#include "glite/wmsutils/exception/Exception.h" - -namespace glite { -namespace wmsutils { -namespace jobid { - -/** - * JobIdException - Exception thrown by JobId Class - * @ingroup Common - * @version 0.1 - * @date 15 April 2002 - * @author Alessandro Maraschini -*/ - -class JobIdException : public glite::wmsutils::exception::Exception { -public: - /** - * Update all mandatory Exception Information - */ - JobIdException (const std::string& file, - int line, - const std::string& method, - int code, - const std::string& exception_name) ; -};//End CLass JobIdException - -/** -* WrongIdFieldException -* This Exception is thrown when a Job Id syntax error is found -* A valid Job Identification string should be made as follows: -* :/ */ -class WrongIdException : public JobIdException { -public: - /** - * Constructor - * @param file - The source file which has generated the Exception - * @param line - The line number in the source file where the Exception has been thrown - * @param method - The Name of the method which has thrown the Exception - * @param code - The Code of the Error raised - * @param field - The wrong expression catched */ - WrongIdException(const std::string& file, - int line, - const std::string& method, - int code ); -}; //End CLass WrongIdException -/** -* EmptyIdException -* This Exception is thrown when the user tries to get information from a JobId -* which has not been initialized yet, i.e tries to use the get Methods -*/ -class EmptyIdException : public JobIdException { -public: - /** - * Constructor - * @param file - The source file which has generated the Exception - * @param line - The line number in the source file where the Exception has been thrown - * @param method - The Name of the method which has thrown the Exception - * @param code - The Code of the Error raised - * @param field - The Empty filed requested for */ - EmptyIdException::EmptyIdException(const std::string& file, - int line, - const std::string& method, - int code , - const std::string& field ); -}; //End CLass EmptyIdException - -} // namespace jobid -} // namespace wmsutils -} // namespace glite - -#endif // GLITE_WMSUTILS_JOBID_EXCEPTIONS_H - diff --git a/org.glite.wms-utils.jobid/interface/glite/wmsutils/jobid/cjobid.h b/org.glite.wms-utils.jobid/interface/glite/wmsutils/jobid/cjobid.h deleted file mode 100755 index e8f84f5..0000000 --- a/org.glite.wms-utils.jobid/interface/glite/wmsutils/jobid/cjobid.h +++ /dev/null @@ -1,109 +0,0 @@ -#ifndef _GLITE_JOBID_H -#define _GLITE_JOBID_H - -/*! - * \file cjobid.h - * \brief L&B consumer API - */ - -#ident "$Header$" - -#ifdef __cplusplus -extern "C" { -#endif - -typedef struct _edg_wlc_JobId *edg_wlc_JobId; - -#define GLITE_WMSC_JOBID_DEFAULT_PORT 9000 /**< Default port where bookkeeping server listens */ -#define GLITE_WMSC_JOBID_PROTO_PREFIX "https://" /**< JobId protocol prefix */ - - -/* All the pointer functions return malloc'ed objects (or NULL on error) */ - -/** - * Create a Job ID. - * See the lb_draft document for details on its construction and components - * \param bkserver book keeping server hostname - * \param port port for the bk service - * \param jobid new created job id - * \ret al 0 success - * \retval EINVAL invalid bkserver - * \retval ENOMEM if memory allocation fails - */ -int edg_wlc_JobIdCreate(const char * bkserver, int port, edg_wlc_JobId * jobid); - -/** - * Recreate a Job ID - * \param bkserver bookkeeping server hostname - * \param port port for the bk service - * \param unique string which represent created jobid (if NULL then new - * one is created) - * \param jobid new created job id - * \retval 0 success - * \retval EINVAL invalid bkserver - * \retval ENOMEM if memory allocation fails - */ -int edg_wlc_JobIdRecreate(const char *bkserver, int port, const char * unique, edg_wlc_JobId * jobid); - -/** - * Create copy of Job ID - * \param in jobid for duplication - * \param jobid duplicated jobid - * \retval 0 for success - * \retval EINVAL invalid jobid - * \retval ENOMEM if memory allocation fails - */ -int edg_wlc_JobIdDup(const edg_wlc_JobId in, edg_wlc_JobId * jobid); - -/* - * Free jobid structure - * \param jobid for dealocation - */ -void edg_wlc_JobIdFree(edg_wlc_JobId jobid); - -/** - * Parse Job ID string and creates jobid structure - * \param jobidstr string representation of jobid - * \param jobid parsed job id - * \retval 0 for success - * \retval EINVAL jobidstr can't be parsed - * \retval ENOMEM if memory allocation fails - */ -int edg_wlc_JobIdParse(const char* jobidstr, edg_wlc_JobId * jobid); - -/** - * Unparse Job ID (produce the string form of JobId). - * \param jobid to be converted to string - * \return allocated string which represents jobid - */ -char* edg_wlc_JobIdUnparse(const edg_wlc_JobId jobid); - -/** - * Extract bookkeeping server address (address:port) - * \param jobid from which the bkserver address should be extracted - * \retval pointer to allocated string with bkserver address - * \retval NULL if jobid is 0 or memory allocation fails - */ -char* edg_wlc_JobIdGetServer(const edg_wlc_JobId jobid); - -/** - * Extract bookkeeping server address and port - * \param jobid from which the bkserver address should be extracted - * \param srvName pointer where to return server name - * \param srvPort pointer where to return server port - * */ -void edg_wlc_JobIdGetServerParts(const edg_wlc_JobId jobid, char **srvName, unsigned int *srvPort); - -/** - * Extract unique string - * \param jobid - * \retval pointer to allocated unique string representing jobid - * \retval NULL if jobid is 0 or memory allocation fails - */ -char* edg_wlc_JobIdGetUnique(const edg_wlc_JobId jobid); - -#ifdef __cplusplus -} -#endif - -#endif /* _GLITE_JOBID_H */ diff --git a/org.glite.wms-utils.jobid/interface/glite/wmsutils/jobid/manipulation.h b/org.glite.wms-utils.jobid/interface/glite/wmsutils/jobid/manipulation.h deleted file mode 100755 index 9f862ae..0000000 --- a/org.glite.wms-utils.jobid/interface/glite/wmsutils/jobid/manipulation.h +++ /dev/null @@ -1,24 +0,0 @@ -#ifndef GLITE_WMSUTILS_JOBID_MANIPULATION_H -#define GLITE_WMSUTILS_JOBID_MANIPULATION_H - -#include - -namespace glite { -namespace wmsutils { -namespace jobid { - -class JobId; - -std::string get_reduced_part( const JobId &id, int level = 0 ); -std::string to_filename( const JobId &id ); -JobId from_filename( const std::string &filename ); - -} // namespace jobid -} // namespace wmsutils -} // namespace glite - -#endif /* GLITE_WMSUTILS_JOBID_MANIPULATION_H */ - -// Local Variables: -// mode: c++ -// End: diff --git a/org.glite.wms-utils.jobid/project/build.number b/org.glite.wms-utils.jobid/project/build.number deleted file mode 100644 index 1acc27a..0000000 --- a/org.glite.wms-utils.jobid/project/build.number +++ /dev/null @@ -1,2 +0,0 @@ -#Sat Oct 15 02:12:40 CEST 2005 -module.build=152 diff --git a/org.glite.wms-utils.jobid/project/build.properties b/org.glite.wms-utils.jobid/project/build.properties deleted file mode 100755 index f5a9095..0000000 --- a/org.glite.wms-utils.jobid/project/build.properties +++ /dev/null @@ -1,2 +0,0 @@ -build.package.summary="files for gLite wms utils jobid" -build.package.description="jobid api" diff --git a/org.glite.wms-utils.jobid/project/configure.properties.xml b/org.glite.wms-utils.jobid/project/configure.properties.xml deleted file mode 100644 index 04d3b17..0000000 --- a/org.glite.wms-utils.jobid/project/configure.properties.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - diff --git a/org.glite.wms-utils.jobid/project/properties.xml b/org.glite.wms-utils.jobid/project/properties.xml deleted file mode 100755 index 9662658..0000000 --- a/org.glite.wms-utils.jobid/project/properties.xml +++ /dev/null @@ -1,86 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/org.glite.wms-utils.jobid/project/version.properties b/org.glite.wms-utils.jobid/project/version.properties deleted file mode 100755 index 40c3916..0000000 --- a/org.glite.wms-utils.jobid/project/version.properties +++ /dev/null @@ -1,2 +0,0 @@ -module.version=3.1.1 -module.age=1 diff --git a/org.glite.wms-utils.jobid/src/Makefile.am b/org.glite.wms-utils.jobid/src/Makefile.am deleted file mode 100755 index 5225c64..0000000 --- a/org.glite.wms-utils.jobid/src/Makefile.am +++ /dev/null @@ -1,12 +0,0 @@ -## ********************************************************************* -## * -## * Copyright (c) 2002 CERN and INFN on behalf of the EU DataGrid. -## * For license conditions see LICENSE file or -## * http://www.edg.org/license.html -## * -## ********************************************************************* - -## Subdirectories list -SUBDIRS = jobid - -MAINTAINERCLEANFILES = Makefile.in diff --git a/org.glite.wms-utils.jobid/src/jobid/JobId.cpp b/org.glite.wms-utils.jobid/src/jobid/JobId.cpp deleted file mode 100755 index 273f9f9..0000000 --- a/org.glite.wms-utils.jobid/src/jobid/JobId.cpp +++ /dev/null @@ -1,183 +0,0 @@ -/* ************************************************************************** - * filename : JobId.cpp - * author : Alessandro Maraschini - * copyright : (C) 2002 by DATAMAT - ***************************************************************************/ - -#include "glite/wmsutils/jobid/JobId.h" - -#include - -#include "glite/wmsutils/jobid/JobIdExceptions.h" - -namespace glite { -namespace wmsutils { -namespace jobid { - -using namespace std ; - -/****************************************************************** - Constructor / Destructor - *******************************************************************/ -JobId::JobId() : m_JobId( 0 ), m_pStr( 0 ), m_pBkserver( 0 ), m_pUnique( 0 ) -{ -} - -JobId::JobId(const std::string& job_id_string ) - : m_JobId( 0 ), m_pStr( 0 ), m_pBkserver( 0 ), m_pUnique( 0 ) -{ - fromString( job_id_string ) ; -} - -JobId::JobId(const JobId &old) -{ - edg_wlc_JobIdDup(old.m_JobId,&m_JobId); - m_pStr = old.m_pStr ? strdup(old.m_pStr) : 0; - m_pBkserver = old.m_pBkserver ? strdup(old.m_pBkserver) : 0; - m_pUnique = old.m_pUnique ? strdup(old.m_pUnique) : 0; -} - -JobId & JobId::operator=(JobId const &old) -{ - clear(); - edg_wlc_JobIdDup(old.m_JobId,&m_JobId); - m_pStr = old.m_pStr ? strdup(old.m_pStr) : 0; - m_pBkserver = old.m_pBkserver ? strdup(old.m_pBkserver) : 0; - m_pUnique = old.m_pUnique ? strdup(old.m_pUnique) : 0; - - return *this; -} - - -JobId::JobId(const edg_wlc_JobId &old) - : m_pStr(0), m_pBkserver(0), m_pUnique(0) -{ - edg_wlc_JobIdDup(old,&m_JobId); -} - - -JobId & JobId::operator=(const edg_wlc_JobId &old) -{ - clear(); - edg_wlc_JobIdDup(old,&m_JobId); - m_pStr = 0; - m_pBkserver = 0; - m_pUnique = 0; - return(*this); -} - -JobId::~JobId() -{ - clear(); -} - -/****************************************************************** - method : clear - unsets the JobId instance. - *******************************************************************/ -void JobId::clear() -{ - if ( m_JobId ) - { - edg_wlc_JobIdFree( m_JobId ); - m_JobId = 0; - if (m_pStr) - free(m_pStr); - if (m_pBkserver) - free(m_pBkserver); - if (m_pUnique) - free(m_pUnique); - m_pStr = m_pBkserver = m_pUnique = NULL; - } -} - - -/****************************************************************** - method : setJobId - sets the JobId instance according to the LB and RB - server addresses and the unique string passed as input parameters. - *******************************************************************/ -void JobId::setJobId(const string& bkserver, int port, const string& unique) -{ - int code = edg_wlc_JobIdRecreate(bkserver.c_str(), port, unique.size() ? unique.c_str() : NULL, &m_JobId) ; - if ( code != 0 ) - throw WrongIdException(__FILE__ , __LINE__ , "setJobId(const string& bkserver, int port, const string& unique)" , code ) ; -} - - -/****************************************************************** - Protected method : fromString - sets the JobId instance from the dg_jobId in string format given as input. - *******************************************************************/ -void JobId::fromString (const string& dg_JobId) -{ - clear(); - int code = edg_wlc_JobIdParse(dg_JobId.c_str(), &m_JobId) ; - if ( code != 0 ) - throw WrongIdException(__FILE__ , __LINE__ , "fromString (const string& dg_JobId)" , code ) ; -} - -/****************************************************************** - method : ToString - converts the JobId instance into its string format. - and put it in the dg_jobId output variable - *******************************************************************/ -std::string JobId::toString() const -{ - if ( m_JobId && !m_pStr ) - m_pStr = edg_wlc_JobIdUnparse(m_JobId) ; - if ( !m_pStr ) - throw EmptyIdException (__FILE__ , __LINE__ ,"toString()" ,ENOENT , "JobId") ; - return m_pStr; -} - -/****************************************************************** - method : getServer - return a string containing the LB server address, - *******************************************************************/ -std::string JobId::getServer() const -{ - if ( m_JobId && !m_pBkserver ) - m_pBkserver = edg_wlc_JobIdGetServer( m_JobId ) ; - - if ( !m_pBkserver ) - throw EmptyIdException (__FILE__ , __LINE__ , "getServer()", ENOENT , "LB server Address") ; - - return m_pBkserver; -} - -/****************************************************************** - method : getUnique - return a string containing unique jobid string - *******************************************************************/ -std::string JobId::getUnique() const -{ - if ( m_JobId && !m_pUnique ) - m_pUnique = edg_wlc_JobIdGetUnique( m_JobId ) ; - - if ( !m_pUnique ) - throw EmptyIdException (__FILE__ , __LINE__ , "getUnique()" , ENOENT , "Unique") ; - - return m_pUnique; -} -/****************************************************************** - method : getId - return the c JobId struct representing this instance - *******************************************************************/ -edg_wlc_JobId JobId::getId() const -{ - edg_wlc_JobId out ; - if ( edg_wlc_JobIdDup(m_JobId, &out) ) - throw EmptyIdException (__FILE__ , __LINE__ , "getId()" , ENOENT , "JobId") ; - return out ; -} - -std::ostream& -operator<<(std::ostream& os, JobId const& id) -{ - return os << id.toString(); -} - -} // namespace jobid -} // namespace wmsutils -} // namespace glite diff --git a/org.glite.wms-utils.jobid/src/jobid/JobIdExceptions.cpp b/org.glite.wms-utils.jobid/src/jobid/JobIdExceptions.cpp deleted file mode 100755 index 6be40b7..0000000 --- a/org.glite.wms-utils.jobid/src/jobid/JobIdExceptions.cpp +++ /dev/null @@ -1,58 +0,0 @@ -/* ************************************************************************** -* filename : JobIdExecptions.cpp -* author : Alessandro Maraschini -* copyright : (C) 2002 by DATAMAT -***************************************************************************/ - -#include "glite/wmsutils/jobid/JobIdExceptions.h" - -namespace glite { -namespace wmsutils { -namespace jobid { - -using namespace std; -using namespace glite::wmsutils::exception; - -/***************************** -* JobIdException -*****************************/ -JobIdException::JobIdException (const string& file, - int line, - const string& method, - int code, - const string& exception_name) - : Exception(file, line, method, code, exception_name) -{ -} - -/***************************** -* WrongIdException -*****************************/ -WrongIdException::WrongIdException(const string& file, - int line, - const string& method, - int code ) - : JobIdException(file, line, method, code, - "WrongIdException") -{ - error_message = "Wrong Field caught while parsing Job Id" ; -} - -/***************************** -* EmptyIdException -*****************************/ -EmptyIdException::EmptyIdException(const string& file, - int line, - const string& method, - int code , - const string& field ) - : JobIdException(file, line, method, code, - "EmptyIdException") -{ - error_message = "Unable to retrieve " + field + ": the instance has not been initialized yet"; -} - -} // namespace jobid -} // namespace wmsutils -} // namespace glite - diff --git a/org.glite.wms-utils.jobid/src/jobid/Makefile.am b/org.glite.wms-utils.jobid/src/jobid/Makefile.am deleted file mode 100755 index 7a23118..0000000 --- a/org.glite.wms-utils.jobid/src/jobid/Makefile.am +++ /dev/null @@ -1,30 +0,0 @@ -## ********************************************************************* -## * -## * Copyright (c) 2002 CERN and INFN on behalf of the EU DataGrid. -## * For license conditions see LICENSE file or -## * http://www.edg.org/license.html -## * -## ********************************************************************* - -lib_LTLIBRARIES = libglite_wmsutils_jobid.la libglite_wmsutils_cjobid.la - -libglite_wmsutils_jobid_la_SOURCES = \ - JobId.cpp \ - JobIdExceptions.cpp \ - manipulation.cpp - -libglite_wmsutils_cjobid_la_SOURCES = \ - cjobid.c \ - strmd5.c - -jobidincludedir = $(includedir)/glite/wmsutils/jobid -jobidinclude_HEADERS = \ - strmd5.h - -AM_CPPFLAGS = -I$(top_srcdir)/src \ - -I$(top_srcdir)/interface \ - $(GLITE_CFLAGS) \ - $(GLOBUS_THR_CFLAGS) \ - -D_GNU_SOURCE - -MAINTAINERCLEANFILES = Makefile.in diff --git a/org.glite.wms-utils.jobid/src/jobid/cjobid.c b/org.glite.wms-utils.jobid/src/jobid/cjobid.c deleted file mode 100755 index 2fa0010..0000000 --- a/org.glite.wms-utils.jobid/src/jobid/cjobid.c +++ /dev/null @@ -1,258 +0,0 @@ -#ident "$Header$" - -#include -#include -#include -#include -#include - -#include -#include -#include - -#include "glite/wmsutils/jobid/cjobid.h" -#include "strmd5.h" - -struct _edg_wlc_JobId { - char *id; /* unique job identification */ - /* additional information */ - char *BShost;/* bookkeeping server hostname */ - unsigned int BSport; /* bookkeeping server port */ - char *info; /* additional information (after ? in URI) */ -}; - -int edg_wlc_JobIdCreate(const char *bkserver, int port, edg_wlc_JobId *jobId) -{ - return edg_wlc_JobIdRecreate(bkserver, port, NULL, jobId); -} - - -int edg_wlc_JobIdRecreate(const char* bkserver, int port, const char *unique, edg_wlc_JobId *jobId) -{ - edg_wlc_JobId out; - char hostname[200]; /* used to hold string for encrypt */ - struct timeval tv; - int skip; - char* portbeg; - - struct hostent* he; - - if (!bkserver) - return EINVAL; - - if (unique == NULL) { - gethostname(hostname, 100); - he = gethostbyname(hostname); - assert(he->h_length > 0); - gettimeofday(&tv, NULL); - srandom(tv.tv_usec); - - skip = strlen(hostname); - skip += sprintf(hostname + skip, "-IP:0x%x-pid:%d-rnd:%d-time:%d:%d", - *((int*)he->h_addr_list[0]), getpid(), (int)random(), - (int)tv.tv_sec, (int)tv.tv_usec); - } - - *jobId = NULL; - out = (edg_wlc_JobId) malloc (sizeof(*out)); - if (!out) - return ENOMEM; - - memset(out, 0, sizeof(*out)); - - /* check if it begins with prefix */ - /* unsupported */ - if (strncmp(bkserver, GLITE_WMSC_JOBID_PROTO_PREFIX, sizeof(GLITE_WMSC_JOBID_PROTO_PREFIX)-1) == 0) - return EINVAL; - - out->BShost = strdup(bkserver); - portbeg = strchr(out->BShost, ':'); - if (portbeg) { - *portbeg = 0; - /* try to get port number */ - if (port == 0) - port = atoi(portbeg + 1); - } - - if (port == 0) - port = GLITE_WMSC_JOBID_DEFAULT_PORT; - - out->BSport = port; - - out->id = (unique) ? strdup(unique) : str2md5base64(hostname); - //printf("Encrypt: %s\nBASE64 %s\n", hostname, out->id); - - if (!out->id || !out->BShost) { - edg_wlc_JobIdFree(out); - return ENOMEM; - } - - *jobId = out; - return 0; -} - - -int edg_wlc_JobIdDup(const edg_wlc_JobId in, edg_wlc_JobId *out) -{ - edg_wlc_JobId jid; - *out = NULL; - if (in == NULL) - return 0; - - jid = malloc(sizeof(*jid)); - if (!jid) - return ENOMEM; - - memset(jid, 0,sizeof(*jid)); - jid->BShost = strdup(in->BShost); - jid->id = strdup(in->id); - if (in->info) - jid->info = strdup(in->info); - - if (jid->BShost == NULL || jid->id == NULL) { - edg_wlc_JobIdFree(jid); - return ENOMEM; - } - - jid->BSport = in->BSport; - *out = jid; - return 0; -} - - -// XXX -// use recreate -// parse name, port, unique -int edg_wlc_JobIdParse(const char *idString, edg_wlc_JobId *jobId) -{ - char *pom, *pom1, *pom2; - edg_wlc_JobId out; - - *jobId = NULL; - - out = (edg_wlc_JobId) malloc (sizeof(*out)); - if (out == NULL ) - return ENOMEM; - - memset(out,0,sizeof(*out)); - - if (strncmp(idString, GLITE_WMSC_JOBID_PROTO_PREFIX, sizeof(GLITE_WMSC_JOBID_PROTO_PREFIX) - 1)) { - out->BShost = (char *) NULL; - out->BSport = 0; - - free(out); - return EINVAL; - } - - pom = strdup(idString + sizeof(GLITE_WMSC_JOBID_PROTO_PREFIX) - 1); - pom1 = strchr(pom, '/'); - pom2 = strchr(pom, ':'); - - if (!pom1) { free(pom); free(out); return EINVAL; } - - if ( pom2 && (pom1 > pom2)) { - pom[pom2-pom] = '\0'; - out->BShost = strdup(pom); - pom[pom1-pom] = '\0'; - out->BSport = (unsigned int) strtoul(pom2 + 1,NULL,10); - } else { - pom[pom1-pom] = '\0'; - out->BShost = strdup(pom); - out->BSport = GLITE_WMSC_JOBID_DEFAULT_PORT; - } - - /* XXX: localhost not supported in jobid - if (!strncmp(out->BShost,"localhost",9) { - free(pom); - free(out->BShost); - free(out); - return EINVAL; - } - */ - - /* additional info from URI */ - pom2 = strchr(pom1+1,'?'); - if (pom2) { - *pom2 = 0; - out->info = strdup(pom2+1); - } - - /* extract the unique part */ - out->id = strdup(pom1+1); - - for (pom1 = out->BShost; *pom1; pom1++) - if (isspace(*pom1)) break; - - for (pom2 = out->id; *pom2; pom2++) - if (isspace(*pom2)) break; - - if (*pom1 || *pom2) { - free(pom); - edg_wlc_JobIdFree(out); - return EINVAL; - } - - free(pom); - *jobId = out; - return 0; -} - - -void edg_wlc_JobIdFree(edg_wlc_JobId job) -{ - if (job) { - free(job->id); - free(job->BShost); - free(job->info); - free(job); - } -} - - -char* edg_wlc_JobIdUnparse(const edg_wlc_JobId jobid) -{ - char *out, port[40]; - - if (!jobid) - return NULL; - - if (jobid->BSport) - sprintf(port,":%d",jobid->BSport); - else - *port = 0; - - asprintf(&out, GLITE_WMSC_JOBID_PROTO_PREFIX"%s%s/%s%s%s", - jobid->BShost,port, - jobid->id, - (jobid->info ? "?" : ""), - (jobid->info ? jobid->info : "")); - - return out; -} - - -char* edg_wlc_JobIdGetServer(const edg_wlc_JobId jobid) -{ - char *bs = NULL; - - if (jobid) - asprintf(&bs, "%s:%u", jobid->BShost, - jobid->BSport ? jobid->BSport : GLITE_WMSC_JOBID_DEFAULT_PORT); - - return bs; -} - - -void edg_wlc_JobIdGetServerParts(const edg_wlc_JobId jobid, char **srvName, unsigned int *srvPort) -{ - if (jobid) { - *srvName = strdup(jobid->BShost); - *srvPort = jobid->BSport ? jobid->BSport : GLITE_WMSC_JOBID_DEFAULT_PORT; - } -} - - -char* edg_wlc_JobIdGetUnique(const edg_wlc_JobId jobid) -{ - return jobid ? strdup(jobid->id) : NULL; -} diff --git a/org.glite.wms-utils.jobid/src/jobid/manipulation.cpp b/org.glite.wms-utils.jobid/src/jobid/manipulation.cpp deleted file mode 100755 index cf3a710..0000000 --- a/org.glite.wms-utils.jobid/src/jobid/manipulation.cpp +++ /dev/null @@ -1,180 +0,0 @@ -#include - -#include -#include - -#include "glite/wmsutils/jobid/JobId.h" - -using namespace std; - -namespace glite { -namespace wmsutils { -namespace jobid { - -namespace { - -class HexInt { -public: - HexInt( unsigned int i = 0 ); - HexInt( const string &str ); - HexInt( string::const_iterator begin, string::const_iterator end ); - ~HexInt( void ); - - inline operator unsigned int( void ) const { return this->hi_int; } - inline operator const string &( void ) const { return this->hi_str; } - - static unsigned int least( void ) { return hi_s_least; } - static void least( unsigned int least ) { hi_s_least = least; } - -private: - void parseString( void ); - - unsigned int hi_int; - string hi_str; - - static unsigned int hi_s_least; - static const char *hi_s_map; -}; - -class BadChar { -public: - BadChar( void ); - ~BadChar( void ); - - inline bool operator()( char c ) - { return( !(((c >= 'a') && (c <= 'z')) || ((c >= 'A') && (c <= 'Z')) || ((c >= '0') && (c <= '9')) || - (c == '.') || (c == '-') || (c == ' ')) ); } -}; - -unsigned int HexInt::hi_s_least = 2; -const char *HexInt::hi_s_map = "0123456789abcdef"; - -HexInt::HexInt( unsigned int ui ) : hi_int( ui ), hi_str( hi_s_least, '0' ) -{ - int n; - string::reverse_iterator pos = this->hi_str.rbegin(); - - while( ui != 0 ) { - n = ui % 16; - if( pos != this->hi_str.rend() ) { - *pos = hi_s_map[n]; - pos += 1; - } - else this->hi_str.insert( this->hi_str.begin(), hi_s_map[n] ); - - ui /= 16; - } - - if( this->hi_str.length() < hi_s_least ) - this->hi_str.insert( this->hi_str.begin(), (hi_s_least - this->hi_str.length()), '0' ); -} - -HexInt::HexInt( const string &str ) : hi_int( 0 ), hi_str( str ) -{ - this->parseString(); -} - -HexInt::HexInt( string::const_iterator begin, string::const_iterator end ) : hi_int( 0 ), hi_str( begin, end ) -{ - this->parseString(); -} - -void HexInt::parseString( void ) -{ - int hexbase; - char *pos, *end = (char *) hi_s_map + 16; - string::reverse_iterator it; - - for( it = this->hi_str.rbegin(), hexbase = 1; it != this->hi_str.rend(); ++it, hexbase *= 16 ) { - pos = find( (char *) hi_s_map, end, (char) tolower(*it) ); - - if( pos != end ) this->hi_int += hexbase * (pos - hi_s_map); - else { - this->hi_int = 0; - break; - } - } - - return; -} - -HexInt::~HexInt( void ) {} - -BadChar::BadChar( void ) {} - -BadChar::~BadChar( void ) {} - -/* - Helper function for the get_reduced_part(...) -*/ -string get_reduced_part_internal( const string &unique, int level ) -{ - string::size_type length = unique.length(); - string piece( unique.substr(0, 2) ), answer; - - if( (level == 0) || (length <= 2) ) answer.assign( piece ); - else if( length != 0 ) { - answer.assign( piece ); - answer.append( 1, '/' ); - answer.append( get_reduced_part_internal(unique.substr(2, length - 2), level - 1) ); - } - - return answer; -} - -}; // Unnamed namespace - -string get_reduced_part( const JobId &id, int level ) -{ - return get_reduced_part_internal( id.getUnique(), level ); -} - -string to_filename( const JobId &id ) -{ - string sid( id.toString() ), coded; - string::iterator last, next; - - last = sid.begin(); - do { - next = find_if( last, sid.end(), BadChar() ); - - if( next != sid.end() ) { - if( last != next ) coded.append( last, next ); - coded.append( 1, '_' ); - coded.append( HexInt(*next) ); - - last = next + 1; - } - else coded.append( last, sid.end() ); - } while( next != sid.end() ); - - return coded; -} - -JobId from_filename( const string &filename ) -{ - char c; - string decoded; - string::const_iterator last, next; - - last = filename.begin(); - do { - next = find( last, filename.end(), '_' ); - - if( next != filename.end() ) { - c = HexInt( next + 1, next + 3 ); - - if( last != next ) decoded.append( last, next ); - decoded.append( 1, c ); - - last = next + 3; - } - else decoded.append( last, filename.end() ); - } while( next != filename.end() ); - - return JobId( decoded ); -} - -} // namespace jobid -} // namespace wmsutils -} // namespace glite diff --git a/org.glite.wms-utils.jobid/src/jobid/strmd5.c b/org.glite.wms-utils.jobid/src/jobid/strmd5.c deleted file mode 100755 index 0433f55..0000000 --- a/org.glite.wms-utils.jobid/src/jobid/strmd5.c +++ /dev/null @@ -1,118 +0,0 @@ -#ident "$Header$" - -#include -#include -#include -#include - -#include "jobid/strmd5.h" - -#warning Thread unsafe! -static char mbuf[33]; - -static int base64_encode(const void *enc, int enc_size, char *out, int out_max_size) -{ - static const char* b64 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"; - - unsigned char* enc_buf = (unsigned char*)enc; - int out_size = 0; - unsigned int bits = 0; - unsigned int shift = 0; - - while ( out_size < out_max_size ) { - if ( enc_size>0 ) { - // Shift in byte - bits <<= 8; - bits |= *enc_buf; - shift += 8; - // Next byte - enc_buf++; - enc_size--; - } else if ( shift>0 ) { - // Pad last bits to 6 bits - will end next loop - bits <<= 6 - shift; - shift = 6; - } else { - // Terminate with Mime style '=' - *out = '='; - out_size++; - - return out_size; - } - - // Encode 6 bit segments - while ( shift>=6 ) { - shift -= 6; - *out = b64[ (bits >> shift) & 0x3F ]; - out++; - out_size++; - } - } - - // Output overflow - return -1; -} - -char *strmd5(const char *s, unsigned char *digest) -{ - MD5_CTX md5; - unsigned char d[16]; - int i; - - MD5_Init(&md5); - MD5_Update(&md5,s,strlen(s)); - MD5_Final(d,&md5); - - if (digest) memcpy(digest,d,sizeof(d)); - - for (i=0; i<16; i++) { - int dd = d[i] & 0x0f; - mbuf[2*i+1] = dd<10 ? dd+'0' : dd-10+'a'; - dd = d[i] >> 4; - mbuf[2*i] = dd<10 ? dd+'0' : dd-10+'a'; - } - mbuf[32] = 0; - return (char *) mbuf; -} - -char *str2md5(const char *s) -{ - MD5_CTX md5; - unsigned char d[16]; - char* ret = malloc(33); - int i; - - if (!ret) - return NULL; - - MD5_Init(&md5); - MD5_Update(&md5, s, strlen(s)); - MD5_Final(d, &md5); - - for (i=0; i<16; i++) { - int dd = d[i] & 0x0f; - ret[2*i+1] = dd<10 ? dd+'0' : dd-10+'a'; - dd = d[i] >> 4; - ret[2*i] = dd<10 ? dd+'0' : dd-10+'a'; - } - ret[32] = 0; - return ret; -} - -char *str2md5base64(const char *s) -{ - MD5_CTX md5; - unsigned char d[16]; - char buf[50]; - int l; - - MD5_Init(&md5); - MD5_Update(&md5, s, strlen(s)); - MD5_Final(d, &md5); - - l = base64_encode(d, 16, buf, sizeof(buf) - 1); - if (l < 1) - return NULL; - buf[l - 1] = 0; - return strdup(buf); -} diff --git a/org.glite.wms-utils.jobid/src/jobid/strmd5.h b/org.glite.wms-utils.jobid/src/jobid/strmd5.h deleted file mode 100755 index c5d76b6..0000000 --- a/org.glite.wms-utils.jobid/src/jobid/strmd5.h +++ /dev/null @@ -1,28 +0,0 @@ -#ifndef _GLITE_STRMD5_H -#define _GLITE_STRMD5_H - -#ident "$Header$" - -/* Compute MD5 sum of the first argument. - * The sum is returned in the 16-byte array pointed to by 2nd argument - * (if not NULL) - * - * Return value: ASCII string of the sum, i.e. 32 characters [0-9a-f] - * (pointer to static area, changed by subsequent calls) - */ - -char *strmd5(const char *src, unsigned char *dst); - -/** - * Returns: allocated 32bytes long ASCII string with md5 sum - * of the first argument - */ -char *str2md5(const char *src); - -/** - * Returns: allocated 22bytes long ASCII string with md5 sum in base64 - * format of the source argument - */ -char *str2md5base64(const char *src); - -#endif /* _GLITE_STRMD5_H */ diff --git a/org.glite.wms-utils.jobid/test/Makefile.am b/org.glite.wms-utils.jobid/test/Makefile.am deleted file mode 100755 index 5111c30..0000000 --- a/org.glite.wms-utils.jobid/test/Makefile.am +++ /dev/null @@ -1,48 +0,0 @@ -## ********************************************************************* -## * -## * Copyright (c) 2002 CERN and INFN on behalf of the EU DataGrid. -## * For license conditions see LICENSE file or -## * http://www.edg.org/license.html -## * -## ********************************************************************* - -JOBID_LIBS = $(top_builddir)/src/jobid/libglite_wmsutils_jobid.la -CJOBID_LIBS = $(top_builddir)/src/jobid/libglite_wmsutils_cjobid.la - -TESTS = glite-wmsutils-jobid \ - glite-wmsutils-manipulation - -check_PROGRAMS = $(TESTS) - -glite_wmsutils_jobid_SOURCES = jobid_cu_suite.cpp \ - jobid_cu_suite.h \ - jobid_cu_main.cpp - -glite_wmsutils_jobid_LDADD = \ - $(GLITE_WMSUTILS_EXCEPTION_LIBS) \ - $(GLOBUS_GSS_THR_LIBS) \ - $(CPPUNIT_LIBS) \ - $(JOBID_LIBS) \ - $(CJOBID_LIBS) - -glite_wmsutils_manipulation_SOURCES = manipulation_cu_suite.cpp \ - manipulation_cu_suite.h \ - manipulation_cu_main.cpp - -glite_wmsutils_manipulation_LDADD = \ - $(GLITE_WMSUTILS_EXCEPTION_LIBS) \ - $(GLOBUS_GSS_THR_LIBS) \ - $(CPPUNIT_LIBS) \ - $(JOBID_LIBS) \ - $(CJOBID_LIBS) - - -AM_CPPFLAGS = -I$(top_srcdir)/interface \ - -I$(top_srcdir)/src \ - -I$(top_srcdir)/test \ - $(GLITE_CFLAGS) \ - $(GLOBUS_THR_CFLAGS) \ - $(CPPUNIT_CFLAGS) - -MAINTAINERCLEANFILES = Makefile.in *~ - diff --git a/org.glite.wms-utils.jobid/test/jobid_cu_main.cpp b/org.glite.wms-utils.jobid/test/jobid_cu_main.cpp deleted file mode 100644 index 770e306..0000000 --- a/org.glite.wms-utils.jobid/test/jobid_cu_main.cpp +++ /dev/null @@ -1,33 +0,0 @@ -#include -#include - -#include "jobid_cu_suite.h" - -#include -#include -#include -#include -#include - -using namespace CppUnit; -using namespace std; - -int main (int argc , char** argv) -{ - std::ofstream xml("./cppUnit_output.xml",ios::app); - - CppUnit::TestResult controller; - CppUnit::TestResultCollector result; - controller.addListener( &result ); - - TestRunner runner; - runner.addTest(Jobid_test::suite()); - runner.run(controller); - - CppUnit::XmlOutputter outputter( &result, xml ); - CppUnit::TextOutputter outputter2( &result, std::cerr ); - outputter.write(); - outputter2.write(); - - return result.wasSuccessful() ? 0 : 1 ; -} diff --git a/org.glite.wms-utils.jobid/test/jobid_cu_suite.cpp b/org.glite.wms-utils.jobid/test/jobid_cu_suite.cpp deleted file mode 100644 index ebe04da..0000000 --- a/org.glite.wms-utils.jobid/test/jobid_cu_suite.cpp +++ /dev/null @@ -1,102 +0,0 @@ -#include "jobid_cu_suite.h" - - -using namespace CppUnit; -using namespace std; -using namespace glite::wmsutils::jobid; - - -void Jobid_test::setUp() -{} - -void Jobid_test::tearDown() -{} - -void Jobid_test::Constructor_case() -{ - //EMPTY CONSTRUCTOR - JobId empty; - - CPPUNIT_ASSERT(empty.isSet()==false); - - //create a string with cjobid - string bkserver="grid012g.cnaf.infn.it"; - edg_wlc_JobId jobid; - int bkport=6000; - int ok=edg_wlc_JobIdCreate(bkserver.c_str(), bkport, &jobid); - CPPUNIT_ASSERT(ok == 0); - if (ok==0) - { - string jobstring=edg_wlc_JobIdUnparse(jobid); - - //STRING CONSTRUCTOR - JobId stringCons(jobstring); - - //EDG_WLC CONSTRUCTOR - JobId edg_wlc_Cons(jobid); - - //test copy constructor - JobId copycon(stringCons); - - CPPUNIT_ASSERT(stringCons.isSet()); - CPPUNIT_ASSERT(edg_wlc_Cons.isSet()); - CPPUNIT_ASSERT(copycon.isSet()); - - //test = - JobId testequal; - testequal=stringCons; - CPPUNIT_ASSERT(testequal.isSet()); - - JobId testoperator; - testoperator=jobid; - CPPUNIT_ASSERT(testoperator.isSet()); - - edg_wlc_JobId testget = edg_wlc_Cons.getId(); - char *server; - unsigned int port; - edg_wlc_JobIdGetServerParts(testget, &server, &port); - string serverstring = server; - CPPUNIT_ASSERT(port==bkport); - CPPUNIT_ASSERT(serverstring==bkserver); - } - - CPPUNIT_ASSERT_THROW( JobId stringwrong("grid012"), WrongIdException); -} - -void Jobid_test::Clear_case() -{ - JobId *element; - string jobstring="https://grid012g.cnaf.infn.it:6000/qaKyEoV3G144rmoyXeW6QA"; - CPPUNIT_ASSERT_NO_THROW(element= new JobId(jobstring)); - - CPPUNIT_ASSERT(element->isSet()); - element->clear(); - CPPUNIT_ASSERT(element->isSet()==false); - delete element; -} - -void Jobid_test::SetandGet_case() -{ - JobId element; - string lbserver="grid012g.cnaf.infn.it"; - int port=6000; - string unique ="qaKyEoV3G144rmoyXeW6QA"; - element.setJobId(lbserver, port, unique); - - string server=element.getServer(); - lbserver=lbserver+":6000"; - - CPPUNIT_ASSERT(server==lbserver); - string lonely=element.getUnique(); - CPPUNIT_ASSERT(lonely==unique); - - string descr=element.toString(); - cout << "!!! BEGIN TEST toString() METHOD!!!"<< endl; - cout << descr < -#include -#include - -#include - -#include "glite/wmsutils/jobid/JobId.h" -#include "glite/wmsutils/jobid/cjobid.h" -#include "glite/wmsutils/jobid/JobIdExceptions.h" - -class Jobid_test : public CppUnit::TestFixture { - - CPPUNIT_TEST_SUITE(Jobid_test); - - CPPUNIT_TEST(Constructor_case); - CPPUNIT_TEST(Clear_case); - CPPUNIT_TEST(SetandGet_case); - - CPPUNIT_TEST_SUITE_END(); - - -public: - - void setUp(); - void tearDown(); - - void Constructor_case(); - void Clear_case(); - void SetandGet_case(); - -}; - - - diff --git a/org.glite.wms-utils.jobid/test/manipulation_cu_main.cpp b/org.glite.wms-utils.jobid/test/manipulation_cu_main.cpp deleted file mode 100644 index 07d2914..0000000 --- a/org.glite.wms-utils.jobid/test/manipulation_cu_main.cpp +++ /dev/null @@ -1,33 +0,0 @@ -#include -#include - -#include "manipulation_cu_suite.h" - -#include -#include -#include -#include -#include - -using namespace CppUnit; -using namespace std; - -int main (int argc , char** argv) -{ - std::ofstream xml("./cppUnit_output.xml",ios::app); - - CppUnit::TestResult controller; - CppUnit::TestResultCollector result; - controller.addListener( &result ); - - TestRunner runner; - runner.addTest(Manipulation_test::suite()); - runner.run(controller); - - CppUnit::XmlOutputter outputter( &result, xml ); - CppUnit::TextOutputter outputter2( &result, std::cerr ); - outputter.write(); - outputter2.write(); - - return result.wasSuccessful() ? 0 : 1 ; -} diff --git a/org.glite.wms-utils.jobid/test/manipulation_cu_suite.cpp b/org.glite.wms-utils.jobid/test/manipulation_cu_suite.cpp deleted file mode 100644 index a6a69d8..0000000 --- a/org.glite.wms-utils.jobid/test/manipulation_cu_suite.cpp +++ /dev/null @@ -1,34 +0,0 @@ -#include "manipulation_cu_suite.h" - - -using namespace CppUnit; -using namespace std; -using namespace glite::wmsutils::jobid; - - -void Manipulation_test::setUp() -{} - -void Manipulation_test::tearDown() -{} - -void Manipulation_test::to_fromfile_case() -{ - JobId element; - - string lbserver="grid012g.cnaf.infn.it"; - int port=6000; - string unique ="qaKyEoV3G144rmoyXeW6QA"; - element.setJobId(lbserver, port, unique); - - string filename=to_filename(element); - - JobId newelement = from_filename(filename); - - string reduced = get_reduced_part(element, 7); - - string newreduced = get_reduced_part(newelement, 7); - - CPPUNIT_ASSERT(reduced==newreduced); -} - diff --git a/org.glite.wms-utils.jobid/test/manipulation_cu_suite.h b/org.glite.wms-utils.jobid/test/manipulation_cu_suite.h deleted file mode 100644 index 287b902..0000000 --- a/org.glite.wms-utils.jobid/test/manipulation_cu_suite.h +++ /dev/null @@ -1,29 +0,0 @@ -#include -#include -#include - -#include - -#include "glite/wmsutils/jobid/JobId.h" -#include "glite/wmsutils/jobid/manipulation.h" - -class Manipulation_test : public CppUnit::TestFixture { - - CPPUNIT_TEST_SUITE(Manipulation_test); - - CPPUNIT_TEST(to_fromfile_case); - - CPPUNIT_TEST_SUITE_END(); - - -public: - - void setUp(); - void tearDown(); - - void to_fromfile_case(); - -}; - - - diff --git a/org.glite.yaim.lb/.cvsignore b/org.glite.yaim.lb/.cvsignore deleted file mode 100644 index 3a4edf6..0000000 --- a/org.glite.yaim.lb/.cvsignore +++ /dev/null @@ -1 +0,0 @@ -.project diff --git a/org.glite.yaim.lb/Makefile b/org.glite.yaim.lb/Makefile deleted file mode 100644 index 70f2228..0000000 --- a/org.glite.yaim.lb/Makefile +++ /dev/null @@ -1,76 +0,0 @@ -PACKAGE_NAME=glite-yaim-lb -#################################################################### -# Distribution Makefile -#################################################################### - -.PHONY: configure install clean - -all: configure - -#################################################################### -# Prepare -#################################################################### - -prepare: - rm -f *~ functions/*~ scripts/*~ examples/*~ - @mkdir -p $(prefix)/doc/html/web - @mkdir -p $(prefix)/doc/man - -#################################################################### -# Configure -#################################################################### - -configure: - @echo "No configuration required, use either 'make install' or 'make rpm'." - -#################################################################### -# Compile -#################################################################### - -compile: - @echo "No compiling required, use either 'make install' or 'make rpm'." - -#################################################################### -# Install -#################################################################### - -install: - @echo installing ... - @mkdir -p $(prefix)/yaim/functions - @mkdir -p $(prefix)/yaim/node-info.d - @install -m 0644 config/functions/* $(prefix)/yaim/functions - @install -m 0644 config/node-info.d/* $(prefix)/yaim/node-info.d - -#################################################################### -# Documentation -#################################################################### - -doc: man html - -man: prepare - -html: prepare - -web: html - -#################################################################### -# Install Doc -#################################################################### - -install-doc: doc - @echo installing docs... - -#################################################################### -# Build Distribution -#################################################################### - -dist: prepare - @tar --gzip --exclude='*CVS*' -cf build/$(PACKAGE_NAME).src.tgz config doc examples src - -rpm: dist - @rpmbuild -ta build/$(PACKAGE_NAME).src.tgz - -clean:: - rm -f *~ test/*~ etc/*~ doc/*~ src/*~ $(PACKAGE_NAME).src.tgz - rm -rf build ${prefix} - diff --git a/org.glite.yaim.lb/config/functions/config_glite_lb b/org.glite.yaim.lb/config/functions/config_glite_lb deleted file mode 100644 index b530c71..0000000 --- a/org.glite.yaim.lb/config/functions/config_glite_lb +++ /dev/null @@ -1,116 +0,0 @@ -function config_glite_lb_check(){ - requires MYSQL_PASSWORD -} - -function config_glite_lb_setenv(){ - yaimgridenv_set GLITE_LOCATION ${INSTALL_ROOT:-opt}/glite - yaimgridenv_set GLITE_LOCATION_VAR /var/glite - yaimgridenv_set GLITE_USER ${GLITE_USER:-glite} - yaimgridenv_set GLITE_WMS_QUERY_TIMEOUT 300 - yaimgridenv_set GLITE_HOST_CERT /home/glite/.certs/hostcert.pem - yaimgridenv_set GLITE_HOST_KEY /home/glite/.certs/hostkey.pem - yaimgridenv_set X509_CERT_DIR /etc/grid-security/certificates - yaimgridenv_set X509_VOMS_DIR /etc/grid-security/vomsdir - - yaimgridpath_append LD_LIBRARY_PATH /opt/c-ares/lib -} - -function config_glite_lb() { - - #return 0 - #echo "I am not here" - ############################################# - # Logging and Bookkeeping configuration # - ############################################# - - INSTALL_ROOT=${INSTALL_ROOT:-/opt} - HOSTNAME=`hostname -f` - - # add option --max_allowed_packet=17M - if [ ! -f /etc/my.cnf ]; then - echo "[mysqld]" >> /etc/my.cnf - echo "max_allowed_packet=17M" >> /etc/my.cnf - else - grep "^[mysqld]" /etc/my.cnf > /dev/null - if [ ! $? = 0 ]; then - echo "[mysqld]" >> /etc/my.cnf - echo "max_allowed_packet=17M" >> /etc/my.cnf - fi - fi - - /sbin/chkconfig mysql on - ps ax | grep -v grep |grep mysqld_safe > /dev/null 2>&1 - if [ ! $? = 0 ] ; then - /etc/init.d/mysql start - sleep 1 - fi - - ls /tmp/mysql.sock > /dev/null 2>&1 - if [ ! $? = 0 ]; then - ln -s /var/lib/mysql/mysql.sock /tmp/mysql.sock - fi - - # set mysql password - set_mysql_passwd || return 1 # the function uses $MYSQL_PASSWORD - - # Check if database exist - mysqlshow --password="$MYSQL_PASSWORD" | grep "lbserver20" > /dev/null 2>&1 - - if [ ! $? = 0 ]; then - mysql -u root --password="$MYSQL_PASSWORD" -e "CREATE DATABASE lbserver20" - mysql --password="$MYSQL_PASSWORD" lbserver20 < ${INSTALL_ROOT}/glite/etc/glite-lb-dbsetup.sql - mysql -u root --password="$MYSQL_PASSWORD" -e "GRANT ALL PRIVILEGES on lbserver20.* to lbserver IDENTIFIED BY '' WITH GRANT OPTION;" - mysql -u root --password="$MYSQL_PASSWORD" -e "GRANT ALL PRIVILEGES on lbserver20.* to lbserver@'$HOSTNAME' IDENTIFIED BY '' WITH GRANT OPTION;" - mysql -u root --password="$MYSQL_PASSWORD" -e "GRANT ALL PRIVILEGES on lbserver20.* to lbserver@localhost IDENTIFIED BY '' WITH GRANT OPTION;" - else - yaimlog "Database lbserver20 already exists" - fi - - # do we need bkindex? - - GLITE_USER=${GLITE_USER:-glite} - GLITE_USER_HOME=${GLITE_USER_HOME:-/home/glite} - - if ( ! id $GLITE_USER > /dev/null 2>&1 ); then - useradd -p "*NP*" -r -c "gLite User" -m $GLITE_USER - chown $GLITE_USER:$GLITE_USER $GLITE_USER_HOME - fi - - GLITE_LOCATION_VAR=${GLITE_LOCATION_VAR:-/var/glite} - chown $GLITE_USER:$GLITE_USER $GLITE_LOCATION_VAR - chmod 0755 $GLITE_LOCATION_VAR - - mkdir -p $GLITE_USER_HOME/.certs - chown $GLITE_USER:$GLITE_USER $GLITE_USER_HOME/.certs - chmod 0755 $GLITE_USER_HOME/.certs - cp -f /etc/grid-security/hostcert.pem /etc/grid-security/hostkey.pem $GLITE_USER_HOME/.certs/ - if [ ! $? = 0 ] ; then - echo "Please copy host certificate and key into /etc/grid-security and" - echo " $GLITE_USER_HOME/.certs/, change the owner of the ones in" - echo " $GLITE_USER_HOME/.certs/ to $GLITE_USER" - fi - chown $GLITE_USER:$GLITE_USER $GLITE_USER_HOME/.certs/hostcert.pem $GLITE_USER_HOME/.certs/hostkey.pem - chmod 0644 $GLITE_USER_HOME/.certs/hostcert.pem - chmod 0400 $GLITE_USER_HOME/.certs/hostkey.pem - - # Start services - if [ ! -f ${GLITE_LOCATION}/etc/gLiteservices ] ; then - touch ${GLITE_LOCATION}/etc/gLiteservices - fi - - grep glite-lb-bkserverd ${GLITE_LOCATION}/etc/gLiteservices > /dev/null - if [ ! $? = 0 ] ; then - echo "${GLITE_LOCATION}/etc/init.d/glite-lb-bkserverd" >> ${GLITE_LOCATION}/etc/gLiteservices - fi - - echo ". /opt/glite/yaim/etc/grid-env-funcs.sh" > /etc/profile.d/aaa.sh # I hate this - . /opt/glite/yaim/etc/grid-env-funcs.sh - - . /opt/glite/etc/profile.d/grid-env.sh - ${GLITE_LOCATION}/etc/init.d/glite-lb-bkserverd restart - - rm -f /etc/profile.d/aaa.sh - - return 0 - -} diff --git a/org.glite.yaim.lb/config/node-info.d/glite-lb b/org.glite.yaim.lb/config/node-info.d/glite-lb deleted file mode 100644 index 87bdc32..0000000 --- a/org.glite.yaim.lb/config/node-info.d/glite-lb +++ /dev/null @@ -1,14 +0,0 @@ -LB_FUNCTIONS=" -config_crl -config_host_certs -config_edgusers -config_users -config_mkgridmap -config_java -config_rgma_client -config_bdii -config_gip_service -config_globus -config_glite_lb -config_glite_locallogger -config_add_pool_env" diff --git a/org.glite.yaim.myproxy/.cvsignore b/org.glite.yaim.myproxy/.cvsignore deleted file mode 100644 index 3a4edf6..0000000 --- a/org.glite.yaim.myproxy/.cvsignore +++ /dev/null @@ -1 +0,0 @@ -.project diff --git a/org.glite.yaim.myproxy/Makefile b/org.glite.yaim.myproxy/Makefile deleted file mode 100644 index 963f0a5..0000000 --- a/org.glite.yaim.myproxy/Makefile +++ /dev/null @@ -1,76 +0,0 @@ -PACKAGE_NAME=glite-yaim-myproxy -#################################################################### -# Distribution Makefile -#################################################################### - -.PHONY: configure install clean - -all: configure - -#################################################################### -# Prepare -#################################################################### - -prepare: - rm -f *~ functions/*~ scripts/*~ examples/*~ - @mkdir -p $(prefix)/doc/html/web - @mkdir -p $(prefix)/doc/man - -#################################################################### -# Configure -#################################################################### - -configure: - @echo "No configuration required, use either 'make install' or 'make rpm'." - -#################################################################### -# Compile -#################################################################### - -compile: - @echo "No compiling required, use either 'make install' or 'make rpm'." - -#################################################################### -# Install -#################################################################### - -install: - @echo installing ... - @mkdir -p $(prefix)/yaim/functions - @mkdir -p $(prefix)/yaim/node-info.d - @install -m 0644 config/functions/* $(prefix)/yaim/functions - @install -m 0644 config/node-info.d/* $(prefix)/yaim/node-info.d - -#################################################################### -# Documentation -#################################################################### - -doc: man html - -man: prepare - -html: prepare - -web: html - -#################################################################### -# Install Doc -#################################################################### - -install-doc: doc - @echo installing docs... - -#################################################################### -# Build Distribution -#################################################################### - -dist: prepare - @tar --gzip --exclude='*CVS*' -cf build/$(PACKAGE_NAME).src.tgz config doc examples src - -rpm: dist - @rpmbuild -ta build/$(PACKAGE_NAME).src.tgz - -clean:: - rm -f *~ test/*~ etc/*~ doc/*~ src/*~ $(PACKAGE_NAME).src.tgz - rm -rf build ${prefix} - diff --git a/org.glite.yaim.myproxy/config/functions/config_proxy_server b/org.glite.yaim.myproxy/config/functions/config_proxy_server deleted file mode 100644 index d598442..0000000 --- a/org.glite.yaim.myproxy/config/functions/config_proxy_server +++ /dev/null @@ -1,24 +0,0 @@ -config_proxy_server (){ - -INSTALL_ROOT=${INSTALL_ROOT:-/opt} - -requires GRID_TRUSTED_BROKERS - -if [ -f ${INSTALL_ROOT}/edg/etc/edg-myproxy.conf ]; then - rm -f ${INSTALL_ROOT}/edg/etc/edg-myproxy.conf -fi - -split_quoted_variable $GRID_TRUSTED_BROKERS | while read x; do - echo "$x" >> ${INSTALL_ROOT}/edg/etc/edg-myproxy.conf -done - -/sbin/chkconfig --add myproxy - -yaimlog DEBUG "Stopping MyProxy server" -/etc/init.d/myproxy stop < /dev/null -yaimlog DEBUG "Waiting 3 second for a complete stop" -sleep 3 -yaimlog DEBUG "Starting MyProxy server" -/etc/init.d/myproxy start < /dev/null - -} diff --git a/org.glite.yaim.myproxy/config/node-info.d/glite-px b/org.glite.yaim.myproxy/config/node-info.d/glite-px deleted file mode 100644 index e69de29..0000000 diff --git a/org.gridsite.core/.cvsignore b/org.gridsite.core/.cvsignore deleted file mode 100644 index e970233..0000000 --- a/org.gridsite.core/.cvsignore +++ /dev/null @@ -1 +0,0 @@ -.project \ No newline at end of file diff --git a/org.gridsite.core/CHANGES b/org.gridsite.core/CHANGES deleted file mode 100644 index cd2c30c..0000000 --- a/org.gridsite.core/CHANGES +++ /dev/null @@ -1,366 +0,0 @@ -* Fri May 10 2007 Andrew McNab -- ==== GridSite version 1.5.1 ==== -* Fri Feb 16 2007 Andrew McNab -- ==== GridSite version 1.5.0 ==== -* Fri Feb 16 2007 Andrew McNab -- ==== GridSite version 1.4.0 ==== -* Thu Feb 15 2007 Andrew McNab -- Final preparations for 1.4.x -* Fri Sep 22 2006 Andrew McNab -- Transfer htproxyinfo utility functions into - grst_x509.c (GRSTx509ChainLoadCheck etc) -* Wed Aug 6 2006 Andrew McNab -- ==== GridSite version 1.3.4 ==== -* Mon Jul 17 2006 Andrew McNab -- Add Shibboleth handling from Joseph Dada's branch to - mod_gridsite in main GridSite tree. -* Tue Jun 27 2006 Andrew McNab -- Merge delegation services back into core. -- Add OCSP options -* Thu Jun 22 2006 Andrew McNab -- Lots of additions to SiteCast/SlashGrid, including - /grid/local/ filesystem with DNs from gridmapdir -- GridSiteCastAlias now allows any URL scheme (gsiftp, - xrootd, ...) not just HTTP(S). -- Replace static gridsite.spec with make-gridsite-spec -* Fri Jun 9 2006 Andrew McNab -- Add patch from Jan Pospisil to - Makefile, to allow standalone building of libraries. -- Include code for June 2006 version of delegation - protocol (ie userproxy.pem rather than usercert.pem - and userkey.pem) -* Thu Jun 8 2006 Andrew McNab -- SiteCast support in SlashGrid -* Mon Jun 5 2006 Andrew McNab -- ==== GridSite version 1.3.1 ==== -* Sun May 26 2006 Andrew McNab -- Include SlashGrid code, and in gridsite.spec etc -- Add sample fuse.spec to docs for use with SlashGrid -* Fri May 26 2006 Andrew McNab -- ==== GridSite version 1.3.0 ==== -* Mon Apr 24 2006 Andrew McNab -- Reworked SSL session caching: passcodes directory now - because /var/www/sessions by default, and also used - to cache credentials according to SSL Session ID. -* Mon Apr 10 2006 Andrew McNab -- Patch from Alberto di Meglio - to allow use of relocated httpd include files. -* Mon Apr 3 2006 Andrew McNab -- Use dist for building tar balls -* Mon Apr 3 2006 Andrew McNab -- ==== GridSite version 1.1.19 ==== -* Fri Mar 31 2006 Andrew McNab -- Final tidy up for gLite 3.1 -* Fri Mar 31 2006 Andrew McNab -- ==== GridSite version 1.1.18 ==== -* Wed Mar 29 2006 Andrew McNab -- New proxy destroy and time functions. -* Tue Mar 28 2006 Shiv Kaushal -- Fixed bug in GACL admin interface that would cause - internal server erorr sometimes when adding new - entries to and ACL. -* Sat Mar 25 2006 Shiv Kaushal -- Change delegation header to Proxy-Delegation-Service - instead of Grst- -* Wed Mar 22 2006 Andrew McNab -- Add GRSTx509MakeDelegationID() to grst_x509.c -- Include code for new style delegation proxy storage -* Fri Mar 17 2006 Andrew McNab -- Associate ldconfig %post in spec with -shared RPM -* Thu Mar 16 2006 Andrew McNab -- Fixes for 200/201 error pages produced by Apache -- Fixes for onetime passcode non-removal if HTTPS -- Include new multi-RPM spec file: gridsite-shared, - gridsite-devel, gridsite-apache, gridsite-commands - (replacing htcp) and gridsite-gsexec -* Fri Mar 03 2006 Shiv Kaushal -- Modify GridSiteDelegationURI directive to insert HTTP - headers instead of modifying HTML -* Mon Feb 6 2006 Shiv Kaushal -- Add GridSiteDelegationURI directive to mod_gridsite - to allow Firefox extension to locate delegation service -* ==== GridSite version 1.1.17 ==== -* Thu Jan 12 2005 Andrew McNab -- Add 5 minute window for VOMS attributes valid slightly - in the future. -- Include Content-Range PUT support in mod_gridsite, - adapted from mod_dav by David O Callaghan -- Return 201 Created when PUT creates a file -* Mon Dec 5 2005 Andrew McNab -- Change GRIDHTTP_ONETIME to GRIDHTTP_PASSCODE -- Remove onetime=yes default from mod_gridsite -- Update gridsite.spec and Makefile for gridsite-copy.cgi -* Wed Nov 16 2005 Andrew McNab -- ==== GridSite version 1.1.16 ==== -* Wed Nov 16 2005 Andrew McNab -- Add -fPIC option to Makefile for IA64, as suggested - by Andreas Unterkircher. -* Wed Oct 12 2005 Andrew McNab -- ==== GridSite version 1.1.15 ==== -* Wed Oct 12 2005 Andrew McNab -- Fix for older OpenSSL to grst_x509.c from - Zoltan.Farkas -* Wed Oct 12 2005 Andrew McNab -- ==== GridSite version 1.1.14 ==== -* Tue Oct 11 2005 Andrew McNab -- Modify VOMS AC parsing to handle multiple ACs inside - the same X.509 AC extension. -* Mon Oct 10 2005 Andrew McNab -- ==== GridSite version 1.1.13 ==== -* Mon Oct 10 2005 Andrew McNab -- Add target_gname patch to gsexec from - Gerben Venekamp -* Thu Oct 6 2005 Andrew McNab -- Fix session reuse with Shared-Memory SSL Session - Cache bug #8856 in mod_gridsite. -- Add SiteCast support to file copying in htcp. -* Tue Oct 4 2005 Andrew McNab -- Move User, Config, Admin and Install guides from - doc directory into GridSite Wiki. -- Create/update man pages for htcp, mod_gridsite and - gsexec to be distributed with source/binaries. -* Mon Oct 3 2005 Andrew McNab -- Fix to gsexec GRST_CRED_0/SSL_CLIENT_S_DN bug found - by Ian Stokes-Rees -* Fri Sep 30 2005 Andrew McNab -- Add SiteCast ping (NOP) support to htcp -* Thu Sep 29 2005 Andrew McNab -- Add SiteCast support to mod_gridsite (file location - discovery via UDP multicast of HTCP messages.) -* Wed Sep 21 2005 Andrew McNab -- Add ports 777 and 488 to example httpd.conf files in - docs. See http://www.gridsite.org/wiki/IP_Ports -* Tue Sep 13 2005 Andrew McNab -- ==== GridSite version 1.1.12 ==== -* Tue Sep 13 2005 Andrew McNab -- Fix bug #10031 submitted by Fabrizio Pacini - (invalid free in - GRSTgaclAclLoadFile if ACL format not valid.) -* Mon Sep 12 2005 Andrew McNab -- Accept GRIDHTTP_ONETIME when passed in HTTP query - (still overridden by a GRIDHTTP_ONETIME in a cookie.) -* Sat Sep 10 2005 Andrew McNab -- Fix problem with attempted upgrades to GridHTTP when - already on the HTTP virtual server. -* Fri Sep 9 2005 Andrew McNab -- GRST_DESTINATION_TRANSLATED and GRST_DESTINATION_PERM - environment variables, for use with CGI-based COPY. -- Rework GridHTTP (ex-Downgrade) code to store method - and URI with permission, rather than credentials. -- Restrict use of GridSiteOnetimesDir to main server. -* Fri Aug 26 2005 Andrew McNab -- Fix for HTTP PUT lack-of-truncation bug found by - Mike Jones, and support for HTTP/WebDAV MOVE. -- Add MOVE support to htcp and update htcp manpage. -- Unset CURLOPT_SSL_VERIFYPEER in htcp etc when using - --noverify option. -* Fri Jun 10 2005 Andrew McNab -- ==== GridSite version 1.1.11 ==== -* Fri Jun 10 2005 Andrew McNab -- Tidy up gsexec vs GridSiteDiskMode -* Fri Jun 10 2005 Andrew McNab -- ==== GridSite version 1.1.10 ==== -* Wed Jun 8 2005 Andrew McNab -- Add GridSiteDiskMode Apache directive to set file - permissions. -- Add GridSiteExecMethod and GridSiteUserGroup to - configure suexec or extended gsexec functionality. -* Thu Jun 2 2005 Andrew McNab -- HTML improvements for Bug #4083 -- Note that GridSite currently doesn't work with SHM - SSL session cache, in httpd-*.conf and config guide. -- Add GridSiteExecMethod for use with gsexec -* Thu May 26 2005 Andrew McNab -- Include gsexec, a drop-in replacement for suexec, - which can do suexec execution of CGI programs or - pool-account mapping based on client DN. -* Tue May 24 2005 Shiv Kaushal -- Add XACML support to GACL code in libgridsite. -* Tue May 24 2005 Andrew McNab -- ==== GridSite version 1.1.9 ==== -* Mon Apr 25 2005 Andrew McNab -- Avoid build problems when using pre-0.9.7 OpenSSL - (ie with Globus compatibility.) -* Mon Apr 25 2005 Andrew McNab -- ==== GridSite version 1.1.8 ==== -* Mon Feb 28 2005 Andrew McNab -- Fix to GRSTgaclUndenyPerm in gridsite.h (bug #7135) - from Marco Sottilaro -* Mon Feb 28 2005 Andrew McNab -- ==== GridSite version 1.1.7 ==== -* Thu Feb 24 2005 Andrew McNab -- Add more sanity checking (signatures, dates, issuer,) - holder) to VOMS attribute parser. -* Mon Feb 21 2005 Andrew McNab -- Add bugfix for Bug #6357 from Fabrizio Pacini - to fix delegation proxy - cache names in OpenSSL 0.9.7. -* Sun Feb 20 2005 Andrew McNab -- Add basic VOMS support (signature checking not yet - in) for X.509 Attribute Certificates. -* Tue Feb 8 2005 Andrew McNab -- ==== GridSite version 1.1.6 ==== -* Tue Feb 8 2005 Andrew McNab -- Include GRSTx509MakeProxyFileName() and - GRSTx509StringToChain() (code to used hashes in cached - proxy file names.) Bug #6357 -- Change ordering of output proxy file produced by - GRSTx509CacheProxy so proxy private key is the 2nd PEM - encoded block (rather than at the end.) Bug #6365 -- Add libgridsite_globus[.so|.a] in preparation for - separate Globus OpenSSL and system OpenSSL versions -* Tue Feb 8 2005 Andrew McNab -- ==== GridSite version 1.1.5 ==== -* Tue Dec 14 2004 Andrew McNab -- Patch from Daniel Kouril to allow - switching Globus vs system OpenSSL libraries/headers. -* Tue Dec 14 2004 Andrew McNab -- ==== GridSite version 1.1.4 ==== -* Mon Nov 15 2004 Andrew McNab -- Back out of (most of) redone VOMS support for committing - to JRA1 CVS. -* Thu Oct 19 2004 Andrew McNab -- ==== GridSite version 1.1.3 ==== -* Thu Oct 19 2004 Andrew McNab -- Fix Bug #5203 from Martijn Steenbakkers - by fixing GACLparseEntry in gridsite-gacl.h -- Change to C style comments (mostly) in gridsite.h and - gridsite-gacl.h (fixes part of Bug #4222 from - ) -- Fix Bug #4225 from in - GRSTgaclCredsFree() -- Add GRSTx509CachedProxyFind() and findproxyfile - command to allow proxies to be found in proxy cache -- Change GRSTx509StoreProxy() to GRSTx509CacheProxy() for - consistency with this and GRSTx509CachedProxyKeyFind() -* Wed Oct 18 2004 Andrew McNab -- ==== GridSite version 1.1.2 ==== -* Tue Oct 19 2004 Andrew McNab -- Copy code from delegation prototype into grst_x509.c - and include htproxyput.c and grst-delegation.c - optional targets (which depend on gSOAP.) -* Wed Oct 13 2004 Andrew McNab -- Include per-file patch to GRSTgaclFileFindAclname: - .gacl:FILENAME controls FILENAME if it exists. -* Tue Jul 27 2004 Andrew McNab -- ==== GridSite version 1.1.1 ==== -* Tue Jul 27 2004 Andrew McNab -- Include HTTP Downgrade support in htcp -* Sat Jul 24 2004 Andrew McNab -- Include HTTP Downgrade support in mod_gridsite. -* Thu Jul 22 2004 Andrew McNab -- Begin development version 1.1.x -* Thu Jul 22 2004 Andrew McNab -- ==== GridSite version 1.1.0 ==== -* Mon Jul 19 2004 Andrew McNab -- Changes in line with EGEE SCM - most importantly - the top level directory becomes org.gridsite.core -* Mon Jul 19 2004 Andrew McNab -- ==== GridSite version 1.0.3 ==== -* Mon Jun 28 2004 Andrew McNab -- In GRSTx509CheckChain() and GRSTx509CompactCreds() - we now accept the first cert in a chain as a CA - even if it is X509v3 but without the CA bits set. - (On the basis that the first chain is from the - administrator-installed CA files store.) -* Sun Jun 27 2004 Andrew McNab -- ==== GridSite version 1.0.2 ==== -* Sun Jun 27 2004 Andrew McNab -- Fix for Bug #2860 (so can now read DN Lists over - HTTPS when have no user certificate if relevant - .gacl gives permission but not ) -- Include gridsite-gacl.h mods from Daniel Kouril - to fix faulty definitions - of GACLnewEntry() and GACLnewAcl() and to make - a legacy non-static GACLparseEntry() wrapper. -* Thu Jun 17 2004 Andrew McNab -- Changes to mod_gridsite.h for Fedora Core 2 / - Apache 2.0.49+ mod_ssl changes (mod_ssl-private.h) -* Wed Jun 9 2004 Andrew McNab -- Incorporate EGEE CVS layout changes in production - branch. -* Wed Jun 9 2004 Andrew McNab -- ==== GridSite version 1.0.1 ==== -* Sun Dec 14 2003 Andrew McNab -- 1.0.0 is first full production release - (development now in 1.1.x branch) -* Sun Dec 14 2003 Andrew McNab -- ==== GridSite version 1.0.0 ==== -* Sat Dec 13 2003 Andrew McNab -- Remove need for modified mod_ssl-gridsite: now - mod_gridsite intercepts callbacks with wrappers. -- Add GRSTx509NameCmp() which compares string reps of - DNs across OpenSSL version changes (ie Email=) -* Fri Dec 12 2003 Andrew McNab -- ==== GridSite version 0.9.11 ==== -* Thu Dec 11 2003 Andrew McNab -- Simplify checking of cert/proxy chain in - mod_ssl-gridsite: rely on mod_ssl/OpenSSL more. -* Wed Dec 2 2003 Andrew McNab -- ==== GridSite version 0.9.10 ==== -* Tue Dec 1 2003 Andrew McNab -- GACL ignores leading/trailing spaces in values. -* Sat Nov 29 2003 Andrew McNab -- Better directory listing in htcp. -- htcp now built as separate binary RPM. -- gridsite-admin.cgi upload now redirects to same - directory after upload (Bug #1939); allows - optional new name for file (Request / Bug #1940); - and has better checking of ../dir/file attacks. -* Sat Nov 29 2003 Andrew McNab -- ==== GridSite version 0.9.8 ==== -* Thu Nov 27 2003 Andrew McNab -- Shiv's updated GACL editor, with redirects. -* Wed Nov 26 2003 Andrew McNab -- Include Daniel Stenberg's roffit script to make - HTML man pages for htcp and urlencode. -- Various fixes found when installing GridPP WWW. -* Wed Nov 26 2003 Andrew McNab -- ==== GridSite version 0.9.7 ==== -* Thu Nov 20 2003 Andrew McNab -- Major updates to htcp (htrm/htls/htll) -- GACL now recurses subdirectories when examining - the DN List directories path. -* Sat Nov 15 2003 Andrew McNab -- ==== GridSite version 0.9.6 ==== -* Fri Nov 14 2003 Andrew McNab -- Function call fixes in grst-admin.cgi -* Thu Nov 13 2003 Andrew McNab -- Add htcp (curl-url-get reborn) -* Thu Nov 13 2003 Andrew McNab -- ==== GridSite version 0.9.5 ==== -* Thu Nov 13 2003 Andrew McNab -- More grst-admin.cgi GACL updates from Shiv. -- .gacl security improvements to grst-admin.cgi from - Shiv Kaushal and Peter Moore. -* Tue Nov 11 2003 Andrew McNab -- One RPM instead of three, with version from VERSION -- Textarea for HTML/Text editing now 80 columns -* Mon Nov 10 2003 Andrew McNab -- Add delegation level and GridSiteGSIProxyLimit - support. -- Add GridSiteAdminList handling to mod_gridsite - and real-gridsite-admin.cgi -* Sun Nov 9 2003 Andrew McNab -- Add directory create/delete, and file/dir rename. -- Add ZIP listing/unzipping via external unzip - utility from http://www.info-zip.org/pub/infozip/ -* Mon Nov 3 2003 Andrew McNab -- Include next version of Shiv's GACL editor. -- Add rpm-usr target to Makefile, to make RPMs - out-of-the-box compatible with RH9 and its Apache2 -- Use REMOTE_DOUBLE_REV for GACL hostname creds in - mod_gridsite.c/mod_gridsite_perm_handler() -* Sun Oct 26 2003 Andrew McNab -- Include GACL editor in real-gridsite-admin.cgi - from Shiv Kaushal -* Sun Oct 26 2003 Andrew McNab -- Reorganise into a single build tree, including - Apache 2.0 .h files to remove circular dependency. -* Sun Oct 26 2003 Andrew McNab -- ==== GridSite version 0.9.4 ==== -* Sun Oct 19 2003 Andrew McNab -- Include many pieces of GridSite code from 0.3.x (CGI) - fileGridSite and mod_gridsite 0.9.0 -* Sun Oct 19 2003 Andrew McNab -- ==== GridSite version 0.9.3 ==== diff --git a/org.gridsite.core/INSTALL b/org.gridsite.core/INSTALL deleted file mode 100644 index 4943047..0000000 --- a/org.gridsite.core/INSTALL +++ /dev/null @@ -1,37 +0,0 @@ -BUILDING/INSTALLING GRIDSITE -============================ - -For more detailed instructions, see the Installation and Build -pages in the GridSite Wiki http://www.gridsite.org/wiki/ - -GridSite is currently only supported on Linux, but should be -trivially portable to other Unix platforms where the GNU build -tools are available. - -When building from source, two routes are available: building -with Make or with RPM. - -BUILDING WITH MAKE -================== - -make -make install - -will build all components and install them all under the default -locations of /usr/local/[lib|bin|include|sbin] The default prefix -/usr/local is set by the prefix variable in the top level Makefile - -BUILDING WITH RPM -================= - -For RedHat Linux and derivatives, building with RPM is recommended. -The command - -make rpm - -will build the gridsite and htcp binary RPMs in the directory -../RPMTMP/RPMS/i386 relative to the working directory. A SRPM is -put into ../RPMTMP/SRPMS - -Building with RPM uses the default prefix /usr, although the -resulting RPMs are relocatable to other hierarchies. diff --git a/org.gridsite.core/LICENSE b/org.gridsite.core/LICENSE deleted file mode 100644 index befd74b..0000000 --- a/org.gridsite.core/LICENSE +++ /dev/null @@ -1,47 +0,0 @@ -Copyright (c) 2002-5, Andrew McNab and Shiv Kaushal, -University of Manchester. All rights reserved. - -Redistribution and use in source and binary forms, with or -without modification, are permitted provided that the following -conditions are met: - - o Redistributions of source code must retain the above - copyright notice, this list of conditions and the following - disclaimer. - o Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following - disclaimer in the documentation and/or other materials - provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND -CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, -INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS -BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -POSSIBILITY OF SUCH DAMAGE. - - -Clearly marked portions of the published GridSite source code -are derived from Apache httpd or its modules, and are covered -by the Apache Software License: - -Copyright 2001-2005 The Apache Software Foundation - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. diff --git a/org.gridsite.core/README b/org.gridsite.core/README deleted file mode 100644 index df81f32..0000000 --- a/org.gridsite.core/README +++ /dev/null @@ -1,6 +0,0 @@ -See INSTALL for build and installation instructions, and the -man pages for reference information. - -The GridSite Wiki at http://www.gridsite.org/wiki/ has guides -( http://www.gridsite.org/wiki/Category:Guides ) and cookbook -examples ( http://www.gridsite.org/wiki/Category:Cookbooks ) diff --git a/org.gridsite.core/VERSION b/org.gridsite.core/VERSION deleted file mode 100644 index 1947941..0000000 --- a/org.gridsite.core/VERSION +++ /dev/null @@ -1,4 +0,0 @@ -MAJOR_VERSION=1 -MINOR_VERSION=1.5 -PATCH_VERSION=1.5.1 -VERSION=$(PATCH_VERSION) diff --git a/org.gridsite.core/build.xml b/org.gridsite.core/build.xml deleted file mode 100644 index 0f47b59..0000000 --- a/org.gridsite.core/build.xml +++ /dev/null @@ -1,294 +0,0 @@ - - - - - - - Ant build file to build the Gridsite Core Component - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ${global.prefix} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - New tag is ${cvs.label} - - - - - - - - - - - - - - - - - - New tag is ${cvs.label} - - - - - - - - - - - - - - - - - diff --git a/org.gridsite.core/doc/README.htcp-bin b/org.gridsite.core/doc/README.htcp-bin deleted file mode 100644 index ac546fc..0000000 --- a/org.gridsite.core/doc/README.htcp-bin +++ /dev/null @@ -1,13 +0,0 @@ -Binaries (and links) are in ./bin; man pages are in ./man/man1 - -Install by copying binaries/links onto your path, or by copying htcp -and making symbolic links to htcp from htls, htll, htrm and htmkdir. - -All the .1 man pages should be copied to a suitable ./man/man1 -directory on your man path. - -If you just want to install htcp in /usr/local, then unpacking this -tgz file in /usr/local should do the trick. (Delete this README when -you're finished!) - -For more about htcp see http://www.gridsite.org/ diff --git a/org.gridsite.core/doc/build-apache2.sh b/org.gridsite.core/doc/build-apache2.sh deleted file mode 100644 index 507be31..0000000 --- a/org.gridsite.core/doc/build-apache2.sh +++ /dev/null @@ -1,79 +0,0 @@ -#!/bin/sh -# -# Copyright (c) 2002-3, Andrew McNab, University of Manchester -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or -# without modification, are permitted provided that the following -# conditions are met: -# -# o Redistributions of source code must retain the above -# copyright notice, this list of conditions and the following -# disclaimer. -# o Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following -# disclaimer in the documentation and/or other materials -# provided with the distribution. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND -# CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, -# INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS -# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -# TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -# ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -# POSSIBILITY OF SUCH DAMAGE. -# -#--------------------------------------------------------------- -# For more information about GridSite: http://www.gridsite.org/ -#--------------------------------------------------------------- -# -# This script takes an Apache .tar.gz as the single command line argument, -# unpacks the file, modifies the httpd.spec it contains to work without -# the "-C" option to configure (which RedHat 7.3 doesnt like) and -# outputs source and binary RPMs in SRPMS and RPMS/i386 - -if [ "$1" = "" ] ; then - echo Must give a tar.gz file name - exit -fi - -export MYTOPDIR=`pwd` - -if [ -x /usr/bin/rpmbuild ] ; then - export RPMCMD=rpmbuild -else - export RPMCMD=rpm -fi - -echo "$1" | grep '\.tar\.gz$' >/dev/null 2>&1 -if [ $? = 0 ] ; then # a gzipped source tar ball - - rm -Rf $MYTOPDIR/BUILD $MYTOPDIR/BUILDROOT $MYTOPDIR/SOURCES - mkdir -p $MYTOPDIR/SOURCES $MYTOPDIR/SPECS $MYTOPDIR/BUILD \ - $MYTOPDIR/SRPMS $MYTOPDIR/RPMS/i386 $MYTOPDIR/BUILDROOT - - shortname=`echo $1 | sed 's:^.*/::' | sed 's:\.tar\.gz$::'` - - cp -f $1 SOURCES - - tar zxvf SOURCES/$shortname.tar.gz $shortname/httpd.spec - cp -f $shortname/httpd.spec SPECS - - sed -e 's/configure -C /configure /' \ - SPECS/httpd.spec >SPECS/httpd-2.spec - - $RPMCMD --define "_topdir $MYTOPDIR" \ - -ba --buildroot $MYTOPDIR/BUILDROOT SPECS/httpd-2.spec - - exit -fi - -echo I dont recognise the file type (must be .tar.gz) - -exit diff --git a/org.gridsite.core/doc/delegation-1.1.0.wsdl b/org.gridsite.core/doc/delegation-1.1.0.wsdl deleted file mode 100644 index df7e1f2..0000000 --- a/org.gridsite.core/doc/delegation-1.1.0.wsdl +++ /dev/null @@ -1,459 +0,0 @@ - - - - - - - - - - The cause of the delegation exception on the server side. - - - - - - - - - - New proxy certificate request, containing the certificate - request and a generated delegation ID. - - - - - - - The new RFC 3280 style proxy certificate request - in PEM format with Base64 encoding. - - - - - - - The ID associated with the new delegation session. - - - - - - - - - - - - The ID of the new delegation session, specified by the client. - The ID can be empty. - - - - - - - The new RFC 3280 style proxy certificate request - in PEM format with Base64 encoding. - - - - - - - - The ID of an already existing delegation session, - initiated by getProxyReq() or getNewProxyReq(). - - - - - RFC 3280 style proxy certificate, signed by the - client, in PEM format with Base64 encoding. - - - - - - - - - The ID of an already existing delegation session, - where the client wants to renew the delegated - credential. - - - - - - - The new RFC 3280 style proxy certificate request, - which is to replace the existing one, - in PEM format with Base64 encoding. - - - - - - - - - The server side generated ID of the new delegation - session and the new RFC 3280 style proxy certificate - request in PEM format with Base64 encoding. - - - - - - - - The ID of an already existing delegation session to be queried. - - - - - - - The date and time when the delegated credentials will expire. - - - - - - - - The ID of an already existing delegation session to be destroyed. - - - - - - - - - - - - Delegation interface. - - - - - - Starts the delegation procedure by asking for a certificate - signing request from the server. The server answers with a - certificate signing request which includes the public key - for the new delegated credentials. putProxy() has to be - called to finish the procedure. - - - - Check if a delegation ID was provided. If not, generate a delegation - id by hashing the client DN and client VOMS attributes. - - - Check if the delegation ID already exists in the - storage-area. If it does - (a credential renewal is happening), check - existing info (DN and VOMS attributes) against client info. - Throw exception if they do not match. - - - Create a new private/public key-pair (see also Key - Generation Semantics). - - - Generate a new proxy certificate request. - - - Store private key and cert request in - storage-cache-area, along with the - requesting DN and VOMS attributes. - - - - - - - - The client's DN and VOMS attributes do not match the stored ones, - i.e. the client is not authorized. - - - - - - - - Starts the delegation procedure by asking for a certificate - signing request from the server. The server answers with a - certificate signing request which includes the public key - for the new delegated credentials. putProxy() has to be - called to finish the procedure. - - - - Generate a delegation - ID by hashing the client DN and client VOMS attributes. - - - Check if the delegation ID already exists in the - storage-area. If it does, check - existing info (DN and VOMS attributes) against client info. - Throw exception if they do not match, because then this is - the rare case of hash collision, i.e. two different clients - are mapped to the same delegation ID. - - - Create a new private/public key-pair (see also Key - Generation Semantics). - - - Generate a new certificate request. - - - Store private key and cert request in - storage-cache-area, along with the - requesting DN and VOMS attributes. - - - - - - - - There were already credentials associated to the delegation ID. - - - - - - - - Finishes the delegation procedure by sending the signed - proxy certificate to the server. - - - - Check if a delegation ID was provided. If not, generate a - delegation id by hashing the client DN and client VOMS - attributes. - - - Check if the delegation ID already exists in the - storage-area. If it does, check - existing info (DN and VOMS attributes) against client info. - Throw exception if it does not match. - - - Check, if client information matches proxy information. - - - Check given proxy against private key of delegation ID in - storage-cache-area. If they do not - match, throw exception. - - - Store proxy in storage-area - and clean up the storage-cache-area. - - - - - - - - - There were no cached credentials associated to the delegation ID - (neither - getNewProxyReq() nor - - renewProxyReq() was called previously), - or the client's DN and VOMS attributes do not match the stored ones, - i.e. the client is not authorized. - - - - - - - - - Restarts the delegation procedure by asking for a certificate - signing request from the server for an already existing delegation ID. - The server answers with a certificate signing request which includes - the public key for new delegated credentials. putProxy() has to be - called to finish the procedure. - - - - Check if a delegation ID was provided. If not, generate a delegation - id by hashing the client DN and client VOMS attributes. - - - Check if the delegation ID already exists in the - storage-area. If it does - not, then throw an exception. - - - Check if the existing info (DN and VOMS attributes) against client info. - Throw exception if they do not match. - - - Create a new private/public key-pair (see also Key - Generation Semantics). - - - Generate a new certificate request. - - - Store private key and cert request in - storage-cache-area, along with the - requesting DN and VOMS attributes. - - - - - - - - There were no credentials associated to the delegation ID, or the - client's DN and VOMS attributes do not match the stored ones, i.e. - the client is not authorized. - - - - - - - Returns the termination (expiration) date and time of the credential, - associated with the given delegaion ID. If there was no delegation ID, - then generate one by hashing the client DN and client VOMS attributes. - - - - - - There were no credentials associated to the delegation ID, or the - client's DN and VOMS attributes do not match the stored ones, i.e. - the client is not authorized. - - - - - - - - Destroys the delegated credentials associated with the - given delegation ID immediately. If there was no delegation ID, - then generate one by hashing the client DN and client VOMS attributes. - - - - - - There were no credentials associated to the delegation ID, or the - client's DN and VOMS attributes do not match the stored ones, i.e. - the client is not authorized. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/org.gridsite.core/doc/findproxyfile.1 b/org.gridsite.core/doc/findproxyfile.1 deleted file mode 100644 index 9de4d47..0000000 --- a/org.gridsite.core/doc/findproxyfile.1 +++ /dev/null @@ -1,63 +0,0 @@ -.TH findproxyfile 1 "October 2004" "findproxyfile" "GridSite Manual" -.SH NAME -.B findproxyfile -\- returns full path to GSI Proxy file -.SH SYNOPSIS -.B findproxyfile -[--proxycache=PATH] [--delegation-id=ID] [--user-dn=DN] [--outsidecache] -.SH DESCRIPTION -.B findproxyfile -returns full path to a GSI Proxy file, either in the proxy cache maintained -by the GridSite G-HTTPS and delegation portType functions, or in other -standard places. - -If a User DN is given -.B findproxyfile -uses the value of the -.B --proxycache -argument, the GRST_PROXY_PATH or the -compile time default to detemine the location of the proxy cache directory. -The directory is searched for a proxy having the given User DN and -Delegation ID. (If no Delegation ID is specificed, then the default value is -used.) - -If -.B findproxyfile -does not find a proxy or if a User DN is not given, but -.B --outsidecache -was given, then the environment variable X509_USER_PROXY and the standard -location /tmp/x509up_uUID are searched as well. - -.SH OPTIONS - -.IP "--proxycache=PATH" -Give the path of the proxy cache directory explicitly, overriding the -default and the GRST_PROXY_PATH environment variable if present. - -.IP "--delegation-id=ID" -The optional delegation ID is search for in the proxy cache in addition to -the User DN. If absent, the default Delegation ID value is searched for. - -.IP "--user-dn=DN" -The DN of the full user certificate associated with the proxy to be searched -for in the proxy cache. (This is not the DN of any proxy earlier in the -chain: it is a the DN of a certificate issued by a recognised CA.) - -.IP "--outsidecache" -If a User DN is not given, or a proxy not found in the cache, then search -for a proxy using X509_USER_PROXY environment variable and file name of -form /tmp/x509up_uUID as well. - -.SH RETURN VALUE -If a proxy is found, its full path is output on standard out. - -.SH EXIT CODES -0 is returned on succcess. Non-zero otherwise. - -.SH BUGS -In this version, no attempt is made to verify or validate the proxies. - -.SH AUTHOR -Andrew McNab - -findproxyfile is part of GridSite: http://www.gridsite.org/ diff --git a/org.gridsite.core/doc/fuse.spec b/org.gridsite.core/doc/fuse.spec deleted file mode 100644 index ac785a2..0000000 --- a/org.gridsite.core/doc/fuse.spec +++ /dev/null @@ -1,139 +0,0 @@ -# -# You should be able to build your own FUSE RPMs for use with SlashGrid -# by fetching an up-to-date stable FUSE tar file from SourceForge, -# putting it in /usr/src/redhat/SOURCES, updating the Version: header in -# this file, and then executing rpmbuild -ba fuse.spec -# -Name: fuse -Version: 2.5.3 -URL: http://fuse.sourceforge.net -Source: %{name}-%{version}.tar.gz -Release: 3%(sed 's/^\([A-Z]\)[^ ]* \([A-Z]\)[^0-9]*\([0-9][^ ]*\).*/\1\2\3/g' /etc/redhat-release | sed 's/[^A-Z,a-z,0-9]//g')_%(uname -r | sed 's/-/_/g') -Summary: File System in Userspace (FUSE) utilities -Group: System Environment/Base -License: GPL -Packager: Andrew McNab -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) - -%description -With FUSE it is possible to implement a fully functional filesystem in a -userspace program. This package contains the FUSE userspace tools to -mount a FUSE filesystem. - -(This version is designed for use with the SlashGrid daemon: - http://www.gridsite.org/slashgrid/ ) - -%package libs -Summary: File System in Userspace (FUSE) libraries -Group: System Environment/Libraries -License: LGPL - -%description libs -Devel With FUSE it is possible to implement a fully functional filesystem in a -userspace program. This package contains the FUSE libraries. - -%package devel -Summary: File System in Userspace (FUSE) devel files -Group: Development/Libraries -Requires: %{name}-libs = %{version}-%{release} -Requires: pkgconfig -License: LGPL - -%description devel -With FUSE it is possible to implement a fully functional filesystem in a -userspace program. This package contains development files (headers, -pgk-config) to develop FUSE based applications/filesystems. - -%prep -%setup -q -#disable device creation during build/install -sed -i 's|mknod|echo Disabled: mknod |g' util/Makefile.in -sed -i 's|install-data-local | |g' util/Makefile.in -sed -i 's| install-data-local| |g' util/Makefile.in - -%build -%configure --disable-static -make %{?_smp_mflags} - -%install -rm -rf $RPM_BUILD_ROOT -make install DESTDIR=$RPM_BUILD_ROOT -find $RPM_BUILD_ROOT -type f -name "*.la" -exec rm -f {} ';' - -# change from 4755 to 0755 to allow stripping (setuid not needed by SlashGrid) -chmod 0755 $RPM_BUILD_ROOT/%{_bindir}/fusermount - -%clean -rm -rf $RPM_BUILD_ROOT - -%post -mknod --mode=0660 /dev/fuse c 10 229 -chown root.root /dev/fuse -depmod - -%postun - -%post libs -p /sbin/ldconfig - -%postun libs -p /sbin/ldconfig - -%files -%doc AUTHORS ChangeLog COPYING FAQ Filesystems NEWS README README.NFS -/sbin/mount.fuse -%attr(0755,root,root) %{_bindir}/fusermount -/lib/modules/%(uname -r)/kernel/fs/fuse/fuse.*o - -%files libs -%doc COPYING.LIB -%{_libdir}/libfuse.so.* - -%files devel -%defattr(-,root,root,-) -%{_libdir}/libfuse.so -%{_libdir}/pkgconfig/*.pc -%{_includedir}/fuse.h -%{_includedir}/fuse - -%changelog - -* Sun May 28 2006 Andrew McNab 2.5.3-3 -- Simplify for use with SlashGrid daemon (which only runs as root) on - Scientific Linux 3.*/4.* too - -* Wed May 03 2006 Peter Lemenkov 2.5.3-1%{?dist} -- Update to 2.5.3 - -* Thu Mar 30 2006 Peter Lemenkov 2.5.2-4%{?dist} -- rebuild - -* Mon Feb 13 2006 Peter Lemenkov - 2.5.2-3 -- Proper udev rule - -* Mon Feb 13 2006 Peter Lemenkov - 2.5.2-2 -- Added missing requires - -* Tue Feb 07 2006 Peter Lemenkov - 2.5.2-1 -- Update to 2.5.2 -- Dropped fuse-mount.fuse.patch - -* Wed Nov 23 2005 Thorsten Leemhuis - 2.4.2-1 -- Use dist - -* Wed Nov 23 2005 Thorsten Leemhuis - 2.4.2-1 -- Update to 2.4.2 (solves CVE-2005-3531) -- Update README.fedora - -* Sat Nov 12 2005 Thorsten Leemhuis - 2.4.1-3 -- Add README.fedora -- Add hint to README.fedora and that you have to be member of the group "fuse" - in the description -- Use groupadd instead of fedora-groupadd - -* Fri Nov 04 2005 Thorsten Leemhuis - 2.4.1-2 -- Rename packages a bit -- use makedev.d/40-fuse.nodes -- fix /sbin/mount.fuse -- Use a fuse group to restict access to fuse-filesystems - -* Fri Oct 28 2005 Thorsten Leemhuis - 2.4.1-1 -- Initial RPM release. diff --git a/org.gridsite.core/doc/gridsite-delegation.8 b/org.gridsite.core/doc/gridsite-delegation.8 deleted file mode 100644 index 41ce1e3..0000000 --- a/org.gridsite.core/doc/gridsite-delegation.8 +++ /dev/null @@ -1,19 +0,0 @@ -.TH gridsite-delegation 8 "March 2006" "gridsite-delegation" "GridSite Manual" -.SH NAME -.B gridsite-delegation.cgi -\- CGI implementation of GridSite/gLite GSI delegation Web Service -.SH SYNOPSIS -.B gridsite-delegation.cgi - -.SH DESCRIPTION -.B gridsite-delegation.cgi -is a server-side implementation of the GridSite/gLite GSI delegation Web -Service - -.SH AUTHOR -Andrew McNab - -gridsite-delegation.cgi is part of GridSite: http://www.gridsite.org/ - -.SH "SEE ALSO" -.BR htproxyput(1) diff --git a/org.gridsite.core/doc/gsexec.8 b/org.gridsite.core/doc/gsexec.8 deleted file mode 100644 index e229663..0000000 --- a/org.gridsite.core/doc/gsexec.8 +++ /dev/null @@ -1,134 +0,0 @@ -.TH GSEXEC 8 "October 2005" "gsexec" "GridSite Manual" -.SH NAME -.B gsexec -\- Switch user before executing external programs - -.SH "SYNOPSIS" - -.BR gsexec -[-V] - -.SH "SUMMARY" - -gsexec is used by the Apache HTTP Server to switch to another user before -executing CGI programs\&. In order to achieve this, it must run as root\&. -Since the HTTP daemon normally doesn't run as root, the gsexec executable -needs the setuid bit set and must be owned by root\&. It should never be -writable for any other person than root\&. - -gsexec is based on Apache's suexec, and its behaviour is controlled with -the Apache configuration file directives -.BR GridSiteExecMethod -and -.BR GridSiteUserGroup -added to Apache by -.BR mod_gridsite(8) -Four execution methods are supported: nosetuid, suexec, X509DN and directory, -and these may be set on a per-directory basis within the Apache configuration -file. - -.SH "NOSETUID METHOD" - -This is the default behaviour, but can also be produced by giving -.BR "GridSiteExecMethod nosetuid" - -CGI programs will then be executed without using gsexec, and will -run as the Unix user given by the User and Group Apache directives (normally -apache.apache on Red Hat derived systems.) - -.SH "SUEXEC METHOD" - -If -.BR "GridSiteExecMethod suexec" -is given for this virtual host or directory, then CGI programs will be -executed using the user and group given by the -.BR "GridSiteUserGroup user group" -directive, which may also be set on a per-directory basis (unlike suexec's -.BR SuexecUserGroup -which is per-server only.) The CGI program must either be owned by root, -the Apache user -and group specified at gsexec build-time (normally apache.apache) or by -the user and group given with the -.BR GridSiteUserGroup -directive. - -.SH "X509DN METHOD" - -If -.BR "GridSiteExecMethod X509DN" -is given, then the CGI program runs as a pool user, detemined using lock -files in the exec mapping directory chosen as build time of gsexec. -The pool user is chosen according -to the client's full certificate X.509 DN (ie with any trailing GSI proxy -name components stripped off.) Subsequent requests by the same X.509 -identity will be mapped to the same pool user. The CGI program must either be -owned by root, the Apache user -and group specified at gsexec build-time (normally apache.apache) or by -the pool user selected. - -.SH "DIRECTORY METHOD" - -If -.BR "GridSiteExecMethod directory" -is given, then the CGI program runs as a pool user chosen according -to the directory in which the CGI is located: all CGIs in that directory -run as the same pool user. The CGI program must either be -owned by root, the Apache user -and group specified at gsexec build-time (normally apache.apache) or by -the pool user selected. - - -.SH "EXECMAPDIR" - -The default exec mapping directory is /var/www/execmapdir and this is fixed -when the gsexec executable is built. The exec mapping directory and all -of its lock files must be owned and only writable by root. To initialise the -lock files, create an empty lock file for each pool user, with the pool -username as the filename (eg user0001, user0002, ...) As the pool users are -leased to X.509 identities or directories, they will become hard linked to -lock files with the URL-encoded X.509 DN or full directory path. - -You can recycle pool users by removing the corresponding URL-encoded -hard link. -.BR stat(1) -and -.BR "ls(1)" -with option -.BR "-i" -can be used to print the inodes of lock files to match up the hard links. - -.BR "However, you must ensure that all files and processes owned by the pool" -.BR "user are deleted before recycling!" - -.SH "OPTIONS" - -.TP --V -If you are root, this option displays the compile options of gsexec\&. -For security reasons all configuration options are changeable only at -compile time\&. - -.SH "MORE INFORMATION" -For further information about the concepts and the security model of -the original Apache suexec -please refer to the suexec documentation: - -http://httpd\&.apache\&.org/docs-2\&.0/suexec\&.html - -For examples using the gsexec extensions, please see the GridSite gsexec -page: - -http://www.gridsite.org/wiki/Gsexec - -.SH AUTHORS - -Apache project, for original suexec - -Andrew McNab for gsexec modifications. - -gsexec is part of GridSite: http://www.gridsite.org/ - -.SH "SEE ALSO" -.BR httpd(8), -.BR suexec(8), -.BR mod_gridsite(8) diff --git a/org.gridsite.core/doc/gsoap-devel.spec b/org.gridsite.core/doc/gsoap-devel.spec deleted file mode 100644 index 1eb61f0..0000000 --- a/org.gridsite.core/doc/gsoap-devel.spec +++ /dev/null @@ -1,52 +0,0 @@ -# -# You can use this spec file and the gSOAP source tar file from sourceforge -# to build a binary development RPM of gSOAP, suitable for building the -# gridsite-ws components. Installing the resulting RPM puts the gSOAP files -# directory in /usr, where the gridsite-ws Makefile expects them by default. -# -# See http://www.gridsite.org/wiki/GSOAP for more about GridSite and gSOAP -# -Name: gsoap-devel -Version: %(echo ${MYVERSION:-2.7.6b}) -Release: 1%(sed 's/^\([A-Z]\)[^ ]* \([A-Z]\)[^0-9]*\([0-9][^ ]*\).*/\1\2\3/g' /etc/redhat-release | sed 's/[^A-Z,a-z,0-9]//g') -Summary: gSOAP development compilers/libraries/headers -License: Modified BSD -Group: Development/Libraries -Source: gsoap_%{version}.tar.gz -Prefix: %(echo ${MYPREFIX:-/usr}) -URL: http://www.cs.fsu.edu/~engelen/soap.html -Packager: Andrew McNab - -%description -Enough of gSOAP to build clients and servers based on gSOAP, using its headers -and static libraries. -By default, everything is installed in /usr/lib|bin|include/ - -%prep - -%setup -n gsoap-2.7 - -%build - -./configure --prefix=$RPM_BUILD_ROOT/%{prefix} -make - -%install -make install - -%files -%attr(-, root, root) %{prefix}/bin/soapcpp2 -%attr(-, root, root) %{prefix}/bin/wsdl2h -%attr(-, root, root) %{prefix}/include/stdsoap2.h -%attr(-, root, root) %{prefix}/lib/libgsoap++.a -%attr(-, root, root) %{prefix}/lib/libgsoap.a -%attr(-, root, root) %{prefix}/lib/libgsoapck++.a -%attr(-, root, root) %{prefix}/lib/libgsoapck.a -%attr(-, root, root) %{prefix}/lib/libgsoapssl++.a -%attr(-, root, root) %{prefix}/lib/libgsoapssl.a -%attr(-, root, root) %{prefix}/lib/pkgconfig/gsoap++.pc -%attr(-, root, root) %{prefix}/lib/pkgconfig/gsoap.pc -%attr(-, root, root) %{prefix}/lib/pkgconfig/gsoapck++.pc -%attr(-, root, root) %{prefix}/lib/pkgconfig/gsoapck.pc -%attr(-, root, root) %{prefix}/lib/pkgconfig/gsoapssl++.pc -%attr(-, root, root) %{prefix}/lib/pkgconfig/gsoapssl.pc diff --git a/org.gridsite.core/doc/htcp.1 b/org.gridsite.core/doc/htcp.1 deleted file mode 100644 index 0731d33..0000000 --- a/org.gridsite.core/doc/htcp.1 +++ /dev/null @@ -1,200 +0,0 @@ -.TH HTCP 1 "October 2005" "htcp" "GridSite Manual" -.SH NAME -.B htcp, htmv, htrm, htls, htll, htmkdir, htfind, htping -\- file transfers and queries via HTTP/HTTPS/SiteCast -.SH SYNOPSIS -.B htcp, htmv -[options] Source-URL[s] Destination-URL - -.B htrm, htls, htll, htmkir, htfind -[options] Target-URL[s] - -.B htping -[options] -.SH DESCRIPTION -.B htcp -is a client to fetch files or directory listings from remote servers using -HTTP or HTTPS, or to put or delete files or directories onto remote servers -using HTTPS. htcp is similar to scp(1), but uses HTTP/HTTPS rather than ssh -as its transfer protocol. htcp can also use the HTCP protocol to query -HTTP(S) fileservers via SiteCast. - -When talking to a fileserver with HTTPS, htcp can run "anonymously", with a -standard X.509 user certificate and key, or with a GSI Proxy. This makes -htcp very useful in Grid environments where many users have certificates -and where jobs and users have access to GSI proxies. - -.SH URLs -htcp supports the file:, http: and https: URL schemes as sources and -destinations. If no scheme is given, the URL scheme is assumed to be file: -and relative to the current directory if not an absolute path. - -If multiple sources are given during a copy, they will be used in turn and -the destination must be a directory (directories are indicated by a trailing -/) However, source and destination cannot both refer to remote servers. - -.SH OPTIONS -.IP "-v/--verbose" -Turn on debugging information. Used once, this option will enable htcp's -messages to stderr. Used twice, will also enable the underlying libcurl -messages. - -.IP "--delete" -Instead of copying files, delete all the URLs given on the command line. -Calling the program as htrm has the same effect. - -.IP "--list" -Instead of copying files, output lists of files located in the URL-directories -given on the command line. Calling the program as htls has the same effect. - -.IP "--long-list" -Instead of copying files, output long listings of files located in the -URL-directories given on the command line. If available, the size in bytes -and modification time of each file is given. Calling the program as -htll has the same effect. - -.IP "--mkdir" -Instead of copying files, attempt to create a directory on a remote server -with HTTP PUT. The server must support the convention that PUT to a URL with -a trailing slash means create a directory. No file body is sent. Calling the -program as htmkdir has the same effect. - -.IP "--move" -Move/rename files on a single remote server, given the two, absolute URLs -of the remote file names. Server must support HTTP/WebDAV MOVE. Calling the -program as htmv has the same effect. - -.IP "--ping" -Query specified multicast groups with the HTCP NOP ("No Operation") code. -SiteCast enabled servers will respond immediately with a NOP reply, and all -of the responses will be listed, with the round trip time in milliseconds. -Any waiting times specified in the --groups option will be ignored. Calling -the program as htping has the same effect. -(--groups must be used for this option to work.) - -.IP "--find" -Query specified multicast groups with the HTCP TST code. SiteCast enabled -servers will respond with TST replies if they have the files corresponding -to the given SiteCast target URL(s). All of the transfer URLs returned -will be listed. Waiting times specified in the --groups option will be used -to space out the multicast queries, but the program listens for responses -continuously. Calling the program as htfind has the same effect. -(--groups must be used for this option to work.) - -.IP "--groups " -IP multicast groups to use for SiteCast queries. IP Groups is a comma -separated list of groups, in the format: nnn.nnn.nnn.nnn:port[:ttl[:seconds]] -The IP number and port must be specified. The IP time-to-live, ttl, controls -how many networks the multicast packets may pass through - the default, 1, -limits packets to the local network. Multiple groups may be specified, -separated by commas. If multiple groups are specified, then seconds is the -time to wait before making the next multicast - 1 second is the default. - -.IP "--timeout " -A request timeout used for multicast ping. - -.IP "--anon" -Do not attempt to use X.509 user certificates or GSI proxies to authenticate -to the remote HTTPS server. This means you are "anonymous", but the server's -identity may still be verified and the connection is still encrypted. - -.IP "--cert and --key " -Path to the PEM-encoded -X.509 or GSI Proxy user certificate and key to use for HTTPS -connections, intead of "anonymous mode." If only one of --key or --cert -is given, then that will be tried for both. If neither is given, then the -following order of precedence is used: -the file name held by the variable X509_USER_PROXY; the file -/tmp/x509up_uID (with Unix UID equal to ID); the file names held by -X509_USER_CERT / X509_USER_KEY; the files ~/.globus/usercert.pem and -~/.globus/userkey.pem (where ~/ is the home directory of the user.) - -.IP "--capath " -Path to the PEM-encoded CA root certificates to use when -verifying remote servers' host certificates in HTTPS connections. Ideally -this should be a directory of hash.0 files as described in the OpenSSL -verify(1) man page, but a file may be used instead. If --capath is not -given, the value of the environment variable X509_CERT_DIR will be tried. -If this is not valid, then /etc/grid-security/certificates will be used. - -.IP "--no-verify" -Do not use CA root certificates to verify remote servers' host certificates. -This is useful for testing sites before their certificate is set up properly, -but leaves you vulnerable to "man in the middle" attacks by hostile servers -masquerading as your target. - -.IP "--grid-http" -Try to use GridHTTP redirection for HTTPS URLs. Compatible servers will perform -authentication and authorization on the HTTPS connection and then redirect -to HTTP for the GET or PUT file transfer. htcp makes the HTTP request using -the GRID_AUTH_PASSCODE single-use passcode obtained via HTTPS. The --grid-http -option will be ignored for directory operations or HTTP URLs. If a redirected -transfer isn't possible, a normal HTTPS data transfer will be attempted. - -.IP "--sitecast" -Try to use SiteCast to locate remote files which are to be copied (currently -only for the -.BR fetching -of remote files.) If no location is found via SiteCast, then a direct request -for the given URL is tried. (--groups must be used for this option to work.) - -.IP "--domain " -Try to use SiteCast to locate remote files which are to be copied (currently -only for the -.BR fetching -of remote files) -.BR "if the domain component of the URL matches" -the SiteCast domain given. -If no location is found via SiteCast, then a direct request -for the given URL is tried. (--groups must be used for this option to work.) - -.SH FILES -.IP /tmp/x509up_uID -Default GSI Proxy file for Unix UID equal to ID. - -.IP /etc/grid-security/certificates -Default location for trusted Certification Authority root certificates to use -when checking server certificates. - -.IP /tmp/.ca-roots-XXXXXX -Prior to 7.9.8, the underlying curl library did not support the CA root -certificates directory. -If built with an old version of libcurl, htcp will concatenate the -certificates in the CA roots directory into a unique temporary file and use -that. - -.SH ENVIRONMENT - -.IP X509_CERT_DIR -Holds directory to search for Certification Authority root certificates when -verifying server certificates. (Tried if --capath is not given on the -command line.) - -.IP X509_USER_PROXY -Holds file name of a GSI Proxy to use as user certificate. (Tried if --cert or ---key are not given on the command line.) - -.IP "X509_USER_CERT and X509_USER_KEY" -Holds file name of X.509 user certificate and key. (Tried if X509_USER_PROXY -is not valid.) - -.SH EXIT CODES -0 is returned on complete success. Curl error codes are returned when -reported by the underlying curl library, and CURLE_HTTP_RETURNED_ERROR (22) -is returned when the HTTP(S) server returns a code outside the range 200-299. -The manpage libcurl-errors(3) lists all the curl error codes. - -.SH TO DO -Recursive copying. Server-side wildcards. Parallel streams. Better error -recovery. - -.SH AUTHOR -Andrew McNab - -htcp is part of GridSite: http://www.gridsite.org/ -.SH "SEE ALSO" -.BR scp(1), -.BR curl(1), -.BR wget(1), -.BR verify(1), -.BR libcurl-errors(3) diff --git a/org.gridsite.core/doc/htfind.1 b/org.gridsite.core/doc/htfind.1 deleted file mode 100644 index 11a60d1..0000000 --- a/org.gridsite.core/doc/htfind.1 +++ /dev/null @@ -1 +0,0 @@ -.so man1/htcp.1 diff --git a/org.gridsite.core/doc/htll.1 b/org.gridsite.core/doc/htll.1 deleted file mode 100644 index 11a60d1..0000000 --- a/org.gridsite.core/doc/htll.1 +++ /dev/null @@ -1 +0,0 @@ -.so man1/htcp.1 diff --git a/org.gridsite.core/doc/htls.1 b/org.gridsite.core/doc/htls.1 deleted file mode 100644 index 11a60d1..0000000 --- a/org.gridsite.core/doc/htls.1 +++ /dev/null @@ -1 +0,0 @@ -.so man1/htcp.1 diff --git a/org.gridsite.core/doc/htmkdir.1 b/org.gridsite.core/doc/htmkdir.1 deleted file mode 100644 index 11a60d1..0000000 --- a/org.gridsite.core/doc/htmkdir.1 +++ /dev/null @@ -1 +0,0 @@ -.so man1/htcp.1 diff --git a/org.gridsite.core/doc/htmv.1 b/org.gridsite.core/doc/htmv.1 deleted file mode 100644 index 11a60d1..0000000 --- a/org.gridsite.core/doc/htmv.1 +++ /dev/null @@ -1 +0,0 @@ -.so man1/htcp.1 diff --git a/org.gridsite.core/doc/htping.1 b/org.gridsite.core/doc/htping.1 deleted file mode 100644 index 11a60d1..0000000 --- a/org.gridsite.core/doc/htping.1 +++ /dev/null @@ -1 +0,0 @@ -.so man1/htcp.1 diff --git a/org.gridsite.core/doc/htproxydestroy.1 b/org.gridsite.core/doc/htproxydestroy.1 deleted file mode 100644 index 57f80ce..0000000 --- a/org.gridsite.core/doc/htproxydestroy.1 +++ /dev/null @@ -1 +0,0 @@ -.so man1/htproxyput.1 diff --git a/org.gridsite.core/doc/htproxyinfo.1 b/org.gridsite.core/doc/htproxyinfo.1 deleted file mode 100644 index 57f80ce..0000000 --- a/org.gridsite.core/doc/htproxyinfo.1 +++ /dev/null @@ -1 +0,0 @@ -.so man1/htproxyput.1 diff --git a/org.gridsite.core/doc/htproxyput.1 b/org.gridsite.core/doc/htproxyput.1 deleted file mode 100644 index a917054..0000000 --- a/org.gridsite.core/doc/htproxyput.1 +++ /dev/null @@ -1,121 +0,0 @@ -.TH HTPROXYPUT 1 "March 2006" "htproxyput" "GridSite Manual" -.SH NAME -.B htproxyput, htproxydestroy, htproxytime, htproxyunixtime, htproxyrenew -\- GSI proxy delegations and querying, using GridSite/gLite delegation API -.SH SYNOPSIS -.B htproxyput, htproxydestroy, htproxytime, htproxyunixtime, htproxyrenew -[options] Service-URL - -.B htproxyinfo -[options] - -.SH DESCRIPTION -.B htproxyput -is a client to perform GSI proxy delegations using the GridSite/gLite -delegation Web Service portType. The gridsite-delegation(8) CGI program is -the complementary server-side implementation. - -.B htproxyinfo -examines a local copy of a GSI proxy, and outputs a summary of its X.509 and -VOMS contents. - -.SH OPTIONS -.IP "-v/--verbose" -Turn on debugging information. - -.IP "--delegation-id " -Explicitly specify the Delegation ID to use. - -.IP "--destroy" -Instead of delegating a proxy, delete the proxy from the service's proxy -cache. Calling the program as htproxydestroy has the same effect. - -.IP "--time" -Instead of delegating a proxy, report the expiration time of the proxy, -in the local time of the client. Calling the program as htproxytime has the -same effect. - -.IP "--unixtime" -Instead of delegating a proxy, report the expiration time of the proxy, as -the number of seconds since 00:00:00 1970-01-01 UTC. Calling the program as -htproxyunixtime has the same effect. - -.IP "--renew" -Delegate an updated version of an existing proxy. The Delegation ID -.B must -be given when using this option. Calling the program as htproxyrenew has the -same effect. - -.IP "--info" -Examine a local proxy file, and output a summary of the X.509 certificates -and VOMS attributes it contains. Calling the program as htproxyinfo has the -same effect. - -.IP "--cert and --key " -Path to the PEM-encoded -X.509 or GSI Proxy user certificate and key to use for HTTPS -connections, intead of "anonymous mode." If only one of --key or --cert -is given, then that will be tried for both. If neither is given, then the -following order of precedence is used: -the file name held by the variable X509_USER_PROXY; the file -/tmp/x509up_uID (with Unix UID equal to ID); the file names held by -X509_USER_CERT / X509_USER_KEY; the files ~/.globus/usercert.pem and -~/.globus/userkey.pem (where ~/ is the home directory of the user.) - -.IP "--capath " -Path to the PEM-encoded CA root certificates to use when -verifying remote servers' host certificates in HTTPS connections. Ideally -this should be a directory of hash.0 files as described in the OpenSSL -verify(1) man page, but a file may be used instead. If --capath is not -given, the value of the environment variable X509_CERT_DIR will be tried. -If this is not valid, then /etc/grid-security/certificates will be used. - -.IP "--no-verify" -Do not use CA root certificates to verify remote servers' host certificates. -This is useful for testing sites before their certificate is set up properly, -but leaves you vulnerable to "man in the middle" attacks by hostile servers -masquerading as your target. - -.SH FILES -.IP /tmp/x509up_uID -Default GSI Proxy file for Unix UID equal to ID. - -.IP /etc/grid-security/certificates -Default location for trusted Certification Authority root certificates to use -when checking server certificates. - -.IP /tmp/.ca-roots-XXXXXX -Prior to 7.9.8, the underlying curl library did not support the CA root -certificates directory. -If built with an old version of libcurl, htproxyput will concatenate the -certificates in the CA roots directory into a unique temporary file and use -that. - -.SH ENVIRONMENT - -.IP X509_CERT_DIR -Holds directory to search for Certification Authority root certificates when -verifying server certificates. (Tried if --capath is not given on the -command line.) - -.IP X509_USER_PROXY -Holds file name of a GSI Proxy to use as user certificate. (Tried if --cert or ---key are not given on the command line.) - -.IP "X509_USER_CERT and X509_USER_KEY" -Holds file name of X.509 user certificate and key. (Tried if X509_USER_PROXY -is not valid.) - -.SH EXIT CODES -0 is returned on complete success, and non-zero on error. - -.SH TO DO -Better error recovery. - -.SH AUTHOR -Andrew McNab - -htproxyput is part of GridSite: http://www.gridsite.org/ -.SH "SEE ALSO" -.BR htcp(1), -.BR gridsite-delegation(8) diff --git a/org.gridsite.core/doc/htproxyrenew.1 b/org.gridsite.core/doc/htproxyrenew.1 deleted file mode 100644 index 57f80ce..0000000 --- a/org.gridsite.core/doc/htproxyrenew.1 +++ /dev/null @@ -1 +0,0 @@ -.so man1/htproxyput.1 diff --git a/org.gridsite.core/doc/htproxytime.1 b/org.gridsite.core/doc/htproxytime.1 deleted file mode 100644 index 57f80ce..0000000 --- a/org.gridsite.core/doc/htproxytime.1 +++ /dev/null @@ -1 +0,0 @@ -.so man1/htproxyput.1 diff --git a/org.gridsite.core/doc/htproxyunixtime.1 b/org.gridsite.core/doc/htproxyunixtime.1 deleted file mode 100644 index 57f80ce..0000000 --- a/org.gridsite.core/doc/htproxyunixtime.1 +++ /dev/null @@ -1 +0,0 @@ -.so man1/htproxyput.1 diff --git a/org.gridsite.core/doc/htrm.1 b/org.gridsite.core/doc/htrm.1 deleted file mode 100644 index 11a60d1..0000000 --- a/org.gridsite.core/doc/htrm.1 +++ /dev/null @@ -1 +0,0 @@ -.so man1/htcp.1 diff --git a/org.gridsite.core/doc/httpd-fileserver.conf b/org.gridsite.core/doc/httpd-fileserver.conf deleted file mode 100644 index fbc170c..0000000 --- a/org.gridsite.core/doc/httpd-fileserver.conf +++ /dev/null @@ -1,155 +0,0 @@ -############################################################################## -## GridSite httpd-fileserver.conf - Andrew McNab -## -## For GridSite documentation, see http://www.gridsite.org/ -## -## Example configuration file for GridSite as an HTTP(S) fileserver, -## listening on ports 80/777 (HTTP) and 443/488 (HTTPS) -## -## (777/488 is to allow firewalls to distinguish between Grid and -## Web HTTP(S) traffic. See http://www.gridsite.org/wiki/IP_Ports ) -## -## This file should be renamed /etc/httpd/conf/httpd.conf and Apache -## restarted to use Apache2/GridSite as a simple HTTP(S) fileserver. -## -## You do not need to install the GridSite mod_ssl.so module if you -## do not wish to use Globus Proxies or VOMS attributes, but you must -## have the mod_gridsite.so in /usr/lib/httpd/modules -## -## We're assuming you have (a) the host's hostcert.pem and hostkey.pem -## in /etc/grid-security/ and (b) the Certification Authorities' you -## trust have their root certs in /etc/grid-security/certificates -## -## (You can get RPMs for many European and North American Grid CAs -## from https://datagrid.in2p3.fr/distribution/datagrid/security/ ) -## -## If you want to use DN Lists in ACLs, they should be placed/downloaded -## in /etc/grid-security/dn-lists/ -## -## To start serving files, make a directory /var/www/htdocs owned by -## apache.apache, including the file .gacl containing: -## -## -## -## -## -## -## -## -## To enable writing, add DN List, Person or VOMS entries to the GACL -## (see the GridSite GACL document for the syntax.) For example: -## -## -## -## -## -## -## -## -## /C=UK/O=eScience/OU=Manchester/L=HEP/CN=Andrew McNab -## -## -## -## -## -## and add the following directive to the HTTPS section: -## -## GridSiteMethods GET PUT DELETE MOVE -## -## If you wish to accept Globus GSI Proxies as well as full X.509 user -## certificates, set GridSiteGSIProxyLimit to the depth of proxy you -## wish to accept. -## -## (As a _rough_ guide: 0=No Proxies; 1=Proxy on user's machine; 2=Proxy -## owned by running Globus job; 3=Proxy delegated by a Globus job.) -## -## With this done and Apache restarted, you can upload a file with: -## -## curl -v --cert ~/.globus/usercert.pem --key ~/.globus/userkey.pem \ -## --capath /etc/grid-security/certificates --upload-file /tmp/tmp.txt \ -## https://INSERT.HOSTNAME.HERE/tmp.txt -## -## (or with --cert /tmp/x509up_u`id -u` --key /tmp/x509up_u`id -u` to use -## a Globus GSI Proxy created with grid-proxy-init.) -## -############################################################################## - -ServerRoot "/etc/httpd" - -PidFile logs/httpd.pid - -Timeout 300 -KeepAlive On -MaxKeepAliveRequests 100 -KeepAliveTimeout 15 - -LoadModule log_config_module /usr/lib/httpd/modules/mod_log_config.so -LoadModule ssl_module /usr/lib/httpd/modules/mod_ssl.so -LoadModule gridsite_module /usr/lib/httpd/modules/mod_gridsite.so -LoadModule mime_module /usr/lib/httpd/modules/mod_mime.so -LoadModule dir_module /usr/lib/httpd/modules/mod_dir.so - -TypesConfig /etc/mime.types - -# User and group who will own files created by Apache -User apache -Group apache - -DocumentRoot "/var/www/htdocs" - - - AllowOverride None - - -LogLevel debug -LogFormat "%h \"%{SSL_CLIENT_S_DN}x\" %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined - -CustomLog logs/httpd-gridsite-access combined -ErrorLog logs/httpd-gridsite-errors - -HostnameLookups On - -###################################################################### -# Plain unauthenticated HTTP on ports 80 and 777 -###################################################################### - -Listen 80 -Listen 777 - - - - GridSiteIndexes on - GridSiteAuth on - GridSiteDNlists /etc/grid-security/dn-lists/ - - - - -###################################################################### -# Secured and possibly authenticated HTTPS on ports 443 and 488 -###################################################################### -Listen 443 -Listen 488 -SSLSessionCacheTimeout 300 -SSLSessionCache shm:/var/cache/mod_ssl/shm_cache - - - -SSLEngine on -SSLCertificateFile /etc/grid-security/hostcert.pem -SSLCertificateKeyFile /etc/grid-security/hostkey.pem -SSLCACertificatePath /etc/grid-security/certificates -#SSLCARevocationPath YOUR CRL DIRECTORY WOULD GO HERE -SSLVerifyClient optional -SSLVerifyDepth 10 -SSLOptions +ExportCertData +StdEnvVars - - - GridSiteIndexes on - GridSiteAuth on - GridSiteDNlists /etc/grid-security/dn-lists/ - GridSiteGSIProxyLimit 0 -# GridSiteMethods GET PUT DELETE MOVE - - - diff --git a/org.gridsite.core/doc/httpd-webserver.conf b/org.gridsite.core/doc/httpd-webserver.conf deleted file mode 100644 index 710bb12..0000000 --- a/org.gridsite.core/doc/httpd-webserver.conf +++ /dev/null @@ -1,226 +0,0 @@ -############################################################################## -## GridSite httpd-webserver.conf - Andrew McNab -## -## For GridSite documentation, see http://www.gridsite.org/ -## -## Example configuration file for GridSite as a Web Server -## (that is, primarily for interactive use with a browser.) -## Listening is on ports 80/777 (HTTP) and 443/488 (HTTPS). -## -## (777/488 is to allow firewalls to distinguish between Grid and -## Web HTTP(S) traffic. See http://www.gridsite.org/wiki/IP_Ports ) -## -## This file should be renamed /etc/httpd/conf/httpd.conf and Apache -## restarted to use Apache2/GridSite as a webserver. -## -## You do not need to install the GridSite mod_ssl.so module if you -## do not wish to use Globus Proxies or VOMS attributes, but you must -## have the mod_gridsite.so in /usr/lib/httpd/modules -## -## We're assuming you have (a) the host's hostcert.pem and hostkey.pem -## in /etc/grid-security/ and (b) the Certification Authorities' you -## trust have their root certs in /etc/grid-security/certificates -## -## (You can get RPMs for many European and North American Grid CAs -## from https://datagrid.in2p3.fr/distribution/datagrid/security/ ) -## -## If you want to use DN Lists in ACLs, they should be placed/downloaded -## in /etc/grid-security/dn-lists/ or /var/www/htdocs/dn-lists/ -## (Lists in /etc/grid-security/dn-lists/ override lists elsewhere.) -## -## To start serving files, make a directory /var/www/htdocs owned by -## apache.apache, including the file .gacl containing: -## -## -## -## -## -## -## -## -## To enable writing, add DN List, Person or VOMS entries to the GACL -## (see the GridSite GACL document for the syntax.) For example: -## -## -## -## -## -## -## -## -## /C=UK/O=eScience/OU=Manchester/L=HEP/CN=Andrew McNab -## -## -## -## -## -## and add the following directive to the HTTPS section: -## -## GridSiteMethods GET PUT DELETE MOVE -## -## If you wish to accept Globus GSI Proxies as well as full X.509 user -## certificates, set GridSiteGSIProxyLimit to the depth of proxy you -## wish to accept. -## -## (As a _rough_ guide: 0=No Proxies; 1=Proxy on user's machine; 2=Proxy -## owned by running Globus job; 3=Proxy delegated by a Globus job.) -## -## With this done and Apache restarted, you can upload a file with: -## -## curl -v --cert ~/.globus/usercert.pem --key ~/.globus/userkey.pem \ -## --capath /etc/grid-security/certificates --upload-file /tmp/tmp.txt \ -## https://INSERT.HOSTNAME.HERE/tmp.txt -## -## (or with --cert /tmp/x509up_u`id -u` --key /tmp/x509up_u`id -u` to use -## a Globus GSI Proxy created with grid-proxy-init.) -############################################################################## - -ServerRoot "/etc/httpd" - -## You MUST put your server's fully qualified domain name here -## This, the DOMAIN part of the https://DOMAIN/... URLs you want -ServerName FULL.SERVER.NAME - -PidFile logs/httpd.pid - -Timeout 300 -KeepAlive On -MaxKeepAliveRequests 100 -KeepAliveTimeout 15 - -LoadModule log_config_module /usr/lib/httpd/modules/mod_log_config.so -LoadModule ssl_module /usr/lib/httpd/modules/mod_ssl.so -LoadModule gridsite_module /usr/lib/httpd/modules/mod_gridsite.so -LoadModule mime_module /usr/lib/httpd/modules/mod_mime.so -LoadModule dir_module /usr/lib/httpd/modules/mod_dir.so -LoadModule alias_module /usr/lib/httpd/modules/mod_alias.so -LoadModule cgi_module /usr/lib/httpd/modules/mod_cgi.so - -TypesConfig /etc/mime.types - -# User and group who will own files created by Apache -User apache -Group apache - -DocumentRoot "/var/www/htdocs" - - - AllowOverride None - - -LogLevel debug -LogFormat "%h \"%{SSL_CLIENT_S_DN}x\" %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined - -CustomLog logs/httpd-gridsite-access combined -ErrorLog logs/httpd-gridsite-errors - -HostnameLookups On - -###################################################################### -# Plain unauthenticated HTTP on ports 80 and 777 -###################################################################### - -Listen 80 -Listen 777 - - -## This is used to serve the Manage Directory links in footers, -## and to allow you to edit files and ACLs via your browser. -ScriptAlias /real-gridsite-admin.cgi /usr/sbin/real-gridsite-admin.cgi - - - ## This sets up GACL authorization for this server. - GridSiteAuth on - - ## This exports various bits of info into the CGI environment - ## variables (and is needed for gridsite-admin.cgi to work.) - GridSiteEnvs on - - ## Nice GridSite directory listings (without truncating file names!) - GridSiteIndexes on - - ## If this is on, GridSite will look for gridsitehead.txt and - ## gridsitefoot.txt in the current directory or its parents, and - ## use them to replace the and tags in .html files. - GridSiteHtmlFormat on - - ## These directives (and the ScriptAlias above) allow authorized - ## people to manage files, ACLs and DN Lists through their web - ## browsers. Via HTTP, this just means extended directory listings - ## and History pages. - GridSiteAdminURI /real-gridsite-admin.cgi - GridSiteAdminFile gridsite-admin.cgi - - - - -###################################################################### -# Secured and possibly authenticated HTTPS on ports 443 and 488 -###################################################################### -Listen 443 -Listen 488 -SSLSessionCacheTimeout 300 -SSLSessionCache shm:/var/cache/mod_ssl/shm_cache - - - -SSLEngine on -SSLCertificateFile /etc/grid-security/hostcert.pem -SSLCertificateKeyFile /etc/grid-security/hostkey.pem -SSLCACertificatePath /etc/grid-security/certificates -#SSLCARevocationPath YOUR CRL DIRECTORY WOULD GO HERE -SSLVerifyClient optional -SSLVerifyDepth 10 -SSLOptions +ExportCertData +StdEnvVars - -## This is used to serve the Manage Directory links in footers, -## and to allow you to edit files and ACLs via your browser. -ScriptAlias /real-gridsite-admin.cgi /usr/sbin/real-gridsite-admin.cgi - - - ## This sets up GACL authorization for this server. - GridSiteAuth on - - ## This exports various bits of info into the CGI environment - ## variables (and is needed for gridsite-admin.cgi to work.) - GridSiteEnvs on - - ## Nice GridSite directory listings (without truncating file names!) - GridSiteIndexes on - - ## If this is on, GridSite will look for gridsitehead.txt and - ## gridsitefoot.txt in the current directory or its parents, and - ## use them to replace the and tags in .html files. - GridSiteHtmlFormat on - - ## This is the path of directories (and all their subdirectories) for - ## GACL to search when it encounters a dn-list credential. The DN List - ## files are plain text, one DN per line, and must have the full url - ## as the file name, but URL Encoded - eg with urlencode(1) - GridSiteDNlists /etc/grid-security/dn-lists/:/var/www/htdocs/dn-lists/ - - ## This is used to form the URL at which DN Lists "owned" by this - ## server are exported. https://FULL.SERVER.NAME/dn-lists/file - ## ALL FILES WITH URLs ON THIS SERVER WILL BE EXPORTED IRRESPECTIVE - ## OF WHERE THEY ARE FOUND ON THE DN-LISTS PATH!! - GridSiteDNlistsURI /dn-lists/ - - ## If this is greater than zero, we will accept GSI Proxies for clients - ## (full client certificates - eg inside web browsers - are always ok) - GridSiteGSIProxyLimit 0 - - ## This directive allows authorized people to write/delete files - ## from non-browser clients - eg with htcp(1) - GridSiteMethods GET PUT DELETE MOVE - - ## These directives (and the ScriptAlias above) allow authorized - ## people to manage files, ACLs and DN Lists through their web - ## browsers via HTTPS. The value of GridSiteAdminFile appears to - ## exist in every directory, but is internally redirected by - ## mod_gridsite to the value of GridSiteAdminURI (the ScriptAlias - ## then maps that onto the real-gridsite-admin.cgi executable.) - GridSiteAdminURI /real-gridsite-admin.cgi - GridSiteAdminFile gridsite-admin.cgi - - - diff --git a/org.gridsite.core/doc/index.html b/org.gridsite.core/doc/index.html deleted file mode 100644 index 46c147b..0000000 --- a/org.gridsite.core/doc/index.html +++ /dev/null @@ -1,82 +0,0 @@ -GridSite 1.5.x Documentation - -

    GridSite 1.5.x Documentation

    - -

    -GridSite -is a set of extensions to the Apache 2.0 webserver, which support -Grid security based on X.509 certificates. Since GridSite applies access -control within Apache itself, via mod_gridsite, Grid authorization and -the associated verified credentials are available to all technologies -supported by Apache, including static file serving, SSI, CGI, PHP, JSP and -mod_perl. - -

    -The GridSite Wiki includes -guides and cookbook examples about using GridSite, along with up to date -information about the APIs. - -

    Reference

    - -

    -The following reference documents and man pages are put in -/usr/share/doc/gridsite-VERSION when GridSite is installed. - -

    -

    - -
    htcp(1) -
    A command line tool for copying files to or from HTTP(S) servers. -

    - -

    mod_gridsite(8) -
    An Apache 2.0 module which enforces access control via Grid Access - Control Lists, and X.509, GSI or VOMS credentials. mod_gridsite also - gives Apache built-in support for the HTTP PUT and DELETE methods, and - formatting of HTML pages with standard headers and footers. -

    - -

    gsexec(8) -
    A modified version of suexec(8), for use with mod_gridsite(8). gsexec - allows CGI programs to be run as pool users, depending on the client's - X.509 identity or the directory in which the CGI is located. -

    - -

    httpd-fileserver.conf and - httpd-webserver.conf -
    Example configuration files for simple HTTP(S) fileservers and - webservers, with explanatory comments. -

    - -

    urlencode(1) -
    A command for URL-encoding strings. -

    - -

    findproxyfile(1) -
    The findproxyfile command returns full path to a GSI Proxy file, - either in the proxy cache maintained by the GridSite G-HTTPS and - delegation portType functions, or in other standard places. -

    - - - -

    fuse.spec -
    An RPM SPEC file which can be used to build the - FUSE kernel module, - library and commands on Linux 2.4.x and 2.6.x systems, for use with - SlashGrid. -

    - -

    gridsite.h API reference -
    A detailed description of the C API provided by libgridsite, generated - from the sources by doxygen. -

    - -

    - - diff --git a/org.gridsite.core/doc/mod_gridsite.8 b/org.gridsite.core/doc/mod_gridsite.8 deleted file mode 100644 index fc8c3bb..0000000 --- a/org.gridsite.core/doc/mod_gridsite.8 +++ /dev/null @@ -1,325 +0,0 @@ -.TH MOD_GRIDSITE 8 "October 2005" "mod_gridsite" "GridSite Manual" -.SH NAME -.B mod_gridsite -\- Grid extensions to Apache httpd -.SH SYNOPSIS -.B LoadModule gridsite_module mod_gridsite.so -.SH DESCRIPTION -.B mod_gridsite -is an Apache 2.0 module which enforces access control via Grid -Access Control Lists, and X.509, GSI or VOMS credentials. mod_gridsite also -gives Apache built-in support for the HTTP PUT and DELETE methods, and -formatting of HTML pages with standard headers and footers. - -Since mod_gridsite access -control within Apache itself, Grid authorization and -the associated verified credentials are available to all technologies -supported by Apache, including static file serving, SSI, CGI, PHP, mod_perl -and Java servlets via a connector to Tomcat. - -Operation of mod_gridsite can be configured using runtime directives -in Apache's standard httpd.conf configuration file. The module must first be -loaded with a LoadModule directive: - -LoadModule gridsite_module /PATH/TO/MODULES/mod_gridsite.so - -The module's behaviour is then controlled by GridSite... directives within -Apache sections, allowing different directories to use -GridSite features in different ways. - -.SH DIRECTIVES - -.IP "GridSiteIndexes on|off" -Determines whether GridSite generates HTML directory listings. These -have some advantages over standard Apache directory listings (eg the -displayed filenames are never truncated) and will include standard -headers and footers if GridSiteHtmlFormat is on. -(Default: GridSiteIndexes off) - -.IP "GridSiteIndexHeader file" -If the named file is found in the directory being listed, the file -is included verbatim at the top of the listing and excluded from -the file-by-file listing. The file can either be HTML or plain text (in -which case browsers will be treat it as one HTML paragraph.) -(Default: none) - -.IP "GridSiteHtmlFormat on|off" -Determines where HTML pages receive additional formatting before being -sent to the client. This includes the "Last modified", -"View page history", "Switch to HTTP(S)", -"Print View" and "Built with GridSite" footer -elements. If header and footer files are found, they will be used too. -(Default: GridSiteHtmlFormat off) - -.IP "GridSiteHeadFile file" -.IP "GridSiteFootFile file" -Set the filenames to be searched for as standard headers and footers -for HTML pages. For each HTML page, the directory of that page is tried -first, and then parent directories in ascending order until a header / -footer file is found. Header files are inserted in place of HTML - tags; footer files in place of . (These -standard files should each include the appropriate body tag as a -replacement.) -(Defaults: GridSiteHeadFile gridsitehead.txt, -GridSiteFootFile gridsitefoot.txt) - -.IP "GridSiteAuth on|off" -Enables GridSite access control features, using -GACL files. The files are named .gacl and are -per-directory. The current directory is tried and then parent -directories in ascending order until a .gacl file is found. -(Default: GridSiteAuth off) - -.IP "GridSiteAdminList uri" -All members of the DN List with name "uri" receive the full set -of permissions, irrespective of per-directory .gacl files. People in -this group have full control over the whole site. -(Default: none) - -.IP "GridSiteGSIProxyLimit limit" -When using GSI Proxy credentials, -proxies with delegation depth greater than "limit" will -be ignored by mod_gridsite authorization decisions. A limit of zero -implies only full X.509 -certificates (and no proxies) will be accepted. A limit of 1 implies -that only the initial proxy, usually created on the user's own machine, -is acceptable. Higher levels lead to proxies on remote machines, eg -used by running jobs, being accepted. -(Default: GridSiteGSIProxyLimit 1) - -.IP "GridSiteMethods [GET] [PUT] [DELETE] [MOVE]" -Specifies which HTTP methods are supported by GridSite. GET (and HEAD) -are always supported. PUT and DELETE support is turned on by this -directive, subject to a positive statement that write permission is -allowed for the directory in question, by a GACL file. -(Default: GridSite GET) - -.IP "GridSiteDNlists directory1[:directory2[:directory3]...]" -Sets up the DN List path used by GACL for -evaluating credentials. If this directive is not used, -then GACL will use the GRST_DN_LISTS variable from Apache's own -environment. If that is not set either, then /etc/grid-security/dn-lists -is searched. -(Default: none) - -.IP "GridSiteDNlistsURI uri" -If GridSiteDNlistsURI is used, then the URI given appears to be -populated with all the DN lists on the current DN lists path which -match the current server. That is, for server https://example.org/ -with DN lists URI /dn-lists/, all DN lists with URLs starting -https://example.org/dn-lists/ will appear to be present in /dn-lists/, -irrespective of where in the path they are stored. -(Default: none) -

    - -.IP "GridSiteAdminURI uri" -GridSiteAdminURI gives the absolute URI on the server of the GridSite -Admin CGI program, which is used for file management, HTML and GACL -editing. This should be used in conjunction with the standard Apache -directive ScriptAlias to map that URI to the real-gridsite-admin.cgi -executable. For example: - -ScriptAlias /real-gridsite-admin.cgi /PATH/TO/real-gridsite-admin.cgi - -This URI is always reached by an internal redirection from the value -set by GridSiteAdminFile, and is never visible to users. -(Default: none) - -.IP "GridSiteAdminFile cgifilename" -If GridSiteAdminURI is set, then the cgifilename of GridSiteAdminFile -appears to be present in all directories when explicitly -requested (it does not appear in directory listings.) Requests for these -ghost CGI URIs are internally redirected to the value set by -GridSiteAdminURI. (Default: GridSiteAdminFile gridsite-admin.cgi) - -.IP "GridSiteEnvs on|off" -This makes mod_gridsite export several variables into the environment -of CGI programs and other dynamic content systems. The variable names -are listed below. For gridsite-admin.cgi mechanism to work, this switch -must be left in its default state of on. -(Default: GridSiteEnvs on) - -.IP "GridSiteEditable [ext1 [ext2 [ext3] ...]]]" -A space-separated list of file extensions which can safely be edited -by the GridSite Text/HTML editor. The extensions are given without the -initial dot. This directive must apply to the gridsite-admin.cgi -executable, rather than just to the files it manages. This is most -easily achieved by placing GridSiteEditable in the main section of -the virtual host, outside any Directory or Location containers. -(Default: GridSiteEditable txt shtml html htm css js php jsp) - -.IP "GridSiteHelpURI uri" -If set, gives the URI to use for "Website Help" links in HTML -page footers. (Default: none) - -.IP "GridSiteLink on|off" -Turns off the link in the HTML page footers which gives credit to GridSite. -(Default: GridSiteLink on) - -.IP "GridSiteUnzip path" -If "path" is set by this directive, then real-gridsite-admin.cgi -will offer to list the contents of .zip archives on the server. -Users with write access are able to unpack the contents into the same -directory as the .zip file. The value of "path" must point -to the location of the unzip binary. (Default: none) - -.IP "GridSiteGridHTTP on|off" -Enable GridHTTP for this server, virtual server or directory: -HTTPS requests made with the header -.BR "Upgrade: GridHTTP/1.0" -will be redirected to an HTTP version of the file. (Default: off) - -.IP "GridSiteGridHTTPport port" -Sets the port to use for the unencrypted HTTP component of GridHTTP -HTTPS->HTTP transfers. The same setting will be used for all virtual hosts -which support GridHTTP. (Default: 777) - -.IP "GridSiteSessionsDir path" -Location of authentication cookies and SSL session credentials directory, -relative to ServerRoot. Used by GridHTTP to record the credentials obtained -via HTTPS, and available to the corresponding HTTP request or subsequent -HTTPS requests following a session restart. -(Default: /var/www/sessions) - -.IP "GridSiteACLFormat GACL|XACML" -Format to use when writing .gacl files. (Both formats are automatically -recognised when reading.) (Default: GACL) - -.IP "GridSiteACLPath path" -Specify the absolute or relative (to ServerRoot) path of the ACL file -governing this section of the server's URL space. This can be applied to -virtual URL spaces provided by other modules, such as DAV or SVN, using -the Apache container. If the path contains %0, it is replaced -by this virtual server's hostname. If it contains %1, %2, ... it is replaced -with the 1st, 2nd, ... component of the request's URI, separated by slashes -and counting from immediately after the initial slash. - -.IP "GridSiteExecMethod nosetuid|suexec|X509DN|directory" -Execution strategy for CGI scripts and executables. For options other -than nosetuid, suexec (or gsexec renamed suexec) must installed. For -X509DN and directory, gsexec must be installed, as suexec. See -.BR "gsexec(8)" -for an explanation of the different execution strategies. -(Default: nosetuid) - -.IP "GridSiteUserGroup user group" -Unix user and group when using suexec (or gsexec as suexec.) This -is equivalent to the suexec SuexecUserGroup directive, but can be -specified on a per-directory basis. (Default: none) - -.IP "GridSiteDiskMode GroupNone|GroupRead|GroupWrite WorldNone|WorldRead" -The file creation permissions mode, taking two arguments to specify -the group and other permissions. The mode always includes read and write -permission for the CGI user itself. -(Default: GroupNone WorldNone) - -.IP "GridSiteCastUniPort port" -The -.BR UDP -unicast port to listen on for HTCP queries, and from which to -send replies to HTCP unicast and multicast queries. Ideally, this should be -a privileged port below 1024. This directive may not appear within a virtual -server. (Default: 777) - -.IP "GridSiteCastGroup group[:port]" -A UDP multicast group on which to listen for HTCP queries, plus an optional -port. If no port is given, then 777 is used. Multiple GridSiteCastGroup -directives can be given to cause the UDP responder to listen to more than -one multicast group. This directive may not appear within a virtual server. - -.IP "GridSiteCastAlias URL-prefix path-prefix" -Maps SiteCast generic URLs to the local filesystem. When processing -HTCP queries, matching SiteCast URLs will have URL-prefix stripped off -and the remaining portion of the URL added to path-prefix to construct a -local path and filename. If a file is found with that name, a SiteCast HTCP -response will be returned to the querying host. Otherwise the queries are -ignored. -This directive may appear within virtual servers, and the virtual server's -servername and first port will determine the host and port name used to -construct the transfer URL. - -.SH ENVIRONMENT - -The following variables are present in the environment of CGI programs and -other dynamic content systems if the -.BR "GridSiteEnvs on" -directive is in effect. - -.IP GRST_PERM -Numerical value of the permission bit-map obtained by comparing the -user with the GACL in force. (These should be tested using the -GRSTgaclPermHasXXXX functions from GACL.) - -.IP GRST_ADMIN_LIST -URI of the DN List, listing people with full admin and write access -to the whole site. - -.IP GRST_GSIPROXY_LIMIT -Maximum valid delegation level for GSI Proxies. - -.IP GRST_DIR_PATH -Absolute path in the local filesystem to the directory holding the -file being requested. - -.IP GRST_DESTINATION_TRANSLATED -Present if a WebDAV -.BR "Destination:" -header was given in the request with a local URL. Contains the translation of -the URL given into an absolute path in the local filesystem. - -.IP GRST_HELP_URI -URI of website help pages set by GridSiteHelpURI directive. - -.IP GRST_ADMIN_FILE -Filename of per-directory ghost gridsite-admin.cgi program. (This is -used by real-gridsite-admin.cgi to construct links in its pages.) - -.IP GRST_EDITABLE -Space-separated list of extensions which can safely be edited with a -Text/HTML editor. - -.IP "GRST_HEAD_FILE and GRST_FOOT_FILE" -Filenames of standard header and footer files. - -.IP GRST_DN_LISTS -DN lists search path. - -.IP GRST_DN_LISTS_URI -Directory of virtual URIs used to publish this site's DN Lists. - -.IP GRST_UNZIP -Full path to the -.BR "unzip(1)" -binary, used to list and unpack .zip files. - -.IP GRST_NO_LINK -If set, do not include credit links to GridSite in page footers. - -.IP GRST_ACL_FORMAT -Format to use when writing .gacl files: either GACL or XACML. - -.IP GRST_EXEC_METHOD -Specified by -.BR GridSiteExecMethod -either suexec, X509DN or directory. - -.IP GRST_EXEC_DIRECTORY -The directory containing the CGI script or executable (used by gsexec -to determine which pool account to use in directory mapping mode.) - -.IP GRST_DISK_MODE -The -.BR Apache -disk permission modes bit pattern, in hexadecimal, starting with 0x. -(Similar to the Unix bit pattern, except with hexadecimal rather than -octal values: eg 0x600 [Apache] vs 0600 [Unix] -are both read/write for user only.) - -.SH AUTHOR -Andrew McNab - -mod_gridsite is part of GridSite: http://www.gridsite.org/ -.SH "SEE ALSO" -.BR htcp(1), -.BR httpd(8), -.BR gsexec(8) diff --git a/org.gridsite.core/doc/slashgrid.8 b/org.gridsite.core/doc/slashgrid.8 deleted file mode 100644 index 64f058f..0000000 --- a/org.gridsite.core/doc/slashgrid.8 +++ /dev/null @@ -1,67 +0,0 @@ -.TH SLASHGRID 28 "September 2006" "slashgrid" "GridSite Manual" -.SH NAME -.B slashgrid -\- Local and remote virtual filesystems using grid credentials - -.SH "SYNOPSIS" - -.BR slashgrid -[--debug] [--domain DOMAIN --groups GROUPS] [--local-root PATH --local-user USER] [--gridmapdir PATH] [--foreground] - -.SH "SUMMARY" - -SlashGrid provides remote virtual filesystems under /grid ("slash grid") -using HTTP/HTTPS as a transport protocol, and a local filesystem under -/grid/local which can give access to the DocumentRoot area of a webserver -on the same machine. In both local and remote cases, X.509, GSI Proxy -and VOMS credentials can be used as the basis of authorization decisions. - -.SH "REMOTE HTTP(S) SERVERS" - -SlashGrid maps URLs of the form https://d.n.s:port/path/file into virtual paths -of the form /grid/https/d.n.s:port/path/file (with /grid/http/ for -HTTP URLs.) - -SlashGrid attempts to obtain a user credential in the form of a GSI Proxy -file, either indicated by the variable X509_USER_PROXY in the environment -of the user's process, or a file of the form /tmp/x509up_uUID, where UID is -their Unix user ID. If none is found, an authenticated HTTPS request is made. - -.SH "SITECAST DOMAINS" - -If the slashgrid daemon is started with the option --domain, then URLs -with DNS component matching the given domain will be located using SiteCast -requests. SlashGrid will attempt to use UDP multicast queries to find a -transfer URL of a copy of the file requested. The option --groups must also -be used to specify a comma-separted list of one or more UDP multicast groups, -which will be searched in order. - -The SiteCast area of the virtual filesystem is read-only (to prevent -corruption of replicas.) - -.SH "LOCAL FILESYSTEM" - -This filesystem is intended for use with GridSite/Apache webservers, which -control access via .gacl policy files in each directory hierarchy. SlashGrid -can interpret these files internally, and this allows other services, such -as GridFTP running in chroot mode, to be share access to a common file store. - -.SH "OPTIONS" - -.TP ---debug -Turn on debugging. - -.SH "MORE INFORMATION" - -http://www.gridsite.org/wiki/SlashGrid - -.SH AUTHORS - -Andrew McNab - -SlashGrid is part of GridSite: http://www.gridsite.org/ - -.SH "SEE ALSO" -.BR htcp(1), -.BR mod_gridsite(8) diff --git a/org.gridsite.core/doc/urlencode.1 b/org.gridsite.core/doc/urlencode.1 deleted file mode 100644 index 7cdfbc3..0000000 --- a/org.gridsite.core/doc/urlencode.1 +++ /dev/null @@ -1,43 +0,0 @@ -.TH URLENCODE 1 "November 2003" "urlencode" "GridSite Manual" -.SH NAME -.B urlencode -\- convert strings to or from URL-encoded form -.SH SYNOPSIS -.B urlencode -[-m|-d] -.I string [string ...] -.SH DESCRIPTION -.B urlencode -encodes strings according to RFC 1738. - -That is, characters A-Z a-z 0-9 . _ -and - are passed through unmodified, but all other characters are -represented as %HH, where HH is their two-digit upper-case hexadecimal ASCII -representation. -For example, the URL http://www.gridpp.ac.uk/ becomes -http%3A%2F%2Fwww.gridpp.ac.uk%2F - -.B urlencode -converts each character in all the strings given on the command line. If -multiple strings are given, they are concatenated with separating spaces -before conversion. - -.SH OPTIONS -.IP "-m" -Instead of full conversion, do GridSite "mild URL encoding" in which A-Z a-z -0-9 . = - _ @ and / are passed through unmodified. This results in slightly -more human-readable strings but the application must be prepared to create -or simulate the directories implied by any slashes. - -.IP "-d" -Do URL-decoding rather than encoding, according to RFC 1738. %HH and %hh -strings are converted and other characters are passed through unmodified, -with the exception that + is converted to space. - -.SH EXIT CODES -0 is always returned. - -.SH AUTHOR -Andrew McNab - -urlencode is part of GridSite: http://www.gridsite.org/ diff --git a/org.gridsite.core/interface/gridsite-gacl.h b/org.gridsite.core/interface/gridsite-gacl.h deleted file mode 100644 index f739c00..0000000 --- a/org.gridsite.core/interface/gridsite-gacl.h +++ /dev/null @@ -1,188 +0,0 @@ -/* - Copyright (c) 2002-4, Andrew McNab, University of Manchester - All rights reserved. - - Redistribution and use in source and binary forms, with or - without modification, are permitted provided that the following - conditions are met: - - o Redistributions of source code must retain the above - copyright notice, this list of conditions and the following - disclaimer. - o Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following - disclaimer in the documentation and/or other materials - provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND - CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS - BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED - TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - POSSIBILITY OF SUCH DAMAGE. -*/ - -/*---------------------------------------------------------------* - * For more about GridSite: http://www.gridsite.org/ * - *---------------------------------------------------------------*/ - -#ifndef HEADER_GACL_H -#define HEADER_GACL_H -#endif - -#ifndef GACL_LIB_VERSION -#define GACL_LIB_VERSION "x.x.x" -#endif - -typedef GRSTgaclCred GACLcred; - -typedef int GACLaction; -typedef unsigned int GACLperm; - -typedef GRSTgaclEntry GACLentry; - -typedef GRSTgaclAcl GACLacl; - -typedef GRSTgaclUser GACLuser; - -extern char *gacl_perm_syms[]; -extern GACLperm gacl_perm_vals[]; - -#define GACL_PERM_NONE GRST_PERM_NONE -#define GACL_PERM_READ GRST_PERM_READ -#define GACL_PERM_LIST GRST_PERM_LIST -#define GACL_PERM_WRITE GRST_PERM_WRITE -#define GACL_PERM_ADMIN GRST_PERM_ADMIN - -#define GACLhasNone(perm) (perm == 0) -#define GACLhasRead(perm) ((perm & GRST_PERM_READ) != 0) -#define GACLhasList(perm) ((perm & GRST_PERM_LIST) != 0) -#define GACLhasWrite(perm) ((perm & GRST_PERM_WRITE) != 0) -#define GACLhasAdmin(perm) ((perm & GRST_PERM_ADMIN) != 0) - -#define GACL_ACTION_ALLOW GRST_ACTION_ALLOW -#define GACL_ACTION_DENY GRST_ACTION_DENY - -#define GACL_ACL_FILE GRST_ACL_FILE -#define GACL_DN_LISTS GRST_DN_LISTS - -#define GACLinit() GRSTgaclInit() - -#define GACLnewCred(x) GRSTgaclCredNew((x)) -/* GACLcred *GACLnewCred(char *); */ - -#define GACLaddToCred(x,y,z) GRSTgaclCredAddValue((x),(y),(z)) -/* int GACLaddToCred(GACLcred *, char *, char *); */ - -#define GACLfreeCred(x) GRSTgaclCredFree((x)) -/* int GACLfreeCred(GACLcred *); */ - -#define GACLaddCred(x,y) GRSTgaclEntryAddCred((x),(y)) -/* int GACLaddCred(GACLentry *, GACLcred *); */ - -#define GACLdelCred(x,y) GRSTgaclEntryDelCred((x),(y)) -/* int GACLdelCred(GACLentry *, GACLcred *); */ - -#define GACLprintCred(x,y) GRSTgaclCredPrint((x),(y)) -/* int GACLprintCred(GACLcred *, FILE *); */ - - -#define GACLnewEntry() GRSTgaclEntryNew() -/* GACLentry *GACLnewEntry(void); */ - -#define GACLfreeEntry(x) GRSTgaclEntryFree((x)) -/* int GACLfreeEntry(GACLentry *); */ - -#define GACLaddEntry(x,y) GRSTgaclAclAddEntry((x),(y)) -/* int GACLaddEntry(GACLacl *, GACLentry *); */ - -#define GACLprintEntry(x,y) GRSTgaclEntryPrint((x),(y)) -/* int GACLprintEntry(GACLentry *, FILE *); */ - - -#define GACLprintPerm(x,y) GRSTgaclPermPrint((x),(y)) -/* int GACLprintPerm(GACLperm, FILE *); */ - -#define GACLallowPerm(x,y) GRSTgaclEntryAllowPerm((x),(y)) -/* int GACLallowPerm(GACLentry *, GACLperm); */ - -#define GACLunallowPerm(x,y) GRSTgaclEntryUnallowPerm((x),(y)) -/* int GACLunallowPerm(GACLentry *, GACLperm); */ - -#define GACLdenyPerm(x,y) GRSTgaclEntryDenyPerm((x),(y)) -/* int GACLdenyPerm(GACLentry *, GACLperm); */ - -#define GACLundenyPerm(x,y) GRSTgaclEntryUndenyPerm((x),(y)) -/* int GACLundenyPerm(GACLentry *, GACLperm); */ - -#define GACLpermToChar(x) GRSTgaclPermToChar((x)) -/* char *GACLpermToChar(GACLperm); */ - -#define GACLcharToPerm(x) GRSTgaclPermFromChar((x)) -/* GACLperm GACLcharToPerm(char *); */ - -#define GACLnewAcl() GRSTgaclAclNew() -/* GACLacl *GACLnewAcl(void); */ - -#define GACLfreeAcl(x) GRSTgaclAclFree((x)) -/* int GACLfreeAcl(GACLacl *); */ - -#define GACLprintAcl(x,y) GRSTgaclAclPrint((x),(y)) -/* int GACLprintAcl(GACLacl *, FILE *); */ - -#define GACLsaveAcl(x,y) GRSTgaclAclSave((y),(x)) -/* int GACLsaveAcl(char *, GACLacl *); */ - -#define GACLloadAcl(x) GRSTgaclAclLoadFile((x)) -/* GACLacl *GACLloadAcl(char *); */ - -#define GACLfindAclForFile(x) GRSTgaclFileFindAclname((x)) -/* char *GACLfindAclForFile(char *); */ - -#define GACLloadAclForFile(x) GRSTgaclAclLoadforFile((x)) -/* GACLacl *GACLloadAclForFile(char *); */ - -#define GACLisAclFile(x) GRSTgaclFileIsAcl((x)) -/* int GACLisAclFile(char *); */ - - -#define GACLnewUser(x) GRSTgaclUserNew((x)) -/* GACLuser *GACLnewUser(GACLcred *); */ - -#define GACLfreeUser(x) GRSTgaclUserFree((x)) -/* int GACLfreeUser(GACLuser *); */ - -#define GACLuserAddCred(x,y) GRSTgaclUserAddCred((x),(y)) -/* int GACLuserAddCred(GACLuser *, GACLcred *); */ - -#define GACLuserHasCred(x,y) GRSTgaclUserHasCred((x),(y)) -/* int GACLuserHasCred(GACLuser *, GACLcred *); */ - -#define GACLuserFindCredType(x,y) GRSTgaclUserFindCredtype((x),(y)) -/* GACLcred *GACLuserFindCredType(GACLuser *, char *); */ - -#define GACLtestDnList(x,y) GRSTgaclDNlistHasUser((x),(y)) -/* int GACLtestDnList(char *, GACLuser *); */ - -#define GACLtestUserAcl(x,y) GRSTgaclAclTestUser((x),(y)) -/* GACLperm GACLtestUserAcl(GACLacl *, GACLuser *); */ - -#define GACLtestExclAcl(x,y) GRSTgaclAclTestexclUser((x),(y)) -/* GACLperm GACLtestExclAcl(GACLacl *, GACLuser *); */ - - -#define GACLurlEncode(x) GRSThttpUrlEncode((x)) -/* char *GACLurlEncode(char *); */ - -#define GACLmildUrlEncode(x) GRSThttpUrlMildencode((x)) -/* char *GACLmildUrlEncode(char *); */ - -GACLentry *GRSTgaclEntryParse(xmlNodePtr cur); -/* special function for legacy EDG LB service */ diff --git a/org.gridsite.core/interface/gridsite.h b/org.gridsite.core/interface/gridsite.h deleted file mode 100644 index 7ebb07c..0000000 --- a/org.gridsite.core/interface/gridsite.h +++ /dev/null @@ -1,403 +0,0 @@ -/* - Copyright (c) 2002-6, Andrew McNab, University of Manchester - All rights reserved. - - Redistribution and use in source and binary forms, with or - without modification, are permitted provided that the following - conditions are met: - - o Redistributions of source code must retain the above - copyright notice, this list of conditions and the following - disclaimer. - o Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following - disclaimer in the documentation and/or other materials - provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND - CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS - BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED - TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - POSSIBILITY OF SUCH DAMAGE. -*/ - -/*---------------------------------------------------------------* - * For more about GridSite: http://www.gridsite.org/ * - *---------------------------------------------------------------*/ - -#ifndef HEADER_SSL_H -#include -#endif - -#ifndef HEADER_CRYPTO_H -#include -#endif - -#ifndef FALSE -#define FALSE (0) -#endif -#ifndef TRUE -#define TRUE (!FALSE) -#endif - -// Everything ok (= OpenSSL X509_V_OK) -#define GRST_RET_OK 0 - -// Failed for unspecified reason -#define GRST_RET_FAILED 1000 - -// Failed to find certificate in some cert store / directory -#define GRST_RET_CERT_NOT_FOUND 1001 - -// Bad signature -#define GRST_RET_BAD_SIGNATURE 1002 - -// No such file or directory -#define GRST_RET_NO_SUCH_FILE 1003 - - -// #define GRSTerrorLog(GRSTerrorLevel, GRSTerrorFmt, ...) if (GRSTerrorLogFunc != NULL) (GRSTerrorLogFunc)(__FILE__, __LINE__, GRSTerrorLevel, GRSTerrorFmt, __VA_ARGS__) - -#define GRSTerrorLog(GRSTerrorLevel, ...) if (GRSTerrorLogFunc != NULL) (GRSTerrorLogFunc)(__FILE__, __LINE__, GRSTerrorLevel, __VA_ARGS__) - -void (*GRSTerrorLogFunc)(char *, int, int, char *, ...); - -/* these levels are the same as Unix syslog() and Apache ap_log_error() */ - -#define GRST_LOG_EMERG 0 -#define GRST_LOG_ALERT 1 -#define GRST_LOG_CRIT 2 -#define GRST_LOG_ERR 3 -#define GRST_LOG_WARNING 4 -#define GRST_LOG_NOTICE 5 -#define GRST_LOG_INFO 6 -#define GRST_LOG_DEBUG 7 - -typedef struct { char *auri; - int delegation; - int nist_loa; - time_t notbefore; - time_t notafter; - void *next; } GRSTgaclCred; - -/* used by pre-AURI GRSTgaclCred structs */ -__attribute__ ((deprecated)) -typedef struct { char *name; - char *value; - void *next; } GRSTgaclNamevalue; - -typedef int GRSTgaclAction; -typedef unsigned int GRSTgaclPerm; - -typedef struct { GRSTgaclCred *firstcred; - GRSTgaclPerm allowed; - GRSTgaclPerm denied; - void *next; } GRSTgaclEntry; - -typedef struct { GRSTgaclEntry *firstentry; } GRSTgaclAcl; - -typedef struct { GRSTgaclCred *firstcred; char *dnlists; } GRSTgaclUser; - -#define GRST_PERM_NONE 0 -#define GRST_PERM_READ 1 -#define GRST_PERM_EXEC 2 -#define GRST_PERM_LIST 4 -#define GRST_PERM_WRITE 8 -#define GRST_PERM_ADMIN 16 -#define GRST_PERM_ALL 31 - -/* DO NOT USE PermIsNone!! */ -#define GRSTgaclPermIsNone(perm) ((perm) == 0) - -#define GRSTgaclPermHasNone(perm) ((perm) == 0) -#define GRSTgaclPermHasRead(perm) (((perm) & GRST_PERM_READ ) != 0) -#define GRSTgaclPermHasExec(perm) (((perm) & GRST_PERM_EXEC ) != 0) -#define GRSTgaclPermHasList(perm) (((perm) & GRST_PERM_LIST ) != 0) -#define GRSTgaclPermHasWrite(perm) (((perm) & GRST_PERM_WRITE) != 0) -#define GRSTgaclPermHasAdmin(perm) (((perm) & GRST_PERM_ADMIN) != 0) - -#define GRST_ACTION_ALLOW 0 -#define GRST_ACTION_DENY 1 - -#define GRST_HIST_PREFIX ".grsthist" -#define GRST_ACL_FILE ".gacl" -#define GRST_DN_LISTS "/etc/grid-security/dn-lists" -#define GRST_RECURS_LIMIT 9 - -#define GRST_PROXYCERTINFO_OID "1.3.6.1.4.1.3536.1.222" -#define GRST_VOMS_OID "1.3.6.1.4.1.8005.100.100.5" -#define GRST_VOMS_DIR "/etc/grid-security/vomsdir" - -#define GRST_ASN1_MAXCOORDLEN 50 -#define GRST_ASN1_MAXTAGS 500 - -struct GRSTasn1TagList { char treecoords[GRST_ASN1_MAXCOORDLEN+1]; - int start; - int headerlength; - int length; - int tag; } ; - -typedef struct { int type; /* CA, user, proxy, VOMS, ... */ - int errors; /* unchecked, bad sig, bad time */ - char *issuer; /* Cert CA DN, EEC of PC, or VOMS DN */ - char *dn; /* Cert DN, or VOMS AC holder DN */ - char *value; /* VOMS FQAN or NULL */ - time_t notbefore; - time_t notafter; - int delegation; /* relative to END of any chain */ - int serial; - char *ocsp; /* accessLocation field */ - void *raw; /* X509 or VOMS Extension object */ - void *next; } GRSTx509Cert; - -#define GRST_CERT_BAD_FORMAT 1 -#define GRST_CERT_BAD_CHAIN 2 -#define GRST_CERT_BAD_SIG 4 -#define GRST_CERT_BAD_TIME 8 -#define GRST_CERT_BAD_OCSP 16 - -#define GRST_CERT_TYPE_CA 1 -#define GRST_CERT_TYPE_EEC 2 -#define GRST_CERT_TYPE_PROXY 3 -#define GRST_CERT_TYPE_VOMS 4 - -/* a chain of certs, starting from the first CA */ -typedef struct { GRSTx509Cert *firstcert; } GRSTx509Chain; - -int GRSTx509CertLoad(GRSTx509Cert *, X509 *); -int GRSTx509ChainLoadCheck(GRSTx509Chain **, STACK_OF(X509) *, X509 *, char *, char *); -int GRSTx509ChainFree(GRSTx509Chain *); - -#define GRST_HTTP_PORT 777 -#define GRST_HTTPS_PORT 488 -#define GRST_HTCP_PORT 777 -#define GRST_GSIFTP_PORT 2811 - -#define GRSThtcpNOPop 0 -#define GRSThtcpTSTop 1 - -typedef struct { unsigned char length_msb; - unsigned char length_lsb; - char text[1]; } GRSThtcpCountstr; - -#define GRSThtcpCountstrLen(string) (256*((string)->length_msb) + (string)->length_lsb) - -typedef struct { unsigned char total_length_msb; - unsigned char total_length_lsb; - unsigned char version_msb; - unsigned char version_lsb; - unsigned char data_length_msb; - unsigned char data_length_lsb; - unsigned int response : 4; - unsigned int opcode : 4; - unsigned int rr : 1; - unsigned int f1 : 1; - unsigned int reserved : 6; - unsigned int trans_id; /* must be 4 bytes */ - GRSThtcpCountstr *method; - GRSThtcpCountstr *uri; - GRSThtcpCountstr *version; - GRSThtcpCountstr *req_hdrs; - GRSThtcpCountstr *resp_hdrs; - GRSThtcpCountstr *entity_hdrs; - GRSThtcpCountstr *cache_hdrs; } GRSThtcpMessage; - -int GRSTgaclInit(void); - -__attribute__ ((deprecated)) -GRSTgaclCred *GRSTgaclCredNew(char *); - -GRSTgaclCred *GRSTgaclCredCreate(char *, char *); - -__attribute__ ((deprecated)) -int GRSTgaclCredAddValue(GRSTgaclCred *, char *, char *); - -#define GRSTgaclCredSetNotBefore(cred, time) ((cred)->notbefore = (time)) -#define GRSTgaclCredGetNotBefore(cred) ((cred)->notbefore) - -#define GRSTgaclCredSetNotAfter(cred, time) ((cred)->notafter = (time)) -#define GRSTgaclCredGetNotAfter(cred) ((cred)->notafter) - -#define GRSTgaclCredSetDelegation(cred, level) ((cred)->delegation = (level)) -#define GRSTgaclCredGetDelegation(cred) ((cred)->delegation) - -#define GRSTgaclCredSetNistLoa(cred, level) ((cred)->nist_loa = (level)) -#define GRSTgaclCredGetNistLoa(cred) ((cred)->nist_loa) - -/* #define GACLfreeCred(x) GRSTgaclCredFree((x)) */ -int GRSTgaclCredFree(GRSTgaclCred *); - -/* #define GACLaddCred(x,y) GRSTgaclEntryAddCred((x),(y)) */ -int GRSTgaclEntryAddCred(GRSTgaclEntry *, GRSTgaclCred *); - -/* #define GACLdelCred(x,y) GRSTgaclEntryDelCred((x),(y)) */ -int GRSTgaclEntryDelCred(GRSTgaclEntry *, GRSTgaclCred *); - -/* #define GACLprintCred(x,y) GRSTgaclCredPrint((x),(y)) */ -int GRSTgaclCredCredPrint(GRSTgaclCred *, FILE *); - - -/* #define GACLnewEntry(x) GRSTgaclEntryNew((x)) */ -GRSTgaclEntry *GRSTgaclEntryNew(void); - -/* #define GACLfreeEntry(x) GRSTgaclEntryFree((x)) */ -int GRSTgaclEntryFree(GRSTgaclEntry *); - -/* #define GACLaddEntry(x,y) GRSTgaclAclAddEntry((x),(y)) */ -int GRSTgaclAclAddEntry(GRSTgaclAcl *, GRSTgaclEntry *); - -/* #define GACLprintEntry(x,y) GRSTgaclEntryPrint((x),(y)) */ -int GRSTgaclEntryPrint(GRSTgaclEntry *, FILE *); - - -/* #define GACLprintPerm(x,y) GRSTgaclPermPrint((x),(y)) */ -int GRSTgaclPermPrint(GRSTgaclPerm, FILE *); - -/* #define GACLallowPerm(x,y) GRSTgaclEntryAllowPerm((x),(y)) */ -int GRSTgaclEntryAllowPerm(GRSTgaclEntry *, GRSTgaclPerm); - -/* #define GACLunallowPerm(x,y) GRSTgaclEntryUnallowPerm((x),(y)) */ -int GRSTgaclEntryUnallowPerm(GRSTgaclEntry *, GRSTgaclPerm); - -/* #define GACLdenyPerm(x,y) GRSTgaclEntryDenyPerm((x),(y)) */ -int GRSTgaclEntryDenyPerm(GRSTgaclEntry *, GRSTgaclPerm); - -/* #define GACLundenyPerm(x,y) GRSTgaclEntryUndenyPerm((x),(y)) */ -int GRSTgaclEntryUndenyPerm(GRSTgaclEntry *, GRSTgaclPerm); - -/* #define GACLpermToChar(x) GRSTgaclPermToChar((x)) */ -char *GRSTgaclPermToChar(GRSTgaclPerm); - -/* #define GACLcharToPerm(x) GRSTgaclPermFromChar((x)) */ -GRSTgaclPerm GRSTgaclPermFromChar(char *); - -/* #define GACLnewAcl(x) GRSTgaclAclNew((x)) */ -GRSTgaclAcl *GRSTgaclAclNew(void); - -/* #define GACLfreeAcl(x) GRSTgaclAclFree((x)) */ -int GRSTgaclAclFree(GRSTgaclAcl *); - -/* #define GACLprintAcl(x,y) GRSTgaclAclPrint((x),(y)) */ -int GRSTgaclAclPrint(GRSTgaclAcl *, FILE *); - -/* #define GACLsaveAcl(x,y) GRSTgaclAclSave((y),(x)) */ -int GRSTgaclAclSave(GRSTgaclAcl *, char *); - -/* #define GACLloadAcl(x) GRSTgaclFileLoadAcl((x)) */ -GRSTgaclAcl *GRSTgaclAclLoadFile(char *); - -/* #define GACLfindAclForFile(x) GRSTgaclFileFindAclname((x)) */ -char *GRSTgaclFileFindAclname(char *); - -/* #define GACLloadAclForFile(x) GRSTgaclFileLoadAcl((x)) */ -GRSTgaclAcl *GRSTgaclAclLoadforFile(char *); - -/* #define GACLisAclFile(x) GRSTgaclFileIsAcl((x)) */ -int GRSTgaclFileIsAcl(char *); - - -/* #define GACLnewUser(x) GRSTgaclUserNew((x)) */ -GRSTgaclUser *GRSTgaclUserNew(GRSTgaclCred *); - -/* #define GACLfreeUser(x) GRSTgaclUserFree((x)) */ -int GRSTgaclUserFree(GRSTgaclUser *); - -/* #define GACLuserAddCred(x,y) GRSTgaclUserAddCred((x),(y)) */ -int GRSTgaclUserAddCred(GRSTgaclUser *, GRSTgaclCred *); - -/* #define GACLuserHasCred(x,y) GRSTgaclUserHasCred((x),(y)) */ -int GRSTgaclUserHasCred(GRSTgaclUser *, GRSTgaclCred *); - -__attribute__ ((deprecated)) -int GRSTgaclUserSetDNlists(GRSTgaclUser *, char *); - -int GRSTgaclUserLoadDNlists(GRSTgaclUser *, char *); - -/* #define GACLuserFindCredType(x,y) GRSTgaclUserFindCredtype((x),(y)) */ -GRSTgaclCred *GRSTgaclUserFindCredtype(GRSTgaclUser *, char *); - -__attribute__ ((deprecated)) -int GRSTgaclDNlistHasUser(char *, GRSTgaclUser *); - -/* #define GACLtestUserAcl(x,y) GRSTgaclAclTestUser((x),(y)) */ -GRSTgaclPerm GRSTgaclAclTestUser(GRSTgaclAcl *, GRSTgaclUser *); - -/* #define GACLtestExclAcl(x,y) GRSTgaclAclTestexclUser((x),(y)) */ -GRSTgaclPerm GRSTgaclAclTestexclUser(GRSTgaclAcl *, GRSTgaclUser *); - -char *GRSThttpUrlDecode(char *); - -/* #define GACLurlEncode(x) GRSThttpUrlEncode((x)) */ -char *GRSThttpUrlEncode(char *); - -/* #define GACLmildUrlEncode(x) GRSThttpMildUrlEncode((x)) */ -char *GRSThttpUrlMildencode(char *); - -int GRSTx509NameCmp(char *, char *); - -int GRSTx509KnownCriticalExts(X509 *); - -int GRSTx509IsCA(X509 *); -int GRSTx509CheckChain(int *, X509_STORE_CTX *); -int GRSTx509VerifyCallback(int, X509_STORE_CTX *); - -__attribute__ ((deprecated)) -int GRSTx509GetVomsCreds(int *, int, size_t, char *, X509 *, STACK_OF(X509) *, char *); - -__attribute__ ((deprecated)) -GRSTgaclCred *GRSTx509CompactToCred(char *); - -__attribute__ ((deprecated)) -int GRSTx509CompactCreds(int *, int, size_t, char *, STACK_OF(X509) *, char *, X509 *); - -char *GRSTx509CachedProxyFind(char *, char *, char *); -char *GRSTx509FindProxyFileName(void); -int GRSTx509MakeProxyCert(char **, FILE *, char *, char *, char *, int); -char *GRSTx509CachedProxyKeyFind(char *, char *, char *); -int GRSTx509ProxyDestroy(char *, char *, char *); -int GRSTx509ProxyGetTimes(char *, char *, char *, time_t *, time_t *); -int GRSTx509CreateProxyRequest(char **, char **, char *); -int GRSTx509MakeProxyRequest(char **, char *, char *, char *); -int GRSTx509StringToChain(STACK_OF(X509) **, char *); -char *GRSTx509MakeDelegationID(void); -char *GRSTx509MakeProxyFileName(char *, STACK_OF(X509) *); -int GRSTx509CacheProxy(char *, char *, char *, char *); - -#define GRST_HEADFILE "gridsitehead.txt" -#define GRST_FOOTFILE "gridsitefoot.txt" -#define GRST_ADMIN_FILE "gridsite-admin.cgi" - -typedef struct { char *text; - void *next; } GRSThttpCharsList; - -typedef struct { size_t size; - GRSThttpCharsList *first; - GRSThttpCharsList *last; } GRSThttpBody; - -void GRSThttpBodyInit(GRSThttpBody *); -void GRSThttpPrintf(GRSThttpBody *, char *, ...); -int GRSThttpCopy(GRSThttpBody *, char *); -void GRSThttpWriteOut(GRSThttpBody *); -int GRSThttpPrintHeaderFooter(GRSThttpBody *, char *, char *); -char *GRSThttpGetCGI(char *); - -time_t GRSTasn1TimeToTimeT(char *, size_t); -int GRSTasn1SearchTaglist(struct GRSTasn1TagList taglist[], int, char *); -int GRSTasn1ParseDump(BIO *, unsigned char *, long, - struct GRSTasn1TagList taglist[], int, int *); -int GRSTasn1GetX509Name(char *, int, char *, char *, - struct GRSTasn1TagList taglist[], int); - -int GRSThtcpNOPrequestMake(char **, int *, unsigned int); -int GRSThtcpNOPresponseMake(char **, int *, unsigned int); -int GRSThtcpTSTrequestMake(char **, int *, unsigned int, char *, char *, char *); -int GRSThtcpTSTresponseMake(char **, int *, unsigned int, char *, char *, char *); -int GRSThtcpMessageParse(GRSThtcpMessage *, char *, int); diff --git a/org.gridsite.core/project/build.number b/org.gridsite.core/project/build.number deleted file mode 100644 index e3c0104..0000000 --- a/org.gridsite.core/project/build.number +++ /dev/null @@ -1,2 +0,0 @@ -#Wed Feb 23 03:19:54 CET 2005 -module.build=141 diff --git a/org.gridsite.core/project/build.properties b/org.gridsite.core/project/build.properties deleted file mode 100644 index e69de29..0000000 diff --git a/org.gridsite.core/project/configure.properties.xml b/org.gridsite.core/project/configure.properties.xml deleted file mode 100644 index c4067ab..0000000 --- a/org.gridsite.core/project/configure.properties.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - diff --git a/org.gridsite.core/project/dependencies.properties b/org.gridsite.core/project/dependencies.properties deleted file mode 100644 index 2a7383b..0000000 --- a/org.gridsite.core/project/dependencies.properties +++ /dev/null @@ -1,9 +0,0 @@ -################################################################### -# System dependencies -################################################################### - -org.glite.version = HEAD -org.glite.core.version = HEAD - -# Component dependencies tag = do not remove this line = - diff --git a/org.gridsite.core/project/gridsite.core.csf.xml b/org.gridsite.core/project/gridsite.core.csf.xml deleted file mode 100644 index 7ca38dc..0000000 --- a/org.gridsite.core/project/gridsite.core.csf.xml +++ /dev/null @@ -1,221 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - The org.glite and org.gridsite.core modules have been updated, please rerun the configuration file - - - - The org.glite and org.gridsite.core modules have been updated, please rerun the configuration file - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/org.gridsite.core/project/properties.xml b/org.gridsite.core/project/properties.xml deleted file mode 100644 index 74f88dc..0000000 --- a/org.gridsite.core/project/properties.xml +++ /dev/null @@ -1,53 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/org.gridsite.core/project/taskdefs.xml b/org.gridsite.core/project/taskdefs.xml deleted file mode 100644 index 9c35cef..0000000 --- a/org.gridsite.core/project/taskdefs.xml +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/org.gridsite.core/project/version.properties b/org.gridsite.core/project/version.properties deleted file mode 100644 index 53e60c5..0000000 --- a/org.gridsite.core/project/version.properties +++ /dev/null @@ -1,2 +0,0 @@ -module.version=1.5.1 -module.age=1 diff --git a/org.gridsite.core/src/Doxyfile b/org.gridsite.core/src/Doxyfile deleted file mode 100644 index 14f88e0..0000000 --- a/org.gridsite.core/src/Doxyfile +++ /dev/null @@ -1,993 +0,0 @@ -# Doxyfile 1.2.18 - -# This file describes the settings to be used by the documentation system -# doxygen (www.doxygen.org) for a project -# -# All text after a hash (#) is considered a comment and will be ignored -# The format is: -# TAG = value [value, ...] -# For lists items can also be appended using: -# TAG += value [value, ...] -# Values that contain spaces should be placed between quotes (" ") - -#--------------------------------------------------------------------------- -# General configuration options -#--------------------------------------------------------------------------- - -# The PROJECT_NAME tag is a single word (or a sequence of words surrounded -# by quotes) that should identify the project. - -PROJECT_NAME = - -# The PROJECT_NUMBER tag can be used to enter a project or revision number. -# This could be handy for archiving the generated documentation or -# if some version control system is used. - -PROJECT_NUMBER = - -# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) -# base path where the generated documentation will be put. -# If a relative path is entered, it will be relative to the location -# where doxygen was started. If left blank the current directory will be used. - -OUTPUT_DIRECTORY = - -# The OUTPUT_LANGUAGE tag is used to specify the language in which all -# documentation generated by doxygen is written. Doxygen will use this -# information to generate all constant output in the proper language. -# The default language is English, other supported languages are: -# Brazilian, Catalan, Chinese, Chinese-Traditional, Croatian, Czech, Danish, Dutch, -# Finnish, French, German, Greek, Hungarian, Italian, Japanese, Japanese-en -# (Japanese with english messages), Korean, Norwegian, Polish, Portuguese, -# Romanian, Russian, Serbian, Slovak, Slovene, Spanish, Swedish and Ukrainian. - -OUTPUT_LANGUAGE = English - -# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in -# documentation are documented, even if no documentation was available. -# Private class members and static file members will be hidden unless -# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES - -EXTRACT_ALL = YES - -# If the EXTRACT_PRIVATE tag is set to YES all private members of a class -# will be included in the documentation. - -EXTRACT_PRIVATE = NO - -# If the EXTRACT_STATIC tag is set to YES all static members of a file -# will be included in the documentation. - -EXTRACT_STATIC = NO - -# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) -# defined locally in source files will be included in the documentation. -# If set to NO only classes defined in header files are included. - -EXTRACT_LOCAL_CLASSES = NO - -# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all -# undocumented members of documented classes, files or namespaces. -# If set to NO (the default) these members will be included in the -# various overviews, but no documentation section is generated. -# This option has no effect if EXTRACT_ALL is enabled. - -HIDE_UNDOC_MEMBERS = NO - -# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all -# undocumented classes that are normally visible in the class hierarchy. -# If set to NO (the default) these class will be included in the various -# overviews. This option has no effect if EXTRACT_ALL is enabled. - -HIDE_UNDOC_CLASSES = NO - -# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all -# friend (class|struct|union) declarations. -# If set to NO (the default) these declarations will be included in the -# documentation. - -HIDE_FRIEND_COMPOUNDS = NO - -# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will -# include brief member descriptions after the members that are listed in -# the file and class documentation (similar to JavaDoc). -# Set to NO to disable this. - -BRIEF_MEMBER_DESC = YES - -# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend -# the brief description of a member or function before the detailed description. -# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the -# brief descriptions will be completely suppressed. - -REPEAT_BRIEF = YES - -# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then -# Doxygen will generate a detailed section even if there is only a brief -# description. - -ALWAYS_DETAILED_SEC = NO - -# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all inherited -# members of a class in the documentation of that class as if those members were -# ordinary class members. Constructors, destructors and assignment operators of -# the base classes will not be shown. - -INLINE_INHERITED_MEMB = NO - -# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full -# path before files name in the file list and in the header files. If set -# to NO the shortest path that makes the file name unique will be used. - -FULL_PATH_NAMES = NO - -# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag -# can be used to strip a user defined part of the path. Stripping is -# only done if one of the specified strings matches the left-hand part of -# the path. It is allowed to use relative paths in the argument list. - -STRIP_FROM_PATH = - -# The INTERNAL_DOCS tag determines if documentation -# that is typed after a \internal command is included. If the tag is set -# to NO (the default) then the documentation will be excluded. -# Set it to YES to include the internal documentation. - -INTERNAL_DOCS = NO - -# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct -# doxygen to hide any special comment blocks from generated source code -# fragments. Normal C and C++ comments will always remain visible. - -STRIP_CODE_COMMENTS = YES - -# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate -# file names in lower case letters. If set to YES upper case letters are also -# allowed. This is useful if you have classes or files whose names only differ -# in case and if your file system supports case sensitive file names. Windows -# users are adviced to set this option to NO. - -CASE_SENSE_NAMES = YES - -# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter -# (but less readable) file names. This can be useful is your file systems -# doesn't support long names like on DOS, Mac, or CD-ROM. - -SHORT_NAMES = NO - -# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen -# will show members with their full class and namespace scopes in the -# documentation. If set to YES the scope will be hidden. - -HIDE_SCOPE_NAMES = NO - -# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen -# will generate a verbatim copy of the header file for each class for -# which an include is specified. Set to NO to disable this. - -VERBATIM_HEADERS = YES - -# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen -# will put list of the files that are included by a file in the documentation -# of that file. - -SHOW_INCLUDE_FILES = NO - -# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen -# will interpret the first line (until the first dot) of a JavaDoc-style -# comment as the brief description. If set to NO, the JavaDoc -# comments will behave just like the Qt-style comments (thus requiring an -# explict @brief command for a brief description. - -JAVADOC_AUTOBRIEF = NO - -# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen -# treat a multi-line C++ special comment block (i.e. a block of //! or /// -# comments) as a brief description. This used to be the default behaviour. -# The new default is to treat a multi-line C++ comment block as a detailed -# description. Set this tag to YES if you prefer the old behaviour instead. - -MULTILINE_CPP_IS_BRIEF = NO - -# If the DETAILS_AT_TOP tag is set to YES then Doxygen -# will output the detailed description near the top, like JavaDoc. -# If set to NO, the detailed description appears after the member -# documentation. - -DETAILS_AT_TOP = NO - -# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented -# member inherits the documentation from any documented member that it -# reimplements. - -INHERIT_DOCS = YES - -# If the INLINE_INFO tag is set to YES (the default) then a tag [inline] -# is inserted in the documentation for inline members. - -INLINE_INFO = YES - -# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen -# will sort the (detailed) documentation of file and class members -# alphabetically by member name. If set to NO the members will appear in -# declaration order. - -SORT_MEMBER_DOCS = YES - -# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC -# tag is set to YES, then doxygen will reuse the documentation of the first -# member in the group (if any) for the other members of the group. By default -# all members of a group must be documented explicitly. - -DISTRIBUTE_GROUP_DOC = NO - -# The TAB_SIZE tag can be used to set the number of spaces in a tab. -# Doxygen uses this value to replace tabs by spaces in code fragments. - -TAB_SIZE = 8 - -# The GENERATE_TODOLIST tag can be used to enable (YES) or -# disable (NO) the todo list. This list is created by putting \todo -# commands in the documentation. - -GENERATE_TODOLIST = YES - -# The GENERATE_TESTLIST tag can be used to enable (YES) or -# disable (NO) the test list. This list is created by putting \test -# commands in the documentation. - -GENERATE_TESTLIST = YES - -# The GENERATE_BUGLIST tag can be used to enable (YES) or -# disable (NO) the bug list. This list is created by putting \bug -# commands in the documentation. - -GENERATE_BUGLIST = YES - -# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or -# disable (NO) the deprecated list. This list is created by putting \deprecated commands in the documentation. - -GENERATE_DEPRECATEDLIST= YES - -# This tag can be used to specify a number of aliases that acts -# as commands in the documentation. An alias has the form "name=value". -# For example adding "sideeffect=\par Side Effects:\n" will allow you to -# put the command \sideeffect (or @sideeffect) in the documentation, which -# will result in a user defined paragraph with heading "Side Effects:". -# You can put \n's in the value part of an alias to insert newlines. - -ALIASES = - -# The ENABLED_SECTIONS tag can be used to enable conditional -# documentation sections, marked by \if sectionname ... \endif. - -ENABLED_SECTIONS = - -# The MAX_INITIALIZER_LINES tag determines the maximum number of lines -# the initial value of a variable or define consist of for it to appear in -# the documentation. If the initializer consists of more lines than specified -# here it will be hidden. Use a value of 0 to hide initializers completely. -# The appearance of the initializer of individual variables and defines in the -# documentation can be controlled using \showinitializer or \hideinitializer -# command in the documentation regardless of this setting. - -MAX_INITIALIZER_LINES = 30 - -# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources -# only. Doxygen will then generate output that is more tailored for C. -# For instance some of the names that are used will be different. The list -# of all members will be omitted, etc. - -OPTIMIZE_OUTPUT_FOR_C = YES - -# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java sources -# only. Doxygen will then generate output that is more tailored for Java. -# For instance namespaces will be presented as packages, qualified scopes -# will look different, etc. - -OPTIMIZE_OUTPUT_JAVA = NO - -# Set the SHOW_USED_FILES tag to NO to disable the list of files generated -# at the bottom of the documentation of classes and structs. If set to YES the -# list will mention the files that were used to generate the documentation. - -SHOW_USED_FILES = NO - -#--------------------------------------------------------------------------- -# configuration options related to warning and progress messages -#--------------------------------------------------------------------------- - -# The QUIET tag can be used to turn on/off the messages that are generated -# by doxygen. Possible values are YES and NO. If left blank NO is used. - -QUIET = NO - -# The WARNINGS tag can be used to turn on/off the warning messages that are -# generated by doxygen. Possible values are YES and NO. If left blank -# NO is used. - -WARNINGS = YES - -# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings -# for undocumented members. If EXTRACT_ALL is set to YES then this flag will -# automatically be disabled. - -WARN_IF_UNDOCUMENTED = YES - -# The WARN_FORMAT tag determines the format of the warning messages that -# doxygen can produce. The string should contain the $file, $line, and $text -# tags, which will be replaced by the file and line number from which the -# warning originated and the warning text. - -WARN_FORMAT = "$file:$line: $text" - -# The WARN_LOGFILE tag can be used to specify a file to which warning -# and error messages should be written. If left blank the output is written -# to stderr. - -WARN_LOGFILE = - -#--------------------------------------------------------------------------- -# configuration options related to the input files -#--------------------------------------------------------------------------- - -# The INPUT tag can be used to specify the files and/or directories that contain -# documented source files. You may enter file names like "myfile.cpp" or -# directories like "/usr/src/myproject". Separate the files or directories -# with spaces. - -INPUT = . ../interface - -# If the value of the INPUT tag contains directories, you can use the -# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp -# and *.h) to filter out the source-files in the directories. If left -# blank the following patterns are tested: -# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx *.hpp -# *.h++ *.idl *.odl - -FILE_PATTERNS = - -# The RECURSIVE tag can be used to turn specify whether or not subdirectories -# should be searched for input files as well. Possible values are YES and NO. -# If left blank NO is used. - -RECURSIVE = NO - -# The EXCLUDE tag can be used to specify files and/or directories that should -# excluded from the INPUT source files. This way you can easily exclude a -# subdirectory from a directory tree whose root is specified with the INPUT tag. - -EXCLUDE = - -# The EXCLUDE_SYMLINKS tag can be used select whether or not files or directories -# that are symbolic links (a Unix filesystem feature) are excluded from the input. - -EXCLUDE_SYMLINKS = NO - -# If the value of the INPUT tag contains directories, you can use the -# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude -# certain files from those directories. - -EXCLUDE_PATTERNS = - -# The EXAMPLE_PATH tag can be used to specify one or more files or -# directories that contain example code fragments that are included (see -# the \include command). - -EXAMPLE_PATH = - -# If the value of the EXAMPLE_PATH tag contains directories, you can use the -# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp -# and *.h) to filter out the source-files in the directories. If left -# blank all files are included. - -EXAMPLE_PATTERNS = - -# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be -# searched for input files to be used with the \include or \dontinclude -# commands irrespective of the value of the RECURSIVE tag. -# Possible values are YES and NO. If left blank NO is used. - -EXAMPLE_RECURSIVE = NO - -# The IMAGE_PATH tag can be used to specify one or more files or -# directories that contain image that are included in the documentation (see -# the \image command). - -IMAGE_PATH = - -# The INPUT_FILTER tag can be used to specify a program that doxygen should -# invoke to filter for each input file. Doxygen will invoke the filter program -# by executing (via popen()) the command , where -# is the value of the INPUT_FILTER tag, and is the name of an -# input file. Doxygen will then use the output that the filter program writes -# to standard output. - -INPUT_FILTER = - -# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using -# INPUT_FILTER) will be used to filter the input files when producing source -# files to browse (i.e. when SOURCE_BROWSER is set to YES). - -FILTER_SOURCE_FILES = NO - -#--------------------------------------------------------------------------- -# configuration options related to source browsing -#--------------------------------------------------------------------------- - -# If the SOURCE_BROWSER tag is set to YES then a list of source files will -# be generated. Documented entities will be cross-referenced with these sources. - -SOURCE_BROWSER = NO - -# Setting the INLINE_SOURCES tag to YES will include the body -# of functions and classes directly in the documentation. - -INLINE_SOURCES = NO - -# If the REFERENCED_BY_RELATION tag is set to YES (the default) -# then for each documented function all documented -# functions referencing it will be listed. - -REFERENCED_BY_RELATION = NO - -# If the REFERENCES_RELATION tag is set to YES (the default) -# then for each documented function all documented entities -# called/used by that function will be listed. - -REFERENCES_RELATION = NO - -#--------------------------------------------------------------------------- -# configuration options related to the alphabetical class index -#--------------------------------------------------------------------------- - -# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index -# of all compounds will be generated. Enable this if the project -# contains a lot of classes, structs, unions or interfaces. - -ALPHABETICAL_INDEX = YES - -# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then -# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns -# in which this list will be split (can be a number in the range [1..20]) - -COLS_IN_ALPHA_INDEX = 5 - -# In case all classes in a project start with a common prefix, all -# classes will be put under the same header in the alphabetical index. -# The IGNORE_PREFIX tag can be used to specify one or more prefixes that -# should be ignored while generating the index headers. - -IGNORE_PREFIX = - -#--------------------------------------------------------------------------- -# configuration options related to the HTML output -#--------------------------------------------------------------------------- - -# If the GENERATE_HTML tag is set to YES (the default) Doxygen will -# generate HTML output. - -GENERATE_HTML = YES - -# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `html' will be used as the default path. - -HTML_OUTPUT = doxygen - -# The HTML_FILE_EXTENSION tag can be used to specify the file extension for -# each generated HTML page (for example: .htm,.php,.asp). If it is left blank -# doxygen will generate files with .html extension. - -HTML_FILE_EXTENSION = .html - -# The HTML_HEADER tag can be used to specify a personal HTML header for -# each generated HTML page. If it is left blank doxygen will generate a -# standard header. - -HTML_HEADER = - -# The HTML_FOOTER tag can be used to specify a personal HTML footer for -# each generated HTML page. If it is left blank doxygen will generate a -# standard footer. - -HTML_FOOTER = - -# The HTML_STYLESHEET tag can be used to specify a user defined cascading -# style sheet that is used by each HTML page. It can be used to -# fine-tune the look of the HTML output. If the tag is left blank doxygen -# will generate a default style sheet - -HTML_STYLESHEET = doxygen.css - -# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, -# files or namespaces will be aligned in HTML using tables. If set to -# NO a bullet list will be used. - -HTML_ALIGN_MEMBERS = YES - -# If the GENERATE_HTMLHELP tag is set to YES, additional index files -# will be generated that can be used as input for tools like the -# Microsoft HTML help workshop to generate a compressed HTML help file (.chm) -# of the generated HTML documentation. - -GENERATE_HTMLHELP = NO - -# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can -# be used to specify the file name of the resulting .chm file. You -# can add a path in front of the file if the result should not be -# written to the html output dir. - -CHM_FILE = - -# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can -# be used to specify the location (absolute path including file name) of -# the HTML help compiler (hhc.exe). If non empty doxygen will try to run -# the html help compiler on the generated index.hhp. - -HHC_LOCATION = - -# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag -# controls if a separate .chi index file is generated (YES) or that -# it should be included in the master .chm file (NO). - -GENERATE_CHI = NO - -# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag -# controls whether a binary table of contents is generated (YES) or a -# normal table of contents (NO) in the .chm file. - -BINARY_TOC = NO - -# The TOC_EXPAND flag can be set to YES to add extra items for group members -# to the contents of the Html help documentation and to the tree view. - -TOC_EXPAND = NO - -# The DISABLE_INDEX tag can be used to turn on/off the condensed index at -# top of each HTML page. The value NO (the default) enables the index and -# the value YES disables it. - -DISABLE_INDEX = YES - -# This tag can be used to set the number of enum values (range [1..20]) -# that doxygen will group on one line in the generated HTML documentation. - -ENUM_VALUES_PER_LINE = 4 - -# If the GENERATE_TREEVIEW tag is set to YES, a side panel will be -# generated containing a tree-like index structure (just like the one that -# is generated for HTML Help). For this to work a browser that supports -# JavaScript and frames is required (for instance Mozilla, Netscape 4.0+, -# or Internet explorer 4.0+). Note that for large projects the tree generation -# can take a very long time. In such cases it is better to disable this feature. -# Windows users are probably better off using the HTML help feature. - -GENERATE_TREEVIEW = NO - -# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be -# used to set the initial width (in pixels) of the frame in which the tree -# is shown. - -TREEVIEW_WIDTH = 250 - -#--------------------------------------------------------------------------- -# configuration options related to the LaTeX output -#--------------------------------------------------------------------------- - -# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will -# generate Latex output. - -GENERATE_LATEX = NO - -# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `latex' will be used as the default path. - -LATEX_OUTPUT = latex - -# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be invoked. If left blank `latex' will be used as the default command name. - -LATEX_CMD_NAME = latex - -# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to -# generate index for LaTeX. If left blank `makeindex' will be used as the -# default command name. - -MAKEINDEX_CMD_NAME = makeindex - -# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact -# LaTeX documents. This may be useful for small projects and may help to -# save some trees in general. - -COMPACT_LATEX = NO - -# The PAPER_TYPE tag can be used to set the paper type that is used -# by the printer. Possible values are: a4, a4wide, letter, legal and -# executive. If left blank a4wide will be used. - -PAPER_TYPE = a4wide - -# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX -# packages that should be included in the LaTeX output. - -EXTRA_PACKAGES = - -# The LATEX_HEADER tag can be used to specify a personal LaTeX header for -# the generated latex document. The header should contain everything until -# the first chapter. If it is left blank doxygen will generate a -# standard header. Notice: only use this tag if you know what you are doing! - -LATEX_HEADER = - -# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated -# is prepared for conversion to pdf (using ps2pdf). The pdf file will -# contain links (just like the HTML output) instead of page references -# This makes the output suitable for online browsing using a pdf viewer. - -PDF_HYPERLINKS = NO - -# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of -# plain latex in the generated Makefile. Set this option to YES to get a -# higher quality PDF documentation. - -USE_PDFLATEX = NO - -# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. -# command to the generated LaTeX files. This will instruct LaTeX to keep -# running if errors occur, instead of asking the user for help. -# This option is also used when generating formulas in HTML. - -LATEX_BATCHMODE = NO - -#--------------------------------------------------------------------------- -# configuration options related to the RTF output -#--------------------------------------------------------------------------- - -# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output -# The RTF output is optimised for Word 97 and may not look very pretty with -# other RTF readers or editors. - -GENERATE_RTF = NO - -# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `rtf' will be used as the default path. - -RTF_OUTPUT = rtf - -# If the COMPACT_RTF tag is set to YES Doxygen generates more compact -# RTF documents. This may be useful for small projects and may help to -# save some trees in general. - -COMPACT_RTF = NO - -# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated -# will contain hyperlink fields. The RTF file will -# contain links (just like the HTML output) instead of page references. -# This makes the output suitable for online browsing using WORD or other -# programs which support those fields. -# Note: wordpad (write) and others do not support links. - -RTF_HYPERLINKS = NO - -# Load stylesheet definitions from file. Syntax is similar to doxygen's -# config file, i.e. a series of assigments. You only have to provide -# replacements, missing definitions are set to their default value. - -RTF_STYLESHEET_FILE = - -# Set optional variables used in the generation of an rtf document. -# Syntax is similar to doxygen's config file. - -RTF_EXTENSIONS_FILE = - -#--------------------------------------------------------------------------- -# configuration options related to the man page output -#--------------------------------------------------------------------------- - -# If the GENERATE_MAN tag is set to YES (the default) Doxygen will -# generate man pages - -GENERATE_MAN = NO - -# The MAN_OUTPUT tag is used to specify where the man pages will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `man' will be used as the default path. - -MAN_OUTPUT = man - -# The MAN_EXTENSION tag determines the extension that is added to -# the generated man pages (default is the subroutine's section .3) - -MAN_EXTENSION = .3 - -# If the MAN_LINKS tag is set to YES and Doxygen generates man output, -# then it will generate one additional man file for each entity -# documented in the real man page(s). These additional files -# only source the real man page, but without them the man command -# would be unable to find the correct page. The default is NO. - -MAN_LINKS = NO - -#--------------------------------------------------------------------------- -# configuration options related to the XML output -#--------------------------------------------------------------------------- - -# If the GENERATE_XML tag is set to YES Doxygen will -# generate an XML file that captures the structure of -# the code including all documentation. Note that this -# feature is still experimental and incomplete at the -# moment. - -GENERATE_XML = NO - -# The XML_SCHEMA tag can be used to specify an XML schema, -# which can be used by a validating XML parser to check the -# syntax of the XML files. - -XML_SCHEMA = - -# The XML_DTD tag can be used to specify an XML DTD, -# which can be used by a validating XML parser to check the -# syntax of the XML files. - -XML_DTD = - -#--------------------------------------------------------------------------- -# configuration options for the AutoGen Definitions output -#--------------------------------------------------------------------------- - -# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will -# generate an AutoGen Definitions (see autogen.sf.net) file -# that captures the structure of the code including all -# documentation. Note that this feature is still experimental -# and incomplete at the moment. - -GENERATE_AUTOGEN_DEF = NO - -#--------------------------------------------------------------------------- -# Configuration options related to the preprocessor -#--------------------------------------------------------------------------- - -# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will -# evaluate all C-preprocessor directives found in the sources and include -# files. - -ENABLE_PREPROCESSING = NO - -# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro -# names in the source code. If set to NO (the default) only conditional -# compilation will be performed. Macro expansion can be done in a controlled -# way by setting EXPAND_ONLY_PREDEF to YES. - -MACRO_EXPANSION = NO - -# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES -# then the macro expansion is limited to the macros specified with the -# PREDEFINED and EXPAND_AS_PREDEFINED tags. - -EXPAND_ONLY_PREDEF = NO - -# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files -# in the INCLUDE_PATH (see below) will be search if a #include is found. - -SEARCH_INCLUDES = YES - -# The INCLUDE_PATH tag can be used to specify one or more directories that -# contain include files that are not input files but should be processed by -# the preprocessor. - -INCLUDE_PATH = - -# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard -# patterns (like *.h and *.hpp) to filter out the header-files in the -# directories. If left blank, the patterns specified with FILE_PATTERNS will -# be used. - -INCLUDE_FILE_PATTERNS = - -# The PREDEFINED tag can be used to specify one or more macro names that -# are defined before the preprocessor is started (similar to the -D option of -# gcc). The argument of the tag is a list of macros of the form: name -# or name=definition (no spaces). If the definition and the = are -# omitted =1 is assumed. - -PREDEFINED = - -# If the MACRO_EXPANSION and EXPAND_PREDEF_ONLY tags are set to YES then -# this tag can be used to specify a list of macro names that should be expanded. -# The macro definition that is found in the sources will be used. -# Use the PREDEFINED tag if you want to use a different macro definition. - -EXPAND_AS_DEFINED = - -# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then -# doxygen's preprocessor will remove all function-like macros that are alone -# on a line, have an all uppercase name, and do not end with a semicolon. Such -# function macros are typically used for boiler-plate code, and will confuse the -# parser if not removed. - -SKIP_FUNCTION_MACROS = YES - -#--------------------------------------------------------------------------- -# Configuration::addtions related to external references -#--------------------------------------------------------------------------- - -# The TAGFILES tag can be used to specify one or more tagfiles. - -TAGFILES = - -# When a file name is specified after GENERATE_TAGFILE, doxygen will create -# a tag file that is based on the input files it reads. - -GENERATE_TAGFILE = - -# If the ALLEXTERNALS tag is set to YES all external classes will be listed -# in the class index. If set to NO only the inherited external classes -# will be listed. - -ALLEXTERNALS = NO - -# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed -# in the modules index. If set to NO, only the current project's groups will -# be listed. - -EXTERNAL_GROUPS = YES - -# The PERL_PATH should be the absolute path and name of the perl script -# interpreter (i.e. the result of `which perl'). - -PERL_PATH = /usr/bin/perl - -#--------------------------------------------------------------------------- -# Configuration options related to the dot tool -#--------------------------------------------------------------------------- - -# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will -# generate a inheritance diagram (in Html, RTF and LaTeX) for classes with base or -# super classes. Setting the tag to NO turns the diagrams off. Note that this -# option is superceded by the HAVE_DOT option below. This is only a fallback. It is -# recommended to install and use dot, since it yield more powerful graphs. - -CLASS_DIAGRAMS = YES - -# If set to YES, the inheritance and collaboration graphs will hide -# inheritance and usage relations if the target is undocumented -# or is not a class. - -HIDE_UNDOC_RELATIONS = YES - -# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is -# available from the path. This tool is part of Graphviz, a graph visualization -# toolkit from AT&T and Lucent Bell Labs. The other options in this section -# have no effect if this option is set to NO (the default) - -HAVE_DOT = NO - -# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen -# will generate a graph for each documented class showing the direct and -# indirect inheritance relations. Setting this tag to YES will force the -# the CLASS_DIAGRAMS tag to NO. - -CLASS_GRAPH = YES - -# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen -# will generate a graph for each documented class showing the direct and -# indirect implementation dependencies (inheritance, containment, and -# class references variables) of the class with other documented classes. - -COLLABORATION_GRAPH = YES - -# If set to YES, the inheritance and collaboration graphs will show the -# relations between templates and their instances. - -TEMPLATE_RELATIONS = YES - -# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT -# tags are set to YES then doxygen will generate a graph for each documented -# file showing the direct and indirect include dependencies of the file with -# other documented files. - -INCLUDE_GRAPH = YES - -# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and -# HAVE_DOT tags are set to YES then doxygen will generate a graph for each -# documented header file showing the documented files that directly or -# indirectly include this file. - -INCLUDED_BY_GRAPH = YES - -# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen -# will graphical hierarchy of all classes instead of a textual one. - -GRAPHICAL_HIERARCHY = YES - -# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images -# generated by dot. Possible values are png, jpg, or gif -# If left blank png will be used. - -DOT_IMAGE_FORMAT = png - -# The tag DOT_PATH can be used to specify the path where the dot tool can be -# found. If left blank, it is assumed the dot tool can be found on the path. - -DOT_PATH = - -# The DOTFILE_DIRS tag can be used to specify one or more directories that -# contain dot files that are included in the documentation (see the -# \dotfile command). - -DOTFILE_DIRS = - -# The MAX_DOT_GRAPH_WIDTH tag can be used to set the maximum allowed width -# (in pixels) of the graphs generated by dot. If a graph becomes larger than -# this value, doxygen will try to truncate the graph, so that it fits within -# the specified constraint. Beware that most browsers cannot cope with very -# large images. - -MAX_DOT_GRAPH_WIDTH = 1024 - -# The MAX_DOT_GRAPH_HEIGHT tag can be used to set the maximum allows height -# (in pixels) of the graphs generated by dot. If a graph becomes larger than -# this value, doxygen will try to truncate the graph, so that it fits within -# the specified constraint. Beware that most browsers cannot cope with very -# large images. - -MAX_DOT_GRAPH_HEIGHT = 1024 - -# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will -# generate a legend page explaining the meaning of the various boxes and -# arrows in the dot generated graphs. - -GENERATE_LEGEND = YES - -# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will -# remove the intermedate dot files that are used to generate -# the various graphs. - -DOT_CLEANUP = YES - -#--------------------------------------------------------------------------- -# Configuration::addtions related to the search engine -#--------------------------------------------------------------------------- - -# The SEARCHENGINE tag specifies whether or not a search engine should be -# used. If set to NO the values of all tags below this one will be ignored. - -SEARCHENGINE = NO - -# The CGI_NAME tag should be the name of the CGI script that -# starts the search engine (doxysearch) with the correct parameters. -# A script with this name will be generated by doxygen. - -CGI_NAME = search.cgi - -# The CGI_URL tag should be the absolute URL to the directory where the -# cgi binaries are located. See the documentation of your http daemon for -# details. - -CGI_URL = - -# The DOC_URL tag should be the absolute URL to the directory where the -# documentation is located. If left blank the absolute path to the -# documentation, with file:// prepended to it, will be used. - -DOC_URL = - -# The DOC_ABSPATH tag should be the absolute path to the directory where the -# documentation is located. If left blank the directory on the local machine -# will be used. - -DOC_ABSPATH = - -# The BIN_ABSPATH tag must point to the directory where the doxysearch binary -# is installed. - -BIN_ABSPATH = /usr/local/bin/ - -# The EXT_DOC_PATHS tag can be used to specify one or more paths to -# documentation generated for other projects. This allows doxysearch to search -# the documentation for these projects as well. - -EXT_DOC_PATHS = diff --git a/org.gridsite.core/src/Makefile b/org.gridsite.core/src/Makefile deleted file mode 100644 index a926168..0000000 --- a/org.gridsite.core/src/Makefile +++ /dev/null @@ -1,508 +0,0 @@ -# -# Andrew McNab and Shiv Kaushal, University of Manchester. -# Copyright (c) 2002-6. All rights reserved. -# -# Redistribution and use in source and binary forms, with or -# without modification, are permitted provided that the following -# conditions are met: -# -# o Redistributions of source code must retain the above -# copyright notice, this list of conditions and the following -# disclaimer. -# o Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following -# disclaimer in the documentation and/or other materials -# provided with the distribution. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND -# CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, -# INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS -# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -# TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -# ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -# POSSIBILITY OF SUCH DAMAGE. -# -#--------------------------------------------------------------- -# For more information about GridSite: http://www.gridsite.org/ -#--------------------------------------------------------------- - -include ../VERSION - -RPMCMD=$(shell if [ -x /usr/bin/rpmbuild ] ; then echo /usr/bin/rpmbuild; else echo rpm; fi) - -ifndef MYRPMDIR -export MYRPMDIR=$(shell pwd)/../RPMTMP -endif - -ifndef prefix -export prefix=/usr/local -endif - -ifndef MYCFLAGS -export MYCFLAGS=-I. -I../interface $(HTTPD_FLAGS) -I/usr/include/httpd -I/usr/include/apr-0 -I/opt/glite/include -fPIC -endif - -ifndef MYLDFLAGS -export MYLDFLAGS=-L. -endif - - - -# -# Build -# - -build: apidoc build-lib \ - htcp gridsite-copy.cgi mod_gridsite.so \ - urlencode findproxyfile gsexec # real-gridsite-admin.cgi - -build-lib: libgridsite_globus.so.$(VERSION) libgridsite_globus.a \ - libgridsite.so.$(VERSION) libgridsite.a - -# First, normal versions using system OpenSSL rather than Globus OpenSSL - -libgridsite.so.$(VERSION): grst_err.o grst_x509.o grst_gacl.o grst_xacml.o \ - grst_http.o grst_asn1.o grst_htcp.o - gcc -shared -Wl,-soname,libgridsite.so.$(MINOR_VERSION) \ - -o libgridsite.so.$(PATCH_VERSION) -lcrypto `xml2-config --libs` \ - grst_err.o grst_x509.o grst_gacl.o grst_xacml.o grst_http.o \ - grst_asn1.o grst_htcp.o - ln -sf libgridsite.so.$(VERSION) libgridsite.so - ln -sf libgridsite.so.$(VERSION) libgridsite.so.$(MINOR_VERSION) - -libgridsite.a: grst_err.o grst_x509.o grst_gacl.o grst_xacml.o grst_http.o grst_asn1.o grst_htcp.o - ar src libgridsite.a grst_err.o grst_x509.o grst_gacl.o grst_xacml.o grst_http.o grst_asn1.o grst_htcp.o - -grst_err.o: grst_err.c ../interface/gridsite.h - gcc -g $(MYCFLAGS) \ - -I/usr/kerberos/include \ - -c grst_err.c - -grst_x509.o: grst_x509.c ../interface/gridsite.h - gcc -g $(MYCFLAGS) \ - -I/usr/kerberos/include -c grst_x509.c - -grst_gacl.o: grst_gacl.c ../interface/gridsite.h - gcc -g $(MYCFLAGS) \ - -I/usr/kerberos/include `xml2-config --cflags` -c grst_gacl.c - -grst_xacml.o: grst_xacml.c ../interface/gridsite.h - gcc -g $(MYCFLAGS) \ - -I/usr/kerberos/include `xml2-config --cflags` -c grst_xacml.c - -grst_http.o: grst_http.c ../interface/gridsite.h - gcc -g $(MYCFLAGS) \ - -I/usr/kerberos/include -c grst_http.c - -grst_asn1.o: grst_asn1.c ../interface/gridsite.h - gcc -g $(MYCFLAGS) \ - -I/usr/kerberos/include -c grst_asn1.c - -grst_htcp.o: grst_htcp.c ../interface/gridsite.h - gcc -g $(MYCFLAGS) \ - -I/usr/kerberos/include -c grst_htcp.c - -# Then build versions using Globus OpenSSL if configured - -ifdef OPENSSL_GLOBUS_LIBS - -libgridsite_globus.so.$(VERSION): grst_err_globus.o \ - grst_x509_globus.o grst_gacl_globus.o grst_http_globus.o \ - grst_asn1_globus.o grst_xacml_globus.o grst_htcp_globus.o - gcc -shared -Wl,-soname,libgridsite_globus.so.$(MINOR_VERSION) \ - -o libgridsite_globus.so.$(PATCH_VERSION) \ - grst_err_globus.o grst_x509_globus.o grst_gacl_globus.o grst_xacml_globus.o \ - grst_http_globus.o grst_asn1_globus.o - ln -sf libgridsite_globus.so.$(VERSION) libgridsite_globus.so - -libgridsite_globus.a: grst_err_globus.o grst_x509_globus.o grst_gacl_globus.o grst_http_globus.o grst_asn1_globus.o - ar src libgridsite_globus.a \ - grst_err_globus.o grst_x509_globus.o grst_gacl_globus.o grst_http_globus.o grst_asn1_globus.o - -grst_err_globus.o: grst_err.c ../interface/gridsite.h - gcc -g $(MYCFLAGS) $(OPENSSL_GLOBUS_FLAGS) \ - -I/usr/kerberos/include \ - -c grst_err.c \ - -o grst_err_globus.o - -grst_x509_globus.o: grst_x509.c ../interface/gridsite.h - gcc -g $(MYCFLAGS) $(OPENSSL_GLOBUS_FLAGS) \ - -I/usr/kerberos/include -c grst_x509.c \ - -o grst_x509_globus.o - -grst_gacl_globus.o: grst_gacl.c ../interface/gridsite.h - gcc -g $(MYCFLAGS) $(OPENSSL_GLOBUS_FLAGS) \ - -I/usr/kerberos/include `xml2-config --cflags` -c grst_gacl.c \ - -o grst_gacl_globus.o - -grst_xacml_globus.o: grst_xacml.c ../interface/gridsite.h - gcc -g $(MYCFLAGS) $(OPENSSL_GLOBUS_FLAGS) \ - -I/usr/kerberos/include `xml2-config --cflags` -c grst_xacml.c \ - -o grst_xacml_globus.o - -grst_http_globus.o: grst_http.c ../interface/gridsite.h - gcc -g $(MYCFLAGS) $(OPENSSL_GLOBUS_FLAGS) \ - -I/usr/kerberos/include -c grst_http.c \ - -o grst_http_globus.o - -grst_asn1_globus.o: grst_asn1.c ../interface/gridsite.h - gcc -g $(MYCFLAGS) $(OPENSSL_GLOBUS_FLAGS) \ - -I/usr/kerberos/include -c grst_asn1.c \ - -o grst_asn1_globus.o - -grst_htcp_globus.o: grst_htcp.c ../interface/gridsite.h - gcc -g $(MYCFLAGS) $(OPENSSL_GLOBUS_FLAGS) \ - -I/usr/kerberos/include -c grst_htcp.c \ - -o grst_htcp_globus.o - -else - -libgridsite_globus.so.$(VERSION): libgridsite.so.$(VERSION) - cp -f libgridsite.so.$(VERSION) libgridsite_globus.so.$(VERSION) - -libgridsite_globus.a: libgridsite.a - cp -f libgridsite.a libgridsite_globus.a - -endif - -gsexec: gsexec.c gsexec.h - gcc -g -DVERSION=\"$(PATCH_VERSION)\" $(MYCFLAGS) \ - -o gsexec gsexec.c - -urlencode: urlencode.c libgridsite.so.$(VERSION) - gcc -g -DVERSION=\"$(PATCH_VERSION)\" $(MYCFLAGS) \ - -o urlencode urlencode.c -L. \ - -I/usr/kerberos/include \ - -lgridsite - -htcp: htcp.c libgridsite.so.$(VERSION) - gcc -g -DVERSION=\"$(PATCH_VERSION)\" $(MYCFLAGS) \ - -o htcp htcp.c -L. \ - -I/usr/kerberos/include \ - `curl-config --cflags` `curl-config --libs` \ - -lgridsite - -htcp-static: htcp.c libgridsite.a - gcc -g -DVERSION=\"$(PATCH_VERSION)\" $(MYCFLAGS) \ - -o htcp-static htcp.c -L. \ - -I/usr/kerberos/include \ - `curl-config --cflags` `curl-config --libs` \ - -lgridsite -static - -gridsite-copy.cgi: gridsite-copy.c libgridsite.so.$(VERSION) - gcc -g -DVERSION=\"$(PATCH_VERSION)\" $(MYCFLAGS) \ - -o gridsite-copy.cgi gridsite-copy.c -L. \ - -I/usr/kerberos/include \ - `curl-config --cflags` `curl-config --libs` \ - $(MYFCGILIBS) -lgridsite - -mod_gridsite.so: mod_gridsite.c mod_ssl-private.h libgridsite.so.$(VERSION) - gcc -g $(MYCFLAGS) -shared -Wl,-soname=gridsite_module \ - -I/usr/kerberos/include \ - -I/usr/include/libxml2 \ - -DVERSION=\"$(VERSION)\" -o mod_gridsite.so \ - mod_gridsite.c $(MYLDFLAGS) -lxml2 -lm -lz -lgridsite - -mod_gridsite_example.so: mod_gridsite_example.c - gcc -g -shared -Wl,-soname=gridsite_example_module \ - -I/usr/include/httpd -I/usr/include/apr-0 \ - -DVERSION=\"$(VERSION)\" -o mod_gridsite_example.so \ - mod_gridsite_example.c - -real-gridsite-admin.cgi: grst_admin_main.c grst_admin_gacl.c \ - grst_admin_file.c grst_admin.h - gcc -g $(MYCFLAGS) $(MYLDFLAGS) -o real-gridsite-admin.cgi \ - grst_admin_main.c \ - grst_admin_gacl.c \ - grst_admin_file.c \ - -I/usr/kerberos/include \ - -DVERSION=\"$(VERSION)\" -lgridsite -lssl -lcrypto -lxml2 -lz -lm - -findproxyfile: findproxyfile.c libgridsite.so.$(VERSION) - gcc -g -DVERSION=\"$(PATCH_VERSION)\" $(MYCFLAGS) $(MYLDFLAGS) \ - -o findproxyfile findproxyfile.c -L. \ - -I/usr/kerberos/include -lgridsite \ - -lssl -lcrypto -lxml2 -lz -lm - -showx509exts: showx509exts.c libgridsite.so.$(VERSION) - gcc -g -DVERSION=\"$(PATCH_VERSION)\" $(MYCFLAGS) $(MYLDFLAGS) \ - -o showx509exts showx509exts.c -L. \ - -I/usr/kerberos/include \ - -lgridsite \ - -lssl -lcrypto -lxml2 -lz -lm - -slashgrid: slashgrid.c libgridsite.so.$(VERSION) - gcc -g -o slashgrid -lfuse -lpthread slashgrid.c \ - $(MYCFLAGS) $(MYLDFLAGS) `xml2-config --cflags` \ - -D_FILE_OFFSET_BITS=64 -D_REENTRANT -DFUSE_USE_VERSION=22 \ - -I/usr/kerberos/include `curl-config --cflags` \ - -L. `curl-config --libs` -lgridsite - -# This target is used by make-gridsite-spec to test for FUSE include+libs -fuse-test: fuse-test.c - gcc -g -lfuse fuse-test.c \ - $(MYCFLAGS) $(MYLDFLAGS) `xml2-config --cflags` \ - -D_FILE_OFFSET_BITS=64 -D_REENTRANT -DFUSE_USE_VERSION=22 - -apidoc: - date - doxygen Doxyfile - mkdir -p ../doc/doxygen - cp -f doxygen/*.html doxygen/*.css doxygen/*.png ../doc/doxygen - cd ../doc ; for i in *.1 *.8 ; do ../src/roffit < $$i \ - > $$i.html ; done - -gaclexample: gaclexample.c libgridsite.a - gcc -g -o gaclexample gaclexample.c -I../interface -L. \ - -I/usr/kerberos/include -lgridsite \ - -lssl -lcrypto -lxml2 -lz -lm - -xacmlexample: xacmlexample.c libgridsite.a - gcc -g -o xacmlexample xacmlexample.c -I../interface -L. \ - -I/usr/kerberos/include -lgridsite \ - -lssl -lcrypto -lxml2 -lz -lm -# -# Delegation machinery, including SOAP delegation portType. To build this -# you either need to use the gLite build environment and set REPOSITORY -# or install gSOAP and set GSOAPDIR to the directory containing -# soapcpp2 and stdsoap2.h (unless GSOAPDIR is set already) -# - -ifndef GSOAPDIR - export GSOAPDIR=/usr -endif - -ifndef GRIDSITEDIR - export GRIDSITEDIR=/usr -endif - - -DelegationService.wsdl: delegation.h - $(GSOAPDIR)/bin/soapcpp2 -c delegation.h - -gridsite-delegation.cgi: grst-delegation.c delegation.h \ - DelegationService.wsdl libgridsite.so.$(VERSION) - gcc -g $(MYCFLAGS) $(MYLDFLAGS) -o gridsite-delegation.cgi \ - grst-delegation.c \ - -I/usr/kerberos/include -I. -I$(GSOAPDIR)/include \ - -I$(GRIDSITEDIR)/include \ - -DVERSION=\"$(VERSION)\" -L. -L$(GSOAPDIR)/lib \ - -L$(GRIDSITEDIR)/lib \ - soapC.c soapServer.c -lgsoap \ - -lgridsite -lcurl -lz -lssl -lcrypto -lxml2 -lm - -htproxyput: htproxyput.c delegation.h DelegationService.wsdl libgridsite.so.$(VERSION) - gcc -g $(MYCFLAGS) $(MYLDFLAGS) -o htproxyput \ - htproxyput.c \ - -I/usr/kerberos/include -I. \ - -g -DVERSION=\"$(VERSION)\" \ - -I$(GSOAPDIR)/include \ - -I$(GRIDSITEDIR)/include \ - -DWITH_OPENSSL -L. -L$(GSOAPDIR)/lib \ - $(STDSOAP2) \ - soapC.c soapClient.c -lgsoapssl \ - -lgridsite -lcurl -lz -lssl -lcrypto -lxml2 -lm - -# This target is used by make-gridsite-spec to test for gSOAP include+libs -gsoap-test: gsoap-test.c - gcc -g $(MYCFLAGS) $(MYLDFLAGS) -o gsoap-test \ - gsoap-test.c \ - -I/usr/kerberos/include -I. \ - -g -DVERSION=\"$(VERSION)\" \ - -I$(GSOAPDIR)/include \ - -I$(GRIDSITEDIR)/include \ - -DWITH_OPENSSL -L$(GSOAPDIR)/lib \ - $(STDSOAP2) -L$(GRIDSITEDIR)/lib \ - -lgsoapssl -lz -lssl -lcrypto -lxml2 -lm - -gridsite-srm.cgi: gridsite-srm.c libgridsite.so.$(VERSION) - gcc -g $(MYCFLAGS) $(MYLDFLAGS) -o gridsite-srm.cgi \ - gridsite-srm.c \ - -I/usr/kerberos/include -I.\ - -I$(GRIDSITEDIR)/include \ - -DVERSION=\"$(VERSION)\" -L. \ - -L$(GRIDSITEDIR)/lib \ - -lgridsite -lcurl -lz -lssl -lcrypto -lxml2 -lm - -clean: - -# -# Install -# - -install: apidoc install-lib - mkdir -p $(prefix)/include \ - $(prefix)/lib \ - $(prefix)/bin \ - $(prefix)/sbin \ - $(prefix)/share/man/man1 \ - $(prefix)/share/man/man8 \ - $(prefix)/lib/httpd/modules \ - mod_gridsite_example.c \ - $(prefix)/share/doc/gridsite-$(MINOR_VERSION) - cp -f ../interface/gridsite.h $(prefix)/include - cp -f ../interface/gridsite-gacl.h $(prefix)/include - cp -f urlencode $(prefix)/bin - cp -f findproxyfile $(prefix)/bin - cp -f real-gridsite-admin.cgi $(prefix)/sbin - cp -f gridsite-copy.cgi $(prefix)/sbin - cp -f ../CHANGES ../README ../INSTALL ../LICENSE ../VERSION \ - $(prefix)/share/doc/gridsite-$(MINOR_VERSION) - cp -f ../doc/index.html ../doc/*.conf ../doc/*.sh ../doc/*.spec \ - $(prefix)/share/doc/gridsite-$(MINOR_VERSION) - for i in htcp.1 htfind.1 htll.1 htls.1 htmkdir.1 htmv.1 htping.1 \ - htrm.1 urlencode.1 findproxyfile.1 ; do \ - cp -f ../doc/$$i.html $(prefix)/share/doc/gridsite-$(MINOR_VERSION) ; \ - cp -f ../doc/$$i $(prefix)/share/doc/gridsite-$(MINOR_VERSION) ; \ - cp -f ../doc/$$i $(prefix)/share/man/man1 ; \ - gzip -f $(prefix)/share/man/man1/$$i ; done - for i in mod_gridsite.8 gsexec.8 ; do \ - cp -f ../doc/$$i.html $(prefix)/share/doc/gridsite-$(MINOR_VERSION) ; \ - cp -f ../doc/$$i $(prefix)/share/doc/gridsite-$(MINOR_VERSION) ; \ - cp -f ../doc/$$i $(prefix)/share/man/man8 ; \ - gzip -f $(prefix)/share/man/man8/$$i ; done - cp -f htcp $(prefix)/bin - ln -sf htcp $(prefix)/bin/htls - ln -sf htcp $(prefix)/bin/htll - ln -sf htcp $(prefix)/bin/htrm - ln -sf htcp $(prefix)/bin/htmkdir - ln -sf htcp $(prefix)/bin/htmv - ln -sf htcp $(prefix)/bin/htping - ln -sf htcp $(prefix)/bin/htfind - cp -f gsexec $(prefix)/sbin - cp -f mod_gridsite.so $(prefix)/lib/httpd/modules - -install-lib: - mkdir -p $(prefix)/lib - cp -f libgridsite.a $(prefix)/lib - cp -f libgridsite.so.$(PATCH_VERSION) $(prefix)/lib - ln -sf libgridsite.so.$(PATCH_VERSION) \ - $(prefix)/lib/libgridsite.so - ln -sf libgridsite.so.$(PATCH_VERSION) \ - $(prefix)/lib/libgridsite.so.$(MAJOR_VERSION) - ln -sf libgridsite.so.$(PATCH_VERSION) \ - $(prefix)/lib/libgridsite.so.$(MINOR_VERSION) - cp -f libgridsite_globus.a $(prefix)/lib - cp -f libgridsite_globus.so.$(PATCH_VERSION) $(prefix)/lib - ln -sf libgridsite_globus.so.$(PATCH_VERSION) \ - $(prefix)/lib/libgridsite_globus.so - ln -sf libgridsite_globus.so.$(PATCH_VERSION) \ - $(prefix)/lib/libgridsite_globus.so.$(MAJOR_VERSION) - ln -sf libgridsite_globus.so.$(PATCH_VERSION) \ - $(prefix)/lib/libgridsite_globus.so.$(MINOR_VERSION) - -install-slashgrid: slashgrid - cp -f slashgrid $(prefix)/sbin - cp -f slashgrid.init $(RPM_BUILD_ROOT)/etc/rc.d/init.d/slashgrid - cp -f ../doc/slashgrid.8.html $(prefix)/share/doc/gridsite-$(MINOR_VERSION) ; \ - cp -f ../doc/slashgrid.8 $(prefix)/share/doc/gridsite-$(MINOR_VERSION) ; \ - cp -f ../doc/slashgrid.8 $(prefix)/share/man/man8 - gzip -f $(prefix)/share/man/man8/slashgrid.8 - mkdir -p $(RPM_BUILD_ROOT)/var/spool/slashgrid/headers - mkdir -p $(RPM_BUILD_ROOT)/var/spool/slashgrid/blocks - mkdir -p $(RPM_BUILD_ROOT)/var/spool/slashgrid/tmp - -install-ws: gridsite-delegation.cgi htproxyput - mkdir -p $(prefix)/include \ - $(prefix)/lib \ - $(prefix)/bin \ - $(prefix)/sbin \ - $(prefix)/share/man/man1 \ - $(prefix)/share/man/man8 \ - $(prefix)/share/doc/gridsite-$(MINOR_VERSION) - cp -f ../doc/*.wsdl $(prefix)/share/doc/gridsite-$(MINOR_VERSION) - for i in htproxyput.1 htproxytime.1 htproxyrenew.1 htproxydestroy.1 \ - htproxyunixtime.1 htproxyinfo.1 ; do \ - cp -f ../doc/$$i.html $(prefix)/share/doc/gridsite-$(MINOR_VERSION) ; \ - cp -f ../doc/$$i $(prefix)/share/doc/gridsite-$(MINOR_VERSION) ; \ - cp -f ../doc/$$i $(prefix)/share/man/man1 ; \ - gzip -f $(prefix)/share/man/man1/$$i ; done - for i in gridsite-delegation.8 ; do \ - cp -f ../doc/$$i.html $(prefix)/share/doc/gridsite-$(MINOR_VERSION) ; \ - cp -f ../doc/$$i $(prefix)/share/doc/gridsite-$(MINOR_VERSION) ; \ - cp -f ../doc/$$i $(prefix)/share/man/man8 ; \ - gzip -f $(prefix)/share/man/man8/$$i ; done - cp -f htproxyput $(prefix)/bin - ln -sf htproxyput $(prefix)/bin/htproxydestroy - ln -sf htproxyput $(prefix)/bin/htproxytime - ln -sf htproxyput $(prefix)/bin/htproxyunixtime - ln -sf htproxyput $(prefix)/bin/htproxyrenew - ln -sf htproxyput $(prefix)/bin/htproxyinfo - cp -f gridsite-delegation.cgi $(prefix)/sbin - -# -# Distributions -# - -# source files tarball -dist: - mkdir -p ../dist/gridsite-$(PATCH_VERSION)/src \ - ../dist/gridsite-$(PATCH_VERSION)/doc \ - ../dist/gridsite-$(PATCH_VERSION)/interface - cp -f ../VERSION ../README ../LICENSE ../CHANGES ../INSTALL \ - ../dist/gridsite-$(PATCH_VERSION) - cp -f Makefile grst*.c htcp.c slashgrid.c slashgrid.init \ - urlencode.c findproxyfile.c gaclexample.c mod_gridsite*.c \ - htproxyput.c grst_admin.h mod_ssl-private.h \ - gsexec.c gsexec.h gridsite-copy.c delegation.h \ - roffit make-gridsite-spec \ - Doxyfile doxygen.css doxyheader.html \ - ../dist/gridsite-$(PATCH_VERSION)/src - cp -f ../doc/*.html ../doc/*.1 ../doc/*.8 ../doc/*.conf ../doc/*.sh \ - ../doc/*.spec ../doc/*.wsdl \ - ../dist/gridsite-$(PATCH_VERSION)/doc - cp -f ../interface/*.h \ - ../dist/gridsite-$(PATCH_VERSION)/interface - cd ../dist ; tar zcvf ../gridsite-$(PATCH_VERSION).src.tar.gz \ - gridsite-$(PATCH_VERSION) - rm -Rf ../dist/gridsite-$(PATCH_VERSION) - - -# binary tarball distribution for htcp users -htcp-bin: htcp - mkdir -p ../htcp-bin-$(PATCH_VERSION)/bin \ - ../htcp-bin-$(PATCH_VERSION)/man/man1 - cp -f ../doc/README.htcp-bin ../htcp-bin-$(PATCH_VERSION) - cp -f htcp ../htcp-bin-$(PATCH_VERSION)/bin - cp -f ../doc/htcp.1 ../doc/htrm.1 ../doc/htls.1 ../doc/htmkdir.1 \ - ../doc/htll.1 ../doc/htmv.1 ../doc/htping.1 ../doc/htfind.1 \ - ../htcp-bin-$(PATCH_VERSION)/man/man1 - ln -sf htcp ../htcp-bin-$(PATCH_VERSION)/bin/htls - ln -sf htcp ../htcp-bin-$(PATCH_VERSION)/bin/htll - ln -sf htcp ../htcp-bin-$(PATCH_VERSION)/bin/htrm - ln -sf htcp ../htcp-bin-$(PATCH_VERSION)/bin/htmkdir - ln -sf htcp ../htcp-bin-$(PATCH_VERSION)/bin/htmv - ln -sf htcp ../htcp-bin-$(PATCH_VERSION)/bin/htping - ln -sf htcp ../htcp-bin-$(PATCH_VERSION)/bin/htfind - cd ../htcp-bin-$(VERSION) ; tar zcvf ../htcp-$(VERSION).bin.tar.gz . - rm -Rf ../htcp-bin-$(PATCH_VERSION) - -# RPM targets: build and RPMs go into subdirectories of ../RPMTMP/ -rpm: dist - export PATCH_VERSION=$(PATCH_VERSION) ; \ - export MINOR_VERSION=$(MINOR_VERSION) ; \ - export MYPREFIX=/usr ; \ - ./make-gridsite-spec - rm -Rf $(MYRPMDIR)/BUILDROOT $(MYRPMDIR)/BUILD - mkdir -p $(MYRPMDIR)/SOURCES $(MYRPMDIR)/SPECS $(MYRPMDIR)/BUILD \ - $(MYRPMDIR)/SRPMS $(MYRPMDIR)/RPMS/i386 $(MYRPMDIR)/BUILDROOT - cp -f ../gridsite-$(PATCH_VERSION).src.tar.gz $(MYRPMDIR)/SOURCES - cp -f gridsite.spec $(MYRPMDIR)/SPECS - $(RPMCMD) --define "_topdir $(MYRPMDIR)" \ - -ba --buildroot $(MYRPMDIR)/BUILDROOT gridsite.spec - - -wtf: - pwd - printenv - ls -l - ls -lR /usr/local/ - ls -lR $(GSOAPDIR) - - diff --git a/org.gridsite.core/src/delegation.h b/org.gridsite.core/src/delegation.h deleted file mode 100644 index 01b462f..0000000 --- a/org.gridsite.core/src/delegation.h +++ /dev/null @@ -1,86 +0,0 @@ -//gsoap ns schema namespace: http://www.gridsite.org/namespaces/delegation-1 - -struct ns__DelegationExceptionType -{ - char *message; //nillable -}; - -struct ns__NewProxyReq -{ - char *proxyRequest; //nillable - char *delegationID; //nillable -}; - -struct _DelegationException -{ - struct ns__DelegationExceptionType *ns__DelegationException; -}; - -//gsoap ns service name: DelegationSoapBinding -//gsoap ns service type: Delegation -//gsoap ns service port: https://localhost/gridsite-delegation.cgi -//gsoap ns service namespace: http://www.gridsite.org/namespaces/delegation-1 - -/* *** getProxyReq method *** */ - -//gsoap ns service method-style: rpc -//gsoap ns service method-encoding: literal -//gsoap ns service method-action: "" -//gsoap ns service method-fault: getProxyReq _DelegationException - -int ns__getProxyReq(char *_delegationID, - struct ns__getProxyReqResponse { - char *getProxyReqReturn; } *); - -/* *** getNewProxyReq method *** */ - -//gsoap ns service method-style: getNewProxyReq rpc -//gsoap ns service method-encoding: getNewProxyReq literal -//gsoap ns service method-action: getNewProxyReq "" -//gsoap ns service method-fault: getNewProxyReq _DelegationException - -int ns__getNewProxyReq(struct ns__getNewProxyReqResponse { - struct ns__NewProxyReq *getNewProxyReqReturn; } *); - -/* *** renewProxyReq method *** */ - -//gsoap ns service method-style: renewProxyReq rpc -//gsoap ns service method-encoding: renewProxyReq literal -//gsoap ns service method-action: renewProxyReq "" -//gsoap ns service method-fault: renewProxyReq _DelegationException - -int ns__renewProxyReq(char *_delegationID, - struct ns__renewProxyReqResponse { - char *_renewProxyReqReturn; } *); - -/* *** putProxy method *** */ - -//gsoap ns service method-style: putProxy rpc -//gsoap ns service method-encoding: putProxy literal -//gsoap ns service method-action: putProxy "" -//gsoap ns service method-fault: putProxy _DelegationException - -int ns__putProxy(char *_delegationID, - char *_proxy, - struct ns__putProxyResponse { } *); - -/* *** getTerminationTime method *** */ - -//gsoap ns service method-style: getTerminationTime rpc -//gsoap ns service method-encoding: getTerminationTime literal -//gsoap ns service method-action: getTerminationTime "" -//gsoap ns service method-fault: getTerminationTime _DelegationException - -int ns__getTerminationTime(char *_delegationID, - struct ns__getTerminationTimeResponse { - time_t _getTerminationTimeReturn; } *); - -/* *** destroy method *** */ - -//gsoap ns service method-style: destroy rpc -//gsoap ns service method-encoding: destroy literal -//gsoap ns service method-action: destroy "" -//gsoap ns service method-fault: destroy _DelegationException - -int ns__destroy(char *_delegationID, - struct ns__destroyResponse { } *); diff --git a/org.gridsite.core/src/doxygen.css b/org.gridsite.core/src/doxygen.css deleted file mode 100644 index 97ebc25..0000000 --- a/org.gridsite.core/src/doxygen.css +++ /dev/null @@ -1,49 +0,0 @@ -H1 { text-align: center; } -CAPTION { font-weight: bold } -A.qindex {} -A.qindexRef {} -A.el { text-decoration: none; font-weight: bold } -A.elRef { font-weight: bold } -A.code { text-decoration: none; font-weight: normal; color: #4444ee } -A.codeRef { font-weight: normal; color: #4444ee } -A:hover { text-decoration: none; background-color: #f2f2ff } -DL.el { margin-left: -1cm } -DIV.fragment { width: 100%; border: none; background-color: #eeeeee } -DIV.ah { background-color: black; font-weight: bold; color: #ffffff; margin-bottom: 3px; margin-top: 3px } -TD.md { background-color: #f2f2ff; font-weight: bold; } -TD.mdname1 { background-color: #f2f2ff; font-weight: bold; color: #602020; } -TD.mdname { background-color: #f2f2ff; font-weight: bold; color: #602020; width: 600px; } -DIV.groupHeader { margin-left: 16px; margin-top: 12px; margin-bottom: 6px; font-weight: bold } -DIV.groupText { margin-left: 16px; font-style: italic; font-size: smaller } -XXBODY { background: white } -TD.indexkey { - background-color: #eeeeff; - font-weight: bold; - padding-right : 10px; - padding-top : 2px; - padding-left : 10px; - padding-bottom : 2px; - margin-left : 0px; - margin-right : 0px; - margin-top : 2px; - margin-bottom : 2px -} -TD.indexvalue { - background-color: #eeeeff; - font-style: italic; - padding-right : 10px; - padding-top : 2px; - padding-left : 10px; - padding-bottom : 2px; - margin-left : 0px; - margin-right : 0px; - margin-top : 2px; - margin-bottom : 2px -} -span.keyword { color: #008000 } -span.keywordtype { color: #604020 } -span.keywordflow { color: #e08000 } -span.comment { color: #800000 } -span.preprocessor { color: #806020 } -span.stringliteral { color: #002080 } -span.charliteral { color: #008080 } diff --git a/org.gridsite.core/src/doxyheader.html b/org.gridsite.core/src/doxyheader.html deleted file mode 100644 index af78b52..0000000 --- a/org.gridsite.core/src/doxyheader.html +++ /dev/null @@ -1 +0,0 @@ -

    GridSite Version 1.1.x diff --git a/org.gridsite.core/src/findproxyfile.c b/org.gridsite.core/src/findproxyfile.c deleted file mode 100644 index 423ffa2..0000000 --- a/org.gridsite.core/src/findproxyfile.c +++ /dev/null @@ -1,122 +0,0 @@ -/* - Copyright (c) 2002-6, Andrew McNab, University of Manchester - All rights reserved. - - Redistribution and use in source and binary forms, with or - without modification, are permitted provided that the following - conditions are met: - - o Redistributions of source code must retain the above - copyright notice, this list of conditions and the following - disclaimer. - o Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following - disclaimer in the documentation and/or other materials - provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND - CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS - BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED - TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - POSSIBILITY OF SUCH DAMAGE. -*/ - -#ifndef VERSION -#define VERSION "0.0.0" -#endif - -#define _GNU_SOURCE - -#include -#include -#include -#include - -#include - -#include "gridsite.h" - -void printsyntax(char *argv0) -{ - char *p; - - p = rindex(argv0, '/'); - if (p != NULL) ++p; - else p = argv0; - - fprintf(stderr, "%s [--outsidecache] [--proxycache=PATH] " - "[--delegation-id=DELEGATION-ID] [--user-dn=USER-DN]\n" - "(Version: %s)\n", p, VERSION); -} - -#define GRST_PROXY_CACHE "/var/www/proxycache" - -int main(int argc, char *argv[]) -{ - char *delegation_id = "_", *proxycache = "", *user_dn = "", - *proxyfile = NULL; - int c, outsidecache = 0, verbose = 0, option_index; - struct option long_options[] = { {"verbose", 0, 0, 'v'}, - {"outsidecache", 0, 0, 0}, - {"proxycache", 1, 0, 0}, - {"delegation-id", 1, 0, 0}, - {"user-dn", 1, 0, 0}, - {0, 0, 0, 0} }; - - if (argc == 1) - { - printsyntax(argv[0]); - return 0; - } - - while (1) - { - option_index = 0; - - c = getopt_long(argc, argv, "v", long_options, &option_index); - - if (c == -1) break; - else if (c == 0) - { - if (option_index == 1) outsidecache = 1; - else if (option_index == 2) proxycache = optarg; - else if (option_index == 3) delegation_id = optarg; - else if (option_index == 4) user_dn = optarg; - } - else if (c == 'v') ++verbose; - } - - if (*user_dn != '\0') /* try to find in proxy cache */ - { - if ((proxycache == NULL) || (*proxycache == '\0')) - proxycache = getenv("GRST_PROXY_CACHE"); - - if ((proxycache == NULL) || (*proxycache == '\0')) - proxycache = GRST_PROXY_CACHE; - - proxyfile = GRSTx509CachedProxyFind(proxycache, delegation_id, user_dn); - } - - if (((proxyfile == NULL) || (*proxyfile == '\0')) && outsidecache) - { - proxyfile = GRSTx509FindProxyFileName(); - } - - if ((proxyfile != NULL) && (*proxyfile != '\0')) - { - puts(proxyfile); - return 0; - } - - fputs("No proxy file found\n", stderr); - - return 1; -} diff --git a/org.gridsite.core/src/gaclexample.c b/org.gridsite.core/src/gaclexample.c deleted file mode 100644 index 32aaaa4..0000000 --- a/org.gridsite.core/src/gaclexample.c +++ /dev/null @@ -1,145 +0,0 @@ -/* - Copyright (c) 2002-7, Andrew McNab, University of Manchester - All rights reserved. - - Redistribution and use in source and binary forms, with or - without modification, are permitted provided that the following - conditions are met: - - o Redistributions of source code must retain the above - copyright notice, this list of conditions and the following - disclaimer. - o Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following - disclaimer in the documentation and/or other materials - provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND - CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS - BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED - TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - POSSIBILITY OF SUCH DAMAGE. -*/ - -/*---------------------------------------------------------------* - * For more about GridSite: http://www.gridsite.org/ * - *---------------------------------------------------------------*/ - -/* - Example program using GACL - - Build with: - - gcc -o gaclexample gaclexample.c -L. -I. -lgridsite -lxml2 -lz -lm -*/ - -#include -#include -#include -#include - -int main() -{ - GRSTgaclCred *cred, *usercred; - GRSTgaclEntry *entry; - GRSTgaclAcl *acl1, *acl2; - GRSTgaclUser *user; - GRSTgaclPerm perm0, perm1, perm2; - FILE *fp; - - /* must initialise GACL before using it */ - - GRSTgaclInit(); - - /* build up an ACL, starting with a credential */ - - cred = GRSTgaclCredCreate("dn:", "/O=Grid/CN=Mr Grid Person"); - - /* create an entry to put it in */ - - entry = GRSTgaclEntryNew(); - - /* add the credential to it */ - - GRSTgaclEntryAddCred(entry, cred); - - /* add another credential */ - - cred = GRSTgaclCredCreate("https://example-dn-list", NULL); /* DN List */ - GRSTgaclEntryAddCred(entry, cred); - - fp = fopen("https%3A%2F%2Fexample-dn-list", "w"); - fputs("/O=Grid/CN=Mr Grid Person\n", fp); - fclose(fp); - - /* associate some permissions and denials to the credential */ - - GRSTgaclEntryAllowPerm( entry, GRST_PERM_READ); - GRSTgaclEntryAllowPerm( entry, GRST_PERM_WRITE); - GRSTgaclEntryAllowPerm( entry, GRST_PERM_ADMIN); - GRSTgaclEntryDenyPerm( entry, GRST_PERM_ADMIN); - GRSTgaclEntryDenyPerm( entry, GRST_PERM_LIST); - - perm0 = GRST_PERM_READ | GRST_PERM_WRITE; - - printf("\n**** perm should be %d in the following tests! ****\n\n", perm0); - - /* create a new ACL and add the entry to it */ - - acl1 = GRSTgaclAclNew(); - - GRSTgaclAclAddEntry(acl1, entry); - - /* create a GRSTgaclUser to compare with the ACL */ - - /* old style cred creation: use GRSTgaclCredCreate as above now */ - usercred = GRSTgaclCredNew("person"); - GRSTgaclCredAddValue(usercred, "dn", "/O=Grid/CN=Mr Grid Person"); - /* end of old style cred creation */ - - user = GRSTgaclUserNew(usercred); - - GRSTgaclUserSetDNlists(user, getcwd(NULL, 0)); - printf("DN Lists dir %s\n", getcwd(NULL, 0)); - -// putenv("GRST_DN_LISTS=."); - - perm1 = GRSTgaclAclTestUser(acl1, user); - - printf("test /O=Grid/CN=Mr Grid Person in acl, perm = %d\n", perm1); - - /* print and save the whole ACL */ - - GRSTgaclAclPrint(acl1, stdout); - - GRSTgaclAclSave(acl1, "example.gacl"); - - puts("gridacl.out saved"); - - puts(""); - - /* load the ACL back off the disk, print and test it */ - - acl2 = GRSTgaclAclLoadFile("example.gacl"); - - puts("gridacl.out loaded"); - - if (acl2 != NULL) GRSTgaclAclPrint(acl2, stdout); else puts("acl2 is NULL"); - - perm2 = GRSTgaclAclTestUser(acl2, user); - - printf("test /O=Grid/CN=Mr Grid Person in acl, perm = %d\n", perm2); - - if (perm1 != perm0) return 1; - if (perm2 != perm0) return 2; - - return 0; -} diff --git a/org.gridsite.core/src/gridsite-copy.c b/org.gridsite.core/src/gridsite-copy.c deleted file mode 100644 index 7eb4578..0000000 --- a/org.gridsite.core/src/gridsite-copy.c +++ /dev/null @@ -1,168 +0,0 @@ -/* - Copyright (c) 2005, Yibiao Li, University of Manchester - All rights reserved. - - Redistribution and use in source and binary forms, with or - without modification, are permitted provided that the following - conditions are met: - - o Redistributions of source code must retain the above - copyright notice, this list of conditions and the following - disclaimer. - o Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following - disclaimer in the documentation and/or other materials - provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND - CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS - BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED - TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - POSSIBILITY OF SUCH DAMAGE. -*/ - -/////////////////////////////////////////////////////////////////// -// -// compile: gcc -lcurl gridsite-copy.c -o gridsite-copy.cgi -// usage: cp gridsite-copy.cgi to the cgi-bin directory -// and map the COPY method to gridsite-copy.cgi -// by adding a line in httpd.conf: -// script COPY /cgi-bin/gridsite-copy.cgi -// -/////////////////////////////////////////////////////////////////// -#ifdef GRST_USE_FASTCGI -#include -#endif -#include -#include -#include -#include -#include -#include -#include - -extern char **environ; - -size_t write_data(void *ptr, size_t size, size_t nmemb, void *stream) -{ - int written = fwrite(ptr, size, nmemb, (FILE *)stream); - return written; -} - -int gridsite_copy() -{ - char *getenv(); - - CURL *curl; - CURLcode res; - struct tms s_time, e_time; - FILE *fout; - - char *requestURI; - int grstPerm, srcsecure; - char passcode[100]; - char destination[500], destDir[400], destName[100]; - char *ptr, *ptr1; - - times(&s_time); - passcode[0]='\0'; - char *capath="/etc/grid-security/certificates"; - - printf("Content-type: text/html\n\n"); - printf("HTTP COPY\n"); - printf("

    HTTP FILE COPY

    \n"); - - curl = curl_easy_init(); - printf("Server: Initialized!\n"); - if(curl) { - //get the request URI - requestURI = curl_getenv("REQUEST_URI"); - if( strncmp( requestURI, "https://", 8 )==0 )srcsecure=1; - else srcsecure=0; - printf("The request URL is %s\n", requestURI); - - //get the destination directory and file name - strcpy(destination, getenv("HTTP_DESTINATION")); - ptr=destination; - ptr1 = strrchr(ptr, '/'); - ptr1+=1; - strcpy( destName, ptr1 ); - *ptr1 = '\0'; - strcpy( destDir, ptr ); - - // get the one time passcode from cookie string. - // the segmenty of code is tested on 19th sep. 2005 - if( (ptr=curl_getenv("HTTP_COOKIE")) != NULL) - { - ptr += 20; - strcpy( passcode, ptr ); - } - - //get permision attributes - grstPerm = atoi(curl_getenv("GRST_DESTINATION_PERM")); - - if( grstPerm & 8 ) // write right - { - curl_easy_setopt(curl, CURLOPT_VERBOSE, 0); - - if( srcsecure == 1 ) - { - curl_easy_setopt(curl, CURLOPT_COOKIE, passcode ); - curl_easy_setopt(curl, CURLOPT_CAPATH, capath ); - } - - curl_easy_setopt(curl, CURLOPT_URL, requestURI ); - - strcpy( destination, getenv("GRST_DESTINATION_TRANSLATED")); - fout = fopen( destination, "w" ); - if( fout == NULL ){ - printf("cannot open file to write,"); - printf(" maybe you have no right to write in the directory.\n"); - exit(-1); - } - curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, write_data); - curl_easy_setopt(curl, CURLOPT_WRITEDATA, fout ); - res = curl_easy_perform(curl); - if( res!=0 ) - { - printf("Server: There are some things wrong with OPT parameters.%d \n", res); - } - else printf("Server: The file has been successfully copied.\n"); - fclose(fout); - } - else - { - printf("You have no permission to write in the destination directory.\n"); - } - - curl_easy_cleanup(curl); - } - else{ - printf("Server: cannot initialize CURL!\n"); - } - - curl_global_cleanup(); - - times(&e_time); - printf("Server: copying time %ld seconds\n", e_time.tms_utime-s_time.tms_utime); - printf("\n"); - return 0; -} - -int main( void ) -{ -#ifdef GRST_USE_FASTCGI - while(FCGI_Accept() >= 0) -#endif - { - gridsite_copy(); - } -} diff --git a/org.gridsite.core/src/grst-delegation.c b/org.gridsite.core/src/grst-delegation.c deleted file mode 100644 index 87f2278..0000000 --- a/org.gridsite.core/src/grst-delegation.c +++ /dev/null @@ -1,347 +0,0 @@ -/* - Copyright (c) 2002-6, Andrew McNab, University of Manchester - All rights reserved. - - Redistribution and use in source and binary forms, with or - without modification, are permitted provided that the following - conditions are met: - - o Redistributions of source code must retain the above - copyright notice, this list of conditions and the following - disclaimer. - o Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following - disclaimer in the documentation and/or other materials - provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND - CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS - BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED - TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - POSSIBILITY OF SUCH DAMAGE. -*/ - -/*---------------------------------------------------------------------------* - * This program is part of GridSite: http://www.gridpp.ac.uk/authz/gridsite/ * - *---------------------------------------------------------------------------*/ - -#ifndef VERSION -#define VERSION "0.0.1" -#endif - -#define _GNU_SOURCE -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include - -#include "soapH.h" -#include "DelegationSoapBinding.nsmap" - -#define GRST_PROXYCACHE "/../proxycache/" - -int main(int argn, char *argv[]) -{ - char *docroot, *method, *request, *p, *client_dn, *user_dn, - *delegation_id, *reqtxt, *proxydir; - struct soap soap; - - method = getenv("REQUEST_METHOD"); - if (strcmp(method, "POST") == 0) - { - soap_init(&soap); - soap_serve(&soap); /* CGI application */ - return 0; - } - - puts("Status: 501 Method Not Implemented\n"); - return 0; -} - -char *get_dn(void) -{ - int i; - char *p, *s, *dn; - GRSTgaclCred *cred = NULL; - - for (i=0; ; ++i) - { - asprintf(&p, "GRST_CRED_%d", i); - s = getenv(p); - free(p); - - if (s == NULL) break; - - if ((cred = GRSTx509CompactToCred(s)) == NULL) break; - - if ((strcmp(cred->type, "person") == 0) && - (cred->firstname != NULL) && - (cred->firstname->name != NULL) && - (strcmp(cred->firstname->name, "dn") == 0) && - (cred->firstname->value != NULL)) - { - dn = strdup(cred->firstname->value); - GRSTgaclCredFree(cred); - return dn; - } - - GRSTgaclCredFree(cred); - } - - return NULL; -} - -int ns__getProxyReq(struct soap *soap, - char *delegation_id, - struct ns__getProxyReqResponse *response) -{ - int i; - char *p, *user_dn, *docroot, *proxydir, *request; - - if ((user_dn = get_dn()) == NULL) return SOAP_ERR; - - if ((delegation_id == NULL) || (*delegation_id == '\0')) - delegation_id = GRSTx509MakeDelegationID(); - else for (i=0; delegation_id[i] != '\0'; ++i) - { - if (!isalnum(delegation_id[i]) && - (delegation_id[i] != '.') && - (delegation_id[i] != ',') && - (delegation_id[i] != '_')) - { - delegation_id = NULL; - break; - } - } - - docroot = getenv("DOCUMENT_ROOT"); - asprintf(&proxydir, "%s/%s", docroot, GRST_PROXYCACHE); - - if ((user_dn != NULL) && - (user_dn[0] != '\0') && - (delegation_id != NULL) && - (GRSTx509MakeProxyRequest(&request, proxydir, - delegation_id, user_dn) == 0)) - { - response->getProxyReqReturn = request; - - free(user_dn); - return SOAP_OK; - } - - free(user_dn); - return SOAP_ERR; -} - -int ns__getNewProxyReq(struct soap *soap, - struct ns__getNewProxyReqResponse *response) -{ - char *p, *user_dn, *docroot, *proxydir, *request, *delegation_id; - - if ((user_dn = get_dn()) == NULL) return SOAP_ERR; - - delegation_id = GRSTx509MakeDelegationID(); - - docroot = getenv("DOCUMENT_ROOT"); - asprintf(&proxydir, "%s/%s", docroot, GRST_PROXYCACHE); - - if ((user_dn != NULL) && - (user_dn[0] != '\0') && - (delegation_id != NULL) && - (GRSTx509MakeProxyRequest(&request, proxydir, - delegation_id, user_dn) == 0)) - { - response->getNewProxyReqReturn = malloc(sizeof(struct ns__NewProxyReq)); - response->getNewProxyReqReturn->proxyRequest = request; - response->getNewProxyReqReturn->delegationID = delegation_id; - - free(user_dn); - return SOAP_OK; - } - - free(user_dn); - return SOAP_ERR; -} - -int ns__putProxy(struct soap *soap, char *delegation_id, - char *proxy, - struct ns__putProxyResponse *response) -{ - int fd, c, len = 0, i; - char *docroot, *proxydir, *p, *user_dn; - - if ((user_dn = get_dn()) == NULL) return SOAP_ERR; - - if ((delegation_id == NULL) || (*delegation_id == '\0')) - delegation_id = GRSTx509MakeDelegationID(); - else for (i=0; delegation_id[i] != '\0'; ++i) - { - if (!isalnum(delegation_id[i]) && - (delegation_id[i] != '.') && - (delegation_id[i] != ',') && - (delegation_id[i] != '_')) - { - delegation_id = NULL; - break; - } - } - - docroot = getenv("DOCUMENT_ROOT"); - asprintf(&proxydir, "%s/%s", docroot, GRST_PROXYCACHE); - - if ((user_dn == NULL) || - (user_dn[0] == '\0') || - (delegation_id == NULL) || - (GRSTx509CacheProxy(proxydir, delegation_id, user_dn, proxy) - != GRST_RET_OK)) - { - free(proxydir); - free(user_dn); - return SOAP_ERR; - } - - free(proxydir); - free(user_dn); - return SOAP_OK; -} - -int ns__renewProxyReq(struct soap *soap, - char *delegation_id, - struct ns__renewProxyReqResponse *response) -{ - int i; - char *p, *user_dn, *docroot, *proxydir, *request; - - if ((user_dn = get_dn()) == NULL) return SOAP_ERR; - - if (delegation_id == NULL) - { - free(user_dn); - return SOAP_ERR; - } - - for (i=0; delegation_id[i] != '\0'; ++i) - { - if (!isalnum(delegation_id[i]) && - (delegation_id[i] != '.') && - (delegation_id[i] != ',') && - (delegation_id[i] != '_')) - { - delegation_id = NULL; - break; - } - } - - if (*delegation_id == '\0') - { - free(user_dn); - return SOAP_ERR; - } - - docroot = getenv("DOCUMENT_ROOT"); - asprintf(&proxydir, "%s/%s", docroot, GRST_PROXYCACHE); - - if ((user_dn != NULL) && - (user_dn[0] != '\0') && - (delegation_id != NULL) && - (GRSTx509MakeProxyRequest(&request, proxydir, - delegation_id, user_dn) == 0)) - { - response->_renewProxyReqReturn = request; - - free(user_dn); - return SOAP_OK; - } - - free(user_dn); - return SOAP_ERR; -} - -int ns__getTerminationTime(struct soap *soap, - char *delegation_id, - struct ns__getTerminationTimeResponse *response) -{ - char *p, *user_dn, *docroot, *proxydir; - time_t start, finish; - - if ((user_dn = get_dn()) == NULL) return SOAP_ERR; - - delegation_id = GRSTx509MakeDelegationID(); - - docroot = getenv("DOCUMENT_ROOT"); - asprintf(&proxydir, "%s/%s", docroot, GRST_PROXYCACHE); - - if ((user_dn != NULL) && - (user_dn[0] != '\0') && - (delegation_id != NULL) && - (GRSTx509ProxyGetTimes(proxydir, delegation_id, user_dn, - &start, &finish) == 0)) - { - response->_getTerminationTimeReturn = finish; - - free(user_dn); - return SOAP_OK; - } - - free(user_dn); - return SOAP_ERR; -} - -int ns__destroy(struct soap *soap, - char *delegation_id, - struct ns__destroyResponse *response) -{ - int fd, c, len = 0, i; - char *docroot, *proxydir, *p, *client_dn, *user_dn; - - if ((user_dn = get_dn()) == NULL) return SOAP_ERR; - - if ((delegation_id == NULL) || (*delegation_id == '\0')) - delegation_id = GRSTx509MakeDelegationID(); - else for (i=0; delegation_id[i] != '\0'; ++i) - { - if (!isalnum(delegation_id[i]) && - (delegation_id[i] != '.') && - (delegation_id[i] != ',') && - (delegation_id[i] != '_')) - { - delegation_id = NULL; - break; - } - } - - docroot = getenv("DOCUMENT_ROOT"); - asprintf(&proxydir, "%s/%s", docroot, GRST_PROXYCACHE); - - if ((user_dn == NULL) || - (user_dn[0] == '\0') || - (delegation_id == NULL) || - (GRSTx509ProxyDestroy(proxydir, delegation_id, user_dn) - != GRST_RET_OK)) - { - free(proxydir); - free(user_dn); - return SOAP_ERR; - } - - free(proxydir); - free(user_dn); - return SOAP_OK; -} diff --git a/org.gridsite.core/src/grst_admin.h b/org.gridsite.core/src/grst_admin.h deleted file mode 100644 index cddc415..0000000 --- a/org.gridsite.core/src/grst_admin.h +++ /dev/null @@ -1,57 +0,0 @@ -/* - Copyright (c) 2002-3, Andrew McNab and Shiv Kaushal, - University of Manchester. All rights reserved. - - Redistribution and use in source and binary forms, with or - without modification, are permitted provided that the following - conditions are met: - - o Redistributions of source code must retain the above - copyright notice, this list of conditions and the following - disclaimer. - o Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following - disclaimer in the documentation and/or other materials - provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND - CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS - BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED - TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - POSSIBILITY OF SUCH DAMAGE. -*/ - -/*------------------------------------------------------------------* - * This program is part of GridSite: http://www.gridsite.org/ * - *------------------------------------------------------------------*/ - -void GRSThttpError(char *); -void adminfooter(GRSThttpBody *, char *, char *, char *, char *); -int GRSTstrCmpShort(char *, char *); -char *makevfilename(char *, size_t, char *); - -/*CGI GACL - Edit interface functions*/ -void show_acl(int admin, GRSTgaclUser *user, char *dn, GRSTgaclPerm perm, char *help_uri, char *dir_path, char *file, char *dir_uri, char *admin_file); -void new_entry_form(GRSTgaclUser *user, char *dn, GRSTgaclPerm perm, char *help_uri, char *dir_path, char *file, char *dir_uri, char *admin_file); -void new_entry(GRSTgaclUser *user, char *dn, GRSTgaclPerm perm, char *help_uri, char *dir_path, char *file, char *dir_uri, char *admin_file); -void del_entry(GRSTgaclUser *user, char *dn, GRSTgaclPerm perm, char *help_uri, char *dir_path, char *file, char *dir_uri, char *admin_file); -void edit_entry_form(GRSTgaclUser *user, char *dn, GRSTgaclPerm perm, char *help_uri, char *dir_path, char *file, char *dir_uri, char *admin_file); -void edit_entry(GRSTgaclUser *user, char *dn, GRSTgaclPerm perm, char *help_uri, char *dir_path, char *file, char *dir_uri, char *admin_file); -void add_cred_form(GRSTgaclUser *user, char *dn, GRSTgaclPerm perm, char *help_uri, char *dir_path, char *file, char *dir_uri, char *admin_file); -void add_cred(GRSTgaclUser *user, char *dn, GRSTgaclPerm perm, char *help_uri, char *dir_path, char *file, char *dir_uri, char *admin_file); -void del_cred(GRSTgaclUser *user, char *dn, GRSTgaclPerm perm, char *help_uri, char *dir_path, char *file, char *dir_uri, char *admin_file); -void del_entry_sure(GRSTgaclUser *user, char *dn, GRSTgaclPerm perm, char *help_uri, char *dir_path, char *file, char *dir_uri, char *admin_file); -void del_cred_sure(GRSTgaclUser *user, char *dn, GRSTgaclPerm perm, char *help_uri, char *dir_path, char *file, char *dir_uri, char *admin_file); - -/*Functions producing messages*/ -//void error(char *dn, GRSTgaclPerm perm, char *help_uri, char *dir_path, char *file, char *dir_uri, char *admin_file); -void admin_continue(char *dn, GRSTgaclPerm perm, char *help_uri, char *dir_path, char *file, char *dir_uri, char *admin_file, GRSThttpBody *bp); - diff --git a/org.gridsite.core/src/grst_admin_file.c b/org.gridsite.core/src/grst_admin_file.c deleted file mode 100644 index d6619a6..0000000 --- a/org.gridsite.core/src/grst_admin_file.c +++ /dev/null @@ -1,1573 +0,0 @@ -/* - Copyright (c) 2002-3, Andrew McNab, University of Manchester - All rights reserved. - - Redistribution and use in source and binary forms, with or - without modification, are permitted provided that the following - conditions are met: - - o Redistributions of source code must retain the above - copyright notice, this list of conditions and the following - disclaimer. - o Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following - disclaimer in the documentation and/or other materials - provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND - CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS - BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED - TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - POSSIBILITY OF SUCH DAMAGE. -*/ - -/*------------------------------------------------------------------* - * This program is part of GridSite: http://www.gridsite.org/ * - *------------------------------------------------------------------*/ - -#ifndef VERSION -#define VERSION "x.x.x" -#endif - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -// when porting: remember that sendfile() is very OS-specific! -#include - -#include - -#include "grst_admin.h" - -char *storeuploadfile(char *boundary, int *bufferused) -{ -// rewrite this to copy whole POSTed stdin HTTP body to disk then -// mmap() and pick apart? How to deal with 100MB uploaded files, say? - - char *filebuffer = NULL; - int bufferlen = 0, c, boundarylen; - - *bufferused = 0; - boundarylen = strlen(boundary); - - while ((c = getchar()) != EOF) - { - if (*bufferused > 1024*1024*100) return NULL; - - ++(*bufferused); - - if (*bufferused > bufferlen) - { - bufferlen = bufferlen + 1000; - filebuffer = realloc(filebuffer, (size_t) bufferlen); - } - - filebuffer[*bufferused - 1] = c; - - if ( (*bufferused >= boundarylen + 4) && - (boundary[boundarylen-1] == c) && - (boundary[boundarylen-2] == filebuffer[*bufferused - 2]) && - (strncmp(boundary, &filebuffer[*bufferused - boundarylen], - boundarylen) == 0)) - { - *bufferused = *bufferused - boundarylen - 4; - - if (filebuffer == NULL) return strdup(""); - else return filebuffer; - } - } - - return NULL; -} - -void uploadfile(char *dn, GRSTgaclPerm perm, char *help_uri, char *dir_path, - char *dir_uri, char *admin_file) -{ - char *boundary, *p, oneline[1086], *filename = NULL, - tmpfilename[1025], *filebuffer = NULL, *filepath, - *vfile, *dir_path_vfile; - int mimestate, bufferused = 0, itworked = 0; - FILE *fp; - GRSThttpBody bp; - -#define MIMESTUNKNOWN 1 -#define MIMESTUPLOAD 2 -#define MIMESTFILENM 3 - - if (!GRSTgaclPermHasWrite(perm)) GRSThttpError("403 Forbidden"); - - p = getenv("CONTENT_TYPE"); - boundary = &p[30]; - - mimestate = MIMESTUNKNOWN; - - while (fgets(oneline, sizeof(oneline), stdin) != NULL) - { - if (*oneline == 13) // MIME has CR/LF line breaks, CR=13 - { - if (mimestate == MIMESTUPLOAD) - { - filebuffer = storeuploadfile(boundary, &bufferused); - mimestate = MIMESTUNKNOWN; - } - else if (mimestate == MIMESTFILENM) - { - fgets(tmpfilename, sizeof(tmpfilename), stdin); - if (*tmpfilename != 13) - { - p = index(tmpfilename, 13); - *p = '\0'; - filename = strdup(tmpfilename); - } - mimestate = MIMESTUNKNOWN; - } - } - else if (GRSTstrCmpShort(oneline, - "Content-Disposition: form-data; name=\"uploadfile\"; filename=\"") - == 0) - { - mimestate = MIMESTUPLOAD; - if (filename == NULL) - { - filename = strdup(&oneline[61]); - - p = rindex(&oneline[61], '\\'); - if (p != NULL) { ++p ; filename = p; } - - p = rindex(&oneline[61], '/'); - if (p != NULL) { ++p ; filename = p; } - - p = index(filename, '"'); - if (p != NULL) *p = '\0'; - } - } - else if (GRSTstrCmpShort(oneline, - "Content-Disposition: form-data; name=\"file\"") == 0) - { - mimestate = MIMESTFILENM; - } - } - - if ((filebuffer != NULL) && (bufferused >= 0)) - { - if (filename == NULL) GRSThttpError("403 Forbidden"); - else if ((index(filename, '/') != NULL) || - (strcmp(filename, GRST_ACL_FILE) == 0)) - { - puts("Status: 403 Forbidden filename\nContent-Type: text/html"); - - GRSThttpBodyInit(&bp); - - GRSThttpPrintf(&bp,"Forbidden filename %s\n", filename); - GRSThttpPrintHeaderFooter(&bp, dir_path, GRST_HEADFILE); - - GRSThttpPrintf(&bp, "

    Forbidden filename %s

    \n", - filename); - - GRSThttpPrintf(&bp, - "

    New file names cannot include slashes " - "or use the reserved ACL name, %s\n", GRST_ACL_FILE); - - GRSThttpPrintf(&bp,"

    " - "Return to " - "directory listing\n", dir_uri, admin_file); - - adminfooter(&bp, dn, help_uri, dir_uri, admin_file); - GRSThttpPrintHeaderFooter(&bp, dir_path, GRST_FOOTFILE); - - GRSThttpWriteOut(&bp); - return; - } - else - { - vfile = makevfilename(filename, bufferused, dn); - asprintf(&dir_path_vfile, "%s/%s", dir_path, vfile); - - fp = fopen(dir_path_vfile, "w"); - if (fp != NULL) - { - if ((fwrite(filebuffer, - sizeof(char), bufferused, fp) == bufferused) && - (fclose(fp) == 0)) - { - asprintf(&filepath, "%s/%s", dir_path, filename); - - unlink(filepath); /* this can fail ok */ - - itworked = (link(dir_path_vfile, filepath) == 0); - } - } - } - - free((void *) filebuffer); - } - - if (itworked) - { - printf("Status: 302 Moved Temporarily\nContent-Length: 0\n" - "Location: %s%s?cmd=managedir\n\n", dir_uri, admin_file); - return; - } - - puts("Status: 500 Failed trying to upload\nContent-Type: text/html"); - - GRSThttpBodyInit(&bp); - - GRSThttpPrintf(&bp, "Failed to upload\n"); - - GRSThttpPrintHeaderFooter(&bp, dir_path, GRST_HEADFILE); - - GRSThttpPrintf(&bp, "

    Failed to upload

    \n"); - - GRSThttpPrintf(&bp, "

    GridSite considers you are authorized " - "to upload the file, but the upload failed. This is " - "probably a web server or operating system level " - "misconfiguration. Consult the site administrator."); - - GRSThttpPrintf(&bp,"

    " - "Return to " - "directory listing\n", dir_uri, admin_file); - - adminfooter(&bp, dn, help_uri, dir_uri, admin_file); - GRSThttpPrintHeaderFooter(&bp, dir_path, GRST_FOOTFILE); - - GRSThttpWriteOut(&bp); -} - -void deletefileaction(char *dn, GRSTgaclPerm perm, char *help_uri, - char *dir_path, char *file, char *dir_uri, - char *admin_file) -{ - int fd, numfiles; - char *dir_path_file, *dir_path_vfile, *p, *vfile, *dnlistsuri, - *fulluri, *server_name, *realfile; - struct stat statbuf; - GRSThttpBody bp; - struct dirent *subdirfile_ent; - DIR *subDIR; - - if (((strcmp(file, GRST_ACL_FILE) != 0) && !GRSTgaclPermHasWrite(perm)) || - ((strcmp(file, GRST_ACL_FILE) == 0) && !GRSTgaclPermHasAdmin(perm))) - GRSThttpError("403 Forbidden"); - - dnlistsuri = getenv("GRST_DN_LISTS_URI"); - if (dnlistsuri == NULL) dnlistsuri = getenv("REDIRECT_GRST_DN_LISTS_URI"); - - if ((dnlistsuri != NULL) && - (strncmp(dnlistsuri, dir_uri, strlen(dnlistsuri)) == 0)) - realfile = GRSThttpUrlEncode(file); - else if (index(file, '/') != NULL) GRSThttpError("403 Forbidden"); - else realfile = file; - - dir_path_file = malloc(strlen(dir_path) + strlen(realfile) + 2); - - strcpy(dir_path_file, dir_path); - strcat(dir_path_file, "/"); - strcat(dir_path_file, realfile); - - if ((stat(dir_path_file, &statbuf) == 0) && S_ISDIR(statbuf.st_mode)) - { - subDIR = opendir(dir_path_file); - if (subDIR == NULL) numfiles = 99; /* stop deletion */ - else - { - numfiles = 0; - while ((subdirfile_ent = readdir(subDIR)) != NULL) - if (subdirfile_ent->d_name[0] != '.') ++numfiles; - else if (strncmp(subdirfile_ent->d_name, - GRST_ACL_FILE, - sizeof(GRST_ACL_FILE)) == 0) ++numfiles; - closedir(subDIR); - } - - if (numfiles == 0) - { - vfile = makevfilename(file, 0, dn); - dir_path_vfile = malloc(strlen(dir_path) + strlen(vfile) + 2); - strcpy(dir_path_vfile, dir_path); - strcat(dir_path_vfile, "/"); - strcat(dir_path_vfile, vfile); - - if (rename(dir_path_file, dir_path_vfile) == 0) - { - printf("Status: 302 Moved Temporarily\nContent-Length: 0\n" - "Location: %s%s?cmd=managedir\n\n", dir_uri, admin_file); - return; - } - } - } - else if (unlink(dir_path_file) == 0) - { - if (strcmp(file, GRST_ACL_FILE) != 0) - { - vfile = makevfilename(file, 0, dn); - dir_path_file = malloc(strlen(dir_path) + strlen(vfile) + 2); - strcpy(dir_path_file, dir_path); - strcat(dir_path_file, "/"); - strcat(dir_path_file, vfile); - - fd = open(dir_path_file, O_WRONLY | O_CREAT); - if (fd != -1) close(fd); - } - - printf("Status: 302 Moved Temporarily\nContent-Length: 0\n" - "Location: %s%s?cmd=managedir\n\n", dir_uri, admin_file); - - return; - } - - puts("Status: 500 Failed trying to delete\nContent-Type: text/html"); - - GRSThttpBodyInit(&bp); - - GRSThttpPrintf(&bp, "Error deleting %s%s\n", dir_uri, file); - - GRSThttpPrintHeaderFooter(&bp, dir_path, GRST_HEADFILE); - - GRSThttpPrintf(&bp, "

    Error deleting %s%s

    \n", - dir_uri, file); - - GRSThttpPrintf(&bp, "

    GridSite considers you are authorized " - "to delete %s, but the delete failed. This is " - "probably a web server or operating system level " - "misconfiguration. Consult the site administrator.", - file); - - GRSThttpPrintf(&bp,"

    " - "Return to " - "directory listing\n", dir_uri, admin_file); - - adminfooter(&bp, dn, help_uri, dir_uri, admin_file); - GRSThttpPrintHeaderFooter(&bp, dir_path, GRST_FOOTFILE); - - GRSThttpWriteOut(&bp); -} - -void deletefileform(char *dn, GRSTgaclPerm perm, char *help_uri, char *dir_path, - char *file, char *dir_uri, char *admin_file) -{ - GRSThttpBody bp; - - if (!GRSTgaclPermHasWrite(perm)) GRSThttpError("403 Forbidden"); - - puts("Status: 200 OK\nContent-Type: text/html"); - - GRSThttpBodyInit(&bp); - - GRSThttpPrintf(&bp, "Delete %s\n", file); - - GRSThttpPrintHeaderFooter(&bp, dir_path, GRST_HEADFILE); - - GRSThttpPrintf(&bp, "

    Delete %s

    \n", file); - - GRSThttpPrintf(&bp,"
    \n",dir_uri,admin_file); - GRSThttpPrintf(&bp,"

    Do you really want to delete %s?", file); - GRSThttpPrintf(&bp,"

    \n", file); - GRSThttpPrintf(&bp,"\n", file); - GRSThttpPrintf(&bp,"\n"); - GRSThttpPrintf(&bp,"
    \n"); - - GRSThttpPrintf(&bp,"

    Or " - "return to " - "directory listing\n", dir_uri, admin_file); - - adminfooter(&bp, dn, help_uri, dir_uri, admin_file); - GRSThttpPrintHeaderFooter(&bp, dir_path, GRST_FOOTFILE); - - GRSThttpWriteOut(&bp); -} - -void renameform(char *dn, GRSTgaclPerm perm, char *help_uri, char *dir_path, - char *file, char *dir_uri, char *admin_file) -{ - GRSThttpBody bp; - - if (!GRSTgaclPermHasWrite(perm)) GRSThttpError("403 Forbidden"); - - puts("Status: 200 OK\nContent-Type: text/html"); - - GRSThttpBodyInit(&bp); - - GRSThttpPrintf(&bp, "Rename %s\n", file); - - GRSThttpPrintHeaderFooter(&bp, dir_path, GRST_HEADFILE); - - GRSThttpPrintf(&bp, "

    Rename %s%s

    \n", dir_uri, file); - - GRSThttpPrintf(&bp,"
    \n",dir_uri,admin_file); - GRSThttpPrintf(&bp,"

    What do you want to rename %s to?

    ", file); - GRSThttpPrintf(&bp,"\n", file); - GRSThttpPrintf(&bp,"

    New name: \n", file); - GRSThttpPrintf(&bp,"\n"); - GRSThttpPrintf(&bp,"\n"); - GRSThttpPrintf(&bp,"

    \n"); - - GRSThttpPrintf(&bp,"

    Or " - "return to " - "directory listing\n", dir_uri, admin_file, dir_uri); - - adminfooter(&bp, dn, help_uri, dir_uri, admin_file); - GRSThttpPrintHeaderFooter(&bp, dir_path, GRST_FOOTFILE); - - GRSThttpWriteOut(&bp); -} - -void editfileaction(char *dn, GRSTgaclPerm perm, char *help_uri, char *dir_path, - char *file, char *dir_uri, char *admin_file) -{ - char *pagetext, *dir_path_file, *vfile, *dir_path_vfile, - *dnlistsuri, *server_name, *fulluri, *realfile; - FILE *fp; - GRSThttpBody bp; - - if (!GRSTgaclPermHasWrite(perm) || (strcmp(file, GRST_ACL_FILE) == 0)) - GRSThttpError("403 Forbidden"); - - dnlistsuri = getenv("GRST_DN_LISTS_URI"); - if (dnlistsuri == NULL) dnlistsuri = getenv("REDIRECT_GRST_DN_LISTS_URI"); - - if ((dnlistsuri != NULL) && - (strncmp(dnlistsuri, dir_uri, strlen(dnlistsuri)) == 0)) - { - realfile = GRSThttpUrlEncode(file); - - if (realfile[0] == '.') GRSThttpError("403 Forbidden"); - } - else if (index(file, '/') != NULL) GRSThttpError("403 Forbidden"); - else realfile = file; - - asprintf(&dir_path_file, "%s/%s", dir_path, realfile); - - pagetext = GRSThttpGetCGI("pagetext"); - vfile = makevfilename(file, strlen(pagetext), dn); - asprintf(&dir_path_vfile, "%s/%s", dir_path, vfile); - - fp = fopen(dir_path_vfile, "w"); - if (fp == NULL) - { - puts("Status: 500 Failed trying to write\nContent-Type: text/html"); - - GRSThttpBodyInit(&bp); - - GRSThttpPrintf(&bp,"Error writing %s%s\n", dir_uri, file); - GRSThttpPrintHeaderFooter(&bp, dir_path, GRST_HEADFILE); - - GRSThttpPrintf(&bp, "

    Error writing %s%s

    \n", - dir_uri, file); - - GRSThttpPrintf(&bp, - "

    GridSite considers you are authorized " - "to write the file, but the write failed. This is " - "probably a web server or operating system level " - "misconfiguration. Consult the site administrator."); - - GRSThttpPrintf(&bp,"

    " - "Return to " - "directory listing\n", dir_uri, admin_file); - - adminfooter(&bp, dn, help_uri, dir_uri, admin_file); - GRSThttpPrintHeaderFooter(&bp, dir_path, GRST_FOOTFILE); - - GRSThttpWriteOut(&bp); - return; - } - - fwrite(pagetext, strlen(pagetext), sizeof(char), fp); - - fclose(fp); - - unlink(dir_path_file); - - if (link(dir_path_vfile,dir_path_file) != 0) GRSThttpError("403 Forbidden"); - - if ((strlen(file) > 7) && (strcmp(&file[strlen(file) - 5], ".html") == 0)) - printf("Status: 302 Moved Temporarily\nContent-Length: 0\n" - "Location: %s%s\n\n", dir_uri, file); - else printf("Status: 302 Moved Temporarily\nContent-Length: 0\n" - "Location: %s%s?cmd=managedir\n\n", dir_uri, admin_file); -} - -void create_acl(char *dn, GRSTgaclPerm perm, char *help_uri, char *dir_path, - char *file, char *dir_uri, char *admin_file) -{ - int fd; - char *tmpgacl, *newgacl; - GRSTgaclAcl *acl; - FILE *fp; - GRSThttpBody bp; - - if (!GRSTgaclPermHasAdmin(perm)) GRSThttpError("403 Forbidden"); - - asprintf(&tmpgacl, "%s/.tmp.XXXXXX", dir_path); - asprintf(&newgacl, "%s/%s", dir_path, GRST_ACL_FILE); - - if (((acl = GRSTgaclAclLoadforFile(dir_path)) != NULL) && - ((fd = mkstemp(tmpgacl)) != -1) && - ((fp = fdopen(fd, "w+")) != NULL) && - GRSTgaclAclPrint(acl, fp) && - (fclose(fp) == 0) && - (rename(tmpgacl, newgacl) == 0)) - { - printf("Status: 302 Moved Temporarily\nContent-Length: 0\n" - "Location: %s%s?cmd=managedir\n\n", dir_uri, admin_file); - - free(tmpgacl); - free(newgacl); - return; - } - - puts("Status: 500 Failed trying to create\nContent-Type: text/html"); - - GRSThttpBodyInit(&bp); - - GRSThttpPrintf(&bp,"Error creating %s%s\n", dir_uri, - GRST_ACL_FILE); - GRSThttpPrintHeaderFooter(&bp, dir_path, GRST_HEADFILE); - - GRSThttpPrintf(&bp, "

    Error creating %s%s

    \n", - dir_uri, GRST_ACL_FILE); - - GRSThttpPrintf(&bp, "

    GridSite considers you are authorized " - "to create it, but the create failed. This is " - "probably a web server or operating system level " - "misconfiguration. Consult the site administrator."); - - GRSThttpPrintf(&bp,"

    " - "Return to " - "directory listing\n", dir_uri, admin_file); - - adminfooter(&bp, dn, help_uri, dir_uri, admin_file); - GRSThttpPrintHeaderFooter(&bp, dir_path, GRST_FOOTFILE); - - GRSThttpWriteOut(&bp); - - free(tmpgacl); - free(newgacl); -} - -void renameaction(char *dn, GRSTgaclPerm perm, char *help_uri, char *dir_path, - char *file, char *dir_uri, char *admin_file) -{ - int len; - char *dir_path_file, *vfile, *dir_path_vfile, - *dnlistsuri, *newfile, *dir_path_newfile; - struct stat statbuf; - FILE *fp; - GRSThttpBody bp; - - if (!GRSTgaclPermHasWrite(perm) || (strcmp(file, GRST_ACL_FILE) == 0)) - GRSThttpError("403 Forbidden"); - - if (index(file, '/') != NULL) GRSThttpError("403 Forbidden"); - - dir_path_file = malloc(strlen(dir_path) + strlen(file) + 2); - strcpy(dir_path_file, dir_path); - strcat(dir_path_file, "/"); - strcat(dir_path_file, file); - - if (stat(dir_path_file, &statbuf) != 0) GRSThttpError("404 Not Found"); - - newfile = GRSThttpGetCGI("newfile"); - - if ((strcmp(newfile, GRST_ACL_FILE) == 0) || - (strcmp(newfile, file) == 0)) GRSThttpError("403 Forbidden"); - - dir_path_newfile = malloc(strlen(dir_path) + strlen(newfile) + 2); - strcpy(dir_path_newfile, dir_path); - strcat(dir_path_newfile, "/"); - strcat(dir_path_newfile, newfile); - - vfile = makevfilename(newfile, statbuf.st_size, dn); - dir_path_vfile = malloc(strlen(dir_path) + strlen(vfile) + 2); - strcpy(dir_path_vfile, dir_path); - strcat(dir_path_vfile, "/"); - strcat(dir_path_vfile, vfile); - - unlink(dir_path_newfile); /* just in case */ - - if ((link(dir_path_file, dir_path_vfile ) == 0) && - (link(dir_path_file, dir_path_newfile) == 0) && - (unlink(dir_path_file) == 0)) - { - printf("Status: 302 Moved Temporarily\nContent-Length: 0\n" - "Location: %s\n\n", dir_uri); - return; - } - - puts("Status: 500 Failed trying to rename\nContent-Type: text/html"); - - GRSThttpBodyInit(&bp); - - GRSThttpPrintf(&bp,"Error renaming %s%s\n", dir_uri, file); - GRSThttpPrintHeaderFooter(&bp, dir_path, GRST_HEADFILE); - - GRSThttpPrintf(&bp, "

    Error renaming %s%s

    \n", - dir_uri, file); - - GRSThttpPrintf(&bp, "

    GridSite considers you are authorized " - "to rename it, but the rename failed. This is " - "probably a web server or operating system level " - "misconfiguration. Consult the site administrator."); - - GRSThttpPrintf(&bp,"

    " - "Return to " - "directory listing\n", dir_uri, admin_file); - - adminfooter(&bp, dn, help_uri, dir_uri, admin_file); - GRSThttpPrintHeaderFooter(&bp, dir_path, GRST_FOOTFILE); - - GRSThttpWriteOut(&bp); -} - -void newdirectory(char *dn, GRSTgaclPerm perm, char *help_uri, char *dir_path, - char *file, char *dir_uri, char *admin_file) -{ - int len; - char *dir_path_file, *vfile, *dir_path_vfile, *filedup; - FILE *fp; - GRSThttpBody bp; - - if ((file[0] == '\0') || - !GRSTgaclPermHasWrite(perm) || (strcmp(file, GRST_ACL_FILE) == 0)) - GRSThttpError("403 Forbidden"); - - filedup = strdup(file); - if (filedup[strlen(filedup)-1] == '/') filedup[strlen(filedup)-1] = '\0'; - if (index(filedup, '/') != NULL) GRSThttpError("403 Forbidden"); - - dir_path_file = malloc(strlen(dir_path) + strlen(file) + 2); - strcpy(dir_path_file, dir_path); - strcat(dir_path_file, "/"); - strcat(dir_path_file, file); - - if (mkdir(dir_path_file, 0751) == 0) - { - printf("Status: 302 Moved Temporarily\nContent-Length: 0\n" - "Location: %s%s?cmd=managedir\n\n", dir_uri, admin_file); - return; - } - - puts("Status: 500 Failed trying to create\nContent-Type: text/html"); - - GRSThttpBodyInit(&bp); - - GRSThttpPrintf(&bp,"Error create %s%s\n", dir_uri, file); - GRSThttpPrintHeaderFooter(&bp, dir_path, GRST_HEADFILE); - - GRSThttpPrintf(&bp, "

    Error creating directory %s%s

    \n", - dir_uri, file); - - GRSThttpPrintf(&bp, - "

    GridSite considers you are authorized " - "to create the directory, but the creation failed. This " - "is probably a web server or operating system level " - "misconfiguration. Consult the site administrator."); - - GRSThttpPrintf(&bp,"

    " - "Return to " - "parent directory listing\n", dir_uri, admin_file); - - adminfooter(&bp, dn, help_uri, dir_uri, admin_file); - GRSThttpPrintHeaderFooter(&bp, dir_path, GRST_FOOTFILE); - - GRSThttpWriteOut(&bp); -} - -void editdnlistaction(char *dn, GRSTgaclPerm perm, char *help_uri, char *dir_path, - char *file, char *dir_uri, char *admin_file) -{ - int numdn = 0, ifd, ofd, numdnlines = 0, i, found; - char *dir_path_file, *dir_path_tmpfile, *realfile, - *dnlistsuri, *server_name, *fulldiruri, *p, oneline[513], - **dnlines, name[81], *add; - FILE *ofp; - struct stat statbuf; - GRSThttpBody bp; - - if (!GRSTgaclPermHasWrite(perm)) GRSThttpError("403 Forbidden"); - - dnlistsuri = getenv("GRST_DN_LISTS_URI"); - if (dnlistsuri == NULL) dnlistsuri = getenv("REDIRECT_GRST_DN_LISTS_URI"); - - server_name = getenv("SERVER_NAME"); - - if ((server_name == NULL) || - (dnlistsuri == NULL) || - (strncmp(dnlistsuri, dir_uri, strlen(dnlistsuri)) != 0)) - GRSThttpError("403 Forbidden"); - - asprintf(&fulldiruri, "https://%s%s", server_name, dir_uri); - - if ((strncmp(fulldiruri, file, strlen(fulldiruri)) != 0) && - ((strncmp(fulldiruri, file, strlen(fulldiruri) - 1) != 0) || - (strlen(fulldiruri) - 1 != strlen(file)))) - { - puts("Status: 403 Forbidden\nContent-Type: text/html"); - - GRSThttpBodyInit(&bp); - - GRSThttpPrintf(&bp,"Error writing %s\n", file); - GRSThttpPrintHeaderFooter(&bp, dir_path, GRST_HEADFILE); - - GRSThttpPrintf(&bp, "

    Error writing %s to %s

    \n", - file, dir_uri); - - GRSThttpPrintf(&bp, "

    You cannot create a DN List " - "with that prefix in this directory. Please see the " - "the GridSite User's Guide for an explanation."); - - GRSThttpPrintf(&bp,"

    " - "Return to " - "directory listing\n", dir_uri, admin_file); - - adminfooter(&bp, dn, help_uri, dir_uri, admin_file); - GRSThttpPrintHeaderFooter(&bp, dir_path, GRST_FOOTFILE); - - GRSThttpWriteOut(&bp); - return; - } - - p = GRSThttpGetCGI("numdn"); - if ((p == NULL) || (sscanf(p, "%d", &numdn) != 1)) - GRSThttpError("500 No number of DNs"); - - if (numdn > 0) - { - dnlines = malloc(sizeof(char *) * numdn); - - for (i=1; i <= numdn; ++i) - { - sprintf(name, "dn%d", i); - p = GRSThttpGetCGI(name); - - if (*p != '\0') - { - dnlines[numdnlines] = p; - ++numdnlines; - } - } - } - - add = GRSThttpGetCGI("add"); - - realfile = GRSThttpUrlEncode(file); - - dir_path_file = malloc(strlen(dir_path) + strlen(realfile) + 2); - strcpy(dir_path_file, dir_path); - strcat(dir_path_file, "/"); - strcat(dir_path_file, realfile); - - dir_path_tmpfile = malloc(strlen(dir_path) + 13); - strcpy(dir_path_tmpfile, dir_path); - strcat(dir_path_tmpfile, "/.tmp.XXXXXX"); - - if (((ofd = mkstemp(dir_path_tmpfile)) != -1) && - ((ofp = fdopen(ofd, "w")) != NULL)) - { - if (*add != '\0') - { - fputs(add, ofp); - fputc('\n', ofp); - } - - for (i=0; i < numdnlines; ++i) - { - fputs(dnlines[i], ofp); - fputc('\n', ofp); - } - - if ((fclose(ofp) == 0) && - ((stat(dir_path_file, &statbuf) != 0) || - (unlink(dir_path_file) == 0)) && - (rename(dir_path_tmpfile, dir_path_file) == 0)) - { - printf("Status: 302 Moved Temporarily\nContent-Length: 0\n" - "Location: %s%s?cmd=managedir\n\n", dir_uri, admin_file); - return; - } - } - - puts("Status: 500 Failed trying to write\nContent-Type: text/html"); - - GRSThttpBodyInit(&bp); - - GRSThttpPrintf(&bp,"Error writing %s%s\n", dir_uri, file); - GRSThttpPrintHeaderFooter(&bp, dir_path, GRST_HEADFILE); - - GRSThttpPrintf(&bp, "

    Error writing %s%s

    \n", - dir_uri, file); - - GRSThttpPrintf(&bp, "

    GridSite considers you are authorized " - "to write the file, but the write failed. This is " - "probably a web server or operating system level " - "misconfiguration. Consult the site administrator."); - - GRSThttpPrintf(&bp,"

    " - "Return to " - "directory listing\n", dir_uri, admin_file); - - adminfooter(&bp, dn, help_uri, dir_uri, admin_file); - GRSThttpPrintHeaderFooter(&bp, dir_path, GRST_FOOTFILE); - - GRSThttpWriteOut(&bp); - - /* try to clean up */ - if (stat(dir_path_tmpfile, &statbuf) == 0) unlink(dir_path_tmpfile); -} - -void printfile(char *dn, GRSTgaclPerm perm, char *help_uri, char *dir_path, - char *file, char *dir_uri, char *admin_file) -{ - int c; - char *dir_path_file; - FILE *fp; - struct stat statbuf; - - if (!GRSTgaclPermHasRead(perm)) GRSThttpError("403 Forbidden"); - - if (index(file, '/') != NULL) GRSThttpError("403 Forbidden"); - - dir_path_file = malloc(strlen(dir_path) + strlen(file) + 2); - - strcpy(dir_path_file, dir_path); - strcat(dir_path_file, "/"); - strcat(dir_path_file, file); - - if ((stat(dir_path_file, &statbuf) != 0) || - !S_ISREG(statbuf.st_mode)) GRSThttpError("403 Forbidden"); - - fp = fopen(dir_path_file, "r"); - if (fp == NULL) GRSThttpError("500 Internal server error"); - - printf("Status: 200 OK\nContent-Type: text/html\nContent-Length: %d\n\n", - statbuf.st_size); - - while ((c = fgetc(fp)) != EOF) putchar(c); - - fflush(stdout); - fclose(fp); -} - -void filehistory(char *dn, GRSTgaclPerm perm, char *help_uri, char *dir_path, - char *file, char *dir_uri, char *admin_file) -{ - int fd, n, i, j, enclen, num = 0; - char *encodedfile, *p, *dndecoded, modified[99], *vfile, *q, - *encdn; - time_t file_time; - size_t file_size; - struct stat statbuf; - struct dirent **namelist; - struct tm file_tm; - GRSThttpBody bp; - - if (!GRSTgaclPermHasRead(perm)) GRSThttpError("403 Forbidden"); - - if (index(file, '/') != NULL) GRSThttpError("403 Forbidden"); - - puts("Status: 200 OK\nContent-Type: text/html"); - - GRSThttpBodyInit(&bp); - GRSThttpPrintf(&bp, "History of %s%s\n", dir_uri, file); - GRSThttpPrintHeaderFooter(&bp, dir_path, GRST_HEADFILE); - GRSThttpPrintf(&bp, - "

    History of %s%s

    \n", - dir_uri, file, dir_uri, file); - - asprintf(&vfile, "%s/%s", dir_path, file); - if (stat(vfile, &statbuf) == 0) - { - localtime_r((const time_t *) &(statbuf.st_mtime), &file_tm); - strftime(modified, sizeof(modified), - "%a %e %b %Y %k:%M", &file_tm); - - GRSThttpPrintf(&bp, "

    Last modified: %s\n", modified); - } - free(vfile); - - encodedfile = GRSThttpUrlEncode(file); - for (p=encodedfile; *p != '\0'; ++p) if (*p == '%') *p = '='; - enclen = strlen(encodedfile); - - n = scandir(dir_path, &namelist, 0, alphasort); - - if (n > 0) - { - for (i = n - 1; i >= 0; --i) - { - if ((strncmp(namelist[i]->d_name, GRST_HIST_PREFIX, - sizeof(GRST_HIST_PREFIX) - 1) == 0) && - ((namelist[i]->d_name)[sizeof(GRST_HIST_PREFIX) - 1] == ':') && - (strncmp(&((namelist[i]->d_name)[sizeof(GRST_HIST_PREFIX)]), - encodedfile, enclen) == 0) && - ((namelist[i]->d_name)[sizeof(GRST_HIST_PREFIX)+enclen] == ':')) - { - if (num == 0) GRSThttpPrintf(&bp, - "

    \n" - "" - "\n"); - - ++num; - - p = index(namelist[i]->d_name, ':'); - p = index(&p[1], ':'); - sscanf(&p[1], "%X:", &file_time); - p = index(&p[1], ':'); /* skip over microseconds time */ - p = index(&p[1], ':'); - sscanf(&p[1], "%X:", &file_size); - p = index(&p[1], ':'); - - encdn = strdup(&p[1]); - q = index(encdn, ':'); - if (q != NULL) *q = '\0'; - - for (q=encdn; *q != '\0'; ++q) if (*q == '=') *q = '%'; - dndecoded = GRSThttpUrlDecode(encdn); - - localtime_r((const time_t *) &file_time, &file_tm); - strftime(modified, sizeof(modified), - "%a %e %b %Y %k:%M", &file_tm); - - GRSThttpPrintf(&bp, - "\n", - modified, file_size, dndecoded); - - free(dndecoded); - - asprintf(&vfile, "%s/%s", dir_path, namelist[i]->d_name); - if ((stat(vfile, &statbuf) == 0) && (statbuf.st_size > 0)) - { - GRSThttpPrintf(&bp, "\n", - dir_uri, admin_file, dir_uri, namelist[i]->d_name); - else GRSThttpPrintf(&bp, "%s%s\">View\n", - dir_uri, namelist[i]->d_name); - } - else GRSThttpPrintf(&bp, ""); - - free(vfile); - } - } - } - - if (num > 0) GRSThttpPrintf(&bp, "
    DateSize afterChanged by
    %s%d%sView
     
    \n"); - else GRSThttpPrintf(&bp, "

    No history for this file\n"); - - if (GRSTgaclPermHasList(perm)) - adminfooter(&bp, dn, help_uri, dir_uri, admin_file); - else adminfooter(&bp, dn, help_uri, dir_uri, NULL); - - GRSThttpPrintHeaderFooter(&bp, dir_path, GRST_FOOTFILE); - GRSThttpWriteOut(&bp); -} - -void ziplist(char *dn, GRSTgaclPerm perm, char *help_uri, char *dir_path, - char *file, char *dir_uri, char *admin_file) -{ - char *shellcmd, *unzip, oneline[129]; - FILE *fp; - GRSThttpBody bp; - - if (!GRSTgaclPermHasRead(perm)) GRSThttpError("403 Forbidden"); - - if (index(file, '/') != NULL) GRSThttpError("403 Forbidden"); - - puts("Status: 200 OK\nContent-Type: text/html"); - - GRSThttpBodyInit(&bp); - GRSThttpPrintf(&bp, "Contents of %s%s\n", dir_uri, file); - GRSThttpPrintHeaderFooter(&bp, dir_path, GRST_HEADFILE); - GRSThttpPrintf(&bp, - "

    Contents of ZIP file %s%s

    \n", - dir_uri, file, dir_uri, file); - - unzip = getenv("GRST_UNZIP"); - if (unzip == NULL) unzip = getenv("REDIRECT_GRST_UNZIP"); - - if (unzip != NULL) - { - GRSThttpPrintf(&bp, "
    \n");
    -      asprintf(&shellcmd, "cd %s ; %s -Z %s", dir_path, unzip, file);
    -      fp = popen(shellcmd, "r");
    -  
    -      while (fgets(oneline, sizeof(oneline), fp) != NULL)           
    -                          GRSThttpPrintf(&bp, "%s", oneline);         
    -      pclose(fp);
    -      GRSThttpPrintf(&bp, "
    \n"); - - if (GRSTgaclPermHasWrite(perm)) - GRSThttpPrintf(&bp, - "

    " - " in %s" - "" - "
    " - "

    (All files are placed in the same directory and files " - "beginning with "." are ignored.)

    \n", - dir_uri, admin_file, dir_uri, file); - } - else GRSThttpPrintf(&bp, "

    unzip path not defined!\n"); - - if (GRSTgaclPermHasList(perm)) - adminfooter(&bp, dn, help_uri, dir_uri, admin_file); - else adminfooter(&bp, dn, help_uri, dir_uri, NULL); - - GRSThttpPrintHeaderFooter(&bp, dir_path, GRST_FOOTFILE); - GRSThttpWriteOut(&bp); -} - -void unzipfile(char *dn, GRSTgaclPerm perm, char *help_uri, char *dir_path, - char *file, char *dir_uri, char *admin_file) -{ - char *shellcmd, *unzip, oneline[129]; - FILE *fp; - GRSThttpBody bp; - - if (!GRSTgaclPermHasWrite(perm)) GRSThttpError("403 Forbidden"); - - if (index(file, '/') != NULL) GRSThttpError("403 Forbidden"); - - puts("Status: 200 OK\nContent-Type: text/html"); - - GRSThttpBodyInit(&bp); - GRSThttpPrintf(&bp, "Unzipping %s%s\n", dir_uri, file); - GRSThttpPrintHeaderFooter(&bp, dir_path, GRST_HEADFILE); - GRSThttpPrintf(&bp, - "

    Unzipping %s%s

    \n", - dir_uri, file, dir_uri, file); - - unzip = getenv("GRST_UNZIP"); - if (unzip == NULL) unzip = getenv("REDIRECT_GRST_UNZIP"); - - if (unzip != NULL) - { - GRSThttpPrintf(&bp, "
    \n");
    -      asprintf(&shellcmd, "cd %s ; %s -jo %s -x '.*'", dir_path, unzip, file);
    -      fp = popen(shellcmd, "r");
    -  
    -      while (fgets(oneline, sizeof(oneline), fp) != NULL)           
    -                          GRSThttpPrintf(&bp, "%s", oneline);         
    -      pclose(fp);
    -      GRSThttpPrintf(&bp, "
    \n"); - - if (GRSTgaclPermHasList(perm)) - GRSThttpPrintf(&bp, "

    " - "Back to " - "directory", dir_uri, admin_file); - } - else GRSThttpPrintf(&bp, "

    unzip path not defined!\n"); - - if (GRSTgaclPermHasList(perm)) - adminfooter(&bp, dn, help_uri, dir_uri, admin_file); - else adminfooter(&bp, dn, help_uri, dir_uri, NULL); - - GRSThttpPrintHeaderFooter(&bp, dir_path, GRST_FOOTFILE); - GRSThttpWriteOut(&bp); -} - -void editfileform(char *dn, GRSTgaclPerm perm, char *help_uri, char *dir_path, - char *file, char *dir_uri, char *admin_file) -{ - int fd, rawpagesize, i, c; - char *dir_path_file, *rawpage, *p; - FILE *fp = NULL; - struct stat statbuf; - GRSThttpBody bp; - - if (!GRSTgaclPermHasWrite(perm)) GRSThttpError("403 Forbidden"); - - if (index(file, '/') != NULL) GRSThttpError("403 Forbidden"); - - dir_path_file = malloc(strlen(dir_path) + strlen(file) + 2); - - strcpy(dir_path_file, dir_path); - strcat(dir_path_file, "/"); - strcat(dir_path_file, file); - - fd = open(dir_path_file, O_RDONLY); - if (fd != -1) - { - fp = fdopen(fd, "r"); - if (fp == NULL) GRSThttpError("500 File open failed!"); - - if ((fstat(fd, &statbuf) != 0) || - !S_ISREG(statbuf.st_mode)) GRSThttpError("500 Not a regular file!"); - } - - puts("Status: 200 OK\nContent-Type: text/html"); - - GRSThttpBodyInit(&bp); - - GRSThttpPrintf(&bp, "Edit file %s\n", file); - - GRSThttpPrintHeaderFooter(&bp, dir_path, GRST_HEADFILE); - - GRSThttpPrintf(&bp, "

    Edit file %s

    \n", file); - - GRSThttpPrintf(&bp,"
    \n",dir_uri,admin_file); - GRSThttpPrintf(&bp,"

    \n"); - GRSThttpPrintf(&bp,"

    File name: \n", file); - GRSThttpPrintf(&bp,"\n"); - GRSThttpPrintf(&bp,"

    \n"); - GRSThttpPrintf(&bp, "

    \n"); - GRSThttpPrintf(&bp, "

    \n"); - - if (fp != NULL) fclose(fp); - - adminfooter(&bp, dn, help_uri, dir_uri, admin_file); - - GRSThttpPrintHeaderFooter(&bp, dir_path, GRST_FOOTFILE); - GRSThttpWriteOut(&bp); -} - -void editdnlistform(char *dn, GRSTgaclPerm perm, char *help_uri, char *dir_path, - char *file, char *dir_uri, char *admin_file) -{ - int fd, i, c, numdn = 0; - char *dir_path_file, *rawpage, *p, *dnlistsuri, *server_name, *fulluri, - *realfile, oneline[513]; - FILE *fp = NULL; - struct stat statbuf; - GRSThttpBody bp; - - dnlistsuri = getenv("GRST_DN_LISTS_URI"); - if (dnlistsuri == NULL) dnlistsuri = getenv("REDIRECT_GRST_DN_LISTS_URI"); - - if (!GRSTgaclPermHasWrite(perm) || - (dnlistsuri == NULL) || - (strncmp(dnlistsuri, dir_uri, strlen(dnlistsuri)) != 0)) - GRSThttpError("403 Forbidden"); - - realfile = GRSThttpUrlEncode(file); - - dir_path_file = malloc(strlen(dir_path) + strlen(realfile) + 2); - - strcpy(dir_path_file, dir_path); - strcat(dir_path_file, "/"); - strcat(dir_path_file, realfile); - - fd = open(dir_path_file, O_RDONLY); - if (fd != -1) /* we dont mind open failing, but it must work if it doesnt */ - { - fp = fdopen(fd, "r"); - if (fp == NULL) GRSThttpError("500 File open failed!"); - - if ((fstat(fd, &statbuf) != 0) || - !S_ISREG(statbuf.st_mode)) GRSThttpError("500 Not a regular file!"); - } - - puts("Status: 200 OK\nContent-Type: text/html"); - - GRSThttpBodyInit(&bp); - - GRSThttpPrintf(&bp, "Edit DN List %s\n", file); - - GRSThttpPrintHeaderFooter(&bp, dir_path, GRST_HEADFILE); - - GRSThttpPrintf(&bp, "

    Edit DN List

    \n"); - - GRSThttpPrintf(&bp,"
    \n",dir_uri,admin_file); - GRSThttpPrintf(&bp,"

    \n"); - GRSThttpPrintf(&bp,"

    List URL: \n", file, strlen(file)); - GRSThttpPrintf(&bp,"\n"); - - if (fp != NULL) - { - GRSThttpPrintf(&bp, "

    \n" - "\n"); - - while (fgets(oneline, sizeof(oneline), fp) != NULL) - { - ++numdn; - - p = rindex(oneline, '\n'); - if (p != NULL) *p = '\0'; - - GRSThttpPrintf(&bp, "" - "\n", numdn, oneline, oneline); - } - - GRSThttpPrintf(&bp,"
    Keep?Name
    %s
    \n"); - } - - GRSThttpPrintf(&bp,"\n", numdn); - - GRSThttpPrintf(&bp, "

    Add new DN: \n"); - - GRSThttpPrintf(&bp,"

    \n"); - GRSThttpPrintf(&bp, "

    \n"); - - if (fp != NULL) fclose(fp); - - adminfooter(&bp, dn, help_uri, dir_uri, admin_file); - - GRSThttpPrintHeaderFooter(&bp, dir_path, GRST_FOOTFILE); - GRSThttpWriteOut(&bp); -} - -void managedir(char *dn, GRSTgaclPerm perm, char *help_uri, char *dir_path, - char *dir_uri, char *admin_file) -{ - int n, is_dnlists_dir = 0, enclen, numfiles, encprefixlen; - char *d_namepath, modified[99], *absaclpath, *editable, *p, *unzip, - *dnlistsuri, *d_name, *server_name, *fulluri, *encfulluri, - *encprefix, *dnlistsprefix; - GRSThttpBody bp; - struct tm mtime_tm; - struct stat statbuf; - struct dirent **namelist, *subdirfile_ent; - DIR *subDIR; - - if (((!GRSTgaclPermHasWrite(perm)) && - (!GRSTgaclPermHasList(perm))) || - (stat(dir_path, &statbuf) != 0) || !S_ISDIR(statbuf.st_mode)) - GRSThttpError("403 Forbidden"); - - editable = getenv("GRST_EDITABLE"); - if (editable == NULL) editable = getenv("REDIRECT_GRST_EDITABLE"); - - unzip = getenv("GRST_UNZIP"); - if (unzip == NULL) unzip = getenv("REDIRECT_GRST_UNZIP"); - - dnlistsuri = getenv("GRST_DN_LISTS_URI"); - if (dnlistsuri == NULL) dnlistsuri = getenv("REDIRECT_GRST_DN_LISTS_URI"); - - if (dnlistsuri && (strncmp(dnlistsuri, dir_uri, strlen(dnlistsuri)) == 0)) - { - is_dnlists_dir = 1; - server_name = getenv("SERVER_NAME"); - - asprintf(&fulluri, "https://%s%s", server_name, dir_uri); - encfulluri = GRSThttpUrlEncode(fulluri); - enclen = strlen(encfulluri); - - asprintf(&dnlistsprefix, "https://%s%s", server_name, dnlistsuri); - encprefix = GRSThttpUrlEncode(dnlistsprefix); - encprefixlen = strlen(encprefix); - } - - printf("Status: 200 OK\nContent-Type: text/html\n"); - - GRSThttpBodyInit(&bp); - - GRSThttpPrintf(&bp,"Manage directory %s\n", dir_uri); - - GRSThttpPrintHeaderFooter(&bp, dir_path, GRST_HEADFILE); - - GRSThttpPrintf(&bp, "

    Manage directory %s

    \n\n", dir_uri); - - if (dir_uri[1] != '\0') - GRSThttpPrintf(&bp, - "\n", admin_file); - - if (GRSTgaclPermHasList(perm) || GRSTgaclPermHasAdmin(perm)) - { - absaclpath = malloc(strlen(dir_path) + sizeof(GRST_ACL_FILE) + 1); - strcpy(absaclpath, dir_path); - strcat(absaclpath, "/"); - strcat(absaclpath, GRST_ACL_FILE); - - if (stat(absaclpath, &statbuf) == 0) /* ACL exists in THIS directory */ - { - localtime_r(&(statbuf.st_mtime), &mtime_tm); - strftime(modified, sizeof(modified), - "", - &mtime_tm); - - if (!is_dnlists_dir) - { - GRSThttpPrintf(&bp, - "" - "%s\n", - GRST_ACL_FILE, - GRST_ACL_FILE, - statbuf.st_size, modified); - - GRSThttpPrintf(&bp, - "", - dir_uri, admin_file, GRST_ACL_FILE); - } - else GRSThttpPrintf(&bp, - "" - "%s\n", - GRST_ACL_FILE, - statbuf.st_size, modified); - - if (GRSTgaclPermHasAdmin(perm)) - GRSThttpPrintf(&bp, - "" - "", - dir_uri, admin_file, - dir_uri, admin_file, GRST_ACL_FILE); - else if (GRSTgaclPermHasRead(perm)) - GRSThttpPrintf(&bp, - "" - "", dir_uri, admin_file); - else GRSThttpPrintf(&bp, "\n"); - - GRSThttpPrintf(&bp, "\n"); - } - else if (GRSTgaclPermHasAdmin(perm)) - GRSThttpPrintf(&bp, "\n" - "\n" - "\n", - dir_uri, admin_file); - } - - if (GRSTgaclPermHasList(perm)) - { - n = scandir(dir_path, &namelist, 0, alphasort); - while (n--) - { - if (namelist[n]->d_name[0] != '.') - { - d_namepath = malloc(strlen(dir_path) + - strlen(namelist[n]->d_name) + 2); - strcpy(d_namepath, dir_path); - strcat(d_namepath, "/"); - strcat(d_namepath, namelist[n]->d_name); - stat(d_namepath, &statbuf); - - if (S_ISDIR(statbuf.st_mode)) - { - subDIR = opendir(d_namepath); - - if (subDIR == NULL) numfiles = 99; /* stop deletion */ - else - { - numfiles = 0; - while ((subdirfile_ent = readdir(subDIR)) != NULL) - if (subdirfile_ent->d_name[0] != '.') ++numfiles; - else if (strncmp(subdirfile_ent->d_name, - GRST_ACL_FILE, - sizeof(GRST_ACL_FILE)) == 0) ++numfiles; - - closedir(subDIR); - } - } - - free(d_namepath); - - localtime_r(&(statbuf.st_mtime), &mtime_tm); - strftime(modified, sizeof(modified), - "", - &mtime_tm); - - if (S_ISDIR(statbuf.st_mode)) - { - GRSThttpPrintf(&bp, - "" - "%s\n", - dir_uri, namelist[n]->d_name, admin_file, - namelist[n]->d_name, - statbuf.st_size, modified); - - if (numfiles == 0) - GRSThttpPrintf(&bp, - "\n", - dir_uri, admin_file, namelist[n]->d_name); - else GRSThttpPrintf(&bp, "\n"); - - GRSThttpPrintf(&bp, "\n"); - } - else if (is_dnlists_dir) - { - if ((strlen(namelist[n]->d_name) <= encprefixlen) || - (strncmp(namelist[n]->d_name, encprefix, - encprefixlen) != 0)) continue; - - d_name = GRSThttpUrlDecode(namelist[n]->d_name); - - GRSThttpPrintf(&bp, "" - "%s" - "", - d_name, d_name, - statbuf.st_size, modified); - - if (GRSTgaclPermHasWrite(perm)) - GRSThttpPrintf(&bp, "" - "" - "" - "" - "\n", - dir_uri, admin_file, d_name); - else GRSThttpPrintf(&bp, "\n"); - - if (GRSTgaclPermHasWrite(perm)) - GRSThttpPrintf(&bp, "" - "" - "" - "" - "\n", - dir_uri, admin_file, d_name); - else GRSThttpPrintf(&bp, "\n"); - - GRSThttpPrintf(&bp, ""); - } - else /* regular directory, not DN Lists */ - { - d_name = namelist[n]->d_name; - - GRSThttpPrintf(&bp, - "" - "%s", - dir_uri, d_name, - d_name, - statbuf.st_size, modified); - - GRSThttpPrintf(&bp, - "", - dir_uri, admin_file, GRSThttpUrlEncode(d_name)); - - p = rindex(namelist[n]->d_name, '.'); - - if ((unzip != NULL) && - (p != NULL) && - (strcasecmp(&p[1], "zip") == 0) && - GRSTgaclPermHasRead(perm)) - GRSThttpPrintf(&bp, - "\n", - dir_uri, admin_file, GRSThttpUrlEncode(d_name)); - else if ((p != NULL) && - (strstr(editable, &p[1]) != NULL) && - GRSTgaclPermHasWrite(perm)) - GRSThttpPrintf(&bp, - "\n", - dir_uri, admin_file, GRSThttpUrlEncode(d_name)); - else GRSThttpPrintf(&bp, ""); - - if (GRSTgaclPermHasWrite(perm)) - GRSThttpPrintf(&bp, - "\n", dir_uri, admin_file, GRSThttpUrlEncode(d_name)); - else - GRSThttpPrintf(&bp, "\n"); - - if (GRSTgaclPermHasWrite(perm)) - GRSThttpPrintf(&bp, - "\n", dir_uri, admin_file, GRSThttpUrlEncode(d_name)); - else - GRSThttpPrintf(&bp, ""); - } - } - - free(namelist[n]); - } - - free(namelist); - } - - if (GRSTgaclPermHasWrite(perm)) - { - if (is_dnlists_dir) - { - GRSThttpPrintf(&bp, "\n" - "" - "\n" - "\n", - dir_uri, admin_file, fulluri, strlen(fulluri)+8); - - GRSThttpPrintf(&bp, "\n" - "\n" - "\n", - dir_uri, admin_file); - } - else - { - GRSThttpPrintf(&bp, "\n" - "\n" - "" - "\n" - "\n" - "\n", - dir_uri, admin_file); - - GRSThttpPrintf(&bp, - "\n" - "\n" - "" - "" - "\n" - "" - "\n" - "\n", dir_uri, admin_file); - } - } - - GRSThttpPrintf(&bp, "
    [Parent " - "directory]
    %R%e %b %y
    %s%ld" - "History
    %s%ldEditDeleteView    
    %R%e %b %y
    " - "%s/%ld " - "Delete  
    %s%ld 
     
      
    %s%ld" - "History" - "List" - "Edit " - "Delete " - "Rename
     
    New list name: " - "\n" - "
    New directory: " - "\n" - "

    New name:\n" - "

    Upload file:New name: " - "
    Local name:
    \n"); - - if (!is_dnlists_dir) adminfooter(&bp, dn, help_uri, dir_uri, NULL); - - GRSThttpPrintHeaderFooter(&bp, dir_path, GRST_FOOTFILE); - GRSThttpWriteOut(&bp); -} - diff --git a/org.gridsite.core/src/grst_admin_gacl.c b/org.gridsite.core/src/grst_admin_gacl.c deleted file mode 100644 index 6bce4fb..0000000 --- a/org.gridsite.core/src/grst_admin_gacl.c +++ /dev/null @@ -1,983 +0,0 @@ -/* - Copyright (c) 2003-5, Shiv Kaushal, University of Manchester - All rights reserved. - - Redistribution and use in source and binary forms, with or - without modification, are permitted provided that the following - conditions are met: - - o Redistributions of source code must retain the above - copyright notice, this list of conditions and the following - disclaimer. - o Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following - disclaimer in the documentation and/or other materials - provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND - CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS - BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED - TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - POSSIBILITY OF SUCH DAMAGE. -*/ - -/*-----------------------------------------------------------* -* This program is part of GridSite: http://www.gridsite.org/ * -*------------------------------------------------------------*/ - -#include -#include -#include -#include -#include -#include - -extern char *grst_perm_syms[]; -extern int grst_perm_vals[]; - - - -#include "grst_admin.h" - -// CGI GACL Editor interface functions -void show_acl(int admin, GRSTgaclUser *user, char *dn, GRSTgaclPerm perm, char *help_uri, char *dir_path, char *file, char *dir_uri, char *admin_file); -void new_entry_form(GRSTgaclUser *user, char *dn, GRSTgaclPerm perm, char *help_uri, char *dir_path, char *file, char *dir_uri, char *admin_file); -void new_entry(GRSTgaclUser *user, char *dn, GRSTgaclPerm perm, char *help_uri, char *dir_path, char *file, char *dir_uri, char *admin_file); -void del_entry(GRSTgaclUser *user, char *dn, GRSTgaclPerm perm, char *help_uri, char *dir_path, char *file, char *dir_uri, char *admin_file); -void edit_entry_form(GRSTgaclUser *user, char *dn, GRSTgaclPerm perm, char *help_uri, char *dir_path, char *file, char *dir_uri, char *admin_file); -void edit_entry(GRSTgaclUser *user, char *dn, GRSTgaclPerm perm, char *help_uri, char *dir_path, char *file, char *dir_uri, char *admin_file); -void add_cred_form(GRSTgaclUser *user, char *dn, GRSTgaclPerm perm, char *help_uri, char *dir_path, char *file, char *dir_uri, char *admin_file); -void add_cred(GRSTgaclUser *user, char *dn, GRSTgaclPerm perm, char *help_uri, char *dir_path, char *file, char *dir_uri, char *admin_file); -void del_cred(GRSTgaclUser *user, char *dn, GRSTgaclPerm perm, char *help_uri, char *dir_path, char *file, char *dir_uri, char *admin_file); -void del_entry_sure(GRSTgaclUser *user, char *dn, GRSTgaclPerm perm, char *help_uri, char *dir_path, char *file, char *dir_uri, char *admin_file); -void del_cred_sure(GRSTgaclUser *user, char *dn, GRSTgaclPerm perm, char *help_uri, char *dir_path, char *file, char *dir_uri, char *admin_file); -void admin_continue(char *dn, GRSTgaclPerm perm, char *help_uri, char *dir_path, char *file, char *dir_uri, char *admin_file, GRSThttpBody *bp); - -// Functions for producing HTML output -void StartHTML(GRSThttpBody *bp, char *dir_uri, char* dir_path); -void StartForm(GRSThttpBody *bp, char* dir_uri, char* dir_path, char* admin_file, int timestamp, char* target_function); -void EndForm(GRSThttpBody *bp); -void GRSTgaclCredTableStart(GRSThttpBody *bp); -void GRSTgaclCredTableAdd(GRSTgaclUser *user, GRSTgaclEntry *entry, GRSTgaclCred *cred, GRSTgaclNamevalue *namevalue, int cred_no, int entry_no, int admin, int timestamp, GRSThttpBody *bp, char *dn, GRSTgaclPerm perm, char *help_uri, char *dir_path, char *file, char *dir_uri, char *admin_file); -void GRSTgaclCredTableEnd(GRSTgaclEntry* entry, int entry_no, int admin, int timestamp, GRSThttpBody *bp, char *dn, GRSTgaclPerm perm, char *help_uri, char *dir_path, char *file, char *dir_uri, char *admin_file); - -// ACL Manipulation functions -int GACLentriesInAcl(GRSTgaclAcl *acl); -int GRSTgaclCredsInEntry(GRSTgaclEntry *entry); -void check_acl_save(char *dn, GRSTgaclPerm perm, char *help_uri, char *dir_path, char *file, char *dir_uri, char *admin_file, GRSTgaclUser* user, GRSTgaclAcl *acl, GRSThttpBody *bp); -void GACLeditGetPerms(GRSTgaclEntry *entry); -GRSTgaclEntry *GACLreturnEntry(GRSTgaclAcl *acl, int entry_no); -GRSTgaclCred *GACLreturnCred(GRSTgaclEntry *entry, int cred_no); - -void StringHTMLEncode (char* string, GRSThttpBody *bp); - -void revert_acl(GRSTgaclUser *user, char *dn, GRSTgaclPerm perm, char *help_uri, char *dir_path, char *file, char *dir_uri, char *admin_file); - -/*****************************************/ -/********** FUNCTIONS FOLLOW *************/ -/*****************************************/ - -void show_acl(int admin, GRSTgaclUser *user, char *dn, GRSTgaclPerm perm, char *help_uri, char *dir_path, char *file, char *dir_uri, char *admin_file){ - // Shows the contents of the ACL. Gives edit 'buttons' if (int admin) == 1 - GRSTgaclAcl *acl; - GRSTgaclEntry *entry; - GRSTgaclCred *cred; - GRSTgaclNamevalue *namevalue; - int entry_no, cred_no, allow, deny,timestamp; - GRSThttpBody bp; - char* AclFilename; - struct stat file_info; - int history_mode=0; - - if (admin==2){ - history_mode=1; - admin=0; - } - - /*double-check access permision*/ - if (!GRSTgaclPermHasAdmin(perm)) admin=0; - - StartHTML(&bp, dir_uri, dir_path); - - /* Load ACL from file and get timestamp*/ - if (history_mode==1) { - AclFilename=malloc(strlen(dir_path)+strlen(file)+2); - strcpy(AclFilename, dir_path); - strcat(AclFilename, "/"); - strcat(AclFilename, file); - } - else AclFilename=GRSTgaclFileFindAclname(dir_path); - - if (AclFilename==NULL){ - GRSThttpPrintf ( &bp,"The ACL was not found !!!
    \n"); - admin_continue(dn, perm, help_uri, dir_path, file, dir_uri, admin_file, &bp); - return; - } - - stat(GRSTgaclFileFindAclname(dir_path), &file_info); - timestamp=file_info.st_mtime; - acl = GRSTgaclAclLoadFile(AclFilename); - - if (acl==NULL){ - GRSThttpPrintf ( &bp,"The ACL was found but could not be loaded - it could be incorrectly formatted
    \n"); - adminfooter(&bp, dn, help_uri, dir_uri, NULL); - GRSThttpPrintHeaderFooter(&bp, dir_path, GRST_FOOTFILE); - GRSThttpWriteOut(&bp); - return; - } - - if (admin) GRSThttpPrintf (&bp,"New Entry
    \n", dir_uri, admin_file, dir_uri, timestamp ); - - // Start with the first entry in the list and work through - entry=acl->firstentry; - entry_no=1; - while (entry!=NULL){ - - GRSThttpPrintf (&bp,"
    Entry %d:\n", entry_no); - if (admin){ - GRSThttpPrintf (&bp,"Edit Entry ", dir_uri, admin_file, entry_no, dir_uri, timestamp ); - GRSThttpPrintf (&bp,"Delete Entry ",dir_uri, admin_file, entry_no, dir_uri, timestamp ); - GRSThttpPrintf (&bp,"

    \n"); - } - - GRSTgaclCredTableStart(&bp); - - // Start with the first credential in the entry and work through - cred=entry->firstcred; - cred_no=1; - while (cred!=NULL){ - namevalue=cred->firstname; - GRSTgaclCredTableAdd(user, entry, cred, namevalue, cred_no, entry_no, admin, timestamp, &bp, dn, perm, help_uri, dir_path, file, dir_uri, admin_file); - // Change to next credential - cred=cred->next; - cred_no++; - } - - GRSTgaclCredTableEnd (entry, entry_no, admin, timestamp, &bp, dn, perm, help_uri, dir_path, file, dir_uri, admin_file); - // Change to next entry - entry=entry->next; - entry_no++; - } - - if (!admin && GRSTgaclPermHasAdmin(perm) && !history_mode) //Print a link for admin mode, if not in admin mode but the user has admin permissions - GRSThttpPrintf (&bp,"Admin Mode", dir_uri, admin_file, dir_uri, timestamp ); - if (history_mode==1 && GRSTgaclDNlistHasUser(getenv("REDIRECT_GRST_ADMIN_LIST"), user)){ - StartForm(&bp, dir_uri, dir_path, admin_file, timestamp, "revert_acl"); -//GRSThttpPrintf (&bp,"Revert to this Version", dir_uri, admin_file, dir_uri, timestamp, file ); - GRSThttpPrintf (&bp, "\n", file); - // Revert Button - GRSThttpPrintf (&bp, "

    \n\n"); - } - - adminfooter(&bp, dn, help_uri, dir_uri, NULL); - GRSThttpPrintHeaderFooter(&bp, dir_path, GRST_FOOTFILE); GRSThttpWriteOut(&bp); return; -} - - -void new_entry_form(GRSTgaclUser *user, char *dn, GRSTgaclPerm perm,char *help_uri, char *dir_path, char *file, char *dir_uri, char *admin_file){ - // Presents the user with a form asking for details required to create a new entry - GRSThttpBody bp; - int timestamp=atol(GRSThttpGetCGI("timestamp")); - GRSTgaclCred* cred; - GRSTgaclEntry *entry; - GRSTgaclNamevalue* namevalue; - - - if (!GRSTgaclPermHasAdmin(perm)) GRSThttpError ("403 Forbidden"); - entry = GRSTgaclEntryNew(); - StartHTML(&bp, dir_uri, dir_path); - StartForm(&bp, dir_uri, dir_path, admin_file, timestamp, "new_entry"); - GRSThttpPrintf (&bp, "NEW ENTRY IN ACL FOR %s

    \n", dir_uri); - - GRSTgaclCredTableStart(&bp); - GRSTgaclCredTableAdd(user, entry,cred, namevalue, 0, 0, 0, timestamp, &bp, dn, perm, help_uri, dir_path, file, dir_uri, admin_file); - GRSTgaclCredTableEnd (entry, 0, 0, timestamp, &bp, dn, perm, help_uri, dir_path, file, dir_uri, admin_file); - - /*Submit and reset buttons - submit button sends the data in the form back to the script & new_entry() to be called*/ - EndForm(&bp); - admin_continue(dn, perm, help_uri, dir_path, file, dir_uri, admin_file, &bp); - return; -} - -void new_entry(GRSTgaclUser *user, char *dn, GRSTgaclPerm perm, char *help_uri, char *dir_path, char *file, char *dir_uri, char *admin_file){ - // Processes the information entered into the form from new_entry_form() and adds a new entry to the ACL - GRSTgaclAcl *acl; - GRSTgaclEntry *entry; - GRSTgaclCred *cred; - char *type, *value; - GRSThttpBody bp; - if (!GRSTgaclPermHasAdmin(perm)) GRSThttpError ("403 Forbidden"); - - // Get new credential info and perform checks - type=GRSThttpGetCGI("type"); - value=GRSThttpGetCGI("cred0_value"); - - if (strcmp(type, "not_chosen")==0){ - GRSThttpError ("500 Invalid input - credential type not chosen"); - return; - } - - // Create the credential - cred=GRSTgaclCredNew(type); - if (strcmp(type, "person")==0) GRSTgaclCredAddValue(cred,"dn", value); - else if (strcmp(type, "dn-list")==0) GRSTgaclCredAddValue(cred, "url", value); - else if (strcmp(type, "voms")==0) GRSTgaclCredAddValue(cred, "fqan", value); - else if (strcmp(type, "dns")==0) GRSTgaclCredAddValue(cred, "hostname", value); - else if (strcmp(type, "any-user")==0) {} // namevalue not entered for any-user credential - else{ - GRSThttpError ("500 Invalid input - credential type not valid"); - return; - } - - // Create and empty entry, add the credential and get permissions - entry = GRSTgaclEntryNew(); - GRSTgaclEntryAddCred(entry, cred); - GACLeditGetPerms(entry); - - // Load the ACL, add the entry and save - acl = GRSTgaclAclLoadFile(GRSTgaclFileFindAclname(dir_path)); - GRSTgaclAclAddEntry(acl, entry); - check_acl_save(dn, perm, help_uri, dir_path, file, dir_uri, admin_file, user, acl, &bp); - return; -} - -void del_entry(GRSTgaclUser *user, char *dn, GRSTgaclPerm perm, char *help_uri, char *dir_path, char *file, char *dir_uri, char *admin_file){ - // Deletes the entry denoted by the GCI variable "entry_no"*/ - int entry_no; - GRSTgaclAcl *acl; - GRSTgaclEntry *previous, *entry; - GRSThttpBody bp; - - if (!GRSTgaclPermHasAdmin(perm)) GRSThttpError ("403 Forbidden"); - - // Load the ACL - acl = GRSTgaclAclLoadFile(GRSTgaclFileFindAclname(dir_path)); - - // Get the number of the entry to be deleted and check okay to delete - entry_no=atol(GRSThttpGetCGI("entry_no")); - if(GACLentriesInAcl(acl)<=1){ - StartHTML(&bp, dir_uri, dir_path); - GRSThttpPrintf (&bp, "ERROR: Cannot delete all entries from the ACL
    \n"); - admin_continue(dn, perm, help_uri, dir_path, file, dir_uri, admin_file, &bp); - return; - } - - // Get pointer to entry and previous entry - entry = GACLreturnEntry(acl, entry_no); - if (entry_no!=1) previous = GACLreturnEntry(acl, entry_no-1); - - if(entry==NULL || entry_no<1 || entry_no>GACLentriesInAcl(acl) ){ - GRSThttpError ("500 Unable to read entry from ACL file"); - return; - } - - // Perform deletion from the list by changing pointers - if (entry_no==1) acl->firstentry=entry->next; - else if (entry_no==GACLentriesInAcl(acl)) previous->next=NULL; - else previous->next=entry->next; - - // Save ACL and exit - check_acl_save(dn, perm, help_uri, dir_path, file, dir_uri, admin_file, user, acl, &bp); - - return; -} - - -void edit_entry_form(GRSTgaclUser *user, char *dn, GRSTgaclPerm perm, char *help_uri, char *dir_path, char *file, char *dir_uri, char *admin_file){ - // Presents the user with an editable form containing details of entry denoted by CGI variable entry_no*/ - int entry_no, cred_no, i, admin=0, timestamp=atol(GRSThttpGetCGI("timestamp")); - GRSTgaclAcl *acl; - GRSTgaclEntry *entry; - GRSTgaclCred *cred; - GRSTgaclNamevalue *namevalue; - // struct _GACLnamevalue *namevalue; - GRSThttpBody bp; - - if (!GRSTgaclPermHasAdmin(perm)) GRSThttpError ("403 Forbidden"); - - // Load ACL from file - acl = GRSTgaclAclLoadFile(GRSTgaclFileFindAclname(dir_path)); - - // Get pointer to the entry and check okay - entry_no=atol(GRSThttpGetCGI("entry_no")); - entry = GACLreturnEntry(acl, entry_no); - if(entry==NULL || entry_no<1 || entry_no>GACLentriesInAcl(acl) ){ - GRSThttpError ("500 Unable to read from ACL file"); - return; - } - - StartHTML(&bp, dir_uri, dir_path); - GRSThttpPrintf (&bp, "EDITING ENTRY %d IN ACL FOR %s

    \n", entry_no, dir_uri); - - // Start with first credential in the entry and display them in order*/ - cred=entry->firstcred; - cred_no=1; - StartForm(&bp, dir_uri, dir_path, admin_file, timestamp, "edit_entry"); - GRSThttpPrintf (&bp, "\n", entry_no); - - GRSTgaclCredTableStart(&bp); - - while (cred!=NULL){ - // Start with the first namevalue in the credential - namevalue=cred->firstname; - GRSTgaclCredTableAdd(user, entry, cred, namevalue, cred_no, entry_no, admin, timestamp, &bp, dn, perm, help_uri, dir_path, file, dir_uri, admin_file); - // Change to next credential - cred=cred->next; - cred_no++; - } - GRSTgaclCredTableEnd (entry, entry_no, admin, timestamp, &bp, dn, perm, help_uri, dir_path, file, dir_uri, admin_file); - EndForm(&bp); - - admin_continue(dn, perm, help_uri, dir_path, file, dir_uri, admin_file, &bp); - return; -} - - -void edit_entry(GRSTgaclUser *user, char *dn, GRSTgaclPerm perm, char *help_uri, char *dir_path, char *file, char *dir_uri, char *admin_file){ - //Processes the information entered into the form from edit_entry_form() and updates the entry corresponding to entry_no*/ - int entry_no, cred_no, i; - GRSTgaclAcl *acl; - GRSTgaclEntry *entry; - GRSTgaclCred *cred; - GRSTgaclNamevalue *namevalue; - char variable[30]; - GRSThttpBody bp; - - if (!GRSTgaclPermHasAdmin(perm)) GRSThttpError ("403 Forbidden"); - - // Load the ACL - acl = GRSTgaclAclLoadFile(GRSTgaclFileFindAclname(dir_path)); - - // Get pointer to the entry and perform checks - entry_no=atol(GRSThttpGetCGI("entry_no")); - entry = GACLreturnEntry(acl, entry_no); - if(entry==NULL || entry_no<1 || entry_no>GACLentriesInAcl(acl) ){ - GRSThttpError ("500 Unable to read from ACL file"); - return; - } - - // Start with the first credential and update each one - cred=entry->firstcred; - cred_no=1; - - while (cred!=NULL){ - if (strcmp(cred->type, "any-user")!=0){ - namevalue=cred->firstname; - sprintf(variable, "cred%d_value", cred_no); - namevalue->value=GRSThttpGetCGI(variable); - } - //Change to next credential*/ - cred=cred->next; - cred_no++; - } - - // Update permissions - GACLeditGetPerms(entry); - check_acl_save(dn, perm, help_uri, dir_path, file, dir_uri, admin_file, user, acl, &bp); - return; -} - - -void add_cred_form(GRSTgaclUser *user, char *dn, GRSTgaclPerm perm, char *help_uri, char *dir_path, char *file, char *dir_uri, char *admin_file){ - // Presents the user with a form asking for details required to create a new credential in the entry denoted by entry_no - GRSThttpBody bp; - int timestamp=atol(GRSThttpGetCGI("timestamp")), entry_no=atol(GRSThttpGetCGI("entry_no")); - GRSTgaclAcl *acl; - GRSTgaclEntry* entry; - GRSTgaclCred* cred; - GRSTgaclNamevalue* namevalue; - - if (!GRSTgaclPermHasAdmin(perm)) GRSThttpError ("403 Forbidden"); - - acl = GRSTgaclAclLoadFile(GRSTgaclFileFindAclname(dir_path)); // Load the ACL - - //Get pointer to the entry and perform checks - entry = GACLreturnEntry(acl, entry_no); - if(entry==NULL || entry_no<1 || entry_no>GACLentriesInAcl(acl) ){ - GRSThttpError ("500 Unable to read from ACL file"); - return; - } - - - if (strcmp(GRSThttpGetCGI("cmd"), "add_cred_form")==0){ //if not a new entry check to see if cred exists - cred=entry->firstcred; - while (cred!=NULL) { - if (strcmp (cred->type, "any-user")==0) { - StartHTML(&bp, dir_uri, dir_path); - GRSThttpPrintf (&bp, "ERROR: AND-ing \"any-user\" credential with other credential does not make sense
    \n"); - admin_continue(dn, perm, help_uri, dir_path, file, dir_uri, admin_file, &bp); - return; - } - cred=cred->next; - } - } - - StartHTML(&bp, dir_uri, dir_path); - GRSThttpPrintf (&bp, " NEW CREDENTIAL IN ENTRY %d OF ACL FOR %s

    \n", entry_no, dir_uri); - StartForm(&bp, dir_uri, dir_path, admin_file, timestamp, "add_cred"); - - GRSThttpPrintf (&bp, " \n", entry_no); - - GRSTgaclCredTableStart(&bp); - GRSTgaclCredTableAdd(user, entry, cred, namevalue, 0, 0, 0, timestamp, &bp, dn, perm, help_uri, dir_path, file, dir_uri, admin_file); - GRSTgaclCredTableEnd (entry, 0, 0, timestamp, &bp, dn, perm, help_uri, dir_path, file, dir_uri, admin_file); - - EndForm(&bp); - admin_continue(dn, perm, help_uri, dir_path, file, dir_uri, admin_file, &bp); - return; -} - - -void add_cred(GRSTgaclUser *user, char *dn, GRSTgaclPerm perm, char *help_uri, char *dir_path, char *file, char *dir_uri, char *admin_file){ - // Processes the information entered into the form [add_cred_form()]and adds a new credential to the entry corresponding to entry_no - int entry_no; - GRSTgaclAcl *acl; - GRSTgaclEntry *entry; - GRSTgaclCred *cred; - GRSThttpBody bp; - char *type, *value; - - if (!GRSTgaclPermHasAdmin(perm)) GRSThttpError ("403 Forbidden"); - - acl = GRSTgaclAclLoadFile(GRSTgaclFileFindAclname(dir_path));// Load the ACL - - // Get pointer to the entry and perform checks - entry_no=atol(GRSThttpGetCGI("entry_no")); - entry = GACLreturnEntry(acl, entry_no); - if(entry==NULL || entry_no<1 || entry_no>GACLentriesInAcl(acl)){ - GRSThttpError ("500 Unable to read from ACL file"); - return; - } - - // Create new credential and add it to entry - type=GRSThttpGetCGI("type"); - value=GRSThttpGetCGI("cred0_value"); - cred=GRSTgaclCredNew(type); - if (strcmp(type, "person") ==0) GRSTgaclCredAddValue(cred,"dn", value); - else if (strcmp(type, "dn-list") ==0) GRSTgaclCredAddValue(cred, "url", value); - else if (strcmp(type, "voms") ==0) GRSTgaclCredAddValue(cred, "fqan", value); - else if (strcmp(type, "dns") ==0) GRSTgaclCredAddValue(cred, "hostname", value); - else if (strcmp(type, "any-user")==0) {}// namevalue not entered for any-user credential - else{ - GRSThttpError ("500 Credential type not valid"); - return; - } - GRSTgaclEntryAddCred(entry, cred); - - check_acl_save(dn, perm, help_uri, dir_path, file, dir_uri, admin_file, user, acl, &bp); - return; -} - - -void del_cred(GRSTgaclUser *user, char *dn, GRSTgaclPerm perm, char *help_uri, char *dir_path, char *file, char *dir_uri, char *admin_file){ - // Deletes the credential denoted by the GCI variable "cred_no", in the entry denoted by "entry_no" - int entry_no, cred_no; - GRSTgaclAcl *acl; - GRSTgaclEntry *entry; - GRSTgaclCred *previous, *cred; - GRSThttpBody bp; - - if (!GRSTgaclPermHasAdmin(perm)) GRSThttpError ("403 Forbidden"); - - acl = GRSTgaclAclLoadFile(GRSTgaclFileFindAclname(dir_path)); - - // Get pointer to the entry and perform checks - entry_no=atol(GRSThttpGetCGI("entry_no")); - entry = GACLreturnEntry(acl, entry_no); - if(entry==NULL || entry_no<1 || entry_no>GACLentriesInAcl(acl) ){ - GRSThttpError ("500 Unable to read from ACL file"); - return; - } - // Get pointer the the credential and perform checks - cred_no=atol(GRSThttpGetCGI("cred_no")); - cred=GACLreturnCred(entry, cred_no); - if(entry==NULL || entry_no<1 || cred_no>GRSTgaclCredsInEntry(entry)){ - GRSThttpError ("500 Unable to read from ACL file"); - return; - } - // Get pointer to previous credential - if needed - if (cred_no!=1) previous = GACLreturnCred(entry, cred_no-1); - - // Perform deletion from the list by changing pointers - if (cred_no==1) entry->firstcred=cred->next; - else if (cred_no==GRSTgaclCredsInEntry(entry)) previous->next=NULL; - else previous->next=cred->next; - - check_acl_save(dn, perm, help_uri, dir_path, file, dir_uri, admin_file, user, acl, &bp); - return; -} - -void admin_continue(char *dn, GRSTgaclPerm perm, char *help_uri, char *dir_path, char *file, char *dir_uri, char *admin_file, GRSThttpBody *bp){ - // Single line printed out to forward users back to show_acl in admin mode - // Should ALWAYS called from another function so no HTML header required - // Should ALWAYS be the end of a page - GRSThttpPrintf (bp, "\n
    Click Here to return to the editor", dir_uri,admin_file,dir_uri, time(NULL)); - adminfooter(bp, dn, help_uri, dir_uri, NULL); - GRSThttpPrintHeaderFooter(bp, dir_path, GRST_FOOTFILE); - GRSThttpWriteOut(bp); - return; -} - - -void del_entry_sure(GRSTgaclUser *user, char *dn, GRSTgaclPerm perm, char *help_uri, char *dir_path, char *file, char *dir_uri, char *admin_file){ - // Prints out entry denoted by entry_no and asks if the user really wants to delete it - GRSTgaclAcl *acl; - GRSTgaclEntry *entry; - GRSTgaclCred *cred; - GRSTgaclNamevalue *namevalue; - int entry_no, cred_no, allow, deny, i, timestamp; - GRSThttpBody bp; - - if (!GRSTgaclPermHasAdmin(perm)) GRSThttpError ("403 Forbidden"); - - acl = GRSTgaclAclLoadFile(GRSTgaclFileFindAclname(dir_path));// Load ACL from file - - if (acl==NULL){ - GRSThttpError ("500 Unable to read from ACL file"); - return; - } - - // Get pointer to the entry and check okay - entry_no=atol(GRSThttpGetCGI("entry_no")); - entry = GACLreturnEntry(acl, entry_no); - if(entry==NULL || entry_no<1 || entry_no>GACLentriesInAcl(acl) ){ - GRSThttpError ("500 Unable to read from ACL file"); - return; - } - - StartHTML(&bp, dir_uri, dir_path); - GRSThttpPrintf (&bp, "

    Do you really want to delete the following entry?



    \n"); - GRSThttpPrintf (&bp,"
    Entry %d:
    \n", entry_no); - - // Print the entry out - // Start with the first credential in the entry and work through - cred=entry->firstcred; - cred_no=1; - - GRSTgaclCredTableStart(&bp); - while (cred!=NULL){ - // Start with the first namevalue in the credential - namevalue=cred->firstname; - GRSTgaclCredTableAdd(user, entry, cred, namevalue, cred_no, entry_no, 0, 0, &bp, dn, perm, help_uri, dir_path, file, dir_uri, admin_file); - // Change to next credential - cred=cred->next; - cred_no++; - } - - GRSTgaclCredTableEnd (entry, entry_no, 0, 0, &bp, dn, perm, help_uri, dir_path, file, dir_uri, admin_file); - - StartForm(&bp, dir_uri, dir_path, admin_file, atol(GRSThttpGetCGI("timestamp")), "del_entry"); - GRSThttpPrintf (&bp, "\n", entry_no); - GRSThttpPrintf (&bp, "

    \n\n"); - - admin_continue(dn, perm, help_uri, dir_path, file, dir_uri, admin_file, &bp); - return; -} - -void del_cred_sure(GRSTgaclUser *user, char *dn, GRSTgaclPerm perm, char *help_uri, char *dir_path, char *file, char *dir_uri, char *admin_file){ - // Prints out credential denoted by entry_no/cred_no and asks if the user really wants to delete it - GRSTgaclAcl *acl; - GRSTgaclEntry *entry; - GRSTgaclCred *cred; - GRSTgaclNamevalue *namevalue; - int entry_no, cred_no, allow, deny, timestamp, i; - GRSThttpBody bp; - - if (!GRSTgaclPermHasAdmin(perm)) GRSThttpError ("403 Forbidden"); - - acl = GRSTgaclAclLoadFile(GRSTgaclFileFindAclname(dir_path));// Load ACL from file - - if (acl==NULL){ - GRSThttpError ("500 Unable to read from ACL file"); - return; - } - - // Get pointer to the entry and check okay - entry_no=atol(GRSThttpGetCGI("entry_no")); - entry = GACLreturnEntry(acl, entry_no); - if(entry==NULL || entry_no<1 || entry_no>GACLentriesInAcl(acl) ){ - GRSThttpError ("500 Unable to read from ACL file"); - return; - } - - // Get pointer to the credential and check okay - cred_no=atol(GRSThttpGetCGI("cred_no")); - cred=GACLreturnCred(entry, cred_no); - if(entry==NULL || entry_no<1 || cred_no>GRSTgaclCredsInEntry(entry)){ - GRSThttpError ("500 Unable to read from ACL file"); - return; - } - - if(GRSTgaclCredsInEntry(entry)<=1){ - del_entry_sure(user, dn, perm, help_uri, dir_path, file, dir_uri, admin_file); - return; - } - - StartHTML(&bp, dir_uri, dir_path); - GRSThttpPrintf (&bp, "

    Do you really want to delete the following credential from entry %d?



    ", entry_no); - - // Print the credential out - GRSTgaclCredTableStart(&bp); - GRSTgaclCredTableAdd(user, entry, cred, cred->firstname, cred_no, entry_no, 0, 0, &bp, dn, perm, help_uri, dir_path, file, dir_uri, admin_file); - GRSTgaclCredTableEnd (entry, entry_no, 0, 0, &bp, dn, perm, help_uri, dir_path, file, dir_uri, admin_file); - GRSThttpPrintf (&bp,"
    \n"); - - // Yes Button - StartForm(&bp, dir_uri, dir_path, admin_file, atol(GRSThttpGetCGI("timestamp")), "del_cred"); - GRSThttpPrintf (&bp, "\n", entry_no); - GRSThttpPrintf (&bp, "\n", cred_no); - GRSThttpPrintf (&bp, "

    \n\n"); - - admin_continue(dn, perm, help_uri, dir_path, file, dir_uri, admin_file, &bp); - return; -} - - -int GACLentriesInAcl(GRSTgaclAcl *acl){ - // Returns the number of entries in acl - GRSTgaclEntry *entry; - int number; - - entry=acl->firstentry; - number=0; - - while (entry!=NULL) - { - number++; - entry=entry->next; - } - - return number; -} - -int GRSTgaclCredsInEntry(GRSTgaclEntry *entry){ - // Returns the number of credentials in entry - int number; - GRSTgaclCred *cred; - - cred=entry->firstcred; - number=0; - - while (cred!=NULL) - { - number++; - cred=cred->next; - } - - return number; -} - - -void GACLeditGetPerms(GRSTgaclEntry *entry){ - // Updates the permissions entry using permissions from a form produced using GRSTgaclCredTableEnd - int i; - char buf[30]; - - - for (i=0; grst_perm_syms[i]!=NULL; i++) /* Print the list of allowed permissions*/ - { - sprintf (buf, "allow_%s", grst_perm_syms[i]); // Update allowed - if (strcmp (GRSThttpGetCGI(buf), "ON") == 0 ) GRSTgaclEntryAllowPerm(entry, grst_perm_vals[i]); else GRSTgaclEntryUnallowPerm(entry, grst_perm_vals[i]); - - sprintf (buf, "deny_%s", grst_perm_syms[i]); // Update denied - if (strcmp (GRSThttpGetCGI(buf), "ON") == 0 ) GRSTgaclEntryDenyPerm(entry, grst_perm_vals[i]); else GRSTgaclEntryUndenyPerm(entry, grst_perm_vals[i]); - - } - - return; -} - -GRSTgaclEntry *GACLreturnEntry(GRSTgaclAcl *acl, int entry_no){ - // Returns a pointer to entry in ACL denoted by entry_no, returns NULL if not found - int number; - GRSTgaclEntry *entry; - - if (acl==NULL) return NULL; - - entry=acl->firstentry; - number=1; - - while (entry!=NULL) - { - if (number==entry_no) return entry; - number++; - entry=entry->next; - } - - return NULL; -} - - -GRSTgaclCred *GACLreturnCred(GRSTgaclEntry *entry, int cred_no){ - // Returns a pointer to credential denoted by cred_no in entry, returns NULL if not found - int number; - GRSTgaclCred *cred; - - if (entry==NULL) return NULL; - - cred=entry->firstcred; - number=1; - - while (cred!=NULL) - { - if (number==cred_no) return cred; - number++; - cred=cred->next; - } - - return NULL; -} -void StartHTML(GRSThttpBody *bp, char *dir_uri, char* dir_path){ - //Start HTML output and insert page title - printf("Status: 200 OK\nContent-Type: text/html\n"); - GRSThttpBodyInit(bp); - GRSThttpPrintf(bp, "Access Control List for %s\n", dir_uri); - GRSThttpPrintHeaderFooter(bp, dir_path, GRST_HEADFILE); - return; -} -void StartForm(GRSThttpBody *bp, char* dir_uri, char* dir_path, char* admin_file, int timestamp, char* target_function){ - // Starts an HTML form with gridsite admin as the target and target_function as the value of cmd. - // Also inputs the dir_uri and the timestamp - GRSThttpPrintf (bp, "
    \n", dir_uri, admin_file, dir_uri); - GRSThttpPrintf (bp, " \n", target_function); - GRSThttpPrintf (bp, " \n", timestamp); - return; -} - -void EndForm(GRSThttpBody *bp){ - GRSThttpPrintf (bp, "

    \n"); - GRSThttpPrintf (bp, "
    \n"); - return; -} - -void GRSTgaclCredTableStart(GRSThttpBody *bp){ - //Starts an HTML table of credentials by setting the column widths and inputting the headings - GRSThttpPrintf (bp,""); - GRSThttpPrintf (bp,""); - return; -} - -void GRSTgaclCredTableAdd(GRSTgaclUser *user, GRSTgaclEntry *entry, GRSTgaclCred *cred, GRSTgaclNamevalue *namevalue, int cred_no, int entry_no, int admin, int timestamp, GRSThttpBody *bp, char *dn, GRSTgaclPerm perm, char *help_uri, char *dir_path, char *file, char *dir_uri, char *admin_file){ - // Adds the credential "cred" to a table started byGRSTgaclCredTableStart allowing the user to edit if appropriate - char* cmd = GRSThttpGetCGI("cmd"); - int edit_values=0, new_cred=0, allow_new_person=1; - int site_admin=GRSTgaclDNlistHasUser(getenv("REDIRECT_GRST_ADMIN_LIST"), user); - - if (strcmp(cmd, "new_entry_form")==0 || strcmp(cmd, "add_cred_form")==0) new_cred=1; - if (new_cred || strcmp(cmd, "edit_entry_form")==0) edit_values=1; - - if (new_cred) { /*Print out type and descriptor*/ - if (strcmp(cmd, "add_cred_form")==0){ /*if not a new entry check to see if cred exists.*/ - cred=entry->firstcred; - while (cred!=NULL) {if (strcmp (cred->type, "person")==0) allow_new_person=0; cred=cred->next;} - } - //create dummy credential for the user to edit - cred=GRSTgaclCredNew("new"); - GRSTgaclCredAddValue(cred, "", ""); - namevalue=cred->firstname; - //Drop down list of types - GRSThttpPrintf(bp,""); - GRSThttpPrintf(bp,""); - } - - else { //Print out type and descriptor for existing cred - - GRSThttpPrintf(bp,""); -} - -void GRSTgaclCredTableEnd(GRSTgaclEntry* entry, int entry_no, int admin, int timestamp, GRSThttpBody *bp, char *dn, GRSTgaclPerm perm, char *help_uri, char *dir_path, char *file, char *dir_uri, char *admin_file){ - // Finishes off a table of credentials by inputting "Add Credential" link and a list of premissions in the final row - int i, blank_perms, edit_perms, show_perms; - char* cmd = GRSThttpGetCGI("cmd"); - - if (strcmp(cmd, "add_cred_form")==0 ||strcmp(cmd, "del_cred_sure")==0) show_perms=0; else show_perms=1; - if (strcmp(cmd, "edit_entry_form")==0 || strcmp(cmd, "new_entry_form")==0) edit_perms=1; else edit_perms=0; - if (strcmp(cmd, "new_entry_form")==0) blank_perms=1; else blank_perms=0; - - // If showing the last row is not required then exit - if (show_perms==0){GRSThttpPrintf (bp,"
    Credential No.TypeValue
    New"); - GRSThttpPrintf (bp, "
    %d", cred_no); - if (admin) GRSThttpPrintf (bp,"(Delete)", dir_uri,admin_file,dir_uri, entry_no, cred_no, timestamp); - GRSThttpPrintf(bp, "%s ", cred->type); - } - - if (strcmp(cred->type, "any-user")==0) GRSThttpPrintf (bp, " "); /* Do not print out namevalue for any-user credential*/ - else{ - if (edit_values){ // Place namevalue in an editable box if appropriate - GRSThttpPrintf (bp, "value, bp); - GRSThttpPrintf (bp, "\">"); - } - else if (strcmp(cred->type, "dn-list")==0){ - GRSThttpPrintf(bp, "value, bp); - GRSThttpPrintf(bp, " \">"); - StringHTMLEncode(namevalue->value, bp); - GRSThttpPrintf(bp, ""); - } - else { GRSThttpPrintf(bp, " "); StringHTMLEncode(namevalue->value, bp);} - - } - //Print out warning symbol if cred being printed relates to current user - but NOT for users in site admin list - if (GRSTgaclUserHasCred(user, cred) && !site_admin) GRSThttpPrintf(bp, " <--"); - GRSThttpPrintf(bp, "

    \n"); return;} - - GRSThttpPrintf (bp,""); - - if (admin) GRSThttpPrintf (bp,"Add Credential", dir_uri,admin_file,dir_uri, entry_no, timestamp); - - GRSThttpPrintf (bp, "\n "); - - if (blank_perms==1)entry->allowed=entry->denied=GRST_PERM_NONE; - - // Show Permissions - will produce a list or a list of check boxes depending on whether the permissions are to be edited or not - GRSThttpPrintf (bp, "Allowed: "); - for (i=0; grst_perm_syms[i]!=NULL; i++) /* Print the list of allowed permissions*/ - { - if ( entry->allowed & grst_perm_vals[i]){ - if (edit_perms) GRSThttpPrintf (bp, "%s   \n", grst_perm_syms[i],grst_perm_syms[i]); - else GRSThttpPrintf(bp,"%s ", grst_perm_syms[i]); if (strcmp(grst_perm_syms[i], "none")==0) break; - } - else if (strcmp(grst_perm_syms[i], "none")!=0 && edit_perms) GRSThttpPrintf (bp, "%s   \n", grst_perm_syms[i],grst_perm_syms[i]); - } - - if (edit_perms) GRSThttpPrintf (bp, "

    "); - GRSThttpPrintf (bp, "Denied: "); - for (i=0; grst_perm_syms[i]!=NULL; i++) /* Print the list of denied permissions*/ - { - if ( entry->denied & grst_perm_vals[i]) - { - if (edit_perms) GRSThttpPrintf (bp, "%s   \n", grst_perm_syms[i],grst_perm_syms[i]); - else GRSThttpPrintf(bp,"%s ", grst_perm_syms[i]); - if (strcmp(grst_perm_syms[i], "none")==0) break; - } - else if (strcmp(grst_perm_syms[i], "none")!=0 && edit_perms) GRSThttpPrintf (bp, "%s   \n", grst_perm_syms[i],grst_perm_syms[i]); - } - - GRSThttpPrintf (bp, ""); - GRSThttpPrintf (bp,"
    \n"); - GRSThttpPrintf (bp,"\n"); -} - -void check_acl_save(char *dn, GRSTgaclPerm perm, char *help_uri, char *dir_path, char *file, char *dir_uri, char *admin_file, GRSTgaclUser* user, GRSTgaclAcl *acl, GRSThttpBody *bp){ - // Checks if the acl for the current directory has been changed, check the current user's permissions. - // If all is okay the ACl is saved -> returns 1 else returns 0 - struct stat file_info; - GRSTgaclPerm new_perm; - char *vfile, *dir_path_vfile, *dir_path_file; - FILE *fp; - - - /*Check ACL has not been modified*/ - stat(GRSTgaclFileFindAclname(dir_path), &file_info); - if (atol(GRSThttpGetCGI("timestamp"))!=file_info.st_mtime){ - StartHTML(bp, dir_uri, dir_path); - GRSThttpPrintf (bp, "ERROR: CANNOT SAVE CHANGES

    The ACL has been modified since it was last viewed\n

    "); - admin_continue(dn, perm, help_uri, dir_path, file, dir_uri, admin_file, bp); - return; - } - - // check users permissions in the new ACL - - if (!GRSTgaclDNlistHasUser(getenv("REDIRECT_GRST_ADMIN_LIST"), user)) - { - new_perm = GRSTgaclAclTestUser(acl, user); - if (new_perm != perm){ - StartHTML(bp, dir_uri, dir_path); - if (!GRSTgaclPermHasAdmin(new_perm)){//Check that user still has Admin permissions - if not then exit without saving the new ACL - GRSThttpPrintf (bp, "ERROR: CANNOT SAVE CHANGES\n\n

    You cannot deny yourself admin access from within the editor\n"); - admin_continue(dn, perm, help_uri, dir_path, file, dir_uri, admin_file, bp); - return; - } - //Functions to inform of other permission changes come next - GRSThttpPrintf (bp, "WARNING: OPERATION CHANGED YOUR PERMISSIONS!\n\n

    You still have Admin permissions

    \n"); - admin_continue(dn, perm, help_uri, dir_path, file, dir_uri, admin_file, bp); - return; - } - } - // ACL not modified, notified of permission changes - can now save - - dir_path_file=GRSTgaclFileFindAclname(dir_path); - vfile=makevfilename(".gacl", file_info.st_size, dn); // Make temporary file name - dir_path_vfile = malloc(strlen(dir_path) + strlen(vfile) + 2); - strcpy(dir_path_vfile, dir_path); - strcat(dir_path_vfile, "/"); - strcat(dir_path_vfile, vfile); - - - // save the new ACL to the temporary file in the correct format using the GridsiteACLFormat directive - - if (strcasecmp(getenv("REDIRECT_GRST_ACL_FORMAT"), "XACML") ==0) GRSTxacmlAclSave(acl, dir_path_vfile); - else if (strcasecmp(getenv("REDIRECT_GRST_ACL_FORMAT"), "GACL") ==0) GRSTgaclAclSave(acl, dir_path_vfile); - else - { - GRSThttpPrintf (bp, "ERROR: ACL type not correctly specified"); - admin_continue(dn, perm, help_uri, dir_path, file, dir_uri, admin_file, bp); - return; - } - - - unlink(dir_path_file); - if (link (dir_path_vfile,dir_path_file)!=0) GRSThttpError("403 Forbidden"); - - printf ("Status: 302 Moved Temporarily\n Content Length: 0\nLocation: %s%s?cmd=admin_acl\n\n", dir_uri, admin_file); - return; -} - -void StringHTMLEncode (char* string, GRSThttpBody *bp){ - - char* current_char; - char* tmp; - int n; - tmp=malloc(2); - - *(tmp+1)='\0'; - current_char=string; - while(*current_char != '\0'){ - - if (*current_char == '<') GRSThttpPrintf (bp,"<"); - else if (*current_char == '>') GRSThttpPrintf (bp,">"); - else if (*current_char == '&') GRSThttpPrintf (bp,"&"); - else if (*current_char == '\'') GRSThttpPrintf (bp,"'"); - else if (*current_char == '"') GRSThttpPrintf (bp,"""); - else{ - *tmp=*current_char; - GRSThttpPrintf(bp, "%s", tmp); - - } - current_char++; - } - return; -} - -void revert_acl(GRSTgaclUser *user, char *dn, GRSTgaclPerm perm, char *help_uri, char *dir_path, char *file, char *dir_uri, char *admin_file){ - char *AclFilename; - GRSTgaclAcl *acl; - GRSThttpBody bp; - // Load the old ACL, add the entry and save - AclFilename=malloc(strlen(dir_path)+strlen(file)+2); - strcpy(AclFilename, dir_path); - strcat(AclFilename, "/"); - strcat(AclFilename, file); - - acl = GRSTgaclAclLoadFile(AclFilename); - check_acl_save(dn, perm, help_uri, dir_path, file, dir_uri, admin_file, user, acl, &bp); - return; -} diff --git a/org.gridsite.core/src/grst_admin_main.c b/org.gridsite.core/src/grst_admin_main.c deleted file mode 100644 index a9e9f0e..0000000 --- a/org.gridsite.core/src/grst_admin_main.c +++ /dev/null @@ -1,378 +0,0 @@ -/* - Andrew McNab and Shiv Kaushal, University of Manchester. - Copyright (c) 2002-5. All rights reserved. - - Redistribution and use in source and binary forms, with or - without modification, are permitted provided that the following - conditions are met: - - o Redistributions of source code must retain the above - copyright notice, this list of conditions and the following - disclaimer. - o Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following - disclaimer in the documentation and/or other materials - provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND - CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS - BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED - TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - POSSIBILITY OF SUCH DAMAGE. -*/ - -/*------------------------------------------------------------------* - * This program is part of GridSite: http://www.gridsite.org/ * - *------------------------------------------------------------------*/ - -#ifndef VERSION -#define VERSION "x.x.x" -#endif - -#ifndef _GNU_SOURCE -#define _GNU_SOURCE -#endif - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -// when porting: remember that sendfile() is very OS-specific! -#include - -#include - -#include "grst_admin.h" - -/* - - GridSite human/interactive management interface. This should produce - a CGI executable, usually ./sbin/real-gridsite-admin.cgi, which is - called from HTML forms either by GET or POST methods or both (ie input - present in both QUERY_STRING and the stdin of the CGI process.) - - The CGI name/value pairs used are: - - cmd = edit, managedir, print, history - file = short name of file, without path - - If real-gridsite-admin.cgi is run by an internal redirection inside - mod_gridsite (as should ALWAYS be the case) then the environment - variable REDIRECT_GRST_DIR_PATH will be set to the full path of - the directory holding the file in question. This respects any complex - URI -> file path mapping done by Apache. - -*/ - -void GRSThttpError(char *status) -{ - printf("Status: %s\n", status); - printf("Server-CGI: GridSite Admin %s\n", VERSION); - printf("Content-Length: %d\n", 2 * strlen(status) + 58); - puts("Content-Type: text/html\n"); - - printf("%s\n", status); - printf("

    %s

    \n", status); - - exit(0); -} - -void adminfooter(GRSThttpBody *bp, char *dn, char *help_uri, char *dir_uri, - char *admin_file) -{ - GRSThttpPrintf(bp, "

    \n"); - - if (dn != NULL) GRSThttpPrintf(bp, "


    You are %s
    \n", dn); - else GRSThttpPrintf(bp, "
    \n"); - - if (admin_file != NULL) - GRSThttpPrintf(bp, "" - "Manage directory .\n", - dir_uri, admin_file); - else GRSThttpPrintf(bp, "" - "Back to directory .\n", dir_uri); - - if (help_uri != NULL) - GRSThttpPrintf(bp, "Website Help .\n", help_uri); - - if ((getenv("GRST_NO_LINK") == NULL) && - (getenv("REDIRECT_GRST_NO_LINK") == NULL)) - GRSThttpPrintf(bp, "Built with " - "GridSite %s\n", - VERSION); - - GRSThttpPrintf(bp, "
    \n"); -} - -int GRSTstrCmpShort(char *long_s, char *short_s) -{ - while (*short_s != '\0') - { - if (*long_s > *short_s) return +1; - if (*long_s < *short_s) return -1; - - ++long_s; - ++short_s; - } - - return 0; -} - -char *makevfilename(char *publicname, size_t size, char *dn) -{ - int i; - char *ext, *vfilename, *encpublicname, *encdn, *p; - struct timeval tv_now; - - gettimeofday(&tv_now, NULL); - - ext = rindex(publicname, '.'); - if (ext == NULL) ext = ""; - - encpublicname = GRSThttpUrlEncode(publicname); - for (p=encpublicname; *p != '\0'; ++p) if (*p == '%') *p = '='; - - encdn = GRSThttpUrlEncode(dn); - for (p=encdn; *p != '\0'; ++p) if (*p == '%') *p = '='; - - /* we used zero-padding for times so - alphanumeric sorting will sort chronologically too */ - - asprintf(&vfilename, "%s:%s:%08X:%05X:%X:%s:%s", GRST_HIST_PREFIX, - encpublicname, tv_now.tv_sec, tv_now.tv_usec, size, encdn, ext); - - return vfilename; -} - -void justheader(char *dn, GRSTgaclPerm perm, char *help_uri, char *dir_path, - char *dir_uri, char *admin_file) -{ - GRSThttpBody bp; - - puts("Status: 200 OK\nContent-Type: text/html"); - - GRSThttpBodyInit(&bp); - - GRSThttpPrintHeaderFooter(&bp, dir_path, GRST_HEADFILE); - - GRSThttpWriteOut(&bp); -} - -void justfooter(char *dn, GRSTgaclPerm perm, char *help_uri, char *dir_path, - char *dir_uri, char *admin_file) -{ - GRSThttpBody bp; - - puts("Status: 200 OK\nContent-Type: text/html"); - - GRSThttpBodyInit(&bp); - - if (GRSTgaclPermHasList(perm) || GRSTgaclPermHasWrite(perm) - || GRSTgaclPermHasAdmin(perm)) - adminfooter(&bp, dn, help_uri, dir_uri, admin_file); - - GRSThttpPrintHeaderFooter(&bp, dir_path, GRST_FOOTFILE); - - GRSThttpWriteOut(&bp); -} - -int main() -{ - int i, gsiproxylimit_i = 1; - char *cmd, *dir_uri, *file, *dir_path, *admin_file, *dn = NULL, - *help_uri, *p, *content_type, *request_uri, *button, - *grst_cred_0, *gsiproxylimit, *dn_lists, buf[12]; - GRSTgaclCred *cred; - GRSTgaclUser *user = NULL; - GRSTgaclAcl *acl; - GRSTgaclPerm perm = GRST_PERM_NONE; - - help_uri = getenv("REDIRECT_GRST_HELP_URI"); /* can be NULL */ - admin_file = getenv("REDIRECT_GRST_ADMIN_FILE"); - dir_path = getenv("REDIRECT_GRST_DIR_PATH"); - request_uri = getenv("REQUEST_URI"); - - if ((dir_path == NULL) || (admin_file == NULL) || (request_uri == NULL)) - { - puts("Status: 500 Internal Server Error\nContent-type: text/plain\n\n" - "REDIRECT_GRST_DIR_PATH or REDIRECT_GRST_ADMIN_FILE " - "or REQUEST_URI missing"); - return; - } - - GRSTgaclInit(); - - grst_cred_0 = getenv("GRST_CRED_0"); - - if ((grst_cred_0 != NULL) && (cred = GRSTx509CompactToCred(grst_cred_0))) - { - gsiproxylimit = getenv("REDIRECT_GRST_GSIPROXY_LIMIT"); - if (gsiproxylimit != NULL) sscanf(gsiproxylimit, "%d", &gsiproxylimit_i); - - if (GRSTgaclCredGetDelegation(cred) <= gsiproxylimit_i) - { - user = GRSTgaclUserNew(cred); - - if ((p = index(grst_cred_0, ' ')) && - (p = index(++p, ' ')) && - (p = index(++p, ' ')) && - (p = index(++p, ' '))) dn = &p[1]; - } - /* User has a cert so check for voms attributes */ - for(i=1; ; i++) - { - sprintf (buf, "GRST_CRED_%d", i); - - - grst_cred_0 = getenv(buf); - if (grst_cred_0==NULL) break; - - if (cred=GRSTx509CompactToCred(grst_cred_0)) - GRSTgaclUserAddCred(user, cred); - } - /* no more voms attributes found found */ - } - else if ((dn = getenv("SSL_CLIENT_S_DN")) != NULL) - { - cred = GRSTgaclCredNew("person"); - GRSTgaclCredAddValue(cred, "dn", dn); - user = GRSTgaclUserNew(cred); - } - - dn_lists = getenv("REDIRECT_GRST_DN_LISTS"); - if (dn_lists == NULL) dn_lists = getenv("GRST_DN_LISTS"); - if (dn_lists != NULL) GRSTgaclUserSetDNlists(user, dn_lists); - - if (GRSTgaclDNlistHasUser(getenv("REDIRECT_GRST_ADMIN_LIST"), - user)) perm = GRST_PERM_ALL; - else - { - p = getenv("REMOTE_HOST"); - if (p != NULL) - { - cred = GRSTgaclCredNew("dns"); - GRSTgaclCredAddValue(cred, "hostname", p); - - if (user == NULL) user = GRSTgaclUserNew(cred); - else GRSTgaclUserAddCred(user, cred); - } - - acl = GRSTgaclAclLoadforFile(dir_path); - if (acl != NULL) perm = GRSTgaclAclTestUser(acl, user); - } - - /* we're relying on being a CGI with all this un-free()ed strdup()ing */ - - dir_uri = strdup(request_uri); - p = rindex(dir_uri, '?'); - if (p != NULL) *p = '\0'; - p = rindex(dir_uri, '/'); - if (p != NULL) p[1] = '\0'; - - content_type = getenv("CONTENT_TYPE"); - - if ((content_type != NULL) && - (GRSTstrCmpShort(content_type, "multipart/form-data; boundary=") == 0)) - { - uploadfile(dn, perm, help_uri, dir_path, dir_uri, admin_file); - return 0; - } - - cmd = GRSThttpGetCGI("cmd"); - file = GRSThttpGetCGI("file"); - button = GRSThttpGetCGI("button"); - - /* file and directory functions in grst_admin_file.c */ - - if (strcmp(cmd, "header") == 0) - justheader(dn, perm, help_uri, dir_path, dir_uri, admin_file); - else if (strcmp(cmd, "footer") == 0) - justfooter(dn, perm, help_uri, dir_path, dir_uri, admin_file); - else if (strcmp(cmd, "managedir") == 0) - managedir(dn, perm, help_uri, dir_path, dir_uri, admin_file); - else if (strcmp(cmd, "print") == 0) - printfile(dn, perm, help_uri, dir_path, file, dir_uri, admin_file); - else if (strcmp(cmd, "history") == 0) - filehistory(dn, perm, help_uri, dir_path, file, dir_uri, admin_file); - else if (strcmp(cmd, "editdnlist") == 0) - editdnlistform(dn, perm, help_uri, dir_path, file, dir_uri, admin_file); - else if (strcmp(cmd, "edit") == 0) - { - if ((strcasecmp(button, "new directory") == 0) || - (strcasecmp(button, "Create") == 0)) - newdirectory(dn, perm, help_uri, dir_path, file, dir_uri, admin_file); - else - editfileform(dn, perm, help_uri, dir_path, file, dir_uri, admin_file); - } - else if (strcmp(cmd, "editaction") == 0) - editfileaction(dn, perm, help_uri, dir_path, file, dir_uri, admin_file); - else if (strcmp(cmd, "editdnlistaction") == 0) - editdnlistaction(dn, perm, help_uri, dir_path, file, dir_uri, admin_file); - else if (strcmp(cmd, "delete") == 0) - deletefileform(dn, perm, help_uri, dir_path, file, dir_uri, admin_file); - else if (strcmp(cmd, "deleteaction") == 0) - deletefileaction(dn, perm, help_uri, dir_path, file, dir_uri, admin_file); - else if (strcmp(cmd, "rename") == 0) - renameform(dn, perm, help_uri, dir_path, file, dir_uri, admin_file); - else if (strcmp(cmd, "renameaction") == 0) - renameaction(dn, perm, help_uri, dir_path, file, dir_uri, admin_file); - else if (strcmp(cmd, "ziplist") == 0) - ziplist(dn, perm, help_uri, dir_path, file, dir_uri, admin_file); - else if (strcmp(cmd, "unzipfile") == 0) - unzipfile(dn, perm, help_uri, dir_path, file, dir_uri, admin_file); - else if (strcmp(cmd, "create_acl") == 0) - create_acl(dn, perm, help_uri, dir_path, file, dir_uri, admin_file); - - /* GACL functions in grst_admin_gacl.c */ - - else if (strcmp(cmd, "show_acl") == 0) - show_acl(0, user, dn, perm, help_uri, dir_path, file, dir_uri, admin_file); - else if (strcmp(cmd, "admin_acl") == 0) - show_acl(1, user, dn, perm, help_uri, dir_path, file, dir_uri, admin_file); - else if (strcmp(cmd, "acl_history") == 0) - show_acl(2, user, dn, perm, help_uri, dir_path, file, dir_uri, admin_file); - else if (strcmp(cmd, "revert_acl") == 0) - revert_acl(user, dn, perm, help_uri, dir_path, file, dir_uri, admin_file); - //show_acl(2, user, dn, perm, help_uri, dir_path, file, dir_uri, admin_file); - else if (strcmp(cmd,"new_entry_form")==0) - new_entry_form(user, dn, perm, help_uri, dir_path, file, dir_uri, admin_file); - else if (strcmp(cmd,"new_entry")==0) - new_entry(user, dn, perm, help_uri, dir_path, file, dir_uri, admin_file); - else if (strcmp(cmd,"del_entry_sure")==0) - del_entry_sure(user, dn, perm, help_uri, dir_path, file, dir_uri, admin_file); - else if (strcmp(cmd,"del_entry")==0) - del_entry(user, dn, perm, help_uri, dir_path, file, dir_uri, admin_file); - else if (strcmp(cmd,"edit_entry_form")==0) - edit_entry_form(user, dn, perm, help_uri, dir_path, file, dir_uri, admin_file); - else if (strcmp(cmd,"edit_entry")==0) - edit_entry(user, dn, perm, help_uri, dir_path, file, dir_uri, admin_file); - else if (strcmp(cmd,"add_cred_form")==0) - add_cred_form(user, dn, perm, help_uri, dir_path, file, dir_uri, admin_file); - else if (strcmp(cmd,"add_cred")==0) - add_cred(user, dn, perm, help_uri, dir_path, file, dir_uri, admin_file); - else if (strcmp(cmd,"del_cred_sure")==0) - del_cred_sure(user, dn, perm, help_uri, dir_path, file, dir_uri, admin_file); - else if (strcmp(cmd,"del_cred")==0) - del_cred(user, dn, perm, help_uri, dir_path, file, dir_uri, admin_file); - - /* you what? */ - - else GRSThttpError("500 Internal Server Error"); -} diff --git a/org.gridsite.core/src/grst_asn1.c b/org.gridsite.core/src/grst_asn1.c deleted file mode 100644 index bc92a87..0000000 --- a/org.gridsite.core/src/grst_asn1.c +++ /dev/null @@ -1,506 +0,0 @@ - -#define _GNU_SOURCE -#include -#include - -#include -#include -#include - -#include -#include -#include - -#include "gridsite.h" - -/// ASN1 time string (in a char *) to time_t -/** - * (Use ASN1_STRING_data() to convert ASN1_GENERALIZEDTIME to char * if - * necessary) - */ - -time_t GRSTasn1TimeToTimeT(char *asn1time, size_t len) -{ - char zone; - struct tm time_tm; - - if (len == 0) len = strlen(asn1time); - - if ((len != 13) && (len != 15)) return 0; /* dont understand */ - - if ((len == 13) && - ((sscanf(asn1time, "%02d%02d%02d%02d%02d%02d%c", - &(time_tm.tm_year), - &(time_tm.tm_mon), - &(time_tm.tm_mday), - &(time_tm.tm_hour), - &(time_tm.tm_min), - &(time_tm.tm_sec), - &zone) != 7) || (zone != 'Z'))) return 0; /* dont understand */ - - if ((len == 15) && - ((sscanf(asn1time, "20%02d%02d%02d%02d%02d%02d%c", - &(time_tm.tm_year), - &(time_tm.tm_mon), - &(time_tm.tm_mday), - &(time_tm.tm_hour), - &(time_tm.tm_min), - &(time_tm.tm_sec), - &zone) != 7) || (zone != 'Z'))) return 0; /* dont understand */ - - /* time format fixups */ - - if (time_tm.tm_year < 90) time_tm.tm_year += 100; - --(time_tm.tm_mon); - - return timegm(&time_tm); -} - -/* this function is taken from OpenSSL without modification */ - -static int asn1_print_info(BIO *bp, int tag, int xclass, int constructed, - int indent) - { - static const char fmt[]="%-18s"; - static const char fmt2[]="%2d %-15s"; - char str[128]; - const char *p,*p2=NULL; - - if (constructed & V_ASN1_CONSTRUCTED) - p="cons: "; - else - p="prim: "; - if (BIO_write(bp,p,6) < 6) goto err; -#if OPENSSL_VERSION_NUMBER >= 0x0090701fL - BIO_indent(bp,indent,128); -#endif - - p=str; - if ((xclass & V_ASN1_PRIVATE) == V_ASN1_PRIVATE) - sprintf(str,"priv [ %d ] ",tag); - else if ((xclass & V_ASN1_CONTEXT_SPECIFIC) == V_ASN1_CONTEXT_SPECIFIC) - sprintf(str,"cont [ %d ]",tag); - else if ((xclass & V_ASN1_APPLICATION) == V_ASN1_APPLICATION) - sprintf(str,"appl [ %d ]",tag); - else p = ASN1_tag2str(tag); - - if (p2 != NULL) - { - if (BIO_printf(bp,fmt2,tag,p2) <= 0) goto err; - } - else - { - if (BIO_printf(bp,fmt,p) <= 0) goto err; - } - return(1); -err: - return(0); - } - -static void GRSTasn1AddToTaglist(struct GRSTasn1TagList taglist[], - int maxtag, int *lasttag, - char *treecoords, int start, int headerlength, - int length, int tag) -{ - if ((strlen(treecoords) > GRST_ASN1_MAXCOORDLEN) || - (*lasttag + 1 > maxtag)) return; - - ++(*lasttag); - - strncpy(taglist[*lasttag].treecoords, treecoords, GRST_ASN1_MAXCOORDLEN+1); - taglist[*lasttag].start = start; - taglist[*lasttag].headerlength = headerlength; - taglist[*lasttag].length = length; - taglist[*lasttag].tag = tag; -} - -int GRSTasn1SearchTaglist(struct GRSTasn1TagList taglist[], - int lasttag, char *treecoords) -{ - int i; - - for (i=0; i <= lasttag; ++i) - { - if (strcmp(treecoords, taglist[i].treecoords) == 0) return i; - } - - return -1; -} - -static int GRSTasn1PrintPrintable(BIO *bp, char *str, int length) -{ - int ret = 0; - char *dup, *p; - - dup = strndup(str, length); - - for (p=dup; *p != '\0'; ++p) if ((*p < ' ') || (*p > '~')) *p = '.'; - - if (bp != NULL) ret = BIO_write(bp, dup, strlen(dup)); - - free(dup); - - return ret; -} - -static int GRSTasn1Parse2(BIO *bp, unsigned char **pp, long length, int offset, - int depth, int indent, int dump, char *treecoords, - struct GRSTasn1TagList taglist[], int maxtag, int *lasttag) - { - int sibling = 0; - char sibtreecoords[512]; - - unsigned char *p,*ep,*tot,*op,*opp; - long len; - int tag,xclass,ret=0; - int nl,hl,j,r; - ASN1_OBJECT *o=NULL; - ASN1_OCTET_STRING *os=NULL; - int dump_indent; - - - dump_indent = 6; /* Because we know BIO_dump_indent() */ - p= *pp; - tot=p+length; - op=p-1; - while ((p < tot) && (op < p)) - { - op=p; - j=ASN1_get_object(&p,&len,&tag,&xclass,length); - - if (j & 0x80) - { - if ((bp != NULL) && - (BIO_write(bp,"Error in encoding\n",18) <= 0)) - goto end; - ret=0; - goto end; - } - hl=(p-op); - length-=hl; - - ++sibling; - sprintf(sibtreecoords, "%s-%d", treecoords, sibling); - - GRSTasn1AddToTaglist(taglist, maxtag, lasttag, sibtreecoords, - (int)offset+(int)(op - *pp), - (int) hl, len, tag); - - if (bp != NULL) - { - BIO_printf(bp, " %s %ld %ld %d %d ", sibtreecoords, - (long)offset+(long)(op - *pp), hl, len, tag); - - GRSTasn1PrintPrintable(bp, p, -// &((*pp)[(long)offset+(long)(op - *pp)+hl]), - (len > 30) ? 30 : len); - - BIO_printf(bp, "\n"); - } - - - /* if j == 0x21 it is a constructed indefinite length object */ - if ((bp != NULL) && - (BIO_printf(bp,"%5ld:",(long)offset+(long)(op- *pp)) - <= 0)) goto end; - - if (j != (V_ASN1_CONSTRUCTED | 1)) - { - if ((bp != NULL) && - (BIO_printf(bp,"d=%-2d hl=%ld l=%4ld ", - depth,(long)hl,len) <= 0)) - goto end; - } - else - { - if ((bp != NULL) && - (BIO_printf(bp,"d=%-2d hl=%ld l=inf ", - depth,(long)hl) <= 0)) - goto end; - } - if ((bp != NULL) && - !asn1_print_info(bp,tag,xclass,j,(indent)?depth:0)) - goto end; - if (j & V_ASN1_CONSTRUCTED) - { - ep=p+len; - if ((bp != NULL) && - (BIO_write(bp,"\n",1) <= 0)) goto end; - if (len > length) - { - if (bp != NULL) BIO_printf(bp, - "length is greater than %ld\n",length); - ret=0; - goto end; - } - if ((j == 0x21) && (len == 0)) - { - for (;;) - { - r=GRSTasn1Parse2(bp,&p,(long)(tot-p), - offset+(p - *pp),depth+1, - indent,dump,sibtreecoords, - taglist, maxtag, lasttag); - if (r == 0) { ret=0; goto end; } - if ((r == 2) || (p >= tot)) break; - } - } - else - while (p < ep) - { - r=GRSTasn1Parse2(bp,&p,(long)len, - offset+(p - *pp),depth+1, - indent,dump,sibtreecoords, - taglist, maxtag, lasttag); - if (r == 0) { ret=0; goto end; } - } - } - else if (xclass != 0) - { - p+=len; - if ((bp != NULL) && - (BIO_write(bp,"\n",1) <= 0)) goto end; - } - else - { - nl=0; - if ( (tag == V_ASN1_PRINTABLESTRING) || - (tag == V_ASN1_T61STRING) || - (tag == V_ASN1_IA5STRING) || - (tag == V_ASN1_VISIBLESTRING) || - (tag == V_ASN1_UTCTIME) || - (tag == V_ASN1_GENERALIZEDTIME)) - { - if ((bp != NULL) && - (BIO_write(bp,":",1) <= 0)) goto end; - if ((len > 0) && (bp != NULL) && - BIO_write(bp,(char *)p,(int)len) - != (int)len) - goto end; - } - else if (tag == V_ASN1_OBJECT) - { - opp=op; - if (d2i_ASN1_OBJECT(&o,&opp,len+hl) != NULL) - { - if (bp != NULL) - { - if (BIO_write(bp,":",1) <= 0) goto end; - i2a_ASN1_OBJECT(bp,o); - } - } - else - { - if ((bp != NULL) && - (BIO_write(bp,":BAD OBJECT",11) <= 0)) - goto end; - } - } - else if (tag == V_ASN1_BOOLEAN) - { - int ii; - - opp=op; - ii=d2i_ASN1_BOOLEAN(NULL,&opp,len+hl); - if (ii < 0) - { - if ((bp != NULL) && - (BIO_write(bp,"Bad boolean\n",12))) - goto end; - } - if (bp != NULL) BIO_printf(bp,":%d",ii); - } - else if (tag == V_ASN1_BMPSTRING) - { - /* do the BMP thang */ - } - else if (tag == V_ASN1_OCTET_STRING) - { - int i; - - opp=op; - os=d2i_ASN1_OCTET_STRING(NULL,&opp,len+hl); - if (os != NULL) - { - opp=os->data; - - if (os->length > 0) - { - if ((bp != NULL) && - (BIO_write(bp,":",1) <= 0)) - goto end; - if ((bp != NULL) && - (GRSTasn1PrintPrintable(bp, - opp, - os->length) <= 0)) - goto end; - } - - M_ASN1_OCTET_STRING_free(os); - os=NULL; - } - } - else if (tag == V_ASN1_INTEGER) - { - ASN1_INTEGER *bs; - int i; - - opp=op; - bs=d2i_ASN1_INTEGER(NULL,&opp,len+hl); - if (bs != NULL) - { - if ((bp != NULL) && - (BIO_write(bp,":",1) <= 0)) goto end; - if (bs->type == V_ASN1_NEG_INTEGER) - if ((bp != NULL) && - (BIO_write(bp,"-",1) <= 0)) - goto end; - for (i=0; ilength; i++) - { - if ((bp != NULL) && - (BIO_printf(bp,"%02X", - bs->data[i]) <= 0)) - goto end; - } - if (bs->length == 0) - { - if ((bp != NULL) && - (BIO_write(bp,"00",2) <= 0)) - goto end; - } - } - else - { - if ((bp != NULL) && - (BIO_write(bp,"BAD INTEGER",11) <= 0)) - goto end; - } - M_ASN1_INTEGER_free(bs); - } - else if (tag == V_ASN1_ENUMERATED) - { - ASN1_ENUMERATED *bs; - int i; - - opp=op; - bs=d2i_ASN1_ENUMERATED(NULL,&opp,len+hl); - if (bs != NULL) - { - if ((bp != NULL) && - (BIO_write(bp,":",1) <= 0)) goto end; - if (bs->type == V_ASN1_NEG_ENUMERATED) - if ((bp != NULL) && - (BIO_write(bp,"-",1) <= 0)) - goto end; - for (i=0; ilength; i++) - { - if ((bp != NULL) && - (BIO_printf(bp,"%02X", - bs->data[i]) <= 0)) - goto end; - } - if (bs->length == 0) - { - if ((bp != NULL) && - (BIO_write(bp,"00",2) <= 0)) - goto end; - } - } - else - { - if ((bp != NULL) && - (BIO_write(bp,"BAD ENUMERATED",11) <= 0)) - goto end; - } - M_ASN1_ENUMERATED_free(bs); - } - else if (len > 0 && dump) - { - if (!nl) - { - if ((bp != NULL) && - (BIO_write(bp,"\n",1) <= 0)) - goto end; - } - if ((bp != NULL) && - (BIO_dump_indent(bp,(char *)p, - ((dump == -1 || dump > len)?len:dump), - dump_indent) <= 0)) - goto end; - nl=1; - } - - if (!nl) - { - if ((bp != NULL) && - (BIO_write(bp,"\n",1) <= 0)) goto end; - } - p+=len; - if ((tag == V_ASN1_EOC) && (xclass == 0)) - { - ret=2; /* End of sequence */ - goto end; - } - } - - length-=len; - } - ret=1; -end: - if (o != NULL) ASN1_OBJECT_free(o); - if (os != NULL) M_ASN1_OCTET_STRING_free(os); - *pp=p; - return(ret); - } - -int GRSTasn1ParseDump(BIO *bp, unsigned char *pp, long len, - struct GRSTasn1TagList taglist[], - int maxtag, int *lasttag) - { - return(GRSTasn1Parse2(bp,&pp,len,0,0,0,0,"", - taglist, maxtag, lasttag)); - } - -int GRSTasn1GetX509Name(char *x509name, int maxlength, char *coords, - char *asn1string, - struct GRSTasn1TagList taglist[], int lasttag) -{ - int i, iobj, istr, n, len = 0; - ASN1_OBJECT *obj = NULL; - unsigned char coordstmp[81], *q; - const unsigned char *shortname; - - for (i=1; ; ++i) - { - snprintf(coordstmp, sizeof(coordstmp), coords, i, 1); - iobj = GRSTasn1SearchTaglist(taglist, lasttag, coordstmp); - if (iobj < 0) break; - - snprintf(coordstmp, sizeof(coordstmp), coords, i, 2); - istr = GRSTasn1SearchTaglist(taglist, lasttag, coordstmp); - if (istr < 0) break; - - q = &asn1string[taglist[iobj].start]; - d2i_ASN1_OBJECT(&obj, &q, taglist[iobj].length + - taglist[iobj].headerlength); - - n = OBJ_obj2nid(obj); -// free obj now? - shortname = OBJ_nid2sn(n); - - if (len + 2 + strlen(shortname) + taglist[istr].length >= maxlength) - { - x509name[0] = '\0'; - return GRST_RET_FAILED; - } - - sprintf(&x509name[len], "/%s=%.*s", shortname, - taglist[istr].length, - &asn1string[taglist[istr].start+taglist[istr].headerlength]); - len += 2 + strlen(shortname) + taglist[istr].length; - } - - x509name[len] = '\0'; - - return (x509name[0] != '\0') ? GRST_RET_OK : GRST_RET_FAILED; -} diff --git a/org.gridsite.core/src/grst_err.c b/org.gridsite.core/src/grst_err.c deleted file mode 100644 index 8d1e2cb..0000000 --- a/org.gridsite.core/src/grst_err.c +++ /dev/null @@ -1,41 +0,0 @@ -/* - Copyright (c) 2002-6, Andrew McNab, University of Manchester - All rights reserved. - - Redistribution and use in source and binary forms, with or - without modification, are permitted provided that the following - conditions are met: - - o Redistributions of source code must retain the above - copyright notice, this list of conditions and the following - disclaimer. - o Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following - disclaimer in the documentation and/or other materials - provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND - CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS - BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED - TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - POSSIBILITY OF SUCH DAMAGE. - - --------------------------------------------------------------- - For more information about GridSite: http://www.gridsite.org/ - --------------------------------------------------------------- -*/ - -#define _GNU_SOURCE - -#include "gridsite.h" - -void (*GRSTerrorLogFunc)(char *, int, int, char *, ...) = NULL; - diff --git a/org.gridsite.core/src/grst_gacl.c b/org.gridsite.core/src/grst_gacl.c deleted file mode 100644 index 539a44e..0000000 --- a/org.gridsite.core/src/grst_gacl.c +++ /dev/null @@ -1,1398 +0,0 @@ -/* - Copyright (c) 2002-6, Andrew McNab, University of Manchester - All rights reserved. - - Redistribution and use in source and binary forms, with or - without modification, are permitted provided that the following - conditions are met: - - o Redistributions of source code must retain the above - copyright notice, this list of conditions and the following - disclaimer. - o Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following - disclaimer in the documentation and/or other materials - provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND - CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS - BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED - TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - POSSIBILITY OF SUCH DAMAGE. -*/ -/*---------------------------------------------------------------* - * For more information about GridSite: http://www.gridsite.org/ * - *---------------------------------------------------------------*/ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#ifndef _GNU_SOURCE -#define _GNU_SOURCE -#endif -#include - -#include -#include -#include - -#include "gridsite.h" - -/* * - * Global variables, shared by all GACL functions but private to libgacl * - * */ - -char *grst_perm_syms[] = { "none", - "read", - "exec", - "list", - "write", - "admin", - NULL }; - -GRSTgaclPerm grst_perm_vals[] = { GRST_PERM_NONE, - GRST_PERM_READ, - GRST_PERM_EXEC, - GRST_PERM_LIST, - GRST_PERM_WRITE, - GRST_PERM_ADMIN, - -1 }; - -int GRSTgaclInit(void) -{ - xmlInitParser(); - - LIBXML_TEST_VERSION - - xmlKeepBlanksDefault(0); - - return 1; -} - -/* declare these two private functions at the start */ - -GRSTgaclAcl *GRSTgaclAclParse(xmlDocPtr, xmlNodePtr, GRSTgaclAcl *); -GRSTgaclAcl *GRSTxacmlAclParse(xmlDocPtr, xmlNodePtr, GRSTgaclAcl *); - -/* * - * Functions to manipulate GRSTgaclCred structures * - * */ - -GRSTgaclCred *GRSTgaclCredCreate(char *auri_prefix, char *auri_suffix) -/* - GRSTgaclCredCreate - allocate a new GRSTgaclCred structure, and return - it's pointer or NULL on (malloc) error. -*/ -{ - int i; - char *auri; - GRSTgaclCred *newcred; - - if ((auri_prefix != NULL) && (auri_suffix == NULL)) - auri = strdup(auri_prefix); - else if ((auri_prefix == NULL) && (auri_suffix != NULL)) - auri = strdup(auri_suffix); - else if ((auri_prefix != NULL) && (auri_suffix != NULL)) - asprintf(&auri, "%s%s", auri_prefix, auri_suffix); - else return NULL; - - for (i=0; (auri[i] != '\0') && isspace(auri[i]); ++i) ; /* leading space */ - - for (i=strlen(auri) - 1; (i >= 0) && isspace(auri[i]); --i) - auri[i]='\0'; /* trailing space */ - - newcred = malloc(sizeof(GRSTgaclCred)); - if (newcred == NULL) - { - free(auri); - return NULL; - } - - newcred->auri = auri; - newcred->delegation = 0; - newcred->nist_loa = 0; - newcred->notbefore = 0; - newcred->notafter = 0; - newcred->next = NULL; - - return newcred; -} - -GRSTgaclCred *GRSTgaclCredNew(char *type) -/* - GRSTgaclCredNew - allocate a new GRSTgaclCred structure, and return - it's pointer or NULL on (malloc) error. -*/ -{ - if (type == NULL) return NULL; - - if ((strcmp(type, "person" ) == 0) || - (strcmp(type, "voms" ) == 0) || - (strcmp(type, "dn-list") == 0) || - (strcmp(type, "dns" ) == 0) || - (strcmp(type, "level" ) == 0)) return GRSTgaclCredCreate("", NULL); - - if (strcmp(type, "any-user") == 0) - return GRSTgaclCredCreate("gacl:", "any-user"); - - if (strcmp(type, "auth-user") == 0) - return GRSTgaclCredCreate("gacl:", "auth-user"); - - return NULL; -} - -int GRSTgaclCredAddValue(GRSTgaclCred *cred, char *name, char *rawvalue) -/* - GRSTgaclCredAddValue - add a name/value pair to a GRSTgaclCred -*/ -{ - int i; - char *value; - - if ((cred == NULL) || (cred->auri == NULL)) return 0; - free(cred->auri); - cred->auri = NULL; - - /* no leading or trailing space in value */ - - value = rawvalue; - while ((*value != '\0') && isspace(*value)) ++value; - - value = strdup(value); - for (i=strlen(value) - 1; (i >= 0) && isspace(value[i]); --i) value[i]='\0'; - - if (strcmp(name, "dn") == 0) - { - asprintf(&(cred->auri), "dn:%s", value); - free(value); - return 1; - } - else if (strcmp(name, "fqan") == 0) - { - asprintf(&(cred->auri), "fqan:%s", value); - free(value); - return 1; - } - else if (strcmp(name, "url") == 0) - { - asprintf(&(cred->auri), "%s", value); - free(value); - return 1; - } - else if (strcmp(name, "hostname") == 0) - { - asprintf(&(cred->auri), "dns:%s", value); - free(value); - return 1; - } - else if (strcmp(name, "nist-loa") == 0) - { - asprintf(&(cred->auri), "nist-loa:%s", value); - free(value); - return 1; - } - - free(value); - return 0; -} - -int GRSTgaclCredFree(GRSTgaclCred *cred) -/* - GRSTgaclCredFree - free memory structures of a GRSTgaclCred, - returning 1 always! -*/ -{ - if (cred == NULL) return 1; - - if (cred->auri != NULL) free(cred->auri); - free(cred); - - return 1; -} - -static int GRSTgaclCredsFree(GRSTgaclCred *firstcred) -/* - GRSTgaclCredsFree - free a cred and all the creds in its *next chain -*/ -{ - if (firstcred == NULL) return 0; - - if (firstcred->next != NULL) GRSTgaclCredsFree(firstcred->next); - - return GRSTgaclCredFree(firstcred); -} - -static int GRSTgaclCredInsert(GRSTgaclCred *firstcred, GRSTgaclCred *newcred) -/* - GRSTgaclCredInsert - insert a cred in the *next chain of firstcred - - FOR THE MOMENT THIS JUST APPENDS! -*/ -{ - if (firstcred == NULL) return 0; - - if (firstcred->next == NULL) - { - firstcred->next = newcred; - return 1; - } - - return GRSTgaclCredInsert(firstcred->next, newcred); -} - -int GRSTgaclEntryAddCred(GRSTgaclEntry *entry, GRSTgaclCred *cred) -/* - GRSTaddCred - add a new credential to an existing entry, returning 1 - on success or 0 on error -*/ -{ - if (entry == NULL) return 0; - - if (entry->firstcred == NULL) - { - entry->firstcred = cred; - return 1; - } - else return GRSTgaclCredInsert(entry->firstcred, cred); -} - -static int GRSTgaclCredRemoveCred(GRSTgaclCred *firstcred, GRSTgaclCred *oldcred) -/* - (Private) - - GRSTgaclCredRemoveCred - remove a cred in the *next chain of firstcred - and relink the chain -*/ -{ - if (firstcred == NULL) return 0; - -// yeah, I know -} - -int GRSTgaclEntryDelCred(GRSTgaclEntry *entry, GRSTgaclCred *cred) -/* - GRSTgaclEntryDelCred - remove a new cred from an entry, returning 1 - on success (or absense) or 0 on error. -*/ -{ - if (entry == NULL) return 0; - - return GRSTgaclCredRemoveCred(entry->firstcred, cred); -} - -int GRSTgaclCredPrint(GRSTgaclCred *cred, FILE *fp) -/* - GRSTgaclCredPrint - print a credential and any name-value pairs is contains -*/ -{ - char *q; - - if (cred->auri != NULL) - { - fprintf(fp, "\n"); - - for (q=cred->auri; *q != '\0'; ++q) - if (*q == '<') fputs("<", fp); - else if (*q == '>') fputs(">", fp); - else if (*q == '&') fputs("&" , fp); - else if (*q == '\'') fputs("'", fp); - else if (*q == '"') fputs(""", fp); - else fputc(*q, fp); - - fprintf(fp, "\n"); - - if (cred->nist_loa > 0) - fprintf(fp, "%d\n", cred->nist_loa); - - if (cred->delegation > 0) - fprintf(fp, "%d\n", cred->delegation); - - fprintf(fp, "\n"); - } - - return 1; -} - -/* * - * Functions to manipulate GRSTgaclEntry structures * - * */ - -GRSTgaclEntry *GRSTgaclEntryNew(void) -/* - GRSTgaclEntryNew - allocate space for a new entry, returning its pointer - or NULL on failure. -*/ -{ - GRSTgaclEntry *newentry; - - newentry = (GRSTgaclEntry *) malloc(sizeof(GRSTgaclEntry)); - if (newentry == NULL) return NULL; - - newentry->firstcred = NULL; - newentry->allowed = 0; - newentry->denied = 0; - newentry->next = NULL; - - return newentry; -} - -int GRSTgaclEntryFree(GRSTgaclEntry *entry) -/* - GRSTgaclEntryFree - free up space used by an entry (always returns 1) -*/ -{ - int i; - - if (entry == NULL) return 1; - - GRSTgaclCredsFree(entry->firstcred); - - free(entry); - - return 1; -} - -static int GRSTgaclEntriesFree(GRSTgaclEntry *entry) -/* - GRSTgaclEntriesFree - free up entry and all entries linked to in its *next - chain -*/ -{ - if (entry == NULL) return 0; - - if (entry->next != NULL) GRSTgaclEntriesFree(entry->next); - - return GRSTgaclEntryFree(entry); -} - -static int GRSTgaclEntryInsert(GRSTgaclEntry *firstentry, GRSTgaclEntry *newentry) -/* - GRSTgaclEntryInsert - insert an entry in the *next chain of firstentry - - FOR THE MOMENT THIS JUST APPENDS -*/ -{ - if (firstentry == NULL) return 0; - - if (firstentry->next == NULL) - { - firstentry->next = newentry; - return 1; - } - - return GRSTgaclEntryInsert(firstentry->next, newentry); -} - -int GRSTgaclAclAddEntry(GRSTgaclAcl *acl, GRSTgaclEntry *entry) -/* - GRSTgaclAclAddEntry - add a new entry to an existing acl, returning 1 - on success or 0 on error -*/ -{ - if (acl == NULL) return 0; - - if (acl->firstentry == NULL) - { - acl->firstentry = entry; - return 1; - } - else return GRSTgaclEntryInsert(acl->firstentry, entry); -} - -int GRSTgaclEntryPrint(GRSTgaclEntry *entry, FILE *fp) -{ - GRSTgaclCred *cred; - GRSTgaclPerm i; - - fputs("\n", fp); - - for (cred = entry->firstcred; cred != NULL; cred = cred->next) - GRSTgaclCredPrint(cred, fp); - - if (entry->allowed) - { - fputs("", fp); - - for (i=GRST_PERM_READ; i <= GRST_PERM_ADMIN; ++i) - if ((entry->allowed) & i) GRSTgaclPermPrint(i, fp); - - fputs("\n", fp); - } - - - if (entry->denied) - { - fputs("", fp); - - for (i=GRST_PERM_READ; i <= GRST_PERM_ADMIN; ++i) - if (entry->denied & i) GRSTgaclPermPrint(i, fp); - - fputs("\n", fp); - } - - fputs("\n", fp); - - return 1; -} - -/* * - * Functions to manipulate GRSTgaclPerm items * - * */ - -int GRSTgaclPermPrint(GRSTgaclPerm perm, FILE *fp) -{ - GRSTgaclPerm i; - - for (i=GRST_PERM_READ; grst_perm_syms[i] != NULL; ++i) - if (perm == grst_perm_vals[i]) - { - fprintf(fp, "<%s/>", grst_perm_syms[i]); - return 1; - } - - return 0; -} - -int GRSTgaclEntryAllowPerm(GRSTgaclEntry *entry, GRSTgaclPerm perm) -{ - entry->allowed = entry->allowed | perm; - - return 1; -} - -int GRSTgaclEntryUnallowPerm(GRSTgaclEntry *entry, GRSTgaclPerm perm) -{ - entry->allowed = entry->allowed & ~perm; - - return 1; -} - -int GRSTgaclEntryDenyPerm(GRSTgaclEntry *entry, GRSTgaclPerm perm) -{ - entry->denied = entry->denied | perm; - - return 1; -} - -int GRSTgaclEntryUndenyPerm(GRSTgaclEntry *entry, GRSTgaclPerm perm) -{ - entry->denied = entry->denied & ~perm; - - return 1; -} - -char *GRSTgaclPermToChar(GRSTgaclPerm perm) -/* - GRSTgaclPermToChar - return char * or NULL corresponding to most significant - set bit of perm. -*/ -{ - char *p = NULL; - GRSTgaclPerm i; - - for (i=0; grst_perm_syms[i] != NULL; ++i) - if (perm & grst_perm_vals[i]) p = grst_perm_syms[i]; - - return p; -} - -GRSTgaclPerm GRSTgaclPermFromChar(char *s) -/* - GRSTgaclPermToChar - return access perm corresponding to symbol s[] -*/ -{ - GRSTgaclPerm i; - - for (i=0; grst_perm_syms[i] != NULL; ++i) - if (strcasecmp(grst_perm_syms[i], s) == 0) return grst_perm_vals[i]; - - return -1; -} - -/* * - * Functions to manipulate GRSTgaclAcl structures * - * */ - -GRSTgaclAcl *GRSTgaclAclNew(void) -/* - GRSTgaclAclNew - allocate a new acl and return its pointer (or NULL - on failure.) -*/ -{ - GRSTgaclAcl *newacl; - - newacl = (GRSTgaclAcl *) malloc(sizeof(GRSTgaclAcl)); - if (newacl == NULL) return NULL; - - newacl->firstentry = NULL; - - return newacl; -} - -int GRSTgaclAclFree(GRSTgaclAcl *acl) -/* - GRSTgaclAclFree - free up space used by *acl. Always returns 1. -*/ -{ - if (acl == NULL) return 1; - - GRSTgaclEntriesFree(acl->firstentry); - - return 1; -} - -int GRSTgaclAclPrint(GRSTgaclAcl *acl, FILE *fp) -{ - GRSTgaclEntry *entry; - - fputs("\n", fp); - - for (entry = acl->firstentry; entry != NULL; entry = entry->next) - GRSTgaclEntryPrint(entry, fp); - - fputs("\n", fp); - - return 1; -} - -int GRSTgaclAclSave(GRSTgaclAcl *acl, char *filename) -{ - int ret; - FILE *fp; - - fp = fopen(filename, "w"); - if (fp == NULL) return 0; - - fputs("\n", fp); - - ret = GRSTgaclAclPrint(acl, fp); - - fclose(fp); - - return ret; -} - -/* * - * Functions for loading and parsing XML using libxml * - * */ - -// need to check these for libxml memory leaks? - what needs to be freed? - -static GRSTgaclCred *GRSTgaclCredParse(xmlNodePtr cur) -/* - GRSTgaclCredParse - parse a credential stored in the libxml structure cur, - returning it as a pointer or NULL on error. -*/ -{ - xmlNodePtr cur2; - GRSTgaclCred *cred = NULL; - - /* generic AURI creds first */ - - if (strcmp((char *) cur->name, "cred") == 0) - { - for (cur2 = cur->xmlChildrenNode; cur2 != NULL; cur2=cur2->next) - { - if (!xmlIsBlankNode(cur2) && - (strcmp((char *) cur2->name, "auri") == 0)) - { - if (cred != NULL) /* multiple AURI */ - { - GRSTgaclCredFree(cred); - cred = NULL; - return NULL; - } - - cred = GRSTgaclCredCreate((char *) xmlNodeGetContent(cur2),NULL); - } - } - - if (cred == NULL) return NULL; - - for (cur2 = cur->xmlChildrenNode; cur2 != NULL; cur2=cur2->next) - { - if (xmlIsBlankNode(cur2)) continue; - - if (strcmp((char *) cur2->name, "nist-loa") == 0) - { - cred->nist_loa = atoi((char *) xmlNodeGetContent(cur2)); - } - else if (strcmp((char *) cur2->name, "delegation") == 0) - { - cred->delegation = atoi((char *) xmlNodeGetContent(cur2)); - } - } - - return cred; - } - - /* backwards compatibility */ - - cred = GRSTgaclCredNew((char *) cur->name); - - for (cur2 = cur->xmlChildrenNode; cur2 != NULL; cur2=cur2->next) - { - if (!xmlIsBlankNode(cur2)) - GRSTgaclCredAddValue(cred, (char *) cur2->name, - (char *) xmlNodeGetContent(cur2)); - } - - return cred; -} - -static GRSTgaclEntry *GRSTgaclEntryParse(xmlNodePtr cur) -/* - GRSTgaclEntryParse - parse an entry stored in the libxml structure cur, - returning it as a pointer or NULL on error. -*/ -{ - int i; - xmlNodePtr cur2; - GRSTgaclEntry *entry; - GRSTgaclCred *cred; - GRSTgaclPerm perm; - - if (xmlStrcmp(cur->name, (const xmlChar *) "entry") != 0) return NULL; - - cur = cur->xmlChildrenNode; - - entry = GRSTgaclEntryNew(); - - while (cur != NULL) - { - if (xmlIsBlankNode(cur)) - { - cur=cur->next; - continue; - } - else if (xmlStrcmp(cur->name, (const xmlChar *) "allow") == 0) - { - for (cur2 = cur->xmlChildrenNode; cur2 != NULL; cur2=cur2->next) - if (!xmlIsBlankNode(cur2)) - { - for (i=0; grst_perm_syms[i] != NULL; ++i) - if (xmlStrcmp(cur2->name, - (const xmlChar *) grst_perm_syms[i]) == 0) - GRSTgaclEntryAllowPerm(entry, grst_perm_vals[i]); - } - } - else if (xmlStrcmp(cur->name, (const xmlChar *) "deny") == 0) - { - for (cur2 = cur->xmlChildrenNode; cur2 != NULL; cur2=cur2->next) - if (!xmlIsBlankNode(cur2)) - { - for (i=0; grst_perm_syms[i] != NULL; ++i) - if (xmlStrcmp(cur2->name, - (const xmlChar *) grst_perm_syms[i]) == 0) - GRSTgaclEntryDenyPerm(entry, grst_perm_vals[i]); - } - } - else if ((cred = GRSTgaclCredParse(cur)) != NULL) - { - if (!GRSTgaclEntryAddCred(entry, cred)) - { - GRSTgaclCredFree(cred); - GRSTgaclEntryFree(entry); - return NULL; - } - } - else /* I cannot parse this - give up rather than get it wrong */ - { - GRSTgaclEntryFree(entry); - return NULL; - } - - cur=cur->next; - } - - return entry; -} - -GRSTgaclAcl *GRSTgaclAclLoadFile(char *filename) -{ - xmlDocPtr doc; - xmlNodePtr cur; - GRSTgaclAcl *acl; - - GRSTerrorLog(GRST_LOG_DEBUG, "GRSTgaclAclLoadFile() starting"); - - if (filename == NULL) - { - GRSTerrorLog(GRST_LOG_DEBUG, "GRSTgaclAclLoadFile() cannot open a NULL filename"); - return NULL; - } - - doc = xmlParseFile(filename); - if (doc == NULL) - { - GRSTerrorLog(GRST_LOG_DEBUG, "GRSTgaclAclLoadFile failed to open ACL file %s", filename); - return NULL; - } - - cur = xmlDocGetRootElement(doc); - if (cur == NULL) - { - xmlFreeDoc(doc); - GRSTerrorLog(GRST_LOG_DEBUG, "GRSTgaclAclLoadFile failed to parse root of ACL file %s", filename); - return NULL; - } - - if (!xmlStrcmp(cur->name, (const xmlChar *) "Policy")) - { - GRSTerrorLog(GRST_LOG_DEBUG, "GRSTgaclAclLoadFile parsing XACML"); - acl=GRSTxacmlAclParse(doc, cur, acl); - } - else if (!xmlStrcmp(cur->name, (const xmlChar *) "gacl")) - { - GRSTerrorLog(GRST_LOG_DEBUG, "GRSTgaclAclLoadFile parsing GACL"); - acl=GRSTgaclAclParse(doc, cur, acl); - } - else /* ACL format not recognised */ - { - xmlFreeDoc(doc); - return NULL; - } - - xmlFreeDoc(doc); - return acl; -} - -GRSTgaclAcl *GRSTgaclAclParse(xmlDocPtr doc, xmlNodePtr cur, GRSTgaclAcl *acl) -{ - GRSTgaclEntry *entry; - - cur = cur->xmlChildrenNode; - - acl = GRSTgaclAclNew(); - - while (cur != NULL) - { - if (!xmlIsBlankNode(cur)) - { - entry = GRSTgaclEntryParse(cur); - if (entry == NULL) - { - GRSTgaclAclFree(acl); - - return NULL; - } - - GRSTgaclAclAddEntry(acl, entry); - } - - cur=cur->next; - } - - return acl; -} -int GRSTgaclFileIsAcl(char *pathandfile) -/* Return 1 if filename in *pathandfile starts GRST_ACL_FILE - Return 0 otherwise. */ -{ - char *filename; - - filename = rindex(pathandfile, '/'); - if (filename == NULL) filename = pathandfile; - else filename++; - - return (strncmp(filename, GRST_ACL_FILE, sizeof(GRST_ACL_FILE) - 1) == 0); -} - -char *GRSTgaclFileFindAclname(char *pathandfile) -/* Return malloc()ed ACL filename that governs the given file or directory - (for directories, the ACL file is in the directory itself), or NULL if none - can be found. */ -{ - int len; - char *path, *file, *p; - struct stat statbuf; - - len = strlen(pathandfile); - if (len == 0) return NULL; - - path = malloc(len + sizeof(GRST_ACL_FILE) + 2); - strcpy(path, pathandfile); - - if ((stat(path, &statbuf) == 0) && - S_ISDIR(statbuf.st_mode) && - (path[len-1] != '/')) - { - strcat(path, "/"); - ++len; - } - - if (path[len-1] != '/') - { - p = rindex(pathandfile, '/'); - if (p != NULL) - { - file = &p[1]; - p = rindex(path, '/'); - sprintf(p, "/%s:%s", GRST_ACL_FILE, file); - - if (stat(path, &statbuf) == 0) return path; - - *p = '\0'; /* otherwise strip off any filename */ - } - } - - while (path[0] != '\0') - { - strcat(path, "/"); - strcat(path, GRST_ACL_FILE); - - if (stat(path, &statbuf) == 0) return path; - - p = rindex(path, '/'); - *p = '\0'; /* strip off the / we added for ACL */ - - p = rindex(path, '/'); - if (p == NULL) break; /* must start without / and we there now ??? */ - - *p = '\0'; /* strip off another layer of / */ - } - - free(path); - return NULL; -} - -GRSTgaclAcl *GRSTgaclAclLoadforFile(char *pathandfile) -/* Return ACL that governs the given file or directory (for directories, - the ACL file is in the directory itself.) */ -{ - char *path; - GRSTgaclAcl *acl; - - path = GRSTgaclFileFindAclname(pathandfile); - - if (path != NULL) - { - acl = GRSTgaclAclLoadFile(path); - free(path); - return acl; - } - - return NULL; -} - -/* * - * Functions to create and query GACLuser * - * */ - -GRSTgaclUser *GRSTgaclUserNew(GRSTgaclCred *cred) -{ - GRSTgaclUser *user; - - if (cred == NULL) return NULL; - - user = malloc(sizeof(GRSTgaclUser)); - - if (user != NULL) - { - user->firstcred = cred; - user->dnlists = NULL; - } - - return user; -} - -int GRSTgaclUserFree(GRSTgaclUser *user) -{ - if (user == NULL) return 1; - - if (user->firstcred != NULL) GRSTgaclCredsFree(user->firstcred); - - if (user->dnlists != NULL) free(user->dnlists); - - free(user); - - return 1; -} - -int GRSTgaclUserAddCred(GRSTgaclUser *user, GRSTgaclCred *cred) -{ - GRSTgaclCred *crediter; - - if ((user == NULL) || (cred == NULL)) return 0; - - if (user->firstcred == NULL) - { - user->firstcred = cred; - cred->next = NULL; /* so cannot be used to add whole lists */ - return 1; - } - - crediter = user->firstcred; - - while (crediter->next != NULL) crediter = crediter->next; - - crediter->next = cred; - cred->next = NULL; /* so cannot be used to add whole lists */ - - return 1; -} - -int GRSTgaclUserHasCred(GRSTgaclUser *user, GRSTgaclCred *cred) -/* test if the user has the given credential */ -{ - int nist_loa = 999; - GRSTgaclCred *crediter; - - if ((cred == NULL) || (cred->auri == NULL)) return 0; - - if (strcmp(cred->auri, "any-user:") == 0) return 1; - - if ((user == NULL) || (user->firstcred == NULL)) return 0; - - if (strncmp(cred->auri, "dns:", 4) == 0) - { - for (crediter=user->firstcred; - crediter != NULL; - crediter = crediter->next) - if ((crediter->auri != NULL) && - (strncmp(crediter->auri, "dns:", 4) == 0)) - return (fnmatch(cred->auri, crediter->auri, FNM_CASEFOLD) == 0); - - return 0; - } - - if (strcmp(cred->auri, "gacl:auth-user") == 0) - { - for (crediter=user->firstcred; - crediter != NULL; - crediter = crediter->next) - if ((crediter->auri != NULL) && - (strncmp(crediter->auri, "dn:", 3) == 0)) return 1; - - return 0; - } - - if (sscanf(cred->auri, "nist-loa:%d", &nist_loa) == 1) - { - for (crediter=user->firstcred; - crediter != NULL; - crediter = crediter->next) - if ((crediter->auri != NULL) && - (strncmp(crediter->auri, "dn:", 3) == 0) && - (crediter->nist_loa >= nist_loa)) return 1; - - return 0; - } - -// can remove this once we preload DN Lists etc as AURIs? - if ((strncmp(cred->auri, "http:", 5) == 0) || - (strncmp(cred->auri, "https:", 6) == 0)) - { - return GRSTgaclDNlistHasUser(cred->auri, user); - } - - /* generic AURI = AURI test */ - - for (crediter=user->firstcred; crediter != NULL; crediter = crediter->next) - if ((crediter->auri != NULL) && - (strcmp(crediter->auri, cred->auri) == 0)) return 1; - - return 0; -} - -GRSTgaclCred *GRSTgaclUserFindCredtype(GRSTgaclUser *user, char *type) -/* find the first credential of a given type for this user */ -{ - GRSTgaclCred *cred; - - if (user == NULL) return NULL; - - cred = user->firstcred; - - while (cred != NULL) - { - if ((strcmp(type, "person") == 0) && - (strncmp(cred->auri, "dn:", 3) == 0)) return cred; - - if ((strcmp(type, "voms") == 0) && - (strncmp(cred->auri, "fqan:", 5) == 0)) return cred; - - if ((strcmp(type, "dns") == 0) && - (strncmp(cred->auri, "dns:", 4) == 0)) return cred; - - if ((strcmp(type, "dn-list") == 0) && - ((strncmp(cred->auri, "http:", 5) == 0) || - (strncmp(cred->auri, "https:", 6) == 0))) return cred; - - cred = cred->next; - } - - return NULL; -} - -int GRSTgaclUserSetDNlists(GRSTgaclUser *user, char *dnlists) -{ - if (user->dnlists != NULL) free(user->dnlists); - - if (dnlists == NULL) user->dnlists = NULL; - else user->dnlists = strdup(dnlists); - - return GRSTgaclUserLoadDNlists(user, dnlists); -} - -static void recurse4dnlists(GRSTgaclUser *user, char *dir, - int recurse_level, GRSTgaclCred *dn_cred) -/* try to find file[] in dir[]. try subdirs if not found. - return full path to first found version or NULL on failure */ -{ - int fd, linestart, i; - char *fullfilename, *mapped, *q, *s; - size_t dn_len; - struct stat statbuf; - DIR *dirDIR; - struct dirent *file_ent; - GRSTgaclCred *cred; - - if (recurse_level >= GRST_RECURS_LIMIT) return; - - dn_len = strlen(dn_cred->auri) - 3; - - /* search this directory */ - - dirDIR = opendir(dir); - - if (dirDIR == NULL) return; - - while ((file_ent = readdir(dirDIR)) != NULL) - { - if (file_ent->d_name[0] == '.') continue; - - asprintf(&fullfilename, "%s/%s", dir, file_ent->d_name); - - GRSTerrorLog(GRST_LOG_DEBUG, "recurse4dnlists opens %s", fullfilename); - - if ((fd = open(fullfilename, O_RDONLY)) < 0) - ; - else if (fstat(fd, &statbuf) != 0) - ; - else if (S_ISDIR(statbuf.st_mode)) - recurse4dnlists(user, fullfilename, recurse_level + 1, dn_cred); - else if ((S_ISREG(statbuf.st_mode) || S_ISLNK(statbuf.st_mode)) && - ((mapped = mmap(NULL, statbuf.st_size, - PROT_READ, MAP_PRIVATE, fd, 0)) != MAP_FAILED)) - { - linestart = 0; - - while (linestart + dn_len <= statbuf.st_size) - { - GRSTerrorLog(GRST_LOG_DEBUG, "recurse4dnlists at %ld in %s", - linestart, fullfilename); - - for (i=0; - (linestart + i < statbuf.st_size) && (i < dn_len); - ++i) - if (mapped[linestart + i] != dn_cred->auri[3+i]) break; - - GRSTerrorLog(GRST_LOG_DEBUG, "recurse4dnlists at %d %d %d %d", - linestart, i, dn_len, statbuf.st_size); - - if ((i == dn_len) && - ((linestart+i == statbuf.st_size) || - (mapped[linestart+i] == '\n') || - (mapped[linestart+i] == '\r'))) /* matched */ - { - s = GRSThttpUrlDecode(file_ent->d_name); - cred = GRSTgaclCredCreate(s, NULL); - GRSTerrorLog(GRST_LOG_DEBUG, - "recurse4dnlists adds %s", s); - free(s); - - GRSTgaclCredSetNotBefore(cred, dn_cred->notbefore); - GRSTgaclCredSetNotAfter(cred, dn_cred->notafter); - GRSTgaclCredSetDelegation(cred, dn_cred->delegation); - GRSTgaclCredSetNistLoa(cred, dn_cred->nist_loa); - - GRSTgaclUserAddCred(user, cred); - break; - } - - linestart += i; - - while ((linestart < statbuf.st_size) && - (mapped[linestart] != '\n') && - (mapped[linestart] != '\r')) ++linestart; - - while ((linestart < statbuf.st_size) && - ((mapped[linestart] == '\n') || - (mapped[linestart] == '\r'))) ++linestart; - } - - munmap(mapped, statbuf.st_size); - } - - if (fd < 0) close(fd); - free(fullfilename); - } - - closedir(dirDIR); -} - -int GRSTgaclUserLoadDNlists(GRSTgaclUser *user, char *dnlists) -/* - Examine DN Lists for attributes belonging to this user and - add them to *user as additional credentials. -*/ -{ - char *dn_lists_dirs, *dn_list_ptr, *filename, *dirname, *dn = NULL; - GRSTgaclCred *dn_cred; - - /* check for DN Lists */ - - if (dnlists == NULL) dnlists = getenv("GRST_DN_LISTS"); - - if (dnlists == NULL) dnlists = GRST_DN_LISTS; - - if (*dnlists == '\0') return 1; /* Didn't ask for anything: that's ok */ - - /* find this user's (first) DN */ - - if (user == NULL) return 1; /* No user! */ - - for (dn_cred = user->firstcred; dn_cred != NULL; dn_cred = dn_cred->next) - { - if (strncmp(dn_cred->auri, "dn:", 3) == 0) break; - } - - if (dn_cred == NULL) return 1; /* User has no DN! */ - - /* look through DN List files */ - - dn_lists_dirs = strdup(dnlists); /* we need to keep this for free() later! */ - dn_list_ptr = dn_lists_dirs; /* copy, for naughty function strsep() */ - - while ((dirname = strsep(&dn_list_ptr, ":")) != NULL) - { - recurse4dnlists(user, dirname, 0, dn_cred); - } - - free(dn_lists_dirs); - return 1; -} - -/* * - * Functions to test for access perm of an individual * - * */ - -static char *recurse4file(char *dir, char *file, int recurse_level) -/* try to find file[] in dir[]. try subdirs if not found. - return full path to first found version or NULL on failure */ -{ - char *fullfilename, *fulldirname; - struct stat statbuf; - DIR *dirDIR; - struct dirent *file_ent; - - /* try to find in current directory */ - - asprintf(&fullfilename, "%s/%s", dir, file); - if (stat(fullfilename, &statbuf) == 0) return fullfilename; - free(fullfilename); - - /* maybe search in subdirectories */ - - if (recurse_level >= GRST_RECURS_LIMIT) return NULL; - - dirDIR = opendir(dir); - - if (dirDIR == NULL) return NULL; - - while ((file_ent = readdir(dirDIR)) != NULL) - { - if (file_ent->d_name[0] == '.') continue; - - asprintf(&fulldirname, "%s/%s", dir, file_ent->d_name); - - if ((stat(fulldirname, &statbuf) == 0) && - S_ISDIR(statbuf.st_mode) && - ((fullfilename = recurse4file(fulldirname, file, - recurse_level + 1)) != NULL)) - { - closedir(dirDIR); - return fullfilename; - } - - free(fulldirname); - } - - closedir(dirDIR); - - return NULL; -} - -int GRSTgaclDNlistHasUser(char *listurl, GRSTgaclUser *user) -{ - char *dn_lists_dirs, *dn_list_ptr, *enclisturl, *filename, *dirname, - line[512], *p; - FILE *fp; - GRSTgaclCred *cred; - - if ((listurl == NULL) || (user == NULL)) return 0; - - enclisturl = GRSThttpUrlEncode(listurl); - - if (user->dnlists != NULL) p = user->dnlists; - else p = getenv("GRST_DN_LISTS"); - - if (p == NULL) p = GRST_DN_LISTS; - dn_lists_dirs = strdup(p); /* we need to keep this for free() later! */ - dn_list_ptr = dn_lists_dirs; /* copy, for naughty function strsep() */ - - while ((dirname = strsep(&dn_list_ptr, ":")) != NULL) - { - filename = recurse4file(dirname, enclisturl, 0); - if (filename == NULL) continue; - - fp = fopen(filename, "r"); - free(filename); - - if (fp == NULL) continue; - - while (fgets(line, sizeof(line), fp) != NULL) - { - p = index(line, '\n'); - if (p != NULL) *p = '\0'; - - cred = user->firstcred; - - while (cred != NULL) - { - if ((strncmp(cred->auri, "dn:", 3) == 0) && - (GRSTx509NameCmp(line, &(cred->auri[3])) == 0)) - { - fclose(fp); - free(dn_lists_dirs); - free(enclisturl); - return 1; - } - - cred = cred->next; - } - } - - fclose(fp); - } - - free(dn_lists_dirs); - free(enclisturl); - - return 0; -} - -GRSTgaclPerm GRSTgaclAclTestUser(GRSTgaclAcl *acl, GRSTgaclUser *user) -/* - GACLgaclAclTestUser - return bit fields depending on access perms user has - for given acl. All zero for no access. If *user is - NULL, matching to "any-user" will still work. -*/ -{ - int flag, onlyanyuser; - GRSTgaclPerm allowperms = 0, denyperms = 0, allowed; - GRSTgaclEntry *entry; - GRSTgaclCred *cred, *usercred; - - if (acl == NULL) return 0; - - for (entry = acl->firstentry; entry != NULL; entry = entry->next) - { - flag = 1; /* begin by assuming this entry applies to us */ - onlyanyuser = 1; /* begin by assuming just */ - - /* now go through creds, checking they all do apply to us */ - - for (cred = entry->firstcred; cred != NULL; cred = cred->next) - if (!GRSTgaclUserHasCred(user, cred)) flag = 0; - else if (strcmp(cred->auri, "any-user:") != 0) onlyanyuser = 0; - - if (!flag) continue; /* flag false if a subtest failed */ - - /* does apply to us, so we remember this entry's perms */ - - /* we dont allow Write or Admin on the basis of any-user alone */ - - allowed = entry->allowed; - - if (onlyanyuser) - allowed = entry->allowed & ~GRST_PERM_WRITE & ~GRST_PERM_ADMIN; - else allowed = entry->allowed; - - allowperms = allowperms | allowed; - denyperms = denyperms | entry->denied; - } - - return (allowperms & (~ denyperms)); - /* for each perm type, any deny we saw kills any allow */ -} - -GRSTgaclPerm GRSTgaclAclTestexclUser(GRSTgaclAcl *acl, GRSTgaclUser *user) -/* - GRSTgaclAclTestexclUser - - return bit fields depending on ALLOW perms OTHER users - have for given acl. All zero if they have no access. - (used for testing if a user has exclusive access) -*/ -{ - int flag; - GRSTgaclPerm perm = 0; - GRSTgaclEntry *entry; - GRSTgaclCred *cred; - - if (acl == NULL) return 0; - - for (entry = acl->firstentry; entry != NULL; entry = entry->next) - { - flag = 0; /* flag will be set if cred implies other users */ - - for (cred = entry->firstcred; cred != NULL; cred = cred->next) - { - if (strncmp(cred->auri, "dn:", 3) != 0) - /* if we ever add support for other person-specific credentials, - they must also be recognised here */ - { - flag = 1; - break; - } - - if (!GRSTgaclUserHasCred(user, cred)) - /* if user doesnt have this person credential, assume - it refers to a different individual */ - { - flag = 1; - break; - } - } - - if (flag) perm = perm | entry->allowed; - } - - return perm; -} - -/* - Wrapper functions for gridsite-gacl.h support of legacy API -*/ - -GRSTgaclEntry *GACLparseEntry(xmlNodePtr cur) -{ - return GRSTgaclEntryParse(cur); -} diff --git a/org.gridsite.core/src/grst_htcp.c b/org.gridsite.core/src/grst_htcp.c deleted file mode 100644 index ec9672a..0000000 --- a/org.gridsite.core/src/grst_htcp.c +++ /dev/null @@ -1,311 +0,0 @@ -/* - Copyright (c) 2002-5, Andrew McNab, University of Manchester - All rights reserved. - - Redistribution and use in source and binary forms, with or - without modification, are permitted provided that the following - conditions are met: - - o Redistributions of source code must retain the above - copyright notice, this list of conditions and the following - disclaimer. - o Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following - disclaimer in the documentation and/or other materials - provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND - CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS - BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED - TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - POSSIBILITY OF SUCH DAMAGE. -*/ - -#ifndef VERSION -#define VERSION "x.x.x" -#endif - -#define _GNU_SOURCE -#include - -#include -#include -#include -#include -#include - -#include "gridsite.h" - -int GRSThtcpNOPrequestMake(char **request, int *request_length, - unsigned int trans_id) -/* - Make a complete HTCP NOP request and return a pointer to malloc'd - memory pointing to it. -*/ -{ - *request_length = - asprintf(request,"%c%c" /* place holder for total length */ - "%c%c" /* HTCP version 0.0 */ - "%c%c" /* DATA length place holder */ - "%c%c" /* OPCODE,RESPONSE,RESERVED,F1,RR */ - "%c%c%c%c" /* TRANS-ID placeholder */ - "%c%c", /* AUTH (LENGTH=2 means no AUTH) */ - 0, 0, - 0, 0, - 0, 0, - GRSThtcpNOPop * 16, 2, - 0, 0, 0, 0, - 0, 2); - - if (*request_length < 0) return GRST_RET_FAILED; - - (*request)[0] = *request_length / 256; - (*request)[1] = *request_length % 256; - - (*request)[4] = (*request_length - 6) / 256; - (*request)[5] = (*request_length - 6) % 256; - - memcpy(&((*request)[8]), &trans_id, 4); - - return GRST_RET_OK; -} - -int GRSThtcpNOPresponseMake(char **message, int *message_length, - unsigned int trans_id) -/* - Make a complete HTCP NOP response for a found file and return a pointer - to malloc'd memory pointing to it. -*/ -{ - *message_length = - asprintf(message, - "%c%c" /* place holder for total length */ - "%c%c" /* HTCP version 0.0 */ - "%c%c" /* DATA length place holder */ - "%c%c" /* OPCODE,RESPONSE,RESERVED,F1,RR */ - "%c%c%c%c" /* TRANS-ID place holder */ - "%c%c", /* AUTH (LENGTH=2 means no AUTH) */ - 0, 0, - 0, 0, - 0, 0, - GRSThtcpNOPop * 16, 1, /* RR=1, MO=0, RESPONSE=0 (ie found) */ - 0, 0, 0, 0, - 0, 2); - - if (*message_length < 0) return GRST_RET_FAILED; - - (*message)[0] = *message_length / 256; - (*message)[1] = *message_length % 256; - - (*message)[4] = (*message_length - 6) / 256; - (*message)[5] = (*message_length - 6) % 256; - - memcpy(&((*message)[8]), &trans_id, 4); - - return GRST_RET_OK; -} - -int GRSThtcpTSTrequestMake(char **request, int *request_length, - unsigned int trans_id, - char *method, char *uri, char *req_hdrs) -/* - Make a complete HTCP TST request and return a pointer to malloc'd - memory pointing to it. -*/ -{ - if ((method == NULL) || (uri == NULL) || (req_hdrs == NULL)) - return GRST_RET_FAILED; - - *request_length = - asprintf(request,"%c%c" /* place holder for total length */ - "%c%c" /* HTCP version 0.0 */ - "%c%c" /* DATA length place holder */ - "%c%c" /* OPCODE,RESPONSE,RESERVED,F1,RR */ - "%c%c%c%c" /* TRANS-ID placeholder */ - "%c%c%s" /* OP-DATA: METHOD */ - "%c%c%s" /* OP-DATA: URI */ - "%c%c%s" /* OP-DATA: VERSION */ - "%c%c%s" /* OP-DATA: REQ-HDRS */ - "%c%c", /* AUTH (LENGTH=2 means no AUTH) */ - 0, 0, - 0, 0, - 0, 0, - GRSThtcpTSTop * 16, 2, - 0, 0, 0, 0, - strlen(method) / 256, strlen(method) % 256, method, - strlen(uri) / 256, strlen(uri) % 256, uri, - 0, 8, "HTTP/1.1", - strlen(req_hdrs)/256, strlen(req_hdrs) % 256, req_hdrs, - 0, 2); - - if (*request_length < 0) return GRST_RET_FAILED; - - (*request)[0] = *request_length / 256; - (*request)[1] = *request_length % 256; - - (*request)[4] = (*request_length - 6) / 256; - (*request)[5] = (*request_length - 6) % 256; - - memcpy(&((*request)[8]), &trans_id, 4); - - return GRST_RET_OK; -} - -int GRSThtcpTSTresponseMake(char **message, int *message_length, - unsigned int trans_id, - char *resp_hdrs, char *entity_hdrs, - char *cache_hdrs) -/* - Make a complete HTCP TST response for a found file and return a pointer - to malloc'd memory pointing to it. -*/ -{ - if ((resp_hdrs != NULL) && (entity_hdrs != NULL) && (cache_hdrs != NULL)) - /* found file response */ - *message_length = - asprintf(message, - "%c%c" /* place holder for total length */ - "%c%c" /* HTCP version 0.0 */ - "%c%c" /* DATA length place holder */ - "%c%c" /* OPCODE,RESPONSE,RESERVED,F1,RR */ - "%c%c%c%c" /* TRANS-ID place holder */ - "%c%c%s" /* OP-DATA: RESP-HDRS */ - "%c%c%s" /* OP-DATA: ENTITY-HDRS */ - "%c%c%s" /* OP-DATA: CACHE-HDRS */ - "%c%c", /* AUTH (LENGTH=2 means no AUTH) */ - 0, 0, - 0, 0, - 0, 0, - GRSThtcpTSTop * 16, 1, /* RR=1, MO=0, RESPONSE=0 (ie found) */ - 0, 0, 0, 0, - strlen(resp_hdrs) / 256, strlen(resp_hdrs) % 256, resp_hdrs, - strlen(entity_hdrs) / 256, strlen(entity_hdrs) % 256, entity_hdrs, - strlen(cache_hdrs) / 256, strlen(cache_hdrs) % 256, cache_hdrs, - 0, 2); - else if (cache_hdrs != NULL) - /* not found file response, just cache_hdrs given */ - *message_length = - asprintf(message, - "%c%c" /* place holder for total length */ - "%c%c" /* HTCP version 0.0 */ - "%c%c" /* DATA length place holder */ - "%c%c" /* OPCODE,RESPONSE,RESERVED,F1,RR */ - "%c%c%c%c" /* TRANS-ID */ - "%c%c%s" /* OP-DATA: CACHE-HDRS */ - "%c%c", /* AUTH (LENGTH=2 means no AUTH) */ - 0, 0, - 0, 0, - 0, 0, - GRSThtcpTSTop * 16 + 1, 1, /* RR=1, MO=0, RESPONSE=1 (missing) */ - 0, 0, 0, 0, - strlen(cache_hdrs) / 256, strlen(cache_hdrs) % 256, cache_hdrs, - 0, 2); - else return GRST_RET_FAILED; - - if (*message_length < 0) return GRST_RET_FAILED; - - (*message)[0] = *message_length / 256; - (*message)[1] = *message_length % 256; - - (*message)[4] = (*message_length - 6) / 256; - (*message)[5] = (*message_length - 6) % 256; - - memcpy(&((*message)[8]), &trans_id, 4); - - return GRST_RET_OK; -} - -int GRSThtcpMessageParse(GRSThtcpMessage *parsed, char *raw, int length) -{ - GRSThtcpCountstr *s; - - bzero(parsed, sizeof(GRSThtcpMessage)); - - if (length < (void *) &(parsed->method) - - (void *) &(parsed->total_length_msb) + 2) - return GRST_RET_FAILED; - - memcpy(parsed, raw, (void *) &(parsed->method) - - (void *) &(parsed->total_length_msb)); - - if (parsed->opcode == GRSThtcpNOPop) return GRST_RET_OK; - - if ((parsed->opcode == GRSThtcpTSTop) && (parsed->rr == 0)) - { - /* a TST request */ - - /* point to start of data/auth in raw */ - s = (GRSThtcpCountstr *) &(((GRSThtcpMessage *) raw)->method); - - /* METHOD string */ - - if ((void *) s + 2 + GRSThtcpCountstrLen(s) > (void *) raw + length) - return GRST_RET_FAILED; - parsed->method = s; - s = (GRSThtcpCountstr *) ((void *) s + 2 + GRSThtcpCountstrLen(s)); - - /* URI string */ - - if ((void *) s + 2 + GRSThtcpCountstrLen(s) > (void *) raw + length) - return GRST_RET_FAILED; - parsed->uri = s; - s = (GRSThtcpCountstr *) ((void *) s + 2 + GRSThtcpCountstrLen(s)); - - /* VERSION string */ - - if ((void *) s + 2 + GRSThtcpCountstrLen(s) > (void *) raw + length) - return GRST_RET_FAILED; - parsed->version = s; - s = (GRSThtcpCountstr *) ((void *) s + 2 + GRSThtcpCountstrLen(s)); - - /* REQ-HDRS string */ - - if ((void *) s + 2 + GRSThtcpCountstrLen(s) > (void *) raw + length) - return GRST_RET_FAILED; - parsed->req_hdrs = s; - s = (GRSThtcpCountstr *) ((void *) s + 2 + GRSThtcpCountstrLen(s)); - - return GRST_RET_OK; - } - - if ((parsed->opcode == GRSThtcpTSTop) && (parsed->rr == 1)) - { - /* a TST response */ - - /* point to start of data/auth in raw */ - s = (GRSThtcpCountstr *) &(((GRSThtcpMessage *) raw)->method); - - /* RESP-HDRS string */ - - if ((void *) s + 2 + GRSThtcpCountstrLen(s) > (void *) raw + length) - return GRST_RET_FAILED; - parsed->resp_hdrs = s; - s = (GRSThtcpCountstr *) ((void *) s + 2 + GRSThtcpCountstrLen(s)); - - /* ENTITY-HDRS string */ - - if ((void *) s + 2 + GRSThtcpCountstrLen(s) > (void *) raw + length) - return GRST_RET_FAILED; - parsed->entity_hdrs = s; - s = (GRSThtcpCountstr *) ((void *) s + 2 + GRSThtcpCountstrLen(s)); - - /* CACHE-HDRS string */ - - if ((void *) s + 2 + GRSThtcpCountstrLen(s) > (void *) raw + length) - return GRST_RET_FAILED; - parsed->cache_hdrs = s; - s = (GRSThtcpCountstr *) ((void *) s + 2 + GRSThtcpCountstrLen(s)); - - return GRST_RET_OK; - } - - return GRST_RET_FAILED; -} diff --git a/org.gridsite.core/src/grst_http.c b/org.gridsite.core/src/grst_http.c deleted file mode 100644 index c933ca0..0000000 --- a/org.gridsite.core/src/grst_http.c +++ /dev/null @@ -1,443 +0,0 @@ -/* - Copyright (c) 2002-3, Andrew McNab, University of Manchester - All rights reserved. - - Redistribution and use in source and binary forms, with or - without modification, are permitted provided that the following - conditions are met: - - o Redistributions of source code must retain the above - copyright notice, this list of conditions and the following - disclaimer. - o Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following - disclaimer in the documentation and/or other materials - provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND - CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS - BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED - TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - POSSIBILITY OF SUCH DAMAGE. -*/ - -#ifndef VERSION -#define VERSION "x.x.x" -#endif - -#define _GNU_SOURCE -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "gridsite.h" - -void GRSThttpBodyInit(GRSThttpBody *thisbody) -{ - thisbody->size = 0; /* simple, but we don't expose internals to callers */ -} - -void GRSThttpPrintf(GRSThttpBody *thisbody, char *fmt, ...) -/* append printf() style format and arguments to *thisbody. - This requires vasprintf from glibc!! */ -{ - char *p; - size_t size; - va_list args; - - va_start(args, fmt); - size = vasprintf(&p, fmt, args); - va_end(args); - - if (size == 0) free(p); /* don't need to bother in this case */ - else if (size > 0) - { - if (thisbody->size == 0) /* need to initialise */ - { - thisbody->first = (GRSThttpCharsList *)malloc(sizeof(GRSThttpCharsList)); - thisbody->first->text = p; - thisbody->first->next = NULL; - - thisbody->last = thisbody->first; - thisbody->size = size; - } - else - { - thisbody->last->next = (GRSThttpCharsList *) - malloc(sizeof(GRSThttpCharsList)); - ((GRSThttpCharsList *) thisbody->last->next)->text = p; - ((GRSThttpCharsList *) thisbody->last->next)->next = NULL; - - thisbody->last = thisbody->last->next; - thisbody->size = thisbody->size + size; - } - } -} - -int GRSThttpCopy(GRSThttpBody *thisbody, char *file) -/* - copy a whole file, named file[], into the body output buffer, returning - 1 if file was found and copied ok, or 0 otherwise. -*/ -{ - int fd, len; - char c, *p; - struct stat statbuf; - - fd = open(file, O_RDONLY); - - if (fd == -1) return 0; - - if (fstat(fd, &statbuf) != 0) - { - close(fd); - return 0; - } - - p = malloc(statbuf.st_size + 1); - - if (p == NULL) - { - close(fd); - return 0; - } - - len = read(fd, p, statbuf.st_size); - p[len] = '\0'; - - close(fd); - - if (thisbody->size == 0) /* need to initialise */ - { - thisbody->first = (GRSThttpCharsList *) malloc(sizeof(GRSThttpCharsList)); - thisbody->first->text = p; - thisbody->first->next = NULL; - - thisbody->last = thisbody->first; - thisbody->size = len; - } - else - { - thisbody->last->next=(GRSThttpCharsList *)malloc(sizeof(GRSThttpCharsList)); - ((GRSThttpCharsList *) thisbody->last->next)->text = p; - ((GRSThttpCharsList *) thisbody->last->next)->next = NULL; - - thisbody->last = thisbody->last->next; - thisbody->size = thisbody->size + len; - } - - return 1; -} - -void GRSThttpWriteOut(GRSThttpBody *thisbody) -/* output Content-Length header, blank line then whole of the body to - standard output */ -{ - GRSThttpCharsList *p; - - printf("Content-Length: %d\n\n", thisbody->size); - - p = thisbody->first; - - while (p != NULL) - { - fputs(p->text, stdout); - - p = p->next; - } -} - -int GRSThttpPrintHeaderFooter(GRSThttpBody *bp, char *file, char *headfootname) -/* - try to print Header or Footer appropriate for absolute path file[], - returning 1 rather than 0 if found. -*/ -{ - int found = 0; - char *pathfile, *p; - struct stat statbuf; - - pathfile = malloc(strlen(file) + strlen(headfootname) + 2); - strcpy(pathfile, file); - - if ((pathfile[strlen(pathfile) - 1] != '/') && - (stat(pathfile, &statbuf) == 0) && - S_ISDIR(statbuf.st_mode)) strcat(pathfile, "/"); - - for (;;) - { - p = rindex(pathfile, '/'); - if (p == NULL) break; - p[1] = '\0'; - strcat(p, headfootname); - - if (stat(pathfile, &statbuf) == 0) - { - found = GRSThttpCopy(bp, pathfile); - break; - } - - p[0] = '\0'; - } - - free(pathfile); - return found; -} - -char *GRSThttpGetCGI(char *name) -/* - Return a malloc()ed copy of CGI form parameter identified by name[], - either received by QUERY_STRING (via GET) or on stdin (via POST). - Caller must free() the returned string itself. If name[] is not found, - an empty NUL-terminated malloc()ed string is returned. name[] has any - URL-encoding reversed. -*/ -{ - char *p, *namepattern, *valuestart, *returnvalue, *querystring; - int c, i, j, n, contentlength = 0; - static char *cgiposted = NULL; - size_t size_needed; - - if (cgiposted == NULL) /* have to initialise cgiposted */ - { - p = getenv("CONTENT_LENGTH"); - if (p != NULL) sscanf(p, "%d", &contentlength); - - querystring = getenv("REDIRECT_QUERY_STRING"); - if (querystring == NULL) querystring = getenv("QUERY_STRING"); - - if (querystring == NULL) cgiposted = malloc(contentlength + 3); - else cgiposted = malloc(contentlength + strlen(querystring) + 4); - - cgiposted[0] = '&'; - - for (i = 1; i <= contentlength; ++i) - { - c = getchar(); - if (c == EOF) break; - cgiposted[i] = c; - } - - cgiposted[i] = '&'; - cgiposted[i+1] = '\0'; - - if (querystring != NULL) - { - strcat(cgiposted, querystring); - strcat(cgiposted, "&"); - } - } - - namepattern = malloc(strlen(name) + 3); - sprintf(namepattern, "&%s=", name); - - p = strstr(cgiposted, namepattern); - free(namepattern); - if (p == NULL) return strdup(""); - - valuestart = &p[strlen(name) + 2]; - - for (n=0; valuestart[n] != '&'; ++n) ; - - returnvalue = malloc(n + 1); - - j=0; - - for (i=0; i < n; ++i) - { - if ((i < n - 2) && (valuestart[i] == '%')) /* url encoded as %HH */ - { - returnvalue[j] = 0; - - if (isdigit(valuestart[i+1])) - returnvalue[j] += 16 * (valuestart[i+1] - '0'); - else if (isalpha(valuestart[i+1])) - returnvalue[j] += 16 * (10 + tolower(valuestart[i+1]) - 'a'); - - if (isdigit(valuestart[i+2])) - returnvalue[j] += valuestart[i+2] - '0'; - else if (isalpha(valuestart[i+2])) - returnvalue[j] += 10 + tolower(valuestart[i+2]) - 'a'; - - i = i + 2; - } - else if (valuestart[i] == '+') returnvalue[j] = ' '; - else returnvalue[j] = valuestart[i]; - - if (returnvalue[j] == '\r') continue; /* CR/LF -> LF */ - ++j; - } - - returnvalue[j] = '\0'; - - return returnvalue; -} - -/* * - * Utility functions * - * */ - -char *GRSThttpUrlDecode(char *in) -{ - int i, j, n; - char *out; - - n = strlen(in); - out = malloc(n + 1); - - j=0; - - for (i=0; i < n; ++i) - { - if ((i < n - 2) && (in[i] == '%')) /* url encoded as %HH */ - { - out[j] = 0; - - if (isdigit(in[i+1])) - out[j] += 16 * (in[i+1] - '0'); - else if (isalpha(in[i+1])) - out[j] += 16 * (10 + tolower(in[i+1]) - 'a'); - - if (isdigit(in[i+2])) - out[j] += in[i+2] - '0'; - else if (isalpha(in[i+2])) - out[j] += 10 + tolower(in[i+2]) - 'a'; - - i = i + 2; - } - else if (in[i] == '+') out[j] = ' '; - else out[j] = in[i]; - - ++j; - } - - out[j] = '\0'; - - return out; -} - -char *GRSThttpUrlEncode(char *in) -/* Return a pointer to a malloc'd string holding a URL-encoded (RFC 1738) - version of *in. Only A-Z a-z 0-9 . _ - are passed through unmodified. - (DN's processed by GRSThttpUrlEncode can be used as valid Unix filenames, - assuming they do not exceed restrictions on filename length.) */ -{ - char *out, *p, *q; - - out = malloc(3*strlen(in) + 1); - - p = in; - q = out; - - while (*p != '\0') - { - if (isalnum(*p) || (*p == '.') || (*p == '_') || (*p == '-')) - { - *q = *p; - ++q; - } - else - { - sprintf(q, "%%%2X", *p); - q = &q[3]; - } - - ++p; - } - - *q = '\0'; - return out; -} - -char *GRSThttpUrlMildencode(char *in) -/* Return a pointer to a malloc'd string holding a partially URL-encoded - version of *in. "Partially" means that A-Z a-z 0-9 . = - _ @ and / - are passed through unmodified. (DN's processed by GRSThttpUrlMildencode() - can be used as valid Unix paths+filenames if you are prepared to - create or simulate the resulting /X=xyz directories.) */ -{ - char *out, *p, *q; - - out = malloc(3*strlen(in) + 1); - - p = in; - q = out; - - while (*p != '\0') - { - if (isalnum(*p) || (*p == '.') || (*p == '=') || (*p == '-') - || (*p == '/') || (*p == '@') || (*p == '_')) - { - *q = *p; - ++q; - } - else if (*p == ' ') - { - *q = '+'; - ++q; - } - else - { - sprintf(q, "%%%2X", *p); - q = &q[3]; - } - - ++p; - } - - *q = '\0'; - return out; -} - -/// Return a one-time passcode string, for use with GridHTTP -/** - * Returns - * - * String is timestamp+SHA1_HASH(timestamp+":"+method+":"+URL) - * Timestamps and hashes are in lowercase hexadecimal. Timestamps are - * seconds since 00:00:00 on January 1, 1970 UTC. - */ - -/* -char *GRSThttpMakeOneTimePasscode(time_t timestamp, char *method, char *url) -{ - int len, i; - char *stringtohash, hashedstring[EVP_MAX_MD_SIZE], *returnstring; - const EVP_MD *m; - EVP_MD_CTX ctx; - - m = EVP_sha1(); - if (m == NULL) return NULL; - - asprintf(&stringtohash, "%08x:%s:%s", timestamp, method, url); - - EVP_DigestInit(&ctx, m); - EVP_DigestUpdate(&ctx, stringtohash, strlen(stringtohash)); - EVP_DigestFinal(&ctx, hashedstring, &len); - - returnstring = malloc(9 + len * 2); - - sprintf(returnstring, "%08x", timestamp); - - for (i=0; - - return returnstring; -} -*/ diff --git a/org.gridsite.core/src/grst_x509.c b/org.gridsite.core/src/grst_x509.c deleted file mode 100644 index 5ab98e6..0000000 --- a/org.gridsite.core/src/grst_x509.c +++ /dev/null @@ -1,2128 +0,0 @@ -/* - Copyright (c) 2002-7, Andrew McNab, University of Manchester - All rights reserved. - - Redistribution and use in source and binary forms, with or - without modification, are permitted provided that the following - conditions are met: - - o Redistributions of source code must retain the above - copyright notice, this list of conditions and the following - disclaimer. - o Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following - disclaimer in the documentation and/or other materials - provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND - CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS - BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED - TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - POSSIBILITY OF SUCH DAMAGE. - - --------------------------------------------------------------- - For more information about GridSite: http://www.gridsite.org/ - --------------------------------------------------------------- -*/ - -#define _GNU_SOURCE - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include - -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include - -#include "gridsite.h" - -#define GRST_KEYSIZE 512 -#define GRST_PROXYCACHE "/../proxycache/" -#define GRST_MAX_CHAIN_LEN 9 -#define GRST_BACKDATE_SECONDS 300 - -/// Compare X509 Distinguished Name strings -int GRSTx509NameCmp(char *a, char *b) -/// -/// This function attempts to do with string representations what -/// would ideally be done with OIDs/values. In particular, we equate -/// "/Email=" == "/emailAddress=" to deal with this important change -/// between OpenSSL 0.9.6 and 0.9.7. -/// Other than that, it is currently the same as ordinary strcasecmp(3) -/// (for consistency with EDG/LCG/EGEE gridmapdir case insensitivity.) -{ - int ret; - char *aa, *bb, *p; - - if ((a == NULL) || (b == NULL)) return 1; /* NULL never matches */ - - aa = strdup(a); - while ((p = strstr(aa, "/emailAddress=")) != NULL) - { - memmove(&p[6], &p[13], strlen(&p[13]) + 1); - p[1] = 'E'; - } - - bb = strdup(b); - while ((p = strstr(bb, "/emailAddress=")) != NULL) - { - memmove(&p[6], &p[13], strlen(&p[13]) + 1); - p[1] = 'E'; - } - - ret = strcasecmp(aa, bb); - - free(aa); - free(bb); - - return ret; -} - - -/// Check critical extensions -int GRSTx509KnownCriticalExts(X509 *cert) -/// -/// Returning GRST_RET_OK if all of extensions are known to us or -/// OpenSSL; GRST_REF_FAILED otherwise. -/// -/// Since this function relies on functionality (X509_supported_extension) -/// introduced in 0.9.7, then we do nothing and report an error -/// (GRST_RET_FAILED) if one of the associated defines -/// (X509_V_ERR_UNHANDLED_CRITICAL_EXTENSION) is absent. -{ - int i; - char s[80]; - X509_EXTENSION *ex; - -#ifdef X509_V_ERR_UNHANDLED_CRITICAL_EXTENSION - for (i = 0; i < X509_get_ext_count(cert); ++i) - { - ex = X509_get_ext(cert, i); - - if (X509_EXTENSION_get_critical(ex) && - !X509_supported_extension(ex)) - { - OBJ_obj2txt(s, sizeof(s), X509_EXTENSION_get_object(ex), 1); - - if (strcmp(s, GRST_PROXYCERTINFO_OID) != 0) return GRST_RET_FAILED; - } - } - - return GRST_RET_OK; -#else - return GRST_RET_FAILED; -#endif -} - -/// Check if certificate can be used as a CA to sign standard X509 certs -int GRSTx509IsCA(X509 *cert) -/// -/// Return GRST_RET_OK if true; GRST_RET_FAILED if not. -{ - int idret, purpose_id; - - purpose_id = X509_PURPOSE_get_by_sname("sslclient"); - - /* final argument to X509_check_purpose() is whether to check for CAness */ - - if (X509_check_purpose(cert, purpose_id + X509_PURPOSE_MIN, 1)) - return GRST_RET_OK; - else return GRST_RET_FAILED; -} - -int GRSTx509ChainFree(GRSTx509Chain *chain) -{ - GRSTx509Cert *grst_cert, *next_grst_cert; - - if (chain == NULL) return GRST_RET_OK; - - next_grst_cert = chain->firstcert; - - while (next_grst_cert != NULL) - { - grst_cert = next_grst_cert; - - if (grst_cert->issuer != NULL) free(grst_cert->issuer); - if (grst_cert->dn != NULL) free(grst_cert->dn); - if (grst_cert->value != NULL) free(grst_cert->value); - if (grst_cert->ocsp != NULL) free(grst_cert->ocsp); - - next_grst_cert = grst_cert->next; - free(grst_cert); - } - - free(chain); - - return GRST_RET_OK; -} - -/// Check a specific signature against a specific (VOMS) cert -static int GRSTx509VerifySig(time_t *time1_time, time_t *time2_time, - unsigned char *txt, int txt_len, - unsigned char *sig, int sig_len, - X509 *cert) -/// -/// Returns GRST_RET_OK if signature is ok, other values if not. -{ - int ret; - EVP_PKEY *prvkey; - EVP_MD_CTX ctx; - time_t voms_service_time1, voms_service_time2; - - prvkey = X509_extract_key(cert); - if (prvkey == NULL) return GRST_RET_FAILED; - - OpenSSL_add_all_digests(); -#if OPENSSL_VERSION_NUMBER >= 0x0090701fL - EVP_MD_CTX_init(&ctx); - EVP_VerifyInit_ex(&ctx, EVP_md5(), NULL); -#else - EVP_VerifyInit(&ctx, EVP_md5()); -#endif - - EVP_VerifyUpdate(&ctx, txt, txt_len); - - ret = EVP_VerifyFinal(&ctx, sig, sig_len, prvkey); - -#if OPENSSL_VERSION_NUMBER >= 0x0090701fL - EVP_MD_CTX_cleanup(&ctx); -#endif - EVP_PKEY_free(prvkey); - - if (ret != 1) return GRST_RET_FAILED; - - voms_service_time1 = - GRSTasn1TimeToTimeT(ASN1_STRING_data(X509_get_notBefore(cert)),0); - if (voms_service_time1 > *time1_time) - *time1_time = voms_service_time1; - - voms_service_time2 = - GRSTasn1TimeToTimeT(ASN1_STRING_data(X509_get_notAfter(cert)),0); - if (voms_service_time2 < *time1_time) - *time2_time = voms_service_time2; - - return GRST_RET_OK ; /* verified */ -} - -/// Check the signature of the VOMS attributes -static int GRSTx509VerifyVomsSig(time_t *time1_time, time_t *time2_time, - unsigned char *asn1string, - struct GRSTasn1TagList taglist[], - int lasttag, - char *vomsdir, int acnumber) -/// -/// Returns GRST_RET_OK if signature is ok, other values if not. -{ -#define GRST_ASN1_COORDS_VOMS_DN "-1-1-%d-1-3-1-1-1-%%d-1-%%d" -#define GRST_ASN1_COORDS_VOMS_INFO "-1-1-%d-1" -#define GRST_ASN1_COORDS_VOMS_SIG "-1-1-%d-3" - int ret, isig, iinfo; - char *certpath, *certpath2, acvomsdn[200], dn_coords[200], - info_coords[200], sig_coords[200]; - unsigned char *q; - DIR *vomsDIR, *vomsDIR2; - struct dirent *vomsdirent, *vomsdirent2; - X509 *cert; - EVP_PKEY *prvkey; - FILE *fp; - EVP_MD_CTX ctx; - struct stat statbuf; - time_t voms_service_time1, voms_service_time2; - - if ((vomsdir == NULL) || (vomsdir[0] == '\0')) return GRST_RET_FAILED; - - snprintf(dn_coords, sizeof(dn_coords), - GRST_ASN1_COORDS_VOMS_DN, acnumber); - - if (GRSTasn1GetX509Name(acvomsdn, sizeof(acvomsdn), dn_coords, - asn1string, taglist, lasttag) != GRST_RET_OK) return GRST_RET_FAILED; - - snprintf(info_coords, sizeof(info_coords), - GRST_ASN1_COORDS_VOMS_INFO, acnumber); - iinfo = GRSTasn1SearchTaglist(taglist, lasttag, info_coords); - - snprintf(sig_coords, sizeof(sig_coords), - GRST_ASN1_COORDS_VOMS_SIG, acnumber); - isig = GRSTasn1SearchTaglist(taglist, lasttag, sig_coords); - - if ((iinfo < 0) || (isig < 0)) return GRST_RET_FAILED; - - vomsDIR = opendir(vomsdir); - if (vomsDIR == NULL) return GRST_RET_FAILED; - - while ((vomsdirent = readdir(vomsDIR)) != NULL) - { - if (vomsdirent->d_name[0] == '.') continue; - - asprintf(&certpath, "%s/%s", vomsdir, vomsdirent->d_name); - stat(certpath, &statbuf); - - if (S_ISDIR(statbuf.st_mode)) - { - vomsDIR2 = opendir(certpath); - GRSTerrorLog(GRST_LOG_DEBUG, - "Descend VOMS subdirectory %s", certpath); - free(certpath); - - if (vomsDIR2 == NULL) continue; - - - while ((vomsdirent2 = readdir(vomsDIR2)) != NULL) - { - if (vomsdirent2->d_name[0] == '.') continue; - - asprintf(&certpath2, "%s/%s/%s", - vomsdir, vomsdirent->d_name, vomsdirent2->d_name); - - fp = fopen(certpath2, "r"); - GRSTerrorLog(GRST_LOG_DEBUG, - "Examine VOMS cert %s", certpath2); - free(certpath2); - if (fp == NULL) continue; - - cert = PEM_read_X509(fp, NULL, NULL, NULL); - fclose(fp); - if (cert == NULL) continue; - - if (GRSTx509VerifySig(time1_time, time2_time, - &asn1string[taglist[iinfo].start], - taglist[iinfo].length+taglist[iinfo].headerlength, - &asn1string[taglist[isig].start+ - taglist[isig].headerlength+1], - taglist[isig].length - 1, - cert) == GRST_RET_OK) - { - GRSTerrorLog(GRST_LOG_DEBUG, " VOMS cert signature match"); - X509_free(cert); - closedir(vomsDIR2); - closedir(vomsDIR); - return GRST_RET_OK ; /* verified */ - } - - X509_free(cert); - } - - closedir(vomsDIR2); - } - else - { - fp = fopen(certpath, "r"); - GRSTerrorLog(GRST_LOG_DEBUG, "Examine VOMS cert %s", certpath); - free(certpath); - if (fp == NULL) continue; - - cert = PEM_read_X509(fp, NULL, NULL, NULL); - fclose(fp); - if (cert == NULL) continue; - - if (GRSTx509VerifySig(time1_time, time2_time, - &asn1string[taglist[iinfo].start], - taglist[iinfo].length+taglist[iinfo].headerlength, - &asn1string[taglist[isig].start+ - taglist[isig].headerlength+1], - taglist[isig].length - 1, - cert) == GRST_RET_OK) - { - X509_free(cert); - closedir(vomsDIR); - return GRST_RET_OK ; /* verified */ - } - - X509_free(cert); - } - } - - closedir(vomsDIR); - return GRST_RET_FAILED; -} - -/// Get the VOMS attributes in the given extension -static int GRSTx509ChainVomsAdd(GRSTx509Cert **grst_cert, - time_t time1_time, time_t time2_time, - X509_EXTENSION *ex, - char *ucuserdn, char *vomsdir) -/// -/// Add any VOMS credentials found into the chain. Always returns GRST_RET_OK -/// - even for invalid credentials, which are flagged in errors field -{ -#define MAXTAG 500 -#define GRST_ASN1_COORDS_FQAN "-1-1-%d-1-7-1-2-1-2-%d" -#define GRST_ASN1_COORDS_USER_DN "-1-1-%d-1-2-1-1-1-1-%%d-1-%%d" -#define GRST_ASN1_COORDS_VOMS_DN "-1-1-%d-1-3-1-1-1-%%d-1-%%d" -#define GRST_ASN1_COORDS_TIME1 "-1-1-%d-1-6-1" -#define GRST_ASN1_COORDS_TIME2 "-1-1-%d-1-6-2" - ASN1_OCTET_STRING *asn1data; - char *asn1string, acuserdn[200], accadn[200], acvomsdn[200], - dn_coords[200], fqan_coords[200], time1_coords[200], - time2_coords[200]; - long asn1length; - int lasttag=-1, itag, i, acnumber = 1, chain_errors = 0; - struct GRSTasn1TagList taglist[MAXTAG+1]; - time_t actime1 = 0, actime2 = 0, time_now; - - asn1data = X509_EXTENSION_get_data(ex); - asn1string = ASN1_STRING_data(asn1data); - asn1length = ASN1_STRING_length(asn1data); - - GRSTasn1ParseDump(NULL, asn1string, asn1length, taglist, MAXTAG, &lasttag); - - for (acnumber = 1; ; ++acnumber) /* go through ACs one by one */ - { - chain_errors = 0; - - snprintf(dn_coords, sizeof(dn_coords), GRST_ASN1_COORDS_USER_DN, acnumber); - if (GRSTasn1GetX509Name(acuserdn, sizeof(acuserdn), dn_coords, - asn1string, taglist, lasttag) != GRST_RET_OK) - break; - - snprintf(dn_coords, sizeof(dn_coords), GRST_ASN1_COORDS_VOMS_DN, acnumber); - if (GRSTasn1GetX509Name(acvomsdn, sizeof(acvomsdn), dn_coords, - asn1string, taglist, lasttag) != GRST_RET_OK) - break; - - if (GRSTx509NameCmp(ucuserdn, acuserdn) != 0) - chain_errors |= GRST_CERT_BAD_CHAIN; - - if (GRSTx509VerifyVomsSig(&time1_time, &time2_time, - asn1string, taglist, lasttag, vomsdir, acnumber) - != GRST_RET_OK) - chain_errors |= GRST_CERT_BAD_SIG; - - snprintf(time1_coords, sizeof(time1_coords), GRST_ASN1_COORDS_TIME1, acnumber); - itag = GRSTasn1SearchTaglist(taglist, lasttag, time1_coords); - - if (itag > -1) actime1 = GRSTasn1TimeToTimeT( - &asn1string[taglist[itag].start+ - taglist[itag].headerlength], - taglist[itag].length); - else actime1 = 0; - - snprintf(time2_coords, sizeof(time2_coords), GRST_ASN1_COORDS_TIME2, acnumber); - itag = GRSTasn1SearchTaglist(taglist, lasttag, time2_coords); - - if (itag > -1) actime2 = GRSTasn1TimeToTimeT( - &asn1string[taglist[itag].start+ - taglist[itag].headerlength], - taglist[itag].length); - else actime2 = 0; - - if (actime1 > time1_time) time1_time = actime1; - if (actime2 < time2_time) time2_time = actime2; - - time(&time_now); - if ((time1_time > time_now + 300) || (time2_time < time_now)) - chain_errors |= GRST_CERT_BAD_TIME; - - for (i=1; ; ++i) /* now go through FQANs */ - { - snprintf(fqan_coords, sizeof(fqan_coords), GRST_ASN1_COORDS_FQAN, acnumber, i); - itag = GRSTasn1SearchTaglist(taglist, lasttag, fqan_coords); - - if (itag > -1) - { - (*grst_cert)->next = malloc(sizeof(GRSTx509Cert)); - *grst_cert = (*grst_cert)->next; - bzero(*grst_cert, sizeof(GRSTx509Cert)); - - (*grst_cert)->notbefore = time1_time; - (*grst_cert)->notafter = time2_time; - asprintf(&((*grst_cert)->value), "%.*s", - taglist[itag].length, - &asn1string[taglist[itag].start+ - taglist[itag].headerlength]); - - (*grst_cert)->errors = chain_errors; /* ie may be invalid */ - (*grst_cert)->type = GRST_CERT_TYPE_VOMS; - (*grst_cert)->issuer = strdup(acvomsdn); - (*grst_cert)->dn = strdup(acuserdn); - } - else break; - } - } - - return GRST_RET_OK; -} - -/// Check certificate chain for GSI proxy acceptability. -int GRSTx509ChainLoadCheck(GRSTx509Chain **chain, - STACK_OF(X509) *certstack, X509 *lastcert, - char *capath, char *vomsdir) -/// -/// Returns GRST_RET_OK if valid; OpenSSL X509 errors otherwise. -/// -/// The GridSite version handles old and new style Globus proxies, and -/// proxies derived from user certificates issued with "X509v3 Basic -/// Constraints: CA:FALSE" (eg UK e-Science CA) -/// -/// TODO: we do not yet check ProxyCertInfo and ProxyCertPolicy extensions -/// (although via GRSTx509KnownCriticalExts() we can accept them.) -{ - X509 *cert; /* Points to the current cert in the loop */ - X509 *cacert = NULL; /* The CA root cert */ - int depth = 0; /* Depth of cert chain */ - int chain_errors = 0; /* records previous errors */ - int first_non_ca; /* number of the EEC issued to user by CA */ - char *ucuserdn = NULL; /* DN of EEC issued to user by CA */ - size_t len,len2; /* Lengths of issuer and cert DN */ - int IsCA; /* Holds whether cert is allowed to sign */ - int prevIsCA; /* Holds whether previous cert in chain is - allowed to sign */ - int prevIsLimited; /* previous cert was proxy and limited */ - int i,j,ret; /* Iteration/temp variables */ - char *proxy_part_DN; /* Pointer to end part of current-cert-in-chain - maybe eg "/CN=proxy" */ - char s[80]; - char *cacertpath; - unsigned long subjecthash = 0; /* hash of the name of first cert */ - unsigned long issuerhash = 0; /* hash of issuer name of first cert */ - FILE *fp; - X509_EXTENSION *ex; - time_t now; - GRSTx509Cert *grst_cert, *new_grst_cert; - - GRSTerrorLog(GRST_LOG_DEBUG, "GRSTx509ChainLoadCheck() starts"); - - time(&now); - - first_non_ca = 0; /* set to something predictable if things fail */ - - /* Set necessary preliminary values */ - IsCA = TRUE; /* =prevIsCA - start from a CA */ - prevIsLimited = 0; - - /* Get the client cert chain */ - if (certstack != NULL) - depth = sk_X509_num(certstack); /* How deep is that chain? */ - - if ((depth == 0) && (lastcert == NULL)) - { - *chain = NULL; - return GRST_RET_FAILED; - } - - cert = sk_X509_value(certstack, depth - 1); - subjecthash = X509_NAME_hash(X509_get_subject_name(cert)); - issuerhash = X509_NAME_hash(X509_get_issuer_name(cert)); - asprintf(&cacertpath, "%s/%.8x.0", capath, issuerhash); - - GRSTerrorLog(GRST_LOG_DEBUG, "Look for CA root file %s", cacertpath); - - fp = fopen(cacertpath, "r"); - free(cacertpath); - - if (fp == NULL) chain_errors |= GRST_CERT_BAD_CHAIN; - else - { - cacert = PEM_read_X509(fp, NULL, NULL, NULL); - fclose(fp); - if (cacert != NULL) - GRSTerrorLog(GRST_LOG_DEBUG, " Loaded CA root cert from file"); - else - GRSTerrorLog(GRST_LOG_DEBUG, " Failed to load CA root cert file"); - } - - *chain = malloc(sizeof(GRSTx509Chain)); - bzero(*chain, sizeof(GRSTx509Chain)); - - /* Check the client chain */ - for (i = depth - ((subjecthash == issuerhash) ? 1 : 0); - i >= ((lastcert == NULL) ? 0 : -1); - --i) - /* loop through client-presented chain starting at CA end */ - { - GRSTerrorLog(GRST_LOG_DEBUG, "Process cert at depth %d in chain", i); - - prevIsCA=IsCA; - - new_grst_cert = malloc(sizeof(GRSTx509Cert)); - bzero(new_grst_cert, sizeof(GRSTx509Cert)); - new_grst_cert->errors = chain_errors; - - if ((*chain)->firstcert == NULL) - { - GRSTerrorLog(GRST_LOG_DEBUG, "Initialise chain"); - (*chain)->firstcert = new_grst_cert; - } - else grst_cert->next = new_grst_cert; - - grst_cert = new_grst_cert; - - /* Choose X509 certificate and point to it with 'cert' */ - if (i < 0) cert = lastcert; - else if (i == depth) - cert = cacert; /* the self-signed CA from the store*/ - else if ((i == depth - 1) && (subjecthash == issuerhash)) - cert = cacert; /* ie claims to be a copy of a self-signed CA */ - else cert = sk_X509_value(certstack, i); - - if (cert != NULL) - { - if ((i == depth - 1) && (subjecthash != issuerhash)) - { - /* if first cert does not claim to be a self-signed copy - of a CA root cert in the store, we check the signature */ - - if (cacert == NULL) - { - chain_errors |= GRST_CERT_BAD_CHAIN; - ret = X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT; - } - else - { - ret = X509_check_issued(cacert, cert); - - GRSTerrorLog(GRST_LOG_DEBUG, - "Cert sig check %d returns %d", i, ret); - - if (ret != X509_V_OK) - new_grst_cert->errors |= GRST_CERT_BAD_SIG; - } - } - else if ((i == depth - 2) && (subjecthash == issuerhash)) - { - /* first cert claimed to be a self-signed copy of a CA root - cert in the store, we check the signature of the second - cert, using OUR copy of the CA cert DIRECT from the store */ - - if (cacert == NULL) - { - chain_errors |= GRST_CERT_BAD_CHAIN; - ret = X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT; - } - else - { - ret = X509_check_issued(cacert, cert); - - GRSTerrorLog(GRST_LOG_DEBUG, - "Cert sig check %d returns %d", i, ret); - - if (ret != X509_V_OK) - new_grst_cert->errors |= GRST_CERT_BAD_SIG; - } - } - else if (i < depth - 1) - { - /* otherwise a normal part of the chain: note that if the - first cert claims to be a self-signed copy of a CA root - cert in the store, we never use it for sig checking */ - - ret = X509_check_issued(sk_X509_value(certstack, i + 1), cert); - - GRSTerrorLog(GRST_LOG_DEBUG, - "Cert sig check %d returns %d", i, ret); - - if ((ret != X509_V_OK) && - (ret != X509_V_ERR_KEYUSAGE_NO_CERTSIGN)) - new_grst_cert->errors |= GRST_CERT_BAD_SIG; - - /* NO_CERTSIGN can still be ok due to Proxy Certificates */ - } - - new_grst_cert->serial = (int) ASN1_INTEGER_get( - X509_get_serialNumber(cert)); - new_grst_cert->notbefore = GRSTasn1TimeToTimeT( - ASN1_STRING_data(X509_get_notBefore(cert)), 0); - new_grst_cert->notafter = GRSTasn1TimeToTimeT( - ASN1_STRING_data(X509_get_notAfter(cert)), 0); - - /* we check times and record if invalid */ - - if (now < new_grst_cert->notbefore) - new_grst_cert->errors |= GRST_CERT_BAD_TIME; - - if (now > new_grst_cert->notafter) - new_grst_cert->errors |= GRST_CERT_BAD_TIME; - - new_grst_cert->dn = X509_NAME_oneline(X509_get_subject_name(cert),NULL,0); - new_grst_cert->issuer = X509_NAME_oneline(X509_get_issuer_name(cert),NULL,0); - len = strlen(new_grst_cert->dn); - len2 = strlen(new_grst_cert->issuer); - - /* always treat a first cert from the CA files as a - CA: this is really for lousy CAs that dont create - proper v3 root certificates */ - - if (i == depth) IsCA == TRUE; - else IsCA = (GRSTx509IsCA(cert) == GRST_RET_OK); - - /* If any forebear certificate is not allowed to sign we must - assume all decendents are proxies and cannot sign either */ - if (prevIsCA) - { - if (IsCA) - { - new_grst_cert->type = GRST_CERT_TYPE_CA; - } - else - { - new_grst_cert->type = GRST_CERT_TYPE_EEC; - first_non_ca = i; - ucuserdn = new_grst_cert->dn; - new_grst_cert->delegation - = (lastcert == NULL) ? i : i + 1; - } - } - else - { - new_grst_cert->type = GRST_CERT_TYPE_PROXY; - - IsCA = FALSE; - /* Force proxy check next iteration. Important because I can - sign any CA I create! */ - - new_grst_cert->delegation = (lastcert == NULL) ? i : i + 1; - } - - if (!prevIsCA) - { - /* issuer didn't have CA status, so this is (at best) a proxy: - check for bad proxy extension*/ - - if (prevIsLimited) /* we reject proxies of limited proxies! */ - { - new_grst_cert->errors |= GRST_CERT_BAD_CHAIN; - chain_errors |= GRST_CERT_BAD_CHAIN; - } - - /* User not allowed to sign shortened DN */ - if (len2 > len) - { - new_grst_cert->errors |= GRST_CERT_BAD_CHAIN; - chain_errors |= GRST_CERT_BAD_CHAIN; - } - - /* Proxy subject must begin with issuer. */ - if (strncmp(new_grst_cert->dn, new_grst_cert->issuer, len2) != 0) - { - new_grst_cert->errors |= GRST_CERT_BAD_CHAIN; - chain_errors |= GRST_CERT_BAD_CHAIN; - } - - /* Set pointer to end of base DN in cert_DN */ - proxy_part_DN = &(new_grst_cert->dn[len2]); - - /* First attempt at support for Old and New style GSI - proxies: /CN=anything is ok for now */ - if (strncmp(proxy_part_DN, "/CN=", 4) != 0) - { - new_grst_cert->errors |= GRST_CERT_BAD_CHAIN; - chain_errors |= GRST_CERT_BAD_CHAIN; - } - - if (strncmp(proxy_part_DN, "/CN=limited proxy", 17) == 0) - prevIsLimited = 1; /* ready for next cert ... */ - - for (j=0; j < X509_get_ext_count(cert); ++j) - { - ex = X509_get_ext(cert, j); - OBJ_obj2txt(s,sizeof(s),X509_EXTENSION_get_object(ex),1); - - if (strcmp(s, GRST_VOMS_OID) == 0) /* a VOMS extension */ - { - GRSTx509ChainVomsAdd(&grst_cert, - new_grst_cert->notbefore, - new_grst_cert->notafter, - ex, - ucuserdn, - vomsdir); - grst_cert->delegation = (lastcert == NULL) ? i : i+1; - } - } - - } - } - - - } /* end of for loop */ - - if (cacert != NULL) X509_free(cacert); - - return GRST_RET_OK; -} - -/// Check certificate chain for GSI proxy acceptability. -int GRSTx509CheckChain(int *first_non_ca, X509_STORE_CTX *ctx) -/// -/// Returns X509_V_OK/GRST_RET_OK if valid; OpenSSL X509 errors otherwise. -/// -/// Inspired by GSIcheck written by Mike Jones, SVE, Manchester Computing, -/// The University of Manchester. -/// -/// The GridSite version handles old and new style Globus proxies, and -/// proxies derived from user certificates issued with "X509v3 Basic -/// Constraints: CA:FALSE" (eg UK e-Science CA) -/// -/// We do not check chain links between certs here: this is done by -/// GRST_check_issued/X509_check_issued in mod_ssl's ssl_engine_init.c -/// -/// TODO: we do not yet check ProxyCertInfo and ProxyCertPolicy extensions -/// (although via GRSTx509KnownCriticalExts() we can accept them.) -{ - STACK_OF(X509) *certstack; /* Points to the client's cert chain */ - X509 *cert; /* Points to the client's cert */ - int depth; /* Depth of cert chain */ - size_t len,len2; /* Lengths of issuer and cert DN */ - int IsCA; /* Holds whether cert is allowed to sign */ - int prevIsCA; /* Holds whether previous cert in chain is - allowed to sign */ - int prevIsLimited; /* previous cert was proxy and limited */ - int i,j; /* Iteration variables */ - char *cert_DN; /* Pointer to current-certificate-in-chain's - DN */ - char *issuer_DN; /* Pointer to - issuer-of-current-cert-in-chain's DN */ - char *proxy_part_DN; /* Pointer to end part of current-cert-in-chain - maybe eg "/CN=proxy" */ - time_t now; - - time(&now); - - *first_non_ca = 0; /* set to something predictable if things fail */ - - /* Check for context */ - if (!ctx) return X509_V_ERR_INVALID_CA; - /* Can't GSI-verify if there is no context. Here and throughout this - function we report all errors as X509_V_ERR_INVALID_CA. */ - - /* Set necessary preliminary values */ - IsCA = TRUE; /* =prevIsCA - start from a CA */ - prevIsLimited = 0; - - /* Get the client cert chain */ - certstack = X509_STORE_CTX_get_chain(ctx); /* Get the client's chain */ - depth = sk_X509_num(certstack); /* How deep is that chain? */ - - /* Check the client chain */ - for (i=depth-1; i >= 0; --i) - /* loop through client-presented chain starting at CA end */ - { - prevIsCA=IsCA; - - /* Check for X509 certificate and point to it with 'cert' */ - if (cert = sk_X509_value(certstack, i)) - { - /* we check times and reject immediately if invalid */ - - if (now < - GRSTasn1TimeToTimeT(ASN1_STRING_data(X509_get_notBefore(cert)),0)) - return X509_V_ERR_INVALID_CA; - - if (now > - GRSTasn1TimeToTimeT(ASN1_STRING_data(X509_get_notAfter(cert)),0)) - return X509_V_ERR_INVALID_CA; - - /* If any forebear certificate is not allowed to sign we must - assume all decendents are proxies and cannot sign either */ - if (prevIsCA) - { - /* always treat the first cert (from the CA files) as a CA */ - if (i == depth-1) IsCA = TRUE; - /* check if this cert is valid CA for signing certs */ - else IsCA = (GRSTx509IsCA(cert) == GRST_RET_OK); - - if (!IsCA) *first_non_ca = i; - } - else - { - IsCA = FALSE; - /* Force proxy check next iteration. Important because I can - sign any CA I create! */ - } - - cert_DN = X509_NAME_oneline(X509_get_subject_name(cert),NULL,0); - issuer_DN = X509_NAME_oneline(X509_get_issuer_name(cert),NULL,0); - len = strlen(cert_DN); - len2 = strlen(issuer_DN); - - /* issuer didn't have CA status, so this is (at best) a proxy: - check for bad proxy extension*/ - - if (!prevIsCA) - { - if (prevIsLimited) /* we reject proxies of limited proxies! */ - return X509_V_ERR_INVALID_CA; - - /* User not allowed to sign shortened DN */ - if (len2 > len) return X509_V_ERR_INVALID_CA; - - /* Proxy subject must begin with issuer. */ - if (strncmp(cert_DN, issuer_DN, len2) != 0) - return X509_V_ERR_INVALID_CA; - - /* Set pointer to end of base DN in cert_DN */ - proxy_part_DN = &cert_DN[len2]; - - /* First attempt at support for Old and New style GSI - proxies: /CN=anything is ok for now */ - if (strncmp(proxy_part_DN, "/CN=", 4) != 0) - return X509_V_ERR_INVALID_CA; - - if ((strncmp(proxy_part_DN, "/CN=limited proxy", 17) == 0) && - (i > 0)) prevIsLimited = 1; /* ready for next cert ... */ - } - } - } - - /* Check cert whose private key is being used by client. If previous in - chain is not allowed to be a CA then need to check this final cert for - valid proxy-icity too */ - if (!prevIsCA) - { - if (prevIsLimited) return X509_V_ERR_INVALID_CA; - /* we do not accept proxies signed by limited proxies */ - - if (cert = sk_X509_value(certstack, 0)) - { - /* Load DN & length of DN and either its issuer or the - first-bad-issuer-in-chain */ - cert_DN = X509_NAME_oneline(X509_get_subject_name(cert), NULL, 0); - issuer_DN = X509_NAME_oneline(X509_get_issuer_name(cert), NULL, 0); - len = strlen(cert_DN); - len2 = strlen(issuer_DN); - - /* issuer didn't have CA status, check for bad proxy extension */ - - if (len2 > len) return X509_V_ERR_INVALID_CA; - /* User not allowed to sign shortened DN */ - - if (strncmp(cert_DN, issuer_DN, len2) != 0) - return X509_V_ERR_INVALID_CA; - /* Proxy subject must begin with issuer. */ - - proxy_part_DN = &cert_DN[len2]; - /* Set pointer to end of DN base in cert_DN */ - - /* Remander of subject must be either "/CN=proxy" or - "/CN=limited proxy" (or /CN=XYZ for New style GSI) */ - - /* First attempt at support for Old and New style GSI - proxies: /CN=anything is ok for now. */ - if (strncmp(proxy_part_DN, "/CN=", 4) != 0) - return X509_V_ERR_INVALID_CA; - } - } - - return X509_V_OK; /* this is also GRST_RET_OK, of course - by choice */ -} - -/// Example VerifyCallback routine -int GRSTx509VerifyCallback (int ok, X509_STORE_CTX *ctx) -{ - int errnum = X509_STORE_CTX_get_error(ctx); - int errdepth = X509_STORE_CTX_get_error_depth(ctx); - int first_non_ca; - -#ifndef X509_V_ERR_UNHANDLED_CRITICAL_EXTENSION -#define X509_V_ERR_UNHANDLED_CRITICAL_EXTENSION 34 -#endif - - if (errnum == X509_V_ERR_UNHANDLED_CRITICAL_EXTENSION) - { - if (GRSTx509KnownCriticalExts(X509_STORE_CTX_get_current_cert(ctx)) - == GRST_RET_OK) - { - ok = TRUE; - errnum = X509_V_OK; - X509_STORE_CTX_set_error(ctx, errnum); - } - } - else if ((errdepth == 0) && - (errnum == X509_V_OK) && - (GRSTx509CheckChain(&first_non_ca, ctx) != X509_V_OK)) ok = FALSE; - - - return ok; - -// check this - -// if (ok) return GRST_RET_OK; -// else return GRST_RET_FAILED; -} - -/// Get the VOMS attributes in the given extension -int GRSTx509ParseVomsExt(int *lastcred, int maxcreds, size_t credlen, - char *creds, time_t time1_time, time_t time2_time, - X509_EXTENSION *ex, char *ucuserdn, char *vomsdir) -/// -/// Puts any VOMS credentials found into the Compact Creds string array -/// starting at *creds. Always returns GRST_RET_OK - even for invalid -/// credentials, which are just ignored. -{ -#define MAXTAG 500 -#define GRST_ASN1_COORDS_FQAN "-1-1-%d-1-7-1-2-1-2-%d" -#define GRST_ASN1_COORDS_USER_DN "-1-1-%d-1-2-1-1-1-1-%%d-1-%%d" -#define GRST_ASN1_COORDS_TIME1 "-1-1-%d-1-6-1" -#define GRST_ASN1_COORDS_TIME2 "-1-1-%d-1-6-2" - ASN1_OCTET_STRING *asn1data; - char *asn1string, acuserdn[200], acvomsdn[200], - dn_coords[200], fqan_coords[200], time1_coords[200], - time2_coords[200]; - long asn1length; - int lasttag=-1, itag, i, acnumber = 1; - struct GRSTasn1TagList taglist[MAXTAG+1]; - time_t actime1, actime2, time_now; - - asn1data = X509_EXTENSION_get_data(ex); - asn1string = ASN1_STRING_data(asn1data); - asn1length = ASN1_STRING_length(asn1data); - - GRSTasn1ParseDump(NULL, asn1string, asn1length, taglist, MAXTAG, &lasttag); - - for (acnumber = 1; ; ++acnumber) /* go through ACs one by one */ - { - snprintf(dn_coords, sizeof(dn_coords), GRST_ASN1_COORDS_USER_DN, acnumber); - if (GRSTasn1GetX509Name(acuserdn, sizeof(acuserdn), dn_coords, - asn1string, taglist, lasttag) != GRST_RET_OK) break; - - if (GRSTx509NameCmp(ucuserdn, acuserdn) != 0) continue; - - if (GRSTx509VerifyVomsSig(&time1_time, &time2_time, - asn1string, taglist, lasttag, vomsdir, acnumber) - != GRST_RET_OK) continue; - - snprintf(time1_coords, sizeof(time1_coords), GRST_ASN1_COORDS_TIME1, acnumber); - itag = GRSTasn1SearchTaglist(taglist, lasttag, time1_coords); - actime1 = GRSTasn1TimeToTimeT(&asn1string[taglist[itag].start+ - taglist[itag].headerlength], - taglist[itag].length); - if (actime1 > time1_time) time1_time = actime1; - - snprintf(time2_coords, sizeof(time2_coords), GRST_ASN1_COORDS_TIME2, acnumber); - itag = GRSTasn1SearchTaglist(taglist, lasttag, time2_coords); - actime2 = GRSTasn1TimeToTimeT(&asn1string[taglist[itag].start+ - taglist[itag].headerlength], - taglist[itag].length); - if (actime2 < time2_time) time2_time = actime2; - - time(&time_now); - if ((time1_time > time_now + 300) || (time2_time < time_now)) - continue; /* expiration isnt invalidity ...? */ - - for (i=1; ; ++i) - { - snprintf(fqan_coords, sizeof(fqan_coords), GRST_ASN1_COORDS_FQAN, acnumber, i); - itag = GRSTasn1SearchTaglist(taglist, lasttag, fqan_coords); - - if (itag > -1) - { - if (*lastcred < maxcreds - 1) - { - ++(*lastcred); - snprintf(&creds[*lastcred * (credlen + 1)], credlen+1, - "VOMS %010lu %010lu 0 %.*s", - time1_time, time2_time, - taglist[itag].length, - &asn1string[taglist[itag].start+ - taglist[itag].headerlength]); - } - } - else break; - } - } - - return GRST_RET_OK; -} - -/// Get the VOMS attributes in the extensions to the given cert stack -int GRSTx509GetVomsCreds(int *lastcred, int maxcreds, size_t credlen, - char *creds, X509 *usercert, STACK_OF(X509) *certstack, - char *vomsdir) -/// -/// Puts any VOMS credentials found into the Compact Creds string array -/// starting at *creds. Always returns GRST_RET_OK. -{ - int i, j; - char s[80]; - unsigned char *ucuser; - X509_EXTENSION *ex; - ASN1_STRING *asn1str; - X509 *cert; - time_t time1_time = 0, time2_time = 0, uctime1_time, uctime2_time; - - uctime1_time = - GRSTasn1TimeToTimeT(ASN1_STRING_data(X509_get_notBefore(usercert)),0); - uctime2_time = - GRSTasn1TimeToTimeT(ASN1_STRING_data(X509_get_notAfter(usercert)),0); - ucuser = - X509_NAME_oneline(X509_get_subject_name(usercert), NULL, 0); - - for (j=sk_X509_num(certstack)-1; j >= 0; --j) - { - cert = sk_X509_value(certstack, j); - - time1_time = - GRSTasn1TimeToTimeT(ASN1_STRING_data(X509_get_notBefore(cert)),0); - uctime1_time = (time1_time > uctime1_time) ? time1_time:uctime1_time; - - time2_time = - GRSTasn1TimeToTimeT(ASN1_STRING_data(X509_get_notAfter(cert)),0); - uctime2_time = (time2_time < uctime2_time) ? time2_time:uctime2_time; - - for (i=0; i < X509_get_ext_count(cert); ++i) - { - ex = X509_get_ext(cert, i); - OBJ_obj2txt(s, sizeof(s), X509_EXTENSION_get_object(ex), 1); - - if (strcmp(s, GRST_VOMS_OID) == 0) /* a VOMS extension */ - { - GRSTx509ParseVomsExt(lastcred, maxcreds, credlen, creds, - uctime1_time, uctime2_time, - ex, ucuser, vomsdir); - } - } - } - - return GRST_RET_OK; -} - -/// Turn a Compact Cred line into a GRSTgaclCred object -GRSTgaclCred *GRSTx509CompactToCred(char *grst_cred) -/// -/// Returns pointer to created GRSTgaclCred or NULL or failure. -{ - int delegation; - char *p; - time_t now, notbefore, notafter; - GRSTgaclCred *cred = NULL; - - time(&now); - - if (grst_cred == NULL) return NULL; /* just in case */ - - if (strncmp(grst_cred, "X509USER ", 9) == 0) - { - if ((sscanf(grst_cred, "X509USER %lu %lu %d", - ¬before, ¬after, &delegation) == 3) - && (now >= notbefore) - && (now <= notafter) - && (p = index(grst_cred, ' ')) - && (p = index(++p, ' ')) - && (p = index(++p, ' ')) - && (p = index(++p, ' '))) - { - cred = GRSTgaclCredNew("person"); - GRSTgaclCredSetDelegation(cred, delegation); - GRSTgaclCredAddValue(cred, "dn", &p[1]); - } - - return cred; - } - - if (strncmp(grst_cred, "VOMS ", 5) == 0) - { - if ((sscanf(grst_cred, "VOMS %lu %lu %d", - ¬before, ¬after, &delegation) == 3) - && (now >= notbefore) - && (now <= notafter) - && (p = index(grst_cred, ' ')) - && (p = index(++p, ' ')) - && (p = index(++p, ' ')) - && (p = index(++p, ' '))) - { - /* include /VO/group/subgroup/Role=role/Capability=cap */ - - if (p[1] != '/') return NULL; /* must begin with / */ - - cred = GRSTgaclCredNew("voms"); - GRSTgaclCredSetDelegation(cred, delegation); - GRSTgaclCredAddValue(cred, "fqan", &p[1]); - } - - return cred; - } - - return NULL; /* dont recognise this credential type */ -} - -/// Get the credentials in an X509 cert/GSI proxy, including any VOMS -int GRSTx509CompactCreds(int *lastcred, int maxcreds, size_t credlen, - char *creds, STACK_OF(X509) *certstack, char *vomsdir, - X509 *peercert) -/// -/// Credentials are placed in Compact Creds string array at *creds. -/// -/// Function returns GRST_RET_OK on success, or GRST_RET_FAILED if -/// some inconsistency found in certificate. -{ - int i, j, delegation = 0; - char credtemp[credlen+1]; - X509 *cert, *usercert = NULL, *gsiproxycert = NULL; - - *lastcred = -1; - - for (i = sk_X509_num(certstack) - 1; i >= 0; --i) - { - cert = sk_X509_value(certstack, i); - - if (usercert != NULL) - { /* found a (GSI proxy) cert after the user cert */ - gsiproxycert = cert; - ++delegation; - } - - if ((usercert == NULL) && - (i < sk_X509_num(certstack) - 1) && - (GRSTx509IsCA(cert) != GRST_RET_OK)) usercert = cert; - /* found the 1st non-CA cert */ - } - - if (peercert != NULL) - { - if (usercert != NULL) /* found a (GSI proxy) cert after user cert */ - { - gsiproxycert = peercert; - ++delegation; - } - - if ((usercert == NULL) && - (GRSTx509IsCA(peercert) != GRST_RET_OK)) usercert = peercert; - /* found the 1st non-CA cert */ - } - - if ((usercert == NULL) /* if no usercert ("EEC"), we're not interested */ - || - (snprintf(credtemp, credlen+1, "X509USER %010lu %010lu %d %s", - GRSTasn1TimeToTimeT(ASN1_STRING_data(X509_get_notBefore(usercert)),0), - GRSTasn1TimeToTimeT(ASN1_STRING_data(X509_get_notAfter(usercert)),0), - delegation, - X509_NAME_oneline(X509_get_subject_name(usercert), NULL, 0)) >= credlen+1) - || - (*lastcred >= maxcreds-1)) - { - *lastcred = -1; /* just in case the caller looks at it */ - return GRST_RET_FAILED; /* tell caller that things didn't work out */ - } - - ++(*lastcred); - strcpy(&creds[*lastcred * (credlen + 1)], credtemp); - - if ((gsiproxycert != NULL) - && - (snprintf(credtemp, credlen+1, "GSIPROXY %010lu %010lu %d %s", - GRSTasn1TimeToTimeT(ASN1_STRING_data(X509_get_notBefore(gsiproxycert)),0), - GRSTasn1TimeToTimeT(ASN1_STRING_data(X509_get_notAfter(gsiproxycert)),0), - delegation, - X509_NAME_oneline(X509_get_subject_name(gsiproxycert), NULL, 0)) < credlen+1) - && - (*lastcred < maxcreds-1)) - { - ++(*lastcred); - strcpy(&creds[*lastcred * (credlen + 1)], credtemp); - - GRSTx509GetVomsCreds(lastcred, maxcreds, credlen, creds, - usercert, certstack, vomsdir); - - } - - return GRST_RET_OK; -} - -/// Find proxy file name of the current user -char *GRSTx509FindProxyFileName(void) -/// -/// Return a string with the proxy file name or NULL if not present. -/// This function does not check if the proxy has expired. -{ - char *p; - - p = getenv("X509_USER_PROXY"); - - if (p != NULL) return strdup(p); - - p = malloc(sizeof("/tmp/x509up_uXYYYXXXYYY")); - - sprintf(p, "/tmp/x509up_u%d", getuid()); - - return p; -} - -static void mpcerror(FILE *debugfp, char *msg) -{ - if (debugfp != NULL) - { - fputs(msg, debugfp); - ERR_print_errors_fp(debugfp); - } -} - -/// Make a GSI Proxy chain from a request, certificate and private key -int GRSTx509MakeProxyCert(char **proxychain, FILE *debugfp, - char *reqtxt, char *cert, char *key, int minutes) -/// -/// The proxy chain is returned in *proxychain. If debugfp is non-NULL, -/// errors are output to that file pointer. The proxy will expired in -/// the given number of minutes starting from the current time. -{ - char *ptr, *certchain; - int i, subjAltName_pos, ncerts; - long serial = 2796, ptrlen; - EVP_PKEY *pkey, *CApkey; - const EVP_MD *digest; - X509 *certs[GRST_MAX_CHAIN_LEN]; - X509_REQ *req; - X509_NAME *name, *CAsubject, *newsubject; - X509_NAME_ENTRY *ent; - X509V3_CTX ctx; - X509_EXTENSION *subjAltName; - STACK_OF (X509_EXTENSION) * req_exts; - FILE *fp; - BIO *reqmem, *certmem; - time_t notAfter; - - /* read in the request */ - reqmem = BIO_new(BIO_s_mem()); - BIO_puts(reqmem, reqtxt); - - if (!(req = PEM_read_bio_X509_REQ(reqmem, NULL, NULL, NULL))) - { - mpcerror(debugfp, - "GRSTx509MakeProxyCert(): error reading request from BIO memory\n"); - BIO_free(reqmem); - return GRST_RET_FAILED; - } - - BIO_free(reqmem); - - /* verify signature on the request */ - if (!(pkey = X509_REQ_get_pubkey (req))) - { - mpcerror(debugfp, - "GRSTx509MakeProxyCert(): error getting public key from request\n"); - return GRST_RET_FAILED; - } - - if (X509_REQ_verify(req, pkey) != 1) - { - mpcerror(debugfp, - "GRSTx509MakeProxyCert(): error verifying signature on certificate\n"); - return GRST_RET_FAILED; - } - - /* read in the signing certificate */ - if (!(fp = fopen(cert, "r"))) - { - mpcerror(debugfp, - "GRSTx509MakeProxyCert(): error opening signing certificate file\n"); - return GRST_RET_FAILED; - } - - for (ncerts = 1; ncerts < GRST_MAX_CHAIN_LEN; ++ncerts) - if (!(certs[ncerts] = PEM_read_X509(fp, NULL, NULL, NULL))) break; - - if (ncerts == 1) /* zeroth cert with be new proxy cert */ - { - mpcerror(debugfp, - "GRSTx509MakeProxyCert(): error reading signing certificate file\n"); - return GRST_RET_FAILED; - } - - fclose(fp); - - CAsubject = X509_get_subject_name(certs[1]); - - /* read in the CA private key */ - if (!(fp = fopen(key, "r"))) - { - mpcerror(debugfp, - "GRSTx509MakeProxyCert(): error reading signing private key file\n"); - return GRST_RET_FAILED; - } - - if (!(CApkey = PEM_read_PrivateKey (fp, NULL, NULL, NULL))) - { - mpcerror(debugfp, - "GRSTx509MakeProxyCert(): error reading signing private key in file\n"); - return GRST_RET_FAILED; - } - - fclose(fp); - - /* get subject name */ - if (!(name = X509_REQ_get_subject_name (req))) - { - mpcerror(debugfp, - "GRSTx509MakeProxyCert(): error getting subject name from request\n"); - return GRST_RET_FAILED; - } - - /* create new certificate */ - if (!(certs[0] = X509_new ())) - { - mpcerror(debugfp, - "GRSTx509MakeProxyCert(): error creating X509 object\n"); - return GRST_RET_FAILED; - } - - /* set version number for the certificate (X509v3) and the serial number - need 3 = v4 for GSI proxy?? */ - if (X509_set_version (certs[0], 3L) != 1) - { - mpcerror(debugfp, - "GRSTx509MakeProxyCert(): error setting certificate version\n"); - return GRST_RET_FAILED; - } - - ASN1_INTEGER_set (X509_get_serialNumber (certs[0]), serial++); - - if (!(name = X509_get_subject_name(certs[1]))) - { - mpcerror(debugfp, - "GRSTx509MakeProxyCert(): error getting subject name from CA certificate\n"); - return GRST_RET_FAILED; - } - - if (X509_set_issuer_name (certs[0], name) != 1) - { - mpcerror(debugfp, - "GRSTx509MakeProxyCert(): error setting issuer name of certificate\n"); - return GRST_RET_FAILED; - } - - /* set issuer and subject name of the cert from the req and the CA */ - ent = X509_NAME_ENTRY_create_by_NID(NULL, OBJ_txt2nid("commonName"), - MBSTRING_ASC, "proxy", -1); - - newsubject = X509_NAME_dup(CAsubject); - - X509_NAME_add_entry(newsubject, ent, -1, 0); - - if (X509_set_subject_name(certs[0], newsubject) != 1) - { - mpcerror(debugfp, - "GRSTx509MakeProxyCert(): error setting subject name of certificate\n"); - return GRST_RET_FAILED; - } - - /* set public key in the certificate */ - if (X509_set_pubkey(certs[0], pkey) != 1) - { - mpcerror(debugfp, - "GRSTx509MakeProxyCert(): error setting public key of the certificate\n"); - return GRST_RET_FAILED; - } - - /* set duration for the certificate */ - if (!(X509_gmtime_adj (X509_get_notBefore(certs[0]), -GRST_BACKDATE_SECONDS))) - { - mpcerror(debugfp, - "GRSTx509MakeProxyCert(): error setting beginning time of the certificate\n"); - return GRST_RET_FAILED; - } - - if (!(X509_gmtime_adj (X509_get_notAfter(certs[0]), 60 * minutes))) - { - mpcerror(debugfp, - "GRSTx509MakeProxyCert(): error setting ending time of the certificate\n"); - return GRST_RET_FAILED; - } - - /* go through chain making sure this proxy is not longer lived */ - - notAfter = - GRSTasn1TimeToTimeT(ASN1_STRING_data(X509_get_notAfter(certs[0])), 0); - - for (i=1; i < ncerts; ++i) - if (notAfter > - GRSTasn1TimeToTimeT(ASN1_STRING_data(X509_get_notAfter(certs[i])), - 0)) - { - notAfter = - GRSTasn1TimeToTimeT(ASN1_STRING_data(X509_get_notAfter(certs[i])), - 0); - - ASN1_UTCTIME_set(X509_get_notAfter(certs[0]), notAfter); - } - - /* sign the certificate with the signing private key */ - if (EVP_PKEY_type (CApkey->type) == EVP_PKEY_RSA) - digest = EVP_md5(); - else - { - mpcerror(debugfp, - "GRSTx509MakeProxyCert(): error checking signing private key for a valid digest\n"); - return GRST_RET_FAILED; - } - - if (!(X509_sign (certs[0], CApkey, digest))) - { - mpcerror(debugfp, - "GRSTx509MakeProxyCert(): error signing certificate\n"); - return GRST_RET_FAILED; - } - - /* store the completed certificate chain */ - - certchain = strdup(""); - - for (i=0; i < ncerts; ++i) - { - certmem = BIO_new(BIO_s_mem()); - - if (PEM_write_bio_X509(certmem, certs[i]) != 1) - { - mpcerror(debugfp, - "GRSTx509MakeProxyCert(): error writing certificate to memory BIO\n"); - return GRST_RET_FAILED; - } - - ptrlen = BIO_get_mem_data(certmem, &ptr); - - certchain = realloc(certchain, strlen(certchain) + ptrlen + 1); - - strncat(certchain, ptr, ptrlen); - - BIO_free(certmem); - } - - *proxychain = certchain; - - return GRST_RET_OK; -} - -/// Find a proxy file in the proxy cache -char *GRSTx509CachedProxyFind(char *proxydir, char *delegation_id, - char *user_dn) -/// -/// Returns the full path and file name of proxy file associated -/// with given delegation ID and user DN. -/// -/// Return a pointer to a malloc'd string with the full path of the -/// proxy file corresponding to the given delegation_id, or NULL -/// if not found. -{ - char *user_dn_enc, *proxyfile; - struct stat statbuf; - - user_dn_enc = GRSThttpUrlEncode(user_dn); - - asprintf(&proxyfile, "%s/%s/%s/userproxy.pem", - proxydir, user_dn_enc, delegation_id); - - free(user_dn_enc); - - if ((stat(proxyfile, &statbuf) != 0) || !S_ISREG(statbuf.st_mode)) - { - free(proxyfile); - return NULL; - } - - return proxyfile; -} - -/// Find a temporary proxy private key file in the proxy cache -char *GRSTx509CachedProxyKeyFind(char *proxydir, char *delegation_id, - char *user_dn) -/// -/// Returns the full path and file name of the private key file associated -/// with given delegation ID and user DN. -/// -/// Return a pointer to a malloc'd string with the full path of the -/// private proxy key corresponding to the given delegation_id, or NULL -/// if not found. -{ - char *user_dn_enc, *prvkeyfile; - struct stat statbuf; - - user_dn_enc = GRSThttpUrlEncode(user_dn); - - asprintf(&prvkeyfile, "%s/cache/%s/%s/userkey.pem", - proxydir, user_dn_enc, delegation_id); - - free(user_dn_enc); - - if ((stat(prvkeyfile, &statbuf) != 0) || !S_ISREG(statbuf.st_mode)) - { - free(prvkeyfile); - return NULL; - } - - return prvkeyfile; -} - -static void mkdir_printf(mode_t mode, char *fmt, ...) -{ - int ret; - char *path; - va_list ap; - - va_start(ap, fmt); - vasprintf(&path, fmt, ap); - va_end(ap); - - ret = mkdir(path, mode); - - free(path); -} - -/// Create a X.509 request for a GSI proxy and its private key -int GRSTx509CreateProxyRequest(char **reqtxt, char **keytxt, char *ocspurl) -/// -/// Returns GRST_RET_OK on success, non-zero otherwise. Request string -/// and private key are PEM encoded strings -{ - int i; - char *ptr; - size_t ptrlen; - RSA *keypair; - X509_NAME *subject; - X509_NAME_ENTRY *ent; - EVP_PKEY *pkey; - X509_REQ *certreq; - BIO *reqmem, *keymem; - const EVP_MD *digest; - struct stat statbuf; - - /* create key pair and put it in a PEM string */ - - if ((keypair = RSA_generate_key(GRST_KEYSIZE, 65537, NULL, NULL)) == NULL) - return 1; - - keymem = BIO_new(BIO_s_mem()); - if (!PEM_write_bio_RSAPrivateKey(keymem, keypair, NULL, NULL, 0, NULL, NULL)) - { - BIO_free(keymem); - return 3; - } - - ptrlen = BIO_get_mem_data(keymem, &ptr); - - *keytxt = malloc(ptrlen + 1); - memcpy(*keytxt, ptr, ptrlen); - (*keytxt)[ptrlen] = '\0'; - - BIO_free(keymem); - - /* now create the certificate request */ - - certreq = X509_REQ_new(); - - OpenSSL_add_all_algorithms(); - - pkey = EVP_PKEY_new(); - EVP_PKEY_assign_RSA(pkey, keypair); - - X509_REQ_set_pubkey(certreq, pkey); - - subject = X509_NAME_new(); - ent = X509_NAME_ENTRY_create_by_NID(NULL, OBJ_txt2nid("organizationName"), - MBSTRING_ASC, "Dummy", -1); - X509_NAME_add_entry (subject, ent, -1, 0); - X509_REQ_set_subject_name (certreq, subject); - - digest = EVP_md5(); - X509_REQ_sign(certreq, pkey, digest); - - reqmem = BIO_new(BIO_s_mem()); - PEM_write_bio_X509_REQ(reqmem, certreq); - ptrlen = BIO_get_mem_data(reqmem, &ptr); - - *reqtxt = malloc(ptrlen + 1); - memcpy(*reqtxt, ptr, ptrlen); - (*reqtxt)[ptrlen] = '\0'; - - BIO_free(reqmem); - - X509_REQ_free(certreq); - - return 0; -} - -/// Make and store a X.509 request for a GSI proxy -int GRSTx509MakeProxyRequest(char **reqtxt, char *proxydir, - char *delegation_id, char *user_dn) -/// -/// Returns GRST_RET_OK on success, non-zero otherwise. Request string -/// is PEM encoded, and the key is stored in the temporary cache under -/// proxydir -{ - int i; - char *docroot, *prvkeyfile, *ptr, *user_dn_enc; - size_t ptrlen; - FILE *fp; - RSA *keypair; - X509_NAME *subject; - X509_NAME_ENTRY *ent; - EVP_PKEY *pkey; - X509_REQ *certreq; - BIO *reqmem; - const EVP_MD *digest; - struct stat statbuf; - - if (strcmp(user_dn, "cache") == 0) return GRST_RET_FAILED; - - user_dn_enc = GRSThttpUrlEncode(user_dn); - - /* create directories if necessary */ - - mkdir_printf(S_IRUSR | S_IWUSR | S_IXUSR, - "%s/cache", proxydir); - mkdir_printf(S_IRUSR | S_IWUSR | S_IXUSR, - "%s/cache/%s", proxydir, user_dn_enc); - mkdir_printf(S_IRUSR | S_IWUSR | S_IXUSR, - "%s/cache/%s/%s", proxydir, user_dn_enc, delegation_id); - - /* make the new proxy private key */ - - asprintf(&prvkeyfile, "%s/cache/%s/%s/userkey.pem", - proxydir, user_dn_enc, delegation_id); - - if (prvkeyfile == NULL) - { - free(user_dn_enc); - return GRST_RET_FAILED; - } - - if ((keypair = RSA_generate_key(GRST_KEYSIZE, 65537, NULL, NULL)) == NULL) - return 1; - - if ((fp = fopen(prvkeyfile, "w")) == NULL) return 2; - - chmod(prvkeyfile, S_IRUSR | S_IWUSR); - free(prvkeyfile); - free(user_dn_enc); - - if (!PEM_write_RSAPrivateKey(fp, keypair, NULL, NULL, 0, NULL, NULL)) - return 3; - - if (fclose(fp) != 0) return 4; - - /* now create the certificate request */ - - certreq = X509_REQ_new(); - if (certreq == NULL) return 5; - - OpenSSL_add_all_algorithms(); - - pkey = EVP_PKEY_new(); - EVP_PKEY_assign_RSA(pkey, keypair); - - X509_REQ_set_pubkey(certreq, pkey); - - subject = X509_NAME_new(); - ent = X509_NAME_ENTRY_create_by_NID(NULL, OBJ_txt2nid("organizationName"), - MBSTRING_ASC, "Dummy", -1); - X509_NAME_add_entry (subject, ent, -1, 0); - X509_REQ_set_subject_name (certreq, subject); - - digest = EVP_md5(); - X509_REQ_sign(certreq, pkey, digest); - - reqmem = BIO_new(BIO_s_mem()); - PEM_write_bio_X509_REQ(reqmem, certreq); - ptrlen = BIO_get_mem_data(reqmem, &ptr); - - *reqtxt = malloc(ptrlen + 1); - memcpy(*reqtxt, ptr, ptrlen); - (*reqtxt)[ptrlen] = '\0'; - - BIO_free(reqmem); - - X509_REQ_free(certreq); - - return 0; -} - -/// Destroy stored GSI proxy files -int GRSTx509ProxyDestroy(char *proxydir, char *delegation_id, char *user_dn) -/// -/// Returns GRST_RET_OK on success, non-zero otherwise. -/// (Including GRST_RET_NO_SUCH_FILE if the private key or cert chain -/// were not found.) -{ - int ret = GRST_RET_OK; - char *docroot, *filename, *user_dn_enc; - - if (strcmp(user_dn, "cache") == 0) return GRST_RET_FAILED; - - user_dn_enc = GRSThttpUrlEncode(user_dn); - - /* proxy file */ - - asprintf(&filename, "%s/%s/%s/userproxy.pem", - proxydir, user_dn_enc, delegation_id); - - if (filename == NULL) - { - free(user_dn_enc); - return GRST_RET_FAILED; - } - - if (unlink(filename) != 0) ret = GRST_RET_NO_SUCH_FILE; - free(filename); - - /* voms file */ - - asprintf(&filename, "%s/%s/%s/voms.attributes", - proxydir, user_dn_enc, delegation_id); - - if (filename == NULL) - { - free(user_dn_enc); - return GRST_RET_FAILED; - } - - unlink(filename); - free(filename); - - return ret; -} - -/// Get start and finish validity times of stored GSI proxy file -int GRSTx509ProxyGetTimes(char *proxydir, char *delegation_id, char *user_dn, - time_t *start, time_t *finish) -/// -/// Returns GRST_RET_OK on success, non-zero otherwise. -/// (Including GRST_RET_NO_SUCH_FILE if the cert chain was not found.) -{ - char *docroot, *filename, *user_dn_enc; - FILE *fp; - X509 *cert; - - if (strcmp(user_dn, "cache") == 0) return GRST_RET_FAILED; - - user_dn_enc = GRSThttpUrlEncode(user_dn); - - asprintf(&filename, "%s/%s/%s/userproxy.pem", - proxydir, user_dn_enc, delegation_id); - - free(user_dn_enc); - - if (filename == NULL) return GRST_RET_FAILED; - - fp = fopen(filename, "r"); - free(filename); - - if (fp == NULL) return GRST_RET_NO_SUCH_FILE; - - cert = PEM_read_X509(fp, NULL, NULL, NULL); /* first cert is X.509 PC */ - - fclose(fp); - - *start = GRSTasn1TimeToTimeT(ASN1_STRING_data(X509_get_notBefore(cert)),0); - *finish = GRSTasn1TimeToTimeT(ASN1_STRING_data(X509_get_notAfter(cert)),0); - - X509_free(cert); - - return GRST_RET_OK; -} - -/// Create a stack of X509 certificate from a PEM-encoded string -int GRSTx509StringToChain(STACK_OF(X509) **certstack, char *certstring) -/// -/// Creates a dynamically allocated stack of X509 certificate objects -/// by walking through the PEM-encoded X509 certificates. -/// -/// Returns GRST_RET_OK on success, non-zero otherwise. -{ - STACK_OF(X509_INFO) *sk=NULL; - BIO *certbio; - X509_INFO *xi; - - *certstack = sk_X509_new_null(); - if (*certstack == NULL) return GRST_RET_FAILED; - - certbio = BIO_new_mem_buf(certstring, -1); - - if (!(sk=PEM_X509_INFO_read_bio(certbio, NULL, NULL, NULL))) - { - BIO_free(certbio); - sk_X509_INFO_free(sk); - sk_X509_free(*certstack); - return GRST_RET_FAILED; - } - - while (sk_X509_INFO_num(sk)) - { - xi=sk_X509_INFO_shift(sk); - if (xi->x509 != NULL) - { - sk_X509_push(*certstack, xi->x509); - xi->x509=NULL; - } - X509_INFO_free(xi); - } - - if (!sk_X509_num(*certstack)) - { - BIO_free(certbio); - sk_X509_INFO_free(sk); - sk_X509_free(*certstack); - return GRST_RET_FAILED; - } - - BIO_free(certbio); - sk_X509_INFO_free(sk); - - return GRST_RET_OK; -} - -/// Returns a Delegation ID based on hash of GRST_CRED_0, ... -char *GRSTx509MakeDelegationID(void) -/// -/// Returns a malloc'd string with Delegation ID made by SHA1-hashing the -/// values of the compact credentials exported by mod_gridsite -{ - unsigned char hash_delegation_id[EVP_MAX_MD_SIZE]; - int size_needed = 0, i, delegation_id_len; - char cred_name[14], *cred_value, *delegation_id; - const EVP_MD *m; - EVP_MD_CTX ctx; - - OpenSSL_add_all_digests(); - - m = EVP_sha1(); - if (m == NULL) return NULL; - - EVP_DigestInit(&ctx, m); - - for (i=0; i <= 999; ++i) - { - snprintf(cred_name, sizeof(cred_name), "GRST_CRED_%d", i); - if ((cred_value = getenv(cred_name)) == NULL) break; - - EVP_DigestUpdate(&ctx, cred_value, strlen(cred_value)); - } - - EVP_DigestFinal(&ctx, hash_delegation_id, &delegation_id_len); - - delegation_id = malloc(17); - - for (i=0; i <=7; ++i) - sprintf(&delegation_id[i*2], "%02x", hash_delegation_id[i]); - - delegation_id[16] = '\0'; - - return delegation_id; -} - -#if 0 -/// Return the short file name for the given delegation_id and user_dn -char *GRSTx509MakeProxyFileName(char *delegation_id, - STACK_OF(X509) *certstack) -/// -/// Returns a malloc'd string with the short file name (no paths) that -/// derived from the hashed delegation_id and user_dn -/// -/// File name is SHA1_HASH(DelegationID)+"-"+SHA1_HASH(DN) where DN -/// is DER encoded version of user_dn with any trailing CN=proxy removed -/// Hashes are the most significant 8 bytes, in lowercase hexadecimal. -{ - int i, depth, prevIsCA = 1, IsCA, hash_name_len, delegation_id_len, - der_name_len; - unsigned char *der_name, *buf, hash_name[EVP_MAX_MD_SIZE], - hash_delegation_id[EVP_MAX_MD_SIZE], - filename[34]; - X509_NAME *subject_name; - X509 *cert; - const EVP_MD *m; - EVP_MD_CTX ctx; - - depth = sk_X509_num(certstack); - - for (i=depth-1; i >= 0; --i) - /* loop through the proxy chain starting at CA end */ - { - if (cert = sk_X509_value(certstack, i)) - { - IsCA = (GRSTx509IsCA(cert) == GRST_RET_OK); - - if (prevIsCA && !IsCA) /* the full certificate of the user */ - { - break; - } - } - } - - if (i < 0) return NULL; /* not found: something wrong with the chain */ - - if ((subject_name = X509_get_subject_name(cert)) == NULL) return NULL; - - der_name_len = i2d_X509_NAME(X509_get_subject_name(cert), NULL); - if (der_name_len == 0) return NULL; - - buf = OPENSSL_malloc(der_name_len); - der_name = buf; - - - if (!i2d_X509_NAME(X509_get_subject_name(cert), &der_name)) - { - OPENSSL_free(der_name); - return NULL; - } - - OpenSSL_add_all_digests(); - - m = EVP_sha1(); - if (m == NULL) - { - OPENSSL_free(der_name); - return NULL; - } - - - EVP_DigestInit(&ctx, m); - EVP_DigestUpdate(&ctx, delegation_id, strlen(delegation_id)); - EVP_DigestFinal(&ctx, hash_delegation_id, &delegation_id_len); - - /* lots of nasty hard coded numbers: - "8bytes/16chars delegation ID" + "-" + "8bytes/16chars DN" */ - - for (i=0; i <=7; ++i) - sprintf(&filename[i*2], "%02x", hash_delegation_id[i]); - - filename[16] = '-'; - - EVP_DigestInit(&ctx, m); - EVP_DigestUpdate(&ctx, buf, der_name_len); - EVP_DigestFinal(&ctx, hash_name, &hash_name_len); - - for (i=0; i <=7; ++i) - sprintf(&filename[17 + i*2], "%02x", hash_name[i]); - - return strdup(filename); -} -#endif - -/// Store a GSI proxy chain in the proxy cache, along with the private key -int GRSTx509CacheProxy(char *proxydir, char *delegation_id, - char *user_dn, char *proxychain) -/// -/// Returns GRST_RET_OK on success, non-zero otherwise. The existing -/// private key with the same delegation ID and user DN is moved out of -/// the temporary cache. -{ - int c, len = 0, i, ret; - char *user_dn_enc, *p, *ptr, *prvkeyfile, *proxyfile; - STACK_OF(X509) *certstack; - BIO *certmem; - X509 *cert; - long ptrlen; - FILE *ifp, *ofp; - - if (strcmp(user_dn, "cache") == 0) return GRST_RET_FAILED; - - /* find the existing private key file */ - - prvkeyfile = GRSTx509CachedProxyKeyFind(proxydir, delegation_id, user_dn); - - if (prvkeyfile == NULL) - { - return GRST_RET_FAILED; - } - - /* open it ready for later */ - - if ((ifp = fopen(prvkeyfile, "r")) == NULL) - { - free(prvkeyfile); - return GRST_RET_FAILED; - } - - /* get the X509 stack */ - - if (GRSTx509StringToChain(&certstack, proxychain) != GRST_RET_OK) - { - fclose(ifp); - free(prvkeyfile); - return GRST_RET_FAILED; - } - - /* create directories if necessary, and set proxy filename */ - - user_dn_enc = GRSThttpUrlEncode(user_dn); - - mkdir_printf(S_IRUSR | S_IWUSR | S_IXUSR, - "%s/%s", proxydir, user_dn_enc); - mkdir_printf(S_IRUSR | S_IWUSR | S_IXUSR, - "%s/%s/%s", proxydir, user_dn_enc, delegation_id); - - asprintf(&proxyfile, "%s/%s/%s/userproxy.pem", - proxydir, user_dn_enc, delegation_id); - - free(user_dn_enc); - - /* set up to write proxy file */ - - ofp = fopen(proxyfile, "w"); - chmod(proxyfile, S_IRUSR | S_IWUSR); - free(proxyfile); - - if (ofp == NULL) - { - fclose(ifp); - free(prvkeyfile); - return GRST_RET_FAILED; - } - - /* write out the most recent proxy by itself */ - - if (cert = sk_X509_value(certstack, 0)) - { - certmem = BIO_new(BIO_s_mem()); - if (PEM_write_bio_X509(certmem, cert) == 1) - { - ptrlen = BIO_get_mem_data(certmem, &ptr); - fwrite(ptr, 1, ptrlen, ofp); - } - - BIO_free(certmem); - } - - /* insert proxy private key, read from private key file */ - - while ((c = fgetc(ifp)) != EOF) fputc(c, ofp); - unlink(prvkeyfile); - free(prvkeyfile); - - for (i=1; i <= sk_X509_num(certstack) - 1; ++i) - /* loop through the proxy chain starting at 2nd most recent proxy */ - { - if (cert = sk_X509_value(certstack, i)) - { - certmem = BIO_new(BIO_s_mem()); - if (PEM_write_bio_X509(certmem, cert) == 1) - { - ptrlen = BIO_get_mem_data(certmem, &ptr); - fwrite(ptr, 1, ptrlen, ofp); - } - - BIO_free(certmem); - } - } - - sk_X509_free(certstack); - - if (fclose(ifp) != 0) return GRST_RET_FAILED; - if (fclose(ofp) != 0) return GRST_RET_FAILED; - - return GRST_RET_OK; -} diff --git a/org.gridsite.core/src/grst_xacml.c b/org.gridsite.core/src/grst_xacml.c deleted file mode 100644 index 2ced7ff..0000000 --- a/org.gridsite.core/src/grst_xacml.c +++ /dev/null @@ -1,566 +0,0 @@ -/* - Andrew McNab and Shiv Kaushal, University of Manchester. - Copyright (c) 2002-3. All rights reserved. - - Redistribution and use in source and binary forms, with or - without modification, are permitted provided that the following - conditions are met: - - o Redistributions of source code must retain the above - copyright notice, this list of conditions and the following - disclaimer. - o Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following - disclaimer in the documentation and/or other materials - provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND - CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS - BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED - TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - POSSIBILITY OF SUCH DAMAGE. -*/ -/*------------------------------------------------------------------------* - * For more information about GridSite: http://www.gridpp.ac.uk/gridsite/ * - *------------------------------------------------------------------------*/ - -#include -#include -#include -#include -#include -#include -#include -#include - -#ifndef _GNU_SOURCE -#define _GNU_SOURCE -#endif -#include - -#include -#include -#include - -#include "gridsite.h" - -//#define XACML_DEBUG - -#ifdef XACML_DEBUG - #define XACML_DEBUG_FILE "/tmp/grstxacmldebug.out" -#endif - - -/* * - * Global variables, shared by all GACL functions by private to libgacl * - * */ - -extern char *grst_perm_syms[]; -extern GRSTgaclPerm grst_perm_vals[]; - - -FILE* debugfile; - -GRSTgaclAcl *GRSTgaclAclParse(xmlDocPtr, xmlNodePtr, GRSTgaclAcl *); -GRSTgaclAcl *GRSTxacmlAclParse(xmlDocPtr, xmlNodePtr, GRSTgaclAcl *); - -/* * - * Functions to read in XACML 1.1 compliant format ACL * - * Functions based on method for opening GACL format * - * */ - -// need to check these for libxml memory leaks? - what needs to be freed? - - -static GRSTgaclCred *GRSTxacmlCredParse(xmlNodePtr cur) -/* - GRSTxacmlCredParse - parse a credential stored in the libxml structure cur, - returning it as a pointer or NULL on error. -*/ -{ - xmlNodePtr attr_val; - xmlNodePtr attr_des; - GRSTgaclCred *cred; - - // cur points to or , loop done outside this function. - - if ( (xmlStrcmp(cur->name, (const xmlChar *) "AnySubject") == 0)) cred = GRSTgaclCredNew("any-user"); - - else{ - - attr_val=cur->xmlChildrenNode->xmlChildrenNode; - attr_des=attr_val->next; - - cred = GRSTgaclCredNew((char *) xmlNodeGetContent(attr_des->properties->children)); - - cred->next = NULL; - - //Assumed that there is only one name/value pair per credential - GRSTgaclCredAddValue(cred, (char *) xmlNodeGetContent(attr_des->properties->next->children), - (char *) xmlNodeGetContent(attr_val)); - } - - return cred; -} - -static GRSTgaclEntry *GRSTxacmlEntryParse(xmlNodePtr cur) -/* - GRSTxacmlEntryParse - parse an entry stored in the libxml structure cur, - returning it as a pointer or NULL on error. Also checks to see if the following - tag refers to the same by checking the of both -*/ -{ - int i, check=0; - xmlDocPtr doc=cur->doc; - xmlNodePtr cur2; - xmlNodePtr rule_root=cur; - GRSTgaclEntry *entry; - GRSTgaclCred *cred; - GRSTgaclPerm perm; - - - // Next line not needed as function only called if tag found - // if (xmlStrcmp(cur->name, (const xmlChar *) "Rule") != 0) return NULL; - // cur and rule_root point to the tag - - cur = cur->xmlChildrenNode->xmlChildrenNode; - // cur should now be pointing at tag -#ifdef XACML_DEBUG - fprintf (debugfile, "Starting to Parse Entry\n"); -#endif - entry = GRSTgaclEntryNew(); - - while (cur!=NULL){ - - if (xmlStrcmp(cur->name, (const xmlChar *) "Subjects") == 0){ -#ifdef XACML_DEBUG - fprintf (debugfile, "Starting to Parse Credentials\n"); -#endif - if (check==0){ - // cur still pointing at tag make cur2 point to and loop over them. - cur2=cur->xmlChildrenNode; - while (cur2!=NULL){ - if ( ((cred = GRSTxacmlCredParse(cur2)) != NULL) && (!GRSTgaclEntryAddCred(entry, cred))){ - GRSTgaclCredFree(cred); - GRSTgaclEntryFree(entry); - return NULL; - } - cur2=cur2->next; - } - } - } - - else if (xmlStrcmp(cur->name, (const xmlChar *) "Actions") == 0){ -#ifdef XACML_DEBUG - fprintf (debugfile, "Starting to Parse Permissions\n"); -#endif - if (xmlStrcmp(xmlNodeGetContent(rule_root->properties->next->children), (const xmlChar *) "Permit") == 0 ){ -#ifdef XACML_DEBUG - fprintf (debugfile, "\tPermit-ed actions: "); -#endif - for (cur2 = cur->xmlChildrenNode; cur2 != NULL; cur2=cur2->next) //cur2-> - for (i=0; grst_perm_syms[i] != NULL; ++i) - if (xmlStrcmp(xmlNodeGetContent(cur2->xmlChildrenNode->xmlChildrenNode), (const xmlChar *) grst_perm_syms[i]) == 0) - { -#ifdef XACML_DEBUG - fprintf (debugfile, "%s ", grst_perm_syms[i]); -#endif - GRSTgaclEntryAllowPerm(entry, grst_perm_vals[i]); - } - } - - if (xmlStrcmp(xmlNodeGetContent(rule_root->properties->next->children), (const xmlChar *) "Deny") == 0 ) { -#ifdef XACML_DEBUG - fprintf (debugfile, "\tDeny-ed actions: "); -#endif - for (cur2 = cur->xmlChildrenNode; cur2 != NULL; cur2=cur2->next) //cur2-> - for (i=0; grst_perm_syms[i] != NULL; ++i) - if (xmlStrcmp(xmlNodeGetContent(cur2->xmlChildrenNode->xmlChildrenNode), (const xmlChar *) grst_perm_syms[i]) == 0) - { - -#ifdef XACML_DEBUG - fprintf (debugfile, "%s ", grst_perm_syms[i]); -#endif - GRSTgaclEntryDenyPerm(entry, grst_perm_vals[i]); - } - } - - } - else{ // I cannot parse this - give up rather than get it wrong -#ifdef XACML_DEBUG - fprintf (debugfile, "OOOPSIE\n"); -#endif - GRSTgaclEntryFree(entry); - return NULL; - } - - cur=cur->next; - - // Check if next Rule should be included when end of current rule reached - // If RuleId are from the same entry (eg Entry1A and Entry1D) - // make cur point to the next Rule's tag - if (cur==NULL) - if (check==0) - if (rule_root->next!=NULL) - if ( strncmp(xmlNodeGetContent(rule_root->properties->children), // RuleId of this Rule - xmlNodeGetContent(rule_root->next->properties->children), // RuleId of next Rule - 6) == 0){ -#ifdef XACML_DEBUG - fprintf (debugfile, "End of perms and creds, next is %s \n", xmlNodeGetContent(rule_root->next->properties->children)); -#endif - rule_root=rule_root->next; - cur=rule_root->xmlChildrenNode->xmlChildrenNode; -#ifdef XACML_DEBUG - fprintf (debugfile, "skipped to <%s> tag of next Rule\n", cur->name); -#endif - check++; - } - } - - return entry; -} - -GRSTgaclAcl *GRSTxacmlAclLoadFile(char *filename) -{ - xmlDocPtr doc; - xmlNodePtr cur; - GRSTgaclAcl *acl; - - doc = xmlParseFile(filename); - if (doc == NULL) return NULL; - - cur = xmlDocGetRootElement(doc); - if (cur == NULL) return NULL; - - if (!xmlStrcmp(cur->name, (const xmlChar *) "Policy")) { acl=GRSTxacmlAclParse(doc, cur, acl);} - else if (!xmlStrcmp(cur->name, (const xmlChar *) "gacl")) {acl=GRSTgaclAclParse(doc, cur, acl);} - else /* ACL format not recognised */ - { - xmlFreeDoc(doc); - free(cur); - return NULL; - } - - xmlFreeDoc(doc); - return acl; -} - -GRSTgaclAcl *GRSTxacmlAclParse(xmlDocPtr doc, xmlNodePtr cur, GRSTgaclAcl *acl) -{ - GRSTgaclEntry *entry; - - #ifdef XACML_DEBUG - debugfile=fopen(XACML_DEBUG_FILE, "w"); - fprintf (debugfile, "ACL loaded..\n"); - fprintf (debugfile, "Parsing XACML\n"); - #endif - - // Have an XACML policy file. - // Skip tag and set cur to first tag - cur = cur->xmlChildrenNode->next; - - acl = GRSTgaclAclNew(); - - while (cur != NULL){ - - if ( !xmlStrcmp(cur->name, (const xmlChar *)"Rule") ) - { // IF statement not needed? - #ifdef XACML_DEBUG - fprintf (debugfile, "Rule %s found\n", xmlNodeGetContent(cur->properties->children) ); - fprintf (debugfile, "Parsing Entry for this rule\n"); - #endif - entry = GRSTxacmlEntryParse(cur); - - if (entry == NULL) - { - GRSTgaclAclFree(acl); - return NULL; - } - else GRSTgaclAclAddEntry(acl, entry); - - #ifdef XACML_DEBUG - fprintf (debugfile, "Entry read in\n\n"); - #endif - } - - // If the current and next Rules are part of the same entry then advance two Rules - // If not then advance 1 - if (cur->next != NULL) - { - if ( strncmp(xmlNodeGetContent(cur->properties->children), // RuleId of this Rule - xmlNodeGetContent(cur->next->properties->children), // RuleId of next Rule - 6) == 0) - { - #ifdef XACML_DEBUG - fprintf (debugfile, "skipping next rule %s, should have been caught previously\n\n", xmlNodeGetContent(cur->next->properties->children) ); - #endif - cur=cur->next; - } // Check first 6 characters i.e. Entry1**/ - } - - cur=cur->next; - - } - - #ifdef XACML_DEBUG - fprintf (debugfile, "Finished loading ACL - Fanfare!\n"); - fclose(debugfile); - #endif - - return acl; -} - - -int GRSTxacmlFileIsAcl(char *pathandfile) -/* Return 1 if filename in *pathandfile starts GRST_ACL_FILE - Return 0 otherwise. */ -{ - char *filename; - - filename = rindex(pathandfile, '/'); - if (filename == NULL) filename = pathandfile; - else filename++; - - return (strncmp(filename, GRST_ACL_FILE, sizeof(GRST_ACL_FILE) - 1) == 0); -} - -char *GRSTxacmlFileFindAclname(char *pathandfile) -/* Return malloc()ed ACL filename that governs the given file or directory - (for directories, the ACL file is in the directory itself), or NULL if none - can be found. */ -{ - char *path, *p; - struct stat statbuf; - - path = malloc(strlen(pathandfile) + sizeof(GRST_ACL_FILE) + 1); - strcpy(path, pathandfile); - - if (stat(path, &statbuf) == 0) - { - if (!S_ISDIR(statbuf.st_mode)) /* can strip this / off straightaway */ - { - p = rindex(path, '/'); - if (p != NULL) *p = '\0'; - } - } - - while (path[0] != '\0') - { - strcat(path, "/"); - strcat(path, GRST_ACL_FILE); - - if (stat(path, &statbuf) == 0) return path; - - p = rindex(path, '/'); - *p = '\0'; /* strip off the / we added for ACL */ - - p = rindex(path, '/'); - if (p == NULL) break; /* must start without / and we there now ??? */ - - *p = '\0'; /* strip off another layer of / */ - } - - free(path); - return NULL; -} - -GRSTgaclAcl *GRSTxacmlAclLoadforFile(char *pathandfile) -/* Return ACL that governs the given file or directory (for directories, - the ACL file is in the directory itself.) */ -{ - char *path; - GRSTgaclAcl *acl; - - path = GRSTxacmlFileFindAclname(pathandfile); - - if (path != NULL) - { - acl = GRSTxacmlAclLoadFile(path); - free(path); - return acl; - } - - return NULL; -} - - - -/* * - * Functions to save ACL in XACML 1.1 compliant format * - * Functions based on method for saving to GACL format * - * */ - - -int GRSTxacmlCredPrint(GRSTgaclCred *cred, FILE *fp) -/* - GRSTxacmlCredPrint - print a credential and any name-value pairs is contains in XACML form -*/ -{ - char *q; - - if (cred->auri != NULL) - { - fputs("\t\t\t\t\n", fp); - fputs("\t\t\t\t\t\n", fp); - fputs("\t\t\t\t\t\t", fp); - for (q=cred->auri; *q != '\0'; ++q) - if (*q == '<') fputs("<", fp); - else if (*q == '>') fputs(">", fp); - else if (*q == '&') fputs("&" , fp); - else if (*q == '\'') fputs("'", fp); - else if (*q == '"') fputs(""", fp); - else fputc(*q, fp); - - - fputs("\n", fp); - - fputs("\t\t\t\t\t\t\n"); - fputs("\t\t\t\t\t\n", fp); - fputs("\t\t\t\t\n", fp); - } - else fputs("\t\t\t\t\n", fp); - - return 1; -} - - -int GRSTxacmlEntryPrint(GRSTgaclEntry *entry, FILE *fp, int rule_number) -{ - GRSTgaclCred *cred; - GRSTgaclPerm i; - - if (entry->allowed){ - - fprintf(fp, "\t\n", rule_number); - fputs("\t\t\n", fp); - fputs("\t\t\t\n", fp); - - for (cred = entry->firstcred; cred != NULL; cred = cred->next) - GRSTxacmlCredPrint(cred, fp); - - fputs("\t\t\t\n", fp); - fputs("\t\t\t\n", fp); - - for (i=GRST_PERM_READ; i <= GRST_PERM_ADMIN; ++i) - if ((entry->allowed) & i) GRSTxacmlPermPrint(i, fp); - - fputs("\t\t\t\n", fp); - fputs("\t\t\n", fp); - fputs("\t\n", fp); - } - - if (entry->denied){ - - fprintf(fp, "\t\n", rule_number); - fputs("\t\t\n", fp); - fputs("\t\t\t\n", fp); - - for (cred = entry->firstcred; cred != NULL; cred = cred->next) - GRSTxacmlCredPrint(cred, fp); - - fputs("\t\t\t\n", fp); - fputs("\t\t\t\n", fp); - - for (i=GRST_PERM_READ; i <= GRST_PERM_ADMIN; ++i) - if (entry->denied & i) GRSTxacmlPermPrint(i, fp); - - fputs("\t\t\t\n", fp); - fputs("\t\t\n", fp); - fputs("\t\n", fp); - } - return 1; -} - - -int GRSTxacmlPermPrint(GRSTgaclPerm perm, FILE *fp) -{ - GRSTgaclPerm i; - - for (i=GRST_PERM_READ; grst_perm_syms[i] != NULL; ++i) - if (perm == grst_perm_vals[i]) - { - - fputs("\t\t\t\t\n", fp); - fputs("\t\t\t\t\t\n", fp); - fputs("\t\t\t\t\t\t", fp); - fprintf(fp, "%s", grst_perm_syms[i]); - fputs("\n", fp); - fputs("\t\t\t\t\t\t\n", fp); - fputs("\t\t\t\t\t\n", fp); - fputs("\t\t\t\t\n",fp); - - return 1; - } - - return 0; -} - -int GRSTxacmlAclPrint(GRSTgaclAcl *acl, FILE *fp, char* dir_uri) -{ - GRSTgaclEntry *entry; - int rule_number=1; - - fputs("\n\n", fp); - - fputs("\t\n\t\t\n\t\t\t\n", fp); - fputs("\t\t\t\t\n", fp); - fputs("\t\t\t\t\t", fp); - fprintf(fp, "%s", dir_uri); - fputs("\n", fp); - fputs("\t\t\t\t\t\n", fp); - - fputs("\t\t\t\t\n\t\t\t\n\t\t\n\t\t\n\t\t\t\n\t\t", fp); - fputs("\n\t\t\n\t\t\t\n\t\t\n\t\n\n", fp); - - for (entry = acl->firstentry; entry != NULL; entry = entry->next){ - - GRSTxacmlEntryPrint(entry, fp, rule_number); - rule_number++; - } - - fputs("\n", fp); - - return 1; -} - -int GRSTxacmlAclSave(GRSTgaclAcl *acl, char *filename, char* dir_uri) -{ - int ret; - FILE *fp; - - fp = fopen(filename, "w"); - if (fp == NULL) return 0; - - fprintf(fp,"\n"); - - ret = GRSTxacmlAclPrint(acl, fp, dir_uri); - - fclose(fp); - - return ret; -} - - - - diff --git a/org.gridsite.core/src/gsexec.c b/org.gridsite.core/src/gsexec.c deleted file mode 100644 index 4278c77..0000000 --- a/org.gridsite.core/src/gsexec.c +++ /dev/null @@ -1,1104 +0,0 @@ -/* Copyright 1999-2004 The Apache Software Foundation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/* - * suexec.c -- "Wrapper" support program for suEXEC behaviour for Apache - * - *********************************************************************** - * - * NOTE! : DO NOT edit this code!!! Unless you know what you are doing, - * editing this code might open up your system in unexpected - * ways to would-be crackers. Every precaution has been taken - * to make this code as safe as possible; alter it at your own - * risk. - * - *********************************************************************** - * - * - */ - -#include "apr.h" -#include "apr_file_io.h" -#include "ap_config.h" -#include "gsexec.h" - -#include -#include -#include -#include -#include -#if APR_HAVE_UNISTD_H -#include -#endif - -#include -#include -#include - -#ifdef HAVE_PWD_H -#include -#endif - -#ifdef HAVE_GRP_H -#include -#endif - -/* - *********************************************************************** - * There is no initgroups() in QNX, so I believe this is safe :-) - * Use cc -osuexec -3 -O -mf -DQNX suexec.c to compile. - * - * May 17, 1997. - * Igor N. Kovalenko -- infoh mail.wplus.net - *********************************************************************** - */ - -#if defined(NEED_INITGROUPS) -int initgroups(const char *name, gid_t basegid) -{ - /* QNX and MPE do not appear to support supplementary groups. */ - return 0; -} -#endif - -#if defined(SUNOS4) -extern char *sys_errlist[]; -#define strerror(x) sys_errlist[(x)] -#endif - -#if defined(PATH_MAX) -#define AP_MAXPATH PATH_MAX -#elif defined(MAXPATHLEN) -#define AP_MAXPATH MAXPATHLEN -#else -#define AP_MAXPATH 8192 -#endif - -#define AP_ENVBUF 256 - -extern char **environ; -static FILE *log = NULL; - -char *safe_env_lst[] = -{ - /* variable name starts with */ - "HTTP_", - "SSL_", - "GRST_", - - /* variable name is */ - "AUTH_TYPE=", - "CONTENT_LENGTH=", - "CONTENT_TYPE=", - "DATE_GMT=", - "DATE_LOCAL=", - "DOCUMENT_NAME=", - "DOCUMENT_PATH_INFO=", - "DOCUMENT_ROOT=", - "DOCUMENT_URI=", - "GATEWAY_INTERFACE=", - "HTTPS=", - "LAST_MODIFIED=", - "PATH_INFO=", - "PATH_TRANSLATED=", - "QUERY_STRING=", - "QUERY_STRING_UNESCAPED=", - "REMOTE_ADDR=", - "REMOTE_HOST=", - "REMOTE_IDENT=", - "REMOTE_PORT=", - "REMOTE_USER=", - "REDIRECT_HANDLER=", - "REDIRECT_QUERY_STRING=", - "REDIRECT_REMOTE_USER=", - "REDIRECT_STATUS=", - "REDIRECT_URL=", - "REQUEST_METHOD=", - "REQUEST_URI=", - "SCRIPT_FILENAME=", - "SCRIPT_NAME=", - "SCRIPT_URI=", - "SCRIPT_URL=", - "SERVER_ADMIN=", - "SERVER_NAME=", - "SERVER_ADDR=", - "SERVER_PORT=", - "SERVER_PROTOCOL=", - "SERVER_SIGNATURE=", - "SERVER_SOFTWARE=", - "UNIQUE_ID=", - "USER_NAME=", - "TZ=", - NULL -}; - - -static void err_output(int is_error, const char *fmt, va_list ap) -{ -#ifdef AP_LOG_EXEC - time_t timevar; - struct tm *lt; - - if (!log) { - if ((log = fopen(AP_LOG_EXEC, "a")) == NULL) { - fprintf(stderr, "suexec failure: could not open log file\n"); - perror("fopen"); - exit(1); - } - } - - if (is_error) { - fprintf(stderr, "suexec policy violation: see suexec log for more " - "details\n"); - } - - time(&timevar); - lt = localtime(&timevar); - - fprintf(log, "[%d-%.2d-%.2d %.2d:%.2d:%.2d]: ", - lt->tm_year + 1900, lt->tm_mon + 1, lt->tm_mday, - lt->tm_hour, lt->tm_min, lt->tm_sec); - - vfprintf(log, fmt, ap); - - fflush(log); -#endif /* AP_LOG_EXEC */ - return; -} - -static void log_err(const char *fmt,...) -{ -#ifdef AP_LOG_EXEC - va_list ap; - - va_start(ap, fmt); - err_output(1, fmt, ap); /* 1 == is_error */ - va_end(ap); -#endif /* AP_LOG_EXEC */ - return; -} - -static void log_no_err(const char *fmt,...) -{ -#ifdef AP_LOG_EXEC - va_list ap; - - va_start(ap, fmt); - err_output(0, fmt, ap); /* 0 == !is_error */ - va_end(ap); -#endif /* AP_LOG_EXEC */ - return; -} - -static void clean_env(void) -{ - char pathbuf[512]; - char **cleanenv; - char **ep; - int cidx = 0; - int idx; - - /* While cleaning the environment, the environment should be clean. - * (e.g. malloc() may get the name of a file for writing debugging info. - * Bad news if MALLOC_DEBUG_FILE is set to /etc/passwd. Sprintf() may be - * susceptible to bad locale settings....) - * (from PR 2790) - */ - char **envp = environ; - char *empty_ptr = NULL; - - environ = &empty_ptr; /* VERY safe environment */ - - if ((cleanenv = (char **) calloc(AP_ENVBUF, sizeof(char *))) == NULL) { - log_err("failed to malloc memory for environment\n"); - exit(120); - } - - sprintf(pathbuf, "PATH=%s", AP_SAFE_PATH); - cleanenv[cidx] = strdup(pathbuf); - cidx++; - - for (ep = envp; *ep && cidx < AP_ENVBUF-1; ep++) { - for (idx = 0; safe_env_lst[idx]; idx++) { - if (!strncmp(*ep, safe_env_lst[idx], - strlen(safe_env_lst[idx]))) { - cleanenv[cidx] = *ep; - cidx++; - break; - } - } - } - - cleanenv[cidx] = NULL; - - environ = cleanenv; -} - -/* Pool account functions */ - - -#include -#include -#include -#include -#include -#include -#include - -/****************************************************************************** -Function: mapdir_otherlink -Description: - find another link in map directory to the same inode as firstlink - and change the modification time of firstlink to now (so that we - always know when this pair was last used) - -Parameters: - firstlink, the filename of the link we already know - -Returns: - a pointer to the other link's filename (without path) or NULL if none - found (this is malloc'd and will need freeing) - -******************************************************************************/ -static char *mapdir_otherlink(char *mapdir, char *firstlink) -{ - int ret; - char *firstlinkpath, *otherlinkdup, *otherlinkpath; - struct dirent *mapdirentry; - DIR *mapdirstream; - struct stat statbuf; - ino_t firstinode; - - firstlinkpath = malloc(strlen(mapdir) + 2 + strlen(firstlink)); - sprintf(firstlinkpath, "%s/%s", mapdir, firstlink); - ret = stat(firstlinkpath, &statbuf); - free(firstlinkpath); - if (ret != 0) return NULL; - if (statbuf.st_nlink != 2) return NULL; - - firstinode = statbuf.st_ino; /* save for comparisons */ - - mapdirstream = opendir(mapdir); - - if (mapdirstream != NULL) - { - while ((mapdirentry = readdir(mapdirstream)) != NULL) - { - if (strcmp(mapdirentry->d_name, firstlink) == 0) continue; - - otherlinkpath = malloc(strlen(mapdir) + 2 + - strlen(mapdirentry->d_name)); - sprintf(otherlinkpath, "%s/%s", mapdir, - mapdirentry->d_name); - - ret = stat(otherlinkpath, &statbuf); - if ((ret == 0) && (statbuf.st_ino == firstinode)) - { - utime(otherlinkpath, (struct utimbuf *) NULL); - free(otherlinkpath); - otherlinkdup = strdup(mapdirentry->d_name); - closedir(mapdirstream); - return otherlinkdup; - } - else free(otherlinkpath); - } - - closedir(mapdirstream); - } - - return NULL; -} - -/****************************************************************************** -Function: mapdir_urlencode -Description: - Convert string to URL encoded and return pointer to the encoded - version, obtained through malloc. Calling routine must free - this. Here "URL encoded" means anything other than an isalnum() - goes to %HH where HH is its ascii value in hex; also A-Z => a-z - This name is suitable for filenames since no / or spaces. - -Parameters: - rawstring, the string to be converted - -Returns: - a pointer to the encoded string or NULL if the malloc failed - -******************************************************************************/ -static char *mapdir_urlencode(char *rawstring) -{ - int encodedchar = 0, rawchar = 0; - char * encodedstring; - - encodedstring = (char *) malloc(3 * strlen(rawstring) + 1); - - if (encodedstring == NULL) return (char *) NULL; - - while (rawstring[rawchar] != '\0') - { - if (isalnum(rawstring[rawchar])) - { - encodedstring[encodedchar] = tolower(rawstring[rawchar]); - ++rawchar; - ++encodedchar; - } - else - { - sprintf(&encodedstring[encodedchar], "%%%02x", - rawstring[rawchar]); - ++rawchar; - encodedchar = encodedchar + 3; - } - } - - encodedstring[encodedchar] = '\0'; - - return encodedstring; -} - -/****************************************************************************** -Function: mapdir_newlease -Description: - Search for an unleased local username to give to the X.509 DN or - directory key corresponding to encodedfilename, and then lease it. - -Parameters: - encodedfilename, URL-encoded X.509 DN or directory key to associate - with an unlease pool username - -Returns: - no return value -******************************************************************************/ - -void mapdir_newlease(char *mapdir, char *encodedkey) -{ - int ret; - char *userfilename, *encodedfilename; - struct dirent *mapdirentry; - DIR *mapdirstream; - struct stat statbuf; - - encodedfilename = malloc(strlen(mapdir) + (size_t) 2 + - strlen(encodedkey)); - sprintf(encodedfilename, "%s/%s", mapdir, encodedkey); - - mapdirstream = opendir(mapdir); - - while ((mapdirentry = readdir(mapdirstream)) != NULL) - { - /* we dont want any files that dont look like acceptable usernames */ - if ((*(mapdirentry->d_name) == '%') || - (strcmp(mapdirentry->d_name, "root") == 0)) continue; - else if (*(mapdirentry->d_name) == '.') continue; - else if (index(mapdirentry->d_name, '~') != NULL) continue; - - userfilename = malloc(strlen(mapdir) + (size_t) 2 + - strlen(mapdirentry->d_name)); - sprintf(userfilename, "%s/%s", mapdir, mapdirentry->d_name); - stat(userfilename, &statbuf); - - if (statbuf.st_nlink == 1) /* this one isnt leased yet */ - { - ret = link(userfilename, encodedfilename); - free(userfilename); - if (ret != 0) - { - /* link failed: this is probably because a VERY lucky - other process has obtained a lease for encodedfilename - while we were faffing around */ - closedir(mapdirstream); - free(encodedfilename); - return; - } - - stat(encodedfilename, &statbuf); - if (statbuf.st_nlink > 2) - { - /* two keys have grabbed the same username: back off */ - unlink(encodedfilename); - continue; - } - - closedir(mapdirstream); - free(encodedfilename); - return; /* link worked ok, so return */ - } - else free(userfilename); /* already in use, try next one */ - } - - closedir(mapdirstream); - free(encodedfilename); - return; /* no unleased names left: give up */ -} - -/****************************************************************************** -Based on gridmapdir_userid: - -Function: gridmapdir_userid -Description: - This is equivalent to globus_gss_assist_gridmap but for the dynamic - user ids in the gridmapdir: maps a globusID to a local unix user id, - either one already leased, or calls gridmapdir_newlease() to obtain - a new lease. This is called by globus_gss_assist_gridmap if the - local user id in the static gridmap file begins . (for a dynamic id) - -Parameters: - globusidp, globus client name who requested authentication - usernameprefix, prefix of the local usernames which would - be acceptable (or "\0" ) - *userid returned userid name for local system. - -Returns: - - 0 on success - !=0 on failure - -******************************************************************************/ - - - -int GRSTexecGetMapping(char **target_uname, char **target_gname, - char *mapdir, char *key) -{ - char *encodedkey; - struct passwd *pw = NULL; - - if (key[0] != '/') return 1; /* must be a proper X.509 DN or path */ - - encodedkey = mapdir_urlencode(key); - *target_uname = mapdir_otherlink(mapdir, encodedkey); - - if (*target_uname == NULL) /* maybe no lease yet */ - { - mapdir_newlease(mapdir, encodedkey); - /* try making a lease */ - - *target_uname = mapdir_otherlink(mapdir, encodedkey); - /* check if there is a now a lease - possibly made by someone else */ - - if (*target_uname == NULL) - { - free(encodedkey); - return 1; /* still no good */ - } - } - - free(encodedkey); - - /* - * Get the group name of target user. - (Contributed by Gerben Venekamp venekamp@nikhef.nl ) - */ - - if ((pw = getpwnam(*target_uname)) != NULL) - { - struct group grp = { NULL, NULL, -1, NULL }; - struct group *tst = NULL; - char tmp_buf[100]; - - /* - * NOTE: Do not use the getgrgid() function call! Calling this function - * will overwrite the contents of the internal buffer associated with - * this call. Hence, further down the execution path we will run into - * a wall, head first; simply because the guid has changed to that of - * the targer uid. The only solution out of the situation is avoiding - * the function call and manage the needed buffers ourselves. - */ - - switch (getgrgid_r(pw->pw_gid, &grp, tmp_buf, sizeof(tmp_buf), &tst)) - { - case 0: /* no error */ - *target_gname = strdup(grp.gr_name); - break; - case ERANGE: - log_err("The buffer for holding strings is too small " - "(%d byte now)\n", sizeof(tmp_buf)); - break; - default: - log_err("Could not get group name for user (%s)\n", - *target_uname); - } - - /* Test if all was well. */ - - if (target_gname == NULL) - { - exit(102); - } - } - else - { - log_err("Could not get info for the target user (%s)\n",*target_uname); - exit(102); - } - - log_no_err("target group name determined (%s -> %s)\n", - *target_uname, *target_gname); - - return 0; -} - -void internal_server_error(void) -{ - /* use this when its probably an httpd.conf configuration error */ - - puts("Status: 500 Internal Server Error\n" - "Content-Type: text/html\n\n" - "500 Internal Server Error\n" - "

    Internal Server Error

    "); -} - -void forbidden_error(void) -{ - /* use this when unix file permissions/ownerships are probably wrong */ - - puts("Status: 403 Forbidden\n" - "Content-Type: text/html\n\n" - "403 Forbidden\n" - "

    Forbidden

    "); -} - -int main(int argc, char *argv[]) -{ - int userdir = 0; /* ~userdir flag */ - uid_t uid; /* user information */ - gid_t gid; /* target group placeholder */ - uid_t httpd_uid; /* uid for AP_HTTPD_USER */ - gid_t httpd_gid; /* uid for AP_HTTPD_GROUP */ - char *mapping_type; /* suexec / X509DN / directory */ - char *grst_cred_0; /* GRST_CRED_0 */ - char *map_x509dn; /* DN to use as pool acct. key */ - char *map_directory; /* directory as pool acct. key */ - - char *diskmode_env; /* GRST_DISK_MODE as a string */ - apr_fileperms_t diskmode_apr; /* GRST_DISK_MODE as Apache perms */ - mode_t diskmode_t; /* GRST_DISK_MODE as mode_t */ - - char *target_uname; /* target user name */ - char *target_gname; /* target group name */ - char *target_homedir; /* target home directory */ - char *actual_uname; /* actual user name */ - char *actual_gname; /* actual group name */ - char *prog; /* name of this program */ - char *cmd; /* command to be executed */ - char cwd[AP_MAXPATH]; /* current working directory */ - char dwd[AP_MAXPATH]; /* docroot working directory */ - struct passwd *pw; /* password entry holder */ - struct group *gr; /* group entry holder */ - struct stat dir_info; /* directory info holder */ - struct stat prg_info; /* program info holder */ - - /* - * Start with a "clean" environment - */ - clean_env(); - - prog = argv[0]; - /* - * Check existence/validity of the UID of the user - * running this program. Error out if invalid. - */ - uid = getuid(); - if ((pw = getpwuid(uid)) == NULL) { - log_err("crit: invalid uid: (%ld)\n", uid); - internal_server_error(); - exit(102); - } - /* - * Check existence/validity of the GID of the user - * running this program. Error out if invalid. - */ - gid = getgid(); - if ((gr = getgrgid(gid)) == NULL) { - log_err("crit: invalid gid: (%ld)\n", gid); - internal_server_error(); - exit(102); - } - /* - * See if this is a 'how were you compiled' request, and - * comply if so. - */ - if ((argc > 1) - && (! strcmp(argv[1], "-V")) - && ((uid == 0) -#ifdef _OSD_POSIX - /* User name comparisons are case insensitive on BS2000/OSD */ - || (! strcasecmp(AP_HTTPD_USER, pw->pw_name))) -#else /* _OSD_POSIX */ - || (! strcmp(AP_HTTPD_USER, pw->pw_name))) -#endif /* _OSD_POSIX */ - ) { -#ifdef AP_DOC_ROOT - fprintf(stderr, " -D AP_DOC_ROOT=\"%s\"\n", AP_DOC_ROOT); -#endif -#ifdef AP_GID_MIN - fprintf(stderr, " -D AP_GID_MIN=%d\n", AP_GID_MIN); -#endif -#ifdef AP_HTTPD_USER - fprintf(stderr, " -D AP_HTTPD_USER=\"%s\"\n", AP_HTTPD_USER); -#endif -#ifdef AP_LOG_EXEC - fprintf(stderr, " -D AP_LOG_EXEC=\"%s\"\n", AP_LOG_EXEC); -#endif -#ifdef AP_SAFE_PATH - fprintf(stderr, " -D AP_SAFE_PATH=\"%s\"\n", AP_SAFE_PATH); -#endif -#ifdef AP_SUEXEC_UMASK - fprintf(stderr, " -D AP_SUEXEC_UMASK=%03o\n", AP_SUEXEC_UMASK); -#endif -#ifdef AP_UID_MIN - fprintf(stderr, " -D AP_UID_MIN=%d\n", AP_UID_MIN); -#endif -#ifdef AP_USERDIR_SUFFIX - fprintf(stderr, " -D AP_USERDIR_SUFFIX=\"%s\"\n", AP_USERDIR_SUFFIX); -#endif - exit(0); - } - /* - * If there are a proper number of arguments, set - * all of them to variables. Otherwise, error out. - */ - if (argc < 4) { - log_err("too few arguments\n"); - internal_server_error(); - exit(101); - } - - mapping_type = getenv("GRST_EXEC_METHOD"); - if ((mapping_type == NULL) || - (mapping_type[0] == '\0') || - (strcasecmp(mapping_type, "suexec") == 0)) - { - target_uname = argv[1]; - target_gname = argv[2]; - mapping_type = NULL; - } - else if (strcasecmp(mapping_type, "X509DN") == 0) - { - if ((grst_cred_0 = getenv("GRST_CRED_0")) == NULL) - map_x509dn = getenv("SSL_CLIENT_S_DN"); - else map_x509dn = index(grst_cred_0, '/'); - - if ((map_x509dn == NULL) || (map_x509dn[0] == '\0')) - { - log_err("No GRST_CRED_0/SSL_CLIENT_S_DN despite X509DN mapping\n"); - forbidden_error(); - exit(151); - } - - if (GRSTexecGetMapping(&target_uname, &target_gname, - GRST_EXECMAPDIR, map_x509dn) - != 0) - { - log_err("GRSTexecGetMapping() failed mapping \"%s\"\n", - map_x509dn); - forbidden_error(); - exit(152); - } - } - else if (strcasecmp(mapping_type, "directory") == 0) - { - map_directory = getenv("GRST_EXEC_DIRECTORY"); - if (map_directory == NULL) - { - log_err("No GRST_EXEC_DIRECTORY despite directory mapping\n"); - internal_server_error(); - exit(153); - } - - if (GRSTexecGetMapping(&target_uname, &target_gname, - GRST_EXECMAPDIR, map_directory) - != 0) - { - log_err("GRSTexecGetMapping() failed mapping \"%s\"\n", - map_directory); - internal_server_error(); - exit(154); - } - } - else - { - log_err("mapping type \"%s\" not recognised\n", mapping_type); - internal_server_error(); - exit(155); - } - - cmd = argv[3]; - - /* - * Check to see if the user running this program - * is the user allowed to do so as defined in - * suexec.h. If not the allowed user, error out. - */ -#ifdef _OSD_POSIX - /* User name comparisons are case insensitive on BS2000/OSD */ - if (strcasecmp(AP_HTTPD_USER, pw->pw_name)) { - log_err("user mismatch (%s instead of %s)\n", pw->pw_name, AP_HTTPD_USER); - internal_server_error(); - exit(103); - } - /* User name comparisons are case insensitive on BS2000/OSD */ - if (strcasecmp(AP_HTTPD_GROUP, gr->gr_name)) { - log_err("group mismatch (%s instead of %s)\n", gr->gr_name, AP_HTTPD_GROUP); - internal_server_error(); - exit(103); - } -#else /*_OSD_POSIX*/ - if (strcmp(AP_HTTPD_USER, pw->pw_name)) { - log_err("user mismatch (%s instead of %s)\n", pw->pw_name, AP_HTTPD_USER); - internal_server_error(); - exit(103); - } - if (strcmp(AP_HTTPD_GROUP, gr->gr_name)) { - log_err("group mismatch (%s instead of %s)\n", gr->gr_name, AP_HTTPD_GROUP); - internal_server_error(); - exit(103); - } -#endif /*_OSD_POSIX*/ - - /* Since they match (via name) save these for later */ - - httpd_uid = uid; - httpd_gid = gid; - - /* - * Check for a leading '/' (absolute path) in the command to be executed, - * or attempts to back up out of the current directory, - * to protect against attacks. If any are - * found, error out. Naughty naughty crackers. - */ - if ((cmd[0] == '/') || (!strncmp(cmd, "../", 3)) - || (strstr(cmd, "/../") != NULL)) { - log_err("invalid command (%s)\n", cmd); - internal_server_error(); - exit(104); - } - - /* - * Check to see if this is a ~userdir request. If - * so, set the flag, and remove the '~' from the - * target username. - */ - if (!strncmp("~", target_uname, 1)) { - target_uname++; - userdir = 1; - } - - /* - * Error out if the target username is invalid. - */ - if (strspn(target_uname, "1234567890") != strlen(target_uname)) { - if ((pw = getpwnam(target_uname)) == NULL) { - log_err("invalid target user name: (%s)\n", target_uname); - internal_server_error(); - exit(105); - } - } - else { - if ((pw = getpwuid(atoi(target_uname))) == NULL) { - log_err("invalid target user id: (%s)\n", target_uname); - internal_server_error(); - exit(121); - } - } - - /* - * Error out if the target group name is invalid. - */ - if (strspn(target_gname, "1234567890") != strlen(target_gname)) { - if ((gr = getgrnam(target_gname)) == NULL) { - log_err("invalid target group name: (%s)\n", target_gname); - internal_server_error(); - exit(106); - } - gid = gr->gr_gid; - actual_gname = strdup(gr->gr_name); - } - else { - gid = atoi(target_gname); - actual_gname = strdup(target_gname); - } - -#ifdef _OSD_POSIX - /* - * Initialize BS2000 user environment - */ - { - pid_t pid; - int status; - - switch (pid = ufork(target_uname)) { - case -1: /* Error */ - log_err("failed to setup bs2000 environment for user %s: %s\n", - target_uname, strerror(errno)); - internal_server_error(); - exit(150); - case 0: /* Child */ - break; - default: /* Father */ - while (pid != waitpid(pid, &status, 0)) - ; - /* @@@ FIXME: should we deal with STOP signals as well? */ - if (WIFSIGNALED(status)) { - kill (getpid(), WTERMSIG(status)); - } - internal_server_error(); - exit(WEXITSTATUS(status)); - } - } -#endif /*_OSD_POSIX*/ - - /* - * Save these for later since initgroups will hose the struct - */ - uid = pw->pw_uid; - actual_uname = strdup(pw->pw_name); - target_homedir = strdup(pw->pw_dir); - - /* - * Log the transaction here to be sure we have an open log - * before we setuid(). - */ - log_no_err("uid: (%s/%s) gid: (%s/%s) cmd: %s\n", - target_uname, actual_uname, - target_gname, actual_gname, - cmd); - - /* - * Error out if attempt is made to execute as root or as - * a UID less than AP_UID_MIN. Tsk tsk. - */ - if ((uid == 0) || (uid < AP_UID_MIN)) { - log_err("cannot run as forbidden uid (%d/%s)\n", uid, cmd); - internal_server_error(); - exit(107); - } - - /* - * Error out if attempt is made to execute as root group - * or as a GID less than AP_GID_MIN. Tsk tsk. - */ - if ((gid == 0) || (gid < AP_GID_MIN)) { - log_err("cannot run as forbidden gid (%d/%s)\n", gid, cmd); - internal_server_error(); - exit(108); - } - - /* - * Change UID/GID here so that the following tests work over NFS. - * - * Initialize the group access list for the target user, - * and setgid() to the target group. If unsuccessful, error out. - */ - if (((setgid(gid)) != 0) || (initgroups(actual_uname, gid) != 0)) { - log_err("failed to setgid (%ld: %s)\n", gid, cmd); - internal_server_error(); - exit(109); - } - - /* - * setuid() to the target user. Error out on fail. - */ - if ((setuid(uid)) != 0) { - log_err("failed to setuid (%ld: %s)\n", uid, cmd); - internal_server_error(); - exit(110); - } - - /* - * Get the current working directory, as well as the proper - * document root (dependant upon whether or not it is a - * ~userdir request). Error out if we cannot get either one, - * or if the current working directory is not in the docroot. - * Use chdir()s and getcwd()s to avoid problems with symlinked - * directories. Yuck. - */ - if (getcwd(cwd, AP_MAXPATH) == NULL) { - log_err("cannot get current working directory\n"); - internal_server_error(); - exit(111); - } - -#if 0 - if (userdir) { - if (((chdir(target_homedir)) != 0) || - ((chdir(AP_USERDIR_SUFFIX)) != 0) || - ((getcwd(dwd, AP_MAXPATH)) == NULL) || - ((chdir(cwd)) != 0)) { - log_err("cannot get docroot information (%s)\n", target_homedir); - internal_server_error(); - exit(112); - } - } - else { - if (((chdir(AP_DOC_ROOT)) != 0) || - ((getcwd(dwd, AP_MAXPATH)) == NULL) || - ((chdir(cwd)) != 0)) { - log_err("cannot get docroot information (%s)\n", AP_DOC_ROOT); - internal_server_error(); - exit(113); - } - } - - if ((strncmp(cwd, dwd, strlen(dwd))) != 0) { - log_err("command not in docroot (%s/%s)\n", cwd, cmd); - internal_server_error(); - exit(114); - } -#endif - - /* - * Stat the cwd and verify it is a directory, or error out. - */ - if (((lstat(cwd, &dir_info)) != 0) || !(S_ISDIR(dir_info.st_mode))) { - log_err("cannot stat directory: (%s)\n", cwd); - internal_server_error(); - exit(115); - } - - /* - * Error out if cwd is writable by others. - */ - if ((dir_info.st_mode & S_IWOTH) || (dir_info.st_mode & S_IWGRP)) { - log_err("directory is writable by others: (%s)\n", cwd); - forbidden_error(); - exit(116); - } - - /* - * Error out if we cannot stat the program. - */ - if (((lstat(cmd, &prg_info)) != 0) || (S_ISLNK(prg_info.st_mode))) { - log_err("cannot stat program: (%s)\n", cmd); - forbidden_error(); - exit(117); - } - - /* - * Error out if the program is writable by others. - */ - if (prg_info.st_mode & S_IWOTH) { - log_err("file is writable by others: (%s/%s)\n", cwd, cmd); - forbidden_error(); - exit(118); - } - - /* - * Error out if the file is setuid or setgid. - */ - if ((prg_info.st_mode & S_ISUID) || (prg_info.st_mode & S_ISGID)) { - log_err("file is either setuid or setgid: (%s/%s)\n", cwd, cmd); - forbidden_error(); - exit(119); - } - - /* - * Error out if the target name/group is different from - * the name/group of the cwd or the program AND the name/group - * of the cwd and program are not the AP_HTTPD_USER/AP_HTTPD_GROUP - * AND the name/group of the cwd and program are not root - */ - if (((uid != dir_info.st_uid) && (httpd_uid != dir_info.st_uid) - && (0 != dir_info.st_uid)) || - ((gid != dir_info.st_gid) && (httpd_gid != dir_info.st_gid) - && (0 != dir_info.st_gid)) || - ((uid != prg_info.st_uid) && (httpd_uid != prg_info.st_uid) - && (0 != prg_info.st_uid)) || - ((gid != prg_info.st_gid) && (httpd_gid != prg_info.st_gid) - && (0 != prg_info.st_gid))) - { - log_err("target (%ld/%ld) or %s (%ld/%ld) or root (0/0) uid/gid " - "mismatch with directory (%ld/%ld) or program (%ld/%ld)\n", - uid, gid, AP_HTTPD_USER, httpd_uid, httpd_gid, - dir_info.st_uid, dir_info.st_gid, - prg_info.st_uid, prg_info.st_gid); - forbidden_error(); - exit(120); - } - /* - * Error out if the program is not executable for the user. - * Otherwise, she won't find any error in the logs except for - * "[error] Premature end of script headers: ..." - */ - if (!(prg_info.st_mode & S_IXUSR)) { - log_err("file has no execute permission: (%s/%s)\n", cwd, cmd); - forbidden_error(); - exit(121); - } - - diskmode_env = getenv("GRST_DISK_MODE"); - if (diskmode_env != NULL) - { - diskmode_apr = 0; - sscanf(diskmode_env, "%i", &diskmode_apr); - - diskmode_t = S_IRUSR | S_IWUSR; - - if (diskmode_apr & APR_GREAD ) diskmode_t |= S_IRGRP; - if (diskmode_apr & APR_GWRITE) diskmode_t |= S_IWGRP; - if (diskmode_apr & APR_WREAD ) diskmode_t |= S_IROTH; - - diskmode_t &= (S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH); - -// log_err("diskmode_env=%s diskmode_apr=%x diskmode_t=%o ~diskmode_t=%o\n", diskmode_env, diskmode_apr, diskmode_t, ~diskmode_t); - - umask(~diskmode_t); - } -#ifdef AP_SUEXEC_UMASK - else umask(AP_SUEXEC_UMASK); -#else - else umask(~(S_IRUSR | S_IWUSR)); -#endif /* AP_SUEXEC_UMASK */ - - /* - * Be sure to close the log file so the CGI can't - * mess with it. If the exec fails, it will be reopened - * automatically when log_err is called. Note that the log - * might not actually be open if AP_LOG_EXEC isn't defined. - * However, the "log" cell isn't ifdef'd so let's be defensive - * and assume someone might have done something with it - * outside an ifdef'd AP_LOG_EXEC block. - */ - if (log != NULL) { - fclose(log); - log = NULL; - } - - /* - * Execute the command, replacing our image with its own. - */ -#ifdef NEED_HASHBANG_EMUL - /* We need the #! emulation when we want to execute scripts */ - { - extern char **environ; - - ap_execve(cmd, &argv[3], environ); - } -#else /*NEED_HASHBANG_EMUL*/ - execv(cmd, &argv[3]); -#endif /*NEED_HASHBANG_EMUL*/ - - /* - * (I can't help myself...sorry.) - * - * Uh oh. Still here. Where's the kaboom? There was supposed to be an - * EARTH-shattering kaboom! - * - * Oh well, log the failure and error out. - */ - log_err("(%d)%s: exec failed (%s)\n", errno, strerror(errno), cmd); - internal_server_error(); - exit(255); -} diff --git a/org.gridsite.core/src/gsexec.h b/org.gridsite.core/src/gsexec.h deleted file mode 100644 index b777421..0000000 --- a/org.gridsite.core/src/gsexec.h +++ /dev/null @@ -1,126 +0,0 @@ -/* Copyright 1999-2004 The Apache Software Foundation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/* - * suexec.h -- user-definable variables for the suexec wrapper code. - * (See README.configure on how to customize these variables.) - */ - - -#ifndef _SUEXEC_H -#define _SUEXEC_H - -/* - * Include ap_config_layout so we can work out where the default htdocsdir - * and logsdir are. - */ -#include "ap_config_layout.h" - -/* - * HTTPD_USER -- Define as the username under which Apache normally - * runs. This is the only user allowed to execute - * this program. - */ -#ifndef AP_HTTPD_USER -#define AP_HTTPD_USER "apache" -#endif - -/* - * HTTPD_GROUP -- Define as the group under which Apache normally - * runs. This is the only user allowed to execute - * this program. - */ -#ifndef AP_HTTPD_GROUP -#define AP_HTTPD_GROUP "apache" -#endif - -/* - * UID_MIN -- Define this as the lowest UID allowed to be a target user - * for suEXEC. For most systems, 500 or 100 is common, but - * 99 will include user nobody on RedHat Linux systems. - */ -#ifdef AP_UID_MIN -#undef AP_UID_MIN -#endif -#define AP_UID_MIN 99 - -/* - * GID_MIN -- Define this as the lowest GID allowed to be a target group - * for suEXEC. For most systems, 100 is common, but 99 will - * include group nobody on RedHat Linux systems. - */ -#ifdef AP_GID_MIN -#undef AP_GID_MIN -#endif -#define AP_GID_MIN 99 - -/* - * USERDIR_SUFFIX -- Define to be the subdirectory under users' - * home directories where suEXEC access should - * be allowed. All executables under this directory - * will be executable by suEXEC as the user so - * they should be "safe" programs. If you are - * using a "simple" UserDir directive (ie. one - * without a "*" in it) this should be set to - * the same value. suEXEC will not work properly - * in cases where the UserDir directive points to - * a location that is not the same as the user's - * home directory as referenced in the passwd file. - * - * If you have VirtualHosts with a different - * UserDir for each, you will need to define them to - * all reside in one parent directory; then name that - * parent directory here. IF THIS IS NOT DEFINED - * PROPERLY, ~USERDIR CGI REQUESTS WILL NOT WORK! - * See the suEXEC documentation for more detailed - * information. - */ -#ifndef AP_USERDIR_SUFFIX -#define AP_USERDIR_SUFFIX "public_html" -#endif - -/* - * LOG_EXEC -- Define this as a filename if you want all suEXEC - * transactions and errors logged for auditing and - * debugging purposes. - */ -#ifndef AP_LOG_EXEC -#define AP_LOG_EXEC DEFAULT_EXP_LOGFILEDIR "/suexec_log" /* Need me? */ -#endif - -/* - * DOC_ROOT -- Define as the DocumentRoot set for Apache. This - * will be the only hierarchy (aside from UserDirs) - * that can be used for suEXEC behavior. - */ -#ifndef AP_DOC_ROOT -#define AP_DOC_ROOT DEFAULT_EXP_HTDOCSDIR -#endif - -/* - * SAFE_PATH -- Define a safe PATH environment to pass to CGI executables. - * - */ -#ifndef AP_SAFE_PATH -#define AP_SAFE_PATH "/usr/local/bin:/usr/bin:/bin" -#endif - -/* - * GRST_EXECMAPDIR -- Location of the gridmapdir-style directory of lock files - * - */ -#define GRST_EXECMAPDIR "/var/www/execmapdir" - -#endif /* _SUEXEC_H */ diff --git a/org.gridsite.core/src/htcp.c b/org.gridsite.core/src/htcp.c deleted file mode 100644 index b682d17..0000000 --- a/org.gridsite.core/src/htcp.c +++ /dev/null @@ -1,2032 +0,0 @@ -/* - Copyright (c) 2002-6, Andrew McNab, University of Manchester - All rights reserved. - - Redistribution and use in source and binary forms, with or - without modification, are permitted provided that the following - conditions are met: - - o Redistributions of source code must retain the above - copyright notice, this list of conditions and the following - disclaimer. - o Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following - disclaimer in the documentation and/or other materials - provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND - CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS - BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED - TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - POSSIBILITY OF SUCH DAMAGE. -*/ - -/*---------------------------------------------------------------* - * For more about GridSite: http://www.gridsite.org/ * - *---------------------------------------------------------------*/ - -#ifndef VERSION -#define VERSION "0.0.0" -#endif - -#define _GNU_SOURCE - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "gridsite.h" - -/* deal with older versions of libcurl and curl.h */ - -#ifndef CURLOPT_WRITEDATA -#define CURLOPT_WRITEDATA CURLOPT_FILE -#endif - -#ifndef CURLOPT_READDATA -#define CURLOPT_READDATA CURLOPT_FILE -#endif - -#ifndef CURLE_HTTP_RETURNED_ERROR -#define CURLE_HTTP_RETURNED_ERROR CURLE_HTTP_NOT_FOUND -#endif - -#define HTCP_GET 1 -#define HTCP_PUT 2 -#define HTCP_DELETE 3 -#define HTCP_LIST 4 -#define HTCP_LONGLIST 5 -#define HTCP_MKDIR 6 -#define HTCP_MOVE 7 -#define HTCP_PING 8 -#define HTCP_FIND 9 -#define HTCP_RMTCP 10 - -#define HTCP_SITECAST_GROUPS 32 - -#define HTCP_HOST_CONF "/etc/htcp.conf" -#define HTCP_USER_CONF ".htcp.conf" - -struct grst_stream_data { char *source; - char *destination; - int ishttps; - int method; - FILE *fp; - char *cert; - char *key; - char *capath; - char *useragent; - char *errorbuf; - int noverify; - int anonymous; - int gridhttp; - int verbose; - int timeout; - char *groups; - int sitecast; - char *domain; } ; - -struct grst_index_blob { char *text; - size_t used; - size_t allocated; } ; - -struct grst_dir_list { char *filename; - size_t length; - int length_set; - time_t modified; - int modified_set; } ; - -struct grst_header_data { int retcode; - char *location; - char *gridhttppasscode; - size_t length; - int length_set; - time_t modified; - int modified_set; - struct grst_stream_data *common_data; } ; - -struct grst_sitecast_group { unsigned char quad1; unsigned char quad2; - unsigned char quad3; unsigned char quad4; - int port; int timewait; int ttl; }; - -size_t headers_callback(void *ptr, size_t size, size_t nmemb, void *p) -/* Find the values of the return code, Content-Length, Last-Modified - and Location headers */ -{ - float f; - char *s, *q; - size_t realsize; - struct tm modified_tm; - struct grst_header_data *header_data; - - header_data = (struct grst_header_data *) p; - realsize = size * nmemb; - s = malloc(realsize + 1); - memcpy(s, ptr, realsize); - s[realsize] = '\0'; - - if (sscanf(s, "Content-Length: %d", &(header_data->length)) == 1) - header_data->length_set = 1; - else if (sscanf(s, "HTTP/%f %d ", &f, &(header_data->retcode)) == 2) ; - else if (strncmp(s, "Location: ", 10) == 0) - { - header_data->location = strdup(&s[10]); - - for (q=header_data->location; *q != '\0'; ++q) - if ((*q == '\r') || (*q == '\n')) *q = '\0'; - - if (header_data->common_data->verbose > 0) - fprintf(stderr, "Received Location: %s\n", header_data->location); - } - else if (strncmp(s, "Set-Cookie: GRIDHTTP_PASSCODE=", 29) == 0) - { - header_data->gridhttppasscode = strdup(&s[12]); - q = index(header_data->gridhttppasscode, ';'); - if (q != NULL) *q = '\0'; - - if (header_data->common_data->verbose > 0) - fprintf(stderr, "Received GridHTTP Auth Cookie: %s\n", - header_data->gridhttppasscode); - } - else if (strncmp(s, "Last-Modified: ", 15) == 0) - { - /* follow RFC 2616: first try RFC 822 (kosher), then RFC 850 and - asctime() formats too. Must be GMT whatever the format. */ - - if (strptime(&s[15], "%a, %d %b %Y %T GMT", &modified_tm) != NULL) - { - header_data->modified = mktime(&modified_tm); - header_data->modified_set = 1; - } - else if (strptime(&s[15], "%a, %d-%b-%y %T GMT", &modified_tm) != NULL) - { - header_data->modified = mktime(&modified_tm); - header_data->modified_set = 1; - } - else if (strptime(&s[15], "%a %b %d %T %Y", &modified_tm) != NULL) - { - header_data->modified = mktime(&modified_tm); - header_data->modified_set = 1; - } - } - - free(s); - return realsize; -} - -int set_std_opts(CURL *easyhandle, struct grst_stream_data *common_data) -{ - struct stat statbuf; - - curl_easy_setopt(easyhandle, CURLOPT_FOLLOWLOCATION, 0); - - if ((common_data->cert != NULL) && (common_data->key != NULL)) - { - curl_easy_setopt(easyhandle, CURLOPT_SSLENGINE, NULL); - curl_easy_setopt(easyhandle, CURLOPT_SSLCERTTYPE, "PEM"); - curl_easy_setopt(easyhandle, CURLOPT_SSLCERT, common_data->cert); - curl_easy_setopt(easyhandle, CURLOPT_SSLKEY, common_data->key); - } - else - { - curl_easy_setopt(easyhandle, CURLOPT_SSLENGINE, "RSA"); - curl_easy_setopt(easyhandle, CURLOPT_SSLCERTTYPE, "ENG"); - } - - if (common_data->capath != NULL) - { -#if (LIBCURL_VERSION_NUM >= 0x070908) - if ((stat(common_data->capath, &statbuf) == 0) && - S_ISDIR(statbuf.st_mode)) - curl_easy_setopt(easyhandle, CURLOPT_CAPATH, common_data->capath); - else -#endif - curl_easy_setopt(easyhandle, CURLOPT_CAINFO, common_data->capath); - } - - if (common_data->noverify) - { - curl_easy_setopt(easyhandle, CURLOPT_SSL_VERIFYPEER, 0); - curl_easy_setopt(easyhandle, CURLOPT_SSL_VERIFYHOST, 0); - } - else - { - curl_easy_setopt(easyhandle, CURLOPT_SSL_VERIFYPEER, 2); - curl_easy_setopt(easyhandle, CURLOPT_SSL_VERIFYHOST, 2); - } - - return 1; -} - -int do_rmtcp(char *sources[], char *destination, - struct grst_stream_data *common_data) -{ - CURL *easyhandle; - char *p, *thisdestination; - int isrc, anyerror = 0, thiserror, isdirdest; - struct grst_header_data header_data; - struct curl_slist *gh_header_slist=NULL, *nogh_header_slist=NULL; - char remoteserver[255]; - - easyhandle = curl_easy_init(); - if( !easyhandle ) - { - fprintf(stderr, "Cannot initialize CURL handle while preparing to copy file.\n"); - exit(-1); - } - - common_data->gridhttp = 1; // for debug purpose - if (common_data->gridhttp) - { - asprintf(&p, "Upgrade: GridHTTP/1.0"); - gh_header_slist = curl_slist_append(gh_header_slist, p); - free(p); - - nogh_header_slist = curl_slist_append(nogh_header_slist, "Upgrade:"); - } - - // common_data->verbose = 1; //for debug purpose - curl_easy_setopt(easyhandle, CURLOPT_USERAGENT, common_data->useragent); - if (common_data->verbose > 1) - curl_easy_setopt(easyhandle, CURLOPT_VERBOSE, 1); - - curl_easy_setopt(easyhandle, CURLOPT_HEADERFUNCTION, headers_callback); - curl_easy_setopt(easyhandle, CURLOPT_WRITEHEADER, &header_data); - - set_std_opts(easyhandle, common_data); - - curl_easy_setopt(easyhandle, CURLOPT_ERRORBUFFER, common_data->errorbuf); - - if (destination[strlen(destination) - 1] != '/') - { - isdirdest = 0; - thisdestination = destination; - } - else isdirdest = 1; - - for (isrc=0; sources[isrc] != NULL; ++isrc) - { - if (isdirdest) - { - p = rindex(sources[isrc], '/'); - if (p == NULL) p = sources[isrc]; - else p++; - - asprintf(&thisdestination, "%s%s", destination, p); - } - - if( strncmp(sources[isrc], "https://", 8) == 0 ){ - if (common_data->verbose > 0) - fprintf(stderr, "%s -> %s\n", sources[isrc], thisdestination); - - curl_easy_setopt(easyhandle, CURLOPT_URL, sources[isrc]); - - if ((common_data->gridhttp) && - (strncmp(sources[isrc], "https://", 8) == 0)) - { - if (common_data->verbose > 0) - fprintf(stderr, "Add Upgrade: GridHTTP/1.0\n"); - curl_easy_setopt(easyhandle,CURLOPT_HTTPHEADER,gh_header_slist); - } - else - curl_easy_setopt(easyhandle,CURLOPT_HTTPHEADER,nogh_header_slist); - - header_data.retcode = 0; - header_data.location = NULL; - header_data.gridhttppasscode = NULL; - header_data.common_data = common_data; - thiserror = curl_easy_perform(easyhandle); - - } - - asprintf(&p, "Destination: %s", thisdestination); - nogh_header_slist=NULL; - nogh_header_slist = curl_slist_append(nogh_header_slist,p); - // fprintf(stdout, "complete destination file: %s\n", p); - free(p); - - // send request to destination server, - // to ask it to download file from source server - strcpy( remoteserver, destination); - while( (p=strrchr(remoteserver, '/')) !=NULL) - { - if( *(p-1) == '/' )break; - else *p = '\0'; - } - - common_data->source = sources[isrc]; - common_data->destination = remoteserver; - set_std_opts(easyhandle, common_data); - // send copy request to copy server (destination) - asprintf(&p, "COPY %s", sources[isrc]); - curl_easy_setopt(easyhandle, CURLOPT_CUSTOMREQUEST, p);//"COPY");//gh_header_slist); - curl_easy_setopt(easyhandle, CURLOPT_URL, remoteserver); - curl_easy_setopt(easyhandle, CURLOPT_COOKIE, header_data.gridhttppasscode); - - curl_easy_setopt(easyhandle, CURLOPT_USERAGENT, common_data->useragent); - curl_easy_setopt(easyhandle, CURLOPT_HTTPHEADER, nogh_header_slist); - - curl_easy_setopt(easyhandle, CURLOPT_ERRORBUFFER, common_data->errorbuf); - thiserror = curl_easy_perform(easyhandle); - free(p); - } - - curl_easy_cleanup(easyhandle); - - return anyerror; - -} - -int do_copies(char *sources[], char *destination, - struct grst_stream_data *common_data) -{ - char *p, *thisdestination; - int isrc, anyerror = 0, thiserror, isdirdest; - CURL *easyhandle; - struct stat statbuf; - struct grst_header_data header_data; - struct curl_slist *gh_header_slist = NULL, *nogh_header_slist = NULL; - - easyhandle = curl_easy_init(); - - if (common_data->gridhttp) - { - asprintf(&p, "Upgrade: GridHTTP/1.0"); - gh_header_slist = curl_slist_append(gh_header_slist, p); - free(p); - - nogh_header_slist = curl_slist_append(nogh_header_slist, "Upgrade:"); - } - - curl_easy_setopt(easyhandle, CURLOPT_USERAGENT, common_data->useragent); - if (common_data->verbose > 1) - curl_easy_setopt(easyhandle, CURLOPT_VERBOSE, 1); - - curl_easy_setopt(easyhandle, CURLOPT_HEADERFUNCTION, headers_callback); - curl_easy_setopt(easyhandle, CURLOPT_WRITEHEADER, &header_data); - - set_std_opts(easyhandle, common_data); - - curl_easy_setopt(easyhandle, CURLOPT_ERRORBUFFER, common_data->errorbuf); - - if (destination[strlen(destination) - 1] != '/') - { - isdirdest = 0; - thisdestination = destination; - } - else isdirdest = 1; - - for (isrc=0; sources[isrc] != NULL; ++isrc) - { - if (isdirdest) - { - p = rindex(sources[isrc], '/'); - if (p == NULL) p = sources[isrc]; - else p++; - - asprintf(&thisdestination, "%s%s", destination, p); - } - - if (common_data->verbose > 0) - fprintf(stderr, "Copy %s -> %s\n", sources[isrc], thisdestination); - - if (common_data->method == HTCP_GET) - { - common_data->fp = fopen(thisdestination, "w"); - if (common_data->fp == NULL) - { - fprintf(stderr,"... failed to open destination source file %s\n", - thisdestination); - anyerror = 99; - if (isdirdest) free(thisdestination); - continue; - } - - curl_easy_setopt(easyhandle, CURLOPT_WRITEDATA, common_data->fp); - curl_easy_setopt(easyhandle, CURLOPT_URL, sources[isrc]); - - if ((common_data->gridhttp) && - (strncmp(sources[isrc], "https://", 8) == 0)) - { - if (common_data->verbose > 0) - fprintf(stderr, "Add Upgrade: GridHTTP/1.0\n"); - - curl_easy_setopt(easyhandle,CURLOPT_HTTPHEADER,gh_header_slist); - } - else - curl_easy_setopt(easyhandle,CURLOPT_HTTPHEADER,nogh_header_slist); - } - else if (common_data->method == HTCP_PUT) - { - if (stat(sources[isrc], &statbuf) != 0) - { - fprintf(stderr, "... source file %s not found\n", sources[isrc]); - anyerror = 99; - if (isdirdest) free(thisdestination); - continue; - } - - common_data->fp = fopen(sources[isrc], "r"); - if (common_data->fp == NULL) - { - fprintf(stderr, "... failed to open source file %s\n", - sources[isrc]); - anyerror = 99; - if (isdirdest) free(thisdestination); - continue; - } - - curl_easy_setopt(easyhandle, CURLOPT_READDATA, common_data->fp); - curl_easy_setopt(easyhandle, CURLOPT_URL, thisdestination); - curl_easy_setopt(easyhandle, CURLOPT_INFILESIZE, statbuf.st_size); - curl_easy_setopt(easyhandle, CURLOPT_UPLOAD, 1); - - if ((common_data->gridhttp) && - (strncmp(thisdestination, "https://", 8) == 0)) - curl_easy_setopt(easyhandle,CURLOPT_HTTPHEADER,gh_header_slist); - else - curl_easy_setopt(easyhandle,CURLOPT_HTTPHEADER,nogh_header_slist); - } - - header_data.retcode = 0; - header_data.location = NULL; - header_data.gridhttppasscode = NULL; - header_data.common_data = common_data; - thiserror = curl_easy_perform(easyhandle); - - fclose(common_data->fp); - - if ((common_data->gridhttp) && - (thiserror == 0) && - (header_data.retcode == 302) && - (header_data.location != NULL) && - (strncmp(header_data.location, "http://", 7) == 0) && - (header_data.gridhttppasscode != NULL)) - { - if (common_data->verbose > 0) - fprintf(stderr, "... Found (%d)\nGridHTTP redirect to %s\n", - header_data.retcode, header_data.location); - - /* try again with new URL and all the previous CURL options */ - - if (common_data->method == HTCP_GET) - { - common_data->fp = fopen(thisdestination, "w"); - if (common_data->fp == NULL) - { - fprintf(stderr, "... failed to open destination source " - "file %s\n", thisdestination); - anyerror = 99; - if (isdirdest) free(thisdestination); - continue; - } - } - else if (common_data->method == HTCP_PUT) - { - common_data->fp = fopen(sources[isrc], "r"); - if (common_data->fp == NULL) - { - fprintf(stderr, "... failed to open source file %s\n", - sources[isrc]); - anyerror = 99; - if (isdirdest) free(thisdestination); - continue; - } - } - - header_data.retcode = 0; - curl_easy_setopt(easyhandle, CURLOPT_URL, header_data.location); - curl_easy_setopt(easyhandle, CURLOPT_HTTPHEADER, nogh_header_slist); - curl_easy_setopt(easyhandle, CURLOPT_COOKIE, - header_data.gridhttppasscode); - thiserror = curl_easy_perform(easyhandle); - - fclose(common_data->fp); - } - - if ((thiserror != 0) || - (header_data.retcode >= 300)) - { - fprintf(stderr, "... curl error: %s (%d), HTTP error: %d\n", - common_data->errorbuf, thiserror, header_data.retcode); - - if (thiserror != 0) anyerror = thiserror; - else anyerror = header_data.retcode; - } - else if (common_data->verbose > 0) - fprintf(stderr, "... OK (%d)\n", header_data.retcode); - - if (isdirdest) free(thisdestination); - } - - curl_easy_cleanup(easyhandle); - - return anyerror; -} - -int do_deletes(char *sources[], struct grst_stream_data *common_data) -{ - int isrc, anyerror = 0, thiserror; - CURL *easyhandle; - struct grst_header_data header_data; - - header_data.common_data = common_data; - - easyhandle = curl_easy_init(); - - curl_easy_setopt(easyhandle, CURLOPT_USERAGENT, common_data->useragent); - if (common_data->verbose > 1) - curl_easy_setopt(easyhandle, CURLOPT_VERBOSE, 1); - - curl_easy_setopt(easyhandle, CURLOPT_HEADERFUNCTION, headers_callback); - curl_easy_setopt(easyhandle, CURLOPT_WRITEHEADER, &header_data); - - curl_easy_setopt(easyhandle, CURLOPT_ERRORBUFFER, common_data->errorbuf); - curl_easy_setopt(easyhandle, CURLOPT_CUSTOMREQUEST, "DELETE"); - curl_easy_setopt(easyhandle, CURLOPT_NOBODY, 1); - - set_std_opts(easyhandle, common_data); - - for (isrc=0; sources[isrc] != NULL; ++isrc) - { - if (common_data->verbose > 0) - fprintf(stderr, "Deleting %s\n", sources[isrc]); - - curl_easy_setopt(easyhandle, CURLOPT_URL, sources[isrc]); - - header_data.retcode = 0; - thiserror = curl_easy_perform(easyhandle); - - if ((thiserror != 0) || - (header_data.retcode >= 300)) - { - fprintf(stderr, "... curl error: %s (%d), HTTP error: %d\n", - common_data->errorbuf, thiserror, header_data.retcode); - - if (thiserror != 0) anyerror = thiserror; - else anyerror = header_data.retcode; - } - else if (common_data->verbose > 0) - fprintf(stderr, "... OK (%d)\n", header_data.retcode); - } - - curl_easy_cleanup(easyhandle); - - return anyerror; -} - -int do_move(char *source, char *destination, - struct grst_stream_data *common_data) -{ - int anyerror = 0, thiserror; - char *destination_header; - CURL *easyhandle; - struct grst_header_data header_data; - struct curl_slist *header_slist = NULL; - - easyhandle = curl_easy_init(); - - header_data.common_data = common_data; - - easyhandle = curl_easy_init(); - - asprintf(&destination_header, "Destination: %s", destination); - header_slist = curl_slist_append(header_slist, destination_header); - curl_easy_setopt(easyhandle, CURLOPT_HTTPHEADER, header_slist); - - curl_easy_setopt(easyhandle, CURLOPT_USERAGENT, common_data->useragent); - if (common_data->verbose > 1) - curl_easy_setopt(easyhandle, CURLOPT_VERBOSE, 1); - - curl_easy_setopt(easyhandle, CURLOPT_HEADERFUNCTION, headers_callback); - curl_easy_setopt(easyhandle, CURLOPT_WRITEHEADER, &header_data); - - curl_easy_setopt(easyhandle, CURLOPT_ERRORBUFFER, common_data->errorbuf); - curl_easy_setopt(easyhandle, CURLOPT_CUSTOMREQUEST, "MOVE"); - curl_easy_setopt(easyhandle, CURLOPT_NOBODY, 1); - - set_std_opts(easyhandle, common_data); - - if (common_data->verbose > 0) - fprintf(stderr, "Moving %s to %s\n", source, destination); - - curl_easy_setopt(easyhandle, CURLOPT_URL, source); - - header_data.retcode = 0; - thiserror = curl_easy_perform(easyhandle); - - if ((thiserror != 0) || - (header_data.retcode >= 300)) - { - fprintf(stderr, "... curl error: %s (%d), HTTP error: %d\n", - common_data->errorbuf, thiserror, header_data.retcode); - - if (thiserror != 0) anyerror = thiserror; - else anyerror = header_data.retcode; - } - else if (common_data->verbose > 0) - fprintf(stderr, "... OK (%d)\n", header_data.retcode); - - curl_easy_cleanup(easyhandle); - - return anyerror; -} - -int do_mkdirs(char *sources[], struct grst_stream_data *common_data) -{ - int isrc, anyerror = 0, thiserror; - CURL *easyhandle; - struct grst_header_data header_data; - - header_data.common_data = common_data; - - easyhandle = curl_easy_init(); - - curl_easy_setopt(easyhandle, CURLOPT_USERAGENT, common_data->useragent); - if (common_data->verbose > 1) - curl_easy_setopt(easyhandle, CURLOPT_VERBOSE, 1); - - curl_easy_setopt(easyhandle, CURLOPT_HEADERFUNCTION, headers_callback); - curl_easy_setopt(easyhandle, CURLOPT_WRITEHEADER, &header_data); - - curl_easy_setopt(easyhandle, CURLOPT_ERRORBUFFER, common_data->errorbuf); - curl_easy_setopt(easyhandle, CURLOPT_CUSTOMREQUEST, "PUT"); - curl_easy_setopt(easyhandle, CURLOPT_NOBODY, 1); - - set_std_opts(easyhandle, common_data); - - for (isrc=0; sources[isrc] != NULL; ++isrc) - { - if (common_data->verbose > 0) - fprintf(stderr, "Make directory %s\n", sources[isrc]); - - curl_easy_setopt(easyhandle, CURLOPT_URL, sources[isrc]); - - header_data.retcode = 0; - thiserror = curl_easy_perform(easyhandle); - - if ((thiserror != 0) || - (header_data.retcode >= 300)) - { - fprintf(stderr, "... curl error: %s (%d), HTTP error: %d\n", - common_data->errorbuf, thiserror, header_data.retcode); - - if (thiserror != 0) anyerror = thiserror; - else anyerror = header_data.retcode; - } - else if (common_data->verbose > 0) - fprintf(stderr, "... OK (%d)\n", header_data.retcode); - } - - curl_easy_cleanup(easyhandle); - - return anyerror; -} - -int do_ping(struct grst_stream_data *common_data_ptr) -{ - int request_length, response_length, i, ret, s, igroup; - struct sockaddr_in srv, from; - socklen_t fromlen; -#define MAXBUF 8192 - char *request, response[MAXBUF], *p; - GRSThtcpMessage msg; - struct timeval start_timeval, wait_timeval, response_timeval; - struct grst_sitecast_group sitecast_groups[HTCP_SITECAST_GROUPS]; - fd_set readsckts; - - /* parse common_data_ptr->groups */ - - p = common_data_ptr->groups; - igroup = -1; - - for (igroup=-1; igroup+1 < HTCP_SITECAST_GROUPS; ++igroup) - { - sitecast_groups[igroup+1].port = GRST_HTCP_PORT; - sitecast_groups[igroup+1].timewait = 1; - sitecast_groups[igroup+1].ttl = 1; - - ret = sscanf(p, "%d.%d.%d.%d:%d:%d:%d", - &(sitecast_groups[igroup+1].quad1), - &(sitecast_groups[igroup+1].quad2), - &(sitecast_groups[igroup+1].quad3), - &(sitecast_groups[igroup+1].quad4), - &(sitecast_groups[igroup+1].port), - &(sitecast_groups[igroup+1].ttl), - &(sitecast_groups[igroup+1].timewait)); - - if (ret == 0) break; /* end of list ? */ - - if (ret < 5) - { - fprintf(stderr, "Failed to parse multicast group " - "parameter %s\n", p); - return CURLE_FAILED_INIT; - } - - ++igroup; - - if ((p = index(p, ',')) == NULL) break; - ++p; - } - - if (igroup == -1) - { - fprintf(stderr, "Failed to parse multicast group parameter %s\n", p); - return CURLE_FAILED_INIT; - } - - if ((s = socket(AF_INET, SOCK_DGRAM, 0)) < 0) - { - fprintf(stderr, "Failed to open UDP socket\n"); - return CURLE_FAILED_INIT; - } - - /* loop through multicast groups and send off the NOP pings */ - - gettimeofday(&start_timeval, NULL); - - for (i=0; i <= igroup; ++i) - { - bzero(&srv, sizeof(srv)); - srv.sin_family = AF_INET; - srv.sin_port = htons(sitecast_groups[i].port); - srv.sin_addr.s_addr = htonl(sitecast_groups[i].quad1*0x1000000 - + sitecast_groups[i].quad2*0x10000 - + sitecast_groups[i].quad3*0x100 - + sitecast_groups[i].quad4); - - GRSThtcpNOPrequestMake(&request, &request_length, - (int) (start_timeval.tv_usec + i)); - - sendto(s, request, request_length, 0, (struct sockaddr *) &srv, - sizeof(srv)); - free(request); - - if (common_data_ptr->verbose > 0) - fprintf(stderr, "UDP/HTCP NOP ping to %d:%d:%d:%d %d\n", - sitecast_groups[i].quad1, - sitecast_groups[i].quad2, - sitecast_groups[i].quad3, - sitecast_groups[i].quad4, - sitecast_groups[i].port); - } - - /* reusing wait_timeval is a Linux-specific feature of select() */ - wait_timeval.tv_sec = common_data_ptr->timeout - ? common_data_ptr->timeout : 60; - wait_timeval.tv_usec = 0; - - while ((wait_timeval.tv_sec > 0) || (wait_timeval.tv_usec > 0)) - { - FD_ZERO(&readsckts); - FD_SET(s, &readsckts); - - ret = select(s + 1, &readsckts, NULL, NULL, &wait_timeval); - gettimeofday(&response_timeval, NULL); - - if (ret > 0) - { - response_length = recvfrom(s, response, MAXBUF, - 0, &from, &fromlen); - - if (common_data_ptr->verbose > 0) - fprintf(stderr, "UDP mesg from %s:%d\n", - inet_ntoa(from.sin_addr), ntohs(from.sin_port)); - - if ((GRSThtcpMessageParse(&msg, response, response_length) - == GRST_RET_OK) && - (msg.opcode == GRSThtcpNOPop) && (msg.rr == 1) && - (msg.trans_id >= (int) start_timeval.tv_usec) && - (msg.trans_id <= (int) (start_timeval.tv_usec + igroup))) - { - printf("%s:%d %.3fms\n", - inet_ntoa(from.sin_addr), - ntohs(from.sin_port), - (((long) 1000000 * response_timeval.tv_sec) + - ((long) response_timeval.tv_usec) - - ((long) 1000000 * start_timeval.tv_sec) - - ((long) start_timeval.tv_usec)) / 1000.0); - } - } - } - - return GRST_RET_OK; -} - -int do_finds(char *sources[], - struct grst_stream_data *common_data_ptr, int num) -{ - int isrc; - - int request_length, response_length, i, ret, s, igroup; - struct sockaddr_in srv, from; - socklen_t fromlen; -#define MAXBUF 8192 - char *request, response[MAXBUF], *p; - GRSThtcpMessage msg; - struct timeval start_timeval, wait_timeval; - struct grst_sitecast_group sitecast_groups[HTCP_SITECAST_GROUPS]; - fd_set readsckts; - - /* parse common_data_ptr->groups */ - - if (common_data_ptr->groups == NULL) - { - fprintf(stderr, "No multicast groups given\n"); - return CURLE_FAILED_INIT; - } - - p = common_data_ptr->groups; - igroup = -1; - - for (igroup=-1; igroup+1 < HTCP_SITECAST_GROUPS;) - { - sitecast_groups[igroup+1].port = GRST_HTCP_PORT; - sitecast_groups[igroup+1].timewait = 1; - sitecast_groups[igroup+1].ttl = 1; - - ret = sscanf(p, "%d.%d.%d.%d:%d:%d:%d", - &(sitecast_groups[igroup+1].quad1), - &(sitecast_groups[igroup+1].quad2), - &(sitecast_groups[igroup+1].quad3), - &(sitecast_groups[igroup+1].quad4), - &(sitecast_groups[igroup+1].port), - &(sitecast_groups[igroup+1].ttl), - &(sitecast_groups[igroup+1].timewait)); - - if (ret == 0) break; /* end of list ? */ - - if (ret < 5) - { - fprintf(stderr, "Failed to parse multicast group " - "parameter %s\n", p); - return CURLE_FAILED_INIT; - } - - ++igroup; - - if ((p = index(p, ',')) == NULL) break; - ++p; - } - - if (igroup == -1) - { - fprintf(stderr, "Failed to parse multicast group parameter %s\n", p); - return CURLE_FAILED_INIT; - } - - if ((s = socket(AF_INET, SOCK_DGRAM, 0)) < 0) - { - fprintf(stderr, "Failed to open UDP socket\n"); - return CURLE_FAILED_INIT; - } - - /* loop through multicast groups since we need to take each - ones timewait into account */ - - gettimeofday(&start_timeval, NULL); - - for (i=0; i <= igroup; ++i) - { - if (common_data_ptr->verbose) - fprintf(stderr, "Querying multicast group %d.%d.%d.%d:%d:%d:%d\n", - sitecast_groups[i].quad1, sitecast_groups[i].quad2, - sitecast_groups[i].quad3, sitecast_groups[i].quad4, - sitecast_groups[i].port, sitecast_groups[i].ttl, - sitecast_groups[i].timewait); - - bzero(&srv, sizeof(srv)); - srv.sin_family = AF_INET; - srv.sin_port = htons(sitecast_groups[i].port); - srv.sin_addr.s_addr = htonl(sitecast_groups[i].quad1*0x1000000 - + sitecast_groups[i].quad2*0x10000 - + sitecast_groups[i].quad3*0x100 - + sitecast_groups[i].quad4); - - /* send off queries, one for each source file */ - - for (isrc=0; sources[isrc] != NULL; ++isrc) - { - GRSThtcpTSTrequestMake(&request, &request_length, - (int) (start_timeval.tv_usec + isrc), - "GET", sources[isrc], ""); - - sendto(s, request, request_length, 0, - (struct sockaddr *) &srv, sizeof(srv)); - - free(request); - } - - /* reusing wait_timeval is a Linux-specific feature of select() */ - wait_timeval.tv_usec = 0; - wait_timeval.tv_sec = sitecast_groups[i].timewait; - - while ((wait_timeval.tv_sec > 0) || (wait_timeval.tv_usec > 0)) - { - FD_ZERO(&readsckts); - FD_SET(s, &readsckts); - - ret = select(s + 1, &readsckts, NULL, NULL, &wait_timeval); - - if (ret > 0) - { - response_length = recvfrom(s, response, MAXBUF, - 0, &from, &fromlen); - - if ((GRSThtcpMessageParse(&msg, response, response_length) - == GRST_RET_OK) && - (msg.opcode == GRSThtcpTSTop) && (msg.rr == 1) && - (msg.trans_id >= (int) start_timeval.tv_usec) && - (msg.trans_id < (int) (start_timeval.tv_usec + num)) && - (msg.resp_hdrs != NULL) && - (GRSThtcpCountstrLen(msg.resp_hdrs) > 12)) - { - if (num > 1) printf("%s -> %.*s\n", - sources[msg.trans_id - (int) start_timeval.tv_usec], - GRSThtcpCountstrLen(msg.resp_hdrs) - 12, - &(msg.resp_hdrs->text[10])); - else printf("%.*s\n", - GRSThtcpCountstrLen(msg.resp_hdrs) - 12, - &(msg.resp_hdrs->text[10])); - } - } - } - - } - - return GRST_RET_OK; -} - -int translate_sitecast_url(char **source_ptr, - struct grst_stream_data *common_data_ptr) -{ - int request_length, response_length, i, ret, s, igroup; - struct sockaddr_in srv, from; - socklen_t fromlen; -#define MAXBUF 8192 - char *request, response[MAXBUF], *p; - GRSThtcpMessage msg; - struct timeval start_timeval, wait_timeval; - struct grst_sitecast_group sitecast_groups[HTCP_SITECAST_GROUPS]; - fd_set readsckts; - - /* parse common_data_ptr->groups */ - - if (common_data_ptr->groups == NULL) - { - fprintf(stderr, "No multicast groups given\n"); - return CURLE_FAILED_INIT; - } - - p = common_data_ptr->groups; - igroup = -1; - - for (igroup=-1; igroup+1 < HTCP_SITECAST_GROUPS;) - { - sitecast_groups[igroup+1].port = GRST_HTCP_PORT; - sitecast_groups[igroup+1].timewait = 1; - sitecast_groups[igroup+1].ttl = 1; - - ret = sscanf(p, "%d.%d.%d.%d:%d:%d:%d", - &(sitecast_groups[igroup+1].quad1), - &(sitecast_groups[igroup+1].quad2), - &(sitecast_groups[igroup+1].quad3), - &(sitecast_groups[igroup+1].quad4), - &(sitecast_groups[igroup+1].port), - &(sitecast_groups[igroup+1].ttl), - &(sitecast_groups[igroup+1].timewait)); - - if (ret == 0) break; /* end of list ? */ - - if (ret < 5) - { - fprintf(stderr, "Failed to parse multicast group " - "parameter %s\n", p); - return CURLE_FAILED_INIT; - } - - ++igroup; - - if ((p = index(p, ',')) == NULL) break; - ++p; - } - - if (igroup == -1) - { - fprintf(stderr, "Failed to parse multicast group parameter %s\n", p); - return CURLE_FAILED_INIT; - } - - if ((s = socket(AF_INET, SOCK_DGRAM, 0)) < 0) - { - fprintf(stderr, "Failed to open UDP socket\n"); - return CURLE_FAILED_INIT; - } - - /* loop through multicast groups since we need to take each - ones timewait into account */ - - gettimeofday(&start_timeval, NULL); - - for (i=0; i <= igroup; ++i) - { - if (common_data_ptr->verbose) - fprintf(stderr, "Querying multicast group %d.%d.%d.%d:%d:%d:%d\n", - sitecast_groups[i].quad1, sitecast_groups[i].quad2, - sitecast_groups[i].quad3, sitecast_groups[i].quad4, - sitecast_groups[i].port, sitecast_groups[i].ttl, - sitecast_groups[i].timewait); - - bzero(&srv, sizeof(srv)); - srv.sin_family = AF_INET; - srv.sin_port = htons(sitecast_groups[i].port); - srv.sin_addr.s_addr = htonl(sitecast_groups[i].quad1*0x1000000 - + sitecast_groups[i].quad2*0x10000 - + sitecast_groups[i].quad3*0x100 - + sitecast_groups[i].quad4); - - /* send off queries, one for each source file */ - - GRSThtcpTSTrequestMake(&request, &request_length, - (int) (start_timeval.tv_usec), - "GET", *source_ptr, ""); - - sendto(s, request, request_length, 0, - (struct sockaddr *) &srv, sizeof(srv)); - - free(request); - - /* reusing wait_timeval is a Linux-specific feature of select() */ - wait_timeval.tv_usec = 0; - wait_timeval.tv_sec = sitecast_groups[i].timewait; - - while ((wait_timeval.tv_sec > 0) || (wait_timeval.tv_usec > 0)) - { - FD_ZERO(&readsckts); - FD_SET(s, &readsckts); - - ret = select(s + 1, &readsckts, NULL, NULL, &wait_timeval); - - if (ret > 0) - { - response_length = recvfrom(s, response, MAXBUF, - 0, &from, &fromlen); - - if ((GRSThtcpMessageParse(&msg, response, response_length) - == GRST_RET_OK) && - (msg.opcode == GRSThtcpTSTop) && (msg.rr == 1) && - (msg.trans_id == (int) start_timeval.tv_usec) && - (msg.resp_hdrs != NULL) && - (GRSThtcpCountstrLen(msg.resp_hdrs) > 12)) - { - /* found one */ - - if (common_data_ptr->verbose > 0) - fprintf(stderr, "Sitecast %s -> %.*s\n", - *source_ptr, - GRSThtcpCountstrLen(msg.resp_hdrs) - 12, - &(msg.resp_hdrs->text[10])); - - free(*source_ptr); - - asprintf(source_ptr, "%.*s", - GRSThtcpCountstrLen(msg.resp_hdrs) - 12, - &(msg.resp_hdrs->text[10])); - - return GRST_RET_OK; - } - } - } - - } - - return GRST_RET_OK; -} - -size_t rawindex_callback(void *ptr, size_t size, size_t nmemb, void *data) -{ - if ( ((struct grst_index_blob *) data)->used + size * nmemb >= - ((struct grst_index_blob *) data)->allocated ) - { - ((struct grst_index_blob *) data)->allocated = - ((struct grst_index_blob *) data)->used + size * nmemb + 4096; - - ((struct grst_index_blob *) data)->text = - realloc( ((struct grst_index_blob *) data)->text, - ((struct grst_index_blob *) data)->allocated ); - } - - memcpy( &( ((struct grst_index_blob *) - data)->text[((struct grst_index_blob *) data)->used] ), - ptr, size * nmemb); - - ((struct grst_index_blob *) data)->used += size * nmemb; - - return size * nmemb; -} - -char *canonicalise(char *link, char *source) -{ - int i, j, srclen; - char *s; - - srclen = strlen(source); - - if ((strncmp(link, "https://", 8) == 0) || - (strncmp(link, "http://", 7) == 0)) - { - if (strncmp(link, source, srclen) != 0) return NULL; /* other site */ - - if (link[srclen] == '\0') return NULL; /* we dont self-link! */ - - for (i=0; link[srclen + i] != '\0'; ++i) - if (link[srclen + i] == '/') - { - if (link[srclen + i + 1] != '\0') return NULL; /* no subdirs */ - else return strdup(&link[srclen]); /* resolves to this dir */ - } - } - else if (link[0] != '/') /* relative link - need to check for subsubdirs */ - { - for (i=0; link[i] != '\0'; ++i) - if ((link[i] == '/') && (link[i+1] != '\0')) return NULL; - - s = strdup(link); - - for (i=0; s[i] != '\0'; ++i) - if (s[i] == '#') - { - s[i] = '\0'; - break; - } - - return s; - } - - /* absolute link on this server, starting / */ - - for (i=8; source[i] != '\0'; ++i) if (source[i] == '/') break; - - if (strncmp(link, &source[i], srclen - i) != 0) return NULL; - - for (j = srclen - i; link[j] != '\0'; ++j) - if ((link[j] == '/') && (link[j+1] != '\0')) return NULL; - - s = strdup(&link[srclen - i]); - - for (i=0; s[i] != '\0'; ++i) - if (s[i] == '#') - { - s[i] = '\0'; - break; - } - - if (s[0] == '\0') /* on second thoughts... */ - { - free(s); - return NULL; - } - - return s; -} - -int grst_dir_list_cmp(const void *a, const void *b) -{ - return strcmp( ((struct grst_dir_list *) a)->filename, - ((struct grst_dir_list *) b)->filename); -} - -struct grst_dir_list *index_to_dir_list(char *text, char *source) -{ - int taglevel = 0, wordnew = 1, i, namestart, used = 0, - allocated = 256; - char *p, *s; - struct grst_dir_list *list; - - list = (struct grst_dir_list *) - malloc(allocated * sizeof(struct grst_dir_list)); - - list[0].filename = NULL; - list[0].length = 0; - list[0].length_set = 0; - list[0].modified = 0; - list[0].modified_set = 0; - - for (p=text; *p != '\0'; ++p) - { - if (*p == '<') - { - ++taglevel; - - if ((taglevel == 1) && (list[used].filename != NULL)) - { - ++used; - if (used >= allocated) - { - allocated += 256; - list = (struct grst_dir_list *) - realloc((void *) list, - allocated * sizeof(struct grst_dir_list)); - } - - list[used].filename = NULL; - list[used].length = 0; - list[used].length_set = 0; - list[used].modified = 0; - list[used].modified_set = 0; - } - - wordnew = 1; - continue; - } - - if (*p == '>') - { - --taglevel; - wordnew = 1; - continue; - } - - if (isspace(*p)) - { - wordnew = 1; - continue; - } - - if ((wordnew) && (taglevel == 1)) - { - if (((*p == 'h') || (*p == 'H')) && - (strncasecmp(p, "href=", 5) == 0)) - { - if (p[5] == '"') { namestart = 6; - for (i=namestart; (p[i] != '\0') && - (p[i] != '"' ) && - (p[i] != '\n') && - (p[i] != '\t') && - (p[i] != '>' ) ; ++i) ; } - else { namestart = 5; - for (i=namestart; (p[i] != '\0') && - (p[i] != '"' ) && - (p[i] != ' ' ) && - (p[i] != '\n') && - (p[i] != '\t') && - (p[i] != ')' ) && - (p[i] != '>' ) ; ++i) ; } - if (i > namestart) - { - s = malloc(1 + i - namestart); - memcpy(s, &p[namestart], i - namestart); - s[i - namestart] = '\0'; - - list[used].filename = canonicalise(s, source); - free(s); - } - - p = &p[i-1]; /* -1 since continue results in ++i */ - continue; - } - - if (((*p == 'c') || (*p == 'C')) && - (strncasecmp(p, "content-length=", 15) == 0)) - { - list[used].length = 0; - list[used].length_set = 1; - - if (p[15] == '"') list[used].length = atoi(&p[16]); - else list[used].length = atoi(&p[15]); - - p = &p[15]; - continue; - } - - if (((*p == 'l') || (*p == 'L')) && - (strncasecmp(p, "last-modified=", 14) == 0)) - { - list[used].modified = 0; - list[used].modified_set = 1; - - if (p[14] == '"') list[used].modified = atoi(&p[15]); - else list[used].modified = atoi(&p[14]); - - p = &p[14]; - continue; - } - } - - wordnew = 0; - } - - qsort((void *) list, used, sizeof(struct grst_dir_list), grst_dir_list_cmp); - - return list; -} - -int do_listings(char *sources[], struct grst_stream_data *common_data, - int islonglist) -{ - int isrc, anyerror = 0, thiserror, i, isdir, ilast; - CURL *easyhandle; - const char *months[] = { "Jan", "Feb", "Mar", "Apr", "May", "Jun", - "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" }; - char *s; - struct grst_index_blob rawindex; - struct grst_dir_list *list; - struct grst_header_data header_data; - struct tm modified_tm; - time_t now; - - time(&now); - - header_data.common_data = common_data; - - easyhandle = curl_easy_init(); - - curl_easy_setopt(easyhandle, CURLOPT_USERAGENT, common_data->useragent); - if (common_data->verbose > 1) - curl_easy_setopt(easyhandle, CURLOPT_VERBOSE, 1); - - curl_easy_setopt(easyhandle, CURLOPT_WRITEHEADER, &header_data); - curl_easy_setopt(easyhandle, CURLOPT_HEADERFUNCTION, headers_callback); - - curl_easy_setopt(easyhandle, CURLOPT_ERRORBUFFER, common_data->errorbuf); - - set_std_opts(easyhandle, common_data); - - for (isrc=0; sources[isrc] != NULL; ++isrc) - { - if (common_data->verbose > 0) - fprintf(stderr, "Listing %s\n", sources[isrc]); - - if (sources[1] != NULL) printf("\n%s:\n", sources[isrc]); - - curl_easy_setopt(easyhandle, CURLOPT_URL, sources[isrc]); - - if (sources[isrc][strlen(sources[isrc])-1] == '/') - { - isdir = 1; - curl_easy_setopt(easyhandle,CURLOPT_WRITEFUNCTION,rawindex_callback); - curl_easy_setopt(easyhandle,CURLOPT_WRITEDATA,(void *) &rawindex); - curl_easy_setopt(easyhandle,CURLOPT_NOBODY,0); - rawindex.text = NULL; - rawindex.used = 0; - rawindex.allocated = 0; - } - else - { - isdir = 0; - curl_easy_setopt(easyhandle, CURLOPT_WRITEFUNCTION, NULL); - curl_easy_setopt(easyhandle, CURLOPT_WRITEDATA, NULL); - curl_easy_setopt(easyhandle, CURLOPT_NOBODY, 1); - } - - header_data.gridhttppasscode = NULL; - header_data.length_set = 0; - header_data.modified_set = 0; - header_data.retcode = 0; - thiserror = curl_easy_perform(easyhandle); - - if ((thiserror != 0) || - (header_data.retcode >= 300)) - { - fprintf(stderr, "... curl error: %s (%d), HTTP error: %d\n", - common_data->errorbuf, thiserror, header_data.retcode); - - if (thiserror != 0) anyerror = thiserror; - else anyerror = header_data.retcode; - } - else if (isdir) - { - if (common_data->verbose > 0) - fprintf(stderr, "... OK (%d)\n", header_data.retcode); - - rawindex.text[rawindex.used] = '\0'; - - list = index_to_dir_list(rawindex.text, sources[isrc]); - ilast = -1; - - for (i=0; list[i].filename != NULL; ++i) - { - if (list[i].filename[0] == '.') continue; - - if (strncmp(list[i].filename, "mailto:", 7) == 0) continue; - - if ((ilast >= 0) && - (strcmp(list[i].filename, list[ilast].filename) == 0)) - continue; - ilast=i; - - if (islonglist) - { - if (!list[i].length_set || !list[i].modified_set) - { - curl_easy_setopt(easyhandle, CURLOPT_WRITEFUNCTION, - NULL); - curl_easy_setopt(easyhandle, CURLOPT_WRITEDATA, NULL); - curl_easy_setopt(easyhandle, CURLOPT_NOBODY, 1); - - asprintf(&s, "%s%s", sources[isrc], list[i].filename); - curl_easy_setopt(easyhandle, CURLOPT_URL, s); - - header_data.gridhttppasscode = NULL; - header_data.length_set = 0; - header_data.modified_set = 0; - header_data.retcode = 0; - thiserror = curl_easy_perform(easyhandle); - free(s); - - if ((thiserror == 0) && - (header_data.retcode >= 200) && - (header_data.retcode <= 299)) - { - if (header_data.length_set) - { - list[i].length_set = 1; - list[i].length = header_data.length; - } - - if (header_data.modified_set) - { - list[i].modified_set = 1; - list[i].modified = header_data.modified; - } - } - } - - if (list[i].length_set) printf("%10ld ", list[i].length); - else fputs(" ? ", stdout); - - if (list[i].modified_set) - { - localtime_r(&(list[i].modified), &modified_tm); - - if (list[i].modified < now - 15552000) - printf("%s %2d %4d ", - months[modified_tm.tm_mon], - modified_tm.tm_mday, - modified_tm.tm_year + 1900); - else printf("%s %2d %02d:%02d ", - months[modified_tm.tm_mon], - modified_tm.tm_mday, - modified_tm.tm_hour, - modified_tm.tm_min); - } - else fputs(" ? ? ? ", stdout); - } - - puts(list[i].filename); - } - } - else - { - if (islonglist) - { - printf("%10ld ", header_data.length); - - localtime_r(&(header_data.modified), &modified_tm); - - if (header_data.modified < now - 15552000) - printf("%s %2d %4d ", - months[modified_tm.tm_mon], - modified_tm.tm_mday, - modified_tm.tm_year + 1900); - else printf("%s %2d %02d:%02d ", - months[modified_tm.tm_mon], - modified_tm.tm_mday, - modified_tm.tm_hour, - modified_tm.tm_min); - } - - puts(sources[isrc]); - } - } - - curl_easy_cleanup(easyhandle); - - return anyerror; -} - -#if (LIBCURL_VERSION_NUM < 0x070908) -char *make_tmp_ca_roots(char *dir) -/* libcurl before 7.9.8 doesnt support CURLOPT_CAPATH and the directory, - so we make a temporary file with the concatenated CA root certs: that - is, all the files in that directory which end in .0 */ -{ - int ofd, ifd, c; - size_t size; - char tmp_ca_roots[] = "/tmp/.ca-roots-XXXXXX", buffer[4096], *s; - DIR *rootsDIR; - struct dirent *root_ent; - - if ((rootsDIR = opendir(dir)) == NULL) return NULL; - - if ((ofd = mkstemp(tmp_ca_roots)) == -1) - { - closedir(rootsDIR); - return NULL; - } - - while ((root_ent = readdir(rootsDIR)) != NULL) - { - if ((root_ent->d_name[0] != '.') && - (strlen(root_ent->d_name) > 2) && - (strncmp(&(root_ent->d_name[strlen(root_ent->d_name)-2]), - ".0", 2) == 0)) - { - asprintf(&s, "%s/%s", dir, root_ent->d_name); - ifd = open(s, O_RDONLY); - free(s); - - if (ifd != -1) - { - while ((size = read(ifd, buffer, sizeof(buffer))) > 0) - write(ofd, buffer, size); - close(ifd); - } - } - } - - closedir(rootsDIR); - - if (close(ofd) == 0) return strdup(tmp_ca_roots); - - unlink(tmp_ca_roots); /* try to clean up */ - - return NULL; -} -#endif - -void printsyntax(char *argv0) -{ - char *p; - - p = rindex(argv0, '/'); - if (p != NULL) ++p; - else p = argv0; - - fprintf(stderr, "%s [options] Source-URL[s] [Destination URL]\n" - "%s is one of a set of clients to fetch files or directory listings\n" -"from remote servers using HTTP or HTTPS, or to put or delete files or\n" -"directories onto remote servers using HTTPS. htcp is similar to scp(1)\n" -"but uses HTTP/HTTPS rather than ssh as its transfer protocol.\n" -"See the htcp(1) or http://www.gridsite.org/ for details.\n" -"(Version: %s)\n", p, p, VERSION); -} - -struct option long_options[] = { {"verbose", 0, 0, 'v'}, - {"cert", 1, 0, 0}, - {"key", 1, 0, 0}, - {"capath", 1, 0, 0}, - {"delete", 0, 0, 0}, - {"list", 0, 0, 0}, - {"long-list", 0, 0, 0}, - {"mkdir", 0, 0, 0}, - {"no-verify", 0, 0, 0}, - {"anon", 0, 0, 0}, - {"grid-http", 0, 0, 0}, - {"move", 0, 0, 0}, - {"ping", 0, 0, 0}, - {"groups", 1, 0, 0}, - {"timeout", 1, 0, 0}, - {"sitecast", 0, 0, 0}, - {"domain", 1, 0, 0}, - {"find", 0, 0, 0}, - {"rmtcp", 0, 0, 0}, - {"conf", 1, 0, 0}, - {0, 0, 0, 0} }; - -int update_common_data(struct grst_stream_data *, int, char *); - -void parse_conf(struct grst_stream_data *common_data_ptr, char *conf_file) -{ - int option_index; - char line[1001], *p; - FILE *fp; - - fp = fopen(conf_file, "r"); - if (fp == NULL) - { - if (common_data_ptr->verbose) - fprintf(stderr, "Failed to open configuration file %s\n", conf_file); - return; - } - - if (common_data_ptr->verbose) - fprintf(stderr, "Opened configuration file %s\n", conf_file); - - while (fgets(line, sizeof(line), fp) != NULL) - { - if ((p = index(line, '\n')) != NULL) *p = '\0'; - - for (option_index=0; - long_options[option_index].name != NULL; ++option_index) - { - if (long_options[option_index].has_arg && - (strncmp(line, long_options[option_index].name, - strlen(long_options[option_index].name)) == 0) && - (line[strlen(long_options[option_index].name)] == '=')) - { - update_common_data(common_data_ptr, option_index, - strdup(&line[strlen(long_options[option_index].name) + 1])); - break; - } - - if (!long_options[option_index].has_arg && - (strcmp(line, long_options[option_index].name) == 0)) - { - update_common_data(common_data_ptr, option_index, ""); - break; - } - } - } - - fclose(fp); -} - -int update_common_data(struct grst_stream_data *common_data_ptr, - int option_index, char *optarg) -{ - if (option_index == 1) common_data_ptr->cert = optarg; - else if (option_index == 2) common_data_ptr->key = optarg; - else if (option_index == 3) common_data_ptr->capath = optarg; - else if (option_index == 4) common_data_ptr->method = HTCP_DELETE; - else if (option_index == 5) common_data_ptr->method = HTCP_LIST; - else if (option_index == 6) common_data_ptr->method = HTCP_LONGLIST; - else if (option_index == 7) common_data_ptr->method = HTCP_MKDIR; - else if (option_index == 8) common_data_ptr->noverify = 1; - else if (option_index == 9) common_data_ptr->anonymous = 1; - else if (option_index ==10) common_data_ptr->gridhttp = 1; - else if (option_index ==11) common_data_ptr->method = HTCP_MOVE; - else if (option_index ==12) common_data_ptr->method = HTCP_PING; - else if (option_index ==13) common_data_ptr->groups = optarg; - else if (option_index ==14) common_data_ptr->timeout = atoi(optarg); - else if (option_index ==15) common_data_ptr->sitecast = 1; - else if (option_index ==16) { common_data_ptr->sitecast = 1; - common_data_ptr->domain = optarg; } - else if (option_index ==17) common_data_ptr->method = HTCP_FIND; - else if (option_index ==18) { printf("OK\n");common_data_ptr->method = HTCP_RMTCP;} - /* option_index == 19 is used by the --conf command line-only option */ - else return GRST_RET_FAILED; - - return GRST_RET_OK; -} - -int main(int argc, char *argv[]) -{ - char **sources, *destination = NULL, *executable, *p, *htcp_conf; - int c, i, option_index, anyerror; - struct stat statbuf; - struct grst_stream_data common_data; - struct passwd *userpasswd; - -#if (LIBCURL_VERSION_NUM < 0x070908) - char *tmp_ca_roots = NULL; -#endif - - if (argc == 1) - { - printsyntax(argv[0]); - return 0; - } - - common_data.cert = NULL; - common_data.key = NULL; - common_data.capath = NULL; - common_data.method = 0; - common_data.errorbuf = malloc(CURL_ERROR_SIZE); - asprintf(&(common_data.useragent), - "htcp/%s (http://www.gridsite.org/)", VERSION); - common_data.verbose = 0; - common_data.noverify = 0; - common_data.anonymous = 0; - common_data.gridhttp = 0; - - common_data.groups = NULL; - common_data.timeout = 0; - common_data.sitecast = 0; - common_data.domain = NULL; - - if ((argc > 1) && ((strcmp(argv[1], "--verbose") == 0) || - (strcmp(argv[1], "-v") == 0))) common_data.verbose = 1; - - /* examine any configuration files */ - - parse_conf(&common_data, HTCP_HOST_CONF); - - userpasswd = getpwuid(geteuid()); - asprintf(&htcp_conf, "%s/%s", userpasswd->pw_dir, HTCP_USER_CONF); - parse_conf(&common_data, htcp_conf); - free(htcp_conf); - - htcp_conf = getenv("HTCP_CONF"); - if (htcp_conf != NULL) parse_conf(&common_data, htcp_conf); - - common_data.verbose = 0; - - while (1) - { - option_index = 0; - - c = getopt_long(argc, argv, "v", long_options, &option_index); - - if (c == -1) break; - else if (c == 0) - { - if (option_index == 19) parse_conf(&common_data, optarg); - else update_common_data(&common_data, option_index, optarg); - } - else if (c == 'v') ++(common_data.verbose); - } - - if (common_data.verbose > 0) - { - p = rindex(argv[0], '/'); - if (p != NULL) ++p; - else p = argv[0]; - fprintf(stderr, "%s version %s\n", p, VERSION); - } - - if (common_data.anonymous) /* prevent any use of user certs */ - { - common_data.cert = NULL; - common_data.key = NULL; - } - else if ((common_data.cert == NULL) && (common_data.key != NULL)) - common_data.cert = common_data.key; - else if ((common_data.cert != NULL) && (common_data.key == NULL)) - common_data.key = common_data.cert; - else if ((common_data.cert == NULL) && (common_data.key == NULL)) - { - common_data.cert = getenv("X509_USER_PROXY"); - if (common_data.cert != NULL) common_data.key = common_data.cert; - else - { - asprintf(&(common_data.cert), "/tmp/x509up_u%d", geteuid()); - - /* one fine day, we will check the proxy file for expiry too ... */ - - if (stat(common_data.cert, &statbuf) == 0) - common_data.key = common_data.cert; - else - { - common_data.cert = getenv("X509_USER_CERT"); - common_data.key = getenv("X509_USER_KEY"); - - if ((common_data.cert == NULL) && - (userpasswd != NULL) && - (userpasswd->pw_dir != NULL)) - asprintf(&(common_data.cert), "%s/.globus/usercert.pem", - userpasswd->pw_dir); - - if ((common_data.key == NULL) && - (userpasswd != NULL) && - (userpasswd->pw_dir != NULL)) - asprintf(&(common_data.key), "%s/.globus/userkey.pem", - userpasswd->pw_dir); - } - } - } - - if (common_data.capath == NULL) common_data.capath = getenv("X509_CERT_DIR"); - - if (common_data.capath == NULL) - common_data.capath = "/etc/grid-security/certificates"; - -#if (LIBCURL_VERSION_NUM < 0x070908) - /* libcurl before 7.9.8 doesnt support CURLOPT_CAPATH and the directory */ - - if ((common_data.capath != NULL) && - (stat(common_data.capath, &statbuf) == 0) && S_ISDIR(statbuf.st_mode)) - { - tmp_ca_roots = make_tmp_ca_roots(common_data.capath); - common_data.capath = tmp_ca_roots; - } -#endif - - executable = rindex(argv[0], '/'); - if (executable != NULL) executable++; - else executable = argv[0]; - - if (common_data.method == 0) /* command-line options override exec name */ - { - if (strcmp(executable,"htls")==0) common_data.method=HTCP_LIST; - else if (strcmp(executable,"htll")==0) common_data.method=HTCP_LONGLIST; - else if (strcmp(executable,"htrm")==0) common_data.method=HTCP_DELETE; - else if (strcmp(executable,"htmkdir")==0) common_data.method=HTCP_MKDIR; - else if (strcmp(executable,"htmv")==0) common_data.method=HTCP_MOVE; - else if (strcmp(executable,"htping")==0) common_data.method=HTCP_PING; - else if (strcmp(executable,"htfind")==0) common_data.method=HTCP_FIND; - else if (strcmp(executable,"htrmtcp")==0) common_data.method=HTCP_RMTCP; - } - - if (common_data.method == HTCP_PING) - { - if (common_data.groups != NULL) return do_ping(&common_data); - - fprintf(stderr, "Must specify at least one multicast group\n\n"); - printsyntax(argv[0]); - return CURLE_FAILED_INIT; - } - - if ((common_data.method == HTCP_DELETE) || - (common_data.method == HTCP_LIST) || - (common_data.method == HTCP_FIND) || - (common_data.method == HTCP_MKDIR) || - (common_data.method == HTCP_LONGLIST)) - { - if (optind >= argc) - { - fprintf(stderr, "Must give at least 1 non-option argument\n\n"); - printsyntax(argv[0]); - return CURLE_URL_MALFORMAT; - } - - sources = (char **) malloc(sizeof(char *) * (1 + argc - optind)); - for (i=0; i < argc - optind; ++i) - { - sources[i] = argv[optind + i]; - - if ((common_data.method == HTCP_MKDIR) && - (sources[i][strlen(sources[i])-1] != '/')) - { - fprintf(stderr, "Argument \"%s\" is not a " - "directory URL (no trailing /)\n\n", sources[i]); - printsyntax(argv[0]); - return CURLE_URL_MALFORMAT; - } - } - - sources[i] = NULL; - - if (common_data.method == HTCP_DELETE) - anyerror = do_deletes(sources, &common_data); - else if (common_data.method == HTCP_MKDIR) - anyerror = do_mkdirs(sources, &common_data); - else if (common_data.method == HTCP_FIND) - anyerror = do_finds(sources, &common_data, argc - optind); - else if (common_data.method == HTCP_LONGLIST) - anyerror = do_listings(sources, &common_data, 1); - else anyerror = do_listings(sources, &common_data, 0); - - if (anyerror > 99) anyerror = CURLE_HTTP_RETURNED_ERROR; - - return anyerror; - } - - if (common_data.method == HTCP_MOVE) - { - if (optind >= argc - 1) - { - fputs("Must give exactly 2 non-option arguments\n\n", stderr); - printsyntax(argv[0]); - return CURLE_URL_MALFORMAT; - } - - anyerror = do_move(argv[optind], argv[optind + 1], &common_data); - - if (anyerror > 99) anyerror = CURLE_HTTP_RETURNED_ERROR; - - return anyerror; - } - - if (optind >= argc - 1) - { - fputs("Must give at least 2 non-option arguments\n\n", stderr); - printsyntax(argv[0]); - return CURLE_URL_MALFORMAT; - } - - sources = (char **) malloc(sizeof(char *) * (argc - optind)); - - for (i=0; i < (argc - optind - 1); ++i) - { - if (strncmp(argv[optind + i], "file:", 5) == 0) - sources[i] = strdup(&argv[optind + i][5]); - else sources[i] = strdup(argv[optind + i]); - - if (sources[i][0] == '\0') - { - fprintf(stderr, "Source argument %d is empty\n\n", i + 1); - printsyntax(argv[0]); - return CURLE_URL_MALFORMAT; - } - } - - sources[i] = NULL; - - if (strncmp(argv[optind+i], "file:", 5) == 0) - { - if ((argv[optind+i][strlen(argv[optind+i]) - 1] != '/') && - (stat(&argv[optind + i][5], &statbuf) == 0) && - S_ISDIR(statbuf.st_mode)) - asprintf(&destination, "%s/", &argv[optind + i][5]); - else destination = strdup(&argv[optind + i][5]); - } - else if ((strncmp(argv[optind+i], "http://", 7) != 0) && - (strncmp(argv[optind+i], "https://", 8) != 0)) - { - if ((argv[optind+i][strlen(argv[optind+i]) - 1] != '/') && - (stat(argv[optind+i], &statbuf) == 0) && - S_ISDIR(statbuf.st_mode)) - asprintf(&destination, "%s/", argv[optind+i]); - else destination = strdup(argv[optind+i]); - } - else destination = strdup(argv[optind+i]); - - if (destination[0] == '\0') - { - fputs("Destination argument is empty\n\n", stderr); - printsyntax(argv[0]); - return CURLE_URL_MALFORMAT; - } - - if ((argc - optind > 2) && (destination[strlen(destination)-1] != '/')) - { - fputs("For multiple sources, destination " - "must be a directory (end in /)\n\n", stderr); - printsyntax(argv[0]); - return CURLE_URL_MALFORMAT; - } - - // remote file copy - if ( common_data.method == HTCP_RMTCP ) - { - anyerror = do_rmtcp(sources, destination, &common_data); - fprintf(stdout, "The file has been moved!\n"); - // printsyntax(argv[0]); - return CURLE_URL_MALFORMAT; - } - - if ((strncmp(destination, "http://", 7) == 0) || - (strncmp(destination, "https://", 8) == 0)) - common_data.method = HTCP_PUT; - else common_data.method = HTCP_GET; - - for (i=0; sources[i] != NULL; ++i) - { - if ((common_data.method == HTCP_PUT) && - ((strncmp(sources[i], "http://", 7) == 0) || - (strncmp(sources[i], "https://", 8) == 0))) - { - fputs("Cannot have both source and destination remote\n\n",stderr); - printsyntax(argv[0]); - return CURLE_URL_MALFORMAT; - } - - if (common_data.method == HTCP_GET) - { - if ((strncmp(sources[i], "http://", 7) != 0) && - (strncmp(sources[i], "https://", 8) != 0)) - { - fputs("Cannot have both source and " - "destination local (for now)\n\n",stderr); - printsyntax(argv[0]); - return CURLE_URL_MALFORMAT; - } - - if ((common_data.sitecast) && - ((common_data.domain == NULL) || - - ((strncmp(sources[i], "http://", 7) == 0) && - (strncmp(&sources[i][7], common_data.domain, - strlen(common_data.domain)) == 0) && - ((sources[i][7+strlen(common_data.domain)] == ':') || - (sources[i][7+strlen(common_data.domain)] == '/'))) || - - ((strncmp(sources[i], "https://", 8) == 0) && - (strncmp(&sources[i][8], common_data.domain, - strlen(common_data.domain)) == 0) && - ((sources[i][8+strlen(common_data.domain)] == ':') || - (sources[i][8+strlen(common_data.domain)] == '/'))))) - { - translate_sitecast_url(&sources[i], &common_data); - } - } - } - - anyerror = do_copies(sources, destination, &common_data); - if (anyerror > 99) anyerror = CURLE_HTTP_RETURNED_ERROR; - - return anyerror; -} diff --git a/org.gridsite.core/src/htproxyput.c b/org.gridsite.core/src/htproxyput.c deleted file mode 100644 index 1078953..0000000 --- a/org.gridsite.core/src/htproxyput.c +++ /dev/null @@ -1,622 +0,0 @@ -/* - Copyright (c) 2002-6, Andrew McNab, University of Manchester - All rights reserved. - - Redistribution and use in source and binary forms, with or - without modification, are permitted provided that the following - conditions are met: - - o Redistributions of source code must retain the above - copyright notice, this list of conditions and the following - disclaimer. - o Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following - disclaimer in the documentation and/or other materials - provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND - CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS - BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED - TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - POSSIBILITY OF SUCH DAMAGE. -*/ - -/* - -Build with: - -gcc -lcurl -lssl -lcrypto -o grst-proxy-put grst-proxy-put.c libgridsite.a - -http://www.gridpp.ac.uk/authz/gridsite/ - -*/ - -#ifndef VERSION -#define VERSION "0.0.0" -#endif - -#define _GNU_SOURCE - -#include -#include -#include -#include -#include - -#include -#include -#include - -#include -#include -#include - -#include - -#include - -#include - -#include "DelegationSoapBinding.nsmap" - -#define HTPROXY_PUT 0 -#define HTPROXY_RENEW 1 -#define HTPROXY_DESTROY 2 -#define HTPROXY_TIME 3 -#define HTPROXY_UNIXTIME 4 -#define HTPROXY_MAKE 5 -#define HTPROXY_INFO 6 - -void printsyntax(char *argv0) -{ - char *p; - - p = rindex(argv0, '/'); - if (p != NULL) ++p; - else p = argv0; - - fprintf(stderr, "%s [options] URL\n" - "(Version: %s)\n", p, VERSION); -} - -void htproxy_logfunc(char *file, int line, int level, char *fmt, ...) -{ - char *mesg; - va_list ap; - - va_start(ap, fmt); - vasprintf(&mesg, fmt, ap); - va_end(ap); - - fprintf(stderr, "%s(%d) %s\n", file, line, mesg); - - free(mesg); -} - -int main(int argc, char *argv[]) -{ - char *delegation_id = "", *reqtxt, *certtxt, *valid = NULL, - *cert = NULL, *key = NULL, *capath = NULL, *keycert, timestr[81], - *vomsdir = "/etc/grid-security/vomsdir", - *executable, *keytxt, *proxychain, *ptr, *p; - struct ns__putProxyResponse *unused; - struct tm *finish_tm; - int option_index, c, noverify = 0, i, ret, - method = HTPROXY_PUT, verbose = 0, fd, minutes; - struct soap soap_get, soap_put; - struct ns__getProxyReqResponse getProxyReqResponse; - struct ns__getNewProxyReqResponse getNewProxyReqResponse; - struct ns__renewProxyReqResponse renewProxyReqResponse; - struct ns__destroyResponse destroyResponse; - struct ns__getTerminationTimeResponse getTerminationTimeResponse; - FILE *ifp, *ofp; - STACK_OF(X509) *x509_certstack; - X509 *x509_cert; - BIO *certmem; - GRSTx509Chain *grst_chain = NULL; - GRSTx509Cert *grst_cert = NULL; - long ptrlen; - struct stat statbuf; - struct passwd *userpasswd; - struct option long_options[] = { {"verbose", 0, 0, 'v'}, - {"cert", 1, 0, 0}, - {"key", 1, 0, 0}, - {"capath", 1, 0, 0}, - {"destroy", 0, 0, 0}, - {"time", 0, 0, 0}, - {"no-verify", 0, 0, 0}, - {"valid", 1, 0, 0}, - {"delegation-id",1, 0, 0}, - {"put", 0, 0, 0}, - {"renew", 0, 0, 0}, - {"unixtime", 0, 0, 0}, - {"make", 0, 0, 0}, - {"info", 0, 0, 0}, - {0, 0, 0, 0} }; - - if (argc == 1) - { - printsyntax(argv[0]); - return 0; - } - - while (1) - { - option_index = 0; - - c = getopt_long(argc, argv, "v", long_options, &option_index); - - if (c == -1) break; - else if (c == 0) - { - if (option_index == 1) cert = optarg; - else if (option_index == 2) key = optarg; - else if (option_index == 3) capath = optarg; - else if (option_index == 4) method = HTPROXY_DESTROY; - else if (option_index == 5) method = HTPROXY_TIME; - else if (option_index == 6) noverify = 1; - else if (option_index == 7) valid = optarg; - else if (option_index == 8) delegation_id = optarg; - else if (option_index == 9) method = HTPROXY_PUT; - else if (option_index == 10) method = HTPROXY_RENEW; - else if (option_index == 11) method = HTPROXY_UNIXTIME; - else if (option_index == 12) method = HTPROXY_MAKE; - else if (option_index == 13) method = HTPROXY_INFO; - } - else if (c == 'v') - { - GRSTerrorLogFunc = htproxy_logfunc; - ++verbose; - } - } - - executable = rindex(argv[0], '/'); - if (executable != NULL) executable++; - else executable = argv[0]; - - if (strcmp(executable, "htproxydestroy") == 0) method = HTPROXY_DESTROY; - else if (strcmp(executable, "htproxyrenew") == 0) method = HTPROXY_RENEW; - else if (strcmp(executable, "htproxytime") == 0) method = HTPROXY_TIME; - else if (strcmp(executable, "htproxyunixtime") == 0) - method = HTPROXY_UNIXTIME; - else if (strcmp(executable, "htproxymake") == 0) method = HTPROXY_MAKE; - else if (strcmp(executable, "htproxyinfo") == 0) method = HTPROXY_INFO; - - if ((method != HTPROXY_MAKE) && - (method != HTPROXY_INFO) && (optind + 1 != argc)) - { - fprintf(stderr, "Must specify a delegation service URL!\n"); - return 1; - } - - if ((method == HTPROXY_RENEW) && (delegation_id[0] == '\0')) - { - fprintf(stderr, "Must give a Delegation ID when renewing\n"); - return 1; - } - - if (valid == NULL) minutes = 60 * 12; - else minutes = atoi(valid); - - if (verbose) fprintf(stderr, "Proxy valid for %d minutes\n", minutes); - - ERR_load_crypto_strings (); - OpenSSL_add_all_algorithms(); - - if ((cert == NULL) && (key != NULL)) cert = key; - else if ((cert != NULL) && (key == NULL)) key = cert; - else if ((cert == NULL) && (key == NULL)) - { - if (method != HTPROXY_MAKE) cert = getenv("X509_USER_PROXY"); - - if (cert != NULL) key = cert; - else - { - if (method != HTPROXY_MAKE) - asprintf(&(cert), "/tmp/x509up_u%d", geteuid()); - - /* one fine day, we will check the proxy file for - expiry too to avoid suprises when we try to use it ... */ - - if (stat(cert, &statbuf) == 0) key = cert; - else if (method != HTPROXY_INFO) - { - cert = getenv("X509_USER_CERT"); - key = getenv("X509_USER_KEY"); - - userpasswd = getpwuid(geteuid()); - - if ((cert == NULL) && - (userpasswd != NULL) && - (userpasswd->pw_dir != NULL)) - asprintf(&(cert), "%s/.globus/usercert.pem", - userpasswd->pw_dir); - - if ((key == NULL) && - (userpasswd != NULL) && - (userpasswd->pw_dir != NULL)) - asprintf(&(key), "%s/.globus/userkey.pem", - userpasswd->pw_dir); - - } - } - } - - if (capath == NULL) capath = getenv("X509_CERT_DIR"); - if (capath == NULL) capath = "/etc/grid-security/certificates"; - - if (verbose) fprintf(stderr, "key=%s\ncert=%s\ncapath=%s\n", - key, cert, capath); - - if ((key != NULL) && (cert != NULL) && - (strcmp(key, cert) != 0)) /* we have to concatenate for gSOAP */ - { - keycert = strdup("/tmp/.XXXXXX"); - - fd = mkstemp(keycert); - ofp = fdopen(fd, "w"); - - ifp = fopen(key, "r"); - while ((c = fgetc(ifp)) != EOF) fputc(c, ofp); - fclose(ifp); - - ifp = fopen(cert, "r"); - while ((c = fgetc(ifp)) != EOF) fputc(c, ofp); - fclose(ifp); - - fclose(ofp); - - if (verbose) fprintf(stderr, "Created %s key/cert file\n", keycert); - } - else keycert = key; - - if ((method == HTPROXY_PUT) || (method == HTPROXY_RENEW)) - { - if (verbose) - { - fprintf(stderr, "Using SOAP delegation protocol\n"); - fprintf(stderr, "Delegation-ID: %s\n", delegation_id); - } - - soap_init(&soap_get); - - if (soap_ssl_client_context(&soap_get, - SOAP_SSL_DEFAULT, - keycert, - "", - NULL, - capath, - NULL)) - { - soap_print_fault(&soap_get, stderr); - return 1; - } - - if ((method == HTPROXY_RENEW) && (delegation_id[0] != '\0')) - { - if (verbose) fprintf(stderr, "Send renewProxyReq to service\n"); - - soap_call_ns__renewProxyReq(&soap_get, - argv[optind], /* HTTPS url of service */ - "http://www.gridsite.org/namespaces/delegation-1", - delegation_id, - &renewProxyReqResponse); - - if (soap_get.error) - { - soap_print_fault(&soap_get, stderr); - return 1; - } - - reqtxt = renewProxyReqResponse._renewProxyReqReturn; - } - else - { - if (verbose) fprintf(stderr, "Send getNewProxyReq to service\n"); - - soap_call_ns__getNewProxyReq(&soap_get, - argv[optind], /* HTTPS url of service */ - "http://www.gridsite.org/namespaces/delegation-1", - &getNewProxyReqResponse); - - if (soap_get.error) - { - soap_print_fault(&soap_get, stderr); - return 1; - } - - reqtxt = getNewProxyReqResponse.getNewProxyReqReturn->proxyRequest; - delegation_id = - getNewProxyReqResponse.getNewProxyReqReturn->delegationID; - } - - if (verbose) fprintf(stderr, "reqtxt:\n%s", reqtxt); - - if (GRSTx509MakeProxyCert(&certtxt, stderr, reqtxt, cert, key, minutes) - != GRST_RET_OK) - { - return 1; - } - - soap_init(&soap_put); - - if (verbose) fprintf(stderr, "Send putProxy to service:\n%s\n", certtxt); - - if (soap_ssl_client_context(&soap_put, - SOAP_SSL_DEFAULT, - keycert, - "", - NULL, - capath, - NULL)) - { - soap_print_fault(&soap_put, stderr); - return 1; - } - - soap_call_ns__putProxy(&soap_put, argv[optind], - "http://www.gridsite.org/namespaces/delegation-1", - delegation_id, - certtxt, unused); - if (soap_put.error) - { - soap_print_fault(&soap_put, stderr); - return 1; - } - - puts(delegation_id); - - return 0; - } - else if (method == HTPROXY_DESTROY) - { - if (verbose) - { - fprintf(stderr, "Using SOAP proxy destroy protocol\n"); - fprintf(stderr, "Delegation-ID: %s\n", delegation_id); - } - - soap_init(&soap_put); - - if (verbose) fprintf(stderr, "Send destroy to service:\n"); - - if (soap_ssl_client_context(&soap_put, - SOAP_SSL_DEFAULT, - keycert, - "", - NULL, - capath, - NULL)) - { - soap_print_fault(&soap_put, stderr); - return 1; - } - - soap_call_ns__destroy(&soap_put, argv[optind], - "http://www.gridsite.org/namespaces/delegation-1", - delegation_id, - &destroyResponse); - if (soap_put.error) - { - soap_print_fault(&soap_put, stderr); - return 1; - } - - return 0; - } - else if ((method == HTPROXY_TIME) || (method == HTPROXY_UNIXTIME)) - { - if (verbose) - { - fprintf(stderr, "Using SOAP proxy get expiration time protocol\n"); - fprintf(stderr, "Delegation-ID: %s\n", delegation_id); - } - - soap_init(&soap_put); - - if (verbose) fprintf(stderr, "Send get time to service:\n"); - - if (soap_ssl_client_context(&soap_put, - SOAP_SSL_DEFAULT, - keycert, - "", - NULL, - capath, - NULL)) - { - soap_print_fault(&soap_put, stderr); - return 1; - } - - soap_call_ns__getTerminationTime(&soap_put, argv[optind], - "http://www.gridsite.org/namespaces/delegation-1", - delegation_id, - &getTerminationTimeResponse); - if (soap_put.error) - { - soap_print_fault(&soap_put, stderr); - return 1; - } - - - if (method == HTPROXY_UNIXTIME) - printf("%ld\n", getTerminationTimeResponse._getTerminationTimeReturn); - else - { - finish_tm = - localtime(&(getTerminationTimeResponse._getTerminationTimeReturn)); - - strftime(timestr, sizeof(timestr), - "%a %b %e %H:%M:%S %Z %Y\n", finish_tm); - - fputs(timestr, stdout); - } - - return 0; - } - else if (method == HTPROXY_MAKE) - { - if (GRSTx509CreateProxyRequest(&reqtxt, &keytxt, NULL) != GRST_RET_OK) - { - fprintf(stderr, "Failed to create internal proxy cert request\n"); - return 1; - } - - if (GRSTx509MakeProxyCert(&proxychain, NULL, reqtxt, cert, key, minutes) - != GRST_RET_OK) - { - fprintf(stderr, "Failed to sign internal proxy cert request\n"); - return 2; - } - - if (GRSTx509StringToChain(&x509_certstack, proxychain) != GRST_RET_OK) - { - fprintf(stderr, "Failed to convert internal proxy chain\n"); - return 3; - } - - if (x509_cert = sk_X509_value(x509_certstack, 0)) - { - certmem = BIO_new(BIO_s_mem()); - if (PEM_write_bio_X509(certmem, x509_cert) == 1) - { - ptrlen = BIO_get_mem_data(certmem, &ptr); - fwrite(ptr, 1, ptrlen, stdout); - } - - BIO_free(certmem); - } - - fputs(keytxt, stdout); - - for (i=1; i <= sk_X509_num(x509_certstack) - 1; ++i) - /* loop through the proxy chain starting at 2nd most recent proxy */ - { - if (x509_cert = sk_X509_value(x509_certstack, i)) - { - certmem = BIO_new(BIO_s_mem()); - if (PEM_write_bio_X509(certmem, x509_cert) == 1) - { - ptrlen = BIO_get_mem_data(certmem, &ptr); - fwrite(ptr, 1, ptrlen, stdout); - } - - BIO_free(certmem); - } - } - - sk_X509_free(x509_certstack); - - return 0; - } - else if (method == HTPROXY_INFO) - { - if (cert != NULL) - { - if (verbose) fprintf(stderr, "Getting proxy info from %s\n", cert); - - ifp = fopen(cert, "r"); - if (ifp == NULL) - { - fprintf(stderr, "Failed to open proxy file\n"); - return 2; - } - } - else - { - if (verbose) fprintf(stderr, "Getting proxy info from stdin\n"); - ifp = stdin; - } - - ptrlen = 4096; - ptr = malloc(ptrlen); - i = 0; - - while ((c = fgetc(ifp)) != EOF) - { - ptr[i] = c; - ++i; - - if (i >= ptrlen) - { - ptrlen += 4096; - ptr = realloc(ptr, ptrlen); - } - } - - ptr[i] = '\0'; - if (cert != NULL) fclose(ifp); - - if ((GRSTx509StringToChain(&x509_certstack, ptr) != GRST_RET_OK) || - (x509_certstack == NULL)) - { - fprintf(stderr, "Failed to parse proxy file for certificate chain\n"); - free(ptr); - return 2; - } - - free(ptr); - - if (verbose) fprintf(stderr, "Parsing certificate chain\n"); - - ret = GRSTx509ChainLoadCheck(&grst_chain, x509_certstack, NULL, - capath, vomsdir); - - if ((ret != GRST_RET_OK) || - (grst_chain == NULL) || (grst_chain->firstcert == NULL)) - { - fprintf(stderr, "Failed parsing certificate chain\n"); - return 3; - } - - grst_cert = grst_chain->firstcert; - - for (i=0; grst_cert != NULL; grst_cert = grst_cert->next, ++i) - { - if (grst_cert->type == GRST_CERT_TYPE_CA) p = "(CA) "; - else if (grst_cert->type == GRST_CERT_TYPE_EEC) p = "(EEC) "; - else if (grst_cert->type == GRST_CERT_TYPE_PROXY) p = "(PC) "; - else if (grst_cert->type == GRST_CERT_TYPE_VOMS) p = "(AC) "; - else p = ""; - - printf("%d %s%s\n", i, p, - (grst_cert->type == GRST_CERT_TYPE_VOMS) - ? grst_cert->value : grst_cert->dn); - - printf(" Status : %d ( %s%s%s%s%s%s)\n", grst_cert->errors, - (grst_cert->errors == 0) ? "OK " : "", - (grst_cert->errors & GRST_CERT_BAD_FORMAT) ? "BAD_FORMAT ":"", - (grst_cert->errors & GRST_CERT_BAD_CHAIN) ? "BAD_CHAIN ":"", - (grst_cert->errors & GRST_CERT_BAD_SIG) ? "BAD_SIG ":"", - (grst_cert->errors & GRST_CERT_BAD_TIME) ? "BAD_TIME ":"", - (grst_cert->errors & GRST_CERT_BAD_OCSP) ? "BAD_OCSP ":""); - - printf(" Start : %s", ctime(&(grst_cert->notbefore))); - printf(" Finish : %s", ctime(&(grst_cert->notafter))); - printf(" Delegation : %d\n", grst_cert->delegation); - - if (grst_cert->type == GRST_CERT_TYPE_VOMS) - { - printf(" User DN : %s\n", grst_cert->dn); - printf(" VOMS DN : %s\n\n", grst_cert->issuer); - } - else - { - printf(" Serial : %d\n", grst_cert->serial); - printf(" Issuer : %s\n\n", grst_cert->issuer); - } - } - - GRSTx509ChainFree(grst_chain); - } - /* weirdness */ -} - diff --git a/org.gridsite.core/src/make-gridsite-spec b/org.gridsite.core/src/make-gridsite-spec deleted file mode 100755 index ac48fd2..0000000 --- a/org.gridsite.core/src/make-gridsite-spec +++ /dev/null @@ -1,302 +0,0 @@ -#!/bin/sh - -# test to see if fuse-devel (or fuse.h and libfuse) is installed -# -cat <fuse-test.c -#include -int main() { struct fuse_context ctx; -return fuse_main(0, (char **) 0, (struct fuse_operations *) 0); } -EOF -make fuse-test -if [ $? = 0 ] ; then have_fuse=1 ; fi - -# test to see if gsoap-devel (or stdsoap2.h and libgsoapssl) is installed -# -cat <gsoap-test.c -#include -#ifdef SOAP_BEGIN -main() { return; } -#endif -EOF -make GSOAPDIR=$GSOAPDIR STDSOAP2=$STDSOAP2 gridsite-delegation.cgi -if [ $? = 0 ] ; then have_gsoap=1 ; fi - -cat <gridsite.spec -# -# Autogenerated by make-gridsite-spec -# -# You should modify make-gridsite-spec and rebuild RPM with make rpm -# rather than editing this spec file -# -Name: gridsite -Version: ${PATCH_VERSION:-1.x.x} -# This next piece of .spec/sed magic puts the build OS version in the release -Release: 1%(sed 's/^\([A-Z]\)[^ ]* \([A-Z]\)[^0-9]*\([0-9][^ ]*\).*/\1\2\3/g' /etc/redhat-release | sed 's/[^A-Z,a-z,0-9]//g') -Summary: GridSite -License: Modified BSD -Group: System Environment/Daemons -Source: %{name}-%{version}.src.tar.gz -Prefix: ${MYPREFIX:-/usr} -URL: http://www.gridsite.org/ -Vendor: GridPP -Requires: libxml2 -#Buildrequires: libxml2-devel,curl-ssl-devel,httpd-devel -Packager: Andrew McNab - -%description -GridSite adds GSI, VOMS and GACL support to Apache 2.0 (mod_gridsite), -a library for manipulating these technologies (libgridsite), and CGI -programs for interactive management of HTTP(S) servers (gridsite-admin.cgi) - -See http://www.gridsite.org/ for details. - -%package shared -Group: Development/Libraries -Summary: GridSite shared library and core documentation -Provides: gridsite - -%description shared -GridSite shared library and core documentation - -See http://www.gridsite.org/ for details. - -%package devel -Group: Development/Libraries -Summary: GridSite .a libraries and .h headers - -%description devel -GridSite development libraries - -See http://www.gridsite.org/ for details. - -%package apache -Group: System Environment/Daemons -Summary: GridSite mod_gridsite module for Apache httpd -Requires: gridsite-shared - -%description apache -GridSite Apache module and CGI binaries - -See http://www.gridsite.org/ for details. - -%package commands -Group: Applications/Internet -Summary: HTTP(S) read/write client and other GridSite commands -Requires: curl, gridsite-shared - -%description commands -htcp is a client to fetch files or directory listings from remote -servers using HTTP or HTTPS, or to put or delete files or directories -onto remote servers using HTTPS. htcp is similar to scp(1), but uses -HTTP/HTTPS rather than ssh as its transfer protocol. - -See http://www.gridsite.org/ for details. - -%package gsexec -Group: Applications/Internet -Summary: gsexec binary for the Apache HTTP server - -%description gsexec -This package includes the /usr/sbin/gsexec binary which can be installed -to allow the Apache HTTP server to run CGI programs (and any programs -executed by SSI pages) as a user other than the 'apache' user. gsexec -is a drop-in replacement for suexec, with extended functionality for use -with GridSite and Grid Security credentials. - -See http://www.gridsite.org/ for details. - -%prep - -%setup - -%build -cd src -make prefix=\$RPM_BUILD_ROOT/%{prefix} \ - GSOAPDIR=\$GSOAPDIR OPENSSL_FLAGS=\$OPENSSL_FLAGS \ - OPENSSL_LIBS=\$OPENSSL_LIBS FLAVOR_EXT=\$FLAVOR_EXT - -EOF - -if [ $have_fuse ] ; then -cat <>gridsite.spec -make prefix=\$RPM_BUILD_ROOT/%{prefix} \ - GSOAPDIR=\$GSOAPDIR OPENSSL_FLAGS=\$OPENSSL_FLAGS \ - OPENSSL_LIBS=\$OPENSSL_LIBS FLAVOR_EXT=\$FLAVOR_EXT \ - slashgrid - -EOF -fi - -if [ $have_gsoap ] ; then -cat <>gridsite.spec -make prefix=\$RPM_BUILD_ROOT/%{prefix} \ - GSOAPDIR=\$GSOAPDIR OPENSSL_FLAGS=\$OPENSSL_FLAGS \ - OPENSSL_LIBS=\$OPENSSL_LIBS FLAVOR_EXT=\$FLAVOR_EXT \ - gridsite-delegation.cgi htproxyput - -EOF -fi - -cat <>gridsite.spec - -%install -cd src -make install prefix=\$RPM_BUILD_ROOT/%{prefix} \ -GSOAPDIR=\$GSOAPDIR OPENSSL_FLAGS=\$OPENSSL_FLAGS \ -OPENSSL_LIBS=\$OPENSSL_LIBS FLAVOR_EXT=\$FLAVOR_EXT -EOF - -if [ $have_fuse ] ; then - -cat <>gridsite.spec - -mkdir -p \$RPM_BUILD_ROOT/etc/rc.d/init.d -make install-slashgrid prefix=\$RPM_BUILD_ROOT/%{prefix} \ - GSOAPDIR=\$GSOAPDIR OPENSSL_FLAGS=\$OPENSSL_FLAGS \ - OPENSSL_LIBS=\$OPENSSL_LIBS FLAVOR_EXT=\$FLAVOR_EXT -EOF -fi - -if [ $have_gsoap ] ; then - -cat <>gridsite.spec - -make install-ws prefix=\$RPM_BUILD_ROOT/%{prefix} \ - GSOAPDIR=$GSOAPDIR OPENSSL_FLAGS=\$OPENSSL_FLAGS \ - OPENSSL_LIBS=\$OPENSSL_LIBS FLAVOR_EXT=\$FLAVOR_EXT -EOF -fi - -cat <>gridsite.spec - -%post shared -if [ "\$UID" = "0" ] ; then - /sbin/ldconfig -fi - -%postun -if [ "\$UID" = "0" ] ; then - /sbin/ldconfig -fi - -%files shared -%attr(-, root, root) %{prefix}/lib/libgridsite.so.%{version} -%attr(-, root, root) %{prefix}/lib/libgridsite.so -%attr(-, root, root) %{prefix}/lib/libgridsite_globus.so.%{version} -%attr(-, root, root) %{prefix}/lib/libgridsite_globus.so -%attr(-, root, root) %{prefix}/share/doc/gridsite-${MINOR_VERSION:-1.x} - -%files devel -%attr(-, root, root) %{prefix}/include/gridsite.h -%attr(-, root, root) %{prefix}/include/gridsite-gacl.h -%attr(-, root, root) %{prefix}/lib/libgridsite.a -%attr(-, root, root) %{prefix}/lib/libgridsite_globus.a - -%files apache -%attr(-, root, root) %{prefix}/share/man/man8/mod_gridsite.8.gz -%attr(-, root, root) %{prefix}/lib/httpd/modules/mod_gridsite.so -%attr(-, root, root) %{prefix}/sbin/real-gridsite-admin.cgi -%attr(-, root, root) %{prefix}/sbin/gridsite-copy.cgi - -%files commands -%attr(-, root, root) %{prefix}/bin/htcp -%attr(-, root, root) %{prefix}/bin/htls -%attr(-, root, root) %{prefix}/bin/htll -%attr(-, root, root) %{prefix}/bin/htrm -%attr(-, root, root) %{prefix}/bin/htmkdir -%attr(-, root, root) %{prefix}/bin/htmv -%attr(-, root, root) %{prefix}/bin/htping -%attr(-, root, root) %{prefix}/bin/htfind -%attr(-, root, root) %{prefix}/bin/urlencode -%attr(-, root, root) %{prefix}/bin/findproxyfile -%attr(-, root, root) %{prefix}/share/man/man1/htcp.1.gz -%attr(-, root, root) %{prefix}/share/man/man1/htrm.1.gz -%attr(-, root, root) %{prefix}/share/man/man1/htls.1.gz -%attr(-, root, root) %{prefix}/share/man/man1/htll.1.gz -%attr(-, root, root) %{prefix}/share/man/man1/htmkdir.1.gz -%attr(-, root, root) %{prefix}/share/man/man1/htmv.1.gz -%attr(-, root, root) %{prefix}/share/man/man1/htping.1.gz -%attr(-, root, root) %{prefix}/share/man/man1/htfind.1.gz -%attr(-, root, root) %{prefix}/share/man/man1/urlencode.1.gz -%attr(-, root, root) %{prefix}/share/man/man1/findproxyfile.1.gz - -%files gsexec -%attr(4510, root, apache) %{prefix}/sbin/gsexec -%attr(-, root, root) %{prefix}/share/man/man8/gsexec.8.gz -EOF - -if [ $have_fuse ] ; then - -cat <>gridsite.spec -%package slashgrid -Group: Applications/Internet -Summary: slashgrid daemon -Requires: curl,fuse,fuse-libs - -%description slashgrid -SlashGrid daemon - -%post slashgrid -mkdir -p /grid - -%preun slashgrid -/sbin/service slashgrid stop ; : - -%files slashgrid -%attr(0744, root, root) %{prefix}/sbin/slashgrid -%attr(0744, root, root) /etc/rc.d/init.d/slashgrid -%attr(0700, root, root) /var/spool/slashgrid -%attr(-, root, root) %{prefix}/share/man/man8/slashgrid.8.gz -EOF - -fi - -if [ $have_gsoap ] ; then - -cat <>gridsite.spec -%package services -Group: Applications/Internet -Summary: GridSite WS gridsite-delegation.cgi - -%description services -GridSite WS delegation service, gridsite-delegation.cgi - -%files services -%attr(-, root, root) %{prefix}/sbin/gridsite-delegation.cgi -%attr(-, root, root) %{prefix}/share/man/man8/gridsite-delegation.8.gz -%attr(-, root, root) %{prefix}/share/doc/gridsite-${MINOR_VERSION:-1.x}/delegation-1.1.0.wsdl -%attr(-, root, root) %{prefix}/share/doc/gridsite-${MINOR_VERSION:-1.x}/gridsite-delegation.8 - -%package service-clients -Group: Applications/Internet -Summary: GridSite WS htproxyput -Requires: curl, gridsite-shared - -%description service-clients -GridSite WS delegation client, htproxyput - -See http://www.gridsite.org/ for details. - -%files service-clients -%attr(-, root, root) %{prefix}/bin/htproxyput -%attr(-, root, root) %{prefix}/bin/htproxydestroy -%attr(-, root, root) %{prefix}/bin/htproxytime -%attr(-, root, root) %{prefix}/bin/htproxyunixtime -%attr(-, root, root) %{prefix}/bin/htproxyrenew -%attr(-, root, root) %{prefix}/bin/htproxyinfo -%attr(-, root, root) %{prefix}/share/man/man1/htproxyput.1.gz -%attr(-, root, root) %{prefix}/share/man/man1/htproxydestroy.1.gz -%attr(-, root, root) %{prefix}/share/man/man1/htproxytime.1.gz -%attr(-, root, root) %{prefix}/share/man/man1/htproxyunixtime.1.gz -%attr(-, root, root) %{prefix}/share/man/man1/htproxyrenew.1.gz -%attr(-, root, root) %{prefix}/share/man/man1/htproxyinfo.1.gz -%attr(-, root, root) %{prefix}/share/doc/gridsite-${MINOR_VERSION:-1.x}/htproxyput.1 -%attr(-, root, root) %{prefix}/share/doc/gridsite-${MINOR_VERSION:-1.x}/htproxydestroy.1 -%attr(-, root, root) %{prefix}/share/doc/gridsite-${MINOR_VERSION:-1.x}/htproxytime.1 -%attr(-, root, root) %{prefix}/share/doc/gridsite-${MINOR_VERSION:-1.x}/htproxyunixtime.1 -%attr(-, root, root) %{prefix}/share/doc/gridsite-${MINOR_VERSION:-1.x}/htproxyrenew.1 -%attr(-, root, root) %{prefix}/share/doc/gridsite-${MINOR_VERSION:-1.x}/htproxyinfo.1 -EOF - -fi - diff --git a/org.gridsite.core/src/mod_gridsite.c b/org.gridsite.core/src/mod_gridsite.c deleted file mode 100644 index fcbb7d2..0000000 --- a/org.gridsite.core/src/mod_gridsite.c +++ /dev/null @@ -1,3738 +0,0 @@ -/* - Copyright (c) 2003-7, Andrew McNab, Shiv Kaushal, Joseph Dada, - and Yibiao Li, University of Manchester. All rights reserved. - - Redistribution and use in source and binary forms, with or - without modification, are permitted provided that the following - conditions are met: - - o Redistributions of source code must retain the above - copyright notice, this list of conditions and the following - disclaimer. - o Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following - disclaimer in the documentation and/or other materials - provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND - CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS - BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED - TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - POSSIBILITY OF SUCH DAMAGE. - - - This program includes code from dav_parse_range() from Apache mod_dav.c, - and associated code contributed by David O Callaghan - - Copyright 2000-2005 The Apache Software Foundation or its licensors, as - applicable. - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -/*------------------------------------------------------------------* - * This program is part of GridSite: http://www.gridsite.org/ * - *------------------------------------------------------------------*/ - -#ifndef VERSION -#define VERSION "x.x.x" -#endif - -#ifndef _GNU_SOURCE -#define _GNU_SOURCE -#endif - -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include - -#include -#include - -#include "mod_ssl-private.h" - -#include "gridsite.h" - -#ifndef UNSET -#define UNSET -1 -#endif - -#define GRST_SESSIONS_DIR "/var/www/sessions" - -module AP_MODULE_DECLARE_DATA gridsite_module; - -#define GRST_SITECAST_GROUPS 32 - -struct sitecast_group - { int socket; int quad1; int quad2; int quad3; int quad4; int port; }; - -#define GRST_SITECAST_ALIASES 32 - -struct sitecast_alias - { const char *sitecast_url; const char *scheme; int port; - const char *local_path; const char *local_hostname; }; - -/* Globals, defined by main server directives in httpd.conf - These are assigned default values in create_gridsite_srv_config() */ - -int gridhttpport = 0; /* set by create_gridsite_srv_config, used as flag */ -char *sessionsdir = NULL; -char *sitecastdnlists = NULL; -char *ocspmodes = NULL; -struct sitecast_group sitecastgroups[GRST_SITECAST_GROUPS+1]; -struct sitecast_alias sitecastaliases[GRST_SITECAST_ALIASES]; - -typedef struct -{ - int auth; - int envs; - int format; - int indexes; - char *indexheader; - int gridsitelink; - char *adminfile; - char *adminuri; - char *helpuri; - char *dnlists; - char *dnlistsuri; - char *adminlist; - int gsiproxylimit; - char *unzip; - char *methods; - char *editable; - char *headfile; - char *footfile; - int gridhttp; - char *aclformat; - char *aclpath; - char *execmethod; - char *delegationuri; - ap_unix_identity_t execugid; - apr_fileperms_t diskmode; -} mod_gridsite_dir_cfg; /* per-directory config choices */ - - -/* - * parse_content_range() is loosely - * based on modules/dav/main/mod_dav.c from Apache - */ - -int parse_content_range(request_rec *r, apr_off_t *range_start, - apr_off_t *range_end, apr_off_t *range_length) -{ -// this all needs verifying to be ok for large (>2GB, >4GB) files - - const char *range_c; - char *range; - char *dash; - char *slash; - - range_c = apr_table_get(r->headers_in, "content-range"); - if (range_c == NULL) return 0; - - range = apr_pstrdup(r->pool, range_c); - - if ((strncasecmp(range, "bytes ", 6) != 0) || - ((dash = ap_strchr(range, '-')) == NULL) || - ((slash = ap_strchr(range, '/')) == NULL)) - { - return 0; /* malformed header. ignore it (per S14.16 of RFC2616) */ - } - - *dash = *slash = '\0'; - - // Check for GridSite-specific Content-Range: bytes *-*/LENGTH form - - if ((range[6] == '*') && (dash[1] == '*')) - { - if (slash[1] == '*') return 0; /* invalid truncation length */ - - *range_length = apr_atoi64(&slash[1]); - *range_start = 0; - *range_end = 0; - - return 1; /* a valid (truncation) length */ - } - - *range_length = 0; - *range_start = apr_atoi64(&range[6]); - *range_end = apr_atoi64(&dash[1]); - - if ((*range_end < *range_start) || - ((slash[1] != '*') && (apr_atoi64(&slash[1]) <= *range_end))) - return 0; /* ignore invalid ranges */ - - /* we now have a valid range */ - return 1; -} - -char *make_admin_footer(request_rec *r, mod_gridsite_dir_cfg *conf, - int isdirectory) -/* - make string holding last modified text and admin links -*/ -{ - char *out, *https, *p, *dn = NULL, *file = NULL, *permstr = NULL, - *temp, modified[99], *dir_uri, *grst_cred_auri_0 = NULL; - GRSTgaclPerm perm = GRST_PERM_NONE; - struct tm mtime_tm; - time_t mtime_time; - - https = (char *) apr_table_get(r->subprocess_env, "HTTPS"); - - dir_uri = apr_pstrdup(r->pool, r->uri); - p = rindex(dir_uri, '/'); - - if (p == NULL) return ""; - - file = apr_pstrdup(r->pool, &p[1]); - p[1] = '\0'; - /* dir_uri always gets both a leading and a trailing slash */ - - out = apr_pstrdup(r->pool, "

    \n"); - - if (!isdirectory) - { - mtime_time = apr_time_sec(r->finfo.mtime); - - localtime_r(&mtime_time, &mtime_tm); - strftime(modified, sizeof(modified), - "%a %e %B %Y", &mtime_tm); - temp = apr_psprintf(r->pool,"


    Last modified %s\n", modified); - out = apr_pstrcat(r->pool, out, temp, NULL); - - if ((conf->adminuri != NULL) && - (conf->adminuri[0] != '\0') && - (conf->adminfile != NULL) && - (conf->adminfile[0] != '\0') && - (strncmp(file, GRST_HIST_PREFIX, sizeof(GRST_HIST_PREFIX)-1) != 0)) - { - temp = apr_psprintf(r->pool, - ". " - "View page history\n", - conf->adminfile, file); - out = apr_pstrcat(r->pool, out, temp, NULL); - } - - out = apr_pstrcat(r->pool, out, "", NULL); - } - - out = apr_pstrcat(r->pool, out, "
    ", NULL); - - if (r->connection->notes != NULL) - { - grst_cred_auri_0 = (char *) - apr_table_get(r->connection->notes, "GRST_CRED_AURI_0"); - } - - if ((grst_cred_auri_0 != NULL) && - (strncmp(grst_cred_auri_0, "dn:", 3) == 0)) - { - dn = &grst_cred_auri_0[3]; - if (dn[0] == '\0') dn = NULL; - } - - if (dn != NULL) - { - temp = apr_psprintf(r->pool, "You are %s
    \n", dn); - out = apr_pstrcat(r->pool, out, temp, NULL); - - if (r->notes != NULL) - permstr = (char *) apr_table_get(r->notes, "GRST_PERM"); - - if ((permstr != NULL) && - (conf->adminuri != NULL) && - (conf->adminuri[0] != '\0') && - (conf->adminfile != NULL) && - (conf->adminfile[0] != '\0')) - { - sscanf(permstr, "%d", &perm); - - if (!isdirectory && - GRSTgaclPermHasWrite(perm) && - (strncmp(file, GRST_HIST_PREFIX, - sizeof(GRST_HIST_PREFIX) - 1) != 0)) - { - temp = apr_psprintf(r->pool, - "" - "Edit page .\n", conf->adminfile, file); - out = apr_pstrcat(r->pool, out, temp, NULL); - } - - if (GRSTgaclPermHasList(perm) || GRSTgaclPermHasWrite(perm)) - { - temp = apr_psprintf(r->pool, - "Manage directory .\n", - dir_uri, conf->adminfile); - - out = apr_pstrcat(r->pool, out, temp, NULL); - } - } - } - - if ((https != NULL) && (strcasecmp(https, "on") == 0)) - temp = apr_psprintf(r->pool, - "Switch to HTTP \n", - r->server->server_hostname, r->unparsed_uri); - else temp = apr_psprintf(r->pool, - "Switch to HTTPS \n", - r->server->server_hostname, r->unparsed_uri); - - out = apr_pstrcat(r->pool, out, temp, NULL); - - if ((conf->helpuri != NULL) && (conf->helpuri[0] != '\0')) - { - temp = apr_psprintf(r->pool, - ". Website Help\n", conf->helpuri); - out = apr_pstrcat(r->pool, out, temp, NULL); - } - - if ((!isdirectory) && - (conf->adminuri != NULL) && - (conf->adminuri[0] != '\0') && - (conf->adminfile != NULL) && - (conf->adminfile[0] != '\0')) - { - temp = apr_psprintf(r->pool, ". " - "Print View\n", conf->adminfile, file); - out = apr_pstrcat(r->pool, out, temp, NULL); - } - - if (conf->gridsitelink) - { - temp = apr_psprintf(r->pool, - ". Built with " - "GridSite %s\n", VERSION); - out = apr_pstrcat(r->pool, out, temp, NULL); - } - - out = apr_pstrcat(r->pool, out, "\n
    \n", NULL); - - return out; -} - -void delegation_header(request_rec *r, mod_gridsite_dir_cfg *conf){ - - apr_table_add(r->headers_out, - apr_pstrdup(r->pool, "Proxy-Delegation-Service"), - apr_psprintf(r->pool,"https://%s%s", r->hostname, conf->delegationuri)); - return; - -} - -int html_format(request_rec *r, mod_gridsite_dir_cfg *conf) -/* - try to do GridSite formatting of .html files (NOT .shtml etc) -*/ -{ - int i, fd, errstatus; - char *buf, *p, *file, *s, *head_formatted, *header_formatted, - *body_formatted, *admin_formatted, *footer_formatted; - size_t length; - struct stat statbuf; - apr_file_t *fp; - - if (r->finfo.filetype == APR_NOFILE) return HTTP_NOT_FOUND; - - if (apr_file_open(&fp, r->filename, APR_READ, 0, r->pool) != 0) - return HTTP_INTERNAL_SERVER_ERROR; - - - /* Put in Delegation service header if required */ - if (conf->delegationuri) delegation_header(r, conf); - - file = rindex(r->uri, '/'); - if (file != NULL) ++file; /* file points to name without path */ - - buf = apr_palloc(r->pool, (size_t)(r->finfo.size + 1)); - length = r->finfo.size; - apr_file_read(fp, buf, &length); - buf[r->finfo.size] = '\0'; - apr_file_close(fp); - - /* **** try to find a header file in this or parent directories **** */ - - /* first make a buffer big enough to hold path names we want to try */ - fd = -1; - s = apr_palloc(r->pool, - strlen(r->filename) + strlen(conf->headfile) + 1); - strcpy(s, r->filename); - - for (;;) - { - p = rindex(s, '/'); - if (p == NULL) break; /* failed to find one */ - p[1] = '\0'; - strcat(p, conf->headfile); - - fd = open(s, O_RDONLY); - if (fd != -1) break; /* found one */ - - *p = '\0'; - } - - if (fd == -1) /* not found, so set up not to output one */ - { - head_formatted = apr_pstrdup(r->pool, ""); - header_formatted = apr_pstrdup(r->pool, ""); - body_formatted = buf; - } - else /* found a header file, so set up head and body to surround it */ - { - fstat(fd, &statbuf); - header_formatted = apr_palloc(r->pool, statbuf.st_size + 1); - read(fd, header_formatted, statbuf.st_size); - header_formatted[statbuf.st_size] = '\0'; - close(fd); - - p = strstr(buf, "pool, ""); - body_formatted = buf; - } - else - { - *p = '\0'; - head_formatted = buf; - ++p; - - while ((*p != '>') && (*p != '\0')) ++p; - - if (*p == '\0') - { - body_formatted = p; - } - else - { - *p = '\0'; - ++p; - body_formatted = p; - } - } - } - - /* **** remove closing tag from body **** */ - - p = strstr(body_formatted, "pool, - strlen(r->filename) + strlen(conf->footfile) + 1); - strcpy(s, r->filename); - - for (;;) - { - p = rindex(s, '/'); - if (p == NULL) break; /* failed to find one */ - - p[1] = '\0'; - strcat(p, conf->footfile); - - fd = open(s, O_RDONLY); - if (fd != -1) break; /* found one */ - - *p = '\0'; - } - - if (fd == -1) /* failed to find a footer, so set up empty default */ - { - footer_formatted = apr_pstrdup(r->pool, ""); - } - else /* found a footer, so set up to use it */ - { - fstat(fd, &statbuf); - footer_formatted = apr_palloc(r->pool, statbuf.st_size + 1); - read(fd, footer_formatted, statbuf.st_size); - footer_formatted[statbuf.st_size] = '\0'; - close(fd); - } - - /* **** can now calculate the Content-Length and output headers **** */ - - length = strlen(head_formatted) + strlen(header_formatted) + - strlen(body_formatted) + strlen(admin_formatted) + - strlen(footer_formatted); - - ap_set_content_length(r, length); - ap_set_content_type(r, "text/html"); - - /* ** output the HTTP body (HTML Head+Body) ** */ - - ap_rputs(head_formatted, r); - ap_rputs(header_formatted, r); - ap_rputs(body_formatted, r); - ap_rputs(admin_formatted, r); - ap_rputs(footer_formatted, r); - - return OK; -} - -int html_dir_list(request_rec *r, mod_gridsite_dir_cfg *conf) -/* - output HTML directory listing, with level of formatting controlled - by GridSiteHtmlFormat/conf->format -*/ -{ - int i, fd, n, nn; - char *buf, *p, *s, *head_formatted, *header_formatted, - *body_formatted, *admin_formatted, *footer_formatted, *temp, - modified[99], *d_namepath, *indexheaderpath, *indexheadertext; - size_t length; - struct stat statbuf; - struct tm mtime_tm; - struct dirent **namelist; - - if (r->finfo.filetype == APR_NOFILE) return HTTP_NOT_FOUND; - - /* Put in Delegation service header if required */ - if (conf->delegationuri) delegation_header(r, conf); - - head_formatted = apr_psprintf(r->pool, - "Directory listing %s\n", r->uri); - - if (conf->format) - { - /* **** try to find a header file in this or parent directories **** */ - - /* first make a buffer big enough to hold path names we want to try */ - fd = -1; - s = apr_palloc(r->pool, - strlen(r->filename) + strlen(conf->headfile) + 1); - strcpy(s, r->filename); - - for (;;) - { - p = rindex(s, '/'); - if (p == NULL) break; /* failed to find one */ - p[1] = '\0'; - strcat(p, conf->headfile); - - fd = open(s, O_RDONLY); - if (fd != -1) break; /* found one */ - - *p = '\0'; - } - - if (fd == -1) /* not found, so set up to output sensible default */ - { - header_formatted = apr_pstrdup(r->pool, ""); - } - else /* found a header file, so set up head and body to surround it */ - { - fstat(fd, &statbuf); - header_formatted = apr_palloc(r->pool, statbuf.st_size + 1); - read(fd, header_formatted, statbuf.st_size); - header_formatted[statbuf.st_size] = '\0'; - close(fd); - } - } - else header_formatted = apr_pstrdup(r->pool, ""); - - body_formatted = apr_psprintf(r->pool, - "

    Directory listing %s

    \n", r->uri); - - if (conf->indexheader != NULL) - { - indexheaderpath = apr_psprintf(r->pool, "%s/%s", r->filename, - conf->indexheader); - fd = open(indexheaderpath, O_RDONLY); - if (fd != -1) - { - fstat(fd, &statbuf); - indexheadertext = apr_palloc(r->pool, statbuf.st_size + 1); - read(fd, indexheadertext, statbuf.st_size); - indexheadertext[statbuf.st_size] = '\0'; - close(fd); - - body_formatted = apr_pstrcat(r->pool, body_formatted, - indexheadertext, NULL); - } - } - - body_formatted = apr_pstrcat(r->pool, body_formatted, "

    \n", NULL); - - if (r->unparsed_uri[1] != '\0') - body_formatted = apr_pstrcat(r->pool, body_formatted, - "\n", - NULL); - - nn = scandir(r->filename, &namelist, 0, versionsort); - for (n=0; n < nn; ++n) - { - if ((namelist[n]->d_name[0] != '.') && - ((conf->indexheader == NULL) || - (strcmp(conf->indexheader, namelist[n]->d_name) != 0))) - { - d_namepath = apr_psprintf(r->pool, "%s/%s", r->filename, - namelist[n]->d_name); - stat(d_namepath, &statbuf); - - localtime_r(&(statbuf.st_mtime), &mtime_tm); - strftime(modified, sizeof(modified), - "", - &mtime_tm); - - if (S_ISDIR(statbuf.st_mode)) - temp = apr_psprintf(r->pool, - "" - "%s\n", - namelist[n]->d_name, statbuf.st_size, statbuf.st_mtime, - namelist[n]->d_name, - statbuf.st_size, modified); - else temp = apr_psprintf(r->pool, - "" - "%s\n", - namelist[n]->d_name, statbuf.st_size, statbuf.st_mtime, - namelist[n]->d_name, - statbuf.st_size, modified); - - body_formatted = apr_pstrcat(r->pool,body_formatted,temp,NULL); - } - - free(namelist[n]); - } - - free(namelist); - - body_formatted = apr_pstrcat(r->pool, body_formatted, "
    [Parent directory]
    %R%e %b %y
    " - "%s/%ld
    " - "%s%ld
    \n", NULL); - - if (conf->format) - { - /* **** set up dynamic part of footer to go at end of body **** */ - - admin_formatted = make_admin_footer(r, conf, TRUE); - - /* **** try to find a footer file in this or parent directories **** */ - - /* first make a buffer big enough to hold path names we want to try */ - fd = -1; - s = apr_palloc(r->pool, - strlen(r->filename) + strlen(conf->footfile) + 1); - strcpy(s, r->filename); - - for (;;) - { - p = rindex(s, '/'); - if (p == NULL) break; /* failed to find one */ - - p[1] = '\0'; - strcat(p, conf->footfile); - - fd = open(s, O_RDONLY); - if (fd != -1) break; /* found one */ - - *p = '\0'; - } - - if (fd == -1) /* failed to find a footer, so use standard default */ - { - footer_formatted = apr_pstrdup(r->pool, ""); - } - else /* found a footer, so set up to use it */ - { - fstat(fd, &statbuf); - footer_formatted = apr_palloc(r->pool, statbuf.st_size + 1); - read(fd, footer_formatted, statbuf.st_size); - footer_formatted[statbuf.st_size] = '\0'; - close(fd); - } - } - else - { - admin_formatted = apr_pstrdup(r->pool, ""); - footer_formatted = apr_pstrdup(r->pool, ""); - } - - /* **** can now calculate the Content-Length and output headers **** */ - - length = strlen(head_formatted) + strlen(header_formatted) + - strlen(body_formatted) + strlen(admin_formatted) + - strlen(footer_formatted); - - ap_set_content_length(r, length); - ap_set_content_type(r, "text/html"); - - /* ** output the HTTP body (HTML Head+Body) ** */ - - ap_rputs(head_formatted, r); - ap_rputs(header_formatted, r); - ap_rputs(body_formatted, r); - ap_rputs(admin_formatted, r); - ap_rputs(footer_formatted, r); - - return OK; -} - -int http_gridhttp(request_rec *r, mod_gridsite_dir_cfg *conf) -{ - int i; - char *httpurl, *filetemplate, *cookievalue, *envname_i, - *grst_cred_i, expires_str[APR_RFC822_DATE_LEN]; - apr_uint64_t gridauthcookie; - apr_table_t *env; - apr_time_t expires_time; - apr_file_t *fp; - - /* create random cookie and gridauthcookie file */ - - if (apr_generate_random_bytes((char *) &gridauthcookie, - sizeof(gridauthcookie)) - != APR_SUCCESS) return HTTP_INTERNAL_SERVER_ERROR; - - ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server, - "Generated GridHTTP passcode %016llx", gridauthcookie); - - filetemplate = apr_psprintf(r->pool, "%s/passcode-%016llxXXXXXX", - ap_server_root_relative(r->pool, - sessionsdir), - gridauthcookie); - - if (apr_file_mktemp(&fp, - filetemplate, - APR_CREATE | APR_WRITE | APR_EXCL, - r->pool) - != APR_SUCCESS) return HTTP_INTERNAL_SERVER_ERROR; - - ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server, - "Created passcode file %s", filetemplate); - - expires_time = apr_time_now() + apr_time_from_sec(300); - /* passcode cookies are valid for only 5 mins! */ - - apr_file_printf(fp, - "expires=%lu\ndomain=%s\npath=%s\nonetime=yes\nmethod=%s\n", - (time_t) apr_time_sec(expires_time), - r->hostname, r->uri, r->method); - /* above variables are evaluated in order and method= MUST be last! */ - - for (i=0; ; ++i) - { - envname_i = apr_psprintf(r->pool, "GRST_CRED_AURI_%d", i); - if (grst_cred_i = (char *) - apr_table_get(r->connection->notes, envname_i)) - { - apr_file_printf(fp, "%s=%s\n", envname_i, grst_cred_i); - } - else break; /* GRST_CRED_AURI_i are numbered consecutively */ - - envname_i = apr_psprintf(r->pool, "GRST_CRED_VALID_%d", i); - if (grst_cred_i = (char *) - apr_table_get(r->connection->notes, envname_i)) - { - apr_file_printf(fp, "%s=%s\n", envname_i, grst_cred_i); - } - else break; /* GRST_CRED_VALID_i are numbered consecutively */ - } - - if (apr_file_close(fp) != APR_SUCCESS) - { - apr_file_remove(filetemplate, r->pool); /* try to clean up */ - return HTTP_INTERNAL_SERVER_ERROR; - } - - /* send redirection header back to client */ - - cookievalue = rindex(filetemplate, '-'); - if (cookievalue != NULL) ++cookievalue; - else cookievalue = filetemplate; - - apr_rfc822_date(expires_str, expires_time); - - apr_table_add(r->headers_out, - apr_pstrdup(r->pool, "Set-Cookie"), - apr_psprintf(r->pool, - "GRIDHTTP_PASSCODE=%s; " - "expires=%s; " - "domain=%s; " - "path=%s", - cookievalue, expires_str, r->hostname, r->uri)); - - if (gridhttpport != DEFAULT_HTTP_PORT) - httpurl = apr_psprintf(r->pool, "http://%s:%d%s", r->hostname, - gridhttpport, ap_escape_uri(r->pool, r->uri)); - else httpurl = apr_pstrcat(r->pool, "http://", r->hostname, - ap_escape_uri(r->pool, r->uri), NULL); - - apr_table_setn(r->headers_out, apr_pstrdup(r->pool, "Location"), httpurl); - - r->status = HTTP_MOVED_TEMPORARILY; - return OK; -} - -int http_put_method(request_rec *r, mod_gridsite_dir_cfg *conf) -{ - char buf[2048], *filename, *dirname, *basename; - const char *p; - size_t block_length, length_sent; - int retcode, stat_ret; - apr_file_t *fp; - struct stat statbuf; - int has_range = 0, is_done = 0; - apr_off_t range_start, range_end, range_length, length_to_send, length = 0; - - /* *** check if directory creation: PUT /.../ *** */ - - if ((r->unparsed_uri != NULL) && - (r->unparsed_uri[0] != '\0') && - (r->unparsed_uri[strlen(r->unparsed_uri) - 1] == '/')) - { - if (apr_dir_make(r->filename, - conf->diskmode - | APR_UEXECUTE | APR_GEXECUTE | APR_WEXECUTE, - r->pool) != 0) return HTTP_INTERNAL_SERVER_ERROR; - - /* we force the permissions, rather than accept any existing ones */ - - apr_file_perms_set(r->filename, conf->diskmode - | APR_UEXECUTE | APR_GEXECUTE | APR_WEXECUTE); - - ap_set_content_length(r, 0); - ap_set_content_type(r, "text/html"); - return OK; - } - - /* *** otherwise assume trying to create a regular file *** */ - - stat_ret = stat(r->filename, &statbuf); - - /* find if a range is specified */ - - has_range = parse_content_range(r, &range_start, &range_end, &range_length); - - if (has_range) - { - if ((range_start == 0) && (range_end == 0)) /* truncate? */ - { - if (stat_ret != 0) return HTTP_NOT_FOUND; - - if (truncate(r->filename, range_length) != 0) - return HTTP_INTERNAL_SERVER_ERROR; - else return OK; - } - - filename = r->filename; - - if (apr_file_open(&fp, filename, APR_WRITE | APR_CREATE | APR_BUFFERED, - conf->diskmode, r->pool) != 0) return HTTP_INTERNAL_SERVER_ERROR; - } - else /* use temporary file if not a partial transfer */ - { - dirname = apr_pstrdup(r->pool, r->filename); - basename = rindex(dirname, '/'); - if (basename == NULL) return HTTP_INTERNAL_SERVER_ERROR; - - *basename = '\0'; - ++basename; - - filename = apr_psprintf(r->pool, - "%s/.grsttmp-%s-XXXXXX", dirname, basename); - - if (apr_file_mktemp(&fp, filename, - APR_CREATE | APR_WRITE | APR_BUFFERED | APR_EXCL, r->pool) - != APR_SUCCESS) return HTTP_INTERNAL_SERVER_ERROR; -/* - p = apr_table_get(r->headers_in, "Content-Length"); - if (p != NULL) - { - length = (apr_off_t) atol(p); - if (length > 16384) - { - if (apr_file_seek(fp, APR_SET, &length) == 0) - { - block_length = 1; - apr_file_write(fp, "0", &block_length); - } - - apr_file_seek(fp, APR_SET, 0); - } - } -*/ - } - - /* we force the permissions, rather than accept any existing ones */ - - apr_file_perms_set(filename, conf->diskmode); - - if (has_range) - { - if (apr_file_seek(fp, APR_SET, &range_start) != 0) - { - retcode = HTTP_INTERNAL_SERVER_ERROR; - return retcode; - } - - length_to_send = range_end - range_start + 1; - } - - retcode = ap_setup_client_block(r, REQUEST_CHUNKED_DECHUNK); - if (retcode == OK) - { - if (has_range) length_sent = 0; - - if (ap_should_client_block(r)) - while ((block_length = ap_get_client_block(r, buf, sizeof(buf))) > 0) - { - if (has_range && (length_sent + block_length > length_to_send)) - { - block_length = length_to_send - length_sent; - is_done = 1; - } - - if (apr_file_write(fp, buf, &block_length) != 0) - { - retcode = HTTP_INTERNAL_SERVER_ERROR; - break; - } - - if (has_range) - { - if (is_done) break; - else length_sent += block_length; - } - } - ap_set_content_length(r, 0); - ap_set_content_type(r, "text/html"); - } - - if ((apr_file_close(fp) != 0) || (retcode == HTTP_INTERNAL_SERVER_ERROR)) - { - if (strcmp(filename, r->filename) != 0) remove(filename); - return HTTP_INTERNAL_SERVER_ERROR; - } - - if ((strcmp(filename, r->filename) != 0) && - (apr_file_rename(filename, r->filename, r->pool) != 0)) - return HTTP_FORBIDDEN; /* best guess as to the problem ... */ - - if ((retcode == OK) && (stat_ret != 0)) - { - retcode = HTTP_CREATED; - ap_custom_response(r, HTTP_CREATED, ""); - } - - return retcode; -} - -int http_delete_method(request_rec *r, mod_gridsite_dir_cfg *conf) -{ - ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server, - "Try remove(%s)", r->filename); - - if (remove(r->filename) != 0) return HTTP_FORBIDDEN; - - ap_set_content_length(r, 0); - ap_set_content_type(r, "text/html"); - - return OK; -} - -int http_move_method(request_rec *r, mod_gridsite_dir_cfg *conf) -{ - char *destination_translated = NULL; - - if (r->notes != NULL) destination_translated = - (char *) apr_table_get(r->notes, "GRST_DESTINATION_TRANSLATED"); - - if (destination_translated == NULL) return HTTP_BAD_REQUEST; - - if (strcmp(r->filename, destination_translated) == 0) - return HTTP_FORBIDDEN; - - if (apr_file_rename(r->filename, destination_translated, r->pool) != 0) - return HTTP_FORBIDDEN; - - ap_set_content_length(r, 0); - ap_set_content_type(r, "text/html"); - - return OK; -} - -static int mod_gridsite_dir_handler(request_rec *r, mod_gridsite_dir_cfg *conf) -/* - handler switch for directories -*/ -{ - /* *** is this a write method? only possible if GridSiteAuth on *** */ - - if (conf->auth) - { - if ((r->method_number == M_PUT) && - (conf->methods != NULL) && - (strstr(conf->methods, " PUT " ) != NULL)) - return http_put_method(r, conf); - - if ((r->method_number == M_DELETE) && - (conf->methods != NULL) && - (strstr(conf->methods, " DELETE ") != NULL)) - return http_delete_method(r, conf); - } - - /* *** directory listing? *** */ - if ((r->method_number == M_GET) && (conf->indexes)) - return html_dir_list(r, conf); /* directory listing */ - - return DECLINED; /* *** nothing to see here, move along *** */ -} - -static int mod_gridsite_nondir_handler(request_rec *r, mod_gridsite_dir_cfg *conf) -/* - one big handler switch for everything other than directories, since we - might be responding to MIME * / * for local PUT, MOVE, COPY and DELETE, - and GET inside ghost directories. -*/ -{ - char *upgradeheader, *upgradespaced, *p; - const char *https_env; - - /* *** is this a write method or GridHTTP HTTPS->HTTP redirection? - only possible if GridSiteAuth on *** */ - - if (conf->auth) - { - if ((conf->gridhttp) && - ((r->method_number == M_GET) || - ((r->method_number == M_PUT) && - (strstr(conf->methods, " PUT ") != NULL))) && - ((upgradeheader = (char *) apr_table_get(r->headers_in, - "Upgrade")) != NULL) && - ((https_env=apr_table_get(r->subprocess_env,"HTTPS")) != NULL) && - (strcasecmp(https_env, "on") == 0)) - { - upgradespaced = apr_psprintf(r->pool, " %s ", upgradeheader); - - for (p=upgradespaced; *p != '\0'; ++p) - if ((*p == ',') || (*p == '\t')) *p = ' '; - -// TODO: what if we're pointing at a CGI or some dynamic content??? - - if (strstr(upgradespaced, " GridHTTP/1.0 ") != NULL) - return http_gridhttp(r, conf); - } - - if ((r->method_number == M_PUT) && - (conf->methods != NULL) && - (strstr(conf->methods, " PUT " ) != NULL)) - return http_put_method(r, conf); - - if ((r->method_number == M_DELETE) && - (conf->methods != NULL) && - (strstr(conf->methods, " DELETE ") != NULL)) - return http_delete_method(r, conf); - - if ((r->method_number == M_MOVE) && - (conf->methods != NULL) && - (strstr(conf->methods, " MOVE ") != NULL)) - return http_move_method(r, conf); - } - - /* *** check if a special ghost admin CGI *** */ - - if (conf->adminfile && conf->adminuri && - (strlen(r->filename) > strlen(conf->adminfile) + 1) && - (strcmp(&(r->filename[strlen(r->filename) - strlen(conf->adminfile)]), - conf->adminfile) == 0) && - (r->filename[strlen(r->filename)-strlen(conf->adminfile)-1] == '/') && - ((r->method_number == M_POST) || - (r->method_number == M_GET))) - { - ap_internal_redirect(conf->adminuri, r); - return OK; - } - - /* *** finally look for .html files that we should format *** */ - - if ((conf->format) && /* conf->format set by GridSiteHtmlFormat on */ - (strlen(r->filename) > 5) && - (strcmp(&(r->filename[strlen(r->filename)-5]), ".html") == 0) && - (r->method_number == M_GET)) return html_format(r, conf); - - return DECLINED; /* *** nothing to see here, move along *** */ -} - -static void recurse4dirlist(char *dirname, time_t *dirs_time, - char *fulluri, int fullurilen, - char *encfulluri, int enclen, - apr_pool_t *pool, char **body, - int recurse_level) -/* try to find DN Lists in dir[] and its subdirs that match the fulluri[] - prefix. add blobs of HTML to body as they are found. */ -{ - char *unencname, modified[99], *oneline, *d_namepath; - DIR *oneDIR; - struct dirent *onedirent; - struct tm mtime_tm; - size_t length; - struct stat statbuf; - - if ((stat(dirname, &statbuf) != 0) || - (!S_ISDIR(statbuf.st_mode)) || - ((oneDIR = opendir(dirname)) == NULL)) return; - - if (statbuf.st_mtime > *dirs_time) *dirs_time = statbuf.st_mtime; - - while ((onedirent = readdir(oneDIR)) != NULL) - { - if (onedirent->d_name[0] == '.') continue; - - d_namepath = apr_psprintf(pool, "%s/%s", dirname, onedirent->d_name); - if (stat(d_namepath, &statbuf) != 0) continue; - - if (S_ISDIR(statbuf.st_mode) && (recurse_level < GRST_RECURS_LIMIT)) - recurse4dirlist(d_namepath, dirs_time, fulluri, - fullurilen, encfulluri, enclen, - pool, body, recurse_level + 1); - else if ((strncmp(onedirent->d_name, encfulluri, enclen) == 0) && - (onedirent->d_name[strlen(onedirent->d_name) - 1] != '~')) - { - unencname = GRSThttpUrlDecode(onedirent->d_name); - - if (strncmp(unencname, fulluri, fullurilen) == 0) - { - - if (statbuf.st_mtime > *dirs_time) - *dirs_time = statbuf.st_mtime; - - localtime_r(&(statbuf.st_mtime), &mtime_tm); - strftime(modified, sizeof(modified), - "%R%e %b %y", - &mtime_tm); - - oneline = apr_psprintf(pool, - "" - "%s" - "%ld%s\n", - &unencname[fullurilen], statbuf.st_size, - statbuf.st_mtime, unencname, - statbuf.st_size, modified); - - *body = apr_pstrcat(pool, *body, oneline, NULL); - } - - free(unencname); /* libgridsite doesnt use pools */ - } - } - - closedir(oneDIR); -} - -static int mod_gridsite_dnlistsuri_dir_handler(request_rec *r, - mod_gridsite_dir_cfg *conf) -/* - virtual DN-list file lister: make all DN lists on the dn-lists - path of this server appear to be in the dn-lists directory itself - (ie where they appear in the DN lists path doesnt matter, as long - as their name matches) -*/ -{ - int enclen, fullurilen, fd; - char *fulluri, *encfulluri, *dn_list_ptr, *dirname, *unencname, - *body, *oneline, *p, *s, - *head_formatted, *header_formatted, *footer_formatted, - *permstr = NULL; - struct stat statbuf; - size_t length; - time_t dirs_time = 0; - GRSTgaclPerm perm = GRST_PERM_NONE; - - if (r->notes != NULL) - permstr = (char *) apr_table_get(r->notes, "GRST_PERM"); - - if (permstr != NULL) sscanf(permstr, "%d", &perm); - - fulluri = apr_psprintf(r->pool, "https://%s%s", - ap_get_server_name(r), conf->dnlistsuri); - fullurilen = strlen(fulluri); - - encfulluri = GRSThttpUrlEncode(fulluri); - enclen = strlen(encfulluri); - - if (conf->dnlists != NULL) p = conf->dnlists; - else p = getenv("GRST_DN_LISTS"); - - if (p == NULL) p = GRST_DN_LISTS; - dn_list_ptr = apr_pstrdup(r->pool, p); - - head_formatted = apr_psprintf(r->pool, - "Directory listing %s\n", r->uri); - - if (conf->format) - { - /* **** try to find a header file in this or parent directories **** */ - - /* first make a buffer big enough to hold path names we want to try */ - fd = -1; - s = malloc(strlen(r->filename) + strlen(conf->headfile) + 1); - strcpy(s, r->filename); - - for (;;) - { - p = rindex(s, '/'); - if (p == NULL) break; /* failed to find one */ - p[1] = '\0'; - strcat(p, conf->headfile); - - fd = open(s, O_RDONLY); - if (fd != -1) break; /* found one */ - - *p = '\0'; - } - - free(s); - - if (fd == -1) /* not found, so set up to output sensible default */ - { - header_formatted = apr_pstrdup(r->pool, ""); - } - else /* found a header file, so set up head and body to surround it */ - { - fstat(fd, &statbuf); - header_formatted = apr_palloc(r->pool, statbuf.st_size + 1); - read(fd, header_formatted, statbuf.st_size); - header_formatted[statbuf.st_size] = '\0'; - close(fd); - } - } - else header_formatted = apr_pstrdup(r->pool, ""); - - body = apr_psprintf(r->pool, - "

    Directory listing %s

    \n", r->uri); - - if ((r->uri)[1] != '\0') - body = apr_pstrcat(r->pool, body, - "\n", - NULL); - - while ((dirname = strsep(&dn_list_ptr, ":")) != NULL) - recurse4dirlist(dirname, &dirs_time, fulluri, fullurilen, - encfulluri, enclen, r->pool, &body, 0); - - if ((stat(r->filename, &statbuf) == 0) && - S_ISDIR(statbuf.st_mode) && - GRSTgaclPermHasWrite(perm)) - { - oneline = apr_psprintf(r->pool, - "\n" - "" - "\n", - r->uri, conf->adminfile); - - body = apr_pstrcat(r->pool, body, oneline, NULL); - } - - body = apr_pstrcat(r->pool, body, "
    [Parent directory]
    \n", NULL); - - free(encfulluri); /* libgridsite doesnt use pools */ - - if (conf->format) - { - /* **** try to find a footer file in this or parent directories **** */ - - /* first make a buffer big enough to hold path names we want to try */ - fd = -1; - s = malloc(strlen(r->filename) + strlen(conf->footfile)); - strcpy(s, r->filename); - - for (;;) - { - p = rindex(s, '/'); - if (p == NULL) break; /* failed to find one */ - - p[1] = '\0'; - strcat(p, conf->footfile); - - fd = open(s, O_RDONLY); - if (fd != -1) break; /* found one */ - - *p = '\0'; - } - - free(s); - - if (fd == -1) /* failed to find a footer, so use standard default */ - { - footer_formatted = apr_pstrdup(r->pool, ""); - } - else /* found a footer, so set up to use it */ - { - fstat(fd, &statbuf); - footer_formatted = apr_palloc(r->pool, statbuf.st_size + 1); - read(fd, footer_formatted, statbuf.st_size); - footer_formatted[statbuf.st_size] = '\0'; - close(fd); - } - } - else footer_formatted = apr_pstrdup(r->pool, ""); - - /* **** can now calculate the Content-Length and output headers **** */ - - length = strlen(head_formatted) + strlen(header_formatted) + - strlen(body) + strlen(footer_formatted); - - ap_set_content_length(r, length); - r->mtime = apr_time_from_sec(dirs_time); - ap_set_last_modified(r); - ap_set_content_type(r, "text/html"); - - /* ** output the HTTP body (HTML Head+Body) ** */ - ap_rputs(head_formatted, r); - ap_rputs(header_formatted, r); - ap_rputs(body, r); - ap_rputs(footer_formatted, r); - - return OK; -} - -static char *recurse4file(char *dir, char *file, apr_pool_t *pool, - int recurse_level) -/* try to find file[] in dir[]. try subdirs if not found. - return full path to first found version or NULL on failure */ -{ - char *fullfilename, *fulldirname; - struct stat statbuf; - DIR *dirDIR; - struct dirent *file_ent; - - /* try to find in current directory */ - - fullfilename = apr_psprintf(pool, "%s/%s", dir, file); - - if (stat(fullfilename, &statbuf) == 0) return fullfilename; - - /* maybe search in subdirectories */ - - if (recurse_level >= GRST_RECURS_LIMIT) return NULL; - - dirDIR = opendir(dir); - - if (dirDIR == NULL) return NULL; - - while ((file_ent = readdir(dirDIR)) != NULL) - { - if (file_ent->d_name[0] == '.') continue; - - fulldirname = apr_psprintf(pool, "%s/%s", dir, file_ent->d_name); - if ((stat(fulldirname, &statbuf) == 0) && - S_ISDIR(statbuf.st_mode) && - ((fullfilename = recurse4file(fulldirname, file, - pool, recurse_level + 1)) != NULL)) - { - closedir(dirDIR); - return fullfilename; - } - } - - closedir(dirDIR); - - return NULL; -} - -static int mod_gridsite_dnlistsuri_handler(request_rec *r, - mod_gridsite_dir_cfg *conf) -/* - virtual DN-list file generator -*/ -{ - int fd; - char *fulluri, *encfulluri, *dn_list_ptr, *filename, *dirname, *p, - *buf; - struct stat statbuf; - - /* *** check if a special ghost admin CGI *** */ - - if (conf->adminfile && conf->adminuri && - (strlen(r->filename) > strlen(conf->adminfile) + 1) && - (strcmp(&(r->filename[strlen(r->filename) - strlen(conf->adminfile)]), - conf->adminfile) == 0) && - (r->filename[strlen(r->filename)-strlen(conf->adminfile)-1] == '/') && - ((r->method_number == M_POST) || - (r->method_number == M_GET))) - { - ap_internal_redirect(conf->adminuri, r); - return OK; - } - - fulluri = apr_psprintf(r->pool, "https://%s%s", - ap_get_server_name(r), r->uri); - - encfulluri = GRSThttpUrlEncode(fulluri); - - if (conf->dnlists != NULL) p = conf->dnlists; - else p = getenv("GRST_DN_LISTS"); - - if (p == NULL) p = GRST_DN_LISTS; - dn_list_ptr = apr_pstrdup(r->pool, p); - - while ((dirname = strsep(&dn_list_ptr, ":")) != NULL) - { - filename = recurse4file(dirname, encfulluri, r->pool, 0); - - if (filename == NULL) continue; - - fd = open(filename, O_RDONLY); - - if (fd == -1) continue; - - fstat(fd, &statbuf); - ap_set_content_length(r, (apr_off_t) statbuf.st_size); - r->mtime = apr_time_from_sec(statbuf.st_mtime); - ap_set_content_type(r, "text/plain"); - ap_set_last_modified(r); - - buf = apr_palloc(r->pool, statbuf.st_size + 1); - read(fd, buf, statbuf.st_size); - buf[statbuf.st_size] = '\0'; - - ap_rputs(buf, r); - - close(fd); - - return OK; - } - - return HTTP_NOT_FOUND; -} - -static void *create_gridsite_srv_config(apr_pool_t *p, server_rec *s) -{ - int i; - - /* only run once (in base server) */ - if (!(s->is_virtual) && (gridhttpport == 0)) - { - gridhttpport = GRST_HTTP_PORT; - - sessionsdir = apr_pstrdup(p, GRST_SESSIONS_DIR); - /* GridSiteSessionsDir dir-path */ - - sitecastdnlists = NULL; - - sitecastgroups[0].quad1 = 0; - sitecastgroups[0].quad2 = 0; - sitecastgroups[0].quad3 = 0; - sitecastgroups[0].quad4 = 0; - sitecastgroups[0].port = GRST_HTCP_PORT; - /* GridSiteCastUniPort udp-port */ - - for (i=1; i <= GRST_SITECAST_GROUPS; ++i) - { - sitecastgroups[i].port = 0; /* GridSiteCastGroup mcast-list */ - } - - for (i=1; i <= GRST_SITECAST_ALIASES; ++i) - { - sitecastaliases[i].sitecast_url = NULL; - sitecastaliases[i].port = 0; - sitecastaliases[i].scheme = NULL; - sitecastaliases[i].local_path = NULL; - sitecastaliases[i].local_hostname = NULL; - } /* GridSiteCastAlias url path */ - } - - return NULL; -} - -static void *create_gridsite_dir_config(apr_pool_t *p, char *path) -{ - mod_gridsite_dir_cfg *conf = apr_palloc(p, sizeof(*conf)); - - if (path == NULL) /* set up document root defaults */ - { - conf->auth = 0; /* GridSiteAuth on/off */ - conf->envs = 1; /* GridSiteEnvs on/off */ - conf->format = 0; /* GridSiteHtmlFormat on/off */ - conf->indexes = 0; /* GridSiteIndexes on/off */ - conf->indexheader = NULL; /* GridSiteIndexHeader File-value */ - conf->gridsitelink = 1; /* GridSiteLink on/off */ - conf->adminfile = apr_pstrdup(p, GRST_ADMIN_FILE); - /* GridSiteAdminFile File-value */ - conf->adminuri = NULL; /* GridSiteAdminURI URI-value */ - conf->helpuri = NULL; /* GridSiteHelpURI URI-value */ - conf->dnlists = NULL; /* GridSiteDNlists Search-path */ - conf->dnlistsuri = NULL; /* GridSiteDNlistsURI URI-value */ - conf->adminlist = NULL; /* GridSiteAdminList URI-value */ - conf->gsiproxylimit = 1; /* GridSiteGSIProxyLimit number */ - conf->unzip = NULL; /* GridSiteUnzip file-path */ - - conf->methods = apr_pstrdup(p, " GET "); - /* GridSiteMethods methods */ - - conf->editable = apr_pstrdup(p, " txt shtml html htm css js php jsp "); - /* GridSiteEditable types */ - - conf->headfile = apr_pstrdup(p, GRST_HEADFILE); - conf->footfile = apr_pstrdup(p, GRST_FOOTFILE); - /* GridSiteHeadFile and GridSiteFootFile file name */ - - conf->gridhttp = 0; /* GridSiteGridHTTP on/off */ - conf->aclformat = apr_pstrdup(p, "GACL"); - /* GridSiteACLFormat gacl/xacml */ - conf->aclpath = NULL; /* GridSiteACLPath acl-path */ - conf->delegationuri = NULL; /* GridSiteDelegationURI URI-value */ - conf->execmethod = NULL; - /* GridSiteExecMethod nosetuid/suexec/X509DN/directory */ - - conf->execugid.uid = 0; /* GridSiteUserGroup User Group */ - conf->execugid.gid = 0; /* ditto */ - conf->execugid.userdir = 0; /* ditto */ - - conf->diskmode = APR_UREAD | APR_UWRITE; - /* GridSiteDiskMode group-mode world-mode - GroupNone | GroupRead | GroupWrite WorldNone | WorldRead */ - } - else - { - conf->auth = UNSET; /* GridSiteAuth on/off */ - conf->envs = UNSET; /* GridSiteEnvs on/off */ - conf->format = UNSET; /* GridSiteHtmlFormat on/off */ - conf->indexes = UNSET; /* GridSiteIndexes on/off */ - conf->indexheader = NULL; /* GridSiteIndexHeader File-value */ - conf->gridsitelink = UNSET; /* GridSiteLink on/off */ - conf->adminfile = NULL; /* GridSiteAdminFile File-value */ - conf->adminuri = NULL; /* GridSiteAdminURI URI-value */ - conf->helpuri = NULL; /* GridSiteHelpURI URI-value */ - conf->dnlists = NULL; /* GridSiteDNlists Search-path */ - conf->dnlistsuri = NULL; /* GridSiteDNlistsURI URI-value */ - conf->adminlist = NULL; /* GridSiteAdminList URI-value */ - conf->gsiproxylimit = UNSET; /* GridSiteGSIProxyLimit number */ - conf->unzip = NULL; /* GridSiteUnzip file-path */ - conf->methods = NULL; /* GridSiteMethods methods */ - conf->editable = NULL; /* GridSiteEditable types */ - conf->headfile = NULL; /* GridSiteHeadFile file name */ - conf->footfile = NULL; /* GridSiteFootFile file name */ - conf->gridhttp = UNSET; /* GridSiteGridHTTP on/off */ - conf->aclformat = NULL; /* GridSiteACLFormat gacl/xacml */ - conf->aclpath = NULL; /* GridSiteACLPath acl-path */ - conf->delegationuri = NULL; /* GridSiteDelegationURI URI-value */ - conf->execmethod = NULL; /* GridSiteExecMethod */ - conf->execugid.uid = UNSET; /* GridSiteUserGroup User Group */ - conf->execugid.gid = UNSET; /* ditto */ - conf->execugid.userdir = UNSET; /* ditto */ - conf->diskmode = UNSET; /* GridSiteDiskMode group world */ - } - - return conf; -} - -static void *merge_gridsite_dir_config(apr_pool_t *p, void *vserver, - void *vdirect) -/* merge directory with server-wide directory configs */ -{ - mod_gridsite_dir_cfg *conf, *server, *direct; - - server = (mod_gridsite_dir_cfg *) vserver; - direct = (mod_gridsite_dir_cfg *) vdirect; - conf = apr_palloc(p, sizeof(*conf)); - - if (direct->auth != UNSET) conf->auth = direct->auth; - else conf->auth = server->auth; - - if (direct->envs != UNSET) conf->envs = direct->envs; - else conf->envs = server->envs; - - if (direct->format != UNSET) conf->format = direct->format; - else conf->format = server->format; - - if (direct->indexes != UNSET) conf->indexes = direct->indexes; - else conf->indexes = server->indexes; - - if (direct->gridsitelink != UNSET) conf->gridsitelink=direct->gridsitelink; - else conf->gridsitelink=server->gridsitelink; - - if (direct->indexheader != NULL) conf->indexheader = direct->indexheader; - else conf->indexheader = server->indexheader; - - if (direct->adminfile != NULL) conf->adminfile = direct->adminfile; - else conf->adminfile = server->adminfile; - - if (direct->adminuri != NULL) conf->adminuri = direct->adminuri; - else conf->adminuri = server->adminuri; - - if (direct->helpuri != NULL) conf->helpuri = direct->helpuri; - else conf->helpuri = server->helpuri; - - if (direct->dnlists != NULL) conf->dnlists = direct->dnlists; - else conf->dnlists = server->dnlists; - - if (direct->dnlistsuri != NULL) conf->dnlistsuri = direct->dnlistsuri; - else conf->dnlistsuri = server->dnlistsuri; - - if (direct->adminlist != NULL) conf->adminlist = direct->adminlist; - else conf->adminlist = server->adminlist; - - if (direct->gsiproxylimit != UNSET) - conf->gsiproxylimit = direct->gsiproxylimit; - else conf->gsiproxylimit = server->gsiproxylimit; - - if (direct->unzip != NULL) conf->unzip = direct->unzip; - else conf->unzip = server->unzip; - - if (direct->methods != NULL) conf->methods = direct->methods; - else conf->methods = server->methods; - - if (direct->editable != NULL) conf->editable = direct->editable; - else conf->editable = server->editable; - - if (direct->headfile != NULL) conf->headfile = direct->headfile; - else conf->headfile = server->headfile; - - if (direct->footfile != NULL) conf->footfile = direct->footfile; - else conf->footfile = server->footfile; - - if (direct->gridhttp != UNSET) conf->gridhttp = direct->gridhttp; - else conf->gridhttp = server->gridhttp; - - if (direct->aclformat != NULL) conf->aclformat = direct->aclformat; - else conf->aclformat = server->aclformat; - - if (direct->aclpath != NULL) conf->aclpath = direct->aclpath; - else conf->aclpath = server->aclpath; - - if (direct->delegationuri != NULL) conf->delegationuri = direct->delegationuri; - else conf->delegationuri = server->delegationuri; - - if (direct->execmethod != NULL) conf->execmethod = direct->execmethod; - else conf->execmethod = server->execmethod; - - if (direct->execugid.uid != UNSET) - { conf->execugid.uid = direct->execugid.uid; - conf->execugid.gid = direct->execugid.gid; - conf->execugid.userdir = direct->execugid.userdir; } - else - { conf->execugid.uid = server->execugid.uid; - conf->execugid.gid = server->execugid.gid; - conf->execugid.userdir = server->execugid.userdir; } - - if (direct->diskmode != UNSET) conf->diskmode = direct->diskmode; - else conf->diskmode = server->diskmode; - - return conf; -} - -static const char *mod_gridsite_take1_cmds(cmd_parms *a, void *cfg, - const char *parm) -{ - int n, i; - char *p; - - if (strcasecmp(a->cmd->name, "GridSiteSessionsDir") == 0) - { - if (a->server->is_virtual) - return "GridSiteSessionsDir cannot be used inside a virtual server"; - - sessionsdir = apr_pstrdup(a->pool, parm); - } -/* GridSiteOnetimesDir is deprecated in favour of GridSiteSessionsDir */ - else if (strcasecmp(a->cmd->name, "GridSiteOnetimesDir") == 0) - { - if (a->server->is_virtual) - return "GridSiteOnetimesDir cannot be used inside a virtual server"; - - sessionsdir = apr_pstrdup(a->pool, parm); - } - else if (strcasecmp(a->cmd->name, "GridSiteGridHTTPport") == 0) - { - gridhttpport = atoi(parm); - } - else if (strcasecmp(a->cmd->name, "GridSiteCastDNlists") == 0) - { - if (a->server->is_virtual) - return "GridSiteDNlists cannot be used inside a virtual server"; - - sitecastdnlists = apr_pstrdup(a->pool, parm); - } - else if (strcasecmp(a->cmd->name, "GridSiteCastUniPort") == 0) - { - if (a->server->is_virtual) - return "GridSiteCastUniPort cannot be used inside a virtual server"; - - if (sscanf(parm, "%d", &(sitecastgroups[0].port)) != 1) - return "Failed parsing GridSiteCastUniPort numeric value"; - } - else if (strcasecmp(a->cmd->name, "GridSiteCastGroup") == 0) - { - if (a->server->is_virtual) - return "GridSiteCastGroup cannot be used inside a virtual server"; - - for (i=1; i <= GRST_SITECAST_GROUPS; ++i) - { - if (sitecastgroups[i].port == 0) /* a free slot */ - { - sitecastgroups[i].port = GRST_HTCP_PORT; - - if (sscanf(parm, "%d.%d.%d.%d:%d", - &(sitecastgroups[i].quad1), - &(sitecastgroups[i].quad2), - &(sitecastgroups[i].quad3), - &(sitecastgroups[i].quad4), - &(sitecastgroups[i].port)) < 4) - return "Failed parsing GridSiteCastGroup nnn.nnn.nnn.nnn[:port]"; - - break; - } - } - - if (i > GRST_SITECAST_GROUPS) - return "Maximum GridSiteCastGroup groups reached"; - } - else if (strcasecmp(a->cmd->name, "GridSiteAdminFile") == 0) - { - if (index(parm, '/') != NULL) - return "/ not permitted in GridSiteAdminFile"; - - ((mod_gridsite_dir_cfg *) cfg)->adminfile = - apr_pstrdup(a->pool, parm); - } - else if (strcasecmp(a->cmd->name, "GridSiteAdminURI") == 0) - { - if (*parm != '/') return "GridSiteAdminURI must begin with /"; - - ((mod_gridsite_dir_cfg *) cfg)->adminuri = - apr_pstrdup(a->pool, parm); - } - else if (strcasecmp(a->cmd->name, "GridSiteHelpURI") == 0) - { - if (*parm != '/') return "GridSiteHelpURI must begin with /"; - - ((mod_gridsite_dir_cfg *) cfg)->helpuri = - apr_pstrdup(a->pool, parm); - } - else if (strcasecmp(a->cmd->name, "GridSiteDNlists") == 0) - { - ((mod_gridsite_dir_cfg *) cfg)->dnlists = - apr_pstrdup(a->pool, parm); - } - else if (strcasecmp(a->cmd->name, "GridSiteDNlistsURI") == 0) - { - if (*parm != '/') return "GridSiteDNlistsURI must begin with /"; - - if ((*parm != '\0') && (parm[strlen(parm) - 1] == '/')) - ((mod_gridsite_dir_cfg *) cfg)->dnlistsuri = - apr_pstrdup(a->pool, parm); - else - ((mod_gridsite_dir_cfg *) cfg)->dnlistsuri = - apr_pstrcat(a->pool, parm, "/", NULL); - } - else if (strcasecmp(a->cmd->name, "GridSiteAdminList") == 0) - { - ((mod_gridsite_dir_cfg *) cfg)->adminlist = - apr_pstrdup(a->pool, parm); - } - else if (strcasecmp(a->cmd->name, "GridSiteGSIProxyLimit") == 0) - { - n = -1; - - if ((sscanf(parm, "%d", &n) == 1) && (n >= 0)) - ((mod_gridsite_dir_cfg *) cfg)->gsiproxylimit = n; - else return "GridSiteGSIProxyLimit must be a number >= 0"; - } - else if (strcasecmp(a->cmd->name, "GridSiteUnzip") == 0) - { - if (*parm != '/') return "GridSiteUnzip must begin with /"; - - ((mod_gridsite_dir_cfg *) cfg)->unzip = - apr_pstrdup(a->pool, parm); - } - else if (strcasecmp(a->cmd->name, "GridSiteMethods") == 0) - { - ((mod_gridsite_dir_cfg *) cfg)->methods = - apr_psprintf(a->pool, " %s ", parm); - - for (p = ((mod_gridsite_dir_cfg *) cfg)->methods; - *p != '\0'; - ++p) if (*p == '\t') *p = ' '; - } - else if (strcasecmp(a->cmd->name, "GridSiteOCSP") == 0) - { - ocspmodes = apr_psprintf(a->pool, " %s ", parm); - - for (p = ocspmodes; *p != '\0'; ++p) - if (*p == '\t') *p = ' '; - else *p = tolower(*p); - } - else if (strcasecmp(a->cmd->name, "GridSiteEditable") == 0) - { - ((mod_gridsite_dir_cfg *) cfg)->editable = - apr_psprintf(a->pool, " %s ", parm); - - for (p = ((mod_gridsite_dir_cfg *) cfg)->editable; - *p != '\0'; - ++p) if (*p == '\t') *p = ' '; - } - else if (strcasecmp(a->cmd->name, "GridSiteHeadFile") == 0) - { - ((mod_gridsite_dir_cfg *) cfg)->headfile = - apr_pstrdup(a->pool, parm); - } - else if (strcasecmp(a->cmd->name, "GridSiteFootFile") == 0) - { - ((mod_gridsite_dir_cfg *) cfg)->footfile = - apr_pstrdup(a->pool, parm); - } - else if (strcasecmp(a->cmd->name, "GridSiteIndexHeader") == 0) - { - if (index(parm, '/') != NULL) - return "/ not permitted in GridSiteIndexHeader"; - - ((mod_gridsite_dir_cfg *) cfg)->indexheader = - apr_pstrdup(a->pool, parm); - } - else if (strcasecmp(a->cmd->name, "GridSiteACLFormat") == 0) - { - if ((strcasecmp(parm,"GACL") != 0) && - (strcasecmp(parm,"XACML") != 0)) - return "GridsiteACLFormat must be either GACL or XACML"; - - ((mod_gridsite_dir_cfg *) cfg)->aclformat = apr_pstrdup(a->pool, parm); - } - else if (strcasecmp(a->cmd->name, "GridSiteACLPath") == 0) - { - ((mod_gridsite_dir_cfg *) cfg)->aclpath = apr_pstrdup(a->pool, parm); - } - else if (strcasecmp(a->cmd->name, "GridSiteDelegationURI") == 0) - { - if (*parm != '/') return "GridSiteDelegationURI must begin with /"; - - if (*parm != '\0') - ((mod_gridsite_dir_cfg *) cfg)->delegationuri = - apr_pstrdup(a->pool, parm); - - } - else if (strcasecmp(a->cmd->name, "GridSiteExecMethod") == 0) - { - if (strcasecmp(parm, "nosetuid") == 0) - { - ((mod_gridsite_dir_cfg *) cfg)->execmethod = NULL; - return NULL; - } - - if ((strcasecmp(parm, "suexec") != 0) && - (strcasecmp(parm, "X509DN") != 0) && - (strcasecmp(parm, "directory") != 0)) - return "GridsiteExecMethod must be nosetuid, suexec, X509DN or directory"; - - ((mod_gridsite_dir_cfg *) cfg)->execmethod = apr_pstrdup(a->pool, parm); - } - - return NULL; -} - -static const char *mod_gridsite_take2_cmds(cmd_parms *a, void *cfg, - const char *parm1, const char *parm2) -{ - int i; - char *p, *q; - - if (strcasecmp(a->cmd->name, "GridSiteUserGroup") == 0) - { - if (!(unixd_config.suexec_enabled)) - return "Using GridSiteUserGroup will " - "require rebuilding Apache with suexec support!"; - - /* NB ap_uname2id/ap_gname2id are NOT thread safe - but OK - as long as not used in .htaccess, just at server start time */ - - ((mod_gridsite_dir_cfg *) cfg)->execugid.uid = ap_uname2id(parm1); - ((mod_gridsite_dir_cfg *) cfg)->execugid.gid = ap_gname2id(parm2); - ((mod_gridsite_dir_cfg *) cfg)->execugid.userdir = 0; - } - else if (strcasecmp(a->cmd->name, "GridSiteDiskMode") == 0) - { - if ((strcasecmp(parm1, "GroupNone" ) != 0) && - (strcasecmp(parm1, "GroupRead" ) != 0) && - (strcasecmp(parm1, "GroupWrite") != 0)) - return "First parameter of GridSiteDiskMode must be " - "GroupNone, GroupRead or GroupWrite!"; - - if ((strcasecmp(parm2, "WorldNone" ) != 0) && - (strcasecmp(parm2, "WorldRead" ) != 0)) - return "Second parameter of GridSiteDiskMode must be " - "WorldNone or WorldRead!"; - - ((mod_gridsite_dir_cfg *) cfg)->diskmode = - APR_UREAD | APR_UWRITE - | ( APR_GREAD * (strcasecmp(parm1, "GroupRead") == 0)) - | ((APR_GREAD | APR_GWRITE) * (strcasecmp(parm1, "GroupWrite") == 0)) - | ((APR_GREAD | APR_WREAD) * (strcasecmp(parm2, "WorldRead") == 0)); - } - else if (strcasecmp(a->cmd->name, "GridSiteCastAlias") == 0) - { - for (i=0; i < GRST_SITECAST_ALIASES; ++i) /* look for free slot */ - { - if (sitecastaliases[i].sitecast_url == NULL) - { - sitecastaliases[i].scheme = apr_pstrdup(a->pool, parm1); - - if (((p = index(sitecastaliases[i].scheme, ':')) == NULL) - || (p[1] != '/') || (p[2] != '/')) - return "GridSiteCastAlias URL must begin with scheme (http/https/gsiftp/...) and ://"; - - *p = '\0'; - ++p; - while (*p == '/') ++p; - - if ((q = index(p, '/')) == NULL) - return "GridSiteCastAlias URL must be of form scheme://domain:port/dirs"; - - *q = '\0'; - - p = index(p, ':'); - if (p == NULL) - { - return "GridSiteCastAlias URL must include the port number"; - } - - if (sscanf(p, ":%d", &(sitecastaliases[i].port)) != 1) - return "Unable to parse numeric port number in GridSiteCastAlias"; - - sitecastaliases[i].sitecast_url = apr_pstrdup(a->pool, parm1); - sitecastaliases[i].local_path = apr_pstrdup(a->pool, parm2); - sitecastaliases[i].local_hostname = apr_pstrdup(a->pool, - a->server->server_hostname); - - break; - } - } - } - - return NULL; -} - -static const char *mod_gridsite_flag_cmds(cmd_parms *a, void *cfg, - int flag) -{ - if (strcasecmp(a->cmd->name, "GridSiteAuth") == 0) - { - ((mod_gridsite_dir_cfg *) cfg)->auth = flag; - } - else if (strcasecmp(a->cmd->name, "GridSiteEnvs") == 0) - { - ((mod_gridsite_dir_cfg *) cfg)->envs = flag; - } - else if (strcasecmp(a->cmd->name, "GridSiteHtmlFormat") == 0) - { - ((mod_gridsite_dir_cfg *) cfg)->format = flag; - } - else if (strcasecmp(a->cmd->name, "GridSiteIndexes") == 0) - { - ((mod_gridsite_dir_cfg *) cfg)->indexes = flag; - } - else if (strcasecmp(a->cmd->name, "GridSiteLink") == 0) - { - ((mod_gridsite_dir_cfg *) cfg)->gridsitelink = flag; - } - else if (strcasecmp(a->cmd->name, "GridSiteGridHTTP") == 0) - { -// TODO: return error if try this on non-HTTPS virtual server - - ((mod_gridsite_dir_cfg *) cfg)->gridhttp = flag; - } - - return NULL; -} - -static const command_rec mod_gridsite_cmds[] = -{ -// TODO: need to check and document valid contexts for each command! - - AP_INIT_FLAG("GridSiteAuth", mod_gridsite_flag_cmds, - NULL, OR_FILEINFO, "on or off"), - AP_INIT_FLAG("GridSiteEnvs", mod_gridsite_flag_cmds, - NULL, OR_FILEINFO, "on or off"), - AP_INIT_FLAG("GridSiteHtmlFormat", mod_gridsite_flag_cmds, - NULL, OR_FILEINFO, "on or off"), - AP_INIT_FLAG("GridSiteIndexes", mod_gridsite_flag_cmds, - NULL, OR_FILEINFO, "on or off"), - AP_INIT_FLAG("GridSiteLink", mod_gridsite_flag_cmds, - NULL, OR_FILEINFO, "on or off"), - - AP_INIT_TAKE1("GridSiteAdminFile", mod_gridsite_take1_cmds, - NULL, OR_FILEINFO, "Ghost per-directory admin CGI"), - AP_INIT_TAKE1("GridSiteAdminURI", mod_gridsite_take1_cmds, - NULL, OR_FILEINFO, "URI of real gridsite-admin.cgi"), - AP_INIT_TAKE1("GridSiteHelpURI", mod_gridsite_take1_cmds, - NULL, OR_FILEINFO, "URI of Website Help pages"), - AP_INIT_TAKE1("GridSiteDNlists", mod_gridsite_take1_cmds, - NULL, OR_FILEINFO, "DN Lists directories search path"), - AP_INIT_TAKE1("GridSiteDNlistsURI", mod_gridsite_take1_cmds, - NULL, OR_FILEINFO, "URI of published DN lists"), - AP_INIT_TAKE1("GridSiteAdminList", mod_gridsite_take1_cmds, - NULL, OR_FILEINFO, "URI of admin DN List"), - AP_INIT_TAKE1("GridSiteGSIProxyLimit", mod_gridsite_take1_cmds, - NULL, OR_FILEINFO, "Max level of GSI proxy validity"), - AP_INIT_TAKE1("GridSiteUnzip", mod_gridsite_take1_cmds, - NULL, OR_FILEINFO, "Absolute path to unzip command"), - - AP_INIT_RAW_ARGS("GridSiteMethods", mod_gridsite_take1_cmds, - NULL, OR_FILEINFO, "permitted HTTP methods"), - AP_INIT_RAW_ARGS("GridSiteOCSP", mod_gridsite_take1_cmds, - NULL, RSRC_CONF, "Set OCSP lookups"), - AP_INIT_RAW_ARGS("GridSiteEditable", mod_gridsite_take1_cmds, - NULL, OR_FILEINFO, "editable file extensions"), - AP_INIT_TAKE1("GridSiteHeadFile", mod_gridsite_take1_cmds, - NULL, OR_FILEINFO, "filename of HTML header"), - AP_INIT_TAKE1("GridSiteFootFile", mod_gridsite_take1_cmds, - NULL, OR_FILEINFO, "filename of HTML footer"), - AP_INIT_TAKE1("GridSiteIndexHeader", mod_gridsite_take1_cmds, - NULL, OR_FILEINFO, "filename of directory header"), - - AP_INIT_FLAG("GridSiteGridHTTP", mod_gridsite_flag_cmds, - NULL, OR_FILEINFO, "on or off"), - AP_INIT_TAKE1("GridSiteGridHTTPport", mod_gridsite_take1_cmds, - NULL, RSRC_CONF, "GridHTTP port"), - AP_INIT_TAKE1("GridSiteSessionsDir", mod_gridsite_take1_cmds, - NULL, RSRC_CONF, "directory with GridHTTP passcodes and SSL session creds"), -/* GridSiteOnetimesDir is deprecated in favour of GridSiteSessionsDir */ - AP_INIT_TAKE1("GridSiteOnetimesDir", mod_gridsite_take1_cmds, - NULL, RSRC_CONF, "directory with GridHTTP passcodes"), - - AP_INIT_TAKE1("GridSiteCastDNlists", mod_gridsite_take1_cmds, - NULL, RSRC_CONF, "DN Lists directories search path for SiteCast"), - AP_INIT_TAKE1("GridSiteCastUniPort", mod_gridsite_take1_cmds, - NULL, RSRC_CONF, "UDP port for unicast/replies"), - AP_INIT_TAKE1("GridSiteCastGroup", mod_gridsite_take1_cmds, - NULL, RSRC_CONF, "multicast group[:port] to listen for HTCP on"), - AP_INIT_TAKE2("GridSiteCastAlias", mod_gridsite_take2_cmds, - NULL, RSRC_CONF, "URL and local path mapping"), - - AP_INIT_TAKE1("GridSiteACLFormat", mod_gridsite_take1_cmds, - NULL, OR_FILEINFO, "format to save access control lists in"), - AP_INIT_TAKE1("GridSiteACLPath", mod_gridsite_take1_cmds, - NULL, OR_FILEINFO, "explicit location of access control file"), - - AP_INIT_TAKE1("GridSiteDelegationURI", mod_gridsite_take1_cmds, - NULL, OR_FILEINFO, "URI of the delegation service CGI"), - - AP_INIT_TAKE1("GridSiteExecMethod", mod_gridsite_take1_cmds, - NULL, OR_FILEINFO, "execution strategy used by gsexec"), - - AP_INIT_TAKE2("GridSiteUserGroup", mod_gridsite_take2_cmds, - NULL, OR_FILEINFO, - "user and group of gsexec processes in suexec mode"), - - AP_INIT_TAKE2("GridSiteDiskMode", mod_gridsite_take2_cmds, - NULL, OR_FILEINFO, - "group and world file modes for new files/directories"), - - {NULL} -}; - -/* Blank unset these HTTP headers, to prevent injection attacks. - This is run before mod_shib's check_user_id hook, which may - legitimately create such headers. */ - -static int mod_gridsite_check_user_id(request_rec *r) -{ - apr_table_unset(r->headers_in, "User-Distinguished-Name"); -#if 0 - apr_table_unset(r->headers_in, "User-Distinguished-Name-2"); -#endif - apr_table_unset(r->headers_in, "Nist-LoA"); - apr_table_unset(r->headers_in, "LoA"); - apr_table_unset(r->headers_in, "VOMS-Attribute"); - - return DECLINED; /* ie carry on processing request */ -} - -static int mod_gridsite_first_fixups(request_rec *r) -{ - mod_gridsite_dir_cfg *conf; - - if (r->finfo.filetype != APR_DIR) return DECLINED; - - conf = (mod_gridsite_dir_cfg *) - ap_get_module_config(r->per_dir_config, &gridsite_module); - - /* we handle DN Lists as regular files, even if they also match - directory names */ - - if ((conf != NULL) && - (conf->dnlistsuri != NULL) && - (strncmp(r->uri, conf->dnlistsuri, strlen(conf->dnlistsuri)) == 0) && - (strcmp(r->uri, conf->dnlistsuri) != 0)) - { - r->finfo.filetype = APR_REG; - } - - return DECLINED; -} - - -int GRST_get_session_id(SSL *ssl, char *session_id, size_t len) -{ - int i; - SSL_SESSION *session; - - if (((session = SSL_get_session(ssl)) == NULL) || - (session->session_id_length == 0)) return GRST_RET_FAILED; - - if (2 * session->session_id_length + 1 > len) return GRST_RET_FAILED; - - for (i=0; i < (int) session->session_id_length; ++i) - sprintf(&(session_id[i*2]), "%02X", (unsigned char) session->session_id[i]); - - session_id[i*2] = '\0'; - - return GRST_RET_OK; -} - -int GRST_load_ssl_creds(SSL *ssl, conn_rec *conn) -{ - char session_id[(SSL_MAX_SSL_SESSION_ID_LENGTH+1)*2], *sessionfile = NULL, - line[512], *p; - apr_file_t *fp = NULL; - int i; - - if (GRST_get_session_id(ssl, session_id, sizeof(session_id)) != GRST_RET_OK) - return GRST_RET_FAILED; - - sessionfile = apr_psprintf(conn->pool, "%s/sslcreds-%s", - ap_server_root_relative(conn->pool, sessionsdir), - session_id); - - if (apr_file_open(&fp, sessionfile, APR_READ, 0, conn->pool) != APR_SUCCESS) - return GRST_RET_FAILED; - - while (apr_file_gets(line, sizeof(line), fp) == APR_SUCCESS) - { - if (sscanf(line, "GRST_CRED_AURI_%d=", &i) == 1) - { - if ((p = index(line, '\n')) != NULL) *p = '\0'; - p = index(line, '='); - - apr_table_setn(conn->notes, - apr_psprintf(conn->pool, "GRST_CRED_AURI_%d", i), - apr_pstrdup(conn->pool, &p[1])); - } - else if (sscanf(line, "GRST_CRED_VALID_%d=", &i) == 1) - { - if ((p = index(line, '\n')) != NULL) *p = '\0'; - p = index(line, '='); - - apr_table_setn(conn->notes, - apr_psprintf(conn->pool, "GRST_CRED_VALID_%d", i), - apr_pstrdup(conn->pool, &p[1])); - } - else if (sscanf(line, "GRST_OCSP_URL_%d=", &i) == 1) - { - if ((p = index(line, '\n')) != NULL) *p = '\0'; - p = index(line, '='); - - apr_table_setn(conn->notes, - apr_psprintf(conn->pool, "GRST_OCSP_URL_%d", i), - apr_pstrdup(conn->pool, &p[1])); - } - } - - apr_file_close(fp); - - /* connection notes created by GRST_save_ssl_creds() are now reloaded */ - apr_table_set(conn->notes, "GRST_save_ssl_creds", "yes"); - - return GRST_RET_OK; -} - -/* - Save result of AURIs and validity info from chain into connection notes, - and write out in an SSL session creds file. -*/ - -void GRST_save_ssl_creds(conn_rec *conn, GRSTx509Chain *grst_chain) -{ - int i, lastcred; - char envname[14], *tempfile = NULL, - *sessionfile, session_id[(SSL_MAX_SSL_SESSION_ID_LENGTH+1)*2]; - apr_file_t *fp = NULL; - SSL *ssl; - SSLConnRec *sslconn; - GRSTx509Cert *grst_cert = NULL; - - /* check if already done */ - - if ((grst_chain != NULL) && (conn->notes != NULL) && - (apr_table_get(conn->notes, "GRST_save_ssl_creds") != NULL)) return; - - /* we at least need to say we've been run */ - - apr_table_set(conn->notes, "GRST_save_ssl_creds", "yes"); - ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, conn->base_server, - "set GRST_save_ssl_creds"); - - sslconn = (SSLConnRec *)ap_get_module_config(conn->conn_config,&ssl_module); - - if ((sslconn != NULL) && - ((ssl = sslconn->ssl) != NULL) && - (GRST_get_session_id(ssl,session_id,sizeof(session_id)) == GRST_RET_OK)) - { - sessionfile = apr_psprintf(conn->pool, "%s/sslcreds-%s", - ap_server_root_relative(conn->pool, sessionsdir), - session_id); - - tempfile = apr_pstrcat(conn->pool, - ap_server_root_relative(conn->pool, sessionsdir), - "/tmp-XXXXXX", NULL); - - if ((tempfile != NULL) && (tempfile[0] != '\0')) - apr_file_mktemp(&fp, tempfile, - APR_CREATE | APR_WRITE | APR_EXCL, conn->pool); - } - - grst_cert = grst_chain->firstcert; - - for (i=0; grst_cert != NULL; grst_cert = grst_cert->next) - { - if (grst_cert->type == GRST_CERT_TYPE_VOMS) - { - apr_table_setn(conn->notes, - apr_psprintf(conn->pool, "GRST_CRED_AURI_%d", i), - apr_pstrcat(conn->pool, "fqan:", grst_cert->value, NULL)); - - if (fp != NULL) apr_file_printf(fp, "GRST_CRED_AURI_%d=fqan:%s\n", - i, grst_cert->value); - - apr_table_setn(conn->notes, - apr_psprintf(conn->pool, "GRST_CRED_VALID_%d", i), - apr_psprintf(conn->pool, - "notbefore=%ld notafter=%ld delegation=%d nist-loa=%d", - grst_cert->notbefore, - grst_cert->notafter, 0, 0)); - - if (fp != NULL) apr_file_printf(fp, - "GRST_CRED_VALID_%d=notbefore=%ld notafter=%ld delegation=%d nist-loa=%d\n", - i, grst_cert->notbefore, - grst_cert->notafter, 0, 0); - - ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, conn->base_server, - "store GRST_CRED_AURI_%d=fqan:%s", i, grst_cert->value); - - ++i; - } - else if ((grst_cert->type == GRST_CERT_TYPE_EEC) || - (grst_cert->type == GRST_CERT_TYPE_PROXY)) - { - apr_table_setn(conn->notes, - apr_psprintf(conn->pool, "GRST_CRED_AURI_%d", i), - apr_pstrcat(conn->pool, "dn:", grst_cert->dn, NULL)); - - if (fp != NULL) apr_file_printf(fp, "GRST_CRED_AURI_%d=dn:%s\n", - i, grst_cert->dn); - - apr_table_setn(conn->notes, - apr_psprintf(conn->pool, "GRST_CRED_VALID_%d", i), - apr_psprintf(conn->pool, - "notbefore=%ld notafter=%ld delegation=%d nist-loa=%d", - grst_cert->notbefore, - grst_cert->notafter, 0, 0)); - - if (fp != NULL) apr_file_printf(fp, - "GRST_CRED_VALID_%d=notbefore=%ld notafter=%ld delegation=%d nist-loa=%d\n", - i, grst_cert->notbefore, - grst_cert->notafter, 0, 0); - - ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, conn->base_server, - "store GRST_CRED_AURI_%d=dn:%s", i, grst_cert->dn); - - ++i; - } - } - - /* this needs to be merged into grst_x509? */ -#if 0 - if (ocspmodes != NULL) - { - int j; - const char *ex_sn; - char s[80]; - X509 *cert; - X509_EXTENSION *ex; - - for (j=sk_X509_num(certstack)-1; j >= 0; --j) - { - cert = sk_X509_value(certstack, j); - - for (i=0; i < X509_get_ext_count(cert); ++i) - { - ex = X509_get_ext(cert, i); - - OBJ_obj2txt(s, sizeof(s), X509_EXTENSION_get_object(ex), 0); - - if (strcmp(s, "authorityInfoAccess") == 0) /* OCSP */ - { - apr_table_setn(conn->notes, "GRST_OCSP_URL", - (const char *) X509_EXTENSION_get_data(ex)); - - /* strategy is to remove what has been checked, - for this connnection */ - apr_table_set(conn->notes, "GRST_OCSP_UNCHECKED", - ocspmodes); - - ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, conn->base_server, - "store GRST_OCSP_URL_%d=%s", i, X509_EXTENSION_get_data(ex)); - - if (fp != NULL) apr_file_printf(fp, "GRST_OCSP_URL_%d=%s\n", - i, X509_EXTENSION_get_data(ex)); - } - } - } - } -#endif - /* end of bit that needs to go into grst_x509 */ - - if (fp != NULL) - { - apr_file_close(fp); - apr_file_rename(tempfile, sessionfile, conn->pool); - } -} - -static char *get_aclpath_component(request_rec *r, int n) -/* - Get the nth component of REQUEST_URI, or component 0 - which is the server name. - -*/ -{ - int ii, i, nn; - - if (n == 0) return r->server->server_hostname; - - if (r->uri == NULL) return NULL; /* some kind of internal error? */ - - i = 1; /* start of first component */ - nn = 1; - - for (ii=1; r->uri[ii] != '\0'; ++ii) /* look for this component */ - { - if (r->uri[ii] == '/') /* end of a component */ - { - if (nn == n) break; - - ++nn; - i = ii + 1; - } - else if ((r->uri[ii] == '.') && (r->uri[ii+1] == '.')) - { - return NULL; /* can this happen? dont allow anyway */ - } - } - - if (nn != n) return NULL; /* no component for this number */ - - return apr_psprintf(r->pool, "%.*s", ii - i, &(r->uri[i])); -} - -static char *make_aclpath(request_rec *r, char *format) -{ - int i, n; - char *formatted, *p; - - formatted = apr_pstrdup(r->pool, format); - - while (1) - { - for (i=0; (formatted[i] != '\0') && (formatted[i] != '%'); ++i) ; - - if (formatted[i] == '\0') break; - - if ((formatted[i] == '%') && (formatted[i+1] == '%')) - { - ++i; - continue; - } - - if (sscanf(&formatted[i+1], "%d", &n) != 1) - { - return NULL; /* not %% or %0,%1,... */ - } - - formatted[i] = '\0'; - - for (i++; isdigit(formatted[i]); ++i) ; - - if ((p = get_aclpath_component(r, n)) == NULL) return NULL; - - formatted = apr_pstrcat(r->pool, formatted, p, &formatted[i],NULL); - i += strlen(p); - } - - return ap_server_root_relative(r->pool, formatted); -} - -static int mod_gridsite_perm_handler(request_rec *r) -/* - Do authentication/authorization here rather than in the normal module - auth functions since the results of mod_ssl are available. - - We also publish environment variables here if requested by GridSiteEnv. -*/ -{ - int retcode = DECLINED, i, n, file_is_acl = 0, cc_delegation, - destination_is_acl = 0, ishttps = 0, nist_loa, delegation; - char *dn, *p, envname1[30], envname2[30], - *grst_cred_auri_0 = NULL, *dir_path, - *remotehost, s[99], *grst_cred_auri_i, *cookies, *file, *https, - *gridauthpasscode = NULL, *cookiefile, oneline[1025], *key_i, - *destination = NULL, *destination_uri = NULL, *querytmp, - *destination_prefix = NULL, *destination_translated = NULL, - *aclpath = NULL, *grst_cred_valid_0 = NULL, *grst_cred_valid_i; - char *vomsAttribute = NULL, *loa; - const char *content_type; - time_t now, notbefore, notafter; - apr_table_t *env; - apr_finfo_t cookiefile_info; - apr_file_t *fp; - request_rec *destreq; - GRSTgaclCred *cred = NULL, *cred_0 = NULL; - GRSTgaclUser *user = NULL; - GRSTgaclPerm perm = GRST_PERM_NONE, destination_perm = GRST_PERM_NONE; - GRSTgaclAcl *acl = NULL; - mod_gridsite_dir_cfg *cfg; - SSLConnRec *sslconn; - STACK_OF(X509) *certstack; - X509 *peercert; - - cfg = (mod_gridsite_dir_cfg *) - ap_get_module_config(r->per_dir_config, &gridsite_module); - - if (cfg == NULL) return DECLINED; - - if ((cfg->auth == 0) && - (cfg->envs == 0)) - return DECLINED; /* if not turned on, look invisible */ - - env = r->subprocess_env; - - /* Get the user's attributes from Shibboleth and set up user credential - based on the attributes if authentication has been carried out using - a Shibboleth Identity Provider.*/ - - /* Get DN from a Shibboleth attribute */ - - dn = (char *) apr_table_get(r->headers_in, "User-Distinguished-Name"); -#if 0 - if ((dn == NULL) || (*dn == '\0')) - dn = (char *) apr_table_get(r->headers_in, "User-Distinguished-Name-2"); -#endif - - if ((dn != NULL) && (*dn == '\0')) dn = NULL; - - if (dn != NULL) ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server, "DN: %s", dn); - - /* Get the NIST LoA attribute */ - loa = (char *) apr_table_get(r->headers_in, "nist-loa"); - - if ((loa == NULL) || (*loa == '\0')) - loa = (char *) apr_table_get(r->headers_in, "loa"); - - if ((loa != NULL) && (*loa == '\0')) loa = NULL; - - if (loa != NULL) ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server, "nist-loa: %s", loa); - - /* Set up user credential based on the DN and LoA attributes */ - - if (dn != NULL) - { - cred = GRSTgaclCredCreate("dn:", dn); - - if (loa != NULL) GRSTgaclCredSetNistLoa(cred, atoi(loa)); - else GRSTgaclCredSetNistLoa(cred, 2); - - user = GRSTgaclUserNew(cred); - } - - /* Set up user credential based on VOMS Attribute from Shibboleth? */ - - vomsAttribute = (char *) apr_table_get(r->headers_in, "VOMS-Attribute"); - if (vomsAttribute != NULL) - { - ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server, - "VOMS-Attribute: %s", vomsAttribute); - - cred = GRSTgaclCredCreate("fqan:", vomsAttribute); - if (user == NULL) user = GRSTgaclUserNew(cred); - else GRSTgaclUserAddCred(user, cred); - } - - p = (char *) apr_table_get(r->subprocess_env, "HTTPS"); - if ((p != NULL) && (strcmp(p, "on") == 0)) ishttps = 1; - - /* reload per-connection (SSL) cred variables? */ - - sslconn = (SSLConnRec *) ap_get_module_config(r->connection->conn_config, - &ssl_module); - if ((user == NULL) && - (sslconn != NULL) && - (sslconn->ssl != NULL) && - (sslconn->ssl->session != NULL) && - (r->connection->notes != NULL) && - (apr_table_get(r->connection->notes, "GRST_save_ssl_creds") == NULL)) - { - if (GRST_load_ssl_creds(sslconn->ssl, r->connection) == GRST_RET_OK) - ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server, - "Restored SSL session data from session cache file"); - } - - delegation = ((mod_gridsite_dir_cfg *) cfg)->gsiproxylimit + 1; - - if ((user == NULL) && - (r->connection->notes != NULL) && - ((grst_cred_auri_0 = (char *) - apr_table_get(r->connection->notes, "GRST_CRED_AURI_0")) != NULL) && - (strncmp(grst_cred_auri_0, "dn:", 3) == 0) && - ((grst_cred_valid_0 = (char *) - apr_table_get(r->connection->notes, "GRST_CRED_VALID_0")) != NULL) && - (sscanf(grst_cred_valid_0, - "notbefore=%ld notafter=%ld delegation=%d nist-loa=%d", - ¬before, ¬after, &delegation, &nist_loa) == 4) && - (delegation <= ((mod_gridsite_dir_cfg *) cfg)->gsiproxylimit)) - { - cred_0 = GRSTgaclCredCreate(grst_cred_auri_0, NULL); - if (cred_0 != NULL) - { - ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server, - "Using identity %s from SSL/TLS", grst_cred_auri_0); - - GRSTgaclCredSetNotBefore( cred_0, notbefore); - GRSTgaclCredSetNotAfter( cred_0, notafter); - GRSTgaclCredSetDelegation(cred_0, delegation); - - if (delegation == 0) GRSTgaclCredSetNistLoa(cred_0, 3); - else GRSTgaclCredSetNistLoa(cred_0, 2); - - user = GRSTgaclUserNew(cred_0); - - /* check for VOMS etc in GRST_CRED_AURI_i too */ - - for (i=1; ; ++i) - { - snprintf(envname1, sizeof(envname1), "GRST_CRED_AURI_%d", i); - snprintf(envname2, sizeof(envname2), "GRST_CRED_VALID_%d", i); - - if ((grst_cred_auri_i = (char *) - apr_table_get(r->connection->notes,envname1)) && - (grst_cred_valid_i = (char *) - apr_table_get(r->connection->notes,envname2))) - { - cred = GRSTgaclCredCreate(grst_cred_auri_i, NULL); - if (cred != NULL) - { - notbefore = 0; - notafter = 0; - delegation = 0; - nist_loa = 0; - - sscanf(grst_cred_valid_i, - "notbefore=%ld notafter=%ld delegation=%d nist-loa=%d", - ¬before, ¬after, &delegation, &nist_loa); - - GRSTgaclCredSetNotBefore( cred, notbefore); - GRSTgaclCredSetNotAfter( cred, notafter); - GRSTgaclCredSetDelegation(cred, delegation); - GRSTgaclCredSetDelegation(cred, nist_loa); - - GRSTgaclUserAddCred(user, cred); - } - } - else break; /* GRST_CRED_AURI_i are numbered consecutively */ - } - } - } - - if ((user != NULL) && ((mod_gridsite_dir_cfg *) cfg)->dnlists) - GRSTgaclUserLoadDNlists(user, ((mod_gridsite_dir_cfg *) cfg)->dnlists); - - /* add DNS credential */ - - remotehost = (char *) ap_get_remote_host(r->connection, - r->per_dir_config, REMOTE_DOUBLE_REV, NULL); - if ((remotehost != NULL) && (*remotehost != '\0')) - { - cred = GRSTgaclCredCreate("dns:", remotehost); - - if (user == NULL) user = GRSTgaclUserNew(cred); - else GRSTgaclUserAddCred(user, cred); - } - - /* add IP credential */ - - remotehost = (char *) ap_get_remote_host(r->connection, - r->per_dir_config, REMOTE_DOUBLE_REV, NULL); - if ((remotehost != NULL) && (*remotehost != '\0')) - { - cred = GRSTgaclCredCreate("ip:", r->connection->remote_ip); - - if (user == NULL) user = GRSTgaclUserNew(cred); - else GRSTgaclUserAddCred(user, cred); - } - - /* write contents of user to per-request environment variables */ - - if (((mod_gridsite_dir_cfg *) cfg)->envs && (user != NULL)) - { - cred = user->firstcred; - - /* old-style Compact Credentials have the same delegation level - for all credentials. eg Using EEC delegation=0; using 1st GSI - Proxy then delegation=1 for X509USER _and_ GSIPROXY credentials. - So we remember the delegation level of any X509USER here */ - if (cred != NULL) cc_delegation = cred->delegation; - - for (i=0; (cred != NULL) && (cred->auri != NULL); ++i) - { - if (strncmp(cred->auri, "dn:", 3) == 0) - { - apr_table_setn(env, - apr_psprintf(r->pool, "GRST_CRED_%d", i), - apr_psprintf(r->pool, - "%s %ld %ld %d %s", - (i=0) ? "X509USER" : "GSIPROXY", - cred->notbefore, - cred->notafter, - cc_delegation, - &(cred->auri[3]))); - } - else if (strncmp(cred->auri, "fqan:", 5) == 0) - { - apr_table_setn(env, - apr_psprintf(r->pool, "GRST_CRED_%d", i), - apr_psprintf(r->pool, - "VOMS %ld %ld 0 %s", - notbefore, notafter, - &(cred->auri[5]))); - } - - apr_table_setn(env, - apr_psprintf(r->pool, "GRST_CRED_AURI_%d", i), - apr_pstrdup(r->pool, cred->auri)); - - apr_table_setn(env, - apr_psprintf(r->pool, "GRST_CRED_VALID_%d", i), - apr_psprintf(r->pool, - "notbefore=%ld notafter=%ld delegation=%d nist-loa=%d", - cred->notbefore, - cred->notafter, - cred->delegation, - cred->nist_loa)); - - cred = cred->next; - } - } - - /* check for Destination: header and evaluate if present */ - - if ((destination = (char *) apr_table_get(r->headers_in, - "Destination")) != NULL) - { - ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server, - "Destination header found, value=%s", destination); - - destination_prefix = apr_psprintf(r->pool, "https://%s:%d/", - r->server->server_hostname, (int) r->server->port); - - if (strncmp(destination_prefix, destination, - strlen(destination_prefix)) == 0) - destination_uri = &destination[strlen(destination_prefix)-1]; - else if ((int) r->server->port == 443) - { - destination_prefix = apr_psprintf(r->pool, "https://%s/", - r->server->server_hostname); - - if (strncmp(destination_prefix, destination, - strlen(destination_prefix)) == 0) - destination_uri = &destination[strlen(destination_prefix)-1]; - } - - if (destination_uri != NULL) - { - destreq = ap_sub_req_method_uri("GET", destination_uri, r, NULL); - - if ((destreq != NULL) && (destreq->filename != NULL) - && (destreq->path_info != NULL)) - { - destination_translated = apr_pstrcat(r->pool, - destreq->filename, destreq->path_info, NULL); - - apr_table_setn(r->notes, "GRST_DESTINATION_TRANSLATED", - destination_translated); - - if (((mod_gridsite_dir_cfg *) cfg)->envs) - apr_table_setn(env, "GRST_DESTINATION_TRANSLATED", - destination_translated); - - p = rindex(destination_translated, '/'); - if ((p != NULL) && (strcmp(&p[1], GRST_ACL_FILE) == 0)) - destination_is_acl = 1; - } - } - } - - if ((((mod_gridsite_dir_cfg *) cfg)->adminlist != NULL) && (user != NULL)) - { - cred = user->firstcred; - - while ((cred != NULL) && (cred->auri != NULL)) - { - if (strcmp(((mod_gridsite_dir_cfg *) cfg)->adminlist, - cred->auri) == 0) - { - perm = GRST_PERM_ALL; - if (destination_translated != NULL) - destination_perm = GRST_PERM_ALL; - break; - } - - cred = cred->next; - } - } - - if (perm != GRST_PERM_ALL) /* cannot improve on perfection... */ - { - if (((mod_gridsite_dir_cfg *) cfg)->aclpath != NULL) - { - aclpath = make_aclpath(r,((mod_gridsite_dir_cfg *) cfg)->aclpath); - - if (aclpath != NULL) - { - ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server, - "Examine ACL file %s (from ACL path %s)", - aclpath, ((mod_gridsite_dir_cfg *) cfg)->aclpath); - - acl = GRSTgaclAclLoadFile(aclpath); - } - else ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server, - "Failed to make ACL file from ACL path %s, URI %s)", - ((mod_gridsite_dir_cfg *) cfg)->aclpath, r->uri); - } - else acl = GRSTgaclAclLoadforFile(r->filename); - - if (acl != NULL) perm = GRSTgaclAclTestUser(acl, user); - GRSTgaclAclFree(acl); - - if (destination_translated != NULL) - { - acl = GRSTgaclAclLoadforFile(destination_translated); - if (acl != NULL) destination_perm = GRSTgaclAclTestUser(acl, user); - GRSTgaclAclFree(acl); - - apr_table_setn(r->notes, "GRST_DESTINATION_PERM", - apr_psprintf(r->pool, "%d", destination_perm)); - - if (((mod_gridsite_dir_cfg *) cfg)->envs) - apr_table_setn(env, "GRST_DESTINATION_PERM", - apr_psprintf(r->pool, "%d", destination_perm)); - } - } - - /* first look for GRIDHTTP_PASSCODE cookie */ - - if ((p = (char *) apr_table_get(r->headers_in, "Cookie")) != NULL) - { - cookies = apr_pstrcat(r->pool, " ", p, NULL); - gridauthpasscode = strstr(cookies, " GRIDHTTP_PASSCODE="); - - if (gridauthpasscode != NULL) - { - gridauthpasscode = &gridauthpasscode[19]; - - for (p = gridauthpasscode; - (*p != '\0') && (*p != ';'); ++p) - if (!isalnum(*p)) *p = '\0'; - } - } - - /* then look for GRIDHTTP_PASSCODE in QUERY_STRING ie after ? */ - - if (gridauthpasscode == NULL) - { - if ((r->parsed_uri.query != NULL) && (r->parsed_uri.query[0] != '\0')) - { - querytmp = apr_pstrcat(r->pool,"&",r->parsed_uri.query,"&",NULL); - - gridauthpasscode = strstr(querytmp, "&GRIDHTTP_PASSCODE="); - - if (gridauthpasscode != NULL) - { - gridauthpasscode = &gridauthpasscode[19]; - - for (p = gridauthpasscode; - (*p != '\0') && (*p != '&'); ++p) - if (!isalnum(*p)) *p = '\0'; - } - } - } - - if ((gridauthpasscode != NULL) && (gridauthpasscode[0] != '\0')) - { - cookiefile = apr_psprintf(r->pool, "%s/passcode-%s", - ap_server_root_relative(r->pool, - sessionsdir), - gridauthpasscode); - - ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server, - "Opening GridHTTP passcode file %s", cookiefile); - - if ((apr_stat(&cookiefile_info, cookiefile, - APR_FINFO_TYPE, r->pool) == APR_SUCCESS) && - (cookiefile_info.filetype == APR_REG) && - (apr_file_open(&fp, cookiefile, APR_READ, 0, r->pool) - == APR_SUCCESS)) - { - ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server, - "Reading GridHTTP passcode file %s", cookiefile); - - while (apr_file_gets(oneline, - sizeof(oneline), fp) == APR_SUCCESS) - { - p = index(oneline, '\n'); - if (p != NULL) *p = '\0'; - - ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server, - "%s: %s", cookiefile, oneline); - - if ((strncmp(oneline, "expires=", 8) == 0) && - (apr_time_from_sec(atoll(&oneline[8])) < - apr_time_now())) - break; - else if ((strncmp(oneline, "domain=", 7) == 0) && - (strcmp(&oneline[7], r->hostname) != 0)) - break; /* exact needed in the version */ - else if ((strncmp(oneline, "path=", 5) == 0) && - (strcmp(&oneline[5], r->uri) != 0)) - break; - else if ((strncmp(oneline, "onetime=yes", 11) == 0) - && !ishttps) - apr_file_remove(cookiefile, r->pool); - else if (strncmp(oneline, "method=PUT", 10) == 0) - perm |= GRST_PERM_WRITE; - else if (strncmp(oneline, "method=GET", 10) == 0) - perm |= GRST_PERM_READ; - } - - apr_file_close(fp); - } - } - - ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server, - "After GACL/Onetime evaluation, GRST_PERM=%d", perm); - - /* set permission and GACL environment variables */ - - apr_table_setn(r->notes, "GRST_PERM", apr_psprintf(r->pool, "%d", perm)); - - if (((mod_gridsite_dir_cfg *) cfg)->envs) - { - apr_table_setn(env, "GRST_PERM", apr_psprintf(r->pool, "%d", perm)); - - if (((dir_path = apr_pstrdup(r->pool, r->filename)) != NULL) && - ((p = rindex(dir_path, '/')) != NULL)) - { - *p = '\0'; - apr_table_setn(env, "GRST_DIR_PATH", dir_path); - } - - if (((mod_gridsite_dir_cfg *) cfg)->helpuri != NULL) - apr_table_setn(env, "GRST_HELP_URI", - ((mod_gridsite_dir_cfg *) cfg)->helpuri); - - if (((mod_gridsite_dir_cfg *) cfg)->adminfile != NULL) - apr_table_setn(env, "GRST_ADMIN_FILE", - ((mod_gridsite_dir_cfg *) cfg)->adminfile); - - if (((mod_gridsite_dir_cfg *) cfg)->editable != NULL) - apr_table_setn(env, "GRST_EDITABLE", - ((mod_gridsite_dir_cfg *) cfg)->editable); - - if (((mod_gridsite_dir_cfg *) cfg)->headfile != NULL) - apr_table_setn(env, "GRST_HEAD_FILE", - ((mod_gridsite_dir_cfg *) cfg)->headfile); - - if (((mod_gridsite_dir_cfg *) cfg)->footfile != NULL) - apr_table_setn(env, "GRST_FOOT_FILE", - ((mod_gridsite_dir_cfg *) cfg)->footfile); - - if (((mod_gridsite_dir_cfg *) cfg)->dnlists != NULL) - apr_table_setn(env, "GRST_DN_LISTS", - ((mod_gridsite_dir_cfg *) cfg)->dnlists); - - if (((mod_gridsite_dir_cfg *) cfg)->dnlistsuri != NULL) - apr_table_setn(env, "GRST_DN_LISTS_URI", - ((mod_gridsite_dir_cfg *) cfg)->dnlistsuri); - - if (((mod_gridsite_dir_cfg *) cfg)->adminlist != NULL) - apr_table_setn(env, "GRST_ADMIN_LIST", - ((mod_gridsite_dir_cfg *) cfg)->adminlist); - - apr_table_setn(env, "GRST_GSIPROXY_LIMIT", - apr_psprintf(r->pool, "%d", - ((mod_gridsite_dir_cfg *)cfg)->gsiproxylimit)); - - if (((mod_gridsite_dir_cfg *) cfg)->unzip != NULL) - apr_table_setn(env, "GRST_UNZIP", - ((mod_gridsite_dir_cfg *) cfg)->unzip); - - if (!(((mod_gridsite_dir_cfg *) cfg)->gridsitelink)) - apr_table_setn(env, "GRST_NO_LINK", "1"); - - if (((mod_gridsite_dir_cfg *) cfg)->aclformat != NULL) - apr_table_setn(env, "GRST_ACL_FORMAT", - ((mod_gridsite_dir_cfg *) cfg)->aclformat); - - if (((mod_gridsite_dir_cfg *) cfg)->aclpath != NULL) - apr_table_setn(env, "GRST_ACL_PATH", - ((mod_gridsite_dir_cfg *) cfg)->aclpath); - - if (((mod_gridsite_dir_cfg *) cfg)->delegationuri != NULL) - apr_table_setn(env, "GRST_DELEGATION_URI", - ((mod_gridsite_dir_cfg *) cfg)->delegationuri); - - - if (((mod_gridsite_dir_cfg *) cfg)->execmethod != NULL) - { - apr_table_setn(env, "GRST_EXEC_METHOD", - ((mod_gridsite_dir_cfg *) cfg)->execmethod); - - if ((strcasecmp(((mod_gridsite_dir_cfg *) cfg)->execmethod, - "directory") == 0) && (r->filename != NULL)) - { - if ((r->content_type != NULL) && - (strcmp(r->content_type, DIR_MAGIC_TYPE) == 0)) - apr_table_setn(env, "GRST_EXEC_DIRECTORY", r->filename); - else - { - file = apr_pstrdup(r->pool, r->filename); - p = rindex(file, '/'); - if (p != NULL) - { - *p = '\0'; - apr_table_setn(env, "GRST_EXEC_DIRECTORY", file); - } - } - } - } - - apr_table_setn(env, "GRST_DISK_MODE", - apr_psprintf(r->pool, "0x%04x", - ((mod_gridsite_dir_cfg *)cfg)->diskmode)); - } - - if (((mod_gridsite_dir_cfg *) cfg)->auth) - { - /* *** Check HTTP method to decide which perm bits to check *** */ - - if ((r->filename != NULL) && - ((p = rindex(r->filename, '/')) != NULL) && - (strcmp(&p[1], GRST_ACL_FILE) == 0)) file_is_acl = 1; - - content_type = r->content_type; - if ((content_type != NULL) && - (strcmp(content_type, DIR_MAGIC_TYPE) == 0) && - (((mod_gridsite_dir_cfg *) cfg)->dnlistsuri != NULL) && - (strncmp(r->uri, - ((mod_gridsite_dir_cfg *) cfg)->dnlistsuri, - strlen(((mod_gridsite_dir_cfg *) cfg)->dnlistsuri)) == 0) && - (strlen(r->uri) > strlen(((mod_gridsite_dir_cfg *) cfg)->dnlistsuri))) - content_type = "text/html"; - - if ( GRSTgaclPermHasNone(perm) || - - /* first two M_GET conditions make the subtle distinction - between .../ that maps to .../index.html (governed by - Read perm) or to dir list (governed by List perm); - third M_GET condition deals with typeless CGI requests */ - - ((r->method_number == M_GET) && - !GRSTgaclPermHasRead(perm) && - (content_type != NULL) && - (strcmp(content_type, DIR_MAGIC_TYPE) != 0)) || - - ((r->method_number == M_GET) && - !GRSTgaclPermHasList(perm) && - (content_type != NULL) && - (strcmp(content_type, DIR_MAGIC_TYPE) == 0)) || - - ((r->method_number == M_GET) && - !GRSTgaclPermHasRead(perm) && - (content_type == NULL)) || - - ((r->method_number == M_POST) && !GRSTgaclPermHasRead(perm) ) || - - (((r->method_number == M_PUT) || - (r->method_number == M_DELETE)) && - !GRSTgaclPermHasWrite(perm) && !file_is_acl) || - - ((r->method_number == M_MOVE) && - ((!GRSTgaclPermHasWrite(perm) && !file_is_acl) || - (!GRSTgaclPermHasAdmin(perm) && file_is_acl) || - (!GRSTgaclPermHasWrite(destination_perm) - && !destination_is_acl) || - (!GRSTgaclPermHasAdmin(destination_perm) - && destination_is_acl)) ) || - - (((r->method_number == M_PUT) || - (r->method_number == M_DELETE)) && - !GRSTgaclPermHasAdmin(perm) && file_is_acl) || - - /* for WebDAV/Subversion */ - - (((r->method_number == M_PROPFIND) || - (r->method_number == M_REPORT)) && - !GRSTgaclPermHasRead(perm)) || - - (((r->method_number == M_CHECKOUT) || - (r->method_number == M_MERGE) || - (r->method_number == M_MKACTIVITY) || - (r->method_number == M_MKCOL) || - (r->method_number == M_LOCK) || - (r->method_number == M_UNLOCK)) && - !GRSTgaclPermHasWrite(perm)) - - ) retcode = HTTP_FORBIDDEN; - } - - return retcode; -} - -int GRST_X509_check_issued_wrapper(X509_STORE_CTX *ctx, X509 *x, X509 *issuer) -/* We change the default callback to use our wrapper and discard errors - due to GSI proxy chains (ie where users certs act as CAs) */ -{ - int ret; - ret = X509_check_issued(issuer, x); - if (ret == X509_V_OK) - return 1; - - /* Non self-signed certs without signing are ok if they passed - the other checks inside X509_check_issued. Is this enough? */ - if ((ret == X509_V_ERR_KEYUSAGE_NO_CERTSIGN) && - (X509_NAME_cmp(X509_get_subject_name(issuer), - X509_get_subject_name(x)) != 0)) return 1; - - /* If we haven't asked for issuer errors don't set ctx */ - if (!(ctx->flags & X509_V_FLAG_CB_ISSUER_CHECK)) return 0; - - ctx->error = ret; - ctx->current_cert = x; - ctx->current_issuer = issuer; - return ctx->verify_cb(0, ctx); -} - -/* Later OpenSSL versions add a second pointer ... */ -int GRST_verify_cert_wrapper(X509_STORE_CTX *ctx, void *p) - -/* Earlier ones have a single argument ... */ -// int GRST_verify_cert_wrapper(X509_STORE_CTX *ctx) - -/* Before 0.9.7 we cannot change the check_issued callback directly in - the X509_STORE, so we must insert it in another callback that gets - called early enough */ -{ - ctx->check_issued = GRST_X509_check_issued_wrapper; - - return X509_verify_cert(ctx); -} - -int GRST_callback_SSLVerify_wrapper(int ok, X509_STORE_CTX *ctx) -{ - SSL *ssl = (SSL *) X509_STORE_CTX_get_app_data(ctx); - conn_rec *conn = (conn_rec *) SSL_get_app_data(ssl); - server_rec *s = conn->base_server; - SSLConnRec *sslconn = - (SSLConnRec *) ap_get_module_config(conn->conn_config, &ssl_module); - int errnum = X509_STORE_CTX_get_error(ctx); - int errdepth = X509_STORE_CTX_get_error_depth(ctx); - int returned_ok; - int first_non_ca; - STACK_OF(X509) *certstack; - GRSTx509Chain *grst_chain; - - /* - * GSI Proxy user-cert-as-CA handling: - * we skip Invalid CA errors at this stage, since we will check this - * again at errdepth=0 for the full chain using GRSTx509ChainLoadCheck - */ - if (errnum == X509_V_ERR_INVALID_CA) - { - ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s, - "Skip Invalid CA error in case a GSI Proxy"); - - sslconn->verify_error = NULL; - ok = TRUE; - errnum = X509_V_OK; - X509_STORE_CTX_set_error(ctx, errnum); - } - - /* - * New style GSI Proxy handling, with critical ProxyCertInfo - * extension: we use GRSTx509KnownCriticalExts() to check this - */ -#ifndef X509_V_ERR_UNHANDLED_CRITICAL_EXTENSION -#define X509_V_ERR_UNHANDLED_CRITICAL_EXTENSION 34 -#endif - if (errnum == X509_V_ERR_UNHANDLED_CRITICAL_EXTENSION) - { - if (GRSTx509KnownCriticalExts(X509_STORE_CTX_get_current_cert(ctx)) - == GRST_RET_OK) - { - ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s, - "GRSTx509KnownCriticalExts() accepts previously " - "Unhandled Critical Extension (GSI Proxy?)"); - - sslconn->verify_error = NULL; - ok = TRUE; - errnum = X509_V_OK; - X509_STORE_CTX_set_error(ctx, errnum); - } - } - - returned_ok = ssl_callback_SSLVerify(ok, ctx); - - /* in case ssl_callback_SSLVerify changed it */ - errnum = X509_STORE_CTX_get_error(ctx); - - if ((errdepth == 0) && (errnum == X509_V_OK)) - /* - * We've now got the last certificate - the identity being used for - * this connection. At this point we check the whole chain for valid - * CAs or, failing that, GSI-proxy validity using GRSTx509CheckChain. - */ - { - certstack = (STACK_OF(X509) *) X509_STORE_CTX_get_chain(ctx); - - errnum = GRSTx509ChainLoadCheck(&grst_chain, certstack, NULL, - "/etc/grid-security/certificates", - "/etc/grid-security/vomsdir"); - - if (errnum != X509_V_OK) - { - ap_log_error(APLOG_MARK, APLOG_ERR, 0, s, - "Invalid certificate chain reported by " - "GRSTx509CheckChain()"); - - sslconn->verify_error = X509_verify_cert_error_string(errnum); - ok = FALSE; - } - else - { - ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s, "Valid certificate" - " chain reported by GRSTx509ChainLoadCheck()"); - - /* Put result of GRSTx509ChainLoadCheck into connection notes */ - GRST_save_ssl_creds(conn, grst_chain); - } - - GRSTx509ChainFree(grst_chain); - } - - return returned_ok; -} - -void sitecast_handle_NOP_request(server_rec *main_server, - GRSThtcpMessage *htcp_mesg, int igroup, - struct sockaddr_in *client_addr_ptr) -{ - int outbuf_len; - char *outbuf; - - if (GRSThtcpNOPresponseMake(&outbuf, &outbuf_len, - htcp_mesg->trans_id) == GRST_RET_OK) - { - ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, main_server, - "SiteCast sends NOP response from port %d to %s:%d", - sitecastgroups[0].port, inet_ntoa(client_addr_ptr->sin_addr), - ntohs(client_addr_ptr->sin_port)); - - sendto(sitecastgroups[0].socket, outbuf, outbuf_len, 0, - client_addr_ptr, sizeof(struct sockaddr_in)); - - free(outbuf); - } -} - -void sitecast_handle_TST_GET(server_rec *main_server, - GRSThtcpMessage *htcp_mesg, int igroup, - struct sockaddr_in *client_addr_ptr) -{ - int i, outbuf_len, ialias; - char *filename, *outbuf, *location, *local_uri = NULL; - struct stat statbuf; - - ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, main_server, - "SiteCast responder received TST GET with uri %s", - htcp_mesg->uri->text, GRSThtcpCountstrLen(htcp_mesg->uri)); - - /* find if any GridSiteCastAlias lines match */ - - for (ialias=0; ialias < GRST_SITECAST_ALIASES ; ++ialias) - { - if (sitecastaliases[ialias].sitecast_url == NULL) return; /* no match */ - - if ((strlen(sitecastaliases[ialias].sitecast_url) - <= GRSThtcpCountstrLen(htcp_mesg->uri)) && - (strncmp(sitecastaliases[ialias].sitecast_url, - htcp_mesg->uri->text, - strlen(sitecastaliases[ialias].sitecast_url))==0)) break; - } - - if (ialias == GRST_SITECAST_ALIASES) - { - ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, main_server, - "SiteCast responder does not handle %*s requested by %s:%d", - GRSThtcpCountstrLen(htcp_mesg->uri), - htcp_mesg->uri->text, - inet_ntoa(client_addr_ptr->sin_addr), - ntohs(client_addr_ptr->sin_port)); - - return; /* no match */ - } - - /* convert URL to filename, using alias mapping */ - - asprintf(&filename, "%s%*s", - sitecastaliases[ialias].local_path, - GRSThtcpCountstrLen(htcp_mesg->uri) - - strlen(sitecastaliases[ialias].sitecast_url), - &(htcp_mesg->uri->text[strlen(sitecastaliases[ialias].sitecast_url)]) ); - - if (stat(filename, &statbuf) == 0) /* found file */ - { - asprintf(&location, "Location: %s://%s:%d/%s\r\n", - sitecastaliases[ialias].scheme, - sitecastaliases[ialias].local_hostname, - sitecastaliases[ialias].port, - &(htcp_mesg->uri->text[strlen(sitecastaliases[ialias].sitecast_url)]) ); - - ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, main_server, - "SiteCast finds %*s at %s, redirects with %s", - GRSThtcpCountstrLen(htcp_mesg->uri), - htcp_mesg->uri->text, filename, location); - - if (GRSThtcpTSTresponseMake(&outbuf, &outbuf_len, - htcp_mesg->trans_id, - location, "", "") == GRST_RET_OK) - { - ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, main_server, - "SiteCast sends TST response from port %d to %s:%d", - sitecastgroups[0].port, inet_ntoa(client_addr_ptr->sin_addr), - ntohs(client_addr_ptr->sin_port)); - - sendto(sitecastgroups[0].socket, outbuf, outbuf_len, 0, - client_addr_ptr, sizeof(struct sockaddr_in)); - - free(outbuf); - } - - free(location); - } - - free(filename); -} - -void sitecast_handle_request(server_rec *main_server, - char *reqbuf, int reqbuf_len, int igroup, - struct sockaddr_in *client_addr_ptr) -{ - GRSThtcpMessage htcp_mesg; - - if (GRSThtcpMessageParse(&htcp_mesg,reqbuf,reqbuf_len) != GRST_RET_OK) - { - ap_log_error(APLOG_MARK, APLOG_ERR, 0, main_server, - "SiteCast responder rejects format of UDP message from %s:%d", - inet_ntoa(client_addr_ptr->sin_addr), - ntohs(client_addr_ptr->sin_port)); - return; - } - - if (htcp_mesg.rr != 0) /* ignore HTCP responses: we just do requests */ - { - ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, main_server, - "SiteCast responder ignores HTCP response from %s:%d", - inet_ntoa(client_addr_ptr->sin_addr), - ntohs(client_addr_ptr->sin_port)); - return; - } - - if (htcp_mesg.opcode == GRSThtcpNOPop) - { - sitecast_handle_NOP_request(main_server, &htcp_mesg, - igroup, client_addr_ptr); - return; - } - - if (htcp_mesg.opcode == GRSThtcpTSTop) - { - if (((GRSThtcpCountstrLen(htcp_mesg.method) == 3) && - (strncmp(htcp_mesg.method->text, "GET", 3) == 0)) || - ((GRSThtcpCountstrLen(htcp_mesg.method) == 4) && - (strncmp(htcp_mesg.method->text, "HEAD", 4) == 0))) - { - sitecast_handle_TST_GET(main_server, &htcp_mesg, - igroup, client_addr_ptr); - return; - } - - ap_log_error(APLOG_MARK, APLOG_ERR, 0, main_server, - "SiteCast responder rejects method %*s in TST message from %s:%d", - GRSThtcpCountstrLen(htcp_mesg.method), htcp_mesg.method->text, - inet_ntoa(client_addr_ptr->sin_addr), - ntohs(client_addr_ptr->sin_port)); - return; - } - - ap_log_error(APLOG_MARK, APLOG_ERR, 0, main_server, - "SiteCast does not implement HTCP op-code %d in message from %s:%d", - htcp_mesg.opcode, - inet_ntoa(client_addr_ptr->sin_addr), - ntohs(client_addr_ptr->sin_port)); -} - -void sitecast_responder(server_rec *main_server) -{ -#define GRST_SITECAST_MAXBUF 8192 - char reqbuf[GRST_SITECAST_MAXBUF], *p; - int n, reqbuf_len, i, j, igroup, - quad1, quad2, quad3, quad4, port, retval, client_addr_len; - struct sockaddr_in srv, client_addr; - struct ip_mreq mreq; - fd_set readsckts; - struct hostent *server_hostent; - - strcpy((char *) main_server->process->argv[0], "GridSiteCast UDP responder"); - - /* initialise unicast/replies socket first */ - - bzero(&srv, sizeof(srv)); - srv.sin_family = AF_INET; - srv.sin_port = htons(sitecastgroups[0].port); - - if ((server_hostent = gethostbyname(main_server->server_hostname)) == NULL) - { - ap_log_error(APLOG_MARK, APLOG_ERR, 0, main_server, - "SiteCast UDP Responder fails to look up servername %s", - main_server->server_hostname); - return; - } - - srv.sin_addr.s_addr = (u_int32_t) (server_hostent->h_addr_list[0][0]); - - if (((sitecastgroups[0].socket - = socket(AF_INET, SOCK_DGRAM, 0)) < 0) || - (bind(sitecastgroups[0].socket, - (struct sockaddr *) &srv, sizeof(srv)) < 0)) - { - ap_log_error(APLOG_MARK, APLOG_ERR, 0, main_server, - "mod_gridsite: sitecast responder fails on unicast bind (%s)", - strerror(errno)); - return; - } - - ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, main_server, - "SiteCast UDP unicast/replies on %d.%d.%d.%d:%d", - server_hostent->h_addr_list[0][0], - server_hostent->h_addr_list[0][1], - server_hostent->h_addr_list[0][2], - server_hostent->h_addr_list[0][3], - sitecastgroups[0].port); - - /* initialise multicast listener sockets next */ - - for (i=1; (i <= GRST_SITECAST_GROUPS) && - (sitecastgroups[i].port != 0); ++i) - { - bzero(&srv, sizeof(srv)); - srv.sin_family = AF_INET; - srv.sin_port = htons(sitecastgroups[i].port); - srv.sin_addr.s_addr = htonl(sitecastgroups[i].quad1*0x1000000 - + sitecastgroups[i].quad2*0x10000 - + sitecastgroups[i].quad3*0x100 - + sitecastgroups[i].quad4); - - if (((sitecastgroups[i].socket - = socket(AF_INET, SOCK_DGRAM, 0)) < 0) || - (bind(sitecastgroups[i].socket, - (struct sockaddr *) &srv, sizeof(srv)) < 0)) - { - ap_log_error(APLOG_MARK, APLOG_ERR, 0, main_server, - "SiteCast UDP Responder fails on multicast bind (%s)", - strerror(errno)); - return; - } - - bzero(&mreq, sizeof(mreq)); - mreq.imr_multiaddr.s_addr = srv.sin_addr.s_addr; - mreq.imr_interface.s_addr = htonl(INADDR_ANY); - - if (setsockopt(sitecastgroups[i].socket, IPPROTO_IP, - IP_ADD_MEMBERSHIP, &mreq, sizeof(mreq)) < 0) - { - ap_log_error(APLOG_MARK, APLOG_ERR, 0, main_server, - "SiteCast UDP Responder fails on setting multicast (%s)", - strerror(errno)); - return; - } - - ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, main_server, - "SiteCast UDP Responder listening on %d.%d.%d.%d:%d", - sitecastgroups[i].quad1, sitecastgroups[i].quad2, - sitecastgroups[i].quad3, sitecastgroups[i].quad4, - sitecastgroups[i].port); - } - - for (i=0; (i < GRST_SITECAST_ALIASES) && - (sitecastaliases[i].sitecast_url != NULL) ; ++i) - { - ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, main_server, - "SiteCast alias for %s (%s,%d) to %s (%s)", - sitecastaliases[i].sitecast_url, - sitecastaliases[i].scheme, - sitecastaliases[i].port, - sitecastaliases[i].local_path, - sitecastaliases[i].local_hostname); - } - - while (1) /* **** main listening loop **** */ - { - /* set up bitmasks for select */ - - FD_ZERO(&readsckts); - - n = 0; - for (i=0; (i <= GRST_SITECAST_GROUPS) && - (sitecastgroups[i].port != 0); ++i) /* reset bitmask */ - { - FD_SET(sitecastgroups[i].socket, &readsckts); - if (sitecastgroups[i].socket > n) n = sitecastgroups[i].socket; - } - - ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, main_server, - "SiteCast UDP Responder waiting for requests"); - - if ((retval = select(n + 1, &readsckts, NULL, NULL, NULL)) < 1) - continue; /* < 1 on timeout or error */ - - for (igroup=0; (igroup <= GRST_SITECAST_GROUPS) && - (sitecastgroups[igroup].port != 0); ++igroup) - { - if (FD_ISSET(sitecastgroups[igroup].socket, &readsckts)) - { - client_addr_len = sizeof(client_addr); - - if ((reqbuf_len = recvfrom(sitecastgroups[igroup].socket, - reqbuf, GRST_SITECAST_MAXBUF, 0, - (struct sockaddr *) &client_addr, &client_addr_len)) >= 0) - { - ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, main_server, - "SiteCast receives UDP message from %s:%d " - "to %d.%d.%d.%d:%d", - inet_ntoa(client_addr.sin_addr), - ntohs(client_addr.sin_port), - sitecastgroups[igroup].quad1, - sitecastgroups[igroup].quad2, - sitecastgroups[igroup].quad3, - sitecastgroups[igroup].quad4, - sitecastgroups[igroup].port); - - sitecast_handle_request(main_server, reqbuf, - reqbuf_len, igroup, - &client_addr); - } - } - } - - } /* **** end of main listening loop **** */ -} - -static int mod_gridsite_server_post_config(apr_pool_t *pPool, - apr_pool_t *pLog, apr_pool_t *pTemp, server_rec *main_server) -{ - SSL_CTX *ctx; - SSLSrvConfigRec *sc; - server_rec *this_server; - apr_proc_t *procnew = NULL; - apr_status_t status; - char *path; - const char *userdata_key = "sitecast_init"; - - apr_pool_userdata_get((void **) &procnew, userdata_key, - main_server->process->pool); - - /* we only fork responder if one not already forked and we have at - least one GridSiteCastAlias defined. This means it is possible - to run a responder with no groups - listening on unicast only! */ - - if ((procnew == NULL) && - (sitecastaliases[0].sitecast_url != NULL)) - { - /* UDP multicast responder required but not yet started */ - - procnew = apr_pcalloc(main_server->process->pool, sizeof(*procnew)); - apr_pool_userdata_set((const void *) procnew, userdata_key, - apr_pool_cleanup_null, main_server->process->pool); - - status = apr_proc_fork(procnew, pPool); - - if (status < 0) - { - ap_log_error(APLOG_MARK, APLOG_CRIT, status, main_server, - "mod_gridsite: Failed to spawn SiteCast responder process"); - return HTTP_INTERNAL_SERVER_ERROR; - } - else if (status == APR_INCHILD) - { - ap_log_error(APLOG_MARK, APLOG_NOTICE, status, main_server, - "mod_gridsite: Spawning SiteCast responder process"); - sitecast_responder(main_server); - exit(-1); - } - - apr_pool_note_subprocess(main_server->process->pool, - procnew, APR_KILL_AFTER_TIMEOUT); - } - - /* continue with normal HTTP/HTTPS servers */ - - ap_add_version_component(pPool, - apr_psprintf(pPool, "mod_gridsite/%s", VERSION)); - - for (this_server = main_server; - this_server != NULL; - this_server = this_server->next) - { - /* we do some GridSite OpenSSL magic for HTTPS servers */ - - sc = ap_get_module_config(this_server->module_config, &ssl_module); - - if ((sc != NULL) && - (sc->enabled) && - (sc->server != NULL) && - (sc->server->ssl_ctx != NULL)) - { - ctx = sc->server->ssl_ctx; - - /* in 0.9.7 we could set the issuer-checking callback directly */ -// ctx->cert_store->check_issued = GRST_X509_check_issued_wrapper; - - /* but in case 0.9.6 we do it indirectly with another wrapper */ - SSL_CTX_set_cert_verify_callback(ctx, - GRST_verify_cert_wrapper, - (void *) NULL); - - /* whatever version, we can set the SSLVerify wrapper properly */ - SSL_CTX_set_verify(ctx, ctx->verify_mode, - GRST_callback_SSLVerify_wrapper); - - if (main_server->loglevel >= APLOG_DEBUG) - ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, main_server, - "Set mod_ssl verify callbacks to GridSite wrappers"); - } - } - - /* create sessions directory if necessary */ - - path = ap_server_root_relative(pPool, sessionsdir); - apr_dir_make_recursive(path, APR_UREAD | APR_UWRITE | APR_UEXECUTE, pPool); - chown(path, unixd_config.user_id, unixd_config.group_id); - - return OK; -} - -static server_rec *mod_gridsite_log_func_server; -static void mod_gridsite_log_func(char *file, int line, int level, - char *fmt, ...) -{ - char *mesg; - va_list ap; - - va_start(ap, fmt); - vasprintf(&mesg, fmt, ap); - va_end(ap); - - ap_log_error(file, line, level, - 0, mod_gridsite_log_func_server, "%s", mesg); - - free(mesg); -} - -static void mod_gridsite_child_init(apr_pool_t *pPool, server_rec *pServer) -{ - apr_time_t cutoff_time; - apr_dir_t *dir; - char *filename; - apr_finfo_t finfo; - SSLSrvConfigRec *sc = ap_get_module_config(pServer->module_config, - &ssl_module); - GRSTgaclInit(); - mod_gridsite_log_func_server = pServer; - GRSTerrorLogFunc = mod_gridsite_log_func; - - /* expire old ssl creds files */ - - if (sc != NULL) - { - cutoff_time = apr_time_now() - - apr_time_from_sec(sc->session_cache_timeout); - - ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, pServer, - "Cutoff time for ssl creds cache: %ld", - (long) apr_time_sec(cutoff_time)); - - if (apr_dir_open(&dir, - ap_server_root_relative(pPool, sessionsdir), pPool) == APR_SUCCESS) - { - while (apr_dir_read(&finfo, - APR_FINFO_CTIME | APR_FINFO_NAME, dir) == APR_SUCCESS) - { - if ((finfo.ctime < cutoff_time) && - (strncmp(finfo.name, "sslcreds-", 9) == 0)) - { - filename = apr_pstrcat(pPool, - ap_server_root_relative(pPool, sessionsdir), - "/", finfo.name, NULL); - - ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, pServer, - "Remove %s from ssl creds cache", filename); - - apr_file_remove(filename, pPool); - } - } - - apr_dir_close(dir); - } - } -} - -static int mod_gridsite_handler(request_rec *r) -{ - mod_gridsite_dir_cfg *conf; - - conf = (mod_gridsite_dir_cfg *) - ap_get_module_config(r->per_dir_config, &gridsite_module); - - if ((conf->dnlistsuri != NULL) && - (strncmp(r->uri, conf->dnlistsuri, strlen(conf->dnlistsuri)) == 0)) - { - if (strcmp(r->uri, conf->dnlistsuri) == 0) - return mod_gridsite_dnlistsuri_dir_handler(r, conf); - - return mod_gridsite_dnlistsuri_handler(r, conf); - } - - if (strcmp(r->handler, DIR_MAGIC_TYPE) == 0) - return mod_gridsite_dir_handler(r, conf); - - return mod_gridsite_nondir_handler(r, conf); -} - -static ap_unix_identity_t *mod_gridsite_get_suexec_id_doer(const request_rec *r) -{ - mod_gridsite_dir_cfg *conf; - - conf = (mod_gridsite_dir_cfg *) - ap_get_module_config(r->per_dir_config, &gridsite_module); - - if ((conf->execugid.uid != UNSET) && - (conf->execmethod != NULL)) - { - - /* also push GRST_EXEC_DIRECTORY into request environment here too */ - - return &(conf->execugid); - } - - return NULL; -} - -static void register_hooks(apr_pool_t *p) -{ - /* config and handler stuff */ - - ap_hook_post_config(mod_gridsite_server_post_config, NULL, NULL, - APR_HOOK_LAST); - ap_hook_child_init(mod_gridsite_child_init, NULL, NULL, APR_HOOK_MIDDLE); - - ap_hook_check_user_id(mod_gridsite_check_user_id, NULL, NULL, - APR_HOOK_REALLY_FIRST); - - ap_hook_fixups(mod_gridsite_first_fixups,NULL,NULL,APR_HOOK_FIRST); - - ap_hook_fixups(mod_gridsite_perm_handler,NULL,NULL,APR_HOOK_LAST); - - ap_hook_handler(mod_gridsite_handler, NULL, NULL, APR_HOOK_FIRST); - - ap_hook_get_suexec_identity(mod_gridsite_get_suexec_id_doer, - NULL, NULL, APR_HOOK_MIDDLE); -} - -module AP_MODULE_DECLARE_DATA gridsite_module = -{ - STANDARD20_MODULE_STUFF, - create_gridsite_dir_config, /* dir config creater */ - merge_gridsite_dir_config, /* dir merger */ - create_gridsite_srv_config, /* create server config */ - NULL, /* merge server config */ - mod_gridsite_cmds, /* command apr_table_t */ - register_hooks /* register hooks */ -}; diff --git a/org.gridsite.core/src/mod_gridsite_example.c b/org.gridsite.core/src/mod_gridsite_example.c deleted file mode 100644 index 78ed1f2..0000000 --- a/org.gridsite.core/src/mod_gridsite_example.c +++ /dev/null @@ -1,262 +0,0 @@ -/* - Copyright (c) 2003-7, Andrew McNab, University of Manchester. - All rights reserved. - - Redistribution and use in source and binary forms, with or - without modification, are permitted provided that the following - conditions are met: - - o Redistributions of source code must retain the above - copyright notice, this list of conditions and the following - disclaimer. - o Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following - disclaimer in the documentation and/or other materials - provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND - CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS - BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED - TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - POSSIBILITY OF SUCH DAMAGE. -*/ - -/*------------------------------------------------------------------* - * This program is part of GridSite: http://www.gridsite.org/ * - *------------------------------------------------------------------*/ - - -/* - - This example demonstrates how you can make your own Apache modules - to consume credentials put into environment variables by mod_gridsite. - - With the Apache development libraries and includes installed on your - system, you can build the module with something like: - - gcc -g -shared -Wl,-soname=gridsite_example_module \ - -I/usr/include/httpd -I/usr/include/apr-0 \ - -DVERSION=\"$(VERSION)\" -o mod_gridsite_example.so \ - mod_gridsite_example.c - - and load it into Apache DIRECTLY AFTER the mod_gridsite LoadModule with: - - LoadModule gridsite_module_example mod_gridsite_example.so - - This example will work with GridSite 1.6 onwards (AURIs) and older - versions (Compact Credentials). If you define GRIDSITE_1_6, the - compatibility support for pre-1.6 won't be compiled in. - - The module adds the command GridSiteExample which you can use in - the main section of Apache's httpd.conf file, outside any virtual - server sections. It takes one parameter (surround it in " quotes if - it contains spaces) which is an Attribute URI to be rejected. - - These AURIs look like: dn:/C=UK/... - fqan:/dteam/Role=NULL - https://voms.xyz/listofDNs - - If the parameter matches the AURI, then we refuse the request. - - To reject clients with DN /C=UK/... use GridSiteExample "dn:/C=UK/..." - - The special values A_Bad_Example and never_nobody_nothing demonstrate - how to reject bad parameters at start time, and during request handling. - - Please read through the rest of the comments in this file to see how it - all goes together. - -*/ - -#include -#include -#include -#include -#include -#include - -module AP_MODULE_DECLARE_DATA gridsite_module; - -char *example_parameter = NULL; /* Applies to all virtual servers */ - -int get_auri_i(char **auri, int i, request_rec *r) -/* - Look for credentials from mod_gridsite passed as environment variables. -*/ -{ - char *s, *p; - - /* Try AURI variables first. If you're using GridSite 1.6 onwards - then you only need this part, but you do need to keep the return - 0 for failure right at the end. */ - - *auri = (char *) apr_table_get(r->subprocess_env, - apr_psprintf(r->pool, "GRST_CRED_AURI_%d", i)); - - if (*auri != NULL) return 1; - -#ifndef GRIDSITE_1_6 - /* Try old-style Compact Credential variables. If you're using - GridSite 1.6 onwards then you don't need this part, but you - do need to keep the return 0 right at the end. */ - - s = (char *) apr_table_get(r->subprocess_env, - apr_psprintf(r->pool, "GRST_CRED_%d", i)); - - if ((s != NULL) && - (strncmp(s, "X509USER ", 9) == 0) && - ((p = index(s, '/')) != NULL)) - { - *auri = apr_psprintf(r->pool, "dn:%s", p); - return 1; - } - - if ((s != NULL) && - (strncmp(s, "GSIPROXY ", 9) == 0) && - ((p = index(s, '/')) != NULL)) - { - *auri = apr_psprintf(r->pool, "dn:%s", p); - return 1; - } - - if ((s != NULL) && - (strncmp(s, "VOMS ", 5) == 0) && - ((p = index(s, '/')) != NULL)) - { - *auri = apr_psprintf(r->pool, "fqan:%s", p); - return 1; - } -#endif - - /* No credentials found: tell the caller with a 0. Keep this line - even if you discard the old-style Compact Credentials handling. */ - return 0; -} - -static int mod_gridsite_example_fixups(request_rec *r) -/* - We do access control here so results of mod_gridsite and mod_ssl - are available. -*/ -{ - char *auri; - int i; - - /* We return DECLINED (ie nothing for us to do) if a GridSiteExample - command doesn't apply. This isn't the same as code 403 Forbidden. */ - - if (example_parameter == NULL) return DECLINED; - - /* If example_parameter has a special value, then immediately deny - access, causing Apache to return 403 Forbidden to the client. */ - - if (strcmp(example_parameter, "never_nobody_nothing") == 0) - return HTTP_FORBIDDEN; - - /* Otherwise we go through the credentials from GridSite looking for - ones to deny. */ - - for (i=0; get_auri_i(&auri, i, r); ++i) - { - /* - Log what we get back. You can see these in the Apache - ErrorLog file if you have LogLevel debug in httpd.conf - - These lines will look like: dn:/C=UK/... - fqan:/dteam/Role=NULL - https://voms.xyz/listofDNs - */ - - ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server, - "Examine AURI %s", auri); - - /* If the parameter matches the AURI, then we refuse. - For example, to reject clients with the DN /C=UK/... - use GridSiteExample "dn:/C=UK/..." */ - - if (strcmp(auri, example_parameter) == 0) - { - return HTTP_FORBIDDEN; - } - } - - return DECLINED; /* nothing more for us to do: that's ok */ -} - -static const char *mod_gridsite_example_take1_cmds(cmd_parms *a, void *cfg, - const char *parm) -{ -/* - For the command we're allowed, check it doesn't set A_Bad_Example - and otherwise store it via the global pointer example_parameter -*/ - if (strcasecmp(a->cmd->name, "GridSiteExample") == 0) - { - if (strcmp(parm, "A_Bad_Example") == 0) - return "Don't set A_Bad_Example in GridSiteExample command."; - - example_parameter = apr_pstrdup(a->pool, parm); - } - - return NULL; -} - -static const command_rec mod_gridsite_example_cmds[] = -{ -/* - Define one command that we can use in the MAIN SERVER in httpd.conf, - that takes a single parameter. Enclose in " quotes if it contains - spaces. - - "In main server" = "outside any virtual server sections". You need - to use Apache's per-server and per-directory module configuration - machinery if you want to create and merge finer-grained parameters. -*/ - - AP_INIT_TAKE1("GridSiteExample", mod_gridsite_example_take1_cmds, NULL, - RSRC_CONF, "Value to use in GridSite Example Module"), - {NULL} -}; - -static void register_hooks(apr_pool_t *p) -{ -/* - From GridSite 1.6.x onwards, credential handling and access control - are split into APR_HOOK_LAST and APR_HOOK_REALLY_LAST parts of the - Apache fixups stage. This makes it possible for modules to consume - credentials placed into environment variables by GridSite or Apache - itself, and then put additional credentials into the environment - for access control processing by GridSite with GACL etc. - - In both pre-1.6 and 1.6+ cases, the line similar to - - LoadModule gridsite_module_example mod_gridsite_example.so - - must be placed DIRECTLY AFTER the mod_gridsite LoadModule line. -*/ - -#ifdef GRIDSITE_1_6 - ap_hook_fixups(mod_gridsite_example_fixups,NULL,NULL,APR_HOOK_LAST); -#else - ap_hook_fixups(mod_gridsite_example_fixups,NULL,NULL,APR_HOOK_REALLY_LAST); -#endif -} - -module AP_MODULE_DECLARE_DATA gridsite_example_module = -{ - STANDARD20_MODULE_STUFF, - NULL, /* dir config creater */ - NULL, /* dir merger */ - NULL, /* create server config */ - NULL, /* merge server config */ - mod_gridsite_example_cmds, /* command apr_table_t */ - register_hooks /* register hooks */ -}; diff --git a/org.gridsite.core/src/mod_ssl-private.h b/org.gridsite.core/src/mod_ssl-private.h deleted file mode 100644 index 7b0b784..0000000 --- a/org.gridsite.core/src/mod_ssl-private.h +++ /dev/null @@ -1,106 +0,0 @@ -/* - Copyright (c) 2003-4, Andrew McNab, University of Manchester - All rights reserved. - - Redistribution and use in source and binary forms, with or - without modification, are permitted provided that the following - conditions are met: - - o Redistributions of source code must retain the above - copyright notice, this list of conditions and the following - disclaimer. - o Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following - disclaimer in the documentation and/or other materials - provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND - CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS - BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED - TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - POSSIBILITY OF SUCH DAMAGE. -*/ - -/* - - Portions of this code are derived from Apache mod_ssl, and are covered - by the Apache Software License: - - * Copyright 2001-2004 The Apache Software Foundation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/*------------------------------------------------------------------* - * This program is part of GridSite: http://www.gridsite.org/ * - *------------------------------------------------------------------*/ - - -/* - * After 2.0.49, Apache mod_ssl has most of the mod_ssl structures defined - * in ssl_private.h, which is not installed along with httpd-devel (eg in - * the FC2 RPM.) This include file provides SIMPLIFIED structures for use - * by mod_gridsite: for example, pointers to unused structures are replaced - * by void * and some of the structures are truncated when only the early - * members are used. - * - * CLEARLY, THIS WILL BREAK IF THERE ARE MAJOR CHANGES TO ssl_private.h!!! - */ - -#include - -typedef enum { - SSL_SHUTDOWN_TYPE_UNSET, - SSL_SHUTDOWN_TYPE_STANDARD, - SSL_SHUTDOWN_TYPE_UNCLEAN, - SSL_SHUTDOWN_TYPE_ACCURATE -} ssl_shutdown_type_e; - -typedef struct { - SSL *ssl; - const char *client_dn; - X509 *client_cert; - ssl_shutdown_type_e shutdown_type; - const char *verify_info; - const char *verify_error; - int verify_depth; - int is_proxy; - int disabled; - int non_ssl_request; -} SSLConnRec; - -typedef struct { - void *sc; /* pointer back to server config */ - SSL_CTX *ssl_ctx; -} modssl_ctx_t; - -typedef struct { - void *mc; - unsigned int enabled; - unsigned int proxy_enabled; - const char *vhost_id; - int vhost_id_len; - int session_cache_timeout; - modssl_ctx_t *server; - modssl_ctx_t *proxy; -} SSLSrvConfigRec; - -extern module AP_MODULE_DECLARE_DATA ssl_module; diff --git a/org.gridsite.core/src/roffit b/org.gridsite.core/src/roffit deleted file mode 100755 index d1c7263..0000000 --- a/org.gridsite.core/src/roffit +++ /dev/null @@ -1,370 +0,0 @@ -#!/usr/bin/env perl -# -# roffit: convert man page source files to HTML -# -# Read an nroff file. Output a HTML file. -# -# This is a very simple script, but I use it on very simple man pages and I've -# found no other script that makes beautiful web pages. -# -my $version = "0.3"; # (14 November 2003) -# Author: Daniel Stenberg -# Please email me improvements. -# -# You're free to do whatever you want with this script. -# -# Changes: -# -# 0.3 - Daniel Fandrich brought: -# o deal with .lp lines -# o .TH needs no section portion anymore -# o added generator meta tag in the header -# -# 0.2 - fixed the name for the SH section -# - added links from all words within \fIthis\fP or \fBthis\fP -# that has the same text as a .SH or .IP. -# - -use strict; -#use warnings; - -my $InFH = \*STDIN; -my $OutFH = \*STDOUT; -my $debugFH = \*STDERR; - -my %manpage; -my @out; - -my $indentlevel=0; # logical levels, not columns -my @p; -my $within_tp; -my $standalone=1; # by default we make stand-alone HTML pages -my $pre; -my %anchor; # hash with all anchors - -while($ARGV[0]) { - if($ARGV[0] eq "--bare") { - # don't include headers and stuff - $standalone=0; - shift @ARGV; - } - else { - printf $debugFH "unknown option: %s\n", $ARGV[0] if($ARGV[0] ne "-h"); - print $debugFH "Usage: roffit [options] < infile > outfile\n", - "Options:\n", - " --bare Do not put in HTML, HEAD, BODY tags\n"; - exit; - } -} - -sub showp { - my @p = @_; - push @out, "\n

    ", @p; -} - -sub defaultcss { - print $OutFH < -P.level0 { - padding-left: 2em; -} - -P.level1 { - padding-left: 4em; -} - -P.level2 { - padding-left: 6em; -} - -span.emphasis { - font-style: italic; -} - -span.bold { - font-weight: bold; -} - -span.manpage { - font-weight: bold; -} - -h2.nroffsh { - background-color: #e0e0e0; -} - -span.nroffip { - font-weight: bold; - font-size: 120%; - font-family: monospace; -} - -p.roffit { - text-align: center; - font-size: 80%; -} - -ENDOFCSS - ; -} - -sub text2name { - my ($text) = @_; - $text =~ s/^ *([^ ]*).*/$1/g; - $text =~ s/[^a-zA-Z0-9-]//g; - return $text; -} - -# scan through the file and check for sections we should convert -# to proper links -sub linkfile { - my @new; - for(@out) { - my $line=$_; - my $l; - while($line =~ s/([^<]*)<\/span>/[]/) { - my ($style, $name)=($1, $2); - - $l = text2name($name); - - #printf $debugFH "$style - $name - %s - %d\n", - #$l, $anchor{$l}; - - my $link; - if($anchor{$l}) { - $link="$name"; - } - else { - $link="$name"; - } - $line =~ s/\[\]/$link/; - } - push @new, $line; - } - return @new; -} - -sub parsefile { - - while(<$InFH>) { - my $in = $_; - my $out; - # print $debugFH "DEBUG IN: $_"; - - $in =~ s/[\r\n]//g if(!$pre); # tear off newlines - - if($in =~ /^\.([^ \n]*)(.*)/) { - # this is a line starting with a dot, that means it is special - my ($keyword, $rest) = ($1, $2); - $out = ""; - - # cut off initial spaces - $rest =~ s/^ +//g; - - if($keyword eq "\\\"") { - # this is a comment, skip this line - } - elsif($keyword =~ /^TH$/i) { - # man page header: - # curl 1 "22 Oct 2003" "Curl 7.10.8" "Curl Manual" - # NAME SECTION DATE VERSION MANUAL - if($rest =~ /([^ ]*) (\d+) \"([^\"]*)\" \"([^\"]*)\"(\"([^\"]*)\")?/) { - # strict matching only so far - $manpage{'name'} = $1; - $manpage{'section'} = $2; - $manpage{'date'} = $3; - $manpage{'version'} = $4; - $manpage{'manual'} = $6; - } - } - elsif($keyword =~ /^SH$/i) { - # Section Header - showp(@p); - @p=""; - if($pre) { - push @out, "\n"; - $pre = 0; - } - - my $name = text2name($rest); - $anchor{$name}=1; - - $rest =~ s/\"//g; # cut off quotes - $rest =~ s//>/g; - $out = "

    $rest

    "; - $indentlevel=0; - $within_tp=0; - } - elsif(($keyword =~ /^B$/i) || ($keyword =~ /^BI$/i)) { - # Make B and BI the same for simplicity - $rest =~ s/\"//g; # cut off quotes - $rest =~ s//>/g; - push @p, "$rest "; - } - elsif($keyword =~ /^I$/i) { - $rest =~ s/\"//g; # cut off quotes - $rest =~ s//>/g; - push @p, "$rest "; - } - elsif($keyword =~ /^RS$/i) { - # the start of another indent-level. for inlined tables - # within an "IP" - showp(@p); - @p=""; - $indentlevel++; - } - elsif($keyword =~ /^RE$/i) { - # end of the RS section - showp(@p); - @p=""; - $indentlevel--; - } - elsif($keyword =~ /^NF$/i) { - # We let nf start a
     section
    -                showp(@p);
    -                @p="";
    -                push @out, "
    \n";
    -                $pre=1
    -            }
    -            elsif($keyword =~ /^TP$/i) {
    -                # Used within an "RS" section to make a new line. The first
    -                # TP as a column indicator, but we decide to do that
    -                # controlling in the CSS instead.
    -                $within_tp=1;
    -                showp(@p);
    -                @p="";                
    -            }
    -            elsif($keyword =~ /^IP$/i) {
    -                # start of a new paragraph coming up
    -                showp(@p);
    -                @p="";
    -
    -                my $name= text2name($rest);
    -                $anchor{$name}=1;
    -
    -                $rest =~ s/\"//g; # cut off quotes
    -                $rest =~ s//>/g;
    -                
    -                $indentlevel-- if ($indentlevel);
    -                push @p, "$rest ";
    -                # make this a single-line title
    -                showp(@p);
    -                @p="";
    -                $indentlevel++;
    -                $within_tp=0;
    -            }
    -            elsif($keyword =~ /^ad$/i) {
    -                showp(@p);
    -                @p="";
    -            }
    -            elsif($keyword =~ /^sp$/i) {
    -                showp(@p);
    -                @p="";
    -            }
    -            elsif($keyword =~ /^lp$/i) {
    -                # marks end of a paragraph
    -                showp(@p);
    -                @p="";
    -            }
    -            elsif($keyword =~ /^pp$/i) {
    -                # PP ends a TP section, but some TP sections don't use it
    -                $within_tp=0;
    -            }
    -            elsif($keyword =~ /^so$/i) {
    -                # This keyword refers to a different man page, named in the
    -                # $rest.
    -                # We don't support this
    -                push @out, "See the $rest man page.\n";
    -            }
    -            elsif($keyword =~ /^BR$/i) {
    -                # I'm not sure what this does exactly, but this is commonly
    -                # used to include pointers to other man pages. Let's assume
    -                # it only does that for now.
    -                # blabla (3)
    -                # or "blabla (3)"
    -                # or strcmp "(3), " strcasecmp "(3)"
    -                # etc
    -                
    -                $rest =~ s/\"//g; # cut off quotes
    -                my @all = split /,/, $rest;
    -                for(@all) {
    -                    if(/([^ ]*) *\((\d+)\)/) {
    -                        # TODO: this looks like a man page, check if there's a
    -                        # HTML file for it and if so make a link to it
    -                    }
    -
    -                    push @p, "$_ ";
    -                }
    -            }
    -            else {
    -                showp(@p);
    -                print $debugFH "ALERT: unknown keyword \"$keyword\"\n";
    -            }
    -        }
    -        else {
    -            # text line, decode \-stuff
    -            my $txt = $in;
    -
    -            $txt =~ s//>/g;
    -            $txt =~ s/\\&//g; # cut off \&
    -            $txt =~ s/\\fI//g;
    -            $txt =~ s/\\fB//g;
    -            $txt =~ s/\\fP/<\/span>/g;
    -            $txt =~ s/\\//g;
    -
    -            if($txt =~ /^[ \t\r\n]*$/) {
    -                # no contents, marks end of a paragraph
    -                showp(@p);
    -                @p="";
    -            }
    -            else {
    -                $txt =~ s/^ /\ \;/g;
    -                push @p, "$txt ";
    -            }
    -            $out ="";
    -        }
    -
    -        if($out) {
    -            push @out, $out;
    -   #         print $debugFH "DEBUG OUT: $out\n";
    -        }
    -        else {
    -   #         print $debugFH "DEBUG OUT: [withheld]\n";
    -        }
    -    }
    -    showp(@p);
    -}
    -
    -parsefile();
    -
    -my @conv = linkfile();
    -
    -my $title=sprintf("%s man page",
    -                  $manpage{'name'}?$manpage{'name'}:"secret");
    -
    -if($standalone) {
    -    print $OutFH <
    -$title
    -
    -MOO
    -    ;
    -    defaultcss();
    -    print "\n";
    -}
    -
    -print $OutFH @conv;
    -print $OutFH <
    - This HTML page was made with roffit.
    -ROFFIT
    -    ;
    -
    -if($standalone) {
    -    print "\n";
    -}
    diff --git a/org.gridsite.core/src/showx509exts.c b/org.gridsite.core/src/showx509exts.c
    deleted file mode 100644
    index 86f0290..0000000
    --- a/org.gridsite.core/src/showx509exts.c
    +++ /dev/null
    @@ -1,133 +0,0 @@
    -
    -#include 
    -#include 
    -#include 
    -#include 
    -#include 
    -
    -#include 
    -#include 
    -#include 
    -#include 
    -#include 
    -
    -#include "gridsite.h"
    -
    -#define MAXTAG 500
    -                                 
    -main()
    -{
    -   X509   *cert, *tmpcert;
    -   STACK_OF(X509) *certstack = sk_X509_new_null();
    -   FILE   *fp;
    -   struct vomsdata *vd;
    -   int    i, j, vomserror, i1, i2, j1, j2, lastobject;
    -   X509_EXTENSION *ex;
    -   ASN1_OBJECT *asnobject;
    -   char s[80], *t;
    -   ASN1_OCTET_STRING *asndata;
    -   BIO *out;
    -   unsigned char *p, *op, *tot, *p1, *p2, *q, *oq;
    -   long len1, length1, len2, length2;
    -   int tag,xclass,ret=0;
    -   struct GRSTasn1TagList taglist[MAXTAG+1];
    -   int lasttag=-1, itag;
    -   
    - 
    -   OpenSSL_add_all_algorithms();
    -   ERR_load_crypto_strings();
    -//   seed_prng();
    -   
    -//   fp = fopen("proxy-with-voms", "r");
    -   fp = fopen("/tmp/x509up_u300", "r");
    -   
    -   cert = PEM_read_X509(fp, NULL, NULL, NULL);
    -      
    -   fclose(fp);
    -
    -   out=BIO_new(BIO_s_file());                                                                                        
    -   BIO_set_fp(out,stdout,BIO_NOCLOSE|BIO_FP_TEXT);
    -        
    -   for (i = 0; i < X509_get_ext_count(cert); ++i)
    -      {
    -        lasttag=-1;
    -      
    -        ex = X509_get_ext(cert, i);
    -
    -        OBJ_obj2txt(s, sizeof(s), X509_EXTENSION_get_object(ex), 1);        
    -        printf("%d OID=%s\n", i, s);
    -        
    -        asnobject = X509_EXTENSION_get_object(ex);
    -        asndata = X509_EXTENSION_get_data(ex);
    -
    -        p1 = ASN1_STRING_data(asndata);
    -        p = p1;
    -        length1 = ASN1_STRING_length(asndata);
    -              
    -        GRSTasn1ParseDump(out, p1, length1, taglist, MAXTAG, &lasttag);
    -
    -{
    -        int n, tag, xclass;
    -        unsigned char *q, buf[100];
    -        const unsigned char *dn, hash[EVP_MAX_MD_SIZE];
    -        ASN1_OBJECT *obj = NULL;
    -        const EVP_MD *m;
    -        EVP_MD_CTX ctx;
    -        char creds[501][101];
    -        int lastcred = -1;
    -   
    -        itag = GRSTasn1SearchTaglist(taglist, lasttag, 
    -               "-1-1-1-1-2-1-1-1-1-1-1-1");
    -               
    -        X509_NAME *xname;
    -        
    -        q = &p[taglist[itag].start];
    -        
    -        d2i_ASN1_OBJECT(&obj, &q, taglist[itag].length + 
    -                                  taglist[itag].headerlength);
    -
    -        n  = OBJ_obj2nid(obj);
    -        dn = OBJ_nid2sn(n);
    -                         
    -//        dn = X509_NAME_oneline(xname,NULL,0);
    -        
    -        printf("n=%d dn=%s obj2txt=%s\n", n, dn, OBJ_obj2txt(NULL,0,obj,1));
    -
    -        GRSTasn1GetX509Name(buf, 99, "-1-1-1-1-2-1-1-1-1-%d-1-%d", 
    -                            p1, taglist, lasttag);
    -        printf("%s\n", buf);
    -        GRSTasn1GetX509Name(buf, 99, "-1-1-1-1-3-1-1-1-%d-1-%d", 
    -                            p1, taglist, lasttag);
    -        printf("%s\n", buf);
    -
    -        lastcred = -1;        
    -        ret = GRSTx509ParseVomsExt(&lastcred, 500, 100, creds, 0, 2000040861,
    -                             ex, 
    -                  "/C=UK/O=eScience/OU=Manchester/L=HEP/CN=Andrew McNab",
    -                  "/etc/grid-security/vomsdir");
    -                  
    -                  
    -        printf("GRSTx509ParseVomsExt() returns %d, %d\n", ret, lastcred);
    -                  
    -        for (j=0; j <= lastcred;  ++j)
    -         printf("cred=%d %s\n", j, creds[j]);
    -        
    -/*        
    -        m = EVP_md5();
    -        EVP_DigestInit(&ctx, m); 
    -        EVP_DigestUpdate(&ctx, delegation_id, strlen(delegation_id));
    -        EVP_DigestFinal(&ctx, hash, &delegation_id_len);
    - */      
    -}              
    -
    -/*       
    -        itag = GRSTasn1SearchTaglist(taglist, &lasttag,
    -                                     "1-1-1-1-1-7-1-2-1-2-1");
    -                                    
    -        printf("tag=%d %s %d %.*s\n",
    -               itag, taglist[itag].treecoords, taglist[itag].tag,
    -               taglist[itag].length, 
    -               &p[taglist[itag].start+taglist[itag].headerlength]);
    -*/
    -      }
    -}
    diff --git a/org.gridsite.core/src/slashgrid.c b/org.gridsite.core/src/slashgrid.c
    deleted file mode 100644
    index 8ae240c..0000000
    --- a/org.gridsite.core/src/slashgrid.c
    +++ /dev/null
    @@ -1,2492 +0,0 @@
    -/*
    -   Copyright (c) 2003-6, Andrew McNab,
    -   University of Manchester. All rights reserved.
    -
    -   Redistribution and use in source and binary forms, with or
    -   without modification, are permitted provided that the following
    -   conditions are met:
    -
    -     o Redistributions of source code must retain the above
    -       copyright notice, this list of conditions and the following
    -       disclaimer. 
    -     o Redistributions in binary form must reproduce the above
    -       copyright notice, this list of conditions and the following
    -       disclaimer in the documentation and/or other materials
    -       provided with the distribution. 
    -
    -   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
    -   CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
    -   INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
    -   MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
    -   DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
    -   BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
    -   EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
    -   TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
    -   DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
    -   ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
    -   OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
    -   OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
    -   POSSIBILITY OF SUCH DAMAGE.
    -*/
    -
    -/*------------------------------------------------------------------*
    - * This program is part of GridSite: http://www.gridsite.org/       *
    - *------------------------------------------------------------------*/
    -
    -#define _GNU_SOURCE
    -#define _XOPEN_SOURCE
    -
    -#include 
    -#include 
    -#include 
    -#include 
    -#include 
    -#include 
    -#include 
    -#include 
    -#include 
    -#include 
    -#include 
    -#include 
    -#include               
    -#include 
    -#include 
    -#include 
    -#include 
    -#include 
    -#include 
    -#include 
    -
    -#include 
    -
    -#include "gridsite.h"
    -
    -#define GRST_SLASH_PIDFILE "/var/run/slashgrid.pid"
    -
    -#define GRST_SLASH_HEADERS "/var/spool/slashgrid/headers"
    -#define GRST_SLASH_BLOCKS  "/var/spool/slashgrid/blocks"
    -#define GRST_SLASH_TMP     "/var/spool/slashgrid/tmp"
    -#define GRST_SLASH_DIRFILE "::DIR::"
    -
    -#define GRST_SLASH_HEAD   0
    -#define GRST_SLASH_GET    1
    -#define GRST_SLASH_PUT    2
    -#define GRST_SLASH_DELETE 3
    -#define GRST_SLASH_MOVE   4
    -#define GRST_SLASH_TRUNC  5
    -
    -#define GRST_SLASH_HEADERS_EXPIRE	60
    -#define GRST_SLASH_BLOCK_SIZE		4096
    -#define GRST_SLASH_MAX_HANDLES		16
    -
    -#define GRST_SLASH_MAX_LOCATION		1024
    -
    -/* maximum number of SiteCast groups */
    -#define GRST_SLASH_MAX_GROUPS		10
    -
    -#define GRST_SLASH_HTCP_PORT		777
    -
    -#ifndef CURLOPT_WRITEDATA
    -#define CURLOPT_WRITEDATA CURLOPT_FILE
    -#endif
    - 
    -#ifndef CURLOPT_READDATA
    -#define CURLOPT_READDATA CURLOPT_INFILE
    -#endif
    -
    -#ifndef CURLE_HTTP_RETURNED_ERROR
    -#define CURLE_HTTP_RETURNED_ERROR CURLE_HTTP_NOT_FOUND
    -#endif
    -
    -struct grst_body_text { char   *text;
    -                        size_t  used;
    -                        size_t  allocated; } ;
    -
    -struct grst_read_data { const char  *buf;
    -                        off_t sent; 
    -                        off_t maxsent; };
    -
    -struct grst_dir_list { char   *filename;
    -                       off_t   length;
    -                       int     length_set;
    -                       time_t  modified;
    -                       int     modified_set; } ;
    -
    -struct grst_request { int     retcode;                         
    -                      char    location[GRST_SLASH_MAX_LOCATION+1];
    -                      size_t  length;
    -                      int     length_set;
    -                      time_t  modified;                           
    -                      int     modified_set; 
    -                      void   *readfunction;
    -                      void   *readdata;
    -                      void   *writefunction;
    -                      void   *writedata;
    -                      size_t  infilesize;
    -                      char   *errorbuffer;
    -                      char   *url;
    -                      int     method;
    -                      char   *destination;
    -                      off_t   start;
    -                      off_t   finish; } ;
    -
    -struct grst_handle { pthread_mutex_t	mutex;
    -                     CURL		*curl_handle;
    -                     uid_t		uid;
    -                     char		*proxyfile;
    -                     time_t		last_used;
    -                   }  handles[GRST_SLASH_MAX_HANDLES];
    - 
    -int debugmode         = 0;
    -int number_of_tries   = 1, sitecast_domain_len = 0;
    -char *sitecast_domain = NULL, *sitecast_groups = NULL, *local_root = NULL,
    -     *gridmapdir = NULL;
    -uid_t local_uid = 0;
    -gid_t local_gid = 0;
    -
    -size_t headers_callback(void *ptr, size_t size, size_t nmemb, void *p)
    -/* Find the values of the return code, Content-Length, Last-Modified
    -   and Location headers */
    -{
    -  float f;
    -  char  *s, *q;
    -  size_t realsize;
    -  struct tm modified_tm;
    -  struct grst_request *request_data = (struct grst_request *) p;
    -
    -  realsize = size * nmemb;
    -  s = malloc(realsize + 1);
    -  memcpy(s, ptr, realsize);
    -  s[realsize] = '\0';
    -
    -  if      (sscanf(s, "Content-Length: %d", &(request_data->length)) == 1) 
    -            request_data->length_set = 1;
    -  else if (sscanf(s, "HTTP/%f %d ", &f, &(request_data->retcode)) == 2) ;
    -  else if (strncmp(s, "Location: ", 10) == 0) 
    -      {
    -        strncpy(request_data->location, &s[10], GRST_SLASH_MAX_LOCATION);
    -        /* the location string is 1 byte longer and zeroed before use */
    -        
    -        for (q=request_data->location; *q != '\0'; ++q)
    -         if ((*q == '\r') || (*q == '\n')) *q = '\0';
    -      }
    -  else if (strncmp(s, "Last-Modified: ", 15) == 0)
    -      {
    -        /* follow RFC 2616: first try RFC 822 (kosher), then RFC 850 and 
    -           asctime() formats too. Must be GMT whatever the format. */
    -
    -        if (strptime(&s[15], "%a, %d %b %Y %T GMT", &modified_tm) != NULL)
    -          {
    -            request_data->modified = mktime(&modified_tm);
    -            request_data->modified_set = 1;
    -          }
    -        else if (strptime(&s[15], "%a, %d-%b-%y %T GMT", &modified_tm) != NULL)
    -          {
    -            request_data->modified = mktime(&modified_tm);
    -            request_data->modified_set = 1;
    -          }
    -        else if (strptime(&s[15], "%a %b %d %T %Y", &modified_tm) != NULL)
    -          {
    -            request_data->modified = mktime(&modified_tm);
    -            request_data->modified_set = 1;
    -          }
    -      }
    -    
    -  free(s);
    -  return realsize;
    -}
    -
    -int debug_callback(CURL *handle, curl_infotype infotype, 
    -                   char *rawmesg, size_t size, void *i)
    -{
    -  int   n;
    -  char *mesg;
    -
    -  if ((infotype == CURLINFO_DATA_IN) ||
    -      (infotype == CURLINFO_DATA_OUT)) return 0;
    -
    -  mesg = malloc(size + 1);
    -  
    -  for (n=0; n < size; ++n)
    -     {
    -       if ((rawmesg[n] == '\r') && (n >= size - 2)) mesg[n] = '\0';
    -       else if (((rawmesg[n] == '\r') || (rawmesg[n] == '\n')) && 
    -                (infotype == CURLINFO_HEADER_IN)) mesg[n] = '<';
    -       else if (((rawmesg[n] == '\r') || (rawmesg[n] == '\n')) && 
    -                (infotype == CURLINFO_HEADER_OUT)) mesg[n] = '>';
    -       else if ((rawmesg[n] < ' ') || (rawmesg[n] >= 127)) mesg[n] = '.';
    -       else mesg[n] = rawmesg[n];
    -     }
    -     
    -  mesg[n] = '\0';
    -
    -  syslog(LOG_DEBUG, "%d %s%s%s%s", 
    -                    *((int *) i), 
    -                    (infotype == CURLINFO_HEADER_IN ) ? "<<" : "",
    -                    (infotype == CURLINFO_HEADER_OUT) ? ">>" : "",
    -                    (infotype == CURLINFO_TEXT      ) ? "**" : "",
    -                    mesg);
    -
    -  free(mesg);  
    -  return 0;
    -}                  
    -
    -
    -int translate_sitecast_url(char **sitecast_url, char *raw_url)
    -{
    -  int request_length, response_length, i, ret, s, igroup;
    -  struct sockaddr_in srv, from;
    -  socklen_t fromlen;
    -#define MAXBUF 8192  
    -  char *request, response[MAXBUF], *p;
    -  GRSThtcpMessage msg;
    -  struct timeval start_timeval, wait_timeval;
    -  struct grst_sitecast_group 
    -   { unsigned char quad1; unsigned char quad2;
    -     unsigned char quad3; unsigned char quad4;
    -     int port; int timewait; int ttl; } groups[GRST_SLASH_MAX_GROUPS];
    -  fd_set readsckts;
    -
    -  p = sitecast_groups;
    -  igroup = -1;
    -
    -  for (igroup=-1; igroup+1 < GRST_SLASH_MAX_GROUPS;)
    -     {  
    -       /* defaults for when sscanf fails to find all parameters */
    -
    -       groups[igroup+1].port     = GRST_SLASH_HTCP_PORT;
    -       groups[igroup+1].timewait = 1;
    -       groups[igroup+1].ttl      = 1;
    -       
    -       ret = sscanf(p, "%d.%d.%d.%d:%d:%d:%d", 
    -                 &(groups[igroup+1].quad1),
    -                 &(groups[igroup+1].quad2),    
    -                 &(groups[igroup+1].quad3),
    -                 &(groups[igroup+1].quad4),    
    -                 &(groups[igroup+1].port),
    -                 &(groups[igroup+1].ttl),
    -                 &(groups[igroup+1].timewait));
    -
    -       if (ret == 0) break; /* end of list ? */
    -         
    -       if (ret < 5)
    -         {
    -           syslog(LOG_WARNING,
    -                  "Failed parsing multicast group parameter %s\n", p);
    -           return GRST_RET_FAILED;
    -         }
    -         
    -       ++igroup;  
    -       
    -       if ((p = index(p, ',')) == NULL) break;       
    -       ++p;
    -     }
    -
    -  if (igroup == -1)
    -    {
    -      syslog(LOG_WARNING, "Failed parsing multicast group parameter %s\n", p);
    -      return GRST_RET_FAILED;
    -    }
    -
    -  if ((s = socket(AF_INET, SOCK_DGRAM, 0)) < 0) 
    -    {
    -      syslog(LOG_WARNING, "Failed to open SiteCast UDP socket\n");
    -      return GRST_RET_FAILED;
    -    }
    -
    -  /* loop through multicast groups since we need to take each 
    -     ones timewait into account */
    -
    -  gettimeofday(&start_timeval, NULL);
    -
    -  for (i=0; i <= igroup; ++i)
    -     {
    -       if (debugmode)
    -        syslog(LOG_DEBUG, "Querying multicast group %d.%d.%d.%d:%d:%d:%d\n",
    -                groups[i].quad1, groups[i].quad2,
    -                groups[i].quad3, groups[i].quad4,
    -                groups[i].port, groups[i].ttl,
    -                groups[i].timewait);
    -        
    -       bzero(&srv, sizeof(srv));
    -       srv.sin_family = AF_INET;
    -       srv.sin_port = htons(groups[i].port);
    -       srv.sin_addr.s_addr = htonl(groups[i].quad1*0x1000000
    -                                 + groups[i].quad2*0x10000
    -                                 + groups[i].quad3*0x100
    -                                 + groups[i].quad4);
    -
    -       /* send off queries, one for each source file */
    -
    -       GRSThtcpTSTrequestMake(&request, &request_length, 
    -                                   (int) (start_timeval.tv_usec),
    -                                   "GET", raw_url, "");
    -
    -       sendto(s, request, request_length, 0, 
    -                       (struct sockaddr *) &srv, sizeof(srv));
    -
    -       free(request);
    -          
    -       /* reusing wait_timeval is a Linux-specific feature of select() */
    -       wait_timeval.tv_usec = 0;
    -       wait_timeval.tv_sec  = groups[i].timewait;
    -
    -       while ((wait_timeval.tv_sec > 0) || (wait_timeval.tv_usec > 0))
    -            {
    -              FD_ZERO(&readsckts);
    -              FD_SET(s, &readsckts);
    -  
    -              ret = select(s + 1, &readsckts, NULL, NULL, &wait_timeval);
    -
    -              if (ret > 0)
    -                {
    -                  response_length = recvfrom(s, response, MAXBUF,
    -                                             0, &from, &fromlen);
    -  
    -                  if ((GRSThtcpMessageParse(&msg, response, response_length) 
    -                                                      == GRST_RET_OK) &&
    -                      (msg.opcode == GRSThtcpTSTop) && (msg.rr == 1) && 
    -                      (msg.trans_id == (int) start_timeval.tv_usec) &&
    -                      (msg.resp_hdrs != NULL) &&
    -                      (GRSThtcpCountstrLen(msg.resp_hdrs) > 12))
    -                    { 
    -                      /* found one */ 
    -
    -                      if (debugmode)
    -                        syslog(LOG_DEBUG, "Sitecast %s -> %.*s\n",
    -                                raw_url, 
    -                                GRSThtcpCountstrLen(msg.resp_hdrs) - 12,
    -                                &(msg.resp_hdrs->text[10]));
    -                      
    -                      asprintf(sitecast_url, "%.*s",
    -                          GRSThtcpCountstrLen(msg.resp_hdrs) - 12, 
    -                          &(msg.resp_hdrs->text[10]));
    -                          
    -                      return GRST_RET_OK;
    -                    }
    -                }
    -            }
    -     }
    -     
    -  return GRST_RET_FAILED;
    -}
    -
    -char *check_x509_user_proxy(pid_t pid)
    -{
    -  int fd;
    -  char file[80], *proxyfile = NULL, *pid_environ, *p;
    -  struct stat statbuf1, statbuf2;
    -  
    -  snprintf(file, sizeof(file), "/proc/%d/environ", (int) pid);
    -  
    -  if ((fd = open(file, O_RDONLY)) == -1) return NULL;
    -
    -  if (debugmode) syslog(LOG_DEBUG, "Opened for %d environ in %s", (int) pid, file);
    -  
    -  fstat(fd, &statbuf1);
    -  
    -  pid_environ = malloc(statbuf1.st_size + 1);
    -  
    -  read(fd, pid_environ, statbuf1.st_size);
    -  
    -  close(fd);
    -  
    -  pid_environ[statbuf1.st_size] = '\0';
    -    
    -  for (p = pid_environ; p < pid_environ + statbuf1.st_size; p += (strlen(p) + 1))
    -     {
    -       if (debugmode) syslog(LOG_DEBUG, "Examine %s in environ", p);
    -  
    -       if (strncmp(p, "X509_USER_PROXY=", 16) == 0)
    -         {
    -           if ((p[16] != '\0') &&
    -               (stat(&p[16], &statbuf2) == 0)) proxyfile = strdup(&p[16]);
    -           break;
    -         }
    -     }
    -  
    -  free(pid_environ);
    -
    -  return proxyfile;    
    -}
    -
    -char *mapdir_uid_to_dn(uid_t uid)
    -{
    -     int            ret;
    -     char           *firstlinkpath, *otherlinkpath, *dn, *buf = NULL;
    -     struct dirent  *mapdirentry;
    -     DIR            *mapdirstream;
    -     ino_t          firstinode;
    -     long           buflen;
    -     struct stat    statbuf;
    -     struct passwd  pw, *pwp;
    -     
    -     if (gridmapdir == NULL) return NULL;
    -
    -     buflen = sysconf(_SC_GETPW_R_SIZE_MAX);
    -     buf = malloc(buflen);
    -
    -     if ((buflen <= 0) ||
    -         (getpwuid_r(uid, &pw, buf, buflen, &pwp) != 0) ||
    -         (pw.pw_name == NULL))
    -       {
    -         if (buf != NULL) free(buf);
    -         return NULL;
    -       }
    -
    -     asprintf(&firstlinkpath, "%s/%s", gridmapdir, pw.pw_name);
    -     ret = stat(firstlinkpath, &statbuf);
    -
    -     free(firstlinkpath);
    -
    -     if ((ret != 0) || (statbuf.st_nlink != 2))
    -       {
    -         free(buf);
    -         return NULL;
    -       }
    -
    -     firstinode = statbuf.st_ino; /* save for comparisons */
    -
    -     mapdirstream = opendir(gridmapdir);
    -
    -     if (mapdirstream != NULL)
    -       {
    -         while ((mapdirentry = readdir(mapdirstream)) != NULL)
    -              {
    -                 if (strcmp(mapdirentry->d_name, pw.pw_name) == 0) continue;
    -
    -                 if (mapdirentry->d_ino == firstinode)
    -                   {
    -                      asprintf(&otherlinkpath, "%s/%s", gridmapdir,
    -                                            mapdirentry->d_name);
    -
    -                      utime(otherlinkpath, (struct utimbuf *) NULL);
    -                      free(otherlinkpath);
    -                      
    -                      dn = GRSThttpUrlDecode(mapdirentry->d_name);
    -            
    -                      if (debugmode) syslog(LOG_DEBUG, "mapdir_uid_to_dn "
    -                                  "maps %s(%d) to %s", pw.pw_name, uid, dn);
    -
    -                      closedir(mapdirstream);
    -                      free(buf);
    -                      return dn;
    -                   }
    -              }
    -
    -         closedir(mapdirstream);
    -       }
    -
    -     free(buf);
    -     return NULL;
    -}
    -
    -
    -int perform_request(struct grst_request *request_data,
    -                    struct fuse_context *fuse_ctx)
    -{
    -  int                ret, i, j, itry, ishttps = 0;
    -  char              *proxyfile = NULL, *range_header = NULL, *url;
    -  struct stat        statbuf;
    -  struct curl_slist *headers_list = NULL;
    -
    -  if (strncmp(request_data->url, "https://", 8) == 0) /* HTTPS options */
    -    {
    -// check for X509_USER_PROXY in that PID's environ too
    -      ishttps = 1;
    -
    -      if ((proxyfile = check_x509_user_proxy(fuse_ctx->pid)) == NULL)
    -        {
    -          asprintf(&proxyfile, "/tmp/x509up_u%d", fuse_ctx->uid);
    -          /* if proxyfile is used, it will be referenced by handles[].proxyfile
    -             and freed when this handle is eventually freed */
    -
    -          if ((stat(proxyfile, &statbuf) != 0) ||
    -              (statbuf.st_uid != fuse_ctx->uid))
    -            {
    -              free(proxyfile);
    -              proxyfile = NULL;
    -            }
    -        }
    -    }
    -
    -  if (debugmode && (proxyfile != NULL))
    -       syslog(LOG_DEBUG, "Using proxy file %s", proxyfile);
    -
    -  /* try to find an existing handle for this uid/proxyfile */
    -
    -  for (i=0; i < GRST_SLASH_MAX_HANDLES; ++i)
    -     {
    -       if ((handles[i].curl_handle != NULL)  &&
    -           (handles[i].uid == fuse_ctx->uid) &&
    -           (((handles[i].proxyfile == NULL) && (proxyfile == NULL)) ||
    -            ((handles[i].proxyfile != NULL) && (proxyfile != NULL) &&
    -             (strcmp(handles[i].proxyfile, proxyfile) == 0))))
    -         {
    -           break;
    -         }
    -     }
    -     
    -  if (i >= GRST_SLASH_MAX_HANDLES) /* no existing match found */
    -    {
    -      i=0;
    -    
    -      for (j=0; j < GRST_SLASH_MAX_HANDLES; ++j)
    -         {
    -           if (handles[j].curl_handle == NULL) /* unused slot */
    -             {
    -               i = j;
    -               break;
    -             }
    -             
    -           if (handles[j].last_used < handles[i].last_used) i = j;
    -         }
    -    }
    -
    -  /* now lock this handle and recheck settings inside the mutex lock */
    -
    -  pthread_mutex_lock(&(handles[i].mutex)); /* unlock just before return */
    -
    -  if ((handles[i].curl_handle == NULL)  ||
    -      (handles[i].uid != fuse_ctx->uid) ||
    -      (((handles[i].proxyfile != NULL) || (proxyfile != NULL)) &&
    -       ((handles[i].proxyfile == NULL) || (proxyfile == NULL) ||
    -        (strcmp(handles[i].proxyfile, proxyfile) != 0))))
    -    {
    -      /* we do need to initialise this handle */
    -      
    -      handles[i].uid = fuse_ctx->uid;
    -
    -      if (handles[i].curl_handle != NULL)
    -                              curl_easy_cleanup(handles[i].curl_handle);
    -      handles[i].curl_handle = curl_easy_init();
    -      
    -      if (handles[i].proxyfile != NULL) free(handles[i].proxyfile);
    -      handles[i].proxyfile = proxyfile; /* proxyfile might be NULL itself */
    -      
    -      if (handles[i].proxyfile != NULL)
    -        {
    -          curl_easy_setopt(handles[i].curl_handle, CURLOPT_SSLCERTTYPE, "PEM");
    -          curl_easy_setopt(handles[i].curl_handle, CURLOPT_SSLCERT,
    -                                                    handles[i].proxyfile);
    -          curl_easy_setopt(handles[i].curl_handle, CURLOPT_SSLKEYTYPE, "PEM");
    -          curl_easy_setopt(handles[i].curl_handle, CURLOPT_SSLKEY,  
    -                                                    handles[i].proxyfile);
    -        }
    -      else
    -        {
    -          curl_easy_setopt(handles[i].curl_handle, CURLOPT_SSLKEYTYPE,  "ENG");
    -          curl_easy_setopt(handles[i].curl_handle, CURLOPT_SSLCERTTYPE, "ENG");
    -          curl_easy_setopt(handles[i].curl_handle, CURLOPT_SSLCERT,     NULL);
    -        }
    -
    -      if (debugmode)
    -        {
    -          curl_easy_setopt(handles[i].curl_handle, CURLOPT_VERBOSE, 1);
    -          curl_easy_setopt(handles[i].curl_handle, CURLOPT_DEBUGFUNCTION,
    -                                                          debug_callback);
    -        }
    -
    -      curl_easy_setopt(handles[i].curl_handle, CURLOPT_USERAGENT, 
    -                       "SlashGrid http://www.gridsite.org/slashgrid/");
    -      curl_easy_setopt(handles[i].curl_handle, CURLOPT_FOLLOWLOCATION, 0);
    -      curl_easy_setopt(handles[i].curl_handle, CURLOPT_HEADERFUNCTION, headers_callback);
    -
    -      curl_easy_setopt(handles[i].curl_handle, CURLOPT_CAPATH, 
    -                                        "/etc/grid-security/certificates");
    -
    -      curl_easy_setopt(handles[i].curl_handle, CURLOPT_SSL_VERIFYPEER, 2);
    -      curl_easy_setopt(handles[i].curl_handle, CURLOPT_SSL_VERIFYHOST, 2);
    -    }   
    -
    -  curl_easy_setopt(handles[i].curl_handle, CURLOPT_READFUNCTION, request_data->readfunction);
    -  curl_easy_setopt(handles[i].curl_handle, CURLOPT_READDATA, request_data->readdata);
    -  curl_easy_setopt(handles[i].curl_handle, CURLOPT_WRITEFUNCTION, request_data->writefunction);
    -  curl_easy_setopt(handles[i].curl_handle, CURLOPT_WRITEDATA, request_data->writedata);
    -
    -  if (request_data->method == GRST_SLASH_GET)
    -    {
    -      curl_easy_setopt(handles[i].curl_handle, CURLOPT_CUSTOMREQUEST, NULL);
    -      curl_easy_setopt(handles[i].curl_handle, CURLOPT_NOBODY,  0);
    -      curl_easy_setopt(handles[i].curl_handle, CURLOPT_HTTPGET, 1);
    -      curl_easy_setopt(handles[i].curl_handle, CURLOPT_UPLOAD,  0);
    -      curl_easy_setopt(handles[i].curl_handle, CURLOPT_INFILESIZE, -1);
    -    }
    -  else if ((request_data->method == GRST_SLASH_PUT) || 
    -           (request_data->method == GRST_SLASH_TRUNC))
    -    {
    -      curl_easy_setopt(handles[i].curl_handle, CURLOPT_CUSTOMREQUEST, NULL);
    -      curl_easy_setopt(handles[i].curl_handle, CURLOPT_NOBODY,  0);
    -      curl_easy_setopt(handles[i].curl_handle, CURLOPT_HTTPGET, 0);
    -      curl_easy_setopt(handles[i].curl_handle, CURLOPT_UPLOAD,  1);
    -      curl_easy_setopt(handles[i].curl_handle, CURLOPT_INFILESIZE,  
    -                                            (long) request_data->infilesize);
    -    }
    -  else if (request_data->method == GRST_SLASH_DELETE)
    -    {
    -      curl_easy_setopt(handles[i].curl_handle, CURLOPT_NOBODY,  0);
    -      curl_easy_setopt(handles[i].curl_handle, CURLOPT_HTTPGET, 0);
    -      curl_easy_setopt(handles[i].curl_handle, CURLOPT_UPLOAD,  0);
    -      curl_easy_setopt(handles[i].curl_handle, CURLOPT_CUSTOMREQUEST, "DELETE");
    -      curl_easy_setopt(handles[i].curl_handle, CURLOPT_INFILESIZE, -1);
    -    }
    -  else if (request_data->method == GRST_SLASH_MOVE)
    -    {
    -      curl_easy_setopt(handles[i].curl_handle, CURLOPT_NOBODY,  0);
    -      curl_easy_setopt(handles[i].curl_handle, CURLOPT_HTTPGET, 0);
    -      curl_easy_setopt(handles[i].curl_handle, CURLOPT_UPLOAD,  0);
    -      curl_easy_setopt(handles[i].curl_handle, CURLOPT_CUSTOMREQUEST, "MOVE");
    -      curl_easy_setopt(handles[i].curl_handle, CURLOPT_INFILESIZE, -1);
    -    }
    -  else /* default or GRST_SLASH_HEAD */
    -    {
    -      curl_easy_setopt(handles[i].curl_handle, CURLOPT_CUSTOMREQUEST, NULL);
    -      curl_easy_setopt(handles[i].curl_handle, CURLOPT_NOBODY,  1);
    -      curl_easy_setopt(handles[i].curl_handle, CURLOPT_HTTPGET, 0);
    -      curl_easy_setopt(handles[i].curl_handle, CURLOPT_UPLOAD,  0);
    -      curl_easy_setopt(handles[i].curl_handle, CURLOPT_INFILESIZE, -1);
    -    }
    -
    -  curl_easy_setopt(handles[i].curl_handle, CURLOPT_WRITEHEADER, request_data);
    -  
    -  if (request_data->errorbuffer != NULL)
    -        curl_easy_setopt(handles[i].curl_handle, CURLOPT_ERRORBUFFER,
    -                                      request_data->errorbuffer);
    -
    -  if (debugmode)
    -        curl_easy_setopt(handles[i].curl_handle, CURLOPT_DEBUGDATA, &i);
    -
    -/* Move to higher up
    -  curl_easy_setopt(handles[i].curl_handle, CURLOPT_READFUNCTION, request_data->readfunction);
    -  curl_easy_setopt(handles[i].curl_handle, CURLOPT_READDATA, request_data->readdata);
    -  curl_easy_setopt(handles[i].curl_handle, CURLOPT_WRITEFUNCTION, request_data->writefunction);
    -  curl_easy_setopt(handles[i].curl_handle, CURLOPT_WRITEDATA, request_data->writedata);
    -*/
    -  if ((request_data->start >= 0) && 
    -      (request_data->finish >= request_data->start))
    -    {
    -      if (request_data->method == GRST_SLASH_PUT)
    -           asprintf(&range_header, "Content-Range: bytes %ld-%ld/*", 
    -               (long) request_data->start, (long) request_data->finish);
    -      else if (request_data->method == GRST_SLASH_TRUNC)
    -           asprintf(&range_header, "Content-Range: bytes *-*/%ld", 
    -               (long) request_data->finish);
    -      else asprintf(&range_header, "Range: bytes=%ld-%ld", 
    -               (long) request_data->start, (long) request_data->finish);
    -
    -      headers_list = curl_slist_append(headers_list, range_header);
    -      curl_easy_setopt(handles[i].curl_handle, CURLOPT_HTTPHEADER, headers_list);
    -    }
    -  else curl_easy_setopt(handles[i].curl_handle, CURLOPT_HTTPHEADER, NULL);
    -
    -  /* retry loop */
    -
    -  for (itry=1; itry <= number_of_tries; ++itry)
    -     {
    -       request_data->length_set   = 0;
    -       request_data->modified_set = 0;
    -       request_data->retcode      = 0;
    -       request_data->location[0]  = '\0';
    -    
    -       if ((sitecast_domain != NULL) &&
    -           (sitecast_groups != NULL) &&
    -
    -           ((request_data->method == GRST_SLASH_HEAD) ||
    -            (request_data->method == GRST_SLASH_GET)) &&
    -
    -           ((!ishttps && 
    -             (strncmp(&(request_data->url[7]), sitecast_domain, 
    -                                   sitecast_domain_len) == 0) &&
    -             ((request_data->url[7+sitecast_domain_len] == ':') ||
    -              (request_data->url[7+sitecast_domain_len] == '/')) )
    -                                                                   ||
    -            (ishttps &&
    -             (strncmp(&(request_data->url[8]), sitecast_domain, 
    -                                    sitecast_domain_len) == 0) &&
    -             ((request_data->url[8+sitecast_domain_len] == ':') ||
    -              (request_data->url[8+sitecast_domain_len] == '/')) ) ) )
    -         {
    -           if (debugmode)
    -             syslog(LOG_DEBUG, "Apply SiteCast to URL %s", request_data->url);
    -
    -           if (translate_sitecast_url(&url, request_data->url) ==
    -                GRST_RET_OK)
    -             {
    -               curl_easy_setopt(handles[i].curl_handle,
    -                                            CURLOPT_URL, url);
    -               ret = curl_easy_perform(handles[i].curl_handle);
    -
    -               free(url);               
    -             }
    -           else
    -             {
    -               ret = 1;
    -               request_data->retcode = 404; /* HTTP not found */
    -             }
    -         }
    -       else
    -         {
    -           curl_easy_setopt(handles[i].curl_handle,
    -                                            CURLOPT_URL, request_data->url);
    -           ret = curl_easy_perform(handles[i].curl_handle);
    -         }
    -
    -// tests on whether to retry due to server error / timeout go here...
    -       break;
    -     }
    -
    -  if (headers_list != NULL) curl_slist_free_all(headers_list);
    -  if (range_header != NULL) free(range_header);
    -
    -  pthread_mutex_unlock(&(handles[i].mutex));
    -  
    -  return ret;
    -}
    -
    -size_t rawbody_callback(void *ptr, size_t size, size_t nmemb, void *data)
    -{
    -  if ( ((struct grst_body_text *) data)->used + size * nmemb >=
    -                             ((struct grst_body_text *) data)->allocated )
    -    {
    -      ((struct grst_body_text *) data)->allocated = 
    -        ((struct grst_body_text *) data)->used + size * nmemb + 4096;
    -
    -      ((struct grst_body_text *) data)->text = 
    -         realloc( ((struct grst_body_text *) data)->text,
    -                  ((struct grst_body_text *) data)->allocated );
    -    }
    -    
    -  memcpy( &( ((struct grst_body_text *) 
    -                 data)->text[((struct grst_body_text *) data)->used] ),
    -          ptr, size * nmemb);
    -          
    -  ((struct grst_body_text *) data)->used += size * nmemb;
    -  
    -  return size * nmemb;
    -}
    -
    -size_t null_callback(void *ptr, size_t size, size_t nmemb, void *data)
    -{
    -  return size * nmemb;
    -}
    -
    -size_t read_data_callback(void *ptr, size_t size, size_t nmemb, void *data)
    -{
    -  size_t sent;
    -  
    -  if (((struct grst_read_data *) data)->sent 
    -        >= ((struct grst_read_data *) data)->maxsent) return 0;
    -        
    -  if (size * nmemb + ((struct grst_read_data *) data)->sent 
    -        >= ((struct grst_read_data *) data)->maxsent)
    -    {
    -      sent = ((struct grst_read_data *) data)->maxsent 
    -             - ((struct grst_read_data *) data)->sent;
    -    }
    -  else sent = size * nmemb;        
    -
    -  memcpy(ptr, 
    -         ((struct grst_read_data *) data)->buf +
    -         ((struct grst_read_data *) data)->sent,
    -         sent);
    -
    -  ((struct grst_read_data *) data)->sent += sent;
    -  
    -  return sent;
    -}
    -
    -char *canonicalise(char *link, char *source)
    -{
    -  int   i, j, srclen;
    -  char *s;
    -
    -  srclen = strlen(source);
    -
    -  if ((strncmp(link, "https://", 8) == 0) ||
    -      (strncmp(link, "http://", 7) == 0))
    -    {
    -      if (strncmp(link, source, srclen) != 0) return NULL; /* other site */
    -      
    -      if (link[srclen] == '\0') return NULL; /* we dont self-link! */
    -      
    -      for (i=0; link[srclen + i] != '\0'; ++i)
    -        if (link[srclen + i] == '/')
    -          { 
    -            if (link[srclen + i + 1] != '\0') return NULL; /* no subdirs */
    -            else return strdup(&link[srclen]); /* resolves to this dir */
    -          }
    -    }
    -  else if (link[0] != '/') /* relative link - need to check for subsubdirs */
    -    {
    -      for (i=0; link[i] != '\0'; ++i) 
    -        if ((link[i] == '/') && (link[i+1] != '\0')) return NULL;
    -
    -      s = strdup(link);
    -      
    -      for (i=0; s[i] != '\0'; ++i) 
    -       if (s[i] == '#')
    -         {
    -           s[i] = '\0';
    -           break;
    -         }
    -
    -      return s;
    -    }
    -
    -  /* absolute link on this server, starting / */
    -
    -  for (i=8; source[i] != '\0'; ++i) if (source[i] == '/') break;
    -       
    -  if (strncmp(link, &source[i], srclen - i) != 0) return NULL;
    -
    -  for (j = srclen - i; link[j] != '\0'; ++j)
    -        if ((link[j] == '/') && (link[j+1] != '\0')) return NULL;
    -        
    -  s = strdup(&link[srclen - i]);
    -      
    -  for (i=0; s[i] != '\0'; ++i) 
    -       if (s[i] == '#')
    -         {
    -           s[i] = '\0';
    -           break;
    -         }
    -
    -  if (s[0] == '\0') /* on second thoughts... */
    -    {
    -      free(s);
    -      return NULL;
    -    }
    -         
    -  return s;      
    -}
    -
    -int grst_dir_list_cmp(const void *a, const void *b)
    -{
    -  return strcmp( ((struct grst_dir_list *) a)->filename, 
    -                 ((struct grst_dir_list *) b)->filename);
    -}
    -
    -struct grst_dir_list *index_to_dir_list(char *text, char *source)
    -{
    -  int   taglevel = 0, wordnew = 1, i, namestart, used = 0, 
    -        allocated = 256;
    -  char *p, *s;
    -  struct grst_dir_list *list;
    -  
    -  list = (struct grst_dir_list *)
    -              malloc(allocated * sizeof(struct grst_dir_list));
    -              
    -  list[0].filename     = NULL;
    -  list[0].length       = 0;
    -  list[0].length_set   = 0;
    -  list[0].modified     = 0;
    -  list[0].modified_set = 0;
    -    
    -  for (p=text; *p != '\0'; ++p)
    -     {
    -       if (*p == '<') 
    -         {
    -           ++taglevel;
    -           
    -           if ((taglevel == 1) && (list[used].filename != NULL))
    -             {
    -               ++used;
    -               if (used >= allocated) 
    -                 {
    -                   allocated += 256;
    -                   list = (struct grst_dir_list *)
    -                           realloc((void *) list,
    -                                   allocated * sizeof(struct grst_dir_list));
    -                 }
    -                 
    -               list[used].filename     = NULL;
    -               list[used].length       = 0;
    -               list[used].length_set   = 0;
    -               list[used].modified     = 0;
    -               list[used].modified_set = 0;
    -             }
    -
    -           wordnew = 1;
    -           continue;
    -         }
    -
    -       if (*p == '>') 
    -         {
    -           --taglevel;
    -           wordnew = 1;
    -           continue;
    -         }
    -         
    -       if (isspace(*p))
    -         {
    -           wordnew = 1;
    -           continue;
    -         }
    -
    -       if ((wordnew) && (taglevel == 1))
    -         {        
    -           if (((*p == 'h') || (*p == 'H')) && 
    -               (strncasecmp(p, "href=", 5) == 0))
    -             {
    -               if (p[5] == '"') { namestart = 6;
    -                                  for (i=namestart; (p[i] != '\0') &&
    -                                                    (p[i] != '"' ) &&
    -                                                    (p[i] != '\n') &&
    -                                                    (p[i] != '\t') &&
    -                                                    (p[i] != '>' ) ; ++i) ; }
    -               else { namestart = 5;
    -                      for (i=namestart; (p[i] != '\0') &&
    -                                        (p[i] != '"' ) &&
    -                                        (p[i] != ' ' ) &&
    -                                        (p[i] != '\n') &&
    -                                        (p[i] != '\t') &&
    -                                        (p[i] != ')' ) &&
    -                                        (p[i] != '>' ) ; ++i) ; }
    -               if (i > namestart)
    -                 {
    -                   s = malloc(1 + i - namestart);
    -                   memcpy(s, &p[namestart], i - namestart);
    -                   s[i - namestart] = '\0';
    -
    -                   list[used].filename = canonicalise(s, source);
    -                   free(s);
    -                   
    -                   if ((list[used].filename != NULL) &&
    -                       ((list[used].filename[0] == '\0') ||
    -                        (strcmp(list[used].filename, "/") == 0)))
    -                     {
    -                       free(list[used].filename);
    -                       list[used].filename = NULL;
    -                     }
    -                 }
    -                 
    -               p = &p[i-1]; /* -1 since continue results in ++i */
    -               continue;
    -             }
    -
    -           if (((*p == 'c') || (*p == 'C')) && 
    -               (strncasecmp(p, "content-length=", 15) == 0))
    -             {
    -               list[used].length     = 0;
    -               list[used].length_set = 1;
    -               
    -               if (p[15] == '"') list[used].length = atoi(&p[16]);
    -               else              list[used].length = atoi(&p[15]);
    -
    -               p = &p[15];
    -               continue;
    -             }
    -
    -           if (((*p == 'l') || (*p == 'L')) && 
    -               (strncasecmp(p, "last-modified=", 14) == 0))
    -             {
    -               list[used].modified     = 0;
    -               list[used].modified_set = 1;
    -               
    -               if (p[14] == '"') list[used].modified = atoi(&p[15]);
    -               else              list[used].modified = atoi(&p[14]);
    -
    -               p = &p[14];
    -               continue;
    -             }
    -         }
    -         
    -       wordnew = 0;
    -     }  
    -
    -  qsort((void *) list, used, sizeof(struct grst_dir_list), grst_dir_list_cmp);
    -
    -  return list;  
    -}
    -
    -#if 0
    -static char *GRSThttpUrlMildencode(char *in)
    -/* Return a pointer to a malloc'd string holding a partially URL-encoded
    -   version of *in. "Partially" means that A-Z a-z 0-9 . = - _ @ and /
    -   are passed through unmodified. (DN's processed by GRSThttpUrlMildencode()
    -   can be used as valid Unix paths+filenames if you are prepared to
    -   create or simulate the resulting /X=xyz directories.) */
    -{
    -  char *out, *p, *q;
    -
    -  out = malloc(3*strlen(in) + 1);
    -
    -  p = in;
    -  q = out;
    -
    -  while (*p != '\0')
    -       {
    -         if (isalnum(*p) || (*p == '.') || (*p == '=') || (*p == '-')
    -                         || (*p == '/') || (*p == '@') || (*p == '_'))
    -           {
    -             *q = *p;
    -             ++q;
    -           }
    -         else if (*p == ' ')
    -           {
    -             *q = '+';
    -             ++q;
    -           }
    -         else
    -           {
    -             sprintf(q, "%%%2X", *p);
    -             q = &q[3];
    -           }
    -
    -         ++p;
    -       }
    -
    -  *q = '\0';
    -  return out;
    -}
    -#endif
    -
    -GRSTgaclPerm get_gaclPerm(struct fuse_context *fuse_ctx, char *path)
    -{
    -  GRSTgaclPerm perm = GRST_PERM_NONE; 
    -  GRSTgaclCred *cred;
    -  GRSTgaclUser *user = NULL;
    -  GRSTgaclAcl  *acl;
    -  char *dn = NULL;
    -
    -// eventually want a UID cache here...
    -
    -/*
    -// want root to be able to read anything, and to write to anything under
    -// local_root - need to test if talking about a symbolic link??
    -  if (fuse_ctx->uid == 0) 
    -    {
    -      if (debugmode) syslog(LOG_DEBUG, 
    -              "get_gaclPerm returns perm=%d for root user", GRST_PERM_ALL);
    -      return GRST_PERM_ALL;
    -    }
    -*/
    -  dn = mapdir_uid_to_dn(fuse_ctx->uid);
    -  
    -  if (dn != NULL)
    -    {
    -      cred = GRSTgaclCredNew("person");
    -      GRSTgaclCredAddValue(cred, "dn", dn);
    -      user = GRSTgaclUserNew(cred);
    -      free(dn);
    -    }   
    -  
    -  acl  = GRSTgaclAclLoadforFile(path); 
    -  perm = GRSTgaclAclTestUser(acl, user);
    -  GRSTgaclAclFree(acl);
    -  GRSTgaclUserFree(user);
    -  
    -  if (strstr(path, GRST_ACL_FILE) != NULL) perm &= ~GRST_PERM_WRITE;
    -
    -  if (debugmode) syslog(LOG_DEBUG, "get_gaclPerm returns perm=%d", perm);
    -
    -  return perm;            
    -}
    -
    -int read_headers_from_cache(struct fuse_context *fuse_ctx, char *filename, 
    -                            off_t *length, time_t *modified)
    -{
    -  char *encoded_filename, *disk_filename;
    -  int   len;
    -  long  content_length, last_modified;
    -  FILE *fp;
    -  struct stat statbuf;
    -  time_t now;
    -  
    -  encoded_filename = GRSThttpUrlMildencode(filename);
    -  
    -  len = strlen(encoded_filename);
    -
    -  if (encoded_filename[len - 1] == '/') /* a directory */
    -       asprintf(&disk_filename, "%s/%d%s%s", 
    -                GRST_SLASH_HEADERS, fuse_ctx->uid, encoded_filename, GRST_SLASH_DIRFILE);
    -  else asprintf(&disk_filename, "%s/%d%s%s", 
    -                GRST_SLASH_HEADERS, fuse_ctx->uid, encoded_filename);
    -
    -  free(encoded_filename);
    -
    -// Change to fstat for the benefit of multiple threads:
    -
    -  if (stat(disk_filename, &statbuf) != 0) /* no cache file to read */
    -    {
    -      free(disk_filename);
    -      return 0;
    -    }
    -
    -  time(&now);
    -
    -  if (statbuf.st_mtime < now - GRST_SLASH_HEADERS_EXPIRE)
    -    {
    -      unlink(disk_filename); /* tidy up expired cache file */
    -      free(disk_filename);
    -      return 0;
    -    }      
    -
    -  last_modified  = 0;
    -  content_length = 0;
    -
    -  if (debugmode) syslog(LOG_DEBUG, "Opening %s from cache", disk_filename);
    -
    -  fp = fopen(disk_filename, "r");
    -  free(disk_filename);
    -
    -  if (fp != NULL)
    -    {
    -      fscanf(fp, "content-length=%ld last-modified=%ld ", 
    -                 &content_length, &last_modified);
    -      fclose(fp);
    -
    -      if (debugmode) syslog(LOG_DEBUG, "content-length=%ld last-modified=%ld", 
    -                            content_length, last_modified);
    -
    -      *length   = (off_t)  content_length;
    -      *modified = (time_t) last_modified;
    -
    -      return 1;
    -    }
    -
    -  return 0;
    -}
    -
    -int write_headers_to_cache(struct fuse_context *fuse_ctx, char *filename, 
    -                           off_t length, time_t modified)
    -{
    -  int         fd, len;
    -  char       *tempfile, *headline, *encoded_filename, *p, *newdir,
    -             *new_filename;
    -  struct stat statbuf;
    -
    -  asprintf(&tempfile, "%s/headers-XXXXXX", GRST_SLASH_TMP);
    -  fd = mkstemp(tempfile);
    -
    -  if (fd == -1)
    -    {
    -      free(tempfile);
    -      return 0;
    -    }
    -
    -  asprintf(&headline, "content-length=%ld last-modified=%ld \n", 
    -                                (long) length, (long) modified);
    -  
    -  if ((write(fd, headline, strlen(headline)) == -1) ||
    -      (close(fd) == -1))
    -    {
    -      free(tempfile);
    -      free(headline);
    -      return 0;
    -    }
    -
    -  free(headline);
    -                     
    -  encoded_filename = GRSThttpUrlMildencode(filename);
    -
    -// need to protect against .. ?
    -   
    -  for (p = encoded_filename; *p != '\0'; ++p)
    -     {  
    -       if (*p != '/') continue;
    -     
    -       *p = '\0';
    -       asprintf(&newdir, "%s/%d%s", GRST_SLASH_HEADERS, fuse_ctx->uid, encoded_filename);
    -       *p = '/';
    -           
    -       if (stat(newdir, &statbuf) == 0)
    -         {
    -           if (!S_ISDIR(statbuf.st_mode)) /* exists already - not a directory! */
    -             {
    -               unlink(newdir);
    -               mkdir(newdir, S_IRUSR | S_IWUSR | S_IXUSR);
    -             }
    -           /* else it already exists as a directory - so ok */
    -         }
    -       else mkdir(newdir, S_IRUSR | S_IWUSR | S_IXUSR);
    -
    -       free(newdir);
    -     }
    -
    -  len = strlen(encoded_filename);
    -
    -  if (encoded_filename[len - 1] == '/') /* a directory */
    -       asprintf(&new_filename, "%s/%d%s%s", 
    -                GRST_SLASH_HEADERS, fuse_ctx->uid, encoded_filename, GRST_SLASH_DIRFILE);
    -  else asprintf(&new_filename, "%s/%d%s", 
    -                GRST_SLASH_HEADERS, fuse_ctx->uid, encoded_filename);
    -
    -  free(encoded_filename);
    -  
    -  if ((stat(new_filename, &statbuf) == 0) && S_ISDIR(statbuf.st_mode))
    -    {
    -// need change this to do it recursively in case any files/subdirs too
    -      rmdir(new_filename);
    -    }
    -
    -  rename(tempfile, new_filename);
    -
    -  if (debugmode) syslog(LOG_DEBUG, "Added %s to cache (%ld %ld)\n", 
    -                                   new_filename, length, modified);
    -
    -  free(tempfile);
    -  free(new_filename);
    -
    -  return 1;
    -}
    -
    -static int slashgrid_readdir(const char *path, void *buf, 
    -                             fuse_fill_dir_t filler,
    -                             off_t offset, struct fuse_file_info *fi)
    -{
    -  (void) offset;
    -  (void) fi;
    -
    -  int          anyerror = 0, thiserror, i, ilast, len, isdir;
    -  const char  *months[] = { "Jan", "Feb", "Mar", "Apr", "May", "Jun", 
    -                            "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" };
    -  char        *s, *url, errorbuffer[CURL_ERROR_SIZE+1] = "", *dirname, *p;
    -  struct       grst_body_text  rawindex;
    -  struct       grst_dir_list   *list;
    -  struct       grst_request request_data;
    -  struct       tm               modified_tm;
    -  struct       stat             stat_tmp;
    -  time_t                        now;
    -  struct fuse_context fuse_ctx;
    -  struct dirent **dirlist;
    -  GRSTgaclPerm  perm;
    -  
    -  memcpy(&fuse_ctx, fuse_get_context(), sizeof(struct fuse_context));
    -
    -  if (debugmode) syslog(LOG_DEBUG, "in slashgrid_readdir");
    -
    -  if (strcmp(path, "/") == 0)
    -    {
    -      filler(buf, ".",     NULL, 0);
    -      filler(buf, "..",    NULL, 0);
    -      filler(buf, "http",  NULL, 0);
    -      filler(buf, "https", NULL, 0);
    -      return 0;
    -    }
    -    
    -  if ((strcmp(path, "/http") == 0) || (strcmp(path, "/https") == 0))
    -    {
    -      filler(buf, ".",     NULL, 0);
    -      filler(buf, "..",    NULL, 0);
    -
    -      asprintf(&dirname, "%s/%d%s", GRST_SLASH_HEADERS, fuse_ctx.uid, path);
    -      ilast = scandir(dirname, &dirlist, 0, alphasort) - 1;
    -
    -      for (i=0; i <= ilast; ++i)
    -         {
    -           if (dirlist[i]->d_name[0] != '.')
    -                 filler(buf, dirlist[i]->d_name, NULL, 0);
    -           free(dirlist[i]);
    -         }
    -         
    -      if (ilast >= 0) free(dirlist);      
    -      free(dirname);
    -    
    -      return 0;
    -    }
    -  else if ((local_root != NULL) &&
    -           ((strcmp(path, "/local") == 0) || 
    -            (strncmp(path, "/local/", 7) == 0)))
    -    {
    -      asprintf(&dirname, "%s%s/", local_root, &path[6]);
    -
    -      perm = get_gaclPerm(&fuse_ctx, dirname);
    -
    -      if (!GRSTgaclPermHasList(perm))
    -        {
    -          free(dirname);
    -          return -EACCES;
    -        }
    -        
    -      ilast = scandir(dirname, &dirlist, 0, alphasort) - 1;
    -      free(dirname);
    -
    -      if (ilast < 0) return -ENOENT;
    -              
    -//      filler(buf, ".",     NULL, 0);
    -//      filler(buf, "..",    NULL, 0);
    -
    -      for (i=0; i <= ilast; ++i)
    -         {
    -//           if (dirlist[i]->d_name[0] != '.')
    -                 filler(buf, dirlist[i]->d_name, NULL, 0);
    -           free(dirlist[i]);
    -         }
    -         
    -      free(dirlist);      
    -
    -      return 0;
    -    }
    -  else if (strncmp(path, "/http/", 6) == 0)
    -    asprintf(&url, "http://%s/", &path[6]);
    -  else if (strncmp(path, "/https/", 7) == 0)
    -    asprintf(&url, "https://%s/", &path[7]);
    -  else return -ENOENT;
    -
    -  rawindex.text      = NULL;
    -  rawindex.used      = 0;
    -  rawindex.allocated = 0;
    -
    -  bzero(&request_data, sizeof(struct grst_request));
    -  request_data.writefunction = rawbody_callback;
    -  request_data.writedata     = (void *) &rawindex;
    -  request_data.errorbuffer   = errorbuffer;
    -  request_data.url           = url;
    -  request_data.method        = GRST_SLASH_GET;
    -  request_data.start         = -1;
    -  request_data.finish        = -1;
    -  
    -  if (debugmode) syslog(LOG_DEBUG, "Get directory listing from URL %s", url);
    -  
    -  thiserror = perform_request(&request_data, &fuse_ctx);
    -
    -  if ((thiserror != 0) ||
    -           (request_data.retcode <  200) ||
    -           (request_data.retcode >= 300))
    -         {
    -           if (debugmode)
    -                syslog(LOG_DEBUG, "... curl error: %s (%d), HTTP error: %d\n",
    -                       errorbuffer, thiserror, request_data.retcode);
    -           
    -           if (thiserror != 0) anyerror = thiserror;
    -           else                anyerror = request_data.retcode;
    -
    -           if (request_data.retcode == 403) return -EACCES;
    -           else return -ENOENT; 
    -/* memory clean up still needed here!!!!!! */
    -         }
    -  else
    -         {
    -           time(&now);
    -
    -           filler(buf, ".", NULL, 0);
    -           filler(buf, "..", NULL, 0);
    -
    -           rawindex.text[rawindex.used] = '\0';
    -
    -// we need to get this out of headers cache instead iff still valid
    -
    -           list  = index_to_dir_list(rawindex.text, url);
    -           ilast = -1;
    -
    -           for (i=0; list[i].filename != NULL; ++i)
    -              {
    -                if (debugmode) syslog(LOG_DEBUG, 
    -                         "in slashgrid_readdir, list[%d].filename=%s",
    -                         i, list[i].filename);
    -              
    -                if (strncmp(list[i].filename, "mailto:", 7) == 0) continue;
    -
    -                len = strlen(list[i].filename);
    -                if (list[i].filename[len-1] == '/')
    -                  {
    -                    isdir = 1;
    -                    list[i].filename[len-1] = '\0';
    -                  }
    -                else 
    -                  {
    -                    isdir = 0;
    -                    
    -                    if ((p = index(list[i].filename, '?')) != NULL) *p = '\0';
    -                  }
    -                
    -                /* skip over duplicates */
    -                
    -                if ((ilast >= 0) && 
    -                    (strcmp(list[i].filename, list[ilast].filename) == 0))
    -                                                                 continue;
    -                ilast=i; /* last distinct entry */
    -                
    -                if (debugmode) syslog(LOG_DEBUG, 
    -                         "in slashgrid_readdir, list[%d].filename=%s not dup",
    -                         i, list[i].filename);
    -
    -                asprintf(&s, "%s/%s", path, list[i].filename);
    -                write_headers_to_cache(&fuse_ctx, s, list[i].length, 
    -                                       list[i].modified);
    -                free(s);
    -           
    -                bzero(&stat_tmp, sizeof(struct stat));
    -
    -                stat_tmp.st_size  = list[i].length;
    -                stat_tmp.st_mtime = list[i].modified;
    -                stat_tmp.st_ctime = list[i].modified;
    -                stat_tmp.st_atime = now;
    -                stat_tmp.st_mode  = isdir ? 0777 : 0666;
    -                filler(buf, list[i].filename, &stat_tmp, 0);
    -
    -                if (debugmode) syslog(LOG_DEBUG, 
    -                         "in slashgrid_readdir, filler list[%d].filename=%s %lu %lu",
    -                         i, list[i].filename, stat_tmp.st_size, stat_tmp.st_mtime);
    -              }
    -         }
    -     
    -  if (debugmode) syslog(LOG_DEBUG, 
    -                         "in slashgrid_readdir, return 0");
    -  return 0;
    -}
    -
    -static int slashgrid_getattr(const char *rawpath, struct stat *stbuf)
    -{
    -  int          anyerror = 0, thiserror, i, ilast, len, ret;
    -  char        *s, *url, *path, errorbuffer[CURL_ERROR_SIZE+1] = "", *p;
    -  struct       grst_dir_list   *list;
    -  struct       grst_request request_data;
    -  struct       tm               modified_tm;
    -  struct       stat             stat_tmp;
    -  time_t                        now;
    -  GRSTgaclPerm dirperm, perm;
    -
    -  struct fuse_context fuse_ctx;
    -
    -  memcpy(&fuse_ctx, fuse_get_context(), sizeof(struct fuse_context));
    -
    -  if (debugmode) syslog(LOG_DEBUG, 
    -                         "in slashgrid_getattr, rawpath=%s UID=%d\n",
    -                         rawpath, fuse_ctx.uid);
    -
    -  memset(stbuf, 0, sizeof(struct stat));
    -  stbuf->st_mode  = S_IFREG | 0755;
    -  stbuf->st_nlink = 1;
    -  
    -  if ((strcmp(rawpath, "/")      == 0) ||
    -      (strcmp(rawpath, "/http")  == 0) ||
    -      (strcmp(rawpath, "/https") == 0) ||
    -      ((local_root != NULL) && (strcmp(rawpath, "/local") == 0)))
    -    {
    -      stbuf->st_mode = S_IFDIR | 0755;
    -              
    -      return 0; /* Empty top level directories: OK */
    -    }
    -  else if (strncmp(rawpath, "/http/", 6) == 0)
    -    {
    -      if (index(&rawpath[6], '/') == NULL) /* top directory for remote server */
    -        {
    -          stbuf->st_mode = S_IFDIR | 0755;
    -          
    -          asprintf(&url, "http://%s/", &rawpath[6]);
    -          asprintf(&path, "%s/", rawpath);
    -        }
    -      else 
    -        {
    -          asprintf(&url, "http://%s", &rawpath[6]);      
    -          path = strdup(rawpath);
    -        }
    -    }
    -  else if (strncmp(rawpath, "/https/", 7) == 0)
    -    {
    -      if (index(&rawpath[7], '/') == NULL) /* top directory for remote server */
    -        {
    -          stbuf->st_mode = S_IFDIR | 0755;
    -
    -          asprintf(&url, "https://%s/", &rawpath[7]);
    -          asprintf(&path, "%s/", rawpath);
    -        }
    -      else 
    -        {
    -          asprintf(&url, "https://%s", &rawpath[7]);
    -          path = strdup(rawpath);
    -        }
    -    }
    -  else if ((local_root != NULL) && (strncmp(rawpath, "/local/", 7) == 0))
    -    {      
    -      asprintf(&path, "%s/%s", local_root, &rawpath[7]);
    - 
    -      ret = stat(path, &stat_tmp);
    -
    -      if (debugmode) syslog(LOG_DEBUG, "path=%s ret=%d", path, ret);
    -
    -      if ((ret == 0) && S_ISDIR(stat_tmp.st_mode))
    -        {
    -          dirperm = get_gaclPerm(&fuse_ctx, path);
    -        
    -          p = rindex(path, '/');
    -          if (p != NULL) *p = '\0'; 
    -          /* strip off directory name itself if a directory, 
    -             so get the GACL of the parent directory */
    -
    -          perm = get_gaclPerm(&fuse_ctx, path);
    -        }
    -      else
    -        {      
    -          perm = get_gaclPerm(&fuse_ctx, path);
    -          dirperm = perm;
    -        }
    -
    -      if (!GRSTgaclPermHasRead(perm)) ret = -EACCES;
    -      else if (ret == 0)
    -        {
    -          stbuf->st_nlink   = 1;
    -          stbuf->st_uid     = fuse_ctx.uid;
    -          stbuf->st_gid     = fuse_ctx.gid;
    -          stbuf->st_size    = stat_tmp.st_size;
    -          stbuf->st_blksize = stat_tmp.st_blksize;
    -          stbuf->st_blocks  = stat_tmp.st_blocks;
    -          stbuf->st_atime   = stat_tmp.st_atime;
    -          stbuf->st_mtime   = stat_tmp.st_mtime;
    -          stbuf->st_ctime   = stat_tmp.st_ctime;
    -        
    -          if (S_ISDIR(stat_tmp.st_mode))
    -            {
    -              stbuf->st_mode = S_IFDIR;
    -            
    -              if (GRSTgaclPermHasWrite(dirperm)) 
    -                                        stbuf->st_mode |= S_IWUSR;
    -
    -              if (GRSTgaclPermHasList(dirperm)) 
    -                                        stbuf->st_mode |= S_IRUSR | S_IXUSR;
    -            }
    -          else
    -            {
    -              stbuf->st_mode = S_IFREG;
    -
    -              if (GRSTgaclPermHasWrite(perm)) 
    -                                        stbuf->st_mode |= S_IWUSR;
    -
    -              if (GRSTgaclPermHasRead(perm)) 
    -                                        stbuf->st_mode |= S_IRUSR;
    -            }          
    -            
    -          
    -        }  
    -      else ret = -ENOENT;
    -      
    -      free(path);
    -
    -      if (debugmode) syslog(LOG_DEBUG, "slashgrid_getattr returns %d for %s",
    -                                       ret, rawpath);
    -      return ret;
    -    }
    -  else return -ENOENT;
    -  
    -  time(&now);
    -
    -  if (read_headers_from_cache(&fuse_ctx, path, 
    -                              &(stbuf->st_size), &(stbuf->st_mtime)))
    -    {
    -      if (debugmode) syslog(LOG_DEBUG, 
    -          "Retrieving details for %s from cache (%ld %ld)\n", url,
    -          (long) stbuf->st_mtime, (long) stbuf->st_size);
    -    
    -      stbuf->st_ctime = stbuf->st_mtime;
    -      stbuf->st_atime = now;
    -      
    -      free(url);
    -      free(path);
    -      return 0;    
    -    }
    -  
    -  if (debugmode) syslog(LOG_DEBUG, "Get details for %s over network\n", url);
    -
    -  bzero(&request_data, sizeof(struct grst_request));
    -  request_data.writefunction = null_callback;
    -  request_data.writedata     = NULL;
    -  request_data.readfunction  = null_callback;
    -  request_data.readdata      = NULL;
    -  request_data.errorbuffer   = errorbuffer;
    -  request_data.url           = url;
    -  request_data.method        = GRST_SLASH_HEAD;
    -  request_data.start         = -1;
    -  request_data.finish        = -1;
    -
    -  thiserror = perform_request(&request_data, &fuse_ctx);
    -
    -  if (debugmode) syslog(LOG_DEBUG, "perform_request returns error=%d (%s)\n",
    -                        thiserror, errorbuffer);
    -
    -  if ((thiserror != 0) ||
    -           (request_data.retcode < 200) ||
    -           (request_data.retcode > 301))
    -         {
    -           if (debugmode)
    -                syslog(LOG_DEBUG, "... curl error: %s (%d), HTTP error: %d\n",
    -                       errorbuffer, thiserror, request_data.retcode);
    -           
    -           if (thiserror != 0) anyerror = thiserror;
    -           else                anyerror = request_data.retcode;
    -
    -           free(url);
    -           free(path);
    -           
    -           if (request_data.retcode == 403) return -EACCES;
    -           else return -ENOENT; 
    -/* memory clean up still needed here!!!!!! */
    -         }
    -         
    -  if (request_data.retcode == 301)
    -    {
    -       if (debugmode) syslog(LOG_DEBUG, "301 detected");
    -
    -       len = strlen(url);
    -      
    -       if ((request_data.location[0] != '\0') &&
    -          (len + 1 == strlen(request_data.location)) &&
    -          (request_data.location[len] == '/') &&
    -          (strncmp(url, request_data.location, len) == 0))
    -        {
    -          free(url);
    -          url = strdup(request_data.location);
    -          request_data.url = url;
    -                  
    -          thiserror = perform_request(&request_data, &fuse_ctx);
    -
    -          if ((thiserror != 0) ||
    -              (request_data.retcode < 200) ||
    -              ((request_data.retcode > 299) && (request_data.retcode != 403)))
    -            {
    -              if (debugmode)
    -                syslog(LOG_DEBUG, "... curl error: %s (%d), HTTP error: %d\n",
    -                       errorbuffer, thiserror, request_data.retcode);
    -           
    -              if (thiserror != 0) anyerror = thiserror;
    -              else                anyerror = request_data.retcode;
    -
    -              free(url);
    -              free(path);
    -              return -ENOENT; 
    -/* memory clean up still needed here!!!!!! */
    -            }
    -            
    -          stbuf->st_mode  = S_IFDIR | 0755;  /* this is a directory */
    -
    -          free(path);
    -          asprintf(&path, "%s/", rawpath);
    -        }
    -      else 
    -        {
    -          free(url);
    -          free(path);
    -          return -ENOENT;
    -        }
    -    }
    -
    -  if (request_data.length_set) stbuf->st_size  = request_data.length;
    -  else stbuf->st_size = 0;
    -  
    -  if (request_data.modified_set)
    -    {
    -      stbuf->st_mtime = request_data.modified;
    -      stbuf->st_ctime = request_data.modified;
    -    }
    -
    -  stbuf->st_atime = now;
    -
    -  write_headers_to_cache(&fuse_ctx, path, stbuf->st_size, stbuf->st_mtime);
    -
    -  free(url);
    -  free(path);
    -  return 0;
    -}
    -
    -int write_block_to_cache(struct fuse_context *fuse_ctx, char *filename,  
    -                         off_t start, off_t finish)
    -{
    -  int          anyerror = 0, thiserror, i, fd;
    -  char        *s, *url, *tempfile, *encoded_filename, *p,
    -              *newdir, *new_filename, errorbuffer[CURL_ERROR_SIZE+1] = "";
    -  struct       stat statbuf;
    -  struct       grst_request request_data;
    -  FILE        *fp;
    -
    -  asprintf(&tempfile, "%s/blocks-XXXXXX", GRST_SLASH_TMP);
    -  fd = mkstemp(tempfile);
    -
    -  if (fd == -1)
    -    {
    -      free(tempfile);
    -      return -EIO;
    -    }
    -
    -  fp = fdopen(fd, "w");
    -
    -  if (strncmp(filename, "/http/", 6) == 0)
    -    asprintf(&url, "http://%s", &filename[6]);
    -  else if (strncmp(filename, "/https/", 7) == 0)
    -    asprintf(&url, "https://%s", &filename[7]);
    -  else return -ENOENT;
    -
    -  bzero(&request_data, sizeof(struct grst_request));
    -  request_data.writefunction = fwrite;
    -  request_data.writedata     = (void *) fp;
    -  request_data.errorbuffer   = errorbuffer;
    -  request_data.url           = url;
    -  request_data.method        = GRST_SLASH_GET;
    -  request_data.start         = start;
    -  request_data.finish        = finish;
    -
    -  if (debugmode) syslog(LOG_DEBUG, "Get block %ld-%ld from URL %s\n",
    -                                   (long) start, (long) finish, url);
    -  
    -  thiserror = perform_request(&request_data, fuse_ctx);
    -
    -  free(url);
    -
    -  fclose(fp);  
    -
    -  if ((thiserror != 0) ||
    -           (request_data.retcode <  200) ||
    -           (request_data.retcode >= 300))
    -         {
    -           if (debugmode)
    -                syslog(LOG_DEBUG, "... curl error: %s (%d), HTTP error: %d\n",
    -                       errorbuffer, thiserror, request_data.retcode);
    -
    -           if (thiserror != 0) anyerror = thiserror;
    -           else                anyerror = request_data.retcode;
    -
    -           if (request_data.retcode == 403) return -EACCES;
    -           else return -ENOENT; 
    -/* memory clean up still needed here!!!!!! */
    -         }
    -
    -  encoded_filename = GRSThttpUrlMildencode(filename);
    -
    -// need to protect against .. ?
    -// can optimise by checking for existing of filename as a dir at the start
    -
    -  for (p = encoded_filename; ; ++p)
    -     {  
    -       if ((*p != '/') && (*p != '\0')) continue;
    -     
    -       if (*p == '/') 
    -         {
    -           *p = '\0';
    -           asprintf(&newdir, "%s/%d%s", 
    -                    GRST_SLASH_BLOCKS, fuse_ctx->uid, encoded_filename);
    -           *p = '/';
    -         }
    -       else asprintf(&newdir, "%s/%d%s", 
    -                     GRST_SLASH_BLOCKS, fuse_ctx->uid, encoded_filename);
    -           
    -       if (stat(newdir, &statbuf) != 0)
    -                                   mkdir(newdir, S_IRUSR | S_IWUSR | S_IXUSR);
    -       free(newdir);
    -       
    -       if (*p == '\0') break;
    -     }
    -
    -  asprintf(&new_filename, "%s/%d%s/%ld-%ld", GRST_SLASH_BLOCKS, fuse_ctx->uid,
    -                           encoded_filename, (long) start, (long) finish);
    -
    -  free(encoded_filename);
    -  
    -  rename(tempfile, new_filename);
    -
    -  if (debugmode) syslog(LOG_DEBUG, "Added %s to block cache", new_filename);
    -
    -  free(tempfile);
    -  free(new_filename);
    -
    -  return 0;
    -}
    -
    -int drop_cache_blocks(struct fuse_context *fuse_ctx, char *filename)
    -/* drop ALL the blocks cached for this file, and delete the directory in
    -   the blocks cache for this file */
    -{
    -  int   ret;
    -  char *encoded_filename, *dirname, *blockname;
    -  DIR *blocksDIR;
    -  struct dirent *blocks_ent;
    -
    -  encoded_filename = GRSThttpUrlMildencode(filename);
    -  
    -  asprintf(&dirname, "%s/%d%s", 
    -                     GRST_SLASH_BLOCKS, fuse_ctx->uid, encoded_filename);
    -
    -  free(encoded_filename);
    -
    -  blocksDIR = opendir(dirname);
    -  
    -  if (blocksDIR == NULL) /* no directory to delete (probably) */
    -    {
    -      free(dirname);
    -      return 1;
    -    }
    -    
    -  while ((blocks_ent = readdir(blocksDIR)) != NULL)
    -       {
    -         asprintf(&blockname, "%s/%s", dirname, blocks_ent->d_name);
    -         remove(blockname);
    -         free(blockname);
    -       }  
    -  
    -  closedir(blocksDIR);
    -    
    -  ret = rmdir(dirname);
    -  free(dirname);  
    -
    -  return ret ? 1 : 0; /* return 1 on error, 0 on rmdir() success */
    -}
    -
    -static int slashgrid_read(const char *path, char *buf, 
    -                          size_t size, off_t offset,
    -                          struct fuse_file_info *fi)
    -{
    -  (void) offset;
    -  (void) fi;
    -
    -  int          anyerror = 0, thiserror, i, ilast, fd;
    -  char        *s, *url, *disk_filename, *encoded_filename, *localpath;
    -  off_t        block_start, block_finish, block_i, len;
    -  struct       grst_body_text   rawbody;
    -  struct       grst_request request_data;
    -  struct       tm               modified_tm;
    -  struct       stat             statbuf;
    -  time_t                        now;
    -  GRSTgaclPerm perm;
    -  struct fuse_context fuse_ctx;
    -
    -  memcpy(&fuse_ctx, fuse_get_context(), sizeof(struct fuse_context));
    -  
    -  if (debugmode) syslog(LOG_DEBUG, "in slashgrid_read size=%ld offset=%ld",
    -                                    (long) size, (long) offset);
    -
    -  if ((local_root != NULL) && (strncmp(path, "/local/", 7) == 0))
    -    {
    -      asprintf(&localpath, "%s/%s", local_root, &path[7]);
    -      
    -      perm = get_gaclPerm(&fuse_ctx, localpath);
    -      
    -      if (GRSTgaclPermHasRead(perm))
    -        {
    -          fd = open(localpath, O_RDONLY);
    -
    -          if (lseek(fd, offset, SEEK_SET) < 0) size = -1;
    -          else size = read(fd, buf, size);
    -
    -          close(fd);                  
    -        }
    -      else size = -1;
    -      
    -      free(localpath);
    -      
    -      return size;
    -    }
    -
    -  if ((strncmp(path, "/http/",  6) != 0) &&
    -      (strncmp(path, "/https/", 7) != 0)) return -ENOENT;
    -
    -  block_start  = GRST_SLASH_BLOCK_SIZE * (offset / GRST_SLASH_BLOCK_SIZE);
    -  block_finish = GRST_SLASH_BLOCK_SIZE *
    -                                ((offset + size - 1) / GRST_SLASH_BLOCK_SIZE);
    -
    -  encoded_filename = GRSThttpUrlMildencode((char *) path);
    -  time(&now);
    - 
    -  for (block_i = block_start; block_i <= block_finish; block_i += GRST_SLASH_BLOCK_SIZE)
    -     {     
    -       asprintf(&disk_filename, "%s/%d%s/%ld-%ld", 
    -                 GRST_SLASH_BLOCKS, fuse_ctx.uid, encoded_filename, 
    -                 (long) block_i, (long) (block_i + GRST_SLASH_BLOCK_SIZE - 1));
    -
    -       if (debugmode) syslog(LOG_DEBUG, "disk_filename=%s", disk_filename);
    -                 
    -       if ((stat(disk_filename, &statbuf) != 0) ||
    -           (statbuf.st_mtime < now - GRST_SLASH_HEADERS_EXPIRE))
    -         {
    -           write_block_to_cache(&fuse_ctx, (char *) path, 
    -                            block_i, block_i + GRST_SLASH_BLOCK_SIZE - 1);
    -         }
    -
    -// need to worry about cached copy being deleted (invalidated by a writing
    -// thread?) between write_block_to_cache() and these reads?
    -// maybe return fd from write_block_to_cache() itself???
    -// the initial stat() needs to be part of this too
    -
    -       if ((fd = open(disk_filename, O_RDONLY)) != -1)
    -         {
    -           if (block_i == block_start)              
    -             {
    -               lseek(fd, offset - block_start, SEEK_SET);
    -               read(fd, buf, 
    -                        (offset - block_start + size < GRST_SLASH_BLOCK_SIZE) 
    -                       ? size : GRST_SLASH_BLOCK_SIZE - offset + block_start);
    -             }
    -           else if (block_i == block_finish)
    -             {
    -               read(fd, buf + (block_i - block_start),
    -                        offset + size - block_i);
    -             }
    -           else 
    -             {
    -               read(fd, buf + (block_i - block_start), 
    -                        GRST_SLASH_BLOCK_SIZE);
    -             }
    -             
    -           close(fd);
    -         }        
    -       else syslog(LOG_ERR, "Failed to open %s in cache", disk_filename);
    -     }
    -
    -  free(disk_filename);
    -  free(encoded_filename);
    -
    -  return size;
    -}
    -
    -static int slashgrid_write(const char *path, const char *buf, 
    -                           size_t size, off_t offset,
    -                           struct fuse_file_info *fi)
    -{
    -  int          anyerror = 0, thiserror, i, fd;
    -  char        *s, *url, *p, errorbuffer[CURL_ERROR_SIZE+1] = "", *localpath;
    -  GRSTgaclPerm perm;
    -
    -  struct grst_read_data read_data;
    -  struct grst_request request_data;
    -  struct fuse_context fuse_ctx;
    -  
    -  memcpy(&fuse_ctx, fuse_get_context(), sizeof(struct fuse_context));  
    -
    -  if (debugmode) syslog(LOG_DEBUG, "in slashgrid_write, path=%s, UID=%d\n",
    -                                   path, fuse_ctx.uid);
    -                         
    -  if ((local_root != NULL) && (strncmp(path, "/local/", 7) == 0))
    -    {
    -      asprintf(&localpath, "%s/%s", local_root, &path[7]);      
    -      perm = get_gaclPerm(&fuse_ctx, localpath);
    -      
    -      if (GRSTgaclPermHasWrite(perm))
    -        {
    -          fd = open(localpath, O_WRONLY | O_CREAT, S_IRUSR | S_IWUSR);
    -
    -          if (lseek(fd, offset, SEEK_SET) < 0) size = -1;
    -          else size = write(fd, buf, size);
    -
    -          fchown(fd, local_uid, local_gid);
    -          close(fd);                  
    -        }
    -      else size = -1;
    -      
    -      free(localpath);
    -      
    -      return size;
    -    }
    -
    -  if (strncmp(path, "/http/", 6) == 0)
    -    asprintf(&url, "http://%s", &path[6]);
    -  else if (strncmp(path, "/https/", 7) == 0)
    -    asprintf(&url, "https://%s", &path[7]);
    -  else return -ENOENT;
    -
    -  read_data.buf     = buf;
    -  read_data.sent    = 0;
    -  read_data.maxsent = size;
    -
    -  if (debugmode) syslog(LOG_DEBUG, "Put block %ld-%ld to URL %s", 
    -                                   (long) offset, (long) offset+size-1, url);
    -
    -  drop_cache_blocks(&fuse_ctx, (char *) path); /* we drop all read-cache blocks first */
    -  
    -  bzero(&request_data, sizeof(struct grst_request));
    -  request_data.writefunction = null_callback;
    -  request_data.readfunction  = read_data_callback;
    -  request_data.readdata      = &read_data;
    -  request_data.infilesize    = size;
    -  request_data.errorbuffer   = errorbuffer;
    -  request_data.url           = url;
    -  request_data.method        = GRST_SLASH_PUT;
    -  request_data.start         = offset;
    -  request_data.finish        = (off_t) (offset + size - 1);
    -
    -  thiserror = perform_request(&request_data, &fuse_ctx);
    -
    -  free(url);
    -
    -  if ((thiserror != 0) ||
    -      (request_data.retcode <  200) ||
    -      (request_data.retcode >= 300))
    -    {
    -           if (debugmode)
    -                syslog(LOG_DEBUG, "... curl error: %s (%d), HTTP error: %d\n",
    -                       errorbuffer, thiserror, request_data.retcode);
    -           
    -           if (thiserror != 0) anyerror = thiserror;
    -           else                anyerror = request_data.retcode;
    -
    -           if (request_data.retcode == 403) return -EACCES;
    -           else return -ENOENT; 
    -/* memory clean up still needed here!!!!!! */
    -    }
    -
    -  return size;
    -}
    -
    -int slashgrid_rename(const char *oldpath, const char *newpath)
    -{
    -  int          anyerror = 0, thiserror, i, fd, ret;
    -  char        *s, *url, *p, *destination, errorbuffer[CURL_ERROR_SIZE+1] = "",
    -              *oldlocalpath, *newlocalpath;
    -
    -  struct grst_read_data read_data;
    -  struct fuse_context fuse_ctx;
    -  struct grst_request request_data;
    -  GRSTgaclPerm oldperm, newperm;
    -
    -  memcpy(&fuse_ctx, fuse_get_context(), sizeof(struct fuse_context));
    -
    -  if ((local_root != NULL) && 
    -      ((strncmp(oldpath, "/local/", 7) == 0) ||
    -       (strncmp(newpath, "/local/", 7) == 0)))
    -    {
    -      if (strncmp(oldpath, newpath, 7) != 0)
    -        {
    -          return -EXDEV; /* not on same filesystem */
    -        }
    -    
    -      asprintf(&oldlocalpath, "%s/%s", local_root, &oldpath[7]);
    -      asprintf(&newlocalpath, "%s/%s", local_root, &newpath[7]);
    -      
    -      oldperm = get_gaclPerm(&fuse_ctx, oldlocalpath);
    -      newperm = get_gaclPerm(&fuse_ctx, newlocalpath);
    -      
    -      if (GRSTgaclPermHasWrite(oldperm) &&
    -          GRSTgaclPermHasWrite(newperm))
    -        {
    -          ret = rename(oldlocalpath, newlocalpath);
    -          free(oldlocalpath);
    -          free(newlocalpath);
    -          
    -          return (ret == 0) ? 0 : -errno;
    -        }
    -
    -      free(oldlocalpath);
    -      free(newlocalpath);
    -      return -EACCES;
    -    }
    -  else if (strncmp(oldpath, "/http/", 6) == 0)
    -    {
    -      if (strncmp(newpath, "/http/", 6) != 0) return -EXDEV;
    -
    -      asprintf(&url,         "http://%s", &oldpath[6]);
    -      asprintf(&destination, "http://%s", &newpath[6]);
    -    }
    -  else if (strncmp(oldpath, "/https/", 7) == 0)
    -    {
    -      if (strncmp(newpath, "/https/", 7) != 0) return -EXDEV;
    -
    -      asprintf(&url,         "https://%s", &oldpath[7]);
    -      asprintf(&destination, "https://%s", &newpath[7]);
    -    }
    -  else return -ENOENT;
    -
    -  read_data.buf     = "";
    -  read_data.sent    = 0;
    -  read_data.maxsent = 0;
    -
    -  if (debugmode) syslog(LOG_DEBUG, "MOVE URL %s to %s", url, destination);
    -  
    -  bzero(&request_data, sizeof(struct grst_request));
    -  request_data.writefunction = null_callback;
    -  request_data.readfunction  = read_data_callback;
    -  request_data.readdata      = &read_data;
    -  request_data.errorbuffer   = errorbuffer;
    -  request_data.url           = url;
    -  request_data.method        = GRST_SLASH_MOVE;
    -  request_data.destination   = destination;
    -
    -  thiserror = perform_request(&request_data, &fuse_ctx);
    -
    -  free(url);
    -  free(destination);
    -
    -  if ((thiserror != 0) ||
    -      (request_data.retcode <  200) ||
    -      (request_data.retcode >= 300))
    -    {
    -      if (debugmode)
    -                syslog(LOG_DEBUG, "... curl error: %s (%d), HTTP error: %d\n",
    -                       errorbuffer, thiserror, request_data.retcode);
    -
    -      if (thiserror != 0) anyerror = thiserror;
    -      else                anyerror = request_data.retcode;
    -
    -      if (request_data.retcode == 403) return -EACCES;
    -      else return -ENOENT; 
    -/* memory clean up still needed here!!!!!! */
    -    }
    -
    -  return 0;
    -}
    -
    -int slashgrid_unlink(const char *path)
    -{
    -  int   anyerror = 0, thiserror, i, fd, ret;
    -  char *s, *url, *p, errorbuffer[CURL_ERROR_SIZE+1] = "",
    -              *localpath;
    -
    -  struct grst_read_data read_data;
    -  struct fuse_context fuse_ctx;
    -  struct grst_request request_data;
    -  GRSTgaclPerm perm;
    -
    -  memcpy(&fuse_ctx, fuse_get_context(), sizeof(struct fuse_context));
    -
    -  if (debugmode) syslog(LOG_DEBUG, "slashgrid_unlink called for %s", path);
    -  
    -  if (strncmp(path, "/http/", 6) == 0)
    -    asprintf(&url, "http://%s", &path[6]);
    -  else if (strncmp(path, "/https/", 7) == 0)
    -    asprintf(&url, "https://%s", &path[7]);
    -  else if ((local_root != NULL) && (strncmp(path, "/local/", 7) == 0))
    -    {
    -      asprintf(&localpath, "%s/%s", local_root, &path[7]);
    -      
    -      perm = get_gaclPerm(&fuse_ctx, localpath);
    -      
    -      if (GRSTgaclPermHasWrite(perm))
    -        {
    -          ret = remove(localpath);
    -          free(localpath);
    -          
    -          return (ret == 0) ? 0 : -errno;
    -        }
    -
    -      free(localpath);
    -      return -EACCES;
    -    }
    -  else return -ENOENT;
    -
    -  read_data.buf     = "";
    -  read_data.sent    = 0;
    -  read_data.maxsent = 0;
    -
    -  if (debugmode) syslog(LOG_DEBUG, "DELETE URL %s", url);
    -  
    -  bzero(&request_data, sizeof(struct grst_request));
    -  request_data.writefunction = null_callback;
    -  request_data.readfunction  = read_data_callback;
    -  request_data.readdata      = &read_data;
    -  request_data.errorbuffer   = errorbuffer;
    -  request_data.url           = url;
    -  request_data.method        = GRST_SLASH_DELETE;
    -
    -  thiserror = perform_request(&request_data, &fuse_ctx);
    -
    -  free(url);
    -
    -  if ((thiserror != 0) ||
    -           (request_data.retcode <  200) ||
    -           (request_data.retcode >= 300))
    -         {
    -           if (debugmode)
    -                syslog(LOG_DEBUG, "... curl error: %s (%d), HTTP error: %d\n",
    -                       errorbuffer, thiserror, request_data.retcode);
    -
    -           if (thiserror != 0) anyerror = thiserror;
    -           else                anyerror = request_data.retcode;
    -
    -           if (request_data.retcode == 403) return -EACCES;
    -           else return -ENOENT; 
    -/* memory clean up still needed here!!!!!! */
    -         }
    -
    -  return 0;
    -}
    -
    -int slashgrid_rmdir(const char *path)
    -{
    -  int   ret;
    -  char *pathwithslash, *localpath;
    -
    -  asprintf(&pathwithslash, "%s/", path);
    -  ret = slashgrid_unlink(pathwithslash);  
    -  free(pathwithslash);
    -
    -/* error on GridSite side still??? */
    -  
    -  return ret;
    -}
    -
    -int slashgrid_mknod(const char *path, mode_t mode, dev_t dev)
    -{
    -  int ret;
    -
    -  if (debugmode) syslog(LOG_DEBUG, "slashgrid_mknod called for %s", path);
    -  
    -  ret = slashgrid_write(path, "", 0, 0, NULL);
    -
    -  return (ret < 0) ? ret : 0;
    -}
    -
    -int slashgrid_mkdir(const char *path, mode_t mode)
    -{
    -  int   ret;
    -  char *pathwithslash, *localpath;
    -  struct fuse_context fuse_ctx;
    -  GRSTgaclPerm perm;
    -  
    -  memcpy(&fuse_ctx, fuse_get_context(), sizeof(struct fuse_context));
    -
    -  if (debugmode) syslog(LOG_DEBUG, "slashgrid_mkdir, for %s", path);
    -                                  
    -  if ((local_root != NULL) && (strncmp(path, "/local/", 7) == 0))
    -    {
    -      asprintf(&localpath, "%s/%s", local_root, &path[7]);
    -      
    -      perm = get_gaclPerm(&fuse_ctx, localpath);
    -      
    -      if (GRSTgaclPermHasWrite(perm))
    -        {
    -          ret = mkdir(localpath, S_IRUSR | S_IWUSR | S_IXUSR);
    -          chown(localpath, local_uid, local_gid);
    -          free(localpath);
    -          
    -          return (ret == 0) ? 0 : -errno;
    -        }
    -
    -      free(localpath);
    -      return -EACCES;
    -    }
    -
    -  asprintf(&pathwithslash, "%s/", path);
    -  ret = slashgrid_write(pathwithslash, "", 0, 0, NULL);
    -  free(pathwithslash);
    -
    -  return (ret < 0) ? ret : 0;
    -}
    -
    -int slashgrid_chown(const char *path, uid_t uid, gid_t gid)
    -{
    -  if (debugmode) syslog(LOG_DEBUG, "slashgrid_chown - NOP");
    -  return 0;
    -}
    -
    -int slashgrid_chmod(const char *path, mode_t mode)
    -{
    -  if (debugmode) syslog(LOG_DEBUG, "slashgrid_chmod - NOP");
    -  return 0;
    -}
    -
    -int slashgrid_truncate(const char *path, off_t offset)
    -{
    -  int   anyerror = 0, thiserror, i, fd, ret;
    -  char *s, *url, *p, errorbuffer[CURL_ERROR_SIZE+1] = "", *localpath;
    -  GRSTgaclPerm perm;
    -
    -  struct grst_read_data read_data;
    -  struct fuse_context fuse_ctx;
    -  struct grst_request request_data;
    -
    -  memcpy(&fuse_ctx, fuse_get_context(), sizeof(struct fuse_context));
    -
    -  if (debugmode) syslog(LOG_DEBUG, "slashgrid_truncate, for %s (%d)",
    -                                  path, offset);
    -
    -  if (strncmp(path, "/http/", 6) == 0)
    -    asprintf(&url, "http://%s", &path[6]);
    -  else if (strncmp(path, "/https/", 7) == 0)
    -    asprintf(&url, "https://%s", &path[7]);
    -  else if ((local_root != NULL) && (strncmp(path, "/local/", 7) == 0))
    -    {
    -      asprintf(&localpath, "%s/%s", local_root, &path[7]);
    -      
    -      perm = get_gaclPerm(&fuse_ctx, localpath);
    -      
    -      if (GRSTgaclPermHasWrite(perm))
    -        {
    -          ret = truncate(localpath, offset);
    -          free(localpath);
    -          
    -          return (ret == 0) ? 0 : -errno;
    -        }
    -
    -      free(localpath);
    -      return -EACCES;
    -    }
    -  else return -ENOENT;
    -
    -  read_data.buf     = "";
    -  read_data.sent    = 0;
    -  read_data.maxsent = 0;
    -
    -  if (debugmode) syslog(LOG_DEBUG, "Truncate URL %s to %ld\n", 
    -                                   url, (long) offset);
    -  
    -  bzero(&request_data, sizeof(struct grst_request));
    -  request_data.writefunction = null_callback;
    -  request_data.readfunction  = read_data_callback;
    -  request_data.readdata      = &read_data;
    -  request_data.errorbuffer   = errorbuffer;
    -  request_data.url           = url;
    -  request_data.method        = GRST_SLASH_TRUNC;
    -  request_data.finish        = offset;
    -
    -  thiserror = perform_request(&request_data, &fuse_ctx);
    -
    -  free(url);
    -
    -  if ((thiserror != 0) ||
    -           (request_data.retcode <  200) ||
    -           (request_data.retcode >= 300))
    -         {
    -           if (debugmode)
    -                syslog(LOG_DEBUG, "... curl error: %s (%d), HTTP error: %d\n",
    -                       errorbuffer, thiserror, request_data.retcode);
    -
    -           if (thiserror != 0) anyerror = thiserror;
    -           else                anyerror = request_data.retcode;
    -
    -           if (request_data.retcode == 403) return -EACCES;
    -           else return -ENOENT; 
    -/* memory clean up still needed here!!!!!! */
    -         }
    -
    -  return 0;
    -}
    -
    -int slashgrid_statfs(const char *path, struct statfs *fs)
    -{
    -  /* statfs() on /local not used in practice, since not mounted separately */
    -
    -  if ((strncmp(path, "/local/", 7) == 0) ||
    -      (strcmp(path, "/local") == 0))
    -       return statfs(local_root, fs);
    -  else return statfs(GRST_SLASH_BLOCKS, fs);
    -}
    -
    -void *slashgrid_init(void)
    -{
    -  FILE *fp;
    -  struct rlimit unlimited = { RLIM_INFINITY, RLIM_INFINITY };
    -  
    -  if ((fp = fopen(GRST_SLASH_PIDFILE, "w")) != NULL)
    -    {
    -      fprintf(fp, "%d\n", (int) getpid());
    -      fclose(fp);
    -    }
    -
    -  if (debugmode)
    -    {
    -      chdir("/var/tmp"); /* fuse changes to / in demonize: undo this */
    -      setrlimit(RLIMIT_CORE, &unlimited);
    -    }
    -
    -  return NULL;
    -}
    -
    -void slashgrid_destroy(void *p)
    -{
    -  unlink(GRST_SLASH_PIDFILE);
    -}
    -
    -static struct fuse_operations slashgrid_oper = {
    -  .getattr	= slashgrid_getattr,
    -  .chown	= slashgrid_chown,    
    -  .chmod	= slashgrid_chmod,
    -  .truncate	= slashgrid_truncate,    
    -  .readdir	= slashgrid_readdir,
    -  .write	= slashgrid_write,
    -  .read		= slashgrid_read,
    -  .mknod	= slashgrid_mknod,
    -  .mkdir	= slashgrid_mkdir,
    -  .unlink	= slashgrid_unlink,
    -  .rmdir	= slashgrid_rmdir,
    -  .rename	= slashgrid_rename,
    -  .statfs	= slashgrid_statfs,
    -  .init		= slashgrid_init,
    -  .destroy	= slashgrid_destroy
    -};
    -
    -void slashgrid_logfunc(char *file, int line, int level, char *fmt, ...)
    -{
    -  char *mesg;
    -  va_list ap;
    -
    -  va_start(ap, fmt);
    -  vasprintf(&mesg, fmt, ap);
    -  va_end(ap);
    -  
    -  syslog(level, "%s(%d) %s", file, line, mesg);
    -  
    -  free(mesg);
    -}
    -
    -int main(int argc, char *argv[])
    -{
    -  char *fuse_argv[] = { "slashgrid", "/grid", "-o", "allow_other",
    -                        "-s", "-d" };
    -  int   i, ret, fuse_argc = 4; /* by default, ignore the final 2 args */
    -  struct passwd *pw;
    -  
    -  for (i=1; i < argc; ++i)
    -     {
    -       if (strcmp(argv[i], "--debug") == 0) 
    -         {
    -           debugmode = 1;
    -         }
    -       else if (strcmp(argv[i], "--foreground") == 0) 
    -         {
    -           debugmode = 1;
    -           fuse_argc = 6;
    -         }
    -       else if ((strcmp(argv[i], "--domain") == 0) && (i + 1 < argc))
    -         {
    -           sitecast_domain = argv[i+1];
    -           sitecast_domain_len = strlen(sitecast_domain);
    -           ++i;
    -         }
    -       else if ((strcmp(argv[i], "--groups") == 0) && (i + 1 < argc))
    -         {
    -           sitecast_groups = argv[i+1];
    -           ++i;
    -         }          
    -       else if ((strcmp(argv[i], "--local-root") == 0) && (i + 1 < argc))
    -         {
    -           local_root = argv[i+1];
    -           ++i;
    -         }          
    -       else if ((strcmp(argv[i], "--local-user") == 0) && (i + 1 < argc))
    -         {
    -           if ((pw = getpwnam(argv[i+1])) == NULL)
    -             {
    -               fprintf(stderr, "unable to find user %s\n", argv[i+1]);
    -               return 1;
    -             }
    -            
    -           local_uid = pw->pw_uid;
    -           local_gid = pw->pw_gid;
    -           ++i;           
    -         }
    -       else if ((strcmp(argv[i], "--gridmapdir") == 0) && (i + 1 < argc))
    -         {
    -           gridmapdir = argv[i+1];
    -           ++i;
    -         }          
    -       else
    -         {
    -           fprintf(stderr, "argument %s not recognised\n", argv[i]);
    -           return 1;
    -         }
    -     }              
    -
    -  if ((local_root != NULL) && 
    -      ((local_uid == 0) || (local_gid == 0)))
    -    {
    -      fprintf(stderr, "if --local-root is given, "
    -                "--local-user must be given too and not be the root user\n");
    -      return 1;
    -    }
    -
    -  openlog("slashgrid", 0, LOG_DAEMON);
    -    
    -  umount("/grid"); /* in case of previous crash - will fail if still busy */
    -
    -  for (i=0; i < GRST_SLASH_MAX_HANDLES; ++i)
    -     {
    -       pthread_mutex_init(&(handles[i].mutex), NULL);
    -       handles[i].curl_handle = NULL;
    -       handles[i].proxyfile   = NULL;
    -       handles[i].last_used   = 0;
    -     }
    -
    -//  GRSTerrorLogFunc = slashgrid_logfunc;
    - 
    -  GRSTgaclInit();
    - 
    -  ret = fuse_main(fuse_argc, fuse_argv, &slashgrid_oper);
    -
    -  return ret;
    -}
    diff --git a/org.gridsite.core/src/slashgrid.init b/org.gridsite.core/src/slashgrid.init
    deleted file mode 100755
    index f83b43e..0000000
    --- a/org.gridsite.core/src/slashgrid.init
    +++ /dev/null
    @@ -1,67 +0,0 @@
    -#!/bin/bash
    -#
    -# slashgrid        Startup script for the SlashGrid client-side server
    -#
    -# chkconfig: - 90 10
    -# description: Filesystem extension for access to HTTP(S) file servers
    -# processname: slashgrid
    -# config: /etc/sysconfig/slashgrid
    -# pidfile: /var/run/slashgrid.pid
    -
    -# Source function library.
    -. /etc/rc.d/init.d/functions
    -
    -# Examples of useful overrides of default settings:
    -#
    -# OPTIONS=--debug			# to turn on LOG_DEBUG in syslog
    -# SLASHGRID=/usr/local/sbin/slashgrid	# if slashgrid not in /usr/sbin
    -# PATH=$PATH:/usr/local/bin		# if fusermount not on old $PATH
    -#
    -if [ -f /etc/sysconfig/slashgrid ] ; then
    - . /etc/sysconfig/slashgrid
    -fi
    -
    -slashgrid=${SLASHGRID-/usr/sbin/slashgrid}
    -pidfile=${PIDFILE-/var/run/slashgrid.pid}
    -lockfile=${LOCKFILE-/var/lock/subsys/slashgrid}
    -prog=slashgrid
    -RETVAL=0
    -
    -start() {
    -        echo -n $"Starting $prog: "
    -        modprobe fuse
    -        sleep 1
    -        daemon $slashgrid $OPTIONS
    -        RETVAL=$?
    -        echo
    -        [ $RETVAL = 0 ] && touch ${lockfile}
    -        return $RETVAL
    -}
    -
    -stop() {
    -	echo -n $"Stopping $prog: "
    -	killproc $slashgrid
    -	RETVAL=$?
    -	echo
    -	[ $RETVAL = 0 ] && rm -f ${lockfile} ${pidfile}
    -}
    -
    -# Invoke the right function
    -
    -case "$1" in
    -  start)
    -	start
    -	;;
    -  stop)
    -	stop
    -	;;
    -  restart)
    -	stop
    -	start
    -	;;
    -  *)
    -	echo $"Usage: $prog {start|stop|restart|help}"
    -	exit 1
    -esac
    -
    -exit $RETVAL
    diff --git a/org.gridsite.core/src/urlencode.c b/org.gridsite.core/src/urlencode.c
    deleted file mode 100644
    index bea36a9..0000000
    --- a/org.gridsite.core/src/urlencode.c
    +++ /dev/null
    @@ -1,73 +0,0 @@
    -/*
    -   Copyright (c) 2002-3, Andrew McNab, University of Manchester
    -   All rights reserved.
    -
    -   Redistribution and use in source and binary forms, with or
    -   without modification, are permitted provided that the following
    -   conditions are met:
    -
    -     o Redistributions of source code must retain the above
    -       copyright notice, this list of conditions and the following
    -       disclaimer. 
    -     o Redistributions in binary form must reproduce the above
    -       copyright notice, this list of conditions and the following
    -       disclaimer in the documentation and/or other materials
    -       provided with the distribution. 
    -
    -   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
    -   CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
    -   INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
    -   MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
    -   DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
    -   BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
    -   EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
    -   TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
    -   DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
    -   ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
    -   OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
    -   OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
    -   POSSIBILITY OF SUCH DAMAGE.
    -*/
    -
    -/*---------------------------------------------------------------*
    - * For more about GridSite: http://www.gridsite.org/             *
    - *---------------------------------------------------------------*/
    -
    -#include 
    -#include 
    -
    -#include "gridsite.h"
    -
    -int main(int argn, char *argv[])
    -{
    -  int    i;
    -
    -  if (argn == 1)
    -    {
    -      puts("urlencode [-m|-d] string-to-encode-or-decode");
    -      return 0;
    -    }
    -
    -  if      (strcmp(argv[1], "-d") == 0) /* decode */
    -   for (i = 2; i < argn; ++i) 
    -      {
    -        if (i > 2) fputs(" ", stdout);
    -        fputs(GRSThttpUrlDecode(argv[i]), stdout);
    -      }
    -  else if (strcmp(argv[1], "-m") == 0) /* mild encode */
    -   for (i = 2; i < argn; ++i) 
    -      {
    -        if (i > 2) fputs("%20", stdout);
    -        fputs(GRSThttpUrlMildencode(argv[i]), stdout);
    -      }
    -  else /* standard encode */
    -   for (i = 1; i < argn; ++i) 
    -      {
    -        if (i > 1) fputs("%20", stdout);
    -        fputs(GRSThttpUrlEncode(argv[i]), stdout);
    -      }
    -
    -  puts("");
    -
    -  return 0;
    -}
    diff --git a/org.gridsite.core/src/xacmlexample.c b/org.gridsite.core/src/xacmlexample.c
    deleted file mode 100644
    index af914b9..0000000
    --- a/org.gridsite.core/src/xacmlexample.c
    +++ /dev/null
    @@ -1,148 +0,0 @@
    -/*
    -   Copyright (c) 2005, Andrew McNab and Shiv Kaushal, University of Manchester
    -   All rights reserved.
    -
    -   Redistribution and use in source and binary forms, with or
    -   without modification, are permitted provided that the following
    -   conditions are met:
    -
    -     o Redistributions of source code must retain the above
    -       copyright notice, this list of conditions and the following
    -       disclaimer. 
    -     o Redistributions in binary form must reproduce the above
    -       copyright notice, this list of conditions and the following
    -       disclaimer in the documentation and/or other materials
    -       provided with the distribution. 
    -
    -   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
    -   CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
    -   INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
    -   MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
    -   DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
    -   BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
    -   EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
    -   TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
    -   DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
    -   ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
    -   OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
    -   OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
    -   POSSIBILITY OF SUCH DAMAGE.
    -*/
    -
    -/*---------------------------------------------------------------*
    - * For more about GridSite: http://www.gridsite.org/             *
    - *---------------------------------------------------------------*/
    -
    -/*
    -   Example program using XACML
    -
    -   Build with:
    -   
    -    gcc -o xacmlexample xacmlexample.c -L. -I. -lgridsite -lxml2 -lz -lm
    -*/
    -
    -#include 
    -#include 
    -#include 
    -#include 
    -
    -int main()
    -{
    -  GRSTgaclCred  *cred, *usercred;
    -  GRSTgaclEntry *entry;
    -  GRSTgaclAcl   *acl1, *acl2;
    -  GRSTgaclUser  *user;
    -  GRSTgaclPerm   perm0, perm1, perm2;
    -  FILE          *fp;
    -
    -  /* must initialise GACL before using XACML functions */
    -
    -  GRSTgaclInit();
    -
    -  /* build up an ACL, starting with a credential */
    -
    -  cred = GRSTgaclCredNew("person");
    -
    -  GRSTgaclCredAddValue(cred, "dn", "/O=Grid/CN=Mr Grid Person");
    -
    -  /* create an entry to put it in */
    -
    -  entry = GRSTgaclEntryNew();
    -
    -  /* add the credential to it */
    -
    -  GRSTgaclEntryAddCred(entry, cred);
    -
    -  /* add another credential */
    -
    -  cred = GRSTgaclCredNew("dn-list");
    -  GRSTgaclCredAddValue(cred, "url", "example-dn-list");
    -  GRSTgaclEntryAddCred(entry, cred);
    -
    -  fp = fopen("example-dn-list", "w");
    -  fputs("/O=Grid/CN=Mr Grid Person\n", fp);
    -  fclose(fp);
    -
    -  /* associate some permissions and denials to the credential */
    -
    -  GRSTgaclEntryAllowPerm( entry, GRST_PERM_READ);
    -  GRSTgaclEntryAllowPerm( entry, GRST_PERM_WRITE);
    -  GRSTgaclEntryAllowPerm( entry, GRST_PERM_ADMIN);
    -  GRSTgaclEntryDenyPerm(  entry, GRST_PERM_ADMIN);
    -  GRSTgaclEntryDenyPerm(  entry, GRST_PERM_LIST);
    -
    -  perm0 = GRST_PERM_READ | GRST_PERM_WRITE;
    -
    -  printf("test perm should be %d\n", perm0);
    -
    -  /* create a new ACL and add the entry to it */
    -
    -  acl1 = GRSTgaclAclNew();
    -
    -  GRSTgaclAclAddEntry(acl1, entry);
    -
    -  /* create a GRSTgaclUser to compare with the ACL */
    -
    -  usercred = GRSTgaclCredNew("person");
    -
    -  GRSTgaclCredAddValue(usercred, "dn", "/O=Grid/CN=Mr Grid Person");
    -
    -  user = GRSTgaclUserNew(usercred);
    -
    -  GRSTgaclUserSetDNlists(user, getcwd(NULL, 0));
    -  printf("DN Lists dir %s\n", getcwd(NULL, 0));
    -
    -//  putenv("GRST_DN_LISTS=.");
    -
    -  perm1 = GRSTgaclAclTestUser(acl1, user);
    -
    -  printf("test /O=Grid/CN=Mr Grid Person in acl = %d\n", perm1);
    -
    -  /* print and save the whole ACL */
    -
    -  GRSTgaclAclPrint(acl1, stdout);
    -
    -  GRSTxacmlAclSave(acl1, "example.xacml");
    -
    -  puts("gridacl.out saved");
    -
    -  puts("");
    -
    -  /* load the ACL back off the disk, print and test it */
    -
    -  acl2 = GRSTxacmlAclLoadFile("example.xacml");
    -
    -  puts("gridacl.out loaded");
    -
    -  if (acl2 != NULL) GRSTgaclAclPrint(acl2, stdout); else puts("acl2 is NULL");
    -
    -  perm2 = GRSTgaclAclTestUser(acl2, user);
    -
    -  printf("test /O=Grid/CN=Mr Grid Person in acl = %d\n", perm2);
    -
    -  if (perm1 != perm0) return 1;
    -  if (perm2 != perm0) return 2;
    -
    -  return 0;
    -}
    -
    -- 
    1.8.2.3
    
    

    AOl9ARhwCtdIogIZ;F^Ik^6h`oWPt6R;Re8r)4Fn-J!9SicqcE){3aN%JOYdl z)b8vU;7;(k#AERuonf7Nlo}3)kM+f&j=&e22!!5_42=*yRv`-+bikhq485mXjd!65 zg}ltOSUeqWrJzz8fhfcWu7ZMvV$KdbW@!x+ObF%!=cd4{6s)_g1ZbpC0N`fybHiSP zvma*h%88Nl2jUX_Zc^@KCbRZz0tP!2aT*jLLx_utyje@EKAMy8m5KeFSyC z9yUyuv7w`0=|~9v@6d5ORfvJfqn_oEZcw^%g@bB{NTB=WZzyxHh15vQNxzo}c2-i@ z&Uxi4lStr-!%f}eryrQ$gTqU6D<5pOl!=Gm^^GwmJe;G9WyW-mNjy<9Hp=MW64gKA zC!eM#!@%`Dqp#J^E%e_SV)MP7B&jJ?`ZUu;Th~7Y$L~|>Q|h=dE>Z|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